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:
@@ -15,15 +15,7 @@ Read config.json for planning behavior settings.
|
||||
Load execution context (uses `init execute-phase` for full context, including file contents):
|
||||
|
||||
```bash
|
||||
INIT_RAW=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init execute-phase "${PHASE}" --include state,config)
|
||||
# Large payloads are written to a tmpfile — output starts with @file:/path
|
||||
if [[ "$INIT_RAW" == @file:* ]]; then
|
||||
INIT_FILE="${INIT_RAW#@file:}"
|
||||
INIT=$(cat "$INIT_FILE")
|
||||
rm -f "$INIT_FILE"
|
||||
else
|
||||
INIT="$INIT_RAW"
|
||||
fi
|
||||
INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init execute-phase "${PHASE}" --include state,config)
|
||||
```
|
||||
|
||||
Extract from init JSON: `executor_model`, `commit_docs`, `phase_dir`, `phase_number`, `plans`, `summaries`, `incomplete_plans`.
|
||||
@@ -136,7 +128,8 @@ This IS the execution instructions. Follow exactly. If plan references CONTEXT.m
|
||||
|
||||
<step name="previous_phase_check">
|
||||
```bash
|
||||
ls .planning/phases/*/SUMMARY.md 2>/dev/null | sort -r | head -2 | tail -1
|
||||
node ~/.claude/get-shit-done/bin/gsd-tools.cjs phases list --type summaries --raw
|
||||
# Extract the second-to-last summary from the JSON result
|
||||
```
|
||||
If previous SUMMARY has unresolved "Issues Encountered" or "Next Phase Readiness" blockers: AskUserQuestion(header="Previous Issues", options: "Proceed anyway" | "Address first" | "Review previous").
|
||||
</step>
|
||||
|
||||
Reference in New Issue
Block a user