refactor: move requirements status update to commands (orchestrator)

Subagents can't determine if phase is complete. The orchestrator
(execute-plan and execute-phase commands) runs in main context,
can count plans vs summaries, and updates REQUIREMENTS.md when
phase completes.

- execute-plan: Step 2.5 updates requirements when summaries = plans
- execute-phase: Step 6 updates requirements (phase always complete)
- Removed duplicate from workflow (subagent can't run it anyway)
This commit is contained in:
Lex Christopherson
2026-01-15 00:20:00 -06:00
parent e1b6655d57
commit 365c04163c
3 changed files with 28 additions and 49 deletions

View File

@@ -64,7 +64,16 @@ Phase: $ARGUMENTS
- Report phase completion status
- Update ROADMAP.md
6. **Offer next steps**
6. **Update requirements**
Phase is complete, so mark its requirements as Complete:
- Read ROADMAP.md, find this phase's `Requirements:` line (e.g., "AUTH-01, AUTH-02")
- Read REQUIREMENTS.md traceability table
- For each REQ-ID in this phase: change Status from "Pending" to "Complete"
- Write updated REQUIREMENTS.md
- Stage for commit: `git add .planning/REQUIREMENTS.md`
- Skip if: REQUIREMENTS.md doesn't exist, or phase has no Requirements line
7. **Offer next steps**
- Route to next action (see `<offer_next>`)
</process>
@@ -207,5 +216,6 @@ After all tasks complete:
- [ ] Each plan has SUMMARY.md
- [ ] STATE.md reflects phase completion
- [ ] ROADMAP.md updated
- [ ] REQUIREMENTS.md updated (phase requirements marked Complete)
- [ ] User informed of next steps
</success_criteria>

View File

@@ -108,7 +108,20 @@ ls -1 .planning/phases/[phase-dir]/*-SUMMARY.md 2>/dev/null | wc -l
| Condition | Action |
|-----------|--------|
| summaries < plans | More plans remain → Route A |
| summaries = plans | Phase complete → Check milestone (Step 3) |
| summaries = plans | Phase complete → Update requirements, then Step 3 |
**Step 2.5: Update requirements (only when phase complete)**
When summaries = plans, update REQUIREMENTS.md before presenting completion:
1. Get phase number from completed plan path
2. Read ROADMAP.md, find the phase's `Requirements:` line (e.g., "AUTH-01, AUTH-02")
3. Read REQUIREMENTS.md traceability table
4. For each REQ-ID in this phase: change Status from "Pending" to "Complete"
5. Write updated REQUIREMENTS.md
6. Stage for commit: `git add .planning/REQUIREMENTS.md`
**Skip if:** REQUIREMENTS.md doesn't exist, or phase has no Requirements line in ROADMAP.md.
---
@@ -322,5 +335,6 @@ Templates for checkpoint handling:
<success_criteria>
- [ ] Plan executed (SUMMARY.md created)
- [ ] All checkpoints handled
- [ ] If phase complete: REQUIREMENTS.md updated (phase requirements marked Complete)
- [ ] User informed of completion and next steps
</success_criteria>