mindsystem-cc 3.19.0 → 3.20.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.
@@ -29,9 +29,12 @@ Your job: Transform user vision into concrete, implementable design specificatio
29
29
 
30
30
  | Section | How You Use It |
31
31
  |---------|----------------|
32
- | `## What This Is` | Product type informs design conventions |
32
+ | `## What This Is` | Product identity informs design conventions |
33
33
  | `## Core Value` | The ONE thing design must serve |
34
- | `## Context` | Target audience shapes UX priorities |
34
+ | `## Who It's For` | Target audience shapes UX complexity, language, navigation priorities |
35
+ | `## Core Problem` | Problem being solved — clarifies what UI must address first |
36
+ | `## How It's Different` | Competitive context — prevents generic design |
37
+ | `## Key User Flows` | Primary interactions — drives screen hierarchy and navigation |
35
38
  | `## Constraints` | Technical limits, platform requirements |
36
39
 
37
40
  **ROADMAP.md** — Phase-specific requirements
@@ -16,6 +16,7 @@ Your job: Transform task lists into PLAN.md files following the orchestrator's p
16
16
  **What you receive:**
17
17
  - Task list with needs/creates/tdd_candidate flags
18
18
  - Proposed grouping from orchestrator (plan boundaries, wave assignments, budget estimates)
19
+ - Confirmed skills from user (skill names to embed in plan metadata)
19
20
  - Phase context (number, name, goal, directory, requirements)
20
21
  - Project references (paths to STATE, ROADMAP, CONTEXT, prior summaries)
21
22
  - Relevant learnings from past work (debug resolutions, adhoc insights, established patterns, prior decisions, curated cross-milestone learnings)
@@ -89,6 +90,10 @@ The orchestrator provides structured XML:
89
90
  </plan>
90
91
  </proposed_grouping>
91
92
 
93
+ <confirmed_skills>
94
+ flutter-code-quality, flutter-code-simplification
95
+ </confirmed_skills>
96
+
92
97
  <learnings>
93
98
  <learning type="debug" source=".planning/debug/resolved/n-plus-one-queries.md">Missing eager loading on association chains — fix: Added includes() for all relationship traversals</learning>
94
99
  <learning type="pattern" source=".planning/phases/02-foundation/02-01-SUMMARY.md">All API endpoints use Zod validation on input</learning>
@@ -227,7 +232,7 @@ For each plan, create `.planning/phases/{phase_dir}/{phase}-{plan}-PLAN.md`:
227
232
  ```markdown
228
233
  # Plan {NN}: {Descriptive Title}
229
234
 
230
- **Subsystem:** {subsystem_hint} | **Type:** tdd
235
+ **Subsystem:** {subsystem_hint} | **Type:** tdd | **Skills:** {skill_names}
231
236
 
232
237
  ## Context
233
238
  {Why this work exists. Approach chosen and WHY.}
@@ -255,6 +260,8 @@ For each plan, create `.planning/phases/{phase_dir}/{phase}-{plan}-PLAN.md`:
255
260
 
256
261
  **Format rules:**
257
262
  - Omit `| **Type:** tdd` when type is execute (type defaults to execute)
263
+ - Omit `| **Skills:** ...` when no skills were confirmed (confirmed_skills is "none" or empty)
264
+ - Include `| **Skills:** skill-a, skill-b` when skills were confirmed — apply to ALL plans in the phase
258
265
  - Plans carry no `<execution_context>`, `<context>`, or @-references — the executor loads its own workflow and project files via its agent definition
259
266
  - No `<tasks>`, `<verification>`, `<success_criteria>`, `<output>` XML containers
260
267
 
@@ -118,13 +118,36 @@ Confirm: "Created directory: $phase_dir"
118
118
  Add the new phase entry to the roadmap:
119
119
 
120
120
  1. Find the insertion point (after last phase in current milestone, before "---" separator)
121
- 2. Insert new phase heading:
121
+
122
+ 2. Before writing the phase entry, analyze the description to determine pre-work flags:
123
+
124
+ **Discuss**: Likely when description mentions user-facing features, UX decisions,
125
+ experiential qualities, or novel features. Unlikely for backend/infra, bug fixes,
126
+ technical debt, or clear-cut work.
127
+
128
+ **Design**: Likely when description involves UI work, visual elements, forms,
129
+ dashboards, or multi-screen flows. Unlikely for backend-only, API, infrastructure,
130
+ or established UI patterns.
131
+
132
+ **Research**: Likely when description mentions external APIs/services, new
133
+ libraries/frameworks, or unclear technical approach. Unlikely for established
134
+ internal patterns or well-documented conventions.
135
+
136
+ Use binary Likely/Unlikely with parenthetical reason. Include topics/focus only when Likely.
137
+
138
+ 3. Insert new phase heading with pre-work flags:
122
139
 
123
140
  ```
124
141
  ### Phase {N}: {Description}
125
142
 
126
143
  **Goal:** [To be planned]
127
144
  **Depends on:** Phase {N-1}
145
+ **Discuss**: {Likely (reason) | Unlikely (reason)}
146
+ **Discuss topics**: {topics} ← only if Likely
147
+ **Design**: {Likely (reason) | Unlikely (reason)}
148
+ **Design focus**: {focus} ← only if Likely
149
+ **Research**: {Likely (reason) | Unlikely (reason)}
150
+ **Research topics**: {topics} ← only if Likely
128
151
  **Plans:** 0 plans
129
152
 
130
153
  Plans:
@@ -134,7 +157,7 @@ Add the new phase entry to the roadmap:
134
157
  [To be added during planning]
135
158
  ```
136
159
 
137
- 3. Write updated roadmap back to file
160
+ 4. Write updated roadmap back to file
138
161
 
139
162
  Preserve all other content exactly (formatting, spacing, other phases).
140
163
  </step>
@@ -164,24 +187,13 @@ Phase {N} added to current milestone:
164
187
  Roadmap updated: {roadmap-path}
165
188
  Project state updated: .planning/STATE.md
166
189
 
167
- ---
168
-
169
- ## ▶ Next Up
170
-
171
- **Phase {N}: {description}**
172
-
173
- `/ms:plan-phase {N}`
174
-
175
- <sub>`/clear` first → fresh context window</sub>
190
+ ```
176
191
 
177
- ---
192
+ Read `~/.claude/mindsystem/references/routing/next-phase-routing.md` and follow its instructions
193
+ to present "Next Up" with pre-work context for Phase {N}.
178
194
 
179
- **Also available:**
195
+ After the "Next Up" section, add:
180
196
  - `/ms:add-phase <description>` — add another phase
181
- - Review roadmap
182
-
183
- ---
184
- ```
185
197
  </step>
186
198
 
187
199
  <step name="update_last_command">
@@ -15,8 +15,6 @@ Create design specifications for a phase. Spawns ms-designer agent with phase co
15
15
 
16
16
  **Orchestrator role:** Parse phase, validate against roadmap, check existing design, gather context chain (CONTEXT.md → project UI skill → codebase), adaptive Q&A if gaps, spawn designer agent, enable conversational refinement.
17
17
 
18
- **Why subagent:** Design requires focused attention with quality-forcing patterns. Fresh 200k context for design generation. Main context reserved for user refinement conversation.
19
-
20
18
  **When to use:**
21
19
  - UI-heavy phases with significant new interface work
22
20
  - Novel flows/components not deducible from existing patterns
@@ -108,7 +106,10 @@ grep -A30 "Phase ${PHASE}:" .planning/ROADMAP.md 2>/dev/null
108
106
  Extract from PROJECT.md:
109
107
  - What This Is (product type)
110
108
  - Core Value (design must serve this)
111
- - Context (target audience)
109
+ - Who It's For (target audience and their context)
110
+ - Core Problem (what the design must address)
111
+ - How It's Different (competitive context, differentiators)
112
+ - Key User Flows (primary interactions that drive hierarchy)
112
113
  - Constraints (platform, technical limits)
113
114
 
114
115
  Extract from ROADMAP.md:
@@ -148,18 +149,18 @@ Pass the extracted knowledge to ms-designer in the design prompt (see step 6 `<p
148
149
 
149
150
  ```bash
150
151
  # Platform detection
151
- if [ -f "package.json" ]; then
152
- echo "Platform: Web (package.json found)"
153
- grep -E "react|vue|angular|svelte" package.json 2>/dev/null | head -5
154
- fi
155
-
156
152
  if [ -f "pubspec.yaml" ]; then
157
153
  echo "Platform: Flutter (pubspec.yaml found)"
154
+ # Search Flutter project structure
155
+ find lib -name "*.dart" 2>/dev/null | head -20
156
+ grep -r "colors\|theme\|spacing" lib/ --include="*.dart" 2>/dev/null | head -10
157
+ elif [ -f "package.json" ]; then
158
+ echo "Platform: Web (package.json found)"
159
+ grep -E "react|vue|angular|svelte" package.json 2>/dev/null | head -5
160
+ # Search web project structure
161
+ find src -name "*.tsx" -o -name "*.ts" -o -name "*.jsx" 2>/dev/null | head -20
162
+ grep -r "colors\|theme\|spacing" src/ --include="*.ts" --include="*.tsx" 2>/dev/null | head -10
158
163
  fi
159
-
160
- # Find existing component/theme files
161
- find src -name "*.tsx" -o -name "*.dart" 2>/dev/null | head -20
162
- grep -r "colors\|theme\|spacing" src/ --include="*.ts" --include="*.dart" 2>/dev/null | head -10
163
164
  ```
164
165
 
165
166
  Document discovered patterns for the designer.
@@ -202,8 +203,7 @@ Use AskUserQuestion:
202
203
 
203
204
  **If user selects "Yes":**
204
205
 
205
- Follow mockup-generation workflow:
206
- @~/.claude/mindsystem/workflows/mockup-generation.md
206
+ Read `~/.claude/mindsystem/workflows/mockup-generation.md` and follow the mockup-generation workflow.
207
207
 
208
208
  1. Determine platform from context chain (or ask user)
209
209
  2. Identify primary screen for the phase
@@ -230,11 +230,20 @@ Platform: [Inferred from codebase or PROJECT.md constraints]
230
230
  Phase: [N]: [Phase name from ROADMAP.md]
231
231
 
232
232
  Target audience:
233
- [From PROJECT.md - Context section]
233
+ [From PROJECT.md - Who It's For section]
234
+
235
+ Core problem:
236
+ [From PROJECT.md - Core Problem section]
237
+
238
+ Competitive differentiators:
239
+ [From PROJECT.md - How It's Different section]
234
240
 
235
241
  Core value this design must serve:
236
242
  [From PROJECT.md - Core Value section]
237
243
 
244
+ Primary user flows:
245
+ [From PROJECT.md - Key User Flows section]
246
+
238
247
  Technical constraints:
239
248
  [From PROJECT.md - Constraints section]
240
249
  </design_context>
@@ -329,13 +338,13 @@ User preferences:
329
338
  [If mockups were NOT generated, omit this entire block.]
330
339
  </mockup_direction>
331
340
 
332
- <quality_expectation>
333
- Commercial benchmark: This design must look like a [benchmark] with intentional decisions, not defaults.
341
+ <quality_constraints>
342
+ Specify exact values for every design token colors as hex, spacing in px/dp, typography with weight+size+line-height. No "appropriate", "suitable", or "as needed". Every decision must be explicit and implementable without interpretation.
334
343
 
335
- Pre-emptive criticism: Assume the user will say "This looks like generic AI output." Generate something that proves them wrong.
344
+ Differentiate from platform defaults: if a color, radius, or spacing matches the default system value, choose a deliberate alternative that serves the product's identity.
336
345
 
337
- Accountability check: Could you show this design to a professional UI designer and claim it as skilled work? If not, it's not done.
338
- </quality_expectation>
346
+ Assume the user will say "This looks like generic AI output." Generate something that proves them wrong. Could you show this design to a professional UI designer and claim it as skilled work? If not, it's not done.
347
+ </quality_constraints>
339
348
 
340
349
  <output_specification>
341
350
  Generate: DESIGN.md following template structure
@@ -404,7 +413,7 @@ After initial generation, if user wants to refine:
404
413
 
405
414
  **For major redesigns (multiple aspects changing):**
406
415
 
407
- Use the iteration template from `~/.claude/mindsystem/templates/design-iteration.md`:
416
+ Read `~/.claude/mindsystem/templates/design-iteration.md` and use the iteration template:
408
417
 
409
418
  1. Capture feedback using the structured format:
410
419
  - What worked well (KEEP)
@@ -441,4 +450,5 @@ Update `.planning/STATE.md` Last Command field:
441
450
  - [ ] ms-designer spawned with quality-forcing patterns
442
451
  - [ ] DESIGN.md created with Design Direction, Design Tokens, and Screens sections and committed
443
452
  - [ ] User informed of refinement options and next steps
453
+ - [ ] STATE.md Last Command updated with timestamp
444
454
  </success_criteria>
@@ -133,13 +133,36 @@ Confirm: "Created directory: $phase_dir"
133
133
  Insert the new phase entry into the roadmap:
134
134
 
135
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:
136
+
137
+ 2. Before writing the phase entry, analyze the description to determine pre-work flags:
138
+
139
+ **Discuss**: Likely when description mentions user-facing features, UX decisions,
140
+ experiential qualities, or novel features. Unlikely for backend/infra, bug fixes,
141
+ technical debt, or clear-cut work.
142
+
143
+ **Design**: Likely when description involves UI work, visual elements, forms,
144
+ dashboards, or multi-screen flows. Unlikely for backend-only, API, infrastructure,
145
+ or established UI patterns.
146
+
147
+ **Research**: Likely when description mentions external APIs/services, new
148
+ libraries/frameworks, or unclear technical approach. Unlikely for established
149
+ internal patterns or well-documented conventions.
150
+
151
+ Use binary Likely/Unlikely with parenthetical reason. Include topics/focus only when Likely.
152
+
153
+ 3. Insert new phase heading with (INSERTED) marker and pre-work flags:
137
154
 
138
155
  ```
139
156
  ### Phase {decimal_phase}: {Description} (INSERTED)
140
157
 
141
158
  **Goal:** [Urgent work - to be planned]
142
159
  **Depends on:** Phase {after_phase}
160
+ **Discuss**: {Likely (reason) | Unlikely (reason)}
161
+ **Discuss topics**: {topics} ← only if Likely
162
+ **Design**: {Likely (reason) | Unlikely (reason)}
163
+ **Design focus**: {focus} ← only if Likely
164
+ **Research**: {Likely (reason) | Unlikely (reason)}
165
+ **Research topics**: {topics} ← only if Likely
143
166
  **Plans:** 0 plans
144
167
 
145
168
  Plans:
@@ -149,7 +172,7 @@ Insert the new phase entry into the roadmap:
149
172
  [To be added during planning]
150
173
  ```
151
174
 
152
- 3. Write updated roadmap back to file
175
+ 4. Write updated roadmap back to file
153
176
 
154
177
  The "(INSERTED)" marker helps identify decimal phases as urgent insertions.
155
178
 
@@ -183,24 +206,13 @@ Phase {decimal_phase} inserted after Phase {after_phase}:
183
206
  Roadmap updated: {roadmap-path}
184
207
  Project state updated: .planning/STATE.md
185
208
 
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>
209
+ ```
195
210
 
196
- ---
211
+ Read `~/.claude/mindsystem/references/routing/next-phase-routing.md` and follow its instructions
212
+ to present "Next Up" with pre-work context for Phase {decimal_phase}.
197
213
 
198
- **Also available:**
214
+ After the "Next Up" section, add:
199
215
  - Review insertion impact: Check if Phase {next_integer} dependencies still make sense
200
- - Review roadmap
201
-
202
- ---
203
- ```
204
216
  </step>
205
217
 
206
218
  <step name="update_last_command">
@@ -88,7 +88,7 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
88
88
  - Settled decisions and patterns from knowledge files
89
89
  - Untested assumptions from previous audit
90
90
  - Unaddressed requirements from previous milestones
91
- - Strategic features inferred from PROJECT.md's problem/audience/USP
91
+ - Strategic features inferred from PROJECT.md: Who It's For, Core Problem, How It's Different
92
92
  - Pending todos from STATE.md
93
93
 
94
94
  If no meaningful artifacts exist (first milestone after v1.0), base suggestions purely on PROJECT.md.
@@ -199,8 +199,8 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
199
199
  - [Feature 3]
200
200
  ```
201
201
 
202
- Update Active requirements section with new goals.
203
202
  Update "Last updated" footer.
203
+ Note: Milestone-specific goals live in MILESTONE-CONTEXT.md (step 15), not in PROJECT.md.
204
204
 
205
205
  15. **Write MILESTONE-CONTEXT.md:**
206
206
 
@@ -285,7 +285,6 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
285
285
 
286
286
  <success_criteria>
287
287
  - PROJECT.md updated with Current Milestone section
288
- - Active requirements reflect new milestone goals
289
288
  - MILESTONE-CONTEXT.md created with vision, features, scope, priorities
290
289
  - STATE.md reset for new milestone
291
290
  - Git commit made
@@ -94,31 +94,32 @@ Exit command.
94
94
 
95
95
  Ask inline (freeform, NOT AskUserQuestion):
96
96
 
97
- "What do you want to build?"
97
+ - **Greenfield** (no existing code): "What do you want to build?"
98
+ - **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?"
99
+
100
+ For brownfield, explicitly note: "Not the next feature — the product as a whole."
98
101
 
99
102
  Wait for their response. This gives you the context needed to ask intelligent follow-up questions.
100
103
 
104
+ **Derive business context:**
105
+
106
+ After the initial response, infer business context before asking more questions. Present inferred audience/problem/differentiation for the user to react to:
107
+
108
+ "It sounds like this is for [audience] dealing with [problem], and your approach is different because [differentiation]. Sound right?"
109
+
110
+ This leverages what they've already said and gives them something concrete to react to.
111
+
101
112
  **Follow the thread:**
102
113
 
103
114
  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
115
 
105
- Keep following threads. Each answer opens new threads to explore. Ask about:
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
116
+ Track coverage against the 6-item context checklist from `questioning.md`. Probe fuzziest areas first spend questioning budget where clarity is lowest.
111
117
 
112
- Consult `questioning.md` for techniques:
113
- - Challenge vagueness
114
- - Make abstract concrete
115
- - Surface assumptions
116
- - Find edges
117
- - Reveal motivation
118
+ 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
119
 
119
- **Check context (background, not out loud):**
120
+ 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
121
 
121
- As you go, mentally check the context checklist from `questioning.md`. If gaps remain, weave questions naturally. Don't suddenly switch to checklist mode.
122
+ Consult `questioning.md` for techniques — challenge vagueness, derive before asking, use grounding questions over template-shaped questions.
122
123
 
123
124
  **Decision gate:**
124
125
 
@@ -142,54 +143,31 @@ Synthesize all context into `.planning/PROJECT.md` using the template from `temp
142
143
 
143
144
  **For greenfield projects:**
144
145
 
145
- Initialize requirements as hypotheses:
146
-
147
- ```markdown
148
- ## Requirements
149
-
150
- ### Validated
151
-
152
- (None yetship to validate)
153
-
154
- ### Active
155
-
156
- - [ ] [Requirement 1]
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.
146
+ Initialize all sections from questioning:
147
+ - **What This Is** — product identity from questioning
148
+ - **Core Value** — the ONE thing from questioning
149
+ - **Who It's For** — target audience from questioning
150
+ - **Core Problem** — pain or desire from questioning
151
+ - **How It's Different** — differentiators from questioning
152
+ - **Key User Flows** — core interactions from questioning
153
+ - **Out of Scope** boundaries from questioning
154
+ - **Constraints** — hard limits from questioning
155
+ - **Technical Context** — minimal for greenfield (stack choices if discussed)
156
+ - **Validated** — `(None yet — ship to validate)`
157
+ - **Key Decisions** any decisions made during questioning
167
158
 
168
159
  **For brownfield projects (codebase map exists):**
169
160
 
170
- Infer Validated requirements from existing code:
161
+ Same as greenfield, plus:
171
162
 
172
163
  1. Read `.planning/codebase/ARCHITECTURE.md` and `STACK.md`
173
- 2. Identify what the codebase already does
174
- 3. These become the initial Validated set
164
+ 2. Infer Validated requirements from existing code — what the codebase already does
165
+ 3. Populate Technical Context from codebase map (stack, integrations, known debt)
175
166
 
176
167
  ```markdown
177
- ## Requirements
178
-
179
- ### Validated
180
-
168
+ ## Validated
181
169
  - ✓ [Existing capability 1] — existing
182
170
  - ✓ [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
171
  ```
194
172
 
195
173
  **Key Decisions:**
@@ -239,7 +217,7 @@ docs: initialize [project-name]
239
217
 
240
218
  [One-liner from PROJECT.md]
241
219
 
242
- Creates PROJECT.md with requirements and constraints.
220
+ Creates PROJECT.md with business context and constraints.
243
221
  EOF
244
222
  )"
245
223
  ```
@@ -261,19 +239,14 @@ Project initialized:
261
239
 
262
240
  ## ▶ Next Up
263
241
 
264
- Choose your path:
265
-
266
- **Option A: Research first** (recommended)
267
- Research ecosystem → define requirements → create roadmap. Discovers standard stacks, expected features, architecture patterns.
268
-
269
- `/ms:research-project`
242
+ `/ms:new-milestone` Discover what to build first, create requirements and roadmap
270
243
 
271
- **Option B: Define requirements and roadmap directly** (familiar domains)
272
- Skip research, define requirements and create roadmap from what you know.
244
+ <sub>`/clear` first fresh context window</sub>
273
245
 
274
- `/ms:create-roadmap`
246
+ ---
275
247
 
276
- <sub>`/clear` first → fresh context window</sub>
248
+ **Also available:**
249
+ - `/ms:create-roadmap` — Skip milestone discovery, define requirements and roadmap directly
277
250
 
278
251
  ---
279
252
  ```
@@ -299,9 +272,10 @@ Update `.planning/STATE.md` Last Command field (if STATE.md exists):
299
272
 
300
273
  <success_criteria>
301
274
 
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)
275
+ - [ ] Deep questioning completed with business context extracted
276
+ - [ ] PROJECT.md captures product identity (What/Value/Audience/Problem/Differentiation/Flows)
277
+ - [ ] PROJECT.md captures boundaries (Out of Scope, Constraints, Technical Context)
278
+ - [ ] Validated requirements initialized (empty for greenfield, inferred for brownfield)
305
279
  - [ ] Key Decisions table initialized
306
280
  - [ ] config.json has subsystems and code_review settings
307
281
  - [ ] All committed to git
@@ -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>
@@ -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
- - Hand off tasks + proposed grouping to plan-writer subagent
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):**
@@ -43,7 +43,7 @@ Details referencing existing utilities: "Use `comparePassword` in `src/lib/crypt
43
43
  | Section | Purpose | Required |
44
44
  |---------|---------|----------|
45
45
  | `# Plan NN: Title` | H1 with plan number and descriptive title | Yes |
46
- | `**Subsystem:** X \| **Type:** Y` | Inline metadata (replaces YAML frontmatter) | Yes (type defaults to `execute`) |
46
+ | `**Subsystem:** X \| **Type:** Y \| **Skills:** Z` | Inline metadata (replaces YAML frontmatter) | Yes (type defaults to `execute`, skills optional) |
47
47
  | `## Context` | Why this work exists, why this approach | Yes |
48
48
  | `## Changes` | Numbered subsections with files and implementation details | Yes |
49
49
  | `## Verification` | Bash commands and observable checks | Yes |
@@ -130,6 +130,15 @@ Matches vocabulary from the project's `config.json`. Used by the executor when g
130
130
 
131
131
  When `**Type:**` is omitted, the plan defaults to `execute`.
132
132
 
133
+ ### Skills
134
+
135
+ | Value | Behavior |
136
+ |-------|----------|
137
+ | *(omitted)* | No skills loaded. Skill discovery happens during `/ms:plan-phase` — absence means none were relevant. |
138
+ | `skill-a, skill-b` | Executor invokes listed skills via Skill tool before implementing. |
139
+
140
+ Skills are confirmed by the user during `/ms:plan-phase` and encoded into plans. Comma-separated list of skill names matching entries in the system-reminder.
141
+
133
142
  ---
134
143
 
135
144
  ## Must-Haves Specification
@@ -190,6 +199,7 @@ Execution order lives in a single `EXECUTION-ORDER.md` file alongside the plans.
190
199
  | What triggers TDD lazy-loading? | `**Type:** tdd` in inline metadata |
191
200
  | How does the executor know why an approach was chosen? | Reads `## Context` section |
192
201
  | How does the executor find existing utilities? | Reads `**Files:**` lines and inline references in `## Changes` |
202
+ | What triggers skill loading in executor? | `**Skills:**` in inline metadata. No skills loaded if omitted. |
193
203
 
194
204
  ---
195
205
 
@@ -16,9 +16,10 @@ Don't interrogate. Collaborate. Don't follow a script. Follow the thread.
16
16
 
17
17
  By the end of questioning, you need enough clarity to write a PROJECT.md that downstream phases can act on:
18
18
 
19
- - **research-project** needs: what domain to research, what the user already knows, what unknowns exist
20
- - **create-roadmap** needs: clear enough vision to decompose into phases, what "done" looks like
21
- - **plan-phase** needs: specific requirements to break into tasks, context for implementation choices
19
+ - **research-project** needs: product domain, target audience, core problem, what unknowns exist
20
+ - **create-roadmap** needs: clear vision with business context grounding — who it's for, what problem it solves, how it's different — to decompose into phases
21
+ - **plan-phase** needs: audience context for task weighting, specific requirements for implementation choices
22
+ - **discuss-phase** needs: business context for PO-style analysis — audience, problem, differentiation inform scope recommendations
22
23
  - **execute-phase** needs: success criteria to verify against, the "why" behind requirements
23
24
 
24
25
  A vague PROJECT.md forces every downstream phase to guess. The cost compounds.
@@ -37,13 +38,17 @@ A vague PROJECT.md forces every downstream phase to guess. The cost compounds.
37
38
 
38
39
  **Clarify ambiguity.** "When you say Z, do you mean A or B?" "You mentioned X — tell me more."
39
40
 
41
+ **Brownfield reframing.** For brownfield projects, reframe to product-level before feature-level. "Tell me about this project" not "What do you want to build?" Users with existing codebases default to describing the next feature — redirect to the product as a whole first.
42
+
43
+ **Derive before asking.** Infer business context from feature descriptions before asking directly. "You described X, Y, Z — it sounds like this is for [audience] dealing with [problem]. Sound right?" This leverages what they've already said and gives them something concrete to react to.
44
+
40
45
  **Know when to stop.** When you understand what they want, why they want it, who it's for, and what done looks like — offer to proceed.
41
46
 
42
47
  </how_to_question>
43
48
 
44
49
  <highest_leverage>
45
50
 
46
- These three questions unlock the most downstream value. Everything else is nice-to-have context.
51
+ These four questions unlock the most downstream value. Everything else is nice-to-have context.
47
52
 
48
53
  1. **"What does done look like?"** — Without observable outcomes, every downstream phase guesses scope. Roadmap can't decompose, plans can't verify, execution can't stop.
49
54
 
@@ -51,7 +56,9 @@ These three questions unlock the most downstream value. Everything else is nice-
51
56
 
52
57
  3. **"What already exists / what can't change?"** — Constraints and existing code prevent planning in a vacuum. Surfaces brownfield reality, API limitations, time pressure.
53
58
 
54
- If you only get three answers, get these three.
59
+ 4. **"How will you know this is a success?"** — Reveals what actually matters: commercial viability, reliability, user experience, personal satisfaction. Informs Core Value and the weighting of all sections.
60
+
61
+ If you only get four answers, get these four.
55
62
 
56
63
  </highest_leverage>
57
64
 
@@ -109,16 +116,49 @@ User mentions "frustrated with current tools"
109
116
 
110
117
  </using_askuserquestion>
111
118
 
119
+ <clarity_adaptive>
120
+
121
+ Clarity is non-uniform across dimensions. Track per-section, not globally. Spend questioning budget where clarity is lowest.
122
+
123
+ **High clarity signals:** Specific demographics, named competitors, concrete scenarios, quantifiable outcomes, clear success metrics.
124
+ → Confirm and move on. Probe one level deeper to test robustness at most.
125
+
126
+ **Low clarity signals:** Broad categories ("developers", "small businesses"), vague benefits ("makes things easier"), no competitor awareness ("nothing else does this"), feature-focused language, hedging ("I think", "maybe").
127
+ → Offer frameworks. Provide concrete options via AskUserQuestion with derived options. Use scenarios to ground.
128
+
129
+ If audience is crystal-clear but differentiation is fuzzy, probe differentiation — don't revisit audience.
130
+
131
+ </clarity_adaptive>
132
+
133
+ <grounding_questions>
134
+
135
+ Grounding questions produce better answers than template-shaped questions. Use these instead of asking directly for template sections.
136
+
137
+ | Section | Don't Ask | Ask Instead |
138
+ |---------|-----------|-------------|
139
+ | Who It's For | "Who is your target audience?" | "Who would be your first 10 users — real people you'd tell tomorrow?" |
140
+ | Core Problem | "What problem does this solve?" | "What triggered you to want to build this? What's broken today?" |
141
+ | How It's Different | "What's your USP?" | "What are people using today instead? What's wrong with it?" |
142
+ | Core Value | "What's most important?" | "If only ONE thing worked perfectly and everything else was mediocre, what would that one thing be?" |
143
+ | Key User Flows | "What are the key flows?" | "Walk me through a session. You open the app — then what?" |
144
+ | Success | "How do you define success?" | "Imagine this is wildly successful in a year. What does that look like?" |
145
+
146
+ People articulate by reacting, not generating.
147
+
148
+ </grounding_questions>
149
+
112
150
  <context_checklist>
113
151
 
114
152
  Use this as a **background checklist**, not a conversation structure. Check these mentally as you go. If gaps remain, weave questions naturally.
115
153
 
116
154
  - [ ] What they're building (concrete enough to explain to a stranger)
117
155
  - [ ] Why it needs to exist (the problem or desire driving it)
118
- - [ ] Who it's for (even if just themselves)
119
- - [ ] What "done" looks like (observable outcomes)
156
+ - [ ] Who it's for (specific enough to find 10 of these people)
157
+ - [ ] What makes it different (from alternatives, even manual ones)
158
+ - [ ] What users actually do (2-3 core interactions)
159
+ - [ ] What success looks like (how they'll know it worked)
120
160
 
121
- Four things. If they volunteer more, capture it.
161
+ Six things. If they volunteer more, capture it.
122
162
 
123
163
  </context_checklist>
124
164
 
@@ -148,6 +188,8 @@ Loop until "Create PROJECT.md" selected.
148
188
  - **Shallow acceptance** — Taking vague answers without probing
149
189
  - **Premature constraints** — Asking about tech stack before understanding the idea
150
190
  - **User skills** — NEVER ask about user's technical experience. Claude builds.
191
+ - **Accepting "everyone" as audience** — Always narrow: "Who needs this MOST?" Broad audiences are a sign of fuzzy thinking, not universal appeal.
192
+ - **Skipping differentiation** — "Nothing else does this" is almost always wrong. Probe alternatives including manual workarounds, spreadsheets, competitor products.
151
193
 
152
194
  </anti_patterns>
153
195
 
@@ -8,60 +8,50 @@ Template for `.planning/PROJECT.md` — the living project context document.
8
8
  # [Project Name]
9
9
 
10
10
  ## What This Is
11
-
12
- [Current accurate description — 2-3 sentences. What does this product do and who is it for?
13
- Use the user's language and framing. Update whenever reality drifts from this description.]
11
+ [2-3 sentences. Product identity in plain language.]
14
12
 
15
13
  ## Core Value
14
+ [Single sentence: the ONE thing that cannot fail.]
16
15
 
17
- [The ONE thing that matters most. If everything else fails, this must work.
18
- One sentence that drives prioritization when tradeoffs arise.]
19
-
20
- ## Requirements
21
-
22
- ### Validated
23
-
24
- <!-- Shipped and confirmed valuable. -->
25
-
26
- (None yet — ship to validate)
27
-
28
- ### Active
29
-
30
- <!-- Current scope. Building toward these. -->
16
+ ## Who It's For
17
+ [Target audience who they are, their context, how they work today. 2-4 sentences.]
31
18
 
32
- - [ ] [Requirement 1]
33
- - [ ] [Requirement 2]
34
- - [ ] [Requirement 3]
19
+ ## Core Problem
20
+ [Why this exists — what pain or desire drives it. 1-2 sentences.]
35
21
 
36
- ### Out of Scope
22
+ ## How It's Different
23
+ [What makes this not another [category]. Include competitive context if relevant.]
24
+ - [Differentiator 1]
25
+ - [Differentiator 2]
26
+ - [Differentiator 3]
37
27
 
38
- <!-- Explicit boundaries. Includes reasoning to prevent re-adding. -->
28
+ ## Key User Flows
29
+ [The 2-3 core interactions users perform.]
30
+ - [Flow 1]
31
+ - [Flow 2]
32
+ - [Flow 3]
39
33
 
34
+ ## Out of Scope
40
35
  - [Exclusion 1] — [why]
41
36
  - [Exclusion 2] — [why]
42
37
 
43
- ## Context
44
-
45
- [Background information that informs implementation:
46
- - Technical environment or ecosystem
47
- - Relevant prior work or experience
48
- - User research or feedback themes
49
- - Known issues to address]
50
-
51
38
  ## Constraints
52
-
53
39
  - **[Type]**: [What] — [Why]
54
40
  - **[Type]**: [What] — [Why]
55
41
 
56
42
  Common types: Tech stack, Timeline, Budget, Dependencies, Compatibility, Performance, Security
57
43
 
58
- ## Key Decisions
44
+ ## Technical Context
45
+ [Tech stack, integrations, prior work, known issues/debt.]
59
46
 
60
- <!-- Decisions that constrain future work. Add throughout project lifecycle. -->
47
+ ## Validated
48
+ (None yet — ship to validate)
49
+
50
+ ## Key Decisions
61
51
 
62
52
  | Decision | Rationale | Outcome |
63
53
  |----------|-----------|---------|
64
- | [Choice] | [Why] | [✓ Good / ⚠️ Revisit / — Pending] |
54
+ | [Choice] | [Why] | — Pending |
65
55
 
66
56
  ---
67
57
  *Last updated: [date] after [trigger]*
@@ -83,32 +73,51 @@ Common types: Tech stack, Timeline, Budget, Dependencies, Compatibility, Perform
83
73
  - Drives prioritization when tradeoffs arise
84
74
  - Rarely changes; if it does, it's a significant pivot
85
75
 
86
- **Requirements Validated:**
87
- - Requirements that shipped and proved valuable
88
- - Format: `- [Requirement] [version/phase]`
89
- - These are lockedchanging them requires explicit discussion
90
-
91
- **Requirements — Active:**
92
- - Current scope being built toward
93
- - These are hypotheses until shipped and validated
94
- - Move to Validated when shipped, Out of Scope if invalidated
95
-
96
- **Requirements Out of Scope:**
76
+ **Who It's For:**
77
+ - Specific enough to find 10 of these people
78
+ - Include their context: what they do today, what tools they use, what frustrates them
79
+ - Avoid broad categories ("developers", "small businesses") narrow to who needs this MOST
80
+ - Update as real user data replaces assumptions
81
+
82
+ **Core Problem:**
83
+ - The pain or desire that makes this product necessary
84
+ - Should explain why existing alternatives don't suffice
85
+ - One sentence is better than two — forces precision
86
+ - If you can't articulate the problem, the product isn't ready to build
87
+
88
+ **How It's Different:**
89
+ - 2-3 concrete differentiators, not marketing language
90
+ - Include what people use today instead (even manual workarounds)
91
+ - "Nothing else does this" is almost always wrong — probe alternatives
92
+ - Competitive context folds in here — no standalone section needed
93
+
94
+ **Key User Flows:**
95
+ - The 2-3 core interactions that make the product valuable
96
+ - One line each — verb-driven ("Log workout → view history → track progress")
97
+ - Bridges abstract identity and concrete architecture
98
+ - Update as flows are validated or new ones emerge
99
+
100
+ **Out of Scope:**
97
101
  - Explicit boundaries on what we're not building
98
102
  - Always include reasoning (prevents re-adding later)
99
103
  - Includes: considered and rejected, deferred to future, explicitly excluded
100
104
 
101
- **Context:**
102
- - Background that informs implementation decisions
103
- - Technical environment, prior work, user feedback
104
- - Known issues or technical debt to address
105
- - Update as new context emerges
106
-
107
105
  **Constraints:**
108
106
  - Hard limits on implementation choices
109
107
  - Tech stack, timeline, budget, compatibility, dependencies
110
108
  - Include the "why" — constraints without rationale get questioned
111
109
 
110
+ **Technical Context:**
111
+ - Background that informs implementation decisions
112
+ - Tech stack, integrations, prior work, known issues/debt
113
+ - Update as new technical context emerges
114
+ - Purely technical — business context lives in Layer 1 sections
115
+
116
+ **Validated:**
117
+ - Requirements that shipped and proved valuable
118
+ - Format: `- ✓ [Requirement] — [version/phase]`
119
+ - These are locked — changing them requires explicit discussion
120
+
112
121
  **Key Decisions:**
113
122
  - Significant choices that affect future work
114
123
  - Add decisions as they're made throughout the project
@@ -131,15 +140,17 @@ PROJECT.md evolves throughout the project lifecycle.
131
140
  **After each phase transition:**
132
141
  1. Requirements invalidated? → Move to Out of Scope with reason
133
142
  2. Requirements validated? → Move to Validated with phase reference
134
- 3. New requirements emerged? → Add to Active
135
- 4. Decisions to log? → Add to Key Decisions
136
- 5. "What This Is" still accurate? → Update if drifted
143
+ 3. Decisions to log? → Add to Key Decisions
144
+ 4. "What This Is" still accurate? → Update if drifted
145
+ 5. Has understanding of audience, problem, or differentiation evolved? → Update Who It's For, Core Problem, or How It's Different
146
+ 6. New key flows emerged? → Update Key User Flows
137
147
 
138
148
  **After each milestone:**
139
- 1. Full review of all sections
149
+ 1. Full review of all sections including business context (Who It's For, Core Problem, How It's Different)
140
150
  2. Core Value check — still the right priority?
141
151
  3. Audit Out of Scope — reasons still valid?
142
- 4. Update Context with current state (users, feedback, metrics)
152
+ 4. Update Technical Context with current state (users, feedback, metrics)
153
+ 5. Key User Flows — validated against what users actually do?
143
154
 
144
155
  </evolution>
145
156
 
@@ -154,15 +165,10 @@ For existing codebases:
154
165
  - What patterns are established?
155
166
  - What's clearly working and relied upon?
156
167
 
157
- 3. **Gather Active requirements** from user:
158
- - Present inferred current state
159
- - Ask what they want to build next
160
-
161
- 4. **Initialize:**
168
+ 3. **Initialize:**
162
169
  - Validated = inferred from existing code
163
- - Active = user's goals for this work
164
170
  - Out of Scope = boundaries user specifies
165
- - Context = includes current codebase state
171
+ - Technical Context = populated from codebase map
166
172
 
167
173
  </brownfield>
168
174
 
@@ -184,30 +184,31 @@ cat .planning/phases/*-*/*-SUMMARY.md
184
184
  3. **Requirements audit:**
185
185
 
186
186
  **Validated section:**
187
- - All Active requirements shipped in this milestone → Move to Validated
187
+ - All requirements shipped in this milestone → Add to Validated
188
188
  - Format: `- ✓ [Requirement] — v[X.Y]`
189
189
 
190
- **Active section:**
191
- - Remove requirements that moved to Validated
192
- - Add any new requirements for next milestone
193
- - Keep requirements that weren't addressed yet
194
-
195
190
  **Out of Scope audit:**
196
191
  - Review each item — is the reasoning still valid?
197
192
  - Remove items that are no longer relevant
198
193
  - Add any requirements invalidated during this milestone
199
194
 
200
- 4. **Context update:**
195
+ 4. **Business context review:**
196
+ - Who It's For — has understanding of audience evolved?
197
+ - Core Problem — still the right framing?
198
+ - How It's Different — new competitors or differentiators?
199
+ - Key User Flows — validated against what users actually do?
200
+
201
+ 5. **Technical Context update:**
201
202
  - Current codebase state (LOC, tech stack)
202
203
  - User feedback themes (if any)
203
204
  - Known issues or technical debt to address
204
205
 
205
- 5. **Key Decisions audit:**
206
+ 6. **Key Decisions audit:**
206
207
  - Extract all decisions from milestone phase summaries
207
208
  - Add to Key Decisions table with outcomes where known
208
209
  - Mark ✓ Good, ⚠️ Revisit, or — Pending for each
209
210
 
210
- 6. **Constraints check:**
211
+ 7. **Constraints check:**
211
212
  - Any constraints that changed during development?
212
213
  - Update as needed
213
214
 
@@ -233,20 +234,16 @@ A real-time collaborative whiteboard for remote teams.
233
234
 
234
235
  Real-time sync that feels instant.
235
236
 
236
- ## Requirements
237
+ ## Who It's For
237
238
 
238
- ### Validated
239
-
240
- (None yet — ship to validate)
239
+ Remote teams who need to brainstorm visually during meetings.
240
+ Currently using Miro or physical whiteboards.
241
241
 
242
- ### Active
242
+ ## Validated
243
243
 
244
- - [ ] Canvas drawing tools
245
- - [ ] Real-time sync < 500ms
246
- - [ ] User authentication
247
- - [ ] Export to PNG
244
+ (None yet ship to validate)
248
245
 
249
- ### Out of Scope
246
+ ## Out of Scope
250
247
 
251
248
  - Mobile app — web-first approach
252
249
  - Video chat — use external tools
@@ -263,27 +260,24 @@ A real-time collaborative whiteboard for remote teams with instant sync and draw
263
260
 
264
261
  Real-time sync that feels instant.
265
262
 
266
- ## Requirements
263
+ ## Who It's For
264
+
265
+ Remote teams (2-8 people) who brainstorm visually during meetings.
266
+ Currently using Miro but frustrated by complexity and latency.
267
267
 
268
- ### Validated
268
+ ## Validated
269
269
 
270
270
  - ✓ Canvas drawing tools — v1.0
271
271
  - ✓ Real-time sync < 500ms — v1.0 (achieved 200ms avg)
272
272
  - ✓ User authentication — v1.0
273
273
 
274
- ### Active
275
-
276
- - [ ] Export to PNG
277
- - [ ] Undo/redo history
278
- - [ ] Shape tools (rectangles, circles)
279
-
280
- ### Out of Scope
274
+ ## Out of Scope
281
275
 
282
276
  - Mobile app — web-first approach, PWA works well
283
277
  - Video chat — use external tools
284
278
  - Offline mode — real-time is core value
285
279
 
286
- ## Context
280
+ ## Technical Context
287
281
 
288
282
  Shipped v1.0 with 2,400 LOC TypeScript.
289
283
  Tech stack: Next.js, Supabase, Canvas API.
@@ -294,10 +288,10 @@ Initial user testing showed demand for shape tools.
294
288
 
295
289
  - [ ] "What This Is" reviewed and updated if needed
296
290
  - [ ] Core Value verified as still correct
297
- - [ ] All shipped requirements moved to Validated
298
- - [ ] New requirements added to Active for next milestone
291
+ - [ ] All shipped requirements added to Validated
292
+ - [ ] Business context reviewed (Who It's For, Core Problem, How It's Different, Key User Flows)
299
293
  - [ ] Out of Scope reasoning audited
300
- - [ ] Context updated with current state
294
+ - [ ] Technical Context updated with current state
301
295
  - [ ] All milestone decisions added to Key Decisions
302
296
  - [ ] "Last updated" footer reflects milestone completion
303
297
 
@@ -626,7 +620,7 @@ Tag: v[X.Y]
626
620
 
627
621
  Milestone completion is successful when (ordered by skip risk):
628
622
 
629
- - [ ] PROJECT.md full evolution review completed (What This Is, Core Value, Requirements, Key Decisions, Context)
623
+ - [ ] PROJECT.md full evolution review completed (What This Is, Core Value, business context, Validated, Key Decisions, Technical Context)
630
624
  - [ ] All shipped requirements moved to Validated in PROJECT.md
631
625
  - [ ] Key Decisions updated with outcomes
632
626
  - [ ] MILESTONES.md entry created with stats and accomplishments
@@ -28,7 +28,7 @@ cat .planning/STATE.md 2>/dev/null
28
28
  <step name="load_plan">
29
29
  Read the plan file provided in your prompt context.
30
30
 
31
- Parse inline metadata from header: `**Subsystem:**` and `**Type:**` values.
31
+ Parse inline metadata from header: `**Subsystem:**`, `**Type:**`, and `**Skills:**` values.
32
32
 
33
33
  Parse plan sections:
34
34
  - Context (files to read, @-references)
@@ -44,11 +44,9 @@ Parse plan sections:
44
44
  </step>
45
45
 
46
46
  <step name="load_skills">
47
- Scan the skill list in your system message for skills matching the plan's technology or domain. Invoke each match via the Skill tool before proceeding skills contain project-specific conventions and patterns that change what you produce during implementation.
47
+ **If `**Skills:**` is present in plan metadata:** Invoke each listed skill via the Skill tool before proceeding. These were confirmed by the user during planning load them without further confirmation.
48
48
 
49
- - One clear match invoke it directly
50
- - Multiple candidates → use AskUserQuestion to let the user choose
51
- - No match → proceed without
49
+ **If `**Skills:**` is absent:** Proceed without loading skills. Skill discovery happens during `/ms:plan-phase` absence means no skills were relevant.
52
50
  </step>
53
51
 
54
52
  <step name="execute">
@@ -389,7 +389,9 @@ Standard tasks (remain in standard plans):
389
389
  → Yes: Mark as tdd_candidate=true
390
390
  → No: Standard task
391
391
 
392
- Read `~/.claude/mindsystem/references/tdd.md` now for TDD criteria and plan structure.
392
+ **If any tasks were marked tdd_candidate=true:** Read `~/.claude/mindsystem/references/tdd.md` for TDD plan structure guidance.
393
+
394
+ **If no TDD candidates:** Skip — the heuristic above is sufficient for detection.
393
395
 
394
396
  **Decisions:** If you identify a task that requires choosing between approaches (which auth provider, which database, etc.), use AskUserQuestion to resolve it now. Don't defer decisions to execution. For purely technical choices where the user hasn't expressed preference, make the decision and document it in the plan's objective.
395
397
 
@@ -450,6 +452,25 @@ The user may adjust, merge, or split plans. Once confirmed (or if the user proce
450
452
  **TDD plans are always standalone** — propose them as dedicated plans regardless of budget.
451
453
  </step>
452
454
 
455
+ <step name="discover_skills">
456
+ **Identify relevant project skills for this phase.**
457
+
458
+ After the user confirms the plan structure, check if project skills could improve plan quality.
459
+
460
+ **Scan:** Review the skill list in your system-reminder. Match skills against:
461
+ - The phase's technology stack (Flutter, React, Node.js, etc.)
462
+ - The domain of the tasks identified (UI patterns, API design, state management, etc.)
463
+ - Keywords from RESEARCH.md or CONTEXT.md if they exist
464
+
465
+ **If matches found:** Present via AskUserQuestion:
466
+ - List each matching skill with its description
467
+ - Always include an escape hatch option for the user to name skills manually or skip entirely
468
+
469
+ **If no matches:** Skip silently — no need to ask the user.
470
+
471
+ **Store result:** Keep the confirmed skill names (may be empty) for the handoff step.
472
+ </step>
473
+
453
474
  <step name="handoff_to_writer">
454
475
  **Spawn ms-plan-writer subagent with task list and context.**
455
476
 
@@ -500,6 +521,10 @@ Assemble handoff payload:
500
521
  {list of services detected in task breakdown}
501
522
  </external_services>
502
523
 
524
+ <confirmed_skills>
525
+ {comma-separated skill names confirmed by user, or "none"}
526
+ </confirmed_skills>
527
+
503
528
  <learnings>
504
529
  <!-- Flat list from read_project_history step 6. Omit if no matches found. -->
505
530
  <learning type="debug" source=".planning/debug/resolved/{slug}.md">{root_cause} — fix: {resolution}</learning>
@@ -699,7 +724,7 @@ Tasks are instructions for Claude, not Jira tickets.
699
724
  - [ ] Prior decisions, issues, concerns synthesized
700
725
  - [ ] Tasks identified with needs/creates dependencies
701
726
  - [ ] Plan grouping proposed and presented to user
702
- - [ ] Task list + proposed grouping handed off to ms-plan-writer
727
+ - [ ] Task list + proposed grouping + confirmed skills handed off to ms-plan-writer
703
728
  - [ ] PLAN files + EXECUTION-ORDER.md created (pure markdown, Must-Haves, follows proposed grouping)
704
729
  - [ ] Plans committed with maximized wave parallelism
705
730
  - [ ] Risk assessment presented (score + top factors)
@@ -141,16 +141,17 @@ cat .planning/phases/XX-current/*-SUMMARY.md
141
141
  **Assess requirement changes:**
142
142
 
143
143
  1. **Requirements validated?**
144
- - Any Active requirements shipped in this phase?
145
- - Move to Validated with phase reference: `- ✓ [Requirement] — Phase X`
144
+ - Any requirements shipped in this phase?
145
+ - Add to Validated with phase reference: `- ✓ [Requirement] — Phase X`
146
146
 
147
147
  2. **Requirements invalidated?**
148
- - Any Active requirements discovered to be unnecessary or wrong?
149
- - Move to Out of Scope with reason: `- [Requirement] — [why invalidated]`
148
+ - Any requirements discovered to be unnecessary or wrong?
149
+ - Add to Out of Scope with reason: `- [Requirement] — [why invalidated]`
150
150
 
151
- 3. **Requirements emerged?**
152
- - Any new requirements discovered during building?
153
- - Add to Active: `- [ ] [New requirement]`
151
+ 3. **Business context evolved?**
152
+ - Has understanding of audience, problem, or differentiation changed?
153
+ - Update Who It's For, Core Problem, or How It's Different if so
154
+ - New key flows emerged? → Update Key User Flows
154
155
 
155
156
  4. **Decisions to log?**
156
157
  - Extract decisions from SUMMARY.md files
@@ -174,13 +175,11 @@ Make the edits inline. Update "Last updated" footer:
174
175
  Before:
175
176
 
176
177
  ```markdown
177
- ### Active
178
+ ## Validated
178
179
 
179
- - [ ] JWT authentication
180
- - [ ] Real-time sync < 500ms
181
- - [ ] Offline mode
180
+ - Canvas drawing tools — Phase 1
182
181
 
183
- ### Out of Scope
182
+ ## Out of Scope
184
183
 
185
184
  - OAuth2 — complexity not needed for v1
186
185
  ```
@@ -188,27 +187,23 @@ Before:
188
187
  After (Phase 2 shipped JWT auth, discovered rate limiting needed):
189
188
 
190
189
  ```markdown
191
- ### Validated
190
+ ## Validated
192
191
 
192
+ - ✓ Canvas drawing tools — Phase 1
193
193
  - ✓ JWT authentication — Phase 2
194
194
 
195
- ### Active
196
-
197
- - [ ] Real-time sync < 500ms
198
- - [ ] Offline mode
199
- - [ ] Rate limiting on sync endpoint
200
-
201
- ### Out of Scope
195
+ ## Out of Scope
202
196
 
203
197
  - OAuth2 — complexity not needed for v1
198
+ - Offline mode — real-time is core value, discovered Phase 2
204
199
  ```
205
200
 
206
201
  **Step complete when:**
207
202
 
208
203
  - [ ] Phase summaries reviewed for learnings
209
- - [ ] Validated requirements moved from Active
210
- - [ ] Invalidated requirements moved to Out of Scope with reason
211
- - [ ] Emerged requirements added to Active
204
+ - [ ] Shipped requirements added to Validated
205
+ - [ ] Invalidated requirements added to Out of Scope with reason
206
+ - [ ] Business context sections reviewed (Who It's For, Core Problem, How It's Different, Key User Flows)
212
207
  - [ ] New decisions logged with rationale
213
208
  - [ ] "What This Is" updated if product changed
214
209
  - [ ] "Last updated" footer reflects this transition
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindsystem-cc",
3
- "version": "3.19.0",
3
+ "version": "3.20.0",
4
4
  "description": "A meta-prompting, context engineering and spec-driven development system for Claude Code by TÂCHES.",
5
5
  "bin": {
6
6
  "mindsystem-cc": "bin/install.js"
@@ -53,6 +53,39 @@ record_result() {
53
53
  esac
54
54
  }
55
55
 
56
+ # --- Helper: parse phase numbers from a "Phases completed" line ---
57
+ # Outputs one phase number per line. Handles:
58
+ # - Range format: "1-6" → 1 2 3 4 5 6
59
+ # - Comma-separated: "8, 8.3, 9, 10" → 8 8.3 9 10
60
+ # - Mixed (multiple milestone entries each handled independently)
61
+ parse_phase_numbers() {
62
+ local line="$1"
63
+ local range
64
+ range=$(echo "$line" | grep -o '[0-9]\+-[0-9]\+' || true)
65
+ if [ -n "$range" ]; then
66
+ local range_start range_end
67
+ range_start=$(echo "$range" | cut -d'-' -f1)
68
+ range_end=$(echo "$range" | cut -d'-' -f2)
69
+ seq "$range_start" "$range_end"
70
+ else
71
+ echo "$line" | sed 's/.*://' | grep -oE '[0-9]+(\.[0-9]+)?' || true
72
+ fi
73
+ }
74
+
75
+ # --- Helper: format phase number as zero-padded directory prefix ---
76
+ # Integer (9) → "09", Decimal (8.3) → "08.3"
77
+ format_phase_prefix() {
78
+ local phase="$1"
79
+ if echo "$phase" | grep -q '\.'; then
80
+ local int_part dec_part
81
+ int_part=$(echo "$phase" | cut -d'.' -f1)
82
+ dec_part=$(echo "$phase" | cut -d'.' -f2)
83
+ printf "%02d.%s" "$int_part" "$dec_part"
84
+ else
85
+ printf "%02d" "$phase"
86
+ fi
87
+ }
88
+
56
89
  # ============================================================
57
90
  # CHECK 1: Subsystem Vocabulary
58
91
  # ============================================================
@@ -176,24 +209,18 @@ else
176
209
  ORPHAN_COUNT=0
177
210
  ORPHAN_LIST=""
178
211
 
179
- # Parse each milestone's phase range from MILESTONES.md
212
+ # Parse each milestone's completed phases from MILESTONES.md
180
213
  while IFS= read -r line; do
181
- # Extract range like "1-6" or "7-8"
182
- range=$(echo "$line" | grep -o '[0-9]\+-[0-9]\+')
183
- [ -z "$range" ] && continue
184
- range_start=$(echo "$range" | cut -d'-' -f1)
185
- range_end=$(echo "$range" | cut -d'-' -f2)
186
-
187
- # Check if any phase directories in this range still exist in phases/
188
- for i in $(seq "$range_start" "$range_end"); do
189
- phase_prefix=$(printf "%02d" "$i")
190
- for dir in "$PHASES_DIR"/${phase_prefix}-*/; do
214
+ while IFS= read -r phase_num; do
215
+ [ -z "$phase_num" ] && continue
216
+ prefix=$(format_phase_prefix "$phase_num")
217
+ for dir in "$PHASES_DIR"/${prefix}-*/; do
191
218
  [ -d "$dir" ] || continue
192
219
  dirname=$(basename "$dir")
193
220
  ORPHAN_COUNT=$((ORPHAN_COUNT + 1))
194
221
  ORPHAN_LIST="$ORPHAN_LIST $dirname (should be archived)"$'\n'
195
222
  done
196
- done
223
+ done < <(parse_phase_numbers "$line")
197
224
  done < <(grep "Phases completed" "$MILESTONES_FILE")
198
225
 
199
226
  if [ "$ORPHAN_COUNT" -gt 0 ]; then
@@ -325,19 +352,15 @@ else
325
352
 
326
353
  # Check phases/ for PLANs belonging to completed milestones
327
354
  while IFS= read -r line; do
328
- range=$(echo "$line" | grep -o '[0-9]\+-[0-9]\+')
329
- [ -z "$range" ] && continue
330
- range_start=$(echo "$range" | cut -d'-' -f1)
331
- range_end=$(echo "$range" | cut -d'-' -f2)
332
-
333
- for i in $(seq "$range_start" "$range_end"); do
334
- phase_prefix=$(printf "%02d" "$i")
335
- for plan in "$PHASES_DIR"/${phase_prefix}-*/*-PLAN.md; do
355
+ while IFS= read -r phase_num; do
356
+ [ -z "$phase_num" ] && continue
357
+ prefix=$(format_phase_prefix "$phase_num")
358
+ for plan in "$PHASES_DIR"/${prefix}-*/*-PLAN.md; do
336
359
  [ -f "$plan" ] || continue
337
360
  LEFTOVER_COUNT=$((LEFTOVER_COUNT + 1))
338
361
  LEFTOVER_PLANS="$LEFTOVER_PLANS $(echo "$plan" | sed "s|$GIT_ROOT/.planning/||")"$'\n'
339
362
  done
340
- done
363
+ done < <(parse_phase_numbers "$line")
341
364
  done < <(grep "Phases completed" "$MILESTONES_FILE")
342
365
 
343
366
  # Check archived milestone phase directories for leftover PLANs