fix: consistent zero-padding and file naming across agents

- plan-phase.md: zero-pad phase number in mkdir
- roadmapper: explicit zero-padding instruction with printf
- discuss-phase workflow: use PADDED_PHASE in file paths
- planner: fix {plan}-PLAN.md -> {phase}-{plan}-PLAN.md
- researcher: fix double-path bug in git add command
- researcher: add CONTEXT.md loading from discuss-phase

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson
2026-01-16 13:17:26 -06:00
parent d1df08cfbc
commit 339e0613d8
5 changed files with 25 additions and 16 deletions

View File

@@ -515,12 +515,14 @@ Run through verification protocol checklist:
Use the output format template. Populate all sections with verified findings.
Write to: `.planning/phases/{phase_dir}/{phase}-RESEARCH.md`
Write to: `${PHASE_DIR}/${PHASE}-RESEARCH.md`
Where `PHASE_DIR` is the full path (e.g., `.planning/phases/01-foundation`)
## Step 6: Commit Research
```bash
git add .planning/phases/${PHASE_DIR}/${PHASE}-RESEARCH.md
git add "${PHASE_DIR}/${PHASE}-RESEARCH.md"
git commit -m "docs(${PHASE}): research phase domain
Phase ${PHASE}: ${PHASE_NAME}
@@ -553,7 +555,7 @@ When research finishes successfully:
### File Created
`.planning/phases/{phase_dir}/{phase}-RESEARCH.md`
`${PHASE_DIR}/${PHASE}-RESEARCH.md`
### Confidence Assessment

View File

@@ -1291,7 +1291,7 @@ Execute: `/gsd:execute-phase {phase}`
### Files Updated
- .planning/phases/{phase_dir}/{plan}-PLAN.md
- .planning/phases/{phase_dir}/{phase}-{plan}-PLAN.md
{If any issues NOT addressed:}

View File

@@ -505,13 +505,17 @@ 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:**
1. **Create phase directories (zero-padded):**
```bash
mkdir -p .planning/phases/01-{name}
mkdir -p .planning/phases/02-{name}
# etc.
# 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
```
Examples: `01-foundation`, `02-core-features`, `10-polish`
2. **Write ROADMAP.md** using output format
3. **Write STATE.md** using output format
@@ -546,9 +550,9 @@ When files are written and returning to orchestrator:
**Files written:**
- .planning/ROADMAP.md
- .planning/STATE.md
- .planning/phases/01-{name}/
- .planning/phases/02-{name}/
...
- .planning/phases/01-{phase-name}/
- .planning/phases/02-{phase-name}/
- ... (all phases zero-padded)
**Updated:**
- .planning/REQUIREMENTS.md (traceability section)