mindsystem-cc 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +501 -0
  3. package/agents/ms-codebase-mapper.md +739 -0
  4. package/agents/ms-debugger.md +1184 -0
  5. package/agents/ms-designer.md +414 -0
  6. package/agents/ms-executor.md +760 -0
  7. package/agents/ms-integration-checker.md +423 -0
  8. package/agents/ms-milestone-auditor.md +448 -0
  9. package/agents/ms-mock-generator.md +182 -0
  10. package/agents/ms-plan-checker.md +746 -0
  11. package/agents/ms-research-synthesizer.md +248 -0
  12. package/agents/ms-researcher.md +962 -0
  13. package/agents/ms-roadmapper.md +606 -0
  14. package/agents/ms-verifier.md +779 -0
  15. package/agents/ms-verify-fixer.md +124 -0
  16. package/bin/install.js +296 -0
  17. package/commands/ms/add-phase.md +207 -0
  18. package/commands/ms/add-todo.md +182 -0
  19. package/commands/ms/audit-milestone.md +318 -0
  20. package/commands/ms/check-phase.md +162 -0
  21. package/commands/ms/check-todos.md +217 -0
  22. package/commands/ms/complete-milestone.md +137 -0
  23. package/commands/ms/create-roadmap.md +273 -0
  24. package/commands/ms/debug.md +149 -0
  25. package/commands/ms/define-requirements.md +121 -0
  26. package/commands/ms/design-phase.md +341 -0
  27. package/commands/ms/discuss-milestone.md +48 -0
  28. package/commands/ms/discuss-phase.md +60 -0
  29. package/commands/ms/do-work.md +90 -0
  30. package/commands/ms/execute-phase.md +289 -0
  31. package/commands/ms/help.md +623 -0
  32. package/commands/ms/insert-phase.md +227 -0
  33. package/commands/ms/list-phase-assumptions.md +50 -0
  34. package/commands/ms/map-codebase.md +71 -0
  35. package/commands/ms/new-milestone.md +193 -0
  36. package/commands/ms/new-project.md +338 -0
  37. package/commands/ms/pause-work.md +123 -0
  38. package/commands/ms/plan-milestone-gaps.md +285 -0
  39. package/commands/ms/plan-phase.md +105 -0
  40. package/commands/ms/progress.md +370 -0
  41. package/commands/ms/remove-phase.md +338 -0
  42. package/commands/ms/research-phase.md +175 -0
  43. package/commands/ms/research-project.md +339 -0
  44. package/commands/ms/resume-work.md +40 -0
  45. package/commands/ms/review-design.md +484 -0
  46. package/commands/ms/simplify-flutter.md +193 -0
  47. package/commands/ms/update.md +159 -0
  48. package/commands/ms/verify-work.md +92 -0
  49. package/commands/ms/whats-new.md +124 -0
  50. package/mindsystem/references/checkpoints.md +788 -0
  51. package/mindsystem/references/continuation-format.md +255 -0
  52. package/mindsystem/references/debugging/debugging-mindset.md +11 -0
  53. package/mindsystem/references/debugging/hypothesis-testing.md +11 -0
  54. package/mindsystem/references/debugging/investigation-techniques.md +11 -0
  55. package/mindsystem/references/debugging/verification-patterns.md +11 -0
  56. package/mindsystem/references/debugging/when-to-research.md +11 -0
  57. package/mindsystem/references/git-integration.md +254 -0
  58. package/mindsystem/references/goal-backward.md +286 -0
  59. package/mindsystem/references/mock-patterns.md +294 -0
  60. package/mindsystem/references/plan-format.md +473 -0
  61. package/mindsystem/references/principles.md +73 -0
  62. package/mindsystem/references/questioning.md +140 -0
  63. package/mindsystem/references/research-pitfalls.md +233 -0
  64. package/mindsystem/references/scope-estimation.md +256 -0
  65. package/mindsystem/references/tdd.md +263 -0
  66. package/mindsystem/references/verification-patterns.md +595 -0
  67. package/mindsystem/templates/DEBUG.md +159 -0
  68. package/mindsystem/templates/UAT.md +403 -0
  69. package/mindsystem/templates/adhoc-summary.md +153 -0
  70. package/mindsystem/templates/codebase/architecture.md +255 -0
  71. package/mindsystem/templates/codebase/concerns.md +310 -0
  72. package/mindsystem/templates/codebase/conventions.md +307 -0
  73. package/mindsystem/templates/codebase/integrations.md +280 -0
  74. package/mindsystem/templates/codebase/stack.md +186 -0
  75. package/mindsystem/templates/codebase/structure.md +285 -0
  76. package/mindsystem/templates/codebase/testing.md +480 -0
  77. package/mindsystem/templates/config.json +26 -0
  78. package/mindsystem/templates/context.md +140 -0
  79. package/mindsystem/templates/continue-here.md +78 -0
  80. package/mindsystem/templates/debug-subagent-prompt.md +91 -0
  81. package/mindsystem/templates/design-iteration.md +208 -0
  82. package/mindsystem/templates/design.md +417 -0
  83. package/mindsystem/templates/discovery.md +146 -0
  84. package/mindsystem/templates/milestone-archive.md +123 -0
  85. package/mindsystem/templates/milestone-context.md +93 -0
  86. package/mindsystem/templates/milestone.md +115 -0
  87. package/mindsystem/templates/phase-prompt.md +574 -0
  88. package/mindsystem/templates/project.md +184 -0
  89. package/mindsystem/templates/requirements.md +231 -0
  90. package/mindsystem/templates/research-project/ARCHITECTURE.md +204 -0
  91. package/mindsystem/templates/research-project/FEATURES.md +147 -0
  92. package/mindsystem/templates/research-project/PITFALLS.md +200 -0
  93. package/mindsystem/templates/research-project/STACK.md +120 -0
  94. package/mindsystem/templates/research-project/SUMMARY.md +170 -0
  95. package/mindsystem/templates/research-subagent-prompt.md +92 -0
  96. package/mindsystem/templates/research.md +529 -0
  97. package/mindsystem/templates/roadmap.md +214 -0
  98. package/mindsystem/templates/state.md +224 -0
  99. package/mindsystem/templates/summary.md +269 -0
  100. package/mindsystem/templates/user-setup.md +323 -0
  101. package/mindsystem/templates/verification-report.md +322 -0
  102. package/mindsystem/workflows/complete-milestone.md +759 -0
  103. package/mindsystem/workflows/create-milestone.md +203 -0
  104. package/mindsystem/workflows/debug.md +14 -0
  105. package/mindsystem/workflows/define-requirements.md +330 -0
  106. package/mindsystem/workflows/diagnose-issues.md +241 -0
  107. package/mindsystem/workflows/discovery-phase.md +293 -0
  108. package/mindsystem/workflows/discuss-milestone.md +310 -0
  109. package/mindsystem/workflows/discuss-phase.md +237 -0
  110. package/mindsystem/workflows/do-work.md +359 -0
  111. package/mindsystem/workflows/execute-phase.md +644 -0
  112. package/mindsystem/workflows/execute-plan.md +1828 -0
  113. package/mindsystem/workflows/generate-mocks.md +187 -0
  114. package/mindsystem/workflows/list-phase-assumptions.md +178 -0
  115. package/mindsystem/workflows/map-codebase.md +289 -0
  116. package/mindsystem/workflows/plan-phase.md +876 -0
  117. package/mindsystem/workflows/research-phase.md +17 -0
  118. package/mindsystem/workflows/research-project.md +23 -0
  119. package/mindsystem/workflows/resume-project.md +311 -0
  120. package/mindsystem/workflows/transition.md +564 -0
  121. package/mindsystem/workflows/verify-phase.md +629 -0
  122. package/mindsystem/workflows/verify-work.md +823 -0
  123. package/package.json +32 -0
  124. package/scripts/generate-phase-patch.sh +169 -0
  125. package/scripts/ms-lookup/README.md +112 -0
  126. package/scripts/ms-lookup/ms_lookup/__init__.py +3 -0
  127. package/scripts/ms-lookup/ms_lookup/__main__.py +6 -0
  128. package/scripts/ms-lookup/ms_lookup/backends/__init__.py +6 -0
  129. package/scripts/ms-lookup/ms_lookup/backends/context7.py +219 -0
  130. package/scripts/ms-lookup/ms_lookup/backends/perplexity.py +145 -0
  131. package/scripts/ms-lookup/ms_lookup/cache.py +48 -0
  132. package/scripts/ms-lookup/ms_lookup/cli.py +219 -0
  133. package/scripts/ms-lookup/ms_lookup/config.py +23 -0
  134. package/scripts/ms-lookup/ms_lookup/errors.py +24 -0
  135. package/scripts/ms-lookup/ms_lookup/output.py +49 -0
  136. package/scripts/ms-lookup/ms_lookup/tokens.py +56 -0
  137. package/scripts/ms-lookup/pyproject.toml +17 -0
  138. package/scripts/ms-lookup/uv.lock +207 -0
  139. package/scripts/ms-lookup-wrapper.sh +21 -0
@@ -0,0 +1,227 @@
1
+ ---
2
+ name: ms:insert-phase
3
+ description: Insert urgent work as decimal phase (e.g., 72.1) between existing phases
4
+ argument-hint: <after> <description>
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ ---
10
+
11
+ <objective>
12
+ Insert a decimal phase for urgent work discovered mid-milestone that must be completed between existing integer phases.
13
+
14
+ Uses decimal numbering (72.1, 72.2, etc.) to preserve the logical sequence of planned phases while accommodating urgent insertions.
15
+
16
+ Purpose: Handle urgent work discovered during execution without renumbering entire roadmap.
17
+ </objective>
18
+
19
+ <execution_context>
20
+ @.planning/ROADMAP.md
21
+ @.planning/STATE.md
22
+ </execution_context>
23
+
24
+ <process>
25
+
26
+ <step name="parse_arguments">
27
+ Parse the command arguments:
28
+ - First argument: integer phase number to insert after
29
+ - Remaining arguments: phase description
30
+
31
+ Example: `/ms:insert-phase 72 Fix critical auth bug`
32
+ → after = 72
33
+ → description = "Fix critical auth bug"
34
+
35
+ Validation:
36
+
37
+ ```bash
38
+ if [ $# -lt 2 ]; then
39
+ echo "ERROR: Both phase number and description required"
40
+ echo "Usage: /ms:insert-phase <after> <description>"
41
+ echo "Example: /ms:insert-phase 72 Fix critical auth bug"
42
+ exit 1
43
+ fi
44
+ ```
45
+
46
+ Parse first argument as integer:
47
+
48
+ ```bash
49
+ after_phase=$1
50
+ shift
51
+ description="$*"
52
+
53
+ # Validate after_phase is an integer
54
+ if ! [[ "$after_phase" =~ ^[0-9]+$ ]]; then
55
+ echo "ERROR: Phase number must be an integer"
56
+ exit 1
57
+ fi
58
+ ```
59
+
60
+ </step>
61
+
62
+ <step name="load_roadmap">
63
+ Load the roadmap file:
64
+
65
+ ```bash
66
+ if [ -f .planning/ROADMAP.md ]; then
67
+ ROADMAP=".planning/ROADMAP.md"
68
+ else
69
+ echo "ERROR: No roadmap found (.planning/ROADMAP.md)"
70
+ exit 1
71
+ fi
72
+ ```
73
+
74
+ Read roadmap content for parsing.
75
+ </step>
76
+
77
+ <step name="verify_target_phase">
78
+ Verify that the target phase exists in the roadmap:
79
+
80
+ 1. Search for "### Phase {after_phase}:" heading
81
+ 2. If not found:
82
+
83
+ ```
84
+ ERROR: Phase {after_phase} not found in roadmap
85
+ Available phases: [list phase numbers]
86
+ ```
87
+
88
+ Exit.
89
+
90
+ 3. Verify phase is in current milestone (not completed/archived)
91
+ </step>
92
+
93
+ <step name="find_existing_decimals">
94
+ Find existing decimal phases after the target phase:
95
+
96
+ 1. Search for all "### Phase {after_phase}.N:" headings
97
+ 2. Extract decimal suffixes (e.g., for Phase 72: find 72.1, 72.2, 72.3)
98
+ 3. Find the highest decimal suffix
99
+ 4. Calculate next decimal: max + 1
100
+
101
+ Examples:
102
+
103
+ - Phase 72 with no decimals → next is 72.1
104
+ - Phase 72 with 72.1 → next is 72.2
105
+ - Phase 72 with 72.1, 72.2 → next is 72.3
106
+
107
+ Store as: `decimal_phase="$(printf "%02d" $after_phase).${next_decimal}"`
108
+ </step>
109
+
110
+ <step name="generate_slug">
111
+ Convert the phase description to a kebab-case slug:
112
+
113
+ ```bash
114
+ slug=$(echo "$description" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
115
+ ```
116
+
117
+ Phase directory name: `{decimal-phase}-{slug}`
118
+ Example: `06.1-fix-critical-auth-bug` (phase 6 insertion)
119
+ </step>
120
+
121
+ <step name="create_phase_directory">
122
+ Create the phase directory structure:
123
+
124
+ ```bash
125
+ phase_dir=".planning/phases/${decimal_phase}-${slug}"
126
+ mkdir -p "$phase_dir"
127
+ ```
128
+
129
+ Confirm: "Created directory: $phase_dir"
130
+ </step>
131
+
132
+ <step name="update_roadmap">
133
+ Insert the new phase entry into the roadmap:
134
+
135
+ 1. Find insertion point: immediately after Phase {after_phase}'s content (before next phase heading or "---")
136
+ 2. Insert new phase heading with (INSERTED) marker:
137
+
138
+ ```
139
+ ### Phase {decimal_phase}: {Description} (INSERTED)
140
+
141
+ **Goal:** [Urgent work - to be planned]
142
+ **Depends on:** Phase {after_phase}
143
+ **Plans:** 0 plans
144
+
145
+ Plans:
146
+ - [ ] TBD (run /ms:plan-phase {decimal_phase} to break down)
147
+
148
+ **Details:**
149
+ [To be added during planning]
150
+ ```
151
+
152
+ 3. Write updated roadmap back to file
153
+
154
+ The "(INSERTED)" marker helps identify decimal phases as urgent insertions.
155
+
156
+ Preserve all other content exactly (formatting, spacing, other phases).
157
+ </step>
158
+
159
+ <step name="update_project_state">
160
+ Update STATE.md to reflect the inserted phase:
161
+
162
+ 1. Read `.planning/STATE.md`
163
+ 2. Under "## Accumulated Context" → "### Roadmap Evolution" add entry:
164
+ ```
165
+ - Phase {decimal_phase} inserted after Phase {after_phase}: {description} (URGENT)
166
+ ```
167
+
168
+ If "Roadmap Evolution" section doesn't exist, create it.
169
+
170
+ Add note about insertion reason if appropriate.
171
+ </step>
172
+
173
+ <step name="completion">
174
+ Present completion summary:
175
+
176
+ ```
177
+ Phase {decimal_phase} inserted after Phase {after_phase}:
178
+ - Description: {description}
179
+ - Directory: .planning/phases/{decimal-phase}-{slug}/
180
+ - Status: Not planned yet
181
+ - Marker: (INSERTED) - indicates urgent work
182
+
183
+ Roadmap updated: {roadmap-path}
184
+ Project state updated: .planning/STATE.md
185
+
186
+ ---
187
+
188
+ ## ▶ Next Up
189
+
190
+ **Phase {decimal_phase}: {description}** — urgent insertion
191
+
192
+ `/ms:plan-phase {decimal_phase}`
193
+
194
+ <sub>`/clear` first → fresh context window</sub>
195
+
196
+ ---
197
+
198
+ **Also available:**
199
+ - Review insertion impact: Check if Phase {next_integer} dependencies still make sense
200
+ - Review roadmap
201
+
202
+ ---
203
+ ```
204
+ </step>
205
+
206
+ </process>
207
+
208
+ <anti_patterns>
209
+
210
+ - Don't use this for planned work at end of milestone (use /ms:add-phase)
211
+ - Don't insert before Phase 1 (decimal 0.1 makes no sense)
212
+ - Don't renumber existing phases
213
+ - Don't modify the target phase content
214
+ - Don't create plans yet (that's /ms:plan-phase)
215
+ - Don't commit changes (user decides when to commit)
216
+ </anti_patterns>
217
+
218
+ <success_criteria>
219
+ Phase insertion is complete when:
220
+
221
+ - [ ] Phase directory created: `.planning/phases/{N.M}-{slug}/`
222
+ - [ ] Roadmap updated with new phase entry (includes "(INSERTED)" marker)
223
+ - [ ] Phase inserted in correct position (after target phase, before next integer phase)
224
+ - [ ] STATE.md updated with roadmap evolution note
225
+ - [ ] Decimal number calculated correctly (based on existing decimals)
226
+ - [ ] User informed of next steps and dependency implications
227
+ </success_criteria>
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: ms:list-phase-assumptions
3
+ description: Surface Claude's assumptions about a phase approach before planning
4
+ argument-hint: "[phase]"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Grep
9
+ - Glob
10
+ ---
11
+
12
+ <objective>
13
+ Analyze a phase and present Claude's assumptions about technical approach, implementation order, scope boundaries, risk areas, and dependencies.
14
+
15
+ Purpose: Help users see what Claude thinks BEFORE planning begins - enabling course correction early when assumptions are wrong.
16
+ Output: Conversational output only (no file creation) - ends with "What do you think?" prompt
17
+ </objective>
18
+
19
+ <execution_context>
20
+ @~/.claude/mindsystem/workflows/list-phase-assumptions.md
21
+ </execution_context>
22
+
23
+ <context>
24
+ Phase number: $ARGUMENTS (required)
25
+
26
+ **Load project state first:**
27
+ @.planning/STATE.md
28
+
29
+ **Load roadmap:**
30
+ @.planning/ROADMAP.md
31
+ </context>
32
+
33
+ <process>
34
+ 1. Validate phase number argument (error if missing or invalid)
35
+ 2. Check if phase exists in roadmap
36
+ 3. Follow list-phase-assumptions.md workflow:
37
+ - Analyze roadmap description
38
+ - Surface assumptions about: technical approach, implementation order, scope, risks, dependencies
39
+ - Present assumptions clearly
40
+ - Prompt "What do you think?"
41
+ 4. Gather feedback and offer next steps
42
+ </process>
43
+
44
+ <success_criteria>
45
+
46
+ - Phase validated against roadmap
47
+ - Assumptions surfaced across five areas
48
+ - User prompted for feedback
49
+ - User knows next steps (discuss context, plan phase, or correct assumptions)
50
+ </success_criteria>
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: ms:map-codebase
3
+ description: Analyze codebase with parallel mapper agents to produce .planning/codebase/ documents
4
+ argument-hint: "[optional: specific area to map, e.g., 'api' or 'auth']"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Glob
9
+ - Grep
10
+ - Write
11
+ - Task
12
+ ---
13
+
14
+ <objective>
15
+ Analyze existing codebase using parallel ms-codebase-mapper agents to produce structured codebase documents.
16
+
17
+ Each mapper agent explores a focus area and **writes documents directly** to `.planning/codebase/`. The orchestrator only receives confirmations, keeping context usage minimal.
18
+
19
+ Output: .planning/codebase/ folder with 7 structured documents about the codebase state.
20
+ </objective>
21
+
22
+ <execution_context>
23
+ @~/.claude/mindsystem/workflows/map-codebase.md
24
+ </execution_context>
25
+
26
+ <context>
27
+ Focus area: $ARGUMENTS (optional - if provided, tells agents to focus on specific subsystem)
28
+
29
+ **Load project state if exists:**
30
+ Check for .planning/STATE.md - loads context if project already initialized
31
+
32
+ **This command can run:**
33
+ - Before /ms:new-project (brownfield codebases) - creates codebase map first
34
+ - After /ms:new-project (greenfield codebases) - updates codebase map as code evolves
35
+ - Anytime to refresh codebase understanding
36
+ </context>
37
+
38
+ <when_to_use>
39
+ **Use map-codebase for:**
40
+ - Brownfield projects before initialization (understand existing code first)
41
+ - Refreshing codebase map after significant changes
42
+ - Onboarding to an unfamiliar codebase
43
+ - Before major refactoring (understand current state)
44
+ - When STATE.md references outdated codebase info
45
+
46
+ **Skip map-codebase for:**
47
+ - Greenfield projects with no code yet (nothing to map)
48
+ - Trivial codebases (<5 files)
49
+ </when_to_use>
50
+
51
+ <process>
52
+ 1. Check if .planning/codebase/ already exists (offer to refresh or skip)
53
+ 2. Create .planning/codebase/ directory structure
54
+ 3. Spawn 4 parallel ms-codebase-mapper agents:
55
+ - Agent 1: tech focus → writes STACK.md, INTEGRATIONS.md
56
+ - Agent 2: arch focus → writes ARCHITECTURE.md, STRUCTURE.md
57
+ - Agent 3: quality focus → writes CONVENTIONS.md, TESTING.md
58
+ - Agent 4: concerns focus → writes CONCERNS.md
59
+ 4. Wait for agents to complete, collect confirmations (NOT document contents)
60
+ 5. Verify all 7 documents exist with line counts
61
+ 6. Commit codebase map
62
+ 7. Offer next steps (typically: /ms:new-project or /ms:plan-phase)
63
+ </process>
64
+
65
+ <success_criteria>
66
+ - [ ] .planning/codebase/ directory created
67
+ - [ ] All 7 codebase documents written by mapper agents
68
+ - [ ] Documents follow template structure
69
+ - [ ] Parallel agents completed without errors
70
+ - [ ] User knows next steps
71
+ </success_criteria>
@@ -0,0 +1,193 @@
1
+ ---
2
+ name: ms:new-milestone
3
+ description: Start a new milestone cycle — update PROJECT.md and route to requirements
4
+ argument-hint: "[milestone name, e.g., 'v1.1 Notifications']"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - AskUserQuestion
10
+ ---
11
+
12
+ <objective>
13
+ Start a new milestone by updating PROJECT.md with new goals, then routing to the requirements → roadmap cycle.
14
+
15
+ This is the brownfield equivalent of new-project. The project exists, PROJECT.md has history. This command gathers "what's next" and updates PROJECT.md to reflect the new milestone's goals.
16
+
17
+ Output: Updated PROJECT.md, routes to research-project or define-requirements
18
+ </objective>
19
+
20
+ <execution_context>
21
+ @~/.claude/mindsystem/references/questioning.md
22
+ @~/.claude/mindsystem/templates/project.md
23
+ </execution_context>
24
+
25
+ <context>
26
+ Milestone name: $ARGUMENTS (optional - will prompt if not provided)
27
+
28
+ **Load project context:**
29
+ @.planning/PROJECT.md
30
+ @.planning/STATE.md
31
+ @.planning/MILESTONES.md
32
+ @.planning/config.json
33
+
34
+ **Load milestone context (if exists, from /ms:discuss-milestone):**
35
+ @.planning/MILESTONE-CONTEXT.md
36
+ </context>
37
+
38
+ <process>
39
+
40
+ 1. **Load context:**
41
+ - Read PROJECT.md (existing project, Validated requirements, decisions)
42
+ - Read MILESTONES.md (what shipped previously)
43
+ - Read STATE.md (pending todos, blockers)
44
+ - Check for MILESTONE-CONTEXT.md (from /ms:discuss-milestone)
45
+
46
+ 2. **Present what shipped (if MILESTONES.md exists):**
47
+
48
+ ```bash
49
+ cat .planning/MILESTONES.md 2>/dev/null
50
+ # Also check for assumptions from last audit
51
+ cat .planning/v*-MILESTONE-AUDIT.md 2>/dev/null | grep -A 100 "assumptions:" | head -50
52
+ ```
53
+
54
+ Format the presentation:
55
+
56
+ ```
57
+ ---
58
+
59
+ ## Previous Milestone
60
+
61
+ **Last milestone:** v[X.Y] [Name] (shipped [DATE])
62
+
63
+ **Key accomplishments:**
64
+ - [From MILESTONES.md accomplishments]
65
+ - [From MILESTONES.md accomplishments]
66
+ - [From MILESTONES.md accomplishments]
67
+
68
+ **Validated requirements:**
69
+ - [From PROJECT.md Validated section]
70
+
71
+ **Pending todos (if any):**
72
+ - [From STATE.md accumulated context]
73
+
74
+ **Untested assumptions (if any):**
75
+ - [From MILESTONE-AUDIT.md assumptions section]
76
+ - Error state displays (04-comments, 05-auth)
77
+ - Empty state handling (04-comments)
78
+ - Session timeout behavior (05-auth)
79
+
80
+ *These were skipped during UAT because required states couldn't be mocked.*
81
+
82
+ ---
83
+ ```
84
+
85
+ This gives users context before asking what they want to build next.
86
+
87
+ 3. **Gather milestone goals:**
88
+
89
+ **If MILESTONE-CONTEXT.md exists:**
90
+ - Use features and scope from discuss-milestone
91
+ - Present summary for confirmation
92
+
93
+ **If no context file:**
94
+ - Present what shipped in last milestone
95
+ - Ask: "What do you want to build next?"
96
+ - Use AskUserQuestion to explore features
97
+ - Probe for priorities, constraints, scope
98
+
99
+ 4. **Determine milestone version:**
100
+ - Parse last version from MILESTONES.md
101
+ - Suggest next version (v1.0 → v1.1, or v2.0 for major)
102
+ - Confirm with user
103
+
104
+ 5. **Update PROJECT.md:**
105
+
106
+ Add/update these sections:
107
+
108
+ ```markdown
109
+ ## Current Milestone: v[X.Y] [Name]
110
+
111
+ **Goal:** [One sentence describing milestone focus]
112
+
113
+ **Target features:**
114
+ - [Feature 1]
115
+ - [Feature 2]
116
+ - [Feature 3]
117
+ ```
118
+
119
+ Update Active requirements section with new goals.
120
+
121
+ Update "Last updated" footer.
122
+
123
+ 6. **Update STATE.md:**
124
+
125
+ ```markdown
126
+ ## Current Position
127
+
128
+ Phase: Not started (run /ms:create-roadmap)
129
+ Plan: —
130
+ Status: Defining requirements
131
+ Last activity: [today] — Milestone v[X.Y] started
132
+ ```
133
+
134
+ 7. **Cleanup:**
135
+ - Delete MILESTONE-CONTEXT.md if exists (consumed)
136
+
137
+ 8. **Git commit:**
138
+ ```bash
139
+ git add .planning/PROJECT.md .planning/STATE.md
140
+ git commit -m "docs: start milestone v[X.Y] [Name]"
141
+ ```
142
+
143
+ 9. **Calculate next phase for context:**
144
+
145
+ ```bash
146
+ LAST_PHASE=$(ls -d .planning/phases/[0-9]*-* 2>/dev/null | sort -V | tail -1 | grep -oE '[0-9]+' | head -1)
147
+ if [ -n "$LAST_PHASE" ]; then
148
+ NEXT_PHASE=$((10#$LAST_PHASE + 1))
149
+ else
150
+ NEXT_PHASE=1
151
+ fi
152
+ echo "Next milestone phases will start at: Phase $NEXT_PHASE"
153
+ ```
154
+
155
+ 10. **Route to next step:**
156
+
157
+ ```
158
+ Milestone v[X.Y] [Name] initialized.
159
+
160
+ PROJECT.md updated with new goals.
161
+ Phases will start at: Phase $NEXT_PHASE
162
+
163
+ ---
164
+
165
+ ## ▶ Next Up
166
+
167
+ Choose your path:
168
+
169
+ **Option A: Research first** (new domains/capabilities)
170
+ Research ecosystem before scoping. Discovers patterns, expected features, architecture approaches.
171
+
172
+ `/ms:research-project`
173
+
174
+ **Option B: Define requirements directly** (familiar territory)
175
+ Skip research, define requirements from what you know.
176
+
177
+ `/ms:define-requirements`
178
+
179
+ <sub>`/clear` first → fresh context window</sub>
180
+
181
+ ---
182
+ ```
183
+
184
+ </process>
185
+
186
+ <success_criteria>
187
+ - PROJECT.md updated with Current Milestone section
188
+ - Active requirements reflect new milestone goals
189
+ - STATE.md reset for new milestone
190
+ - MILESTONE-CONTEXT.md consumed and deleted (if existed)
191
+ - Git commit made
192
+ - User routed to define-requirements (or research-project)
193
+ </success_criteria>