Skip to main content

Overview

The gsd:plan-phase command creates executable phase prompts (PLAN.md files) for a roadmap phase with integrated research and verification. It follows a default flow: Research (if needed) → Plan → Verify → Done.

Usage

Parameters

number
The phase number to plan. If omitted, auto-detects the next unplanned phase.
flag
Automatic mode with minimal interaction.
flag
Force re-research even if RESEARCH.md already exists for this phase.
flag
Skip research entirely and go straight to planning.
flag
Gap closure mode. Reads VERIFICATION.md and skips research. Use when addressing issues found during verification.
flag
Skip the verification loop that checks plan quality.
string
Use a PRD or acceptance criteria file instead of discuss-phase. Parses requirements into CONTEXT.md automatically and skips discuss-phase entirely.Example: --prd requirements.md

How It Works

The orchestrator manages the full workflow:
  1. Parse Arguments - Validates flags and phase number
  2. Validate Phase - Ensures phase exists in ROADMAP.md
  3. Research Domain (unless skipped) - Gathers relevant domain knowledge
  4. Spawn gsd-planner - Specialized agent creates the plan
  5. Verify with gsd-plan-checker - Quality assurance loop
  6. Iterate - Continues until pass or max iterations reached
  7. Present Results - Shows final plan and next steps
The verification loop ensures plans are executable, complete, and aligned with project context.

Auto-Detection

When you run /gsd:plan-phase without a phase number:
The system automatically detects the next unplanned phase from your ROADMAP.md and plans that phase.

Research Behavior

By default, the system intelligently decides whether research is needed:
  • Conducts research when domain knowledge would help
  • Skips research for straightforward implementation tasks
  • Reuses research if RESEARCH.md already exists
Use --research to force fresh research, or --skip-research to bypass it entirely.

Gap Closure Mode

When verification finds issues, use gap closure mode:
This mode:
  • Reads VERIFICATION.md to understand what failed
  • Skips research (issues are already understood)
  • Creates targeted fix plans

PRD Mode

If you have a detailed PRD or acceptance criteria document:
This:
  • Parses the PRD into CONTEXT.md automatically
  • Skips the discuss-phase step entirely
  • Proceeds directly to planning
PRD mode requires a well-structured requirements document. The system will parse it to extract implementation decisions.

Files Created

file
Executable phase plan with detailed tasks, dependencies, and implementation guidance
file
Domain research findings (created when research is conducted)
file
Implementation context (created when using —prd flag)

Examples

Plan Next Phase

Auto-detects and plans the next unplanned phase.

Plan Specific Phase with Research

Forces fresh research for phase 4, even if RESEARCH.md exists.

Fast Planning (No Verification)

Creates a plan without running the quality verification loop.

Plan from PRD

Uses the acceptance criteria document as the source of truth, skipping discuss-phase.

Gap Closure

Reads VERIFICATION.md and creates plans to fix identified issues.

Workflow Gates

All workflow gates are preserved:
  • Validation - Phase must exist in ROADMAP.md
  • Research - Domain knowledge gathering (when appropriate)
  • Planning - Specialized gsd-planner agent execution
  • Verification Loop - Quality checks until pass or max iterations
  • Routing - Automatic next-step suggestions

Next Steps

After planning a phase, execute it:
This runs all plans in the phase with wave-based parallel execution.

Allowed Tools

This command has access to:
  • Read - Read context and code files
  • Write - Create plan files
  • Bash - Execute shell commands
  • Glob - Find files by pattern
  • Grep - Search file contents
  • Task - Spawn specialized agents (gsd-planner, gsd-plan-checker)
  • WebFetch - Fetch web resources for research
  • mcp__context7__* - Library documentation lookup