Multi-repo · one session
One agent session across multiple repositories
A contract lives in api. Its client lives in web. It is one change, but git sees two repos and your agent sees one of them.
- $ git clone git@github.com:acme/hall.git && cd hall
- $ ivar sync
- reading ivar.json: 4 repos, default branch main
- ✓ api bare clone · worktree main · setup script ok
- ✓ web bare clone · worktree main · setup script ok
- ✓ shared bare clone · worktree main
- ✓ infra bare clone · worktree main
- ✓ claude-code and opencode config materialised
- ready in 41s; nothing was checked out twice
- $ ivar feature create billing-currency --repos api,web
- ✓ api worktree cut · feat/billing-currency
- ✓ web worktree cut · feat/billing-currency
- · shared, infra read-only: ivar feature promote shared
- $ ivar session start billing-currency
- view dir ~/acme/.ivar/sessions/billing-currency
- skills api--openapi-contract · web--storybook · commit-style
- context AGENTS.md → api/AGENTS.md, web/AGENTS.md
- › edit api/openapi.json Money.currency: string → enum
- › edit web/src/api/billing.ts ↳ from api/openapi.json; same session, no handoff
- $ ivar feature deliver billing-currency
- ✓ api pushed feat/billing-currency
- ✓ web pushed feat/billing-currency
- → acme/api#412 Money.currency becomes an enum
- → acme/web#288 regenerate billing client
- part of acme/api#412
- 2 pull requests, one feature. Merge order is still yours.
01The view directory
One directory on one branch for every repo your feature touches
A hall is a directory that owns a set of repos, described by a committed ivar.json. Each repo has one bare clone. Every working copy, including the default branch, is a git worktree from that clone. A change here changes that repository. You do not copy repos or remember another sync step.
- same branch
- A feature uses one branch across many repos. You do not keep four branches aligned or pin a submodule SHA.
- bare once
- Nothing is checked out into the bare clone. A second feature adds a directory, not another clone. Both features can stay live at the same time.
- committed
- The hall is a git repo.
ivar.jsonlives in its history, so a pull request can review the setup like any other change.
02The guard
The filesystem stops writes before a prompt can
Repos you have not promoted have their write bits cleared: mode & ~0o222, applied recursively. The kernel refuses an agent's attempt to enter shared. The harness hook only explains how to promote it.
- › edit shared/src/money.ts
- ✗ EACCES: permission denied, open 'shared/src/money.ts'
- shared is read-only in this feature.
- Run this to make it writable:
- ivar feature promote shared
- $ ivar feature promote shared
- ✓ shared worktree cut · feat/billing-currency
- ✓ write bits restored · 3 of 4 promoted
- › edit shared/src/money.ts ok: deliberate and recorded in the feature
03Deliver
One feature, one pull request per repo, with links between them
ivar feature deliver pushes each promoted worktree and opens a pull request in its repo. It then adds the links, because the URL exists only after the pull request. Reviewers no longer need to reconstruct which changes belong together.
The link says part of, not depends on. ivar models co-belonging rather than dependency. It does not sequence merges or decide whether the client can land before the contract. Reviewers make that call.
Capabilities
The session carries the context a shell script cannot
Onboarding
One person writes the hall once, reviewed in a pull request. Everyone else gets the same repos, branches and setup scripts with two commands.
git clone git@github.com:acme/hall.git && cd hall && ivar syncNamespaced skills
Repo skills keep their origin in their name, so two repos can both mount an openapi-contract skill. Hall skills mount flat and apply to the whole session.
Session relay
Nothing in the view directory belongs to one vendor. The same worktrees, branch and context hand off to another harness; nothing is uploaded.
ivar session relay billing-currency --to opencodeThe fair objection
Why not git worktree and a shell script?
Write the script. It is forty lines and it works. These are the limits you will meet, in order.
Cutting the worktrees
Loop over four repos and run git worktree add with the same branch name. The script handles this.
Keeping the agent out
Every repo in the directory is writable. You can ask the agent not to touch shared. It eventually will.
Two repos, one skill name
Both openapi-contract skills land in the same folder. One silently wins. You find out later.
The next person
Your script is on your machine. Their four repos are on theirs, on whatever branch they last used.
a committed manifestPrior art
Other tools and what they actually do
Each comparison states what the tool does and does not do, checked against its source and commit history. That includes tools better than ivar at their own job.
Get it running
Install ivar in thirty seconds
It makes more sense after you use it. macOS and Linux work. On Windows, use WSL because the view directory is built entirely from symlinks.