Executing Plans
The Executing Plans skill automates implementation of detailed plans using fresh agents per task and mandatory code review between tasks.
Overview
Section titled “Overview”Executing Plans bridges planning and delivery through systematic, quality-gated execution. Each task runs in isolation with independent review, preventing context pollution and ensuring consistent quality.
Core Pattern: Fresh subagent per task + review between tasks = high quality, fast iteration
When to Use
Section titled “When to Use”- Executing plans created with Writing Plans skill
- Staying in current session with independent tasks
- Wanting quality gates without human delays
- Systematic implementation with verification
When NOT to Use
Section titled “When NOT to Use”- Plan needs review first (use brainstorming)
- Tasks are tightly coupled and need shared context
- Plan requires revision during execution
The Workflow
Section titled “The Workflow”Step 1: Load Plan
Section titled “Step 1: Load Plan”1. Read the plan file2. Verify plan is complete and approved3. Create task tracking with all tasks4. Set first task to in_progressStep 2: Execute 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”1. Update task tracking - mark task completed2. Move to next task3. Repeat from Step 2Step 6: Final Review
Section titled “Step 6: Final Review”After all tasks complete:
1. Dispatch comprehensive code review2. Review entire implementation against plan3. Verify all success criteria met4. Run full test suite5. Use finishing-development-branch skillCritical Rules
Section titled “Critical Rules”Never Skip Code Reviews
Section titled “Never Skip Code Reviews”Every task must be reviewed before proceeding. No exceptions.
Why: Catches issues when they’re easiest to fix.
Never Proceed with Critical Issues
Section titled “Never Proceed with Critical Issues”Critical issues must be fixed immediately:
implement → review → fix critical → re-review → proceedNot:
implement → review → note issue → proceed anywayNever Run Parallel Implementation
Section titled “Never Run Parallel Implementation”Tasks run sequentially:
❌ WRONG: Run Task 1, 2, 3 simultaneously✅ RIGHT: Run Task 1 → Review → Task 2 → Review → Task 3 → ReviewWhy: Each task may depend on previous tasks being correct.
Always Read Plan Before Implementing
Section titled “Always Read Plan Before Implementing”❌ WRONG: Start coding based on memory of plan✅ RIGHT: Read plan file, extract task details, then implementSubagent Communication
Section titled “Subagent Communication”Implementation Subagent Prompt
Section titled “Implementation Subagent Prompt”## Task: Add verified flag to User model
**Context**: Executing plan for Email Verification feature
**Files to modify**:- Modify: src/models/user.ts- Test: src/models/user.test.ts
**Steps**:1. Write failing test for verified flag2. Verify test fails (run npm test)3. Add verified field to User model4. Verify test passes5. Commit changes
**Requirements**:- Follow TDD: test first, then implement- Commit after completion- Return summary of what was done
**Output expected**:- Files modified: [list]- Tests added: [count]- Commit hash: [hash]- Any issues encountered: [none or details]Code Review Subagent Prompt
Section titled “Code Review Subagent Prompt”## Code Review Request
**Scope**: Changes from Task 3: Add login endpoint
**Files changed**:- src/routes/auth.ts- src/routes/auth.test.ts- src/middleware/auth.ts
**Review against**:- Plan requirements for this task- Code quality standards- Security best practices- Test coverage requirements
**Return**:- Critical issues (must fix before continuing)- Important issues (should fix before continuing)- Minor issues (can defer)- Approval status (approved / needs fixes)Task Tracking
Section titled “Task Tracking”Track status throughout execution:
| Task | Status | Reviewed ||------|--------|----------|| Task 1: Create model | completed | ✓ || Task 2: Add validation | completed | ✓ || Task 3: Create endpoint | in_progress | - || Task 4: Add tests | pending | - || Task 5: Documentation | pending | - |Status values:
pending- Not startedin_progress- Currently being implementedcompleted- Done and reviewed
Error Handling
Section titled “Error Handling”Task Fails
Section titled “Task Fails”1. Capture error details2. Attempt fix (max 2 retries)3. If still failing, pause execution4. Report to user with: - Which task failed - Error details - Suggested resolution5. Wait for user decisionReview Finds Major Issues
Section titled “Review Finds Major Issues”1. List all Critical/Important issues2. Dispatch fix subagent for each3. Re-run code review4. If issues persist after 2 cycles: - Pause execution - Report to user - May need plan revisionActivation
Section titled “Activation”Via Command
Section titled “Via Command”/execute-plan plans/feature-x.md/execute-plan plans/feature-x.md --parallel-reviews # Review multiple tasksFrom Writing Plans
Section titled “From Writing Plans”/plan "add email verification"# Plan created at plans/email-verification.md
"Would you like to execute this plan now?"> Yes
# Begins execution automaticallyExample Execution
Section titled “Example Execution”## Plan Execution: Email Verification
### Status: In Progress (Task 3 of 8)
---
### Task 1: Add verified flag ✓**Implementation**: Completed in 3 minutes- Added `verified: boolean` field to User model- Test: user.test.ts (1 new test)- Commit: a1b2c3d
**Code Review**: Approved- No issues found- Test coverage: 100%
---
### Task 2: Create verification token ✓**Implementation**: Completed in 4 minutes- Added token generation utility- Test: token.test.ts (3 new tests)- Commit: e4f5g6h
**Code Review**: 1 Important issue found- Issue: Token expiry not validated- Fix: Added expiry check- Re-review: Approved
---
### Task 3: Send verification email ⏳**Status**: Implementation in progress...Completion Checklist
Section titled “Completion Checklist”Before declaring plan execution complete:
- All tasks marked completed
- All code reviews passed
- Full test suite passes
- No Critical issues outstanding
- No Important issues outstanding
- Final comprehensive review done
- Ready for branch cleanup/merge
Integration with Other Skills
Section titled “Integration with Other Skills”From Writing Plans
Section titled “From Writing Plans”# 1. Create plan/plan "feature X"
# 2. Execute plan/execute-plan plans/feature-x.mdWith TDD
Section titled “With TDD”Every task implementation follows TDD:
- Write failing test
- Verify it fails
- Implement minimally
- Verify it passes
With Code Review
Section titled “With Code Review”Automatic code review after each task:
- Categorizes issues (Critical/Important/Minor)
- Enforces fixes before proceeding
- Maintains code quality
With Verification
Section titled “With Verification”Uses verification before completion:
- Never claims completion without proof
- Runs tests to verify
- Checks actual output
Best Practices
Section titled “Best Practices”Review Scope
Section titled “Review Scope”Keep review focused on current task:
✅ "Review changes in src/auth.ts from Task 5"❌ "Review the entire codebase"Fresh Agents
Section titled “Fresh Agents”Each task gets a clean slate:
Task 1 Agent: Focuses only on Task 1Task 2 Agent: No memory of Task 1 detailsTask 3 Agent: No memory of Task 1 or 2Benefit: No context pollution, clearer focus.
Incremental Quality
Section titled “Incremental Quality”Fix issues immediately:
Task → Review → Issues Found → Fix → Re-review → Pass → Next TaskNot:
Task 1 → Issues notedTask 2 → More issues notedTask 3 → Try to fix all issues (context lost)Common Patterns
Section titled “Common Patterns”Standard Task
Section titled “Standard Task”1. Load task from plan2. Dispatch implementation agent3. Agent implements with TDD4. Agent commits5. Dispatch review agent6. If approved → next task7. If issues → fix → re-reviewError Recovery
Section titled “Error Recovery”1. Task fails2. Capture error3. Attempt automatic fix4. If fix works → review → proceed5. If fix fails → pause → report to userQuality Gate
Section titled “Quality Gate”After each task:1. Code review categorizes issues2. Critical → Must fix (block)3. Important → Should fix (block)4. Minor → Note for later (allow)Troubleshooting
Section titled “Troubleshooting”Task Keeps Failing
Section titled “Task Keeps Failing”Problem: Task 5 fails 3 times
Actions:1. STOP execution2. Review task requirements3. Check if plan needs adjustment4. May need to revise approach5. Consult user before continuingReview Never Passes
Section titled “Review Never Passes”Problem: Task 2 reviewed 3 times, still has issues
Actions:1. PAUSE execution2. Review the review feedback3. May indicate plan gap4. May need design discussion5. Don't iterate endlesslyTests Pass Individually, Fail Together
Section titled “Tests Pass Individually, Fail Together”Problem: Each task's tests pass, but full suite fails
Actions:1. Identify test interdependencies2. Fix test isolation3. May need test setup/teardown improvements4. Run full suite after each task (not just new tests)Next Steps
Section titled “Next Steps”After plan execution completes:
- Final verification: Run full test suite
- Cleanup: Address Minor issues noted during reviews
- Documentation: Update docs if needed
- Branch finishing: Use finishing-development-branch skill
Related Skills
Section titled “Related Skills”- Writing Plans - Create plans to execute
- TDD - Test-first implementation
- Code Review - Quality gates
- Verification - Prove completion