skills/subagent-driven-development/SKILL.md
Use when a task list exists or is being created for multi-step implementation work, whether from a formal plan or an ad-hoc breakdown
npx skillsauth add BubbleBuffer/superpawers 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.
Execute plan by dispatching fresh subagent per task, with review after each. Choose verification level appropriate to task complexity.
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 + appropriate review and verification = high quality, fast iteration
When the user gives a multi-step request without a formal plan, you create the task list yourself before entering the process:
This applies when:
Do NOT create an ad-hoc task list when:
brainstorming firstdigraph when_to_use {
"Have task list (plan or ad-hoc)?" [shape=diamond];
"Trivial single-file task?" [shape=diamond];
"Tasks mostly independent?" [shape=diamond];
"Stay in this session?" [shape=diamond];
"subagent-driven-development" [shape=box];
"brainstorming" [shape=box];
"writing-plans" [shape=box];
"Implement inline" [shape=box];
"Have task list (plan or ad-hoc)?" -> "Trivial single-file task?" [label="yes"];
"Have task list (plan or ad-hoc)?" -> "Multi-step request?" [label="no"];
"Multi-step request?" -> "writing-plans" [label="yes"];
"Multi-step request?" -> "Implement inline" [label="no - simple"];
"Trivial single-file task?" -> "Implement inline" [label="yes"];
"Trivial single-file task?" -> "Tasks mostly independent?" [label="no"];
"Tasks mostly independent?" -> "Stay in this session?" [label="yes"];
"Tasks mostly independent?" -> "brainstorming" [label="no - tightly coupled"];
"Stay in this session?" -> "subagent-driven-development" [label="yes"];
}
Trivial = single-file, <10 lines, no integration concerns. Everything else should use subagents.
Task list sources:
.superpawers/plans/...) — extracted by this skillAll three trigger this skill the same way.
digraph process {
rankdir=TB;
subgraph cluster_per_task {
label="Per Task";
"Dispatch implementer subagent" [shape=box];
"Implementer subagent status?" [shape=diamond];
"Human recovery options (structured: 1. Plan recovery, 2. Discard, 3. Keep)" [shape=box style=filled fillcolor=lightyellow];
"Implementer subagent asks questions?" [shape=diamond];
"Answer questions, provide context" [shape=box];
"Implementer subagent implements, tests, commits, self-reviews" [shape=box];
"Choose review level (spec, quality, or both)" [shape=diamond];
"Dispatch reviewer subagent" [shape=box];
"Reviewer approves?" [shape=diamond];
"Implementer subagent fixes issues" [shape=box];
"Mark task complete in todowrite" [shape=box];
}
"Read plan or extract task list with full text, note context, create todowrite" [shape=box];
"More tasks remain?" [shape=diamond];
"Verify entire implementation (inline or subagent)" [shape=box];
"Verification passes?" [shape=diamond];
"Complete development" [shape=box style=filled fillcolor=lightgreen];
"Human recovery options (structured: 1. Plan recovery, 2. Discard, 3. Keep)" [shape=box style=filled fillcolor=lightyellow];
"Exit" [shape=doublecircle];
"Read plan or extract task list with full text, note context, create todowrite" -> "Dispatch implementer subagent";
"Dispatch implementer subagent" -> "Implementer subagent status?";
"Implementer subagent asks questions?" -> "Implementer subagent implements, tests, commits, self-reviews" [label="no"];
"Implementer subagent implements, tests, commits, self-reviews" -> "Choose review level (spec, quality, or both)";
"Choose review level (spec, quality, or both)" -> "Dispatch reviewer subagent";
"Dispatch reviewer subagent" -> "Reviewer approves?";
"Reviewer approves?" -> "Implementer subagent fixes issues" [label="no"];
"Implementer subagent fixes issues" -> "Dispatch reviewer subagent" [label="re-review"];
"Reviewer approves?" -> "Mark task complete in todowrite" [label="yes"];
"Mark task complete in todowrite" -> "More tasks remain?";
"More tasks remain?" -> "Dispatch implementer subagent" [label="yes"];
"More tasks remain?" -> "Verify entire implementation (inline or subagent)" [label="no"];
"Verify entire implementation (inline or subagent)" -> "Verification passes?";
"Verification passes?" -> "Complete development" [label="yes"];
"Verification passes?" -> "Human recovery options (structured: 1. Plan recovery, 2. Discard, 3. Keep)" [label="fail"];
"Human recovery options (structured: 1. Plan recovery, 2. Discard, 3. Keep)" -> "Exit" [label="after recovery"];
}
Each subagent's model is configured in its agent definition file (.opencode/agents/superpawers-*.md), set at install time. When you dispatch a subagent via the Task tool with the correct subagent_type, OpenCode uses that agent's configured model automatically. Do not attempt to select or change models at runtime. If you believe a task requires a different model, escalate to the human.
The plan defines tasks. You decide how to dispatch them.
One subagent = one dispatch unit. A dispatch unit may cover one or many plan tasks. Use your judgment:
Combine into one dispatch when:
Keep separate when:
Principle: The subagent should be able to succeed without needing context from a concurrent task. If two tasks touch the same code, they're probably one dispatch unit.
Choose the right verification level based on task complexity. The goal is always to verify — but how you verify should match the task.
Spec compliance review (dispatch reviewer subagent):
Code quality review (dispatch reviewer subagent):
Combined spec+quality review:
Skip formal review when:
Batched review for small task groups:
Guideline: Review your judgment. When in doubt, review. The cost of a review is low; the cost of shipping a bug is high.
Choose based on implementation scope:
Inline verification (you run commands via Bash):
Verifier subagent (dispatch fresh agent):
Do not skip final verification entirely. But you may choose how to verify.
Implementer subagents report one of four statuses. Handle each appropriately:
DONE: Proceed to review (or mark complete if review not needed for this task).
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.
BLOCKED: The implementer cannot complete the task. Assess the blocker:
Never ignore an escalation or retry without changes. If the implementer said it's stuck, something needs to change.
Fail-Fast: If any subagent returns BLOCKED or experiences repeated failures:
Agent base prompts live in agents/. Skills provide task-specific context when dispatching subagents. Use explicit Task tool syntax with the correct subagent_type:
implementer.template.md — Implementer template (in same directory)reviewer.template.md — Reviewer template (skills specify review focus: spec compliance, code quality, full review)verifier.template.md — Verifier template (language-agnostic, probes for test infrastructure)Dispatch format (implementer):
Task(
"Implement Task N: [task name]",
subagent_type="superpawers-implementer",
prompt="[Concatenate full task text + relevant context + implementer.template.md]"
)
Dispatch format (reviewer):
Task(
"Review Task N",
subagent_type="superpawers-reviewer",
prompt="[Review focus + reference + reviewer.template.md]"
)
Dispatch format (verifier):
Task(
"Verify implementation",
subagent_type="superpawers-verifier",
prompt="[Scope + verifier.template.md]"
)
User: "Add a dark mode toggle to the settings page"
You: Multi-file change, I'll break this into tasks and use Subagent-Driven Development.
[Explore codebase to understand settings page structure]
[Decompose into tasks: 1. Add theme state, 2. Create toggle component, 3. Wire into settings page]
[Create todowrite with 3 tasks]
Task 1: Add theme state management
Task(
"Implement Task 1: Add theme state management",
subagent_type="superpawers-implementer",
prompt="[task text + context + implementer.template.md]"
)
Implementer: DONE. Added useTheme hook, 4/4 tests passing.
[Task is focused — skip formal review, quick glance suffices]
[Mark Task 1 complete]
Task 2: Create toggle component
Task("Implement Task 2: Create toggle component", subagent_type="superpawers-implementer", prompt="...")
...
[After all tasks]
[Run inline verification: tests pass, lint clean]
→ Verification PASS
You: I'm using Subagent-Driven Development to execute this plan.
[Read plan file once: .superpawers/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)]
Task(
"Implement Task 1: Hook installation script",
subagent_type="superpawers-implementer",
prompt="[Task 1 text + context + implementer.template.md]"
)
Implementer: "Before I begin - should the hook be installed at user or system level?"
You: "User level (~/.config/superpowers/hooks/)"
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
Task("Review spec compliance: Task 1", subagent_type="superpawers-reviewer", prompt="[spec compliance focus + reviewer.template.md]")
Reviewer: Approves spec compliant - all requirements met, nothing extra
[Get git SHAs]
Task("Review code quality: Task 1", subagent_type="superpawers-reviewer", prompt="[code quality focus + reviewer.template.md]")
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)]
Task(
"Implement Task 2: Recovery modes",
subagent_type="superpawers-implementer",
prompt="[Task 2 text + context + implementer.template.md]"
)
Implementer: [No questions, proceeds]
Implementer:
- Added verify/repair modes
- 8/8 tests passing
- Self-review: All good
- Committed
Task("Review spec compliance: Task 2", subagent_type="superpawers-reviewer", prompt="[spec compliance focus + reviewer.template.md]")
Reviewer: Issues found:
- Missing: Progress reporting (spec says "report every 100 items")
- Extra: Added --json flag (not requested)
[Re-dispatch implementer with fix instructions + reviewer findings]
Implementer: Removed --json flag, added progress reporting
[Re-dispatch reviewer]
Reviewer: Approved
Task("Review code quality: Task 2", subagent_type="superpawers-reviewer", prompt="[code quality focus + reviewer.template.md]")
Reviewer: Strengths: Solid. Issues (Important): Magic number (100)
[Re-dispatch implementer with fix instructions]
Implementer: Extracted PROGRESS_INTERVAL constant
[Re-dispatch reviewer]
Reviewer: Approved
[Mark Task 2 complete]
...
[After all tasks]
[Assess verification needs: standard test suite covers changes]
[Run inline verification: npm test, npm run lint — all pass]
→ Verification PASS
[Complete development]
Done!
Plan has 6 tasks. Tasks 1-2 are additive (new files only). Tasks 3-5 are tightly coupled — the plan says "combine Tasks 3-5 into one commit to keep tests green." Task 6 is verification.
[Read plan, extract all 6 tasks]
[Create todowrite: Task 1, Task 2, Tasks 3-5 (combined), Task 6]
Task 1: Create AgentHandler protocol (new files only)
Task(
"Implement Task 1: Create AgentHandler protocol",
subagent_type="superpawers-implementer",
prompt="[Task 1 text + context + implementer.template.md]"
)
Implementer: DONE. Created agents/__init__.py, agents/handler.py
[Task is mechanical — skip formal review, quick glance suffices]
[Mark Task 1 complete]
Task 2: Create chat agent implementation (new files only)
Task(
"Implement Task 2: Create chat agent implementation",
subagent_type="superpawers-implementer",
prompt="[Task 2 text + context + implementer.template.md]"
)
Implementer: DONE. Created agents/chat/__init__.py, state.py, nodes.py, handler.py
[Batch review: Task 1 + Task 2 together since both are trivial additive work]
Task(
"Review spec compliance: Tasks 1-2",
subagent_type="superpawers-reviewer",
prompt="[combined spec compliance focus covering both tasks + reviewer.template.md]"
)
Reviewer: Both match spec
[Mark Task 2 complete]
Tasks 3-5: Genericize engine, refactor runtime, delete old files (combined)
[Plan says these must be done together — dispatch as one unit]
Task(
"Implement Tasks 3-5 combined: Genericize engine, refactor runtime, delete old files",
subagent_type="superpawers-implementer",
prompt="[Tasks 3, 4, AND 5 text + all relevant context + implementer.template.md]"
)
Implementer:
- Genericized engine API
- Updated bootstrap/service to use new API
- Deleted old files
- Updated all tests
- All tests passing
- Committed
Task(
"Review spec compliance: Tasks 3-5 combined",
subagent_type="superpawers-reviewer",
prompt="[spec compliance focus for combined change + reviewer.template.md]"
)
Reviewer: All three tasks match their specs
Task(
"Review code quality: Tasks 3-5 combined",
subagent_type="superpawers-reviewer",
prompt="[code quality focus + reviewer.template.md]"
)
Reviewer: Approved
[Mark Tasks 3-5 complete]
Task 6: Final verification
[Run inline verification: all tests pass]
Key differences from the standard workflow:
vs. Manual execution:
Efficiency gains:
Quality gates:
Cost:
Always:
Never:
Guidelines (use judgment):
If subagent asks questions:
If reviewer finds issues:
If subagent fails task:
Required workflow skills:
Subagents should use:
data-ai
Use when a request involves multiple steps or files, or when an approved design must be turned into a detailed implementation plan
development
Use when deciding which SuperPawers skill should govern a new task or workflow step, before taking any other action
development
Use when starting feature work that needs git isolation or before writing committed spec, plan, or code artifacts
development
Use when implementation is complete and you need to handle branch completion - merge, PR, keep, or discard