packages/forge/src/skills/soleri-subagent-driven-development/SKILL.md
Triggers: "use subagents", "parallel agents", "subagent driven", "isolated execution". Decomposes work into isolated units, dispatches subagents.
npx skillsauth add adrozdenko/soleri 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:
Subagent-type (worker vs instance) picks who runs the task. Model selection picks how much brain they bring. Both decisions happen at dispatch, independently.
| Tier | Model | Subagent purpose — trigger patterns |
| -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| simple | haiku | Exploration, file/symbol lookup, pattern search, single-fact retrieval, dedup detection, quick classification, data extraction from known formats |
| standard | sonnet | Code implementation, refactors, test writing, documentation, migrations, data transformation, routine reviews, general research |
| complex | opus | Architecture review, deep-review, plan creation, grading/scoring, critical bug diagnosis, cross-cutting design decisions, ambiguity resolution, nuanced writing |
If the target model is unavailable (rate-limited, quota exceeded, provider down):
Never silently fall back upward (Haiku→Sonnet, Sonnet→Opus). Cost-aware fallback flows downward only; upward moves require the user to say so.
The user can pin a model for any dispatch:
Explicit pin always wins over the rubric.
Before every Agent call, state one line aloud:
Dispatching <subagent description> on <model> (tier=<simple|standard|complex>, reason=<pattern match>).
Examples:
Dispatching "Find all call sites of parseUrl" on haiku (tier=simple, reason=exploration). Dispatching "Implement parser refactor" on sonnet (tier=standard, reason=code implementation). Dispatching "Audit migration safety" on opus (tier=complex, reason=architecture review).
Overrides stated explicitly:
Dispatching "Routine doc edit" on opus (tier=standard, overridden by user request).
One line, before the Agent call. Auditable after the fact.
| 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.
YOUR_AGENT_core op:memory_search
params: { query: "subagent decomposition" }
YOUR_AGENT_core op:brain_recommend
params: { query: "<task domain>" }
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 timegit branch -D <subagent/taskId> # delete local branch
Worktree branches are local-only — never push them to remote.Branch cleanup is mandatory. Every merged branch must be deleted immediately. Do not leave branches for later cleanup — they accumulate fast during parallel execution.
After 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.
YOUR_AGENT_core op:capture_knowledge
params: { title: "<learned pattern>", description: "<merge strategy or decomposition insight>", type: "pattern", domain: "orchestration", tags: ["subagent", "parallel-execution"] }
Worktree branches are local-only — never push them to remote. Four layers ensure nothing accumulates:
finally block in dispatcher removes worktree and local branch after each taskcleanupAll() runs after all subagents completeSessionStart hook prunes orphaned worktrees and deletes merged subagent/* and worktree-agent-* local branches| 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.