feat(phases): archive completed milestone phase directories (closes #489)

Add optional phase archival to milestone completion and a standalone
/gsd:cleanup command for retroactive use. Phase dirs move to
.planning/milestones/v{X.Y}-phases/, reducing phases/ clutter after
multiple milestones.

Core changes:
- getArchivedPhaseDirs() and searchPhaseInDir() helpers in gsd-tools
- findPhaseInternal() searches archives when phase not found in current
- cmdPhasesList() accepts --include-archived flag
- cmdHistoryDigest() scans both current and archived phases
- cmdMilestoneComplete() accepts --archive-phases flag
- Workflow globs replaced with find-phase/phases-list CLI calls

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson
2026-02-15 11:45:16 -06:00
parent 8d977328e4
commit 41cb7455f5
8 changed files with 346 additions and 34 deletions

View File

@@ -241,7 +241,8 @@ fi
**2. Find parent UAT file:**
```bash
find .planning/phases -path "*${PARENT_PHASE}*/*-UAT.md" -type f 2>/dev/null
PARENT_INFO=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs find-phase "${PARENT_PHASE}" --raw)
# Extract directory from PARENT_INFO JSON, then find UAT file in that directory
```
**If no parent UAT found:** Skip this step (gap-closure may have been triggered by VERIFICATION.md instead).