Overview
Thegsd:execute-phase command executes all plans in a phase using wave-based parallel execution. The orchestrator stays lean by discovering plans, analyzing dependencies, grouping into waves, spawning subagents, and collecting results.
Usage
Parameters
The phase number to execute (e.g., 1, 2, 3). Must exist in your ROADMAP.md and have a PLAN.md file.
Execute only gap closure plans (plans with
gap_closure: true in frontmatter). Use after verify-work creates fix plans.How It Works
The orchestrator follows an efficient workflow:- Discover Plans - Finds all PLAN.md files for the phase
- Analyze Dependencies - Determines which plans depend on others
- Group into Waves - Creates parallel execution groups
- Spawn Subagents - Launches fresh agent per plan (100% context budget each)
- Collect Results - Gathers outcomes and updates state
Each subagent gets 100% fresh context budget. The orchestrator uses only ~15% of its budget for coordination.
Wave-Based Execution
Plans are executed in waves based on dependencies: Wave 1: All plans with no dependencies (can run in parallel) Wave 2: Plans that depend on Wave 1 completions Wave 3: Plans that depend on Wave 2 completions …and so on.Example Wave Structure
Within each wave, all plans execute in parallel for maximum efficiency.
Context Budget Management
The execution model is designed for efficiency:- Orchestrator: Uses ~15% context for coordination
- Each Subagent: Gets 100% fresh context budget
- Isolation: Each plan execution is independent
Gap Closure Mode
After running verify-work, you may have gaps to fix:- Executes only plans marked with
gap_closure: true - Skips regular implementation plans
- Used for targeted fixes after verification
Files Created/Modified
Updated with execution progress, completion status, and checkpoints
All source code, tests, and documentation specified in the plans
Checkpoint Handling
The system tracks execution state:- Wave Checkpoints - Progress saved after each wave completes
- Plan Status - Individual plan success/failure tracking
- Resume Capability - Can resume from last checkpoint on failure
Examples
Execute Full Phase
Execute Gap Fixes Only
Typical Flow
Workflow Gates
All workflow gates are preserved:- Wave Execution - Dependency-based parallel execution
- Checkpoint Handling - Progress tracking and resume capability
- Verification - Post-execution validation
- State Updates - Automatic STATE.md updates
- Routing - Next-step suggestions
Error Handling
When a plan fails:- Wave Continues - Other plans in the wave complete
- Dependent Waves Block - Plans depending on failed plan don’t execute
- State Updated - Failure recorded in STATE.md
- User Notified - Clear error message with context
You can fix failed plans and re-run execute-phase. The system will skip completed plans and resume from failures.
Next Steps
After executing a phase: Verify the work:Allowed Tools
This command has access to:- Read - Read plan files and context
- Write - Create new files
- Edit - Modify existing files
- Glob - Find files by pattern
- Grep - Search file contents
- Bash - Execute shell commands
- Task - Spawn subagents for each plan
- TodoWrite - Track execution progress
- AskUserQuestion - Request clarification when needed