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:
@@ -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
|
||||
|
||||
|
||||
@@ -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:}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -81,10 +81,11 @@ grep -A5 "Phase ${PHASE}:" .planning/ROADMAP.md 2>/dev/null
|
||||
```bash
|
||||
PHASE_DIR=$(ls -d .planning/phases/${PHASE}-* 2>/dev/null | head -1)
|
||||
if [ -z "$PHASE_DIR" ]; then
|
||||
# Create phase directory from roadmap name
|
||||
# Create phase directory from roadmap name with zero-padded phase number
|
||||
PHASE_NAME=$(grep "Phase ${PHASE}:" .planning/ROADMAP.md | sed 's/.*Phase [0-9]*: //' | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
|
||||
mkdir -p ".planning/phases/${PHASE}-${PHASE_NAME}"
|
||||
PHASE_DIR=".planning/phases/${PHASE}-${PHASE_NAME}"
|
||||
PADDED_PHASE=$(printf "%02d" ${PHASE})
|
||||
mkdir -p ".planning/phases/${PADDED_PHASE}-${PHASE_NAME}"
|
||||
PHASE_DIR=".planning/phases/${PADDED_PHASE}-${PHASE_NAME}"
|
||||
fi
|
||||
```
|
||||
|
||||
|
||||
@@ -229,7 +229,9 @@ Track deferred ideas internally.
|
||||
<step name="write_context">
|
||||
Create CONTEXT.md capturing decisions made.
|
||||
|
||||
**File location:** `.planning/phases/${PHASE}-${SLUG}/${PHASE}-CONTEXT.md`
|
||||
**File location:** `.planning/phases/${PADDED_PHASE}-${SLUG}/${PADDED_PHASE}-CONTEXT.md`
|
||||
|
||||
Zero-pad the phase number: `PADDED_PHASE=$(printf "%02d" ${PHASE})`
|
||||
|
||||
Create phase directory if it doesn't exist. Use roadmap phase name for slug (lowercase, hyphens).
|
||||
|
||||
@@ -294,7 +296,7 @@ Write file.
|
||||
Present summary and next steps:
|
||||
|
||||
```
|
||||
Created: .planning/phases/${PHASE}-${SLUG}/${PHASE}-CONTEXT.md
|
||||
Created: .planning/phases/${PADDED_PHASE}-${SLUG}/${PADDED_PHASE}-CONTEXT.md
|
||||
|
||||
## Decisions Captured
|
||||
|
||||
|
||||
Reference in New Issue
Block a user