packages/forge/src/skills/subagent-driven-development/SKILL.md
Use when the user says "use subagents", "parallel agents", "fan out", "dispatch agents", "subagent driven", or when a task decomposes into 2+ independent units that benefit from isolated execution. Covers when to dispatch, worktree isolation, and merge strategy.
npx skillsauth add adrozdenko/soleri subagent-driven-developmentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Decompose work into isolated units, dispatch subagents via the Agent tool, merge results back. You are the orchestrator — you make all decisions, subagents execute.
Announce at start: "I'm using the subagent-driven-development skill to dispatch isolated agents."
You are the boss. Subagents are the crew.
Not all subagents are equal. Route by complexity:
| Signal | Agent Type | Why | | ------------------------------------- | ------------------------- | ----------------------------- | | Single file, clear spec, no decisions | Claude Code worker | Fast, low overhead | | Approach already in parent plan | Claude Code worker | Spec is decided | | 3+ files, cross-cutting concerns | Soleri agent instance | Needs vault, brain, lifecycle | | Unresolved design decisions | Soleri agent instance | Needs judgment | | New dependencies or architecture | Soleri agent instance | Needs full context |
User overrides:
| Signal | Dispatch? | | --------------------------------------------- | ---------------------------------------- | | 2+ independent tasks touching different files | Yes — no conflict risk, parallel speedup | | Risky/experimental work (spike, prototype) | Yes — isolate blast radius in a worktree | | Large refactor across unrelated modules | Yes — each module is a clean unit | | Single-file change or trivial fix | No — overhead exceeds benefit | | Tasks with sequential dependencies | No — cannot parallelize | | Tasks modifying the same file | No — guaranteed merge conflicts |
Read all relevant files. Consult the vault for patterns. Make every design decision. Define the exact spec for each subagent task: files to touch, approach to use, acceptance criteria.
Break work into discrete units. For each, determine: files involved, dependencies on other units, conflict risk, complexity. Assign agent type per the routing table.
Present the dispatch table to the user:
## Dispatching N tasks in parallel
| # | Task | Agent | Why |
|---|------|-------|-----|
| 1 | Description | Worker / Instance | Routing reason |
Each subagent prompt must include:
Launch all independent subagents in a single message so they run in parallel.
Use isolation: "worktree" for file-modifying tasks.
For each returning subagent:
git merge or git cherry-pick from the worktree branch, one at a timeAfter all merges, report to the user:
Minimal (default):
✓ N/N complete. M patterns captured to vault.
→ Decisions: [any design decisions the orchestrator made]
Detailed (on request):
| # | Task | Agent | Status | Knowledge |
|---|------|-------|--------|-----------|
| 1 | Desc | Worker | Done ✓ | — |
| 2 | Desc | Instance | Done ✓ | 2 patterns |
Capture learnings to vault. Run orchestrate_complete for the parent plan.
Three layers — nothing accumulates:
finally block in dispatcher removes worktree after each taskcleanupAll() runs after all subagents completeSessionStart hook prunes orphaned worktrees| Anti-Pattern | Why It Fails | | -------------------------------------------- | --------------------------------------------------- | | Subagent creating its own plan | Stale plans accumulate, lifecycle never completes | | Subagent making design decisions | Inconsistent approaches, orchestrator loses control | | Dispatching for a 5-line fix | Startup overhead exceeds the work | | Parallel dispatch of dependent tasks | Second agent works on stale assumptions | | Skipping worktree isolation for nearby files | Silent overwrites between agents | | Trusting self-reports without reading code | Agents miss edge cases or misunderstand scope | | Dispatching 10+ agents at once | Review bottleneck shifts to the controller | | Not cleaning up worktrees after merge | Disk bloat, stale branch accumulation |
| Situation | Strategy | | ----------------------------------- | -------------------------------------------------------- | | Completely separate directories | Fast-forward merge, no conflicts expected | | Different files in the same package | Merge one by one, test after each | | Unexpected conflict | Resolve manually, re-run tests, capture as anti-pattern | | Subagent result fails review | Dispatch fix subagent into same worktree (max 2 retries) |
Related skills: parallel-execute, executing-plans, verification-before-completion
testing
Triggers: "terse mode", "be brief", "less tokens", "fewer tokens", "compress output", "caveman", or invokes /terse. Token-efficient responses with full technical accuracy.
tools
Triggers: "compress this file", "compress CLAUDE.md", "compress memory", "shrink this", "reduce tokens in file", or invokes /compress. Compresses natural language files to save input tokens.
testing
Triggers: "release", "bump version", "publish packages", "cut a release", "version bump", "npm publish". Bumps monorepo versions, commits, tags, pushes to trigger CI release. Use deliver-and-ship for quality gates.
development
Triggers: "implement X", "build Y", "fix Z", "add feature", or any work task needing planning + execution. Full orchestration loop: plan, execute, complete with vault context and brain recs.