Phase 16: Plan Verification Loop - 3 plan(s) in 2 wave(s) - Wave 1: 16-01 (create gsd-plan-checker agent) - Wave 2: 16-02, 16-03 (parallel - orchestrator + planner revision) - Ready for execution Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
274 lines
7.3 KiB
Markdown
274 lines
7.3 KiB
Markdown
---
|
|
phase: 16-plan-verification-loop
|
|
plan: 03
|
|
type: execute
|
|
wave: 2
|
|
depends_on: ["16-01"]
|
|
files_modified: [agents/gsd-planner.md]
|
|
autonomous: true
|
|
|
|
must_haves:
|
|
truths:
|
|
- "Planner can accept checker feedback in revision mode"
|
|
- "Planner reads existing PLAN.md files when revising"
|
|
- "Planner makes targeted updates, not full replan"
|
|
- "Planner returns what changed for user visibility"
|
|
artifacts:
|
|
- path: "agents/gsd-planner.md"
|
|
provides: "Standard and revision planning modes"
|
|
min_lines: 1100
|
|
key_links:
|
|
- from: "gsd-planner revision_mode"
|
|
to: "existing PLAN.md files"
|
|
via: "Read tool in revision flow"
|
|
- from: "gsd-planner"
|
|
to: "checker issues"
|
|
via: "revision_context in prompt"
|
|
---
|
|
|
|
<objective>
|
|
Add revision mode to gsd-planner agent for handling checker feedback.
|
|
|
|
Purpose: Planner can make targeted updates to existing plans based on checker issues, completing the verification loop.
|
|
|
|
Output: Updated agents/gsd-planner.md with revision mode
|
|
</objective>
|
|
|
|
<execution_context>
|
|
@~/.claude/get-shit-done/workflows/execute-plan.md
|
|
@~/.claude/get-shit-done/templates/summary.md
|
|
</execution_context>
|
|
|
|
<context>
|
|
@.planning/PROJECT.md
|
|
@.planning/ROADMAP.md
|
|
@.planning/STATE.md
|
|
|
|
Current planner agent (to be updated):
|
|
@agents/gsd-planner.md
|
|
|
|
Checker agent (from 16-01, for understanding issue format):
|
|
@agents/gsd-plan-checker.md
|
|
|
|
Phase brief:
|
|
@.planning/phases/16-plan-verification-loop/16-BRIEF.md
|
|
</context>
|
|
|
|
<tasks>
|
|
|
|
<task type="auto">
|
|
<name>Task 1: Add revision_mode section to gsd-planner</name>
|
|
<files>agents/gsd-planner.md</files>
|
|
<action>
|
|
Add new `<revision_mode>` section (~100 lines) after `<gap_closure_mode>` section.
|
|
|
|
```markdown
|
|
<revision_mode>
|
|
|
|
## Planning from Checker Feedback
|
|
|
|
Triggered when orchestrator provides `<revision_context>` with checker issues. You are NOT starting fresh — you are making targeted updates to existing plans.
|
|
|
|
**Mindset:** Surgeon, not architect. Minimal changes to address specific issues.
|
|
|
|
### Step 1: Load Existing Plans
|
|
|
|
Read all PLAN.md files in the phase directory:
|
|
|
|
```bash
|
|
cat .planning/phases/${PHASE}-*/*-PLAN.md
|
|
```
|
|
|
|
Build mental model of:
|
|
- Current plan structure (wave assignments, dependencies)
|
|
- Existing tasks (what's already planned)
|
|
- must_haves (goal-backward criteria)
|
|
|
|
### Step 2: Parse Checker Issues
|
|
|
|
Issues come in structured format:
|
|
|
|
```yaml
|
|
issues:
|
|
- plan: "16-01"
|
|
dimension: "task_completeness"
|
|
severity: "blocker"
|
|
description: "Task 2 missing <verify> element"
|
|
fix_hint: "Add verification command for build output"
|
|
```
|
|
|
|
Group issues by:
|
|
- Plan (which PLAN.md needs updating)
|
|
- Dimension (what type of issue)
|
|
- Severity (blocker vs warning)
|
|
|
|
### Step 3: Determine Revision Strategy
|
|
|
|
**For each issue type:**
|
|
|
|
| Dimension | Revision Strategy |
|
|
|-----------|-------------------|
|
|
| requirement_coverage | Add task(s) to cover missing requirement |
|
|
| task_completeness | Add missing elements to existing task |
|
|
| dependency_correctness | Fix depends_on array, recompute waves |
|
|
| key_links_planned | Add wiring task or update action to include wiring |
|
|
| scope_sanity | Split plan into multiple smaller plans |
|
|
| must_haves_derivation | Derive and add must_haves to frontmatter |
|
|
|
|
### Step 4: Make Targeted Updates
|
|
|
|
**DO:**
|
|
- Edit specific sections that checker flagged
|
|
- Preserve working parts of plans
|
|
- Update wave numbers if dependencies change
|
|
- Keep changes minimal and focused
|
|
|
|
**DO NOT:**
|
|
- Rewrite entire plans for minor issues
|
|
- Change task structure if only missing elements
|
|
- Add unnecessary tasks beyond what checker requested
|
|
- Break existing working plans
|
|
|
|
### Step 5: Validate Changes
|
|
|
|
After making edits, self-check:
|
|
- [ ] All flagged issues addressed
|
|
- [ ] No new issues introduced
|
|
- [ ] Wave numbers still valid
|
|
- [ ] Dependencies still correct
|
|
- [ ] Files on disk updated (use Write tool)
|
|
|
|
### Step 6: Return Revision Summary
|
|
|
|
```markdown
|
|
## REVISION COMPLETE
|
|
|
|
**Issues addressed:** {N}/{M}
|
|
|
|
### Changes Made
|
|
|
|
| Plan | Change | Issue Addressed |
|
|
|------|--------|-----------------|
|
|
| 16-01 | Added <verify> to Task 2 | task_completeness |
|
|
| 16-02 | Added logout task | requirement_coverage (AUTH-02) |
|
|
|
|
### Files Updated
|
|
|
|
- .planning/phases/16-xxx/16-01-PLAN.md
|
|
- .planning/phases/16-xxx/16-02-PLAN.md
|
|
|
|
{If any issues NOT addressed:}
|
|
|
|
### Unaddressed Issues
|
|
|
|
| Issue | Reason |
|
|
|-------|--------|
|
|
| {issue} | {why not addressed - needs user input} |
|
|
```
|
|
|
|
</revision_mode>
|
|
```
|
|
|
|
Place this section after `<gap_closure_mode>` and before `<execution_flow>`.
|
|
</action>
|
|
<verify>grep -c "<revision_mode>" agents/gsd-planner.md (should be 1)</verify>
|
|
<done>revision_mode section added with 6-step revision process</done>
|
|
</task>
|
|
|
|
<task type="auto">
|
|
<name>Task 2: Update role section to mention revision mode</name>
|
|
<files>agents/gsd-planner.md</files>
|
|
<action>
|
|
Update the `<role>` section to mention revision mode. Find the line that says:
|
|
|
|
```markdown
|
|
You are spawned by:
|
|
|
|
- `/gsd:plan-phase` orchestrator (standard phase planning)
|
|
- `/gsd:plan-phase --gaps` orchestrator (gap closure planning from verification failures)
|
|
```
|
|
|
|
And update to:
|
|
|
|
```markdown
|
|
You are spawned by:
|
|
|
|
- `/gsd:plan-phase` orchestrator (standard phase planning)
|
|
- `/gsd:plan-phase --gaps` orchestrator (gap closure planning from verification failures)
|
|
- `/gsd:plan-phase` orchestrator in revision mode (updating plans based on checker feedback)
|
|
```
|
|
|
|
Also update the **Core responsibilities** list to add:
|
|
|
|
```markdown
|
|
- Revise existing plans based on checker feedback (revision mode)
|
|
```
|
|
</action>
|
|
<verify>grep -c "revision mode" agents/gsd-planner.md (at least 2)</verify>
|
|
<done>Role section updated to document revision mode spawning</done>
|
|
</task>
|
|
|
|
<task type="auto">
|
|
<name>Task 3: Add revision return format to structured_returns</name>
|
|
<files>agents/gsd-planner.md</files>
|
|
<action>
|
|
Add REVISION COMPLETE format to `<structured_returns>` section. Find the section and add after "Gap Closure Plans Created":
|
|
|
|
```markdown
|
|
## Revision Complete
|
|
|
|
```markdown
|
|
## REVISION COMPLETE
|
|
|
|
**Issues addressed:** {N}/{M}
|
|
|
|
### Changes Made
|
|
|
|
| Plan | Change | Issue Addressed |
|
|
|------|--------|-----------------|
|
|
| {plan-id} | {what changed} | {dimension: description} |
|
|
|
|
### Files Updated
|
|
|
|
- .planning/phases/{phase_dir}/{plan}-PLAN.md
|
|
|
|
{If any issues NOT addressed:}
|
|
|
|
### Unaddressed Issues
|
|
|
|
| Issue | Reason |
|
|
|-------|--------|
|
|
| {issue} | {why - needs user input, architectural change, etc.} |
|
|
|
|
### Ready for Re-verification
|
|
|
|
Checker can now re-verify updated plans.
|
|
```
|
|
```
|
|
</action>
|
|
<verify>grep -c "REVISION COMPLETE" agents/gsd-planner.md (should be 2 — in revision_mode and structured_returns)</verify>
|
|
<done>REVISION COMPLETE return format added to structured_returns section</done>
|
|
</task>
|
|
|
|
</tasks>
|
|
|
|
<verification>
|
|
- [ ] revision_mode section exists (~100 lines)
|
|
- [ ] 6 steps documented in revision_mode
|
|
- [ ] Role section mentions revision mode
|
|
- [ ] Core responsibilities include revision
|
|
- [ ] structured_returns has REVISION COMPLETE format
|
|
- [ ] File still parses correctly (no broken XML)
|
|
</verification>
|
|
|
|
<success_criteria>
|
|
- gsd-planner has complete revision mode documentation
|
|
- Revision strategy table covers all issue dimensions
|
|
- Return format matches what orchestrator expects
|
|
- Planner can be spawned in standard, gap_closure, or revision mode
|
|
</success_criteria>
|
|
|
|
<output>
|
|
After completion, create `.planning/phases/16-plan-verification-loop/16-03-SUMMARY.md`
|
|
</output>
|