execute-plan
/execute-plan - Subagent-Driven Plan Execution
Section titled “/execute-plan - Subagent-Driven Plan Execution”Purpose
Section titled “Purpose”Execute a detailed implementation plan using fresh subagents per task with mandatory code review gates between tasks.
/execute-plan [plan-file-path]Arguments
Section titled “Arguments”$ARGUMENTS: Path to the plan file (created with/plan --detailed)
Execute plan from: $ARGUMENTS
Methodology
Section titled “Methodology”Reference: .claude/skills/methodology/executing-plans/SKILL.md
This command uses the superpowers execution methodology for quality-gated implementation.
Core Pattern
Section titled “Core Pattern”“Fresh subagent per task + review between tasks = high quality, fast iteration”
Why Fresh Agents?
Section titled “Why Fresh Agents?”- Prevents context pollution between tasks
- Each task gets focused attention
- Failures don’t cascade
- Easier to retry individual tasks
Why Code Review Between Tasks?
Section titled “Why Code Review Between Tasks?”- Catches issues early
- Ensures code matches intent
- Prevents technical debt accumulation
- Creates natural checkpoints
Workflow
Section titled “Workflow”Step 1: Load Plan
Section titled “Step 1: Load Plan”- Read the plan file
- Verify plan is complete and approved
- Create TodoWrite with all tasks from plan
- Set first task to
in_progress
Step 2: Execute Task (For Each Task)
Section titled “Step 2: Execute Task (For Each Task)”1. Dispatch fresh subagent with task details2. Subagent implements following TDD cycle: - Write failing test - Verify test fails - Implement minimally - Verify test passes - Commit3. Subagent returns completion summaryStep 3: Code Review
Section titled “Step 3: Code Review”After each task:
1. Dispatch code-reviewer subagent2. Review scope: only changes from current task3. Reviewer returns findings: - Critical: Must fix before proceeding - Important: Should fix before proceeding - Minor: Can fix laterStep 4: Handle Review Findings
Section titled “Step 4: Handle Review Findings”IF Critical or Important issues found: 1. Dispatch fix subagent for each issue 2. Re-request code review 3. Repeat until no Critical/Important issues
IF only Minor issues: 1. Note for later cleanup 2. Proceed to next taskStep 5: Mark Complete
Section titled “Step 5: Mark Complete”- Update TodoWrite - mark task completed
- Move to next task
- Repeat from Step 2
Step 6: Final Review
Section titled “Step 6: Final Review”After all tasks complete:
- Dispatch comprehensive code review
- Review entire implementation against plan
- Verify all success criteria met
- Run full test suite
- Use
finishing-development-branchskill
Critical Rules
Section titled “Critical Rules”Never Skip Code Reviews
Section titled “Never Skip Code Reviews”Every task must be reviewed before proceeding. No exceptions.
Never Proceed with Critical Issues
Section titled “Never Proceed with Critical Issues”Critical issues must be fixed:
implement → review → fix critical → re-review → proceedNever Run Parallel Implementation
Section titled “Never Run Parallel Implementation”Tasks run sequentially:
WRONG: Run Task 1, 2, 3 simultaneouslyRIGHT: Task 1 → Review → Task 2 → Review → Task 3 → ReviewAlways Read Plan Before Implementing
Section titled “Always Read Plan Before Implementing”WRONG: Start coding based on memory of planRIGHT: Read plan file, extract task details, then implementError Handling
Section titled “Error Handling”Task Fails
Section titled “Task Fails”- Capture error details
- Attempt fix (max 2 retries)
- If still failing, pause execution
- Report to user with:
- Which task failed
- Error details
- Suggested resolution
- Wait for user decision
Review Finds Major Issues
Section titled “Review Finds Major Issues”- List all Critical/Important issues
- Dispatch fix subagent for each
- Re-run code review
- If issues persist after 2 cycles:
- Pause execution
- Report to user
- May need plan revision
Output
Section titled “Output”Progress Updates
Section titled “Progress Updates”## Execution Progress
### Task 1: Create User model ✓- Files modified: src/models/user.ts- Tests added: 3- Review: Passed
### Task 2: Add validation ✓- Files modified: src/models/user.ts- Tests added: 2- Review: Passed (1 minor deferred)
### Task 3: Create endpoint [IN PROGRESS]- Status: Implementing...Completion Summary
Section titled “Completion Summary”## Execution Complete
### Summary- Tasks completed: 8/8- Tests added: 24- Coverage: 92%
### Files Created- src/models/user.ts- src/services/user-service.ts- src/routes/user.ts
### Files Modified- src/routes/index.ts- src/types/index.ts
### Deferred Items- Minor: Variable rename in user-service.ts line 12
### Next Steps- Run full test suite- Use /ship to create PRPrerequisites
Section titled “Prerequisites”Before using this command:
- Plan file exists and is complete
- Plan was created with
/plan --detailed - Plan has been reviewed and approved
- Tests can be run (
npm testorpytest)
Related Commands
Section titled “Related Commands”/plan --detailed- Create detailed plan/brainstorm- Design before planning/ship- Create PR after execution
Gap Analysis Rule
Section titled “Gap Analysis Rule”Always identify gaps and suggest next steps to users. In case there is no gaps anymore, then AI should clearly state that there is no gap left.