feat: parallel-first planning with dependency graphs and checkpoint-resume

- plan-phase.md: dependency-first planning, vertical slices default
- phase-prompt.md: autonomous field, wave structure, frontmatter table
- scope-estimation.md: parallel default, removed "parallel-aware" framing
- plan-format.md: frontmatter docs with depends_on, files_modified, autonomous
- execute-phase.md: checkpoint-resume flow using Task resume parameter

Plans now declare explicit dependencies via frontmatter. Wave assignment
is automatic based on depends_on + files_modified. Checkpoints pause
subagent, return to orchestrator, user responds, orchestrator resumes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson
2026-01-13 16:32:03 -06:00
parent e30e387c00
commit e5d4ecc28c
5 changed files with 765 additions and 493 deletions

View File

@@ -10,14 +10,50 @@ A plan is Claude-executable when Claude can read the PLAN.md and immediately sta
If Claude has to guess, interpret, or make assumptions - the task is too vague.
</core_principle>
<frontmatter>
Every PLAN.md starts with YAML frontmatter:
```yaml
---
phase: XX-name
plan: NN
type: execute
depends_on: [] # Plan IDs this plan requires (e.g., ["01-01"])
files_modified: [] # Files this plan modifies
autonomous: true # false if plan has checkpoints
domain: [optional] # Domain skill if loaded
---
```
| Field | Required | Purpose |
|-------|----------|---------|
| `phase` | Yes | Phase identifier (e.g., `01-foundation`) |
| `plan` | Yes | Plan number within phase (e.g., `01`, `02`) |
| `type` | Yes | `execute` for standard plans, `tdd` for TDD plans |
| `depends_on` | Yes | Array of plan IDs this plan requires. **Empty = Wave 1 candidate** |
| `files_modified` | Yes | Files this plan touches. Used for conflict detection |
| `autonomous` | Yes | `true` if no checkpoints, `false` if has checkpoints |
| `domain` | No | Domain skill if loaded (e.g., `next-js`) |
**Wave assignment:** `/gsd:execute-phase` reads `depends_on` and `files_modified` to build execution waves:
- `depends_on: []` + no file conflicts → Wave 1 (parallel)
- `depends_on: ["XX-YY"]` → runs after plan XX-YY completes
- Shared `files_modified` → sequential by plan number
**Checkpoint detection:** Plans with `autonomous: false` require user interaction. Execute after parallel wave or in main context.
</frontmatter>
<prompt_structure>
Every PLAN.md follows this XML structure:
```markdown
---
phase: XX-name
plan: NN
type: execute
domain: [optional]
depends_on: []
files_modified: [path/to/file.ts]
autonomous: true
---
<objective>
@@ -26,9 +62,19 @@ Purpose: [...]
Output: [...]
</objective>
<execution_context>
@~/.claude/get-shit-done/workflows/execute-plan.md
@~/.claude/get-shit-done/templates/summary.md
[If checkpoints exist:]
@~/.claude/get-shit-done/references/checkpoints.md
</execution_context>
<context>
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
[Only if genuinely needed:]
@.planning/phases/XX-name/XX-YY-SUMMARY.md
@relevant/source/files.ts
</context>
@@ -240,6 +286,14 @@ Use for: Technology selection, architecture decisions, design choices, feature p
**Golden rule:** If Claude CAN automate it, Claude MUST automate it.
**Checkpoint impact on parallelization:**
- Plans with checkpoints set `autonomous: false` in frontmatter
- Non-autonomous plans execute after parallel wave or in main context
- Subagent pauses at checkpoint, returns to orchestrator
- Orchestrator presents checkpoint to user
- User responds
- Orchestrator resumes agent with `resume: agent_id`
See `./checkpoints.md` for comprehensive checkpoint guidance.
</task_types>
@@ -274,14 +328,22 @@ Use @file references to load context for the prompt:
```markdown
<context>
@.planning/PROJECT.md # Project vision
@.planning/ROADMAP.md # Phase structure
@.planning/phases/02-auth/DISCOVERY.md # Discovery results
@src/lib/db.ts # Existing database setup
@src/types/user.ts # Existing type definitions
@.planning/ROADMAP.md # Phase structure
@.planning/STATE.md # Current position
# Only include prior SUMMARY if genuinely needed:
# - This plan imports types from prior plan
# - Prior plan made decision affecting this plan
# Independent plans need NO prior SUMMARY references.
@src/lib/db.ts # Existing database setup
@src/types/user.ts # Existing type definitions
</context>
```
Reference files that Claude needs to understand before implementing.
**Anti-pattern:** Reflexive chaining (02 refs 01, 03 refs 02). Only reference what you actually need.
</context_references>
<verification_section>
@@ -320,22 +382,7 @@ Specify the SUMMARY.md structure:
```markdown
<output>
After completion, create `.planning/phases/XX-name/SUMMARY.md`:
# Phase X: Name Summary
**[Substantive one-liner]**
## Accomplishments
## Files Created/Modified
## Decisions Made
## Issues Encountered
## Next Phase Readiness
After completion, create `.planning/phases/XX-name/{phase}-{plan}-SUMMARY.md`
</output>
```