Skip to main content

Overview

The /gsd:plan-phase command transforms a roadmap phase into executable plans. It researches the domain (optional), creates atomic task plans with XML structure, and verifies them against requirements.

What It Does

1

Research (Optional)

Investigates how to implement this phase, guided by your CONTEXT.md decisions.
2

Plan Creation

Spawns planner agent to create 2-3 atomic task plans with XML structure.
3

Verification Loop

Spawns checker agent to verify plans against requirements. Loops until they pass or max iterations reached.
Each plan is small enough to execute in a fresh 200k context window - no degradation, no “I’ll be more concise now.”

Files Created

RESEARCH.md

{phase_num}-RESEARCH.md - Domain investigation findings

PLAN.md

{phase_num}-{N}-PLAN.md - Executable task plans (2-3 per phase)

Command Usage

Plans the specified phase with default flow:
  • Research domain (if not exists)
  • Create plans
  • Verify plans

Research Phase

When research is enabled, GSD investigates your domain:
Research is saved to .planning/{phase_num}-RESEARCH.md and loaded during planning.

Research Context

Research agent reads:
  • PROJECT.md - Overall vision
  • REQUIREMENTS.md - What must be delivered
  • {phase_num}-CONTEXT.md - Your implementation preferences
  • STATE.md - Prior decisions and blockers
  • Previous RESEARCH.md files - Avoid re-investigating
CONTEXT.md guides research. If you said “use Clerk” in discuss-phase, research focuses on Clerk best practices instead of comparing auth providers.

Plan Creation

The planner agent creates 2-3 atomic plans per phase:

Plan Structure

Each plan has:
  • YAML Frontmatter - Phase number, plan number, dependencies
  • Goal - What this plan achieves
  • Context - Key decisions from prior work
  • Tasks - 3-6 atomic tasks with XML structure

XML Task Format

XML structure is optimized for Claude’s attention mechanism. Tasks with clear structure get more consistent execution.

Plan Verification

After plans are created, the checker agent verifies them:
1

Requirements Coverage

Does the plan achieve all requirements for this phase?
2

Dependency Validity

Are dependencies realistic? Can plans execute in declared order?
3

Atomic Scope

Is each plan small enough to execute in fresh context?
4

Task Clarity

Are actions specific enough to execute without guessing?
5

Verification Feasibility

Can verify steps be executed to confirm success?
If verification fails, the checker provides feedback and the planner iterates:

Verification Loop

The loop continues until:
  • Plans pass all checks ✓
  • Max iterations reached (3)
  • User manually approves
If plans repeatedly fail verification, consider:
  • Phase scope too large (split into 2 phases)
  • Requirements unclear (update REQUIREMENTS.md)
  • Missing context (run discuss-phase)

Plan Dependencies

Plans can depend on other plans:
Dependencies affect execution:
  • Independent plans run in parallel
  • Dependent plans run in later waves
See Execute Phase for wave execution details.
Design for parallelization. Vertical slices (Plan 01: User auth end-to-end) parallelize better than horizontal layers (Plan 01: All models, Plan 02: All APIs).

Configuration Impact

Granularity Setting

Controls plan size and count:
  • Coarse - Fewer, larger plans (3-5 tasks each)
  • Standard (default) - Balanced (2-4 tasks each)
  • Fine - More, smaller plans (1-2 tasks each)

Model Profile

Controls which Claude model plans:

Workflow Toggles

Disable via /gsd:settings or per-command flags.

Example Session

1

Start planning

2

Research completes

3

Plans created

4

Verification passes

After Planning

Your .planning/ directory now has:
Each plan is ready for execution with:
  • Clear goals
  • Specific actions
  • Verification steps
  • Dependency declarations

Next Steps

Execute Phase

Run plans in parallel waves with fresh context per plan

Update Plans

Edit PLAN.md files manually if needed before execution

Tips

Run research first. Even for familiar domains, research finds edge cases and best practices you might miss.
Review dependencies. Bad dependencies create false sequencing. Plans that touch different files should be independent.
Keep plans atomic. If a plan feels too large, consider splitting the phase or increasing granularity.
Plans are executable prompts. Don’t treat them as documentation - they need precise, actionable instructions.