/kata:complete-milestone
Purpose: Create historical record of shipped version, archive milestone artifacts (roadmap + requirements), and prepare for next milestone.
Output: Milestone archived (roadmap + requirements), PROJECT.md evolved, git tagged.
- @./references/milestone-complete.md (main workflow)
- @./references/milestone-archive-template.md (archive template)
User input:
- Version: {{version}} (e.g., "1.0", "1.1", "2.0")
Follow milestone-complete.md workflow:
Pre-flight: Release artifacts
Before archiving, ensure release artifacts are ready:
## Pre-flight: Release Artifacts
☐ CHANGELOG.md updated with v{{version}} entry
☐ package.json version set to {{version}}
These should be committed BEFORE running this command.
If either is missing, prompt:
⚠ Release artifacts not ready. Please update:
- CHANGELOG.md — add v{{version}} entry
- package.json — set version to {{version}}
Then re-run /kata:complete-milestone
Use AskUserQuestion:
- header: "Release artifacts"
- question: "Have you updated CHANGELOG.md and package.json for v{{version}}?"
- options:
- "Yes, continue" — Proceed with completion
- "No, let me update them" — Exit to update
If "No", exit command.
Check for audit:
- Look for
.planning/v{{version}}-MILESTONE-AUDIT.md
- If missing or stale: recommend
/kata:audit-milestone first
- If audit status is
gaps_found: recommend /kata:plan-milestone-gaps first
- If audit status is
passed: proceed to step 1
## Pre-flight Check
{If no v{{version}}-MILESTONE-AUDIT.md:}
⚠ No milestone audit found. Run `/kata:audit-milestone` first to verify
requirements coverage, cross-phase integration, and E2E flows.
{If audit has gaps:}
⚠ Milestone audit found gaps. Run `/kata:plan-milestone-gaps` to create
phases that close the gaps, or proceed anyway to accept as tech debt.
{If audit passed:}
✓ Milestone audit passed. Proceeding with completion.
Verify readiness:
- Check all phases in milestone have completed plans (SUMMARY.md exists)
- Present milestone scope and stats
- Wait for confirmation
Gather stats:
- Count phases, plans, tasks
- Calculate git range, file changes, LOC
- Extract timeline from git log
- Present summary, confirm
Extract accomplishments:
- Read all phase SUMMARY.md files in milestone range
- Extract 4-6 key accomplishments
- Present for approval
Archive milestone:
- Create
.planning/milestones/v{{version}}-ROADMAP.md
- Extract full phase details from ROADMAP.md
- Fill milestone-archive.md template
- Update ROADMAP.md to one-line summary with link
Archive requirements:
- Create
.planning/milestones/v{{version}}-REQUIREMENTS.md
- Mark all v1 requirements as complete (checkboxes checked)
- Note requirement outcomes (validated, adjusted, dropped)
- Delete
.planning/REQUIREMENTS.md (fresh one created for next milestone)
Update PROJECT.md:
- Add "Current State" section with shipped version
- Add "Next Milestone Goals" section
- Archive previous content in
<details> (if v1.1+)
6.5. Review Documentation (Non-blocking):
Before committing, offer final README review:
Use AskUserQuestion:
- header: "Final README Review"
- question: "Review README.md before completing milestone v{{version}}?"
- options:
- "Yes, I'll review now" — Pause for user review, wait for "continue"
- "Skip for now" — Proceed directly to commit
- "Show README" — Display content, ask if accurate
If "Yes, I'll review now":
Review README.md for the complete v{{version}} milestone.
Ensure all shipped features are documented.
Say "continue" when ready to proceed.
If "Show README":
Display README.md, then use AskUserQuestion:
- header: "README Accuracy"
- question: "Does this look accurate for v{{version}}?"
- options:
- "Yes, looks good" — Proceed to Step 7
- "Needs updates" — Pause for user edits, wait for "continue"
If "Skip" or review complete: Proceed to Step 7.
Non-blocking: milestone completion continues regardless of choice.
Commit and tag:
- Stage: MILESTONES.md, PROJECT.md, ROADMAP.md, STATE.md, archive files
- Commit:
chore: complete v{{version}} milestone
Check PR workflow mode:
PR_WORKFLOW=$(cat .planning/config.json 2>/dev/null | grep -o '"pr_workflow"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "false")
If PR_WORKFLOW=true:
Skip git tag creation. Offer to create PR:
Use AskUserQuestion:
- header: "Create PR"
- question: "Would you like me to create a PR for this milestone?"
- options:
- "Yes, create PR" — Create PR to merge to main
- "No, I'll do it manually" — Show instructions only
If "Yes, create PR":
# Get current branch
CURRENT_BRANCH=$(git branch --show-current)
# Push branch if not already pushed
git push -u origin "$CURRENT_BRANCH" 2>/dev/null || true
# Create PR
gh pr create \
--title "v{{version}}: [Milestone Name]" \
--body "$(cat <<'EOF'
## Summary
Completes milestone v{{version}}.
**Key accomplishments:**
- [accomplishment 1]
- [accomplishment 2]
- [accomplishment 3]
## After Merge
Create GitHub Release with tag `v{{version}}` to trigger npm publish (if configured).
EOF
)"
Display PR URL and next steps:
✓ PR created: [PR URL]
After merge:
→ Create GitHub Release with tag v{{version}}
→ GitHub Actions will publish to npm (if configured)
If "No, I'll do it manually":
Display:
⚡ PR workflow mode — tag will be created via GitHub Release after merge
Next steps:
1. Create PR to merge this branch to main
2. After merge, create GitHub Release with tag v{{version}}
3. GitHub Actions will publish to npm (if configured)
If PR_WORKFLOW=false (default):
Create tag locally:
- Tag:
git tag -a v{{version}} -m "[milestone summary]"
- Ask about pushing tag
Offer next steps:
/kata:new-milestone — start next milestone (questioning → research → requirements → roadmap)
- Milestone archived to
.planning/milestones/v{{version}}-ROADMAP.md
- Requirements archived to
.planning/milestones/v{{version}}-REQUIREMENTS.md
.planning/REQUIREMENTS.md deleted (fresh for next milestone)
- ROADMAP.md collapsed to one-line entry
- PROJECT.md updated with current state
- Git tag v{{version}} created (if pr_workflow=false) OR PR created/instructions given (if pr_workflow=true)
- Commit successful
- User knows next steps (including need for fresh requirements)
- Load workflow first: Read milestone-complete.md before executing
- Verify completion: All phases must have SUMMARY.md files
- User confirmation: Wait for approval at verification gates
- Archive before deleting: Always create archive files before updating/deleting originals
- One-line summary: Collapsed milestone in ROADMAP.md should be single line with link
- Context efficiency: Archive keeps ROADMAP.md and REQUIREMENTS.md constant size per milestone
- Fresh requirements: Next milestone starts with
/kata:new-milestone which includes requirements definition
1---2name: completing-milestones3description: Use this skill when archiving a completed milestone, preparing for the next version, marking a milestone complete, shipping a version, or wrapping up milestone work. Triggers include "complete milestone", "finish milestone", "archive milestone", "ship version", "mark milestone done", and "milestone complete".4---5
6<user_command>/kata:complete-milestone</user_command>
7
8
9<objective>
10Mark milestone {{version}} complete, archive to milestones/, and update ROADMAP.md and REQUIREMENTS.md.
11
12Purpose: Create historical record of shipped version, archive milestone artifacts (roadmap + requirements), and prepare for next milestone.
13Output: Milestone archived (roadmap + requirements), PROJECT.md evolved, git tagged.
14</objective>
15
16<execution_context>
17**Load these files NOW (before proceeding):**
18
19- @./references/milestone-complete.md (main workflow)
20- @./references/milestone-archive-template.md (archive template)
21 </execution_context>
22
23<context>
24**Project files:**
25- `.planning/ROADMAP.md`
26- `.planning/REQUIREMENTS.md`
27- `.planning/STATE.md`
28- `.planning/PROJECT.md`
29
30**User input:**
31
32- Version: {{version}} (e.g., "1.0", "1.1", "2.0")
33 </context>
34
35<process>
36
37**Follow milestone-complete.md workflow:**
38
390. **Pre-flight: Release artifacts**
40
41 Before archiving, ensure release artifacts are ready:
42
43 ```markdown
44 ## Pre-flight: Release Artifacts
45
46 ☐ CHANGELOG.md updated with v{{version}} entry
47 ☐ package.json version set to {{version}}
48
49 These should be committed BEFORE running this command.
50 ```
51
52 If either is missing, prompt:
53 ```
54 ⚠ Release artifacts not ready. Please update:
55 - CHANGELOG.md — add v{{version}} entry
56 - package.json — set version to {{version}}
57
58 Then re-run /kata:complete-milestone
59 ```
60
61 Use AskUserQuestion:
62 - header: "Release artifacts"
63 - question: "Have you updated CHANGELOG.md and package.json for v{{version}}?"
64 - options:
65 - "Yes, continue" — Proceed with completion
66 - "No, let me update them" — Exit to update
67
68 If "No", exit command.
69
701. **Check for audit:**
71
72 - Look for `.planning/v{{version}}-MILESTONE-AUDIT.md`
73 - If missing or stale: recommend `/kata:audit-milestone` first
74 - If audit status is `gaps_found`: recommend `/kata:plan-milestone-gaps` first
75 - If audit status is `passed`: proceed to step 1
76
77 ```markdown
78 ## Pre-flight Check
79
80 {If no v{{version}}-MILESTONE-AUDIT.md:}
81 ⚠ No milestone audit found. Run `/kata:audit-milestone` first to verify
82 requirements coverage, cross-phase integration, and E2E flows.
83
84 {If audit has gaps:}
85 ⚠ Milestone audit found gaps. Run `/kata:plan-milestone-gaps` to create
86 phases that close the gaps, or proceed anyway to accept as tech debt.
87
88 {If audit passed:}
89 ✓ Milestone audit passed. Proceeding with completion.
90 ```
91
921. **Verify readiness:**
93
94 - Check all phases in milestone have completed plans (SUMMARY.md exists)
95 - Present milestone scope and stats
96 - Wait for confirmation
97
982. **Gather stats:**
99
100 - Count phases, plans, tasks
101 - Calculate git range, file changes, LOC
102 - Extract timeline from git log
103 - Present summary, confirm
104
1053. **Extract accomplishments:**
106
107 - Read all phase SUMMARY.md files in milestone range
108 - Extract 4-6 key accomplishments
109 - Present for approval
110
1114. **Archive milestone:**
112
113 - Create `.planning/milestones/v{{version}}-ROADMAP.md`
114 - Extract full phase details from ROADMAP.md
115 - Fill milestone-archive.md template
116 - Update ROADMAP.md to one-line summary with link
117
1185. **Archive requirements:**
119
120 - Create `.planning/milestones/v{{version}}-REQUIREMENTS.md`
121 - Mark all v1 requirements as complete (checkboxes checked)
122 - Note requirement outcomes (validated, adjusted, dropped)
123 - Delete `.planning/REQUIREMENTS.md` (fresh one created for next milestone)
124
1256. **Update PROJECT.md:**
126
127 - Add "Current State" section with shipped version
128 - Add "Next Milestone Goals" section
129 - Archive previous content in `<details>` (if v1.1+)
130
1316.5. **Review Documentation (Non-blocking):**
132
133 Before committing, offer final README review:
134
135 Use AskUserQuestion:
136 - header: "Final README Review"
137 - question: "Review README.md before completing milestone v{{version}}?"
138 - options:
139 - "Yes, I'll review now" — Pause for user review, wait for "continue"
140 - "Skip for now" — Proceed directly to commit
141 - "Show README" — Display content, ask if accurate
142
143 **If "Yes, I'll review now":**
144 ```
145 Review README.md for the complete v{{version}} milestone.
146 Ensure all shipped features are documented.
147 Say "continue" when ready to proceed.
148 ```
149
150 **If "Show README":**
151 Display README.md, then use AskUserQuestion:
152 - header: "README Accuracy"
153 - question: "Does this look accurate for v{{version}}?"
154 - options:
155 - "Yes, looks good" — Proceed to Step 7
156 - "Needs updates" — Pause for user edits, wait for "continue"
157
158 **If "Skip" or review complete:** Proceed to Step 7.
159
160 *Non-blocking: milestone completion continues regardless of choice.*
161
1627. **Commit and tag:**
163
164 - Stage: MILESTONES.md, PROJECT.md, ROADMAP.md, STATE.md, archive files
165 - Commit: `chore: complete v{{version}} milestone`
166
167 **Check PR workflow mode:**
168
169 ```bash
170 PR_WORKFLOW=$(cat .planning/config.json 2>/dev/null | grep -o '"pr_workflow"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "false")
171 ```
172
173 **If `PR_WORKFLOW=true`:**
174
175 Skip git tag creation. Offer to create PR:
176
177 Use AskUserQuestion:
178 - header: "Create PR"
179 - question: "Would you like me to create a PR for this milestone?"
180 - options:
181 - "Yes, create PR" — Create PR to merge to main
182 - "No, I'll do it manually" — Show instructions only
183
184 **If "Yes, create PR":**
185
186 ```bash
187 # Get current branch
188 CURRENT_BRANCH=$(git branch --show-current)
189
190 # Push branch if not already pushed
191 git push -u origin "$CURRENT_BRANCH" 2>/dev/null || true
192
193 # Create PR
194 gh pr create \
195 --title "v{{version}}: [Milestone Name]" \
196 --body "$(cat <<'EOF'
197 ## Summary
198
199 Completes milestone v{{version}}.
200
201 **Key accomplishments:**
202 - [accomplishment 1]
203 - [accomplishment 2]
204 - [accomplishment 3]
205
206 ## After Merge
207
208 Create GitHub Release with tag `v{{version}}` to trigger npm publish (if configured).
209 EOF
210 )"
211 ```
212
213 Display PR URL and next steps:
214 ```
215 ✓ PR created: [PR URL]
216
217 After merge:
218 → Create GitHub Release with tag v{{version}}
219 → GitHub Actions will publish to npm (if configured)
220 ```
221
222 **If "No, I'll do it manually":**
223
224 Display:
225 ```
226 ⚡ PR workflow mode — tag will be created via GitHub Release after merge
227
228 Next steps:
229 1. Create PR to merge this branch to main
230 2. After merge, create GitHub Release with tag v{{version}}
231 3. GitHub Actions will publish to npm (if configured)
232 ```
233
234 **If `PR_WORKFLOW=false` (default):**
235
236 Create tag locally:
237 - Tag: `git tag -a v{{version}} -m "[milestone summary]"`
238 - Ask about pushing tag
239
2408. **Offer next steps:**
241 - `/kata:new-milestone` — start next milestone (questioning → research → requirements → roadmap)
242
243</process>
244
245<success_criteria>
246
247- Milestone archived to `.planning/milestones/v{{version}}-ROADMAP.md`
248- Requirements archived to `.planning/milestones/v{{version}}-REQUIREMENTS.md`
249- `.planning/REQUIREMENTS.md` deleted (fresh for next milestone)
250- ROADMAP.md collapsed to one-line entry
251- PROJECT.md updated with current state
252- Git tag v{{version}} created (if pr_workflow=false) OR PR created/instructions given (if pr_workflow=true)
253- Commit successful
254- User knows next steps (including need for fresh requirements)
255 </success_criteria>
256
257<critical_rules>
258
259- **Load workflow first:** Read milestone-complete.md before executing
260- **Verify completion:** All phases must have SUMMARY.md files
261- **User confirmation:** Wait for approval at verification gates
262- **Archive before deleting:** Always create archive files before updating/deleting originals
263- **One-line summary:** Collapsed milestone in ROADMAP.md should be single line with link
264- **Context efficiency:** Archive keeps ROADMAP.md and REQUIREMENTS.md constant size per milestone
265- **Fresh requirements:** Next milestone starts with `/kata:new-milestone` which includes requirements definition
266 </critical_rules>