Loading...
Loading...
Independence-validated parallel fleet that runs each worker (claude -p or codex exec) in its own git worktree. Use when tasks touch non-overlapping files and you need merge-safe isolation (each worker on its own branch). For DAG-ordered one-shot workers with budgets, use dag-fleet. For headless iteration with a reviewer loop, use iterative-fleet.
npx skill4agent add quickcall-dev/skills worktree-fleettarget_filesYou want to run multiple agents in parallel. Which fleet?
1. Are the tasks independent (no shared files, no shared state)?
YES → worktree-fleet ← YOU ARE HERE
NO → continue
2. Does the work need iteration with a reviewer making accept/iterate decisions?
YES → iterative-fleet
NO → continue
3. Is the work a one-shot DAG (each agent runs to completion, dependencies via depends_on)?
YES → dag-fleet
NO → continue
4. None of the above?
→ You're the orchestrator. Open multiple Claude Code sessions.dag-fleetdepends_oniterative-fleet{
"fleet_name": "refactor-utils",
"type": "worktree",
"config": {
"max_concurrent": 4,
"model": "sonnet",
"fallback_model": "haiku"
},
"workers": [
{
"id": "rename-foo",
"task": "Rename foo() to baz() in src/utils/foo.ts and all callers",
"target_files": ["src/utils/foo.ts", "src/**/*.test.ts"],
"branch": "rename-foo-to-baz",
"type": "code-run",
"max_turns": 30,
"max_budget_usd": 2.0
}
]
}target_filesbranchgit committyperead-onlywritereviewercode-run"provider": "codex"--sandbox workspace-write| Script | When to call | Args |
|---|---|---|
| Validate independence, create worktrees, spawn workers in tmux | |
| Per-worktree progress, cost, completion state | |
| Print merge plan (files changed, line counts) — no auto-merge | |
| Remove git worktrees, requires --force | |
FLEET_ROOT$FLEET_ROOT/fleet.json$FLEET_ROOT/workers/{id}/prompt.mdSave ALL output to $FLEET_ROOT/workers/{id}/output/ — use absolute paths.bash ${CLAUDE_SKILL_DIR}/scripts/launch.sh $FLEET_ROOT--dry-runbash ${CLAUDE_SKILL_DIR}/scripts/status.sh <fleet-name-or-root>When you are done, commit your changes on the current branch with a descriptive message.git mergemerge.shcleanup.sh --force| Agent says | Rebuttal |
|---|---|
| "The tasks overlap slightly but I can manage" | Overlapping target_files = reject. No exceptions. Fix the task split first. If you think you can manage it, you're wrong — merge conflicts in parallel worktrees are unrecoverable. |
"I'll skip | Then dry-run will be fast. Run it. The independence validator catches things you didn't think of (glob overlap, bidirectional fnmatch). |
| "Two workers both need the config file, but in different sections" | Same file = overlap. The validator doesn't know about "sections." Split the config change into a separate sequential step, or have one worker own it. |
| "I'll auto-merge since the branches are clean" | Never auto-merge. Run |
| "I can skip cleanup — the worktrees aren't hurting anything" | Worktrees hold branch locks. Stale worktrees block future branch creation and waste disk. Run |
--dry-runmerge.shcleanup.sh--force