| name | omo-subagent-driven-development |
| description | Use when executing implementation plans with independent tasks in the current session |
Subagent-Driven Development
Execute plan by dispatching fresh subagent per task, with two-stage review after each: spec compliance review first, then code quality review.
Why subagents: You delegate tasks to specialized agents with isolated context. By precisely crafting their instructions and context, you ensure they stay focused and succeed at their task. They should never inherit your session's context or history — you construct exactly what they need. This also preserves your own context for coordination work.
Core principle: Fresh subagent per task + two-stage review (spec then quality) = high quality, fast iteration
When to Use
digraph when_to_use {
"Have implementation plan?" [shape=diamond];
"Tasks mostly independent?" [shape=diamond];
"Stay in this session?" [shape=diamond];
"subagent-driven-development" [shape=box];
"executing-plans" [shape=box];
"Manual execution or brainstorm first" [shape=box];
"Have implementation plan?" -> "Tasks mostly independent?" [label="yes"];
"Have implementation plan?" -> "Manual execution or brainstorm first" [label="no"];
"Tasks mostly independent?" -> "Stay in this session?" [label="yes"];
"Tasks mostly independent?" -> "Manual execution or brainstorm first" [label="no - tightly coupled"];
"Stay in this session?" -> "subagent-driven-development" [label="yes"];
"Stay in this session?" -> "executing-plans" [label="no - parallel session"];
}
vs. Executing Plans (parallel session):
- Same session (no context switch)
- Fresh subagent per task (no context pollution)
- Two-stage review after each task: spec compliance first, then code quality
- Faster iteration (no human-in-loop between tasks)
Category Selection Guide
When dispatching implementer subagents via task(), choose the category that matches task complexity:
| Task Complexity | Category | When to Use |
|---|
| 1-2 files, clear spec, isolated functions | quick | Most implementation tasks when plan is well-specified |
| Multi-file, integration, pattern matching | deep | Coordination across files, debugging, moderate judgment |
| Hard logic, architecture, design decisions | ultrabrain | Requires deep reasoning, broad codebase understanding |
| Frontend, UI/UX, visual components | visual-engineering | Component work, styling, layout, user-facing features |
Rule of thumb: Start with quick. Upgrade if the implementer returns BLOCKED or struggles.
The Process
digraph process {
rankdir=TB;
subgraph cluster_per_task {
label="Per Task";
"Dispatch implementer via task(category=..., load_skills=[\"omo-test-driven-development\"], prompt from ./implementer-prompt.md)" [shape=box];
"Implementer subagent asks questions?" [shape=diamond];
"Answer questions, provide context" [shape=box];
"Implementer subagent implements, tests, commits, self-reviews" [shape=box];
"Dispatch spec reviewer via task(subagent_type=\"momus\", prompt from ./spec-reviewer-prompt.md)" [shape=box];
"Spec reviewer subagent confirms code matches spec?" [shape=diamond];
"Implementer subagent fixes spec gaps" [shape=box];
"Dispatch code quality reviewer via task(subagent_type=\"oracle\", prompt from ./code-quality-reviewer-prompt.md)" [shape=box];
"Code quality reviewer subagent approves?" [shape=diamond];
"Implementer subagent fixes quality issues" [shape=box];
"Mark task complete in TodoWrite" [shape=box];
}
"Read plan, extract all tasks with full text, note context, create TodoWrite" [shape=box];
"More tasks remain?" [shape=diamond];
"Dispatch final reviewer via task(subagent_type=\"oracle\") for entire implementation" [shape=box];
"Use omo-finishing-a-development-branch" [shape=box style=filled fillcolor=lightgreen];
"Read plan, extract all tasks with full text, note context, create TodoWrite" -> "Dispatch implementer via task(category=..., load_skills=[\"omo-test-driven-development\"], prompt from ./implementer-prompt.md)";
"Dispatch implementer via task(category=..., load_skills=[\"omo-test-driven-development\"], prompt from ./implementer-prompt.md)" -> "Implementer subagent asks questions?";
"Implementer subagent asks questions?" -> "Answer questions, provide context" [label="yes"];
"Answer questions, provide context" -> "Dispatch implementer via task(category=..., load_skills=[\"omo-test-driven-development\"], prompt from ./implementer-prompt.md)";
"Implementer subagent asks questions?" -> "Implementer subagent implements, tests, commits, self-reviews" [label="no"];
"Implementer subagent implements, tests, commits, self-reviews" -> "Dispatch spec reviewer via task(subagent_type=\"momus\", prompt from ./spec-reviewer-prompt.md)";
"Dispatch spec reviewer via task(subagent_type=\"momus\", prompt from ./spec-reviewer-prompt.md)" -> "Spec reviewer subagent confirms code matches spec?";
"Spec reviewer subagent confirms code matches spec?" -> "Implementer subagent fixes spec gaps" [label="no"];
"Implementer subagent fixes spec gaps" -> "Dispatch spec reviewer via task(subagent_type=\"momus\", prompt from ./spec-reviewer-prompt.md)" [label="re-review"];
"Spec reviewer subagent confirms code matches spec?" -> "Dispatch code quality reviewer via task(subagent_type=\"oracle\", prompt from ./code-quality-reviewer-prompt.md)" [label="yes"];
"Dispatch code quality reviewer via task(subagent_type=\"oracle\", prompt from ./code-quality-reviewer-prompt.md)" -> "Code quality reviewer subagent approves?";
"Code quality reviewer subagent approves?" -> "Implementer subagent fixes quality issues" [label="no"];
"Implementer subagent fixes quality issues" -> "Dispatch code quality reviewer via task(subagent_type=\"oracle\", prompt from ./code-quality-reviewer-prompt.md)" [label="re-review"];
"Code quality reviewer subagent approves?" -> "Mark task complete in TodoWrite" [label="yes"];
"Mark task complete in TodoWrite" -> "More tasks remain?";
"More tasks remain?" -> "Dispatch implementer via task(category=..., load_skills=[\"omo-test-driven-development\"], prompt from ./implementer-prompt.md)" [label="yes"];
"More tasks remain?" -> "Dispatch final reviewer via task(subagent_type=\"oracle\") for entire implementation" [label="no"];
"Dispatch final reviewer via task(subagent_type=\"oracle\") for entire implementation" -> "Use omo-finishing-a-development-branch";
}
Dispatch Patterns
Implementer dispatch:
task(
category="quick", // or "deep", "ultrabrain", "visual-engineering" — see Category Selection Guide
load_skills=["omo-test-driven-development"],
description="Implement Task N: [task name]",
prompt="<see ./implementer-prompt.md template>",
run_in_background=false
)
Spec compliance reviewer dispatch:
task(
subagent_type="momus",
description="Review spec compliance for Task N",
prompt="<see ./spec-reviewer-prompt.md template>",
run_in_background=false
)
Code quality reviewer dispatch:
task(
subagent_type="oracle",
description="Review code quality for Task N",
prompt="<see ./code-quality-reviewer-prompt.md template>",
run_in_background=false
)
Final review dispatch:
task(
subagent_type="oracle",
description="Final review of entire implementation",
prompt="Review all changes from BASE_SHA to HEAD_SHA for the full feature implementation: [summary]. Verify integration, consistency, and overall quality.",
run_in_background=false
)
Background dispatch (when tasks are truly independent and safe to parallelize):
// Dispatch
task(category="quick", load_skills=["omo-test-driven-development"], description="...", prompt="...", run_in_background=true)
// Returns task_id="abc123"
// Fetch results later
background_output(task_id="abc123")
Session continuation (re-dispatch same implementer after answering questions):
task(
category="quick",
load_skills=["omo-test-driven-development"],
session_id="<previous_session_id>", // continues with full prior context
description="Continue implementing Task N",
prompt="Here are the answers to your questions: ...",
run_in_background=false
)
Model Selection
Use the least powerful model that can handle each role to conserve cost and increase speed. The category parameter controls this:
Mechanical implementation tasks (isolated functions, clear specs, 1-2 files): use category="quick". Most implementation tasks are mechanical when the plan is well-specified.
Integration and judgment tasks (multi-file coordination, pattern matching, debugging): use category="deep".
Architecture, design, and review tasks: use category="ultrabrain" or subagent_type="oracle".
Frontend tasks (UI components, styling, visual work): use category="visual-engineering".
Task complexity signals:
- Touches 1-2 files with a complete spec →
quick
- Touches multiple files with integration concerns →
deep
- Requires design judgment or broad codebase understanding →
ultrabrain
- Frontend components, UI/UX, styling →
visual-engineering
- Spec review (mechanical comparison) →
subagent_type="momus" (critical eye for gaps)
- Code quality review (judgment) →
subagent_type="oracle" (expert assessment)
Handling Implementer Status
Implementer subagents report one of four statuses. Handle each appropriately:
DONE: Proceed to spec compliance review.
DONE_WITH_CONCERNS: The implementer completed the work but flagged doubts. Read the concerns before proceeding. If the concerns are about correctness or scope, address them before review. If they're observations (e.g., "this file is getting large"), note them and proceed to review.
NEEDS_CONTEXT: The implementer needs information that wasn't provided. Provide the missing context and re-dispatch (use session_id to continue the same session).
BLOCKED: The implementer cannot complete the task. Assess the blocker:
- If it's a context problem, provide more context and re-dispatch with the same category
- If the task requires more reasoning, re-dispatch with a higher category (e.g.,
quick → deep → ultrabrain)
- If the task is too large, break it into smaller pieces
- If the plan itself is wrong, escalate to the human
Never ignore an escalation or force the same category to retry without changes. If the implementer said it's stuck, something needs to change.
Prompt Templates
./implementer-prompt.md — Template for implementer dispatch via task(category=..., load_skills=[...], prompt=...)
./spec-reviewer-prompt.md — Template for spec compliance reviewer dispatch via task(subagent_type="momus", prompt=...)
./code-quality-reviewer-prompt.md — Template for code quality reviewer dispatch via task(subagent_type="oracle", prompt=...)
Example Workflow
You: I'm using Subagent-Driven Development to execute this plan.
[Read plan file once: docs/superpowers/plans/feature-plan.md]
[Extract all 5 tasks with full text and context]
[Create todowrite with all tasks]
Task 1: Hook installation script
[Get Task 1 text and context (already extracted)]
[Dispatch implementer]
task(
category="quick",
load_skills=["omo-test-driven-development"],
description="Implement Task 1: Hook installation script",
prompt="<implementer-prompt.md template filled with Task 1 text + context>",
run_in_background=false
)
Implementer: "Before I begin - should the hook be installed at user or system level?"
You: "User level (~/.config/superpowers/hooks/)"
[Re-dispatch with session_id to continue]
task(
category="quick",
load_skills=["omo-test-driven-development"],
session_id="<implementer_session_id>",
description="Continue Task 1: Hook installation script",
prompt="User level (~/.config/superpowers/hooks/)",
run_in_background=false
)
Implementer: "Got it. Implementing now..."
[Later] Implementer:
- Implemented install-hook command
- Added tests, 5/5 passing
- Self-review: Found I missed --force flag, added it
- Committed
Status: DONE
[Dispatch spec compliance reviewer]
task(
subagent_type="momus",
description="Review spec compliance for Task 1",
prompt="<spec-reviewer-prompt.md template filled with Task 1 spec + implementer report>",
run_in_background=false
)
Spec reviewer: ✅ Spec compliant - all requirements met, nothing extra
[Get git SHAs, dispatch code quality reviewer]
task(
subagent_type="oracle",
description="Review code quality for Task 1",
prompt="<code-quality-reviewer-prompt.md template filled with Task 1 info + SHAs>",
run_in_background=false
)
Code reviewer: Strengths: Good test coverage, clean. Issues: None. Approved.
[Mark Task 1 complete]
Task 2: Recovery modes
[Get Task 2 text and context (already extracted)]
[Dispatch implementer - multi-file task, use "deep"]
task(
category="deep",
load_skills=["omo-test-driven-development"],
description="Implement Task 2: Recovery modes",
prompt="<implementer-prompt.md template filled with Task 2 text + context>",
run_in_background=false
)
Implementer: [No questions, proceeds]
Implementer:
- Added verify/repair modes
- 8/8 tests passing
- Self-review: All good
- Committed
Status: DONE
[Dispatch spec compliance reviewer]
task(
subagent_type="momus",
description="Review spec compliance for Task 2",
prompt="<spec-reviewer-prompt.md template filled with Task 2 spec + implementer report>",
run_in_background=false
)
Spec reviewer: ❌ Issues:
- Missing: Progress reporting (spec says "report every 100 items")
- Extra: Added --json flag (not requested)
[Re-dispatch implementer to fix issues, use session_id to continue]
task(
category="deep",
load_skills=["omo-test-driven-development"],
session_id="<implementer_session_id>",
description="Fix spec compliance issues for Task 2",
prompt="Fix these issues: 1) Missing progress reporting (spec says 'report every 100 items') 2) Remove extra --json flag (not requested)",
run_in_background=false
)
Implementer: Removed --json flag, added progress reporting
[Spec reviewer reviews again]
task(subagent_type="momus", description="Re-review spec compliance for Task 2", prompt="...", run_in_background=false)
Spec reviewer: ✅ Spec compliant now
[Dispatch code quality reviewer]
task(subagent_type="oracle", description="Review code quality for Task 2", prompt="...", run_in_background=false)
Code reviewer: Strengths: Solid. Issues (Important): Magic number (100)
[Re-dispatch implementer to fix]
task(category="deep", session_id="<implementer_session_id>", description="Fix quality issues for Task 2", prompt="Extract magic number 100 into PROGRESS_INTERVAL constant", run_in_background=false)
Implementer: Extracted PROGRESS_INTERVAL constant
[Code reviewer reviews again]
task(subagent_type="oracle", description="Re-review code quality for Task 2", prompt="...", run_in_background=false)
Code reviewer: ✅ Approved
[Mark Task 2 complete]
...
[After all tasks]
[Dispatch final code reviewer]
task(
subagent_type="oracle",
description="Final review of entire implementation",
prompt="Review all changes from BASE_SHA to HEAD_SHA for the full feature: [summary]. Verify integration across all tasks, consistency, and overall quality.",
run_in_background=false
)
Final reviewer: All requirements met, ready to merge
Done!
Advantages
vs. Manual execution:
- Subagents follow TDD naturally
- Fresh context per task (no confusion)
- Parallel-safe (subagents don't interfere)
- Subagent can ask questions (before AND during work)
vs. Executing Plans:
- Same session (no handoff)
- Continuous progress (no waiting)
- Review checkpoints automatic
Efficiency gains:
- No file reading overhead (controller provides full text)
- Controller curates exactly what context is needed
- Subagent gets complete information upfront
- Questions surfaced before work begins (not after)
Quality gates:
- Self-review catches issues before handoff
- Two-stage review: spec compliance, then code quality
- Review loops ensure fixes actually work
- Spec compliance prevents over/under-building
- Code quality ensures implementation is well-built
Cost:
- More subagent invocations (implementer + 2 reviewers per task)
- Controller does more prep work (extracting all tasks upfront)
- Review loops add iterations
- But catches issues early (cheaper than debugging later)
Red Flags
Never:
- Start implementation on main/master branch without explicit user consent
- Skip reviews (spec compliance OR code quality)
- Proceed with unfixed issues
- Dispatch multiple implementation subagents in parallel (conflicts)
- Make subagent read plan file (provide full text instead)
- Skip scene-setting context (subagent needs to understand where task fits)
- Ignore subagent questions (answer before letting them proceed)
- Accept "close enough" on spec compliance (spec reviewer found issues = not done)
- Skip review loops (reviewer found issues = implementer fixes = review again)
- Let implementer self-review replace actual review (both are needed)
- Start code quality review before spec compliance is ✅ (wrong order)
- Move to next task while either review has open issues
If subagent asks questions:
- Answer clearly and completely
- Provide additional context if needed
- Don't rush them into implementation
If reviewer finds issues:
- Implementer (same subagent via session_id) fixes them
- Reviewer reviews again
- Repeat until approved
- Don't skip the re-review
If subagent fails task:
- Dispatch fix subagent with specific instructions (or re-dispatch with higher category)
- Don't try to fix manually (context pollution)
Integration
Required workflow skills:
- omo-using-git-worktrees — REQUIRED: Set up isolated workspace before starting
- omo-writing-plans — Creates the plan this skill executes
- omo-requesting-code-review — Code review template for reviewer subagents
- omo-finishing-a-development-branch — Complete development after all tasks
Subagents should use:
- omo-test-driven-development — Subagents follow TDD for each task (load via
load_skills)
Alternative workflow:
- omo-executing-plans — Use for parallel session instead of same-session execution
Subagent type reference:
oracle — Expert reviewer for code quality, final reviews, architectural assessment
momus — Critical reviewer for spec compliance (finds gaps, extra work, misunderstandings)
metis, prometheus, explore, librarian — Available for specialized dispatch needs