Why XML?
Claude performs best with structured, hierarchical prompts. GSD uses XML because:- Unambiguous structure — No confusion about what’s what
- Hierarchical nesting — Tasks contain files, actions, verification
- Parser-friendly — Easy to extract, validate, transform
- Claude-optimized — Claude’s training includes extensive XML
Real Example
Here’s an actual GSD plan structure:Structure Breakdown
<objective> — What and Why
<objective> — What and Why
<execution_context> — How to Execute
<execution_context> — How to Execute
- How to handle deviations (Rules 1-4)
- When to commit (after each task)
- How to create SUMMARY.md
<context> — @-References
<context> — @-References
@path is loaded into context.Only includes what’s needed for THIS plan. No reflexive chaining.<tasks> — The Work
<tasks> — The Work
<verification> — Overall Checks
<verification> — Overall Checks
<success_criteria> — Measurable Completion
<success_criteria> — Measurable Completion
Task Anatomy
Every task has five required elements:1. Type
90% of tasks are
type="auto". GSD prefers automation over checkpoints.2. Name
3. Files
4. Action
- What to do — exact behavior
- What to avoid — and WHY
- Library choices — with rationale
- Edge cases — how to handle them
5. Verify
<automated> command.
Simple format also accepted:
6. Done
- “User can log in with email and password”
- “Protected routes return 401 without token”
- “Dashboard shows user’s projects in grid layout”
- “Authentication is complete”
- “It works”
- “Looks good”
Special Task Features
TDD Tasks
tdd="true" flag tells executor to:
- RED: Write tests from
<behavior>, run (must fail), commit - GREEN: Write code from
<action>, run (must pass), commit - REFACTOR: Clean up if needed, run (must pass), commit
Checkpoint Tasks
- Completes all automation BEFORE checkpoint
- Starts server if needed
- Pauses at checkpoint
- Returns structured message with verification steps
- Waits for user
Frontmatter: Plan Metadata
Every PLAN.md includes YAML frontmatter:Execution Metadata
Execution Metadata
File Tracking
File Tracking
Requirements Traceability
Requirements Traceability
Must-Haves (Goal-Backward)
Must-Haves (Goal-Backward)
User Setup (Optional)
User Setup (Optional)
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
Next Steps
Workflow Stages
See how XML plans fit into the 5-stage workflow
Atomic Commits
Learn how each task becomes a commit