Parallel Worktree Delivery
Run a fleet of agents without checkout collisions by giving every work stream its own git worktree, branch, file-ownership boundary, and integration gate.
Start
- Read the repository instructions for every path that any stream may edit.
- Inspect the current state:
git branch --show-current git status --short git worktree list - Choose one integration branch and one branch/worktree per independent stream.
- Load references/fleet-setup.md before creating worktrees, sharing prerequisites, or prompting worker agents.
- Load references/integration-playbook.md before merging worker branches back together.
Plan the wave
- Parallelize only streams with independent write ownership and no true ordering dependency.
- Split dependent work into waves. For example, create shared modules in one wave, then migrate broad call sites in a later wave.
- Assign every stream an exclusive file set. If a shared file cannot be avoided, assign exact sections or one-line edits and require the worker to flag that edit in its report.
- Keep append-only shared files such as changelogs on the orchestrator's merge checklist because they conflict often.
- Treat the primary checkout as live: if another human or agent owns uncommitted work there, do not stash, commit, or overwrite it.
Prompt each worker
Every worker prompt must include:
- The branch, worktree path, and base branch.
- The exact paths or sections it owns and a statement that no other files may be edited except explicitly named boundary edits.
- Required setup notes, including whether dependencies are shared or isolated.
- The narrow checks it should run before reporting.
- A requirement to report cross-boundary changes instead of making them when not authorized.
Integrate
- Merge one stream branch into the integration branch.
- Resolve only that branch's conflicts.
- Run the repository's required gate after each merge, not only after the final pile-up.
- Keep cross-cutting fixes with the orchestrator unless one stream clearly owns the affected files.
- Review the final diff and stage explicit paths only.
Output
Report the wave plan, ownership map, worker branches, validation after each merge, conflicts resolved, cross-cutting orchestrator fixes, and any existing skill or instruction that should be changed later.