Install
openclaw skills install subagent-driven-development-3Use when executing implementation plans with independent tasks in the current session. Features domain-specialist routing, independent verification gates, an...
openclaw skills install subagent-driven-development-3Execute plan by dispatching fresh subagent per task, with multi-stage review after each: spec compliance review (domain-specialist), then independent test verification, then code quality review.
Core principle: Fresh subagent per task + domain-specialist reviews + independent verification = high quality, fast iteration
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):
digraph process {
rankdir=TB;
subgraph cluster_per_task {
label="Per Task";
"Dispatch implementer subagent (./implementer-prompt.md)" [shape=box];
"Implementer subagent asks questions?" [shape=diamond];
"Answer questions, provide context" [shape=box];
"Implementer implements, tests, commits, self-reviews" [shape=box];
"Dispatch verification subagent (./verification-prompt.md)" [shape=box];
"Verification subagent confirms tests pass?" [shape=diamond];
"Implementer fixes test issues" [shape=box];
"Detect task type, route to specialist reviewer" [shape=box];
"Specialist spec reviewer confirms code matches spec?" [shape=diamond];
"Implementer fixes spec gaps" [shape=box];
"Optional: Security/Accessibility review gate" [shape=box style=dashed];
"Dispatch code quality reviewer subagent" [shape=box];
"Code quality reviewer approves?" [shape=diamond];
"Implementer 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];
"Implementer fails task?" [shape=diamond];
"Use systematic-debugging, then dispatch fix subagent (./fix-subagent-prompt.md)" [shape=box];
"Dispatch final code reviewer subagent for entire implementation" [shape=box];
"Use superpowers:finishing-a-development-branch" [shape=box style=filled fillcolor=lightgreen];
"Read plan, extract all tasks with full text, note context, create TodoWrite" -> "Dispatch implementer subagent (./implementer-prompt.md)";
"Dispatch implementer subagent (./implementer-prompt.md)" -> "Implementer subagent asks questions?";
"Implementer subagent asks questions?" -> "Answer questions, provide context" [label="yes"];
"Answer questions, provide context" -> "Dispatch implementer subagent (./implementer-prompt.md)";
"Implementer subagent asks questions?" -> "Implementer implements, tests, commits, self-reviews" [label="no"];
"Implementer implements, tests, commits, self-reviews" -> "Dispatch verification subagent (./verification-prompt.md)";
"Dispatch verification subagent (./verification-prompt.md)" -> "Verification subagent confirms tests pass?";
"Verification subagent confirms tests pass?" -> "Implementer fixes test issues" [label="no"];
"Implementer fixes test issues" -> "Dispatch verification subagent (./verification-prompt.md)" [label="re-verify"];
"Verification subagent confirms tests pass?" -> "Detect task type, route to specialist reviewer" [label="yes"];
"Detect task type, route to specialist reviewer" -> "Specialist spec reviewer confirms code matches spec?";
"Specialist spec reviewer confirms code matches spec?" -> "Implementer fixes spec gaps" [label="no"];
"Implementer fixes spec gaps" -> "Detect task type, route to specialist reviewer" [label="re-review"];
"Specialist spec reviewer confirms code matches spec?" -> "Optional: Security/Accessibility review gate" [label="yes"];
"Optional: Security/Accessibility review gate" -> "Dispatch code quality reviewer subagent";
"Dispatch code quality reviewer subagent" -> "Code quality reviewer approves?";
"Code quality reviewer approves?" -> "Implementer fixes quality issues" [label="no"];
"Implementer fixes quality issues" -> "Dispatch code quality reviewer subagent" [label="re-review"];
"Code quality reviewer approves?" -> "Mark task complete in TodoWrite" [label="yes"];
"Mark task complete in TodoWrite" -> "More tasks remain?";
"More tasks remain?" -> "Implementer fails task?" [label="no, next task"];
"Implementer fails task?" -> "Use systematic-debugging, then dispatch fix subagent (./fix-subagent-prompt.md)" [label="yes"];
"Use systematic-debugging, then dispatch fix subagent (./fix-subagent-prompt.md)" -> "Mark task complete in TodoWrite";
"More tasks remain?" -> "Dispatch final code reviewer subagent for entire implementation" [label="no"];
"Dispatch final code reviewer subagent for entire implementation" -> "Use superpowers:finishing-a-development-branch";
}
Core templates:
./implementer-prompt.md - Dispatch implementer subagent./spec-reviewer-prompt.md - Generic spec compliance reviewer (fallback)./code-quality-reviewer-prompt.md - Code quality reviewerEnhanced templates:
./fix-subagent-prompt.md - Fix failed implementation (NEW)./verification-prompt.md - Independent test verification (NEW)Reference:
./references/specialist-routing.md - Domain-specialist routing guide (NEW)Before dispatching spec compliance reviewers, analyze task description for keywords:
| Keywords | Domain | Specialist Agent |
|---|---|---|
| API, endpoint, route, backend, database, schema | Backend | backend-development:backend-architect |
| Component, UI, frontend, React, accessibility | Frontend | frontend-mobile-development:frontend-developer |
| Infrastructure, CI/CD, Docker, Kubernetes | DevOps | senior-devops |
| Data, pipeline, ETL, analytics | Data Engineering | senior-data-engineer |
| ML, model, training, inference | Data Science | senior-data-scientist |
| Architecture, design, scalability | Architecture | senior-architect |
See references/specialist-routing.md for detailed routing instructions and prompt templates.
You: I'm using Subagent-Driven Development to execute this plan.
[Read plan file once: docs/plans/feature-plan.md]
[Extract all 5 tasks with full text and context]
[Create TodoWrite with all tasks]
Task 1: Hook installation script
[Detect task type: generic utility]
[Get Task 1 text and context (already extracted)]
[Dispatch implementation subagent with full task text + context]
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
[Dispatch verification subagent]
Verifier: Command: npm test -- --testPathPattern=hook
Output: PASS 5/5 tests
✅ Claim confirmed
[Dispatch generic spec compliance reviewer - task type unclear]
Spec reviewer: ✅ Spec compliant - all requirements met, nothing extra
[Get git SHAs, dispatch code quality reviewer]
Code reviewer: Strengths: Good test coverage, clean. Issues: None. Approved.
[Mark Task 1 complete]
Task 2: Add user authentication API endpoint
[Detect task type: Backend - keywords: API, endpoint, auth]
[Dispatch implementation subagent]
Implementer: [No questions, proceeds]
Implementer:
- Implemented POST /api/auth/login endpoint
- Added JWT token generation
- Tests: 12/12 passing
- Committed
[Dispatch verification subagent]
Verifier: ✅ Claim confirmed - 12/12 tests passing
[Dispatch backend-development:backend-architect for spec review]
Backend specialist: ✅ Spec compliant
Notes: Good RESTful design, appropriate status codes,
but see code quality review for security concerns
[Optional: Add security review gate for auth task]
Security reviewer: Issues (Important):
- Password not hashed before comparison
- No rate limiting on login endpoint
- Missing CORS configuration
[Implementer fixes security issues]
Implementer: Added bcrypt hashing, rate limiter middleware, CORS config
[Security reviewer re-checks]
Security reviewer: ✅ Approved
[Dispatch code quality reviewer]
Code reviewer: Strengths: Clean, well-tested. Issues: None. Approved.
[Mark Task 2 complete]
...
[After all tasks]
[Dispatch final code-reviewer]
Final reviewer: All requirements met, ready to merge
Done!
Before accepting implementer's test report, dispatch verification subagent:
Why: Implementers may be mistaken, optimistic, or run tests incorrectly.
Template: Use ./verification-prompt.md
Integration: After implementer reports test results, before spec review.
Route spec compliance reviews to domain specialists based on task keywords.
Why: Generic reviewers miss domain-specific concerns (API design patterns, accessibility, infrastructure).
Template: See references/specialist-routing.md
Fallback: Use generic ./spec-reviewer-prompt.md for tasks without clear domain.
For certain task types, add optional third review:
Why: Catch domain-specific security and accessibility issues before they ship.
When implementer fails a task:
systematic-debugging skill to investigate root cause./fix-subagent-prompt.mdWhy: "Dispatch fix subagent" was referenced but had no template. Now systematic.
vs. Manual execution:
vs. Executing Plans:
Quality gates:
Cost:
Never:
If subagent asks questions:
If reviewer finds issues:
If implementer fails task:
systematic-debugging to investigate root cause./fix-subagent-prompt.mdRequired workflow skills:
Subagents should use:
Alternative workflow:
Optional integrations:
references/specialist-routing.md