Problem to Fix
When multiple AI coding agents need to work on unrelated tasks simultaneously, there is no automated way to give each agent an isolated working environment, detect when agents are modifying the same files, or see which agents are active and what they are working on.
Why it Matters
Sequential discipline (one agent, one task at a time) works but limits throughput. As teams adopt multi-agent workflows, the lack of isolation and coordination tooling will cause merge conflicts, lost work, and confusion about what each agent is doing.
General Approach
Three additions, building on the foundations laid in issue #108:
-
Worktree launcher — Makefile targets (make swarm-start, swarm-list, swarm-clean) that create git worktrees as isolated working environments for concurrent agents. Each agent gets its own directory, branch, and temp files. Works automatically with Claude Code; other agents (Cursor, Codex, Gemini) get printed instructions for manual setup.
-
Conflict detection — An advisory check that compares files changed on the current branch against files changed in other open PRs. Warns but never blocks. Runs during /checkpoint and /submit-for-review.
-
Status swarm awareness — Enhance /status to show active worktrees alongside open PRs and issues, giving a unified view of all concurrent work.
Complexity
Verification / QA effort: significant
The worktree launcher requires testing across all four agent adapters. Conflict detection involves GitHub API queries that need performance testing with many open PRs. The full system requires end-to-end testing of the swarm workflow.
Acceptance Criteria
make swarm-start name=<task> creates a git worktree with a feature branch and prints adapter-specific instructions
make swarm-list shows all active worktrees with their branches
make swarm-clean name=<task> removes a worktree cleanly
.swarm/ directory is gitignored
- Conflict detection warns when the current branch modifies files also changed by other open PRs
/status shows active worktrees when any exist
- All existing skills work correctly inside a worktree without modification
Problem to Fix
When multiple AI coding agents need to work on unrelated tasks simultaneously, there is no automated way to give each agent an isolated working environment, detect when agents are modifying the same files, or see which agents are active and what they are working on.
Why it Matters
Sequential discipline (one agent, one task at a time) works but limits throughput. As teams adopt multi-agent workflows, the lack of isolation and coordination tooling will cause merge conflicts, lost work, and confusion about what each agent is doing.
General Approach
Three additions, building on the foundations laid in issue #108:
Worktree launcher — Makefile targets (
make swarm-start,swarm-list,swarm-clean) that create git worktrees as isolated working environments for concurrent agents. Each agent gets its own directory, branch, and temp files. Works automatically with Claude Code; other agents (Cursor, Codex, Gemini) get printed instructions for manual setup.Conflict detection — An advisory check that compares files changed on the current branch against files changed in other open PRs. Warns but never blocks. Runs during
/checkpointand/submit-for-review.Status swarm awareness — Enhance
/statusto show active worktrees alongside open PRs and issues, giving a unified view of all concurrent work.Complexity
Verification / QA effort: significant
The worktree launcher requires testing across all four agent adapters. Conflict detection involves GitHub API queries that need performance testing with many open PRs. The full system requires end-to-end testing of the swarm workflow.
Acceptance Criteria
make swarm-start name=<task>creates a git worktree with a feature branch and prints adapter-specific instructionsmake swarm-listshows all active worktrees with their branchesmake swarm-clean name=<task>removes a worktree cleanly.swarm/directory is gitignored/statusshows active worktrees when any exist