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>
7.3 KiB
7.3 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous, must_haves
| phase | plan | type | wave | depends_on | files_modified | autonomous | must_haves | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 16-plan-verification-loop | 03 | execute | 2 |
|
|
true |
|
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
<execution_context>
@/.claude/get-shit-done/workflows/execute-plan.md
@/.claude/get-shit-done/templates/summary.md
</execution_context>
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
Task 1: Add revision_mode section to gsd-planner agents/gsd-planner.md Add new `` section (~100 lines) after `` section.<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:
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
## 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:
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:
- Revise existing plans based on checker feedback (revision mode)
## 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>