Skip to main content

Overview

The gsd: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

number
required
The phase number to execute (e.g., 1, 2, 3). Must exist in your ROADMAP.md and have a PLAN.md file.
flag
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:
  1. Discover Plans - Finds all PLAN.md files for the phase
  2. Analyze Dependencies - Determines which plans depend on others
  3. Group into Waves - Creates parallel execution groups
  4. Spawn Subagents - Launches fresh agent per plan (100% context budget each)
  5. 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:
This mode:
  • Executes only plans marked with gap_closure: true
  • Skips regular implementation plans
  • Used for targeted fixes after verification
Gap closure plans are created by the verify-work command when issues are found. Don’t use —gaps-only unless you’ve run verification first.

Files Created/Modified

file
Updated with execution progress, completion status, and checkpoints
various
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

Executes all plans in phase 2 using wave-based parallelization.

Execute Gap Fixes Only

After verification found issues in phase 4, execute only the fix plans.

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:
  1. Wave Continues - Other plans in the wave complete
  2. Dependent Waves Block - Plans depending on failed plan don’t execute
  3. State Updated - Failure recorded in STATE.md
  4. 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:
This runs conversational UAT to confirm features work as expected. Move to next phase:

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