fix(audit): version MILESTONE-AUDIT.md and archive on completion
- audit-milestone: create v{version}-MILESTONE-AUDIT.md (versioned)
- complete-milestone: move audit file to milestones/ archive
- plan-milestone-gaps: find versioned audit file
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -100,9 +100,9 @@ For each requirement in REQUIREMENTS.md mapped to this milestone:
|
||||
- Check phase verification status
|
||||
- Determine: satisfied | partial | unsatisfied
|
||||
|
||||
## 6. Aggregate into MILESTONE-AUDIT.md
|
||||
## 6. Aggregate into v{version}-MILESTONE-AUDIT.md
|
||||
|
||||
Create `.planning/MILESTONE-AUDIT.md` with:
|
||||
Create `.planning/v{version}-v{version}-MILESTONE-AUDIT.md` with:
|
||||
|
||||
```yaml
|
||||
---
|
||||
@@ -149,7 +149,7 @@ Route by status (see `<offer_next>`).
|
||||
## ✓ Milestone {version} — Audit Passed
|
||||
|
||||
**Score:** {N}/{M} requirements satisfied
|
||||
**Report:** .planning/MILESTONE-AUDIT.md
|
||||
**Report:** .planning/v{version}-MILESTONE-AUDIT.md
|
||||
|
||||
All requirements covered. Cross-phase integration verified. E2E flows complete.
|
||||
|
||||
@@ -172,7 +172,7 @@ All requirements covered. Cross-phase integration verified. E2E flows complete.
|
||||
## ⚠ Milestone {version} — Gaps Found
|
||||
|
||||
**Score:** {N}/{M} requirements satisfied
|
||||
**Report:** .planning/MILESTONE-AUDIT.md
|
||||
**Report:** .planning/v{version}-MILESTONE-AUDIT.md
|
||||
|
||||
### Unsatisfied Requirements
|
||||
|
||||
@@ -203,7 +203,7 @@ All requirements covered. Cross-phase integration verified. E2E flows complete.
|
||||
---
|
||||
|
||||
**Also available:**
|
||||
- `cat .planning/MILESTONE-AUDIT.md` — see full report
|
||||
- `cat .planning/v{version}-MILESTONE-AUDIT.md` — see full report
|
||||
- `/gsd:complete-milestone {version}` — proceed anyway (accept tech debt)
|
||||
```
|
||||
|
||||
@@ -215,7 +215,7 @@ All requirements covered. Cross-phase integration verified. E2E flows complete.
|
||||
## ⚡ Milestone {version} — Tech Debt Review
|
||||
|
||||
**Score:** {N}/{M} requirements satisfied
|
||||
**Report:** .planning/MILESTONE-AUDIT.md
|
||||
**Report:** .planning/v{version}-MILESTONE-AUDIT.md
|
||||
|
||||
All requirements met. No critical blockers. Accumulated tech debt needs review.
|
||||
|
||||
@@ -249,6 +249,6 @@ All requirements met. No critical blockers. Accumulated tech debt needs review.
|
||||
- [ ] All phase VERIFICATION.md files read
|
||||
- [ ] Tech debt and deferred gaps aggregated
|
||||
- [ ] Integration checker spawned for cross-phase wiring
|
||||
- [ ] MILESTONE-AUDIT.md created
|
||||
- [ ] v{version}-MILESTONE-AUDIT.md created
|
||||
- [ ] Results presented with actionable next steps
|
||||
</success_criteria>
|
||||
|
||||
@@ -41,7 +41,7 @@ Output: Milestone archived (roadmap + requirements), PROJECT.md evolved, git tag
|
||||
|
||||
0. **Check for audit:**
|
||||
|
||||
- Look for `.planning/MILESTONE-AUDIT.md`
|
||||
- Look for `.planning/v{{version}}-MILESTONE-AUDIT.md`
|
||||
- If missing or stale: recommend `/gsd:audit-milestone` first
|
||||
- If audit status is `gaps_found`: recommend `/gsd:plan-milestone-gaps` first
|
||||
- If audit status is `passed`: proceed to step 1
|
||||
@@ -49,7 +49,7 @@ Output: Milestone archived (roadmap + requirements), PROJECT.md evolved, git tag
|
||||
```markdown
|
||||
## Pre-flight Check
|
||||
|
||||
{If no MILESTONE-AUDIT.md:}
|
||||
{If no v{{version}}-MILESTONE-AUDIT.md:}
|
||||
⚠ No milestone audit found. Run `/gsd:audit-milestone` first to verify
|
||||
requirements coverage, cross-phase integration, and E2E flows.
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ One command creates all fix phases — no manual `/gsd:add-phase` per gap.
|
||||
|
||||
<context>
|
||||
**Audit results:**
|
||||
@.planning/MILESTONE-AUDIT.md
|
||||
Glob: .planning/v*-MILESTONE-AUDIT.md (use most recent)
|
||||
|
||||
**Original intent (for prioritization):**
|
||||
@.planning/PROJECT.md
|
||||
@@ -41,7 +41,8 @@ One command creates all fix phases — no manual `/gsd:add-phase` per gap.
|
||||
## 1. Load Audit Results
|
||||
|
||||
```bash
|
||||
cat .planning/MILESTONE-AUDIT.md
|
||||
# Find the most recent audit file
|
||||
ls -t .planning/v*-MILESTONE-AUDIT.md 2>/dev/null | head -1
|
||||
```
|
||||
|
||||
Parse YAML frontmatter to extract structured gaps:
|
||||
@@ -49,7 +50,7 @@ Parse YAML frontmatter to extract structured gaps:
|
||||
- `gaps.integration` — missing cross-phase connections
|
||||
- `gaps.flows` — broken E2E flows
|
||||
|
||||
If MILESTONE-AUDIT.md doesn't exist or has no gaps, error:
|
||||
If no audit file exists or has no gaps, error:
|
||||
```
|
||||
No audit gaps found. Run `/gsd:audit-milestone` first.
|
||||
```
|
||||
|
||||
@@ -532,6 +532,24 @@ Archive requirements and prepare for fresh requirements in next milestone.
|
||||
|
||||
</step>
|
||||
|
||||
<step name="archive_audit">
|
||||
|
||||
Move the milestone audit file to the archive (if it exists):
|
||||
|
||||
```bash
|
||||
# Move audit to milestones folder (if exists)
|
||||
[ -f .planning/v[X.Y]-MILESTONE-AUDIT.md ] && mv .planning/v[X.Y]-MILESTONE-AUDIT.md .planning/milestones/
|
||||
```
|
||||
|
||||
Confirm:
|
||||
```
|
||||
✅ Audit archived to milestones/v[X.Y]-MILESTONE-AUDIT.md
|
||||
```
|
||||
|
||||
(Skip silently if no audit file exists — audit is optional)
|
||||
|
||||
</step>
|
||||
|
||||
<step name="update_state">
|
||||
|
||||
Update STATE.md to reflect milestone completion.
|
||||
@@ -606,6 +624,7 @@ Commit milestone completion including archive files and deletions.
|
||||
# Stage archive files (new)
|
||||
git add .planning/milestones/v[X.Y]-ROADMAP.md
|
||||
git add .planning/milestones/v[X.Y]-REQUIREMENTS.md
|
||||
git add .planning/milestones/v[X.Y]-MILESTONE-AUDIT.md 2>/dev/null || true
|
||||
|
||||
# Stage updated files
|
||||
git add .planning/MILESTONES.md
|
||||
@@ -622,6 +641,7 @@ chore: complete v[X.Y] milestone
|
||||
Archived:
|
||||
- milestones/v[X.Y]-ROADMAP.md
|
||||
- milestones/v[X.Y]-REQUIREMENTS.md
|
||||
- milestones/v[X.Y]-MILESTONE-AUDIT.md (if audit was run)
|
||||
|
||||
Deleted (fresh for next milestone):
|
||||
- ROADMAP.md
|
||||
|
||||
Reference in New Issue
Block a user