refactor(milestone): rework milestone cycle for proper requirements flow
- complete-milestone: archive + delete ROADMAP.md and REQUIREMENTS.md - new-milestone: brownfield new-project (updates PROJECT.md, routes to requirements) - discuss-milestone: now required before new-milestone (creates context file) - research-project: milestone-aware (focuses on new features, not validated ones) - create-roadmap: continues phase numbering from previous milestone Flow: complete → discuss → new-milestone → research → requirements → roadmap Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
<purpose>
|
||||
Create a new milestone for an existing project. Defines phases, updates roadmap, and resets state tracking for the new milestone.
|
||||
Start a new milestone cycle by updating PROJECT.md with new goals.
|
||||
|
||||
This is used after completing a milestone when ready to define the next chunk of work.
|
||||
This is the brownfield equivalent of new-project. The project exists and has history.
|
||||
This workflow gathers "what's next" and updates PROJECT.md, then routes to the
|
||||
requirements → roadmap cycle.
|
||||
</purpose>
|
||||
|
||||
<required_reading>
|
||||
**Read these files NOW:**
|
||||
|
||||
1. ~/.claude/get-shit-done/templates/roadmap.md (milestone-grouped format)
|
||||
2. `.planning/ROADMAP.md`
|
||||
3. `.planning/STATE.md`
|
||||
1. ~/.claude/get-shit-done/references/questioning.md
|
||||
2. ~/.claude/get-shit-done/templates/project.md
|
||||
3. `.planning/PROJECT.md`
|
||||
4. `.planning/MILESTONES.md` (if exists)
|
||||
</required_reading>
|
||||
5. `.planning/STATE.md`
|
||||
</required_reading>
|
||||
|
||||
<process>
|
||||
|
||||
@@ -19,363 +22,170 @@ This is used after completing a milestone when ready to define the next chunk of
|
||||
Load project context:
|
||||
|
||||
```bash
|
||||
cat .planning/ROADMAP.md
|
||||
cat .planning/STATE.md
|
||||
cat .planning/PROJECT.md
|
||||
cat .planning/MILESTONES.md 2>/dev/null || echo "No milestones file yet"
|
||||
cat .planning/STATE.md
|
||||
cat .planning/MILESTONE-CONTEXT.md 2>/dev/null || echo "No milestone context file"
|
||||
cat .planning/config.json 2>/dev/null
|
||||
```
|
||||
|
||||
Extract:
|
||||
|
||||
- Previous milestone version (e.g., v1.0)
|
||||
- Last phase number used
|
||||
- Pending todos from STATE.md
|
||||
- Project context from PROJECT.md (What This Is, Core Value)
|
||||
|
||||
**Check for milestone context from discuss-milestone:**
|
||||
|
||||
If `.planning/MILESTONE-CONTEXT.md` exists:
|
||||
- This contains context from `/gsd:discuss-milestone`
|
||||
- Extract: features, suggested name, phase mapping, constraints
|
||||
- Use this to pre-populate milestone details (skip prompting for info already gathered)
|
||||
- What shipped previously (from MILESTONES.md)
|
||||
- Current Validated requirements (from PROJECT.md)
|
||||
- Pending todos and blockers (from STATE.md)
|
||||
- Any context from discuss-milestone (MILESTONE-CONTEXT.md)
|
||||
|
||||
**Calculate next milestone version:**
|
||||
- Parse last version from MILESTONES.md
|
||||
- If v1.0 → suggest v1.1 (minor) or v2.0 (major)
|
||||
- If v1.3 → suggest v1.4 or v2.0
|
||||
</step>
|
||||
|
||||
- If previous was v1.0 → suggest v1.1 (minor) or v2.0 (major)
|
||||
- If previous was v1.3 → suggest v1.4 or v2.0
|
||||
- Parse from ROADMAP.md "Completed Milestones" section
|
||||
</step>
|
||||
|
||||
<step name="get_milestone_info">
|
||||
<step name="gather_goals">
|
||||
**If MILESTONE-CONTEXT.md exists (from /gsd:discuss-milestone):**
|
||||
Use the features, scope, and constraints from the context file.
|
||||
Use the suggested milestone name from `<scope>` section.
|
||||
Use the phase mapping from `<phase_mapping>` section.
|
||||
- Use features and scope already gathered
|
||||
- Present summary for confirmation
|
||||
- Skip to confirm_goals step
|
||||
|
||||
**If called directly (no MILESTONE-CONTEXT.md):**
|
||||
Ask for milestone details:
|
||||
**If no context file:**
|
||||
|
||||
header: "Milestone Name"
|
||||
question: "What should we call this milestone?"
|
||||
options:
|
||||
Present what shipped:
|
||||
```
|
||||
Last milestone: v[X.Y] [Name]
|
||||
Key accomplishments:
|
||||
- [From MILESTONES.md]
|
||||
|
||||
- "v[X.Y] Features" - Adding new functionality
|
||||
- "v[X.Y] Improvements" - Enhancing existing features
|
||||
- "v[X.Y] Fixes" - Bug fixes and stability
|
||||
- "v[X.Y] Refactor" - Code quality and architecture
|
||||
- "v[X.Y+1].0 [Major]" - Major version bump
|
||||
- "Other" - Custom name
|
||||
Validated so far:
|
||||
- [From PROJECT.md Validated section]
|
||||
|
||||
Get milestone name in format: "v[X.Y] [Name]"
|
||||
Pending todos:
|
||||
- [From STATE.md if any]
|
||||
```
|
||||
|
||||
Ask (freeform, not AskUserQuestion):
|
||||
"What do you want to build in the next milestone?"
|
||||
|
||||
Wait for response. Then use AskUserQuestion to explore:
|
||||
- Probe specific features mentioned
|
||||
- Ask about priorities
|
||||
- Surface constraints or dependencies
|
||||
- Clarify scope boundaries
|
||||
|
||||
Continue until you have clear milestone goals.
|
||||
</step>
|
||||
|
||||
<step name="identify_phases">
|
||||
**Calculate starting phase number:**
|
||||
|
||||
```bash
|
||||
# Find highest phase number from roadmap
|
||||
grep -E "^### Phase [0-9]+" .planning/ROADMAP.md | tail -1
|
||||
# Extract number, add 1
|
||||
```
|
||||
|
||||
Next phase starts at: [last_phase + 1]
|
||||
|
||||
**Check depth setting and gather phases accordingly:**
|
||||
|
||||
```bash
|
||||
cat .planning/config.json 2>/dev/null | grep depth
|
||||
```
|
||||
|
||||
| Depth | Phases/Milestone |
|
||||
|-------|------------------|
|
||||
| Quick | 3-5 |
|
||||
| Standard | 5-8 |
|
||||
| Comprehensive | 8-12 |
|
||||
|
||||
If context from discuss-milestone provided, use that scope.
|
||||
|
||||
Otherwise, ask:
|
||||
|
||||
```
|
||||
What phases should this milestone include?
|
||||
|
||||
Starting at Phase [N]:
|
||||
- Phase [N]: [name] - [one-line goal]
|
||||
- Phase [N+1]: [name] - [one-line goal]
|
||||
...
|
||||
|
||||
Describe the phases, or say "help me break this down" for guidance.
|
||||
```
|
||||
|
||||
For each phase, capture:
|
||||
|
||||
- Phase number (continuing sequence)
|
||||
- Phase name (kebab-case for directory)
|
||||
- One-line goal
|
||||
- Research flag (Likely/Unlikely based on triggers)
|
||||
</step>
|
||||
|
||||
<step name="detect_research_needs">
|
||||
**For each phase, determine if research is likely needed.**
|
||||
|
||||
Apply research triggers from create-roadmap.md:
|
||||
|
||||
<research_triggers>
|
||||
**Likely (flag the phase):**
|
||||
|
||||
| Trigger Pattern | Why Research Needed |
|
||||
| ----------------------------------------------------- | --------------------------------------- |
|
||||
| "integrate [service]", "connect to [API]" | External API - need current docs |
|
||||
| "authentication", "auth", "login", "JWT" | Architectural decision + library choice |
|
||||
| "payment", "billing", "Stripe", "subscription" | External API + compliance patterns |
|
||||
| "email", "SMS", "notifications", "SendGrid", "Twilio" | External service integration |
|
||||
| "database", "Postgres", "MongoDB", "Supabase" | If new to project - setup patterns |
|
||||
| "real-time", "websocket", "sync", "live updates" | Architectural decision |
|
||||
| "deploy", "Vercel", "Railway", "hosting" | If first deployment - config patterns |
|
||||
| "choose between", "select", "evaluate", "which" | Explicit decision needed |
|
||||
| "AI", "OpenAI", "Claude", "LLM", "embeddings" | Fast-moving APIs - need current docs |
|
||||
| Any technology not already in codebase | New integration |
|
||||
|
||||
**Unlikely (no flag needed):**
|
||||
|
||||
| Pattern | Why No Research |
|
||||
| ------------------------------------------- | ----------------------- |
|
||||
| "add button", "create form", "update UI" | Internal patterns |
|
||||
| "CRUD operations", "list/detail views" | Standard patterns |
|
||||
| "refactor", "reorganize", "clean up" | Internal work |
|
||||
| "following existing patterns" | Conventions established |
|
||||
| Technology already in package.json/codebase | Patterns exist |
|
||||
|
||||
</research_triggers>
|
||||
|
||||
Present research assessment:
|
||||
|
||||
```
|
||||
Research needs detected:
|
||||
|
||||
Phase [N]: [Name]
|
||||
Research: Unlikely (internal patterns)
|
||||
|
||||
Phase [N+1]: [Name]
|
||||
Research: Likely (new API integration)
|
||||
Topics: [What to investigate]
|
||||
|
||||
Does this look right? (yes / adjust)
|
||||
```
|
||||
|
||||
</step>
|
||||
|
||||
<step name="confirm_phases">
|
||||
<config-check>
|
||||
```bash
|
||||
cat .planning/config.json 2>/dev/null
|
||||
```
|
||||
</config-check>
|
||||
|
||||
<if mode="yolo">
|
||||
```
|
||||
⚡ Auto-approved: Milestone phases ([N] phases)
|
||||
|
||||
1. Phase [X]: [Name] - [goal]
|
||||
2. Phase [X+1]: [Name] - [goal]
|
||||
...
|
||||
|
||||
Proceeding to create milestone structure...
|
||||
```
|
||||
|
||||
Proceed directly to update_roadmap step.
|
||||
</if>
|
||||
|
||||
<if mode="interactive" OR="missing OR custom with gates.confirm_phases true">
|
||||
Present the phase breakdown:
|
||||
<step name="confirm_goals">
|
||||
Present gathered goals:
|
||||
|
||||
```
|
||||
Milestone: v[X.Y] [Name]
|
||||
|
||||
Phases:
|
||||
1. Phase [X]: [Name] - [goal]
|
||||
2. Phase [X+1]: [Name] - [goal]
|
||||
3. Phase [X+2]: [Name] - [goal]
|
||||
Goal: [One sentence focus]
|
||||
|
||||
Does this feel right? (yes / adjust)
|
||||
Target features:
|
||||
- [Feature 1]
|
||||
- [Feature 2]
|
||||
- [Feature 3]
|
||||
|
||||
Ready to update PROJECT.md? (yes / adjust)
|
||||
```
|
||||
|
||||
If "adjust": Ask what to change, revise, present again.
|
||||
If "adjust": return to gather_goals.
|
||||
</step>
|
||||
|
||||
<step name="update_roadmap">
|
||||
Write new milestone details to `.planning/ROADMAP.md`.
|
||||
<step name="update_project">
|
||||
Update `.planning/PROJECT.md`:
|
||||
|
||||
**File to update:** `.planning/ROADMAP.md`
|
||||
|
||||
The main ROADMAP.md file holds full phase details for the active milestone. Archive files in `milestones/` are created only when a milestone ships (via `/gsd:complete-milestone`).
|
||||
|
||||
**Process:**
|
||||
|
||||
**1. Update Milestones section:**
|
||||
|
||||
Add the new milestone to the milestones list. Completed milestones show as links to their archive files, new milestone shows as in-progress.
|
||||
**Add Current Milestone section** (after Core Value, before Requirements):
|
||||
|
||||
```markdown
|
||||
## Milestones
|
||||
## Current Milestone: v[X.Y] [Name]
|
||||
|
||||
- ✅ **v1.0 [Previous]** - [link to milestones/v1.0-ROADMAP.md] (Phases 1-9, shipped YYYY-MM-DD)
|
||||
- 🚧 **v[X.Y] [Name]** - Phases [N]-[M] (in progress)
|
||||
**Goal:** [One sentence describing milestone focus]
|
||||
|
||||
**Target features:**
|
||||
- [Feature 1]
|
||||
- [Feature 2]
|
||||
- [Feature 3]
|
||||
```
|
||||
|
||||
**2. Add full phase details:**
|
||||
|
||||
Write complete phase sections for all phases in this milestone. Each phase gets full details including goal, dependencies, research assessment, and plan placeholders.
|
||||
**Update Active requirements:**
|
||||
- Add new milestone goals to Active section
|
||||
- Keep existing Active items that weren't addressed
|
||||
- Don't remove anything from Validated
|
||||
|
||||
**Update footer:**
|
||||
```markdown
|
||||
### 🚧 v[X.Y] [Name] (In Progress)
|
||||
|
||||
**Milestone Goal:** [One sentence describing what this milestone delivers]
|
||||
|
||||
#### Phase [N]: [Name]
|
||||
|
||||
**Goal**: [What this phase delivers]
|
||||
**Depends on**: Phase [N-1] (or "Previous milestone complete")
|
||||
**Research**: [Likely/Unlikely] ([reason])
|
||||
**Research topics**: [If Likely, what to investigate]
|
||||
**Plans**: TBD
|
||||
|
||||
Plans:
|
||||
- [ ] [N]-01: TBD (run /gsd:plan-phase [N] to break down)
|
||||
|
||||
#### Phase [N+1]: [Name]
|
||||
|
||||
**Goal**: [What this phase delivers]
|
||||
**Depends on**: Phase [N]
|
||||
**Research**: [Likely/Unlikely] ([reason])
|
||||
**Plans**: TBD
|
||||
|
||||
Plans:
|
||||
- [ ] [N+1]-01: TBD
|
||||
|
||||
[... continue for all phases in this milestone ...]
|
||||
---
|
||||
*Last updated: [date] after v[X.Y] milestone start*
|
||||
```
|
||||
|
||||
**3. Update Progress table:**
|
||||
|
||||
Add rows for all new phases with milestone attribution.
|
||||
|
||||
```markdown
|
||||
| Phase | Milestone | Plans | Status | Completed |
|
||||
| ------------- | --------- | ----- | ----------- | --------- |
|
||||
| [N]. [Name] | v[X.Y] | 0/? | Not started | - |
|
||||
| [N+1]. [Name] | v[X.Y] | 0/? | Not started | - |
|
||||
```
|
||||
|
||||
</step>
|
||||
|
||||
<step name="create_phase_directories">
|
||||
Create directories for new phases:
|
||||
|
||||
```bash
|
||||
mkdir -p .planning/phases/[NN]-[slug]
|
||||
mkdir -p .planning/phases/[NN+1]-[slug]
|
||||
# ... for each phase
|
||||
```
|
||||
|
||||
Use two-digit padding: `10-name`, `11-name`, etc.
|
||||
</step>
|
||||
|
||||
<step name="update_state">
|
||||
Update `.planning/STATE.md` for new milestone:
|
||||
|
||||
**Update Current Position:**
|
||||
Update `.planning/STATE.md`:
|
||||
|
||||
```markdown
|
||||
## Current Position
|
||||
|
||||
Phase: [N] of [M] ([First phase name])
|
||||
Plan: Not started
|
||||
Status: Ready to plan
|
||||
Last activity: [today's date] - Milestone v[X.Y] created
|
||||
Phase: Not started (run /gsd:create-roadmap)
|
||||
Plan: —
|
||||
Status: Defining requirements
|
||||
Last activity: [today] — Milestone v[X.Y] started
|
||||
|
||||
Progress: ░░░░░░░░░░ 0%
|
||||
```
|
||||
|
||||
**Update Accumulated Context:**
|
||||
|
||||
Keep decisions from previous milestone (they're historical record).
|
||||
Clear "Blockers/Concerns Carried Forward" section.
|
||||
|
||||
**Add to Roadmap Evolution:**
|
||||
|
||||
```markdown
|
||||
### Roadmap Evolution
|
||||
|
||||
- Milestone v[X.Y] created: [theme/focus], [N] phases (Phase [start]-[end])
|
||||
```
|
||||
|
||||
**Update Session Continuity:**
|
||||
|
||||
```markdown
|
||||
## Session Continuity
|
||||
|
||||
Last session: [today's date and time]
|
||||
Stopped at: Milestone v[X.Y] initialization
|
||||
Resume file: None
|
||||
```
|
||||
|
||||
Keep Accumulated Context (decisions, blockers) from previous milestone.
|
||||
</step>
|
||||
|
||||
<step name="git_commit">
|
||||
Commit milestone creation:
|
||||
|
||||
```bash
|
||||
git add .planning/ROADMAP.md .planning/STATE.md
|
||||
git add .planning/phases/
|
||||
git commit -m "$(cat <<'EOF'
|
||||
docs: create milestone v[X.Y] [Name] ([N] phases)
|
||||
|
||||
Phases:
|
||||
- [N]. [name]: [goal]
|
||||
- [N+1]. [name]: [goal]
|
||||
- [N+2]. [name]: [goal]
|
||||
EOF
|
||||
)"
|
||||
```
|
||||
|
||||
Confirm: "Committed: docs: create milestone v[X.Y] [Name]"
|
||||
</step>
|
||||
|
||||
<step name="cleanup_context">
|
||||
Delete the temporary milestone context file if it exists:
|
||||
<step name="cleanup">
|
||||
Delete temporary context file if it exists:
|
||||
|
||||
```bash
|
||||
rm -f .planning/MILESTONE-CONTEXT.md
|
||||
```
|
||||
</step>
|
||||
|
||||
This file was a handoff artifact from `/gsd:discuss-milestone`. Now that the milestone is created, the context is persisted in ROADMAP.md and the temporary file is no longer needed.
|
||||
<step name="git_commit">
|
||||
```bash
|
||||
git add .planning/PROJECT.md .planning/STATE.md
|
||||
git commit -m "$(cat <<'EOF'
|
||||
docs: start milestone v[X.Y] [Name]
|
||||
|
||||
Goal: [One sentence]
|
||||
Target features: [count] features
|
||||
EOF
|
||||
)"
|
||||
```
|
||||
</step>
|
||||
|
||||
<step name="offer_next">
|
||||
```
|
||||
Milestone v[X.Y] [Name] created:
|
||||
- Phases: [N]-[M] ([count] phases)
|
||||
- Directories created
|
||||
- ROADMAP.md updated
|
||||
- STATE.md reset for new milestone
|
||||
Milestone v[X.Y] [Name] initialized.
|
||||
|
||||
PROJECT.md updated with:
|
||||
- Current Milestone section
|
||||
- Target features in Active requirements
|
||||
|
||||
---
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**Phase [N]: [Name]** — [Goal from ROADMAP.md]
|
||||
**Define Requirements** — scope v[X.Y] features into REQUIREMENTS.md
|
||||
|
||||
`/gsd:plan-phase [N]`
|
||||
`/gsd:define-requirements`
|
||||
|
||||
<sub>`/clear` first → fresh context window</sub>
|
||||
|
||||
---
|
||||
|
||||
**Also available:**
|
||||
- `/gsd:discuss-phase [N]` — gather context first
|
||||
- `/gsd:research-phase [N]` — investigate unknowns
|
||||
- Review roadmap
|
||||
**Or research first:**
|
||||
- `/gsd:research-project` — investigate ecosystem before scoping
|
||||
|
||||
**Full flow:**
|
||||
1. `/gsd:define-requirements` — create REQUIREMENTS.md
|
||||
2. `/gsd:create-roadmap` — create ROADMAP.md with phases
|
||||
3. `/gsd:plan-phase [N]` — start execution
|
||||
|
||||
---
|
||||
```
|
||||
@@ -383,34 +193,11 @@ Milestone v[X.Y] [Name] created:
|
||||
|
||||
</process>
|
||||
|
||||
<phase_naming>
|
||||
Use `XX-kebab-case-name` format with continuous numbering:
|
||||
- `10-user-profiles`
|
||||
- `11-notifications`
|
||||
- `12-analytics`
|
||||
|
||||
Numbers continue from previous milestone. Names describe content.
|
||||
</phase_naming>
|
||||
|
||||
<anti_patterns>
|
||||
- Don't restart phase numbering at 01 (continue sequence)
|
||||
- Don't add time estimates
|
||||
- Don't create Gantt charts
|
||||
- Respect depth setting for phase count (quick: 3-5, standard: 5-8, comprehensive: 8-12)
|
||||
- Don't modify completed milestone sections
|
||||
|
||||
Milestones are coherent chunks of work, not project management artifacts.
|
||||
</anti_patterns>
|
||||
|
||||
<success_criteria>
|
||||
Milestone creation is complete when:
|
||||
- [ ] Next phase number calculated correctly (continues from previous)
|
||||
- [ ] Phases defined per depth setting (quick: 3-5, standard: 5-8, comprehensive: 8-12)
|
||||
- [ ] Research flags assigned for each phase
|
||||
- [ ] ROADMAP.md updated with new milestone section
|
||||
- [ ] Phase directories created
|
||||
- [ ] STATE.md reset for new milestone
|
||||
- [ ] Git commit made
|
||||
- [ ] User knows next steps
|
||||
- PROJECT.md updated with Current Milestone section
|
||||
- Active requirements reflect new milestone goals
|
||||
- STATE.md reset for new milestone (keeps accumulated context)
|
||||
- MILESTONE-CONTEXT.md consumed and deleted (if existed)
|
||||
- Git commit made
|
||||
- User routed to define-requirements (or research-project)
|
||||
</success_criteria>
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user