Refine Superpowers Lite execution workflow
This commit is contained in:
@@ -5,11 +5,11 @@ description: Manual-only skill. Activate only after an explicit user request for
|
||||
|
||||
# Subagent-Driven Development
|
||||
|
||||
Execute plan by dispatching fresh subagent per phase, where a phase may contain one or more related tasks. Run a two-stage review after each phase: spec compliance review first, then code quality review.
|
||||
Execute plan in the current branch, dispatching implementation help as needed, then run one overall review after all phases are complete.
|
||||
|
||||
**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 coherent phase + two-stage review (spec then quality) = high quality without review overhead on every tiny task
|
||||
**Core principle:** Complete the full plan in one current-branch run, then review the whole implementation once. Use phase reviews only when the user asks or risk justifies the overhead.
|
||||
|
||||
**Continuous execution:** Do not pause to check in with your human partner between phases unless blocked. Execute all tasks from the plan in the current branch without stopping. The only reasons to stop are: current branch is `main` or `master`, BLOCKED status you cannot resolve, ambiguity that genuinely prevents progress, or all tasks complete. "Should I continue?" prompts and progress summaries waste their time — they asked you to execute the plan, so execute it.
|
||||
|
||||
@@ -36,7 +36,7 @@ digraph when_to_use {
|
||||
**vs. Executing Plans (parallel session):**
|
||||
- Same session (no context switch)
|
||||
- Fresh subagent per phase (no context pollution)
|
||||
- Two-stage review after each phase: spec compliance first, then code quality
|
||||
- One overall review after all phases are complete by default
|
||||
- Faster iteration (no human-in-loop between tasks)
|
||||
|
||||
## Phase Grouping
|
||||
@@ -49,6 +49,7 @@ Before dispatching implementers, group tasks into phases:
|
||||
- Keep a task as its own phase when it is risky, broad, independent, or likely to need a focused review
|
||||
- Never group tasks just to hide uncertainty; if grouping makes requirements harder to verify, split the phase
|
||||
- Record phase membership in TodoWrite so progress is visible at both phase and task level
|
||||
- Do not review between phases by default; finish all phases first, then review the whole implementation
|
||||
|
||||
## The Process
|
||||
|
||||
@@ -62,18 +63,14 @@ digraph process {
|
||||
"Implementer subagent asks questions?" [shape=diamond];
|
||||
"Answer questions, provide context" [shape=box];
|
||||
"Implementer subagent implements, tests, commits, self-reviews" [shape=box];
|
||||
"Dispatch spec reviewer subagent (./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 subagent (./code-quality-reviewer-prompt.md)" [shape=box];
|
||||
"Code quality reviewer subagent approves?" [shape=diamond];
|
||||
"Implementer subagent fixes quality issues" [shape=box];
|
||||
"Mark phase tasks complete in TodoWrite" [shape=box];
|
||||
}
|
||||
|
||||
"Read plan, extract all tasks with full text, group into phases, note context, create TodoWrite" [shape=box];
|
||||
"More phases remain?" [shape=diamond];
|
||||
"Dispatch final code reviewer subagent for entire implementation" [shape=box];
|
||||
"Fix Critical/Important findings and re-run verification" [shape=box];
|
||||
"Final review approved?" [shape=diamond];
|
||||
"Use superpowers-lite:finishing-a-development-branch" [shape=box style=filled fillcolor=lightgreen];
|
||||
|
||||
"Read plan, extract all tasks with full text, group into phases, note context, create TodoWrite" -> "Dispatch implementer subagent (./implementer-prompt.md)";
|
||||
@@ -81,19 +78,14 @@ digraph process {
|
||||
"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 subagent implements, tests, commits, self-reviews" [label="no"];
|
||||
"Implementer subagent implements, tests, commits, self-reviews" -> "Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)";
|
||||
"Dispatch spec reviewer subagent (./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 subagent (./spec-reviewer-prompt.md)" [label="re-review"];
|
||||
"Spec reviewer subagent confirms code matches spec?" -> "Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" [label="yes"];
|
||||
"Dispatch code quality reviewer subagent (./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 subagent (./code-quality-reviewer-prompt.md)" [label="re-review"];
|
||||
"Code quality reviewer subagent approves?" -> "Mark phase tasks complete in TodoWrite" [label="yes"];
|
||||
"Implementer subagent implements, tests, commits, self-reviews" -> "Mark phase tasks complete in TodoWrite";
|
||||
"Mark phase tasks complete in TodoWrite" -> "More phases remain?";
|
||||
"More phases remain?" -> "Dispatch implementer subagent (./implementer-prompt.md)" [label="yes"];
|
||||
"More phases remain?" -> "Dispatch final code reviewer subagent for entire implementation" [label="no"];
|
||||
"Dispatch final code reviewer subagent for entire implementation" -> "Use superpowers-lite:finishing-a-development-branch";
|
||||
"Dispatch final code reviewer subagent for entire implementation" -> "Final review approved?";
|
||||
"Final review approved?" -> "Fix Critical/Important findings and re-run verification" [label="no"];
|
||||
"Fix Critical/Important findings and re-run verification" -> "Dispatch final code reviewer subagent for entire implementation" [label="re-review if substantial"];
|
||||
"Final review approved?" -> "Use superpowers-lite:finishing-a-development-branch" [label="yes"];
|
||||
}
|
||||
```
|
||||
|
||||
@@ -116,9 +108,9 @@ Use the least powerful model that can handle each role to conserve cost and incr
|
||||
|
||||
Implementer subagents report one of four statuses. Handle each appropriately:
|
||||
|
||||
**DONE:** Proceed to spec compliance review.
|
||||
**DONE:** Mark the phase complete and continue to the next phase. Do not review yet unless the user explicitly requested phase reviews.
|
||||
|
||||
**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.
|
||||
**DONE_WITH_CONCERNS:** The implementer completed the work but flagged doubts. Read the concerns before proceeding. If the concerns affect correctness or scope, address them before moving to the next phase. If they're observations (e.g., "this file is getting large"), note them and continue; the overall review will evaluate the full implementation.
|
||||
|
||||
**NEEDS_CONTEXT:** The implementer needs information that wasn't provided. Provide the missing context and re-dispatch.
|
||||
|
||||
@@ -133,8 +125,8 @@ Implementer subagents report one of four statuses. Handle each appropriately:
|
||||
## Prompt Templates
|
||||
|
||||
- `./implementer-prompt.md` - Dispatch implementer subagent
|
||||
- `./spec-reviewer-prompt.md` - Dispatch spec compliance reviewer subagent
|
||||
- `./code-quality-reviewer-prompt.md` - Dispatch code quality reviewer subagent
|
||||
- `./spec-reviewer-prompt.md` - Optional phase-level spec review when explicitly requested or unusually risky
|
||||
- `./code-quality-reviewer-prompt.md` - Overall code quality review after all phases are complete
|
||||
|
||||
## Example Workflow
|
||||
|
||||
@@ -162,12 +154,6 @@ Implementer: "Got it. Implementing now..."
|
||||
- Self-review: Found I missed --force flag, added it
|
||||
- Committed
|
||||
|
||||
[Dispatch spec compliance reviewer]
|
||||
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 Phase 1 tasks complete]
|
||||
|
||||
Phase 2: Recovery modes and CLI wiring
|
||||
@@ -182,32 +168,18 @@ Implementer:
|
||||
- Self-review: All good
|
||||
- Committed
|
||||
|
||||
[Dispatch spec compliance reviewer]
|
||||
Spec reviewer: ❌ Issues:
|
||||
- Missing: Progress reporting (spec says "report every 100 items")
|
||||
- Extra: Added --json flag (not requested)
|
||||
|
||||
[Implementer fixes issues]
|
||||
Implementer: Removed --json flag, added progress reporting
|
||||
|
||||
[Spec reviewer reviews again]
|
||||
Spec reviewer: ✅ Spec compliant now
|
||||
|
||||
[Dispatch code quality reviewer]
|
||||
Code reviewer: Strengths: Solid. Issues (Important): Magic number (100)
|
||||
|
||||
[Implementer fixes]
|
||||
Implementer: Extracted PROGRESS_INTERVAL constant
|
||||
|
||||
[Code reviewer reviews again]
|
||||
Code reviewer: ✅ Approved
|
||||
|
||||
[Mark Phase 2 tasks complete]
|
||||
|
||||
...
|
||||
|
||||
[After all tasks]
|
||||
[Dispatch final code-reviewer]
|
||||
Final reviewer:
|
||||
- Important: Missing progress reporting (spec says "report every 100 items")
|
||||
- Minor: Magic number (100)
|
||||
|
||||
[Fix findings, rerun relevant verification]
|
||||
[Re-review if substantial fixes were required]
|
||||
Final reviewer: All requirements met, ready to merge
|
||||
|
||||
Done!
|
||||
@@ -224,7 +196,7 @@ Done!
|
||||
**vs. Executing Plans:**
|
||||
- Same session (no handoff)
|
||||
- Continuous progress (no waiting)
|
||||
- Review checkpoints automatic
|
||||
- One overall review after all implementation work
|
||||
|
||||
**Efficiency gains:**
|
||||
- No file reading overhead (controller provides full text)
|
||||
@@ -234,32 +206,29 @@ Done!
|
||||
|
||||
**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
|
||||
- Overall code review checks spec compliance and code quality after the full implementation exists
|
||||
- Review loops ensure substantial fixes actually work
|
||||
|
||||
**Cost:**
|
||||
- More subagent invocations than inline work (implementer + 2 reviewers per phase)
|
||||
- Fewer review subagent invocations than phase-by-phase review
|
||||
- Controller does more prep work (extracting all tasks upfront)
|
||||
- Review loops add iterations
|
||||
- Final review loops may add iterations
|
||||
- But catches issues early (cheaper than debugging later)
|
||||
|
||||
## Red Flags
|
||||
|
||||
**Never:**
|
||||
- Start implementation on `main` or `master`
|
||||
- Skip phase reviews (spec compliance OR code quality)
|
||||
- Skip the final overall code review
|
||||
- Proceed with unfixed issues
|
||||
- Dispatch multiple implementation subagents in parallel when phases share files or state
|
||||
- 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)
|
||||
- Accept "close enough" on final review findings
|
||||
- Skip review loops for substantial fixes
|
||||
- Let implementer self-review replace actual review (both are needed)
|
||||
- **Start code quality review before spec compliance is ✅** (wrong order)
|
||||
- Move to next phase while either review has open issues
|
||||
- Treat phase self-review as the final code review
|
||||
|
||||
**If subagent asks questions:**
|
||||
- Answer clearly and completely
|
||||
@@ -267,10 +236,9 @@ Done!
|
||||
- Don't rush them into implementation
|
||||
|
||||
**If reviewer finds issues:**
|
||||
- Implementer (same subagent) fixes them
|
||||
- Reviewer reviews again
|
||||
- Repeat until approved
|
||||
- Don't skip the re-review
|
||||
- Fix Critical and Important issues
|
||||
- Re-run relevant verification
|
||||
- Re-review if fixes were substantial
|
||||
|
||||
**If subagent fails a phase:**
|
||||
- Dispatch fix subagent with specific instructions
|
||||
@@ -280,7 +248,7 @@ Done!
|
||||
|
||||
**Required workflow skills:**
|
||||
- **superpowers-lite:writing-plans** - Creates the plan this skill executes
|
||||
- **superpowers-lite:requesting-code-review** - Code review template for reviewer subagents
|
||||
- **superpowers-lite:requesting-code-review** - Overall code review after all phases are complete
|
||||
- **superpowers-lite:finishing-a-development-branch** - Complete development after all tasks
|
||||
|
||||
**Optional workflow skills:**
|
||||
|
||||
Reference in New Issue
Block a user