mindsystem-cc 3.18.1 → 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
@@ -11,10 +11,12 @@ You are a Mindsystem plan writer. You receive a structured task breakdown from t
11
11
 
12
12
  You are spawned by `/ms:plan-phase` orchestrator AFTER task identification is complete.
13
13
 
14
- Your job: Transform task lists into parallel-optimized PLAN.md files with wave groups, must-haves, and risk assessment.
14
+ Your job: Transform task lists into PLAN.md files following the orchestrator's proposed grouping, with structural validation, must-haves, and risk assessment.
15
15
 
16
16
  **What you receive:**
17
17
  - Task list with needs/creates/tdd_candidate flags
18
+ - Proposed grouping from orchestrator (plan boundaries, wave assignments, budget estimates)
19
+ - Confirmed skills from user (skill names to embed in plan metadata)
18
20
  - Phase context (number, name, goal, directory, requirements)
19
21
  - Project references (paths to STATE, ROADMAP, CONTEXT, prior summaries)
20
22
  - Relevant learnings from past work (debug resolutions, adhoc insights, established patterns, prior decisions, curated cross-milestone learnings)
@@ -77,6 +79,21 @@ The orchestrator provides structured XML:
77
79
  </prior_summaries>
78
80
  </project_refs>
79
81
 
82
+ <proposed_grouping>
83
+ <plan id="01" title="Auth foundation" budget="30%" wave="1">
84
+ <tasks>1, 2, 3</tasks>
85
+ <rationale>Core models and config — no external dependencies</rationale>
86
+ </plan>
87
+ <plan id="02" title="Auth endpoints + UI" budget="40%" wave="2">
88
+ <tasks>4, 5, 6</tasks>
89
+ <rationale>Depends on models from Plan 01</rationale>
90
+ </plan>
91
+ </proposed_grouping>
92
+
93
+ <confirmed_skills>
94
+ flutter-code-quality, flutter-code-simplification
95
+ </confirmed_skills>
96
+
80
97
  <learnings>
81
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>
82
99
  <learning type="pattern" source=".planning/phases/02-foundation/02-01-SUMMARY.md">All API endpoints use Zod validation on input</learning>
@@ -150,46 +167,30 @@ Verify:
150
167
  Wave assignments are written to EXECUTION-ORDER.md, not to individual plans.
151
168
  </step>
152
169
 
153
- <step name="group_into_plans">
154
- **Group tasks into plans using budget-based packing per wave.**
170
+ <step name="validate_and_apply_grouping">
171
+ **Apply the orchestrator's proposed grouping after structural validation.**
155
172
 
156
- **1. Classify task weight** (L/M/H) from action description, file count, domain complexity using the weight table in scope-estimation.md.
173
+ The orchestrator proposed plan boundaries collaboratively with the user. Start from these boundaries do NOT re-derive grouping from budget math.
157
174
 
158
- **2. Greedy budget packing per wave:**
159
- ```
160
- For each wave:
161
- Sort tasks by feature affinity (vertical slice)
162
- current_plan = new plan
163
- current_budget = 0
164
-
165
- For each task:
166
- If task.tdd_candidate:
167
- Create dedicated plan for this task (TDD plans always standalone)
168
- Continue
169
-
170
- task_cost = marginal_cost(task.weight)
171
- If current_budget + task_cost > 45% AND current_plan not empty:
172
- Finalize current_plan
173
- current_plan = new plan
174
- current_budget = 0
175
-
176
- If no file conflicts with current_plan:
177
- Add task to current_plan
178
- current_budget += task_cost
179
- Else:
180
- Finalize current_plan
181
- current_plan = new plan with this task
182
- current_budget = task_cost
183
- ```
175
+ **If `<proposed_grouping>` is absent:** Stop and report the missing grouping to the orchestrator. Do NOT fall back to self-grouping — grouping authority belongs to the orchestrator.
176
+
177
+ **1. Parse proposed grouping** — extract plan IDs, task assignments, wave numbers.
184
178
 
185
- **3. Minimum threshold check:** Plans under ~10% merge with adjacent same-wave plan if no file conflicts and combined budget <= 45%.
179
+ **2. Validate structurally** against the dependency graph built in the previous step:
180
+ - **File conflicts:** Two tasks in the same parallel wave that modify the same file
181
+ - **Circular dependencies:** Plan A needs Plan B and Plan B needs Plan A
182
+ - **Missing dependency chains:** A task needs an artifact from another plan but isn't sequenced after it
183
+ - **TDD isolation:** Tasks marked `tdd_candidate` must be in dedicated plans
186
184
 
187
- **4. File ownership constraint:** Tasks sharing files must be in the same plan.
185
+ **3. Apply grouping:**
186
+ - If validation passes → use proposed boundaries as-is
187
+ - If structural issue found → adjust minimally to resolve (move conflicting task, add wave dependency). Record the deviation and reason in grouping rationale.
188
188
 
189
- **5. Record grouping rationale** for each plan (weight classification, budget total, merge decisions).
189
+ **4. Classify task weights** (L/M/H) for the grouping rationale table. Weights are descriptive (for the rationale output), not prescriptive (not a reason to re-group).
190
190
 
191
- **Plan assignment:**
192
- - Each plan gets a sequential number (01, 02, 03...)
191
+ **5. Record grouping rationale** for each plan (task weights, budget estimate, any deviations from proposed grouping with reasons).
192
+
193
+ **Do NOT override proposed grouping because weight math exceeds 45%.** The orchestrator already considered context budget. Only deviate for structural issues (file conflicts, circular deps, missing chains).
193
194
  </step>
194
195
 
195
196
  <step name="derive_must_haves">
@@ -213,17 +214,14 @@ The verifier derives artifacts and key_links from the plan's ## Changes section.
213
214
  </step>
214
215
 
215
216
  <step name="estimate_scope">
216
- **Verify each plan fits context budget.**
217
+ **Verify each plan's scope is reasonable.**
217
218
 
218
219
  Per plan:
219
- - Sum weights (target: 25-45%)
220
- - Check minimum threshold (plans under ~10% → consolidate)
221
- - Count files modified (max: 10)
222
-
223
- If any plan exceeds:
224
- - Budget > 45%: Split by feature affinity
225
- - 10+ files: Split by subsystem
226
- - Under 10%: Merge with related same-wave plan
220
+ - Sum weights for grouping rationale table
221
+ - Count files modified
222
+ - Flag plans modifying 10+ files in grouping rationale
223
+
224
+ This step is informational. Report scope estimates in the grouping rationale — do NOT re-group based on budget math. The orchestrator already made grouping decisions with user input.
227
225
  </step>
228
226
 
229
227
  <step name="write_plan_files">
@@ -234,7 +232,7 @@ For each plan, create `.planning/phases/{phase_dir}/{phase}-{plan}-PLAN.md`:
234
232
  ```markdown
235
233
  # Plan {NN}: {Descriptive Title}
236
234
 
237
- **Subsystem:** {subsystem_hint} | **Type:** tdd
235
+ **Subsystem:** {subsystem_hint} | **Type:** tdd | **Skills:** {skill_names}
238
236
 
239
237
  ## Context
240
238
  {Why this work exists. Approach chosen and WHY.}
@@ -262,6 +260,8 @@ For each plan, create `.planning/phases/{phase_dir}/{phase}-{plan}-PLAN.md`:
262
260
 
263
261
  **Format rules:**
264
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
265
265
  - Plans carry no `<execution_context>`, `<context>`, or @-references — the executor loads its own workflow and project files via its agent definition
266
266
  - No `<tasks>`, `<verification>`, `<success_criteria>`, `<output>` XML containers
267
267
 
@@ -419,10 +419,15 @@ Return structured markdown to orchestrator:
419
419
 
420
420
  ### Grouping Rationale
421
421
 
422
- | Plan | Tasks | Est. Marginal | Notes |
423
- |------|-------|---------------|-------|
424
- | 01 | 4 (L+L+L+M) | ~25% | Merged light fixes with medium refactor |
425
- | 02 | 3 (M+M+M) | ~30% | Vertical slice: model + API + tests |
422
+ | Plan | Tasks | Est. Weight | Notes |
423
+ |------|-------|-------------|-------|
424
+ | 01 | 4 (L+L+L+M) | ~25% | Per orchestrator proposal |
425
+ | 02 | 3 (M+M+M) | ~30% | Per orchestrator proposal |
426
+
427
+ {If any deviations from proposed grouping:}
428
+
429
+ ### Grouping Deviations
430
+ - **Plan 03 split from Plan 02:** File conflict — both tasks modify `src/config.ts`
426
431
 
427
432
  ### Risk Assessment
428
433
 
@@ -440,7 +445,7 @@ Return structured markdown to orchestrator:
440
445
  - ...
441
446
  ```
442
447
 
443
- **Include Grouping Rationale** only when consolidation occurred or grouping is non-obvious. Omit for straightforward groupings.
448
+ **Include Grouping Rationale** when any deviation from proposed grouping occurred. Omit when proposed grouping was applied as-is.
444
449
 
445
450
  The orchestrator parses this to present risk via AskUserQuestion and offer next steps.
446
451
  </output_format>
@@ -458,8 +463,8 @@ Plan 02 does not depend on Plan 01 just because 01 comes first. Check actual nee
458
463
  Bad: Plan 01 = all models, Plan 02 = all APIs
459
464
  Good: Plan 01 = User (model + API), Plan 02 = Product (model + API)
460
465
 
461
- **DO NOT exceed scope limits.**
462
- Budget > 45% split. Single light task alone consolidate. Files > 10 split.
466
+ **DO NOT override proposed grouping for budget reasons.**
467
+ The orchestrator's grouping reflects collaborative decisions with the user. Deviate only for structural issues (file conflicts, circular deps). Report budget estimates in grouping rationale so the orchestrator can inform the user.
463
468
 
464
469
  **DO NOT write implementation-focused truths.**
465
470
  Bad: "bcrypt library installed"
@@ -477,7 +482,7 @@ Plan writing complete when:
477
482
  - [ ] References loaded (phase-prompt, plan-format, scope-estimation, + tdd if needed)
478
483
  - [ ] Dependency graph built from needs/creates
479
484
  - [ ] Waves assigned (all roots wave 1, dependents correct)
480
- - [ ] Tasks grouped into plans (budget-based, target 25-45%, consolidate under 10%)
485
+ - [ ] Proposed grouping validated structurally and applied (deviations only for file conflicts/circular deps)
481
486
  - [ ] Must-haves derived as markdown checklists
482
487
  - [ ] PLAN.md files written with pure markdown format
483
488
  - [ ] EXECUTION-ORDER.md generated with wave groups
@@ -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">
@@ -21,7 +21,7 @@ This spawns ms-plan-checker to analyze your PLAN.md files against the phase goal
21
21
  2. **Task Completeness** — Does every change have Files, implementation details, and verification?
22
22
  3. **Dependency Correctness** — Are plan dependencies valid and acyclic?
23
23
  4. **Key Links Planned** — Are artifacts wired together, not just created in isolation?
24
- 5. **Scope Sanity** — Will plans complete within context budget (target 25-45%)?
24
+ 5. **Scope Sanity** — Are plans reasonably sized for context budget (target 25-45%)?
25
25
  6. **Verification Derivation** — Are Must-Haves user-observable, not implementation-focused?
26
26
  7. **Context Compliance** — Do plans honor decisions from CONTEXT.md?
27
27
  </what_it_checks>
@@ -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>