refactor: defer phase directory creation to discuss/plan-phase

Phase directories are now created on-demand when discuss-phase or
plan-phase first touches a phase, rather than upfront by roadmapper.

Prevents duplicate folders when roadmapper names phases differently
than what discuss/plan-phase derives from the roadmap.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson
2026-01-17 00:45:48 -06:00
parent 17f4f54b6f
commit 0c96b30901
3 changed files with 8 additions and 28 deletions

View File

@@ -414,22 +414,11 @@ If gaps found, include in draft for user decision.
**Write files first, then return.** This ensures artifacts persist even if context is lost.
1. **Create phase directories (zero-padded):**
```bash
# Always zero-pad phase numbers: 01, 02, ... 09, 10, 11
for i in 1 2 3; do
PADDED=$(printf "%02d" $i)
mkdir -p ".planning/phases/${PADDED}-{phase-name}"
done
```
1. **Write ROADMAP.md** using output format
Examples: `01-foundation`, `02-core-features`, `10-polish`
2. **Write STATE.md** using output format
2. **Write ROADMAP.md** using output format
3. **Write STATE.md** using output format
4. **Update REQUIREMENTS.md traceability section**
3. **Update REQUIREMENTS.md traceability section**
Files on disk = context preserved. User can review actual files.
@@ -459,9 +448,6 @@ When files are written and returning to orchestrator:
**Files written:**
- .planning/ROADMAP.md
- .planning/STATE.md
- .planning/phases/01-{phase-name}/
- .planning/phases/02-{phase-name}/
- ... (all phases zero-padded)
**Updated:**
- .planning/REQUIREMENTS.md (traceability section)
@@ -602,7 +588,6 @@ Roadmap is complete when:
- [ ] 100% requirement coverage validated (no orphans)
- [ ] ROADMAP.md structure complete
- [ ] STATE.md structure complete
- [ ] Phase directories identified
- [ ] REQUIREMENTS.md traceability update prepared
- [ ] Draft presented for user approval
- [ ] User feedback incorporated (if any)