When multiple AI coding agents share a repo, the first thing they need is not another prompt template — it is a map of who owns what.
Try it. Watch ownership light up live in the coordination demo, then dig into semantic impact when callers sit outside the claimed paths, and merge-replay when sibling branches still collide.
More. How exclusive leases enforce the map, why fleet coordination sits under your existing harnesses, and the CLI / docs for wiring it in.
main.Why maps beat merge queues
Merge queues catch collisions after the work is done. A territory map surfaces ownership before an agent opens a file. That shift — from post-hoc conflict resolution to pre-claim coordination — is the difference between a fleet that ships and a swarm that thrash-merges overnight.
One view across laptop, CI, and cloud
Agents do not all live in the same place. Some run on a laptop, some in CI, some as long-lived cloud sessions. The territory map treats them as one fleet: live claims, visible waits, and a single source of truth for file ownership across every runner.
How the map is built
Every grant starts as a lease: path globs, optional line ranges, an agent identity, and a TTL. The map is the live projection of those leases — who holds what, who is queued, and which paths are still open. Heartbeats keep claims warm; expiry and release free the territory for the next worker.
Overlap is not a vibes check. Path and range math decides whether two intents collide before either agent writes. Hotspot splits carve dense directories so one agent is not forced to lock an entire package when it only needs a leaf.
What you see
Hot paths light up when an agent holds a lease. Idle regions stay open for the next worker. Reviewers and platform engineers can finally answer “who is touching auth right now?” without grepping logs or guessing from open PRs.
Leases, merge-replay, and advisory scope
The map is the visibility layer. Exclusive leases enforce turn-taking on the claimed paths. Merge-replay verification then checks what would actually land — git merge-tree against sibling work — so a clean lease still fails closed if the branch would conflict.
Scope prediction sits beside that stack as an advisory: given a task intent, suggest likely paths before the agent asks for a lease. It does not grant territory; it helps fleets claim the right map cells the first time.
What to try
- In the coordination demo, toggle with/without coordination and watch the territory panel as claims appear and release.
- Open semantic impact for cases where textual ownership is fine but callers outside the claim still break.
- Run merge-replay to see how lease-clean work can still fail the merge-tree check against co-active branches.
Built for monorepos and polyrepos alike
Territory is scoped to the workspace your org actually ships from — whether that is one giant monorepo or a constellation of services. The map does not care how you organize packages; it cares that two agents never believe they both own the same path.
What comes next
The territory map is the foundation. Exclusive leases enforce it. Merge-replay verifies what lands. Together they turn agent fleets from a demo into infrastructure you can run on the codebases that matter — without pretending leases alone erase every conflict.
Ready to coordinate your fleet?
