DEV Community

Cover image for One repo, many agents: parallel features from a Figma prototype
Gabriel Menezes
Gabriel Menezes

Posted on Originally published at ivar.run

One repo, many agents: parallel features from a Figma prototype

One repo, one big prototype

Your designer hands over a Figma prototype with onboarding, checkout and a profile area. It all lands in one app repository. You want three agents working at once, one per area, and you want the result to arrive as a single pull request.

Does ivar make sense with one repo and many parallel branches, or only when work spans several repositories? It does, and this post walks through it end to end.

The hall with one repo

Start a hall and add the repository:

ivar init
ivar repo add app git@github.com:acme/app.git
Enter fullscreen mode Exit fullscreen mode

The Figma MCP server is declared once in ivar.json and materialised into each session, so every agent you start can read the prototype. Configure Figma MCP for OpenCode in one step shows the block and the auth step, and the MCP guide covers the other harnesses.

A fresh worktree is a clean checkout. Installed dependencies and generated code are not there. Put what a new worktree needs in a setup script at .ivar/setups/app.sh:

#!/bin/sh
set -e
make deps
make codegen
Enter fullscreen mode Exit fullscreen mode

Every branch you cut below runs it, so each agent starts from a working tree instead of a broken build.

A main feature and one subfeature per slice

Create the main feature and promote the repo in it first:

ivar feature create figma-proto
ivar feature promote figma-proto app
Enter fullscreen mode Exit fullscreen mode

Order matters. A subfeature's branch is cut from its parent's branch, and that branch only exists once the parent has promoted the repo. If you promote a child first, ivar warns that the declared base does not exist and cuts the child from main instead.

Now add one subfeature per slice and promote the repo in each:

ivar feature create onboarding --parent figma-proto
ivar feature promote onboarding app
ivar feature create checkout --parent figma-proto
ivar feature promote checkout app
ivar feature create profile --parent figma-proto
ivar feature promote profile app
Enter fullscreen mode Exit fullscreen mode

Each child has its own branch and worktree, based on figma-proto. The Subfeatures section of the features guide is the short reference for this flow.

One agent per slice

Open a terminal per slice and start a session in each:

ivar session start onboarding
Enter fullscreen mode Exit fullscreen mode

Then ivar session start checkout in the second terminal and ivar session start profile in the third. There is no single command that starts all three; you open them yourself, one per terminal.

Each session works in its own worktree, so the agents never touch each other's files, index or HEAD. Each session also gets the same harness config and the same MCP servers, Figma included. You point each agent at its frame in the prototype and let it build.

Watching the tree

From any terminal, look at the whole tree:

ivar feature status figma-proto --recursive
Enter fullscreen mode Exit fullscreen mode

After onboarding and checkout have been folded back, it looks like this:

Subtree:
  figma-proto  state active  repos 1  blocked by: profile (active)
    checkout  state integrated  repos 1
    onboarding  state integrated  repos 1
    profile  state active  repos 1
Enter fullscreen mode Exit fullscreen mode

The main feature lists the children that still block it. Once profile is integrated, nothing does.

Folding slices back

When a slice is done, integrate it into its parent. Integration requires the child's plan gate to be approved. For a small slice, the plan alone is enough:

ivar plan create onboarding plan
ivar plan approve onboarding plan
ivar feature integrate onboarding
Enter fullscreen mode Exit fullscreen mode

The child's work lands on the figma-proto branch and the child closes as integrated. If a slice deserves a written plan with requirements first, the planning guide covers the full flow. Repeat for checkout and profile.

One pull request

With every child integrated, the main feature carries all three slices. Preview the delivery first:

ivar feature deliver figma-proto --preview
Enter fullscreen mode Exit fullscreen mode

The preview writes nothing. It reads the branch, the remote, the base and any existing pull request, and prints a fingerprint. When it looks right, apply it with the fingerprint the preview printed:

ivar feature deliver figma-proto --fingerprint <fp>
Enter fullscreen mode Exit fullscreen mode

That pushes the figma-proto branch and opens one pull request against main. Creating the pull request needs a GitHub remote; with a local remote, delivery only pushes. The delivery guide covers the details, including updating a pull request that already exists.

When you don't need ivar

If you use one harness on one repo and never run work in parallel, you may not need any of this. Commit an .mcp.json with the Figma server, use git worktree add when you want a second branch checked out, and move on.

ivar starts paying off when several agents run at once, possibly in different harnesses, and each needs the same MCP servers, the same setup script and an isolated worktree, with a way to fold the pieces back into one change.

Related

Top comments (0)