Skip to main content

Why XML?

Claude performs best with structured, hierarchical prompts. GSD uses XML because:
  1. Unambiguous structure — No confusion about what’s what
  2. Hierarchical nesting — Tasks contain files, actions, verification
  3. Parser-friendly — Easy to extract, validate, transform
  4. Claude-optimized — Claude’s training includes extensive XML
Every PLAN.md file is an XML-structured prompt optimized for Claude executors.

Real Example

Here’s an actual GSD plan structure:

Structure Breakdown

Sets the context for execution. Executor understands the big picture, not just individual tasks.
References GSD’s execution workflows and templates. Tells Claude:
  • How to handle deviations (Rules 1-4)
  • When to commit (after each task)
  • How to create SUMMARY.md
Tells Claude which files to read before starting. Each @path is loaded into context.Only includes what’s needed for THIS plan. No reflexive chaining.
Each task is a discrete unit of work with verification built in.
How to verify the whole plan works together.
Observable outcomes. Executor checks these before marking plan complete.

Task Anatomy

Every task has five required elements:

1. Type

90% of tasks are type="auto". GSD prefers automation over checkpoints.

2. Name

Action-oriented, specific. Appears in commit messages and SUMMARY.md.

3. Files

Exact file paths created or modified. Can be multiple files separated by commas. Good:
Bad:

4. Action

Specific implementation instructions, including:
  • What to do — exact behavior
  • What to avoid — and WHY
  • Library choices — with rationale
  • Edge cases — how to handle them
The test: Could a different Claude instance execute without asking clarifying questions? If not, add specificity.

5. Verify

How to prove the task is complete. Must include an <automated> command. Simple format also accepted:
Nyquist Rule: Every <verify> must include an automated command. If no test exists yet, the plan must create it first (Wave 0 task).

6. Done

Acceptance criteria — measurable state of completion. Good:
  • “User can log in with email and password”
  • “Protected routes return 401 without token”
  • “Dashboard shows user’s projects in grid layout”
Bad:
  • “Authentication is complete”
  • “It works”
  • “Looks good”

Special Task Features

TDD Tasks

The tdd="true" flag tells executor to:
  1. RED: Write tests from <behavior>, run (must fail), commit
  2. GREEN: Write code from <action>, run (must pass), commit
  3. REFACTOR: Clean up if needed, run (must pass), commit

Checkpoint Tasks

Executor:
  1. Completes all automation BEFORE checkpoint
  2. Starts server if needed
  3. Pauses at checkpoint
  4. Returns structured message with verification steps
  5. Waits for user

Frontmatter: Plan Metadata

Every PLAN.md includes YAML frontmatter:
Used by orchestrator for wave coordination.
Determines parallelization: plans with no file overlap can run in parallel.
Links plan to REQUIREMENTS.md. Used by verifier to check coverage.CRITICAL: Every requirement ID from ROADMAP must appear in at least one plan.
Used by verifier after execution. Checks these are actually delivered.
Documents human-required setup for external services.

Why This Structure Works

Unambiguous instructions

Executor knows exactly what to do, how to verify, what success looks like. No interpretation needed.

Built-in verification

Every task includes <verify> and <done>. Quality is baked in, not bolted on.

Deviation handling

Executor applies Rules 1-4 automatically, documents in SUMMARY. Plans are guides, not scripts.

Traceability

Frontmatter links plans to requirements, files, dependencies. Full visibility from requirement to commit.

Specificity Examples

Anti-Patterns

DON’T:
  • Use vague task names (“Implement feature”)
  • Omit <verify> or use manual-only verification
  • Put implementation details in frontmatter
  • Reference files with wildcards (“the auth files”)
  • Chain plans unnecessarily (02 refs 01, 03 refs 02…)
  • Create checkpoints for work Claude can automate
DO:
  • Be specific in <action> — include what NOT to do and why
  • Include automated verification commands
  • Use @-references for context files
  • Declare file ownership in frontmatter
  • Prefer vertical slices over horizontal layers
  • Automate everything, checkpoint only for verification

Next Steps

Workflow Stages

See how XML plans fit into the 5-stage workflow

Atomic Commits

Learn how each task becomes a commit