Overview
The/gsd:execute-phase command runs all plans for a phase using wave-based parallelization. Each plan executes in a fresh 200k token context window, eliminating context rot.
What It Does
1
Discover Plans
Finds all PLAN.md files for the phase.
2
Analyze Dependencies
Builds dependency graph from plan frontmatter.
3
Group Into Waves
Independent plans → same wave (parallel)
Dependent plans → later waves (sequential)
4
Execute Each Wave
Spawns executor agents for each plan in the wave.
Each agent gets fresh 200k context.
5
Commit Per Plan
Atomic git commit after each plan completes.
6
Verify Phase
Checks if phase goals and requirements were achieved.
Command Usage
- Execute All Plans
- Execute Gap Fixes Only
Wave-Based Execution
Plans are grouped into waves based on dependencies:Why Waves Matter
- Independent plans → Same wave → Run simultaneously → Faster completion
- Dependent plans → Later wave → Wait for dependencies → Correct order
- File conflicts → Detected and serialized automatically
Fresh Context Per Plan
Each executor agent starts with:- 200k tokens available - Full context budget
- Zero accumulated garbage - No prior conversation history
- Focused context - Only loads what’s needed for this plan
PROJECT.md- Project vision{phase_num}-CONTEXT.md- Implementation preferences{phase_num}-RESEARCH.md- Domain knowledge{phase_num}-{N}-PLAN.md- The specific plan to executeSTATE.md- Current decisions and blockers
This is why quality stays high. No context rot, no “I’ll be more concise”, no degradation.
Atomic Git Commits
Each plan gets its own commit immediately after completion:type(phase-plan): description
- feat - New functionality
- fix - Bug fix
- docs - Documentation or completion
- refactor - Code restructuring
- test - Test addition/update
Benefits
- Git bisect finds exact failing task
- Selective revert - Each task independently revertable
- Clear history - Future Claude sessions understand what happened
- Better observability - Track progress at task granularity
Execution Flow
1
Pre-flight Checks
2
Wave 1 Execution
3
Wave 2 Execution
4
Phase Verification
5
Next Steps
Checkpoint Handling
If execution is interrupted (crash, timeout, user cancellation):- Completed plans are skipped
- In-progress plan restarts from beginning
- Uncommitted work is preserved
Parallel Execution Configuration
Control parallelization via config:- Working on a slow machine
- Debugging execution issues
- File conflicts occur frequently
Model Selection
Executor agents use models based on your profile:
Set profile with
/gsd:set-profile or configure in /gsd:settings.
Plan Summaries
After each plan completes, a SUMMARY.md is created:- Audit trail of what was built
- Context for future phases
- Debugging starting point if issues arise
Phase Verification
After all plans complete, automatic verification checks:1
Requirements Coverage
Were all phase requirements delivered?
2
Goal Achievement
Does the codebase match the phase goal?
3
Integration Points
Do new components integrate with existing code?
4
Must-Have Validation
Are critical features present and functional?
{phase_num}-VERIFICATION.md.
If verification fails:
Automatic verification catches obvious issues. Manual verification with
/gsd:verify-work tests actual user workflows.Files Created
After execution, your.planning/ directory has:
Git Branching
If you’ve configured git branching strategy:- None (Default)
- Phase Branching
- Milestone Branching
All commits go to current branch.
/gsd:settings or .planning/config.json.
Next Steps
After execution completes:Verify Work
Manually test features through conversational UAT
Next Phase
Start discussing the next phase