mindsystem-cc 3.19.0 → 3.21.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.
- package/README.md +5 -6
- package/agents/ms-designer.md +5 -2
- package/agents/ms-mockup-designer.md +1 -1
- package/agents/ms-plan-writer.md +8 -1
- package/agents/ms-product-researcher.md +69 -0
- package/agents/ms-research-synthesizer.md +1 -1
- package/agents/ms-researcher.md +8 -8
- package/agents/ms-roadmapper.md +9 -13
- package/bin/install.js +68 -5
- package/commands/ms/add-phase.md +30 -18
- package/commands/ms/adhoc.md +1 -1
- package/commands/ms/audit-milestone.md +12 -12
- package/commands/ms/complete-milestone.md +25 -22
- package/commands/ms/config.md +202 -0
- package/commands/ms/design-phase.md +34 -29
- package/commands/ms/discuss-phase.md +26 -22
- package/commands/ms/doctor.md +22 -202
- package/commands/ms/execute-phase.md +18 -7
- package/commands/ms/help.md +46 -39
- package/commands/ms/insert-phase.md +29 -17
- package/commands/ms/new-milestone.md +42 -19
- package/commands/ms/new-project.md +88 -103
- package/commands/ms/plan-milestone-gaps.md +4 -5
- package/commands/ms/plan-phase.md +5 -3
- package/commands/ms/progress.md +2 -4
- package/commands/ms/research-phase.md +7 -12
- package/commands/ms/research-project.md +12 -12
- package/mindsystem/references/continuation-format.md +3 -3
- package/mindsystem/references/plan-format.md +11 -1
- package/mindsystem/references/principles.md +1 -1
- package/mindsystem/references/questioning.md +50 -8
- package/mindsystem/references/routing/audit-result-routing.md +12 -11
- package/mindsystem/references/routing/between-milestones-routing.md +2 -2
- package/mindsystem/references/routing/milestone-complete-routing.md +1 -1
- package/mindsystem/references/routing/next-phase-routing.md +4 -2
- package/mindsystem/templates/context.md +7 -6
- package/mindsystem/templates/milestone-archive.md +5 -5
- package/mindsystem/templates/milestone-context.md +1 -1
- package/mindsystem/templates/milestone.md +9 -9
- package/mindsystem/templates/project.md +70 -64
- package/mindsystem/templates/research-subagent-prompt.md +3 -3
- package/mindsystem/templates/roadmap-milestone.md +14 -14
- package/mindsystem/templates/roadmap.md +9 -7
- package/mindsystem/workflows/adhoc.md +1 -1
- package/mindsystem/workflows/complete-milestone.md +66 -107
- package/mindsystem/workflows/discuss-phase.md +137 -65
- package/mindsystem/workflows/doctor-fixes.md +273 -0
- package/mindsystem/workflows/execute-phase.md +7 -3
- package/mindsystem/workflows/execute-plan.md +6 -5
- package/mindsystem/workflows/map-codebase.md +2 -2
- package/mindsystem/workflows/mockup-generation.md +1 -1
- package/mindsystem/workflows/plan-phase.md +28 -3
- package/mindsystem/workflows/transition.md +20 -25
- package/mindsystem/workflows/verify-work.md +1 -1
- package/package.json +1 -1
- package/scripts/__pycache__/ms-tools.cpython-314.pyc +0 -0
- package/scripts/__pycache__/test_ms_tools.cpython-314-pytest-9.0.2.pyc +0 -0
- package/scripts/fixtures/scan-context/.planning/ROADMAP.md +16 -0
- package/scripts/fixtures/scan-context/.planning/adhoc/20260220-fix-token-SUMMARY.md +12 -0
- package/scripts/fixtures/scan-context/.planning/config.json +3 -0
- package/scripts/fixtures/scan-context/.planning/debug/resolved/token-bug.md +11 -0
- package/scripts/fixtures/scan-context/.planning/knowledge/auth.md +11 -0
- package/scripts/fixtures/scan-context/.planning/phases/02-infra/02-1-SUMMARY.md +20 -0
- package/scripts/fixtures/scan-context/.planning/phases/04-setup/04-1-SUMMARY.md +21 -0
- package/scripts/fixtures/scan-context/.planning/phases/05-auth/05-1-SUMMARY.md +28 -0
- package/scripts/fixtures/scan-context/.planning/todos/done/setup-db.md +10 -0
- package/scripts/fixtures/scan-context/.planning/todos/pending/add-logout.md +10 -0
- package/scripts/fixtures/scan-context/expected-output.json +257 -0
- package/scripts/ms-tools.py +2139 -0
- package/scripts/test_ms_tools.py +836 -0
- package/commands/ms/list-phase-assumptions.md +0 -56
- package/mindsystem/workflows/list-phase-assumptions.md +0 -178
- package/scripts/__pycache__/compare_mockups.cpython-314.pyc +0 -0
- package/scripts/archive-milestone-files.sh +0 -68
- package/scripts/archive-milestone-phases.sh +0 -138
- package/scripts/doctor-scan.sh +0 -379
- package/scripts/gather-milestone-stats.sh +0 -179
- package/scripts/generate-adhoc-patch.sh +0 -79
- package/scripts/generate-phase-patch.sh +0 -169
- package/scripts/scan-artifact-subsystems.sh +0 -55
- package/scripts/scan-planning-context.py +0 -839
- package/scripts/update-state.sh +0 -59
- package/scripts/validate-execution-order.sh +0 -104
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ms:new-milestone
|
|
3
3
|
description: Start a new milestone — discover what to build, update PROJECT.md, create context for downstream
|
|
4
|
-
argument-hint: "[
|
|
4
|
+
argument-hint: "[name, e.g., 'Notifications']"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Read
|
|
7
7
|
- Write
|
|
@@ -39,12 +39,36 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
|
|
|
39
39
|
|
|
40
40
|
## Phase 1: Orient
|
|
41
41
|
|
|
42
|
+
0. **Validate PROJECT.md exists:**
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
[ -f .planning/PROJECT.md ] || { echo "NO_PROJECT"; exit 0; }
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**If `NO_PROJECT`:** Present message and stop:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
No PROJECT.md found. Initialize the project first to capture business context, target audience, and project vision.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## ▶ Next Up
|
|
56
|
+
|
|
57
|
+
`/ms:new-project` — Initialize project with business context and vision
|
|
58
|
+
|
|
59
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**You MUST run the bash command above using the Bash tool before proceeding.**
|
|
65
|
+
|
|
42
66
|
1. **Load context:**
|
|
43
67
|
- Read PROJECT.md (existing project, validated requirements, decisions)
|
|
44
68
|
- Read MILESTONES.md (what shipped previously)
|
|
45
69
|
- Read STATE.md (pending todos, blockers)
|
|
46
70
|
- Read config.json (project settings)
|
|
47
|
-
-
|
|
71
|
+
- Identify previous milestone name from MILESTONES.md (e.g., last shipped was "MVP")
|
|
48
72
|
|
|
49
73
|
2. **Check for active milestone:**
|
|
50
74
|
|
|
@@ -52,7 +76,7 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
|
|
|
52
76
|
|
|
53
77
|
Use AskUserQuestion:
|
|
54
78
|
- header: "Active milestone"
|
|
55
|
-
- question: "There's a milestone in progress (
|
|
79
|
+
- question: "There's a milestone in progress ([Name]). What do you want to do?"
|
|
56
80
|
- options:
|
|
57
81
|
- "Complete it first" — run /ms:complete-milestone
|
|
58
82
|
- "Add phases to it" — run /ms:add-phase
|
|
@@ -62,9 +86,9 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
|
|
|
62
86
|
If "Continue anyway": proceed.
|
|
63
87
|
|
|
64
88
|
3. **Strategic assessment (silent — do not output this step):**
|
|
65
|
-
- Check for previous milestone artifacts
|
|
89
|
+
- Check for previous milestone artifacts:
|
|
66
90
|
- `.planning/knowledge/*.md` (subsystem knowledge files — persist across milestones)
|
|
67
|
-
- `.planning/milestones/
|
|
91
|
+
- `.planning/milestones/{slug}/MILESTONE-AUDIT.md` (if exists, for last completed milestone)
|
|
68
92
|
- `.planning/TECH-DEBT.md` (if exists)
|
|
69
93
|
- Identify: outstanding tech debt, untested assumptions, high-impact gaps, unaddressed requirements
|
|
70
94
|
- This is background analysis — synthesize silently, surface through suggestions in step 4
|
|
@@ -74,7 +98,7 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
|
|
|
74
98
|
```
|
|
75
99
|
## Last Milestone
|
|
76
100
|
|
|
77
|
-
|
|
101
|
+
[Name] — [key accomplishments, 1-2 lines]
|
|
78
102
|
|
|
79
103
|
## Suggested Directions
|
|
80
104
|
|
|
@@ -88,10 +112,10 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
|
|
|
88
112
|
- Settled decisions and patterns from knowledge files
|
|
89
113
|
- Untested assumptions from previous audit
|
|
90
114
|
- Unaddressed requirements from previous milestones
|
|
91
|
-
- Strategic features inferred from PROJECT.md's
|
|
115
|
+
- Strategic features inferred from PROJECT.md: Who It's For, Core Problem, How It's Different
|
|
92
116
|
- Pending todos from STATE.md
|
|
93
117
|
|
|
94
|
-
If no meaningful artifacts exist (first milestone
|
|
118
|
+
If no meaningful artifacts exist (first milestone), base suggestions purely on PROJECT.md.
|
|
95
119
|
|
|
96
120
|
5. **Freeform opening:**
|
|
97
121
|
|
|
@@ -157,17 +181,17 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
|
|
|
157
181
|
|
|
158
182
|
## Phase 3: Commit
|
|
159
183
|
|
|
160
|
-
12. **Determine milestone
|
|
161
|
-
-
|
|
162
|
-
-
|
|
163
|
-
- Confirm with user via AskUserQuestion
|
|
184
|
+
12. **Determine milestone name:**
|
|
185
|
+
- Derive milestone name from the conversation (e.g., "Push Notifications", "Security Hardening")
|
|
186
|
+
- Generate slug from name (e.g., "push-notifications", "security-hardening")
|
|
187
|
+
- Confirm name with user via AskUserQuestion
|
|
164
188
|
|
|
165
189
|
13. **Present milestone summary:**
|
|
166
190
|
|
|
167
191
|
```
|
|
168
192
|
## Milestone Summary
|
|
169
193
|
|
|
170
|
-
**
|
|
194
|
+
**Name:** [Name]
|
|
171
195
|
**Goal:** [One sentence]
|
|
172
196
|
**Target features:**
|
|
173
197
|
- [Feature 1]
|
|
@@ -189,7 +213,7 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
|
|
|
189
213
|
Add/update these sections:
|
|
190
214
|
|
|
191
215
|
```markdown
|
|
192
|
-
## Current Milestone:
|
|
216
|
+
## Current Milestone: [Name]
|
|
193
217
|
|
|
194
218
|
**Goal:** [One sentence describing milestone focus]
|
|
195
219
|
|
|
@@ -199,8 +223,8 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
|
|
|
199
223
|
- [Feature 3]
|
|
200
224
|
```
|
|
201
225
|
|
|
202
|
-
Update Active requirements section with new goals.
|
|
203
226
|
Update "Last updated" footer.
|
|
227
|
+
Note: Milestone-specific goals live in MILESTONE-CONTEXT.md (step 15), not in PROJECT.md.
|
|
204
228
|
|
|
205
229
|
15. **Write MILESTONE-CONTEXT.md:**
|
|
206
230
|
|
|
@@ -222,7 +246,7 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
|
|
|
222
246
|
Phase: Not started (run /ms:create-roadmap)
|
|
223
247
|
Plan: —
|
|
224
248
|
Status: Defining requirements
|
|
225
|
-
Last activity: [today] — Milestone
|
|
249
|
+
Last activity: [today] — Milestone [Name] started
|
|
226
250
|
|
|
227
251
|
Progress: ░░░░░░░░░░ 0%
|
|
228
252
|
```
|
|
@@ -234,7 +258,7 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
|
|
|
234
258
|
```bash
|
|
235
259
|
git add .planning/PROJECT.md .planning/STATE.md .planning/MILESTONE-CONTEXT.md
|
|
236
260
|
git commit -m "$(cat <<'EOF'
|
|
237
|
-
docs: start milestone
|
|
261
|
+
docs: start milestone [Name]
|
|
238
262
|
EOF
|
|
239
263
|
)"
|
|
240
264
|
```
|
|
@@ -256,7 +280,7 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
|
|
|
256
280
|
Based on the conversation, recommend ONE path. If unfamiliar domains or open questions surfaced during discovery, recommend `/ms:research-project`. Otherwise recommend `/ms:create-roadmap`.
|
|
257
281
|
|
|
258
282
|
```
|
|
259
|
-
Milestone
|
|
283
|
+
Milestone [Name] initialized.
|
|
260
284
|
|
|
261
285
|
PROJECT.md updated with new goals.
|
|
262
286
|
Context saved to MILESTONE-CONTEXT.md
|
|
@@ -285,7 +309,6 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
|
|
|
285
309
|
|
|
286
310
|
<success_criteria>
|
|
287
311
|
- PROJECT.md updated with Current Milestone section
|
|
288
|
-
- Active requirements reflect new milestone goals
|
|
289
312
|
- MILESTONE-CONTEXT.md created with vision, features, scope, priorities
|
|
290
313
|
- STATE.md reset for new milestone
|
|
291
314
|
- Git commit made
|
|
@@ -12,7 +12,7 @@ allowed-tools:
|
|
|
12
12
|
|
|
13
13
|
Initialize a new project through comprehensive context gathering.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Questioning depth determines PROJECT.md quality, which determines everything downstream. Invest disproportionate effort here — the other steps are mechanical.
|
|
16
16
|
|
|
17
17
|
Creates `.planning/` with PROJECT.md and config.json.
|
|
18
18
|
|
|
@@ -31,11 +31,11 @@ Creates `.planning/` with PROJECT.md and config.json.
|
|
|
31
31
|
|
|
32
32
|
<step name="setup">
|
|
33
33
|
|
|
34
|
-
**
|
|
34
|
+
**Run before any user interaction:**
|
|
35
35
|
|
|
36
|
-
1. **
|
|
36
|
+
1. **Detect update mode:**
|
|
37
37
|
```bash
|
|
38
|
-
[ -f .planning/PROJECT.md ] && echo "
|
|
38
|
+
[ -f .planning/PROJECT.md ] && echo "IS_UPDATE=true" || echo "IS_UPDATE=false"
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
2. **Initialize git repo in THIS directory** (required even if inside a parent repo):
|
|
@@ -54,85 +54,69 @@ Creates `.planning/` with PROJECT.md and config.json.
|
|
|
54
54
|
# Check for existing code files
|
|
55
55
|
CODE_FILES=$(find . -name "*.ts" -o -name "*.js" -o -name "*.py" -o -name "*.go" -o -name "*.rs" -o -name "*.swift" -o -name "*.java" 2>/dev/null | grep -v node_modules | grep -v .git | head -20)
|
|
56
56
|
HAS_PACKAGE=$([ -f package.json ] || [ -f requirements.txt ] || [ -f Cargo.toml ] || [ -f go.mod ] || [ -f Package.swift ] && echo "yes")
|
|
57
|
+
IS_BROWNFIELD=$( ([ -n "$CODE_FILES" ] || [ "$HAS_PACKAGE" = "yes" ]) && echo "yes" || echo "no")
|
|
57
58
|
HAS_CODEBASE_MAP=$([ -d .planning/codebase ] && echo "yes")
|
|
58
59
|
```
|
|
59
60
|
|
|
60
|
-
**
|
|
61
|
+
**Run all commands above before proceeding.**
|
|
61
62
|
|
|
62
63
|
</step>
|
|
63
64
|
|
|
64
|
-
<step name="
|
|
65
|
+
<step name="question">
|
|
65
66
|
|
|
66
|
-
**
|
|
67
|
+
**Open the conversation:**
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
69
|
+
**If IS_UPDATE=true (update mode):**
|
|
70
|
+
- Read existing `.planning/PROJECT.md`
|
|
71
|
+
- Present a brief summary of the current project context
|
|
72
|
+
- Ask inline (freeform, NOT AskUserQuestion): "What do you want to update?"
|
|
73
|
+
- Follow the same questioning principles below, but focused on what changed
|
|
71
74
|
|
|
72
|
-
|
|
73
|
-
- header: "Existing Code"
|
|
74
|
-
- question: "I detected existing code in this directory. Would you like to map the codebase first?"
|
|
75
|
-
- options:
|
|
76
|
-
- "Map codebase first" — Run /ms:map-codebase to understand existing architecture (Recommended)
|
|
77
|
-
- "Skip mapping" — Proceed with project initialization
|
|
75
|
+
**If IS_UPDATE=false (first run):**
|
|
78
76
|
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
Run `/ms:map-codebase` first, then return to `/ms:new-project`
|
|
82
|
-
```
|
|
83
|
-
Exit command.
|
|
84
|
-
|
|
85
|
-
**If "Skip mapping":** Continue to question step.
|
|
77
|
+
Ask inline (freeform, NOT AskUserQuestion):
|
|
86
78
|
|
|
87
|
-
**
|
|
79
|
+
- **Greenfield** (no existing code): "What do you want to build?"
|
|
80
|
+
- **Brownfield** (code detected in Step 1): "Tell me about this project — if you were explaining it to someone who's never seen it, what does it do and who uses it?"
|
|
88
81
|
|
|
89
|
-
|
|
82
|
+
For brownfield, explicitly note: "Not the next feature — the product as a whole."
|
|
90
83
|
|
|
91
|
-
|
|
84
|
+
Wait for their response. This gives you the context needed to ask intelligent follow-up questions.
|
|
92
85
|
|
|
93
|
-
**
|
|
86
|
+
**Derive business context:**
|
|
94
87
|
|
|
95
|
-
|
|
88
|
+
After the initial response, infer business context before asking more questions. Present inferred audience/problem/differentiation for the user to react to:
|
|
96
89
|
|
|
97
|
-
"
|
|
90
|
+
"It sounds like this is for [audience] dealing with [problem], and your approach is different because [differentiation]. Sound right?"
|
|
98
91
|
|
|
99
|
-
|
|
92
|
+
This leverages what they've already said and gives them something concrete to react to.
|
|
100
93
|
|
|
101
94
|
**Follow the thread:**
|
|
102
95
|
|
|
103
96
|
Based on what they said, ask follow-up questions that dig into their response. Use AskUserQuestion with options that probe what they mentioned — interpretations, clarifications, concrete examples.
|
|
104
97
|
|
|
105
|
-
|
|
106
|
-
- What excited them
|
|
107
|
-
- What problem sparked this
|
|
108
|
-
- What they mean by vague terms
|
|
109
|
-
- What it would actually look like
|
|
110
|
-
- What's already decided
|
|
98
|
+
Track coverage against the 6-item context checklist from `questioning.md`. Probe fuzziest areas first — spend questioning budget where clarity is lowest.
|
|
111
99
|
|
|
112
|
-
|
|
113
|
-
- Challenge vagueness
|
|
114
|
-
- Make abstract concrete
|
|
115
|
-
- Surface assumptions
|
|
116
|
-
- Find edges
|
|
117
|
-
- Reveal motivation
|
|
100
|
+
Use grounding questions from `questioning.md` instead of template-shaped questions. Don't ask "Who is your target audience?" — ask "Who would be your first 10 users?"
|
|
118
101
|
|
|
119
|
-
|
|
102
|
+
When the conversation pauses and sections are still fuzzy, use success-backward: "Imagine this is wildly successful in a year. What does that look like?"
|
|
120
103
|
|
|
121
|
-
|
|
104
|
+
Consult `questioning.md` for techniques — challenge vagueness, derive before asking.
|
|
122
105
|
|
|
123
106
|
**Decision gate:**
|
|
124
107
|
|
|
125
108
|
When you could write a clear PROJECT.md, use AskUserQuestion:
|
|
126
109
|
|
|
127
110
|
- header: "Ready?"
|
|
128
|
-
- question: "I think I understand what you're after. Ready to create PROJECT.md?"
|
|
111
|
+
- question (first run): "I think I understand what you're after. Ready to create PROJECT.md?"
|
|
112
|
+
- question (update mode): "Ready to update PROJECT.md with these changes?"
|
|
129
113
|
- options:
|
|
130
|
-
- "Create PROJECT.md" — Let's move forward
|
|
114
|
+
- "Create PROJECT.md" / "Update PROJECT.md" — Let's move forward
|
|
131
115
|
- "Keep exploring" — I want to share more / ask me more
|
|
132
116
|
|
|
133
117
|
If "Keep exploring" — ask what they want to add, or identify gaps and probe naturally.
|
|
134
118
|
|
|
135
|
-
Loop until
|
|
119
|
+
Loop until create/update selected.
|
|
136
120
|
|
|
137
121
|
</step>
|
|
138
122
|
|
|
@@ -142,54 +126,31 @@ Synthesize all context into `.planning/PROJECT.md` using the template from `temp
|
|
|
142
126
|
|
|
143
127
|
**For greenfield projects:**
|
|
144
128
|
|
|
145
|
-
Initialize
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
-
|
|
157
|
-
- [ ] [Requirement 2]
|
|
158
|
-
- [ ] [Requirement 3]
|
|
159
|
-
|
|
160
|
-
### Out of Scope
|
|
161
|
-
|
|
162
|
-
- [Exclusion 1] — [why]
|
|
163
|
-
- [Exclusion 2] — [why]
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
All Active requirements are hypotheses until shipped and validated.
|
|
129
|
+
Initialize all sections from questioning:
|
|
130
|
+
- **What This Is** — product identity from questioning
|
|
131
|
+
- **Core Value** — the ONE thing from questioning
|
|
132
|
+
- **Who It's For** — target audience from questioning
|
|
133
|
+
- **Core Problem** — pain or desire from questioning
|
|
134
|
+
- **How It's Different** — differentiators from questioning
|
|
135
|
+
- **Key User Flows** — core interactions from questioning
|
|
136
|
+
- **Out of Scope** — boundaries from questioning
|
|
137
|
+
- **Constraints** — hard limits from questioning
|
|
138
|
+
- **Technical Context** — minimal for greenfield (stack choices if discussed)
|
|
139
|
+
- **Validated** — `(None yet — ship to validate)`
|
|
140
|
+
- **Key Decisions** — any decisions made during questioning
|
|
167
141
|
|
|
168
142
|
**For brownfield projects (codebase map exists):**
|
|
169
143
|
|
|
170
|
-
|
|
144
|
+
Same as greenfield, plus:
|
|
171
145
|
|
|
172
146
|
1. Read `.planning/codebase/ARCHITECTURE.md` and `STACK.md`
|
|
173
|
-
2.
|
|
174
|
-
3.
|
|
147
|
+
2. Infer Validated requirements from existing code — what the codebase already does
|
|
148
|
+
3. Populate Technical Context from codebase map (stack, integrations, known debt)
|
|
175
149
|
|
|
176
150
|
```markdown
|
|
177
|
-
##
|
|
178
|
-
|
|
179
|
-
### Validated
|
|
180
|
-
|
|
151
|
+
## Validated
|
|
181
152
|
- ✓ [Existing capability 1] — existing
|
|
182
153
|
- ✓ [Existing capability 2] — existing
|
|
183
|
-
- ✓ [Existing capability 3] — existing
|
|
184
|
-
|
|
185
|
-
### Active
|
|
186
|
-
|
|
187
|
-
- [ ] [New requirement 1]
|
|
188
|
-
- [ ] [New requirement 2]
|
|
189
|
-
|
|
190
|
-
### Out of Scope
|
|
191
|
-
|
|
192
|
-
- [Exclusion 1] — [why]
|
|
193
154
|
```
|
|
194
155
|
|
|
195
156
|
**Key Decisions:**
|
|
@@ -217,7 +178,7 @@ Do not compress. Capture everything gathered.
|
|
|
217
178
|
|
|
218
179
|
<step name="config">
|
|
219
180
|
|
|
220
|
-
Create `.planning/config.json` with subsystems and code_review using `templates/config.json` structure.
|
|
181
|
+
Create or update `.planning/config.json` with subsystems and code_review using `templates/config.json` structure.
|
|
221
182
|
|
|
222
183
|
**Subsystems:** Derive 5-10 initial subsystems from the project context gathered during questioning. These are short, lowercase identifiers for the major functional areas of the project.
|
|
223
184
|
|
|
@@ -228,10 +189,13 @@ Examples by project type:
|
|
|
228
189
|
|
|
229
190
|
These values are used throughout the system for consistent categorization of summaries, debug docs, and adhoc work.
|
|
230
191
|
|
|
192
|
+
**Update mode (config.json already exists):** Re-derive subsystems from updated context. Preserve any existing `code_review` values — do not overwrite configured reviewers with nulls.
|
|
193
|
+
|
|
231
194
|
</step>
|
|
232
195
|
|
|
233
196
|
<step name="commit">
|
|
234
197
|
|
|
198
|
+
**First run:**
|
|
235
199
|
```bash
|
|
236
200
|
git add .planning/PROJECT.md .planning/config.json
|
|
237
201
|
git commit -m "$(cat <<'EOF'
|
|
@@ -239,7 +203,18 @@ docs: initialize [project-name]
|
|
|
239
203
|
|
|
240
204
|
[One-liner from PROJECT.md]
|
|
241
205
|
|
|
242
|
-
Creates PROJECT.md with
|
|
206
|
+
Creates PROJECT.md with business context and constraints.
|
|
207
|
+
EOF
|
|
208
|
+
)"
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
**Update mode:**
|
|
212
|
+
```bash
|
|
213
|
+
git add .planning/PROJECT.md .planning/config.json
|
|
214
|
+
git commit -m "$(cat <<'EOF'
|
|
215
|
+
docs: update [project-name] project context
|
|
216
|
+
|
|
217
|
+
[Brief description of what changed]
|
|
243
218
|
EOF
|
|
244
219
|
)"
|
|
245
220
|
```
|
|
@@ -250,31 +225,40 @@ EOF
|
|
|
250
225
|
|
|
251
226
|
Present completion with next steps (see ~/.claude/mindsystem/references/continuation-format.md):
|
|
252
227
|
|
|
228
|
+
**First run:**
|
|
253
229
|
```
|
|
254
230
|
Project initialized:
|
|
255
231
|
|
|
256
232
|
- Project: .planning/PROJECT.md
|
|
257
233
|
- Config: .planning/config.json
|
|
258
234
|
[If .planning/codebase/ exists:] - Codebase: .planning/codebase/ (7 documents)
|
|
235
|
+
```
|
|
259
236
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
237
|
+
**Update mode:**
|
|
238
|
+
```
|
|
239
|
+
Project updated:
|
|
263
240
|
|
|
264
|
-
|
|
241
|
+
- Project: .planning/PROJECT.md
|
|
242
|
+
- Config: .planning/config.json
|
|
243
|
+
```
|
|
265
244
|
|
|
266
|
-
**
|
|
267
|
-
Research ecosystem → define requirements → create roadmap. Discovers standard stacks, expected features, architecture patterns.
|
|
245
|
+
**Routing (both modes):**
|
|
268
246
|
|
|
269
|
-
|
|
247
|
+
```
|
|
248
|
+
---
|
|
270
249
|
|
|
271
|
-
|
|
272
|
-
Skip research, define requirements and create roadmap from what you know.
|
|
250
|
+
## ▶ Next Up
|
|
273
251
|
|
|
274
|
-
`/ms:create
|
|
252
|
+
`/ms:new-milestone` — Discover what to build first, create requirements and roadmap
|
|
275
253
|
|
|
276
254
|
<sub>`/clear` first → fresh context window</sub>
|
|
277
255
|
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
**Also available:**
|
|
259
|
+
- `/ms:config` — Configure code reviewers, gitignore, and other preferences
|
|
260
|
+
[If brownfield detected and no codebase map:] - `/ms:map-codebase` — Analyze existing codebase for technical context
|
|
261
|
+
|
|
278
262
|
---
|
|
279
263
|
```
|
|
280
264
|
|
|
@@ -299,11 +283,12 @@ Update `.planning/STATE.md` Last Command field (if STATE.md exists):
|
|
|
299
283
|
|
|
300
284
|
<success_criteria>
|
|
301
285
|
|
|
302
|
-
- [ ] Deep questioning completed (not rushed, threads followed)
|
|
303
|
-
- [ ] PROJECT.md captures full context with evolutionary structure
|
|
304
|
-
- [ ] Requirements initialized as hypotheses (greenfield) or with inferred Validated (brownfield)
|
|
305
|
-
- [ ] Key Decisions table initialized
|
|
306
|
-
- [ ] config.json has subsystems and code_review settings
|
|
307
286
|
- [ ] All committed to git
|
|
287
|
+
- [ ] config.json has subsystems and code_review settings (existing code_review preserved in update mode)
|
|
288
|
+
- [ ] Validated requirements initialized (empty for greenfield, inferred for brownfield)
|
|
289
|
+
- [ ] Deep questioning completed with business context extracted (or update conversation completed)
|
|
290
|
+
- [ ] PROJECT.md captures product identity (What/Value/Audience/Problem/Differentiation/Flows)
|
|
291
|
+
- [ ] PROJECT.md captures boundaries (Out of Scope, Constraints, Technical Context)
|
|
292
|
+
- [ ] Key Decisions table initialized
|
|
308
293
|
|
|
309
294
|
</success_criteria>
|
|
@@ -25,7 +25,7 @@ One command creates all fix phases — no manual `/ms:add-phase` per gap.
|
|
|
25
25
|
|
|
26
26
|
<context>
|
|
27
27
|
**Audit results:**
|
|
28
|
-
|
|
28
|
+
@.planning/MILESTONE-AUDIT.md
|
|
29
29
|
|
|
30
30
|
**Original intent (for prioritization):**
|
|
31
31
|
@.planning/PROJECT.md
|
|
@@ -41,8 +41,7 @@ Glob: .planning/v*-MILESTONE-AUDIT.md (use most recent)
|
|
|
41
41
|
## 1. Load Audit Results
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
|
|
45
|
-
ls -t .planning/v*-MILESTONE-AUDIT.md 2>/dev/null | head -1
|
|
44
|
+
cat .planning/MILESTONE-AUDIT.md
|
|
46
45
|
```
|
|
47
46
|
|
|
48
47
|
Parse YAML frontmatter to extract structured gaps:
|
|
@@ -105,7 +104,7 @@ New phases continue from there:
|
|
|
105
104
|
```markdown
|
|
106
105
|
## Gap Closure Plan
|
|
107
106
|
|
|
108
|
-
**Milestone:** {
|
|
107
|
+
**Milestone:** {name}
|
|
109
108
|
**Gaps to close:** {N} requirements, {M} integration, {K} flows
|
|
110
109
|
|
|
111
110
|
### Proposed Phases
|
|
@@ -191,7 +190,7 @@ git commit -m "docs(roadmap): add gap closure phases {N}-{M}"
|
|
|
191
190
|
**After all gap phases complete:**
|
|
192
191
|
|
|
193
192
|
`/ms:audit-milestone` — re-audit to verify gaps closed
|
|
194
|
-
`/ms:complete-milestone
|
|
193
|
+
`/ms:complete-milestone` — archive when audit passes
|
|
195
194
|
```
|
|
196
195
|
|
|
197
196
|
## 10. Update Last Command
|
|
@@ -12,6 +12,7 @@ allowed-tools:
|
|
|
12
12
|
- WebFetch
|
|
13
13
|
- mcp__context7__*
|
|
14
14
|
- Task
|
|
15
|
+
- Skill
|
|
15
16
|
---
|
|
16
17
|
|
|
17
18
|
<objective>
|
|
@@ -33,11 +34,11 @@ When invoked with `--gaps`, plans address gaps identified by the verifier. Load
|
|
|
33
34
|
Phase number: $ARGUMENTS (optional - auto-detects next unplanned phase if not provided)
|
|
34
35
|
Gap closure mode: `--gaps` flag triggers gap closure workflow
|
|
35
36
|
|
|
36
|
-
**
|
|
37
|
+
**Resolve phase if provided:**
|
|
37
38
|
```bash
|
|
38
39
|
PHASE_ARG=$(echo "$ARGUMENTS" | grep -oE '^[0-9]+' | head -1)
|
|
39
40
|
if [ -n "$PHASE_ARG" ]; then
|
|
40
|
-
|
|
41
|
+
ms-tools find-phase "$PHASE_ARG"
|
|
41
42
|
fi
|
|
42
43
|
```
|
|
43
44
|
|
|
@@ -91,7 +92,8 @@ Check for `.planning/codebase/` and load relevant documents based on phase type.
|
|
|
91
92
|
- Scan project history via context scanner script (prior decisions, issues, debug resolutions, adhoc learnings, cross-milestone patterns)
|
|
92
93
|
- Break phase into tasks
|
|
93
94
|
- Propose plan grouping (plan boundaries, wave structure, budget estimates) for user review
|
|
94
|
-
-
|
|
95
|
+
- Discover relevant project skills, confirm with user
|
|
96
|
+
- Hand off tasks + proposed grouping + confirmed skills to plan-writer subagent
|
|
95
97
|
- Create PLAN.md file(s) with executable structure
|
|
96
98
|
|
|
97
99
|
**Gap closure mode (--gaps flag):**
|
package/commands/ms/progress.md
CHANGED
|
@@ -129,9 +129,7 @@ DESIGN: [✓ if DESIGN.md exists | - if not]
|
|
|
129
129
|
List files in the current phase directory:
|
|
130
130
|
|
|
131
131
|
```bash
|
|
132
|
-
|
|
133
|
-
ls -1 .planning/phases/[current-phase-dir]/*-SUMMARY.md 2>/dev/null | wc -l
|
|
134
|
-
ls -1 .planning/phases/[current-phase-dir]/*-UAT.md 2>/dev/null | wc -l
|
|
132
|
+
ms-tools list-artifacts [current-phase-number]
|
|
135
133
|
```
|
|
136
134
|
|
|
137
135
|
State: "This phase has {X} plans, {Y} summaries."
|
|
@@ -220,7 +218,7 @@ Check if `{phase}-CONTEXT.md` exists in phase directory.
|
|
|
220
218
|
- `/ms:discuss-phase {phase}` — gather context first
|
|
221
219
|
- `/ms:design-phase {phase}` — create UI/UX specifications
|
|
222
220
|
- `/ms:research-phase {phase}` — investigate unknowns
|
|
223
|
-
- `/ms:
|
|
221
|
+
- `/ms:discuss-phase {phase}` — gather context and validate assumptions
|
|
224
222
|
|
|
225
223
|
---
|
|
226
224
|
```
|
|
@@ -19,15 +19,14 @@ Research how to implement a phase by spawning 3 parallel specialized agents, the
|
|
|
19
19
|
<context>
|
|
20
20
|
Phase number: $ARGUMENTS (required)
|
|
21
21
|
|
|
22
|
-
**
|
|
22
|
+
**Resolve phase:**
|
|
23
23
|
```bash
|
|
24
|
-
|
|
25
|
-
PHASE=$(printf "%02d" "$PHASE_ARG" 2>/dev/null || echo "$PHASE_ARG")
|
|
24
|
+
ms-tools find-phase "$ARGUMENTS"
|
|
26
25
|
```
|
|
27
26
|
|
|
28
27
|
Check for existing research:
|
|
29
28
|
```bash
|
|
30
|
-
|
|
29
|
+
ms-tools check-artifact "$ARGUMENTS" RESEARCH
|
|
31
30
|
```
|
|
32
31
|
</context>
|
|
33
32
|
|
|
@@ -35,11 +34,7 @@ ls .planning/phases/${PHASE}-*/*RESEARCH.md 2>/dev/null
|
|
|
35
34
|
|
|
36
35
|
## 1. Parse and Validate Phase
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
grep -A5 "Phase ${PHASE}:" .planning/ROADMAP.md 2>/dev/null
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
**If not found:** Error and exit. **If found:** Extract phase number, name, description.
|
|
37
|
+
Use `find-phase` output from context. **If phase not found (dir is null):** Error and exit. **If found:** Extract phase number, name, description from ROADMAP.md.
|
|
43
38
|
|
|
44
39
|
## 2. Check Existing Research
|
|
45
40
|
|
|
@@ -128,8 +123,8 @@ Phase Research — External Documentation focus.
|
|
|
128
123
|
<focus>
|
|
129
124
|
Library documentation, APIs, version-specific behavior, verified code examples.
|
|
130
125
|
Use the ms-lookup CLI for library docs and deep research:
|
|
131
|
-
|
|
132
|
-
|
|
126
|
+
ms-lookup docs <library> '<query>'
|
|
127
|
+
ms-lookup deep '<query>'
|
|
133
128
|
Use WebSearch for ecosystem discovery.
|
|
134
129
|
Focus on finding authoritative, current documentation for the libraries and tools
|
|
135
130
|
needed to implement this phase.
|
|
@@ -230,7 +225,7 @@ Phase Research — Best Practices & Community Consensus focus.
|
|
|
230
225
|
<focus>
|
|
231
226
|
Community consensus, common pitfalls, proven approaches, state of the art.
|
|
232
227
|
Use the ms-lookup CLI for deep research on high-value questions:
|
|
233
|
-
|
|
228
|
+
ms-lookup deep '<query>'
|
|
234
229
|
Use WebSearch for community articles, blog posts, Stack Overflow patterns.
|
|
235
230
|
Focus on what practitioners recommend and what mistakes to avoid.
|
|
236
231
|
</focus>
|