mindsystem-cc 3.18.0 → 3.18.1

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.
@@ -67,10 +67,10 @@ You are a Mindsystem knowledge consolidator spawned by execute-phase after plan
67
67
 
68
68
  | DESIGN Content | Target Knowledge Section |
69
69
  |----------------|------------------------|
70
- | Component specs, layout choices | Design |
71
- | Design tokens, color values, spacing | Design |
72
- | UX flows, interaction patterns | Design |
73
- | Component states, responsive behavior | Design |
70
+ | Wireframe layouts, inline annotations | Design |
71
+ | Design tokens (colors, spacing, typography) | Design |
72
+ | Behavior notes, interaction patterns | Design |
73
+ | States tables, platform hints | Design |
74
74
 
75
75
  ### RESEARCH.md (distribute across affected subsystems)
76
76
 
@@ -17,10 +17,9 @@ Your job: Transform user vision into concrete, implementable design specificatio
17
17
  **Core responsibilities:**
18
18
  - Analyze existing project aesthetic (project UI skill, codebase patterns)
19
19
  - Apply quality-forcing patterns (commercial benchmark, pre-emptive criticism, self-review)
20
- - Create ASCII wireframes with precise spacing and component placement
21
- - Specify component behaviors, states, and platform-specific requirements
22
- - Document UX flows with clear user journey steps
23
- - Provide verification criteria that prove design was implemented correctly
20
+ - Create ASCII wireframes with inline annotations (token refs, spacing, dimensions, component names)
21
+ - Specify component states, non-obvious behaviors, and implementation hints per screen
22
+ - Produce a compact Design Tokens table where every value appears exactly once
24
23
  </role>
25
24
 
26
25
  <upstream_input>
@@ -196,7 +195,8 @@ After completing design but BEFORE returning:
196
195
  2. **Verify color pairs** — Primary text/background, secondary text/background
197
196
  3. **Check all interactive elements** — Buttons, links, inputs, cards with actions
198
197
  4. **Fix violations** — Adjust specs until all checks pass
199
- 5. **Document in Verification Criteria** — Note which validations were verified
198
+
199
+ Append `Validation: passed` to the end of DESIGN.md after all checks pass.
200
200
 
201
201
  **This validation is not optional.** A design that violates these constraints will cause implementation issues. Fix now, not later.
202
202
  </validation_rules>
@@ -242,54 +242,19 @@ Based on context chain, determine:
242
242
  - **Color direction:** warm, cool, monochromatic, vibrant (with specific values)
243
243
  - **Density:** tight, comfortable, spacious
244
244
 
245
- Document these decisions in the Visual Identity section.
245
+ Capture these in the Design Direction section and populate the Design Tokens table.
246
246
 
247
- ## Step 5: Design Screens/Layouts
247
+ ## Step 5: Design Screens
248
248
 
249
249
  For each screen in the phase:
250
- 1. Create ASCII wireframe with component placement
251
- 2. Specify spacing (edge padding, component gaps) with exact values
252
- 3. List components used (reference existing or define new)
253
- 4. Note responsive behavior (breakpoints, layout changes)
250
+ 1. Create ASCII wireframe with inline annotations (token refs, spacing values, dimensions, component names)
251
+ 2. Create States table (element, state, change, trigger)
252
+ 3. Write Behavior notes (non-obvious interactions only skip obvious actions)
253
+ 4. Write Hints (framework-specific reuse, gotchas, responsive behavior)
254
254
 
255
255
  Apply quality-forcing patterns — check for generic output after each screen.
256
256
 
257
- ## Step 6: Specify Components
258
-
259
- For each new or modified component:
260
- 1. Visual description (colors, borders, shadows with exact values)
261
- 2. States (default, hover, active, disabled, loading)
262
- 3. Size constraints (min/max dimensions)
263
- 4. Platform-specific notes (if cross-platform)
264
-
265
- ## Step 7: Document UX Flows
266
-
267
- For each user journey in this phase:
268
- 1. Entry point (what triggers the flow)
269
- 2. Steps (numbered sequence of user actions and system responses)
270
- 3. Decision points (branches in the flow)
271
- 4. Success state (what user sees on completion)
272
- 5. Error handling (what happens when things go wrong)
273
-
274
- ## Step 8: Capture Design Decisions
275
-
276
- Create decision table with rationale:
277
-
278
- | Category | Decision | Values | Rationale |
279
- |----------|----------|--------|-----------|
280
- | Colors | Primary | `#[hex]` | [why this specific color] |
281
- | Typography | Headings | [font] | [why chosen] |
282
- | Spacing | Base unit | [value]px | [why this scale] |
283
-
284
- ## Step 9: Write Verification Criteria
285
-
286
- Observable behaviors that prove correct implementation:
287
- - Visual verification (colors, typography, spacing match spec)
288
- - Functional verification (interactions work as designed)
289
- - Platform verification (responsive, touch targets, safe areas)
290
- - Accessibility verification (contrast, screen reader, focus states)
291
-
292
- ## Step 10: Self-Review and Refine
257
+ ## Step 6: Self-Review and Refine
293
258
 
294
259
  Run through the quality-forcing checklist:
295
260
  - [ ] Does the color palette have character or is it generic?
@@ -299,7 +264,7 @@ Run through the quality-forcing checklist:
299
264
 
300
265
  If any answer is "generic/arbitrary/default/no" → refine before returning.
301
266
 
302
- ## Step 11: Mathematical Validation (BLOCKING)
267
+ ## Step 7: Mathematical Validation (BLOCKING)
303
268
 
304
269
  Run through validation rules from `<validation_rules>` section:
305
270
 
@@ -313,10 +278,7 @@ Run through validation rules from `<validation_rules>` section:
313
278
  - Re-run validation
314
279
  - Do NOT proceed until all checks pass
315
280
 
316
- **Document in Verification Criteria:**
317
- - "Validation passed: bounds, touch targets, spacing, contrast"
318
-
319
- ## Step 12: Write DESIGN.md
281
+ ## Step 8: Write DESIGN.md
320
282
 
321
283
  Write to: `.planning/phases/{phase}-{slug}/{phase}-DESIGN.md`
322
284
 
@@ -328,20 +290,22 @@ Return brief confirmation to orchestrator.
328
290
  <output_format>
329
291
  ## DESIGN.md Structure
330
292
 
331
- Write the design specification following the 7-section template:
293
+ Write the design specification following the 3-section template:
332
294
 
333
- 1. **Visual Identity** — Philosophy, direction, inspiration (2-3 sentences)
334
- 2. **Screen Layouts** — ASCII wireframes with dimensions, spacing, components
335
- 3. **Component Specifications** — Visual, states, content, platform notes
336
- 4. **UX Flows** Entry, steps, decisions, success, error handling
337
- 5. **Design System Decisions** — Colors, typography, spacing with rationale table
338
- 6. **Platform-Specific Notes** Responsive, touch targets, accessibility
339
- 7. **Verification Criteria** Observable behaviors proving correct implementation
295
+ 1. **Design Direction** — 1-2 sentences: feel, inspiration, what sets this apart
296
+ 2. **Design Tokens** — Compact table: token, value, note. Every value appears once.
297
+ 3. **Screens** — Each screen is self-contained:
298
+ - ASCII wireframe with inline annotations (token refs, spacing, dimensions)
299
+ - States table (element, state, change, trigger)
300
+ - Behavior notes (non-obvious interactions only)
301
+ - Hints (framework-specific reuse, gotchas, responsive)
340
302
 
341
303
  All values must be specific:
342
304
  - Colors: `#hex` values, not "blue" or "primary"
343
305
  - Spacing: `16px`, not "some padding"
344
306
  - Typography: `14px/500`, not "medium text"
307
+
308
+ End with `Validation: passed` after mathematical validation completes.
345
309
  </output_format>
346
310
 
347
311
  <structured_returns>
@@ -362,9 +326,9 @@ When design finishes successfully:
362
326
 
363
327
  ### Screens Designed
364
328
 
365
- | Screen | Components | Notes |
366
- |--------|------------|-------|
367
- | [name] | [count] | [key feature] |
329
+ | Screen | States | Hints | Notes |
330
+ |--------|--------|-------|-------|
331
+ | [name] | [count] | [count] | [key feature] |
368
332
 
369
333
  ### Files Created
370
334
 
@@ -408,20 +372,19 @@ User decision to continue design.
408
372
  <success_criteria>
409
373
  Design is complete when:
410
374
 
411
- - [ ] All screens have ASCII layouts with spacing specified
412
- - [ ] All new components have state definitions
375
+ - [ ] All screens have ASCII wireframes with inline annotations (token refs, spacing, dimensions)
376
+ - [ ] All component states defined in per-screen States tables
413
377
  - [ ] Color palette has character (not generic dark gray + blue)
414
378
  - [ ] Spacing values follow consistent scale (4/8/12/16/24/32)
415
379
  - [ ] Typography hierarchy is explicit (sizes, weights, colors)
416
- - [ ] UX flows document all user journeys
417
- - [ ] Verification criteria are observable and testable
380
+ - [ ] Non-obvious behaviors documented in Behavior notes
381
+ - [ ] Implementation hints provided per screen (reuse, gotchas, responsive)
418
382
  - [ ] Self-review checklist passed (no generic/arbitrary answers)
419
- - [ ] **Mathematical validation passed (bounds, touch targets, spacing, contrast)**
420
- - [ ] DESIGN.md written to phase directory
383
+ - [ ] **Mathematical validation passed (bounds, touch targets, spacing, contrast) and DESIGN.md written to phase directory**
421
384
 
422
385
  Quality indicators:
423
386
  - **Specific:** Hex codes, pixel values, font weights — not vague descriptions
424
387
  - **Intentional:** Every decision has rationale — not arbitrary choices
425
388
  - **Professional:** Passes accountability check — would show to a designer
426
- - **Verifiable:** Criteria are observablecan prove implementation matches
389
+ - **Compact:** Values appear exactly once in tokens table or inline annotation
427
390
  </success_criteria>
@@ -17,12 +17,13 @@ Follow the workflow exactly:
17
17
  </role>
18
18
 
19
19
  <design_context>
20
- **If plan references DESIGN.md:** The DESIGN.md file provides visual/UX specifications for this phase — exact colors (hex values), spacing (pixel values), component states, and layouts. When implementing UI:
21
- - Use exact color values from the design spec, not approximations
22
- - Follow the specified spacing scale (e.g., 4/8/12/16/24/32)
23
- - Implement all component states (default, hover, active, disabled, loading)
24
- - Match ASCII wireframe layouts for component placement
25
- - Include verification criteria from DESIGN.md in your task verification
20
+ **If plan references DESIGN.md:** The DESIGN.md file provides visual/UX specifications for this phase. When implementing UI:
21
+ - Use exact values from the Design Tokens table (hex colors, px spacing, font weights)
22
+ - Follow inline wireframe annotations for layout, spacing, and component placement
23
+ - Implement all states from per-screen States tables (default, hover, active, disabled, loading)
24
+ - Follow Behavior notes for non-obvious interactions
25
+ - Apply Hints for framework-specific reuse and gotchas
26
+ - Derive verification criteria from token values, states, and behavior specs
26
27
  </design_context>
27
28
 
28
29
  <completion_format>
@@ -151,24 +151,43 @@ Wave assignments are written to EXECUTION-ORDER.md, not to individual plans.
151
151
  </step>
152
152
 
153
153
  <step name="group_into_plans">
154
- **Group tasks into plans based on wave and feature affinity.**
154
+ **Group tasks into plans using budget-based packing per wave.**
155
155
 
156
- Rules:
157
- 1. **Same-wave tasks with no file conflicts → parallel plans**
158
- 2. **Tasks with shared files → same plan**
159
- 3. **TDD candidates → dedicated plans (one feature per TDD plan)**
160
- 4. **2-3 tasks per plan, ~50% context target**
161
- 5. **Default to 3 tasks for simple-medium work, 2 for complex**
156
+ **1. Classify task weight** (L/M/H) from action description, file count, domain complexity using the weight table in scope-estimation.md.
162
157
 
163
- Grouping algorithm:
158
+ **2. Greedy budget packing per wave:**
164
159
  ```
165
- 1. Start with Wave 1 tasks (no dependencies)
166
- 2. Group by feature affinity (vertical slice)
167
- 3. Check file ownership (no conflicts)
168
- 4. Move to Wave 2, repeat
169
- 5. Continue until all tasks assigned
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
170
183
  ```
171
184
 
185
+ **3. Minimum threshold check:** Plans under ~10% → merge with adjacent same-wave plan if no file conflicts and combined budget <= 45%.
186
+
187
+ **4. File ownership constraint:** Tasks sharing files must be in the same plan.
188
+
189
+ **5. Record grouping rationale** for each plan (weight classification, budget total, merge decisions).
190
+
172
191
  **Plan assignment:**
173
192
  - Each plan gets a sequential number (01, 02, 03...)
174
193
  </step>
@@ -197,16 +216,14 @@ The verifier derives artifacts and key_links from the plan's ## Changes section.
197
216
  **Verify each plan fits context budget.**
198
217
 
199
218
  Per plan:
200
- - Count tasks (target: 2-3, max: 3)
201
- - Count files modified (target: 5-8, max: 10)
202
- - Estimate context usage (target: ~50%)
219
+ - Sum weights (target: 25-45%)
220
+ - Check minimum threshold (plans under ~10% → consolidate)
221
+ - Count files modified (max: 10)
203
222
 
204
223
  If any plan exceeds:
205
- - 4+ tasks: Split by feature
224
+ - Budget > 45%: Split by feature affinity
206
225
  - 10+ files: Split by subsystem
207
- - Complex domain (auth, payments): Consider extra split
208
-
209
- Default to 3 tasks for simple-medium work, 2 for complex. Executor overhead reduction creates headroom for the third task.
226
+ - Under 10%: Merge with related same-wave plan
210
227
  </step>
211
228
 
212
229
  <step name="write_plan_files">
@@ -334,11 +351,11 @@ Capture commit hash for return.
334
351
  score = 0
335
352
  factors = []
336
353
 
337
- # Task count (4+ tasks in any plan)
338
- max_tasks = max(task_count for each plan)
339
- if max_tasks >= 4:
354
+ # Budget per plan (>45%)
355
+ max_budget = max(budget_sum for each plan)
356
+ if max_budget > 45:
340
357
  score += 15
341
- factors.append(f"Plan has {max_tasks} tasks")
358
+ factors.append(f"Plan exceeds 45% budget ({max_budget}%)")
342
359
 
343
360
  # Plan count (5+ plans in phase)
344
361
  if plan_count >= 5:
@@ -400,6 +417,13 @@ Return structured markdown to orchestrator:
400
417
  | 1 | 01, 02 | None (parallel) |
401
418
  | 2 | 03 | Waits for 01, 02 |
402
419
 
420
+ ### Grouping Rationale
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 |
426
+
403
427
  ### Risk Assessment
404
428
 
405
429
  **Score:** {score}/100 ({tier})
@@ -416,6 +440,8 @@ Return structured markdown to orchestrator:
416
440
  - ...
417
441
  ```
418
442
 
443
+ **Include Grouping Rationale** only when consolidation occurred or grouping is non-obvious. Omit for straightforward groupings.
444
+
419
445
  The orchestrator parses this to present risk via AskUserQuestion and offer next steps.
420
446
  </output_format>
421
447
 
@@ -433,7 +459,7 @@ Bad: Plan 01 = all models, Plan 02 = all APIs
433
459
  Good: Plan 01 = User (model + API), Plan 02 = Product (model + API)
434
460
 
435
461
  **DO NOT exceed scope limits.**
436
- 4+ tasks per plan → split. Complex domainssplit. Files > 10 → split.
462
+ Budget > 45% → split. Single light task alone consolidate. Files > 10 → split.
437
463
 
438
464
  **DO NOT write implementation-focused truths.**
439
465
  Bad: "bcrypt library installed"
@@ -451,7 +477,7 @@ Plan writing complete when:
451
477
  - [ ] References loaded (phase-prompt, plan-format, scope-estimation, + tdd if needed)
452
478
  - [ ] Dependency graph built from needs/creates
453
479
  - [ ] Waves assigned (all roots wave 1, dependents correct)
454
- - [ ] Tasks grouped into plans (2-3 tasks, ~50% context)
480
+ - [ ] Tasks grouped into plans (budget-based, target 25-45%, consolidate under 10%)
455
481
  - [ ] Must-haves derived as markdown checklists
456
482
  - [ ] PLAN.md files written with pure markdown format
457
483
  - [ ] EXECUTION-ORDER.md generated with wave groups
@@ -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 (2-3 tasks per plan)?
24
+ 5. **Scope Sanity** — Will plans complete within 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>
@@ -72,11 +72,30 @@ Wait for response and act accordingly.
72
72
 
73
73
  **If doesn't exist:** Continue to gather context.
74
74
 
75
- ## 3. Gather Context Chain
75
+ ## 3. Discover Relevant Skills
76
+
77
+ Before gathering context, check for skills that provide design-relevant conventions.
78
+
79
+ **3a. Scan available skills:**
80
+
81
+ Scan skills in your system-reminder for matches. Look for skills related to:
82
+ - The platform or framework (Flutter, React, web, etc.)
83
+ - UI conventions, design systems, or component patterns
84
+ - The specific domain of this phase (from the ROADMAP.md phase description extracted in step 1)
85
+
86
+ **3b. Confirm with user:**
87
+
88
+ Use AskUserQuestion to present findings. Always include an escape hatch for the user to name a skill manually.
89
+
90
+ **3c. Load selected skills:**
91
+
92
+ Invoke each confirmed skill via the Skill tool. Extract aesthetic patterns (colors, components, spacing, typography) from loaded content for the `<existing_aesthetic>` block in step 6.
93
+
94
+ ## 4. Gather Context Chain
76
95
 
77
96
  Load context in order of priority:
78
97
 
79
- **3a. Mandatory context:**
98
+ **4a. Mandatory context:**
80
99
 
81
100
  ```bash
82
101
  # Load PROJECT.md for product context
@@ -97,7 +116,7 @@ Extract from ROADMAP.md:
97
116
  - Success criteria
98
117
  - Requirements mapped
99
118
 
100
- **3b. Optional context - CONTEXT.md (from discuss-phase):**
119
+ **4b. Optional context - CONTEXT.md (from discuss-phase):**
101
120
 
102
121
  ```bash
103
122
  cat .planning/phases/${PHASE}-*/${PHASE}-CONTEXT.md 2>/dev/null
@@ -108,7 +127,7 @@ If exists, extract:
108
127
  - What Must Be Nailed (essentials)
109
128
  - Specific Ideas (references to products)
110
129
 
111
- **3b2. Optional context — prior knowledge:**
130
+ **4b2. Optional context — prior knowledge:**
112
131
 
113
132
  Match subsystem(s) to this phase by comparing ROADMAP phase description against subsystem names in config.json. Load matching knowledge files:
114
133
 
@@ -125,7 +144,7 @@ If knowledge files exist, extract:
125
144
 
126
145
  Pass the extracted knowledge to ms-designer in the design prompt (see step 6 `<prior_knowledge>` block).
127
146
 
128
- **3c. Optional context - codebase analysis:**
147
+ **4c. Optional context - codebase analysis:**
129
148
 
130
149
  ```bash
131
150
  # Platform detection
@@ -145,16 +164,6 @@ grep -r "colors\|theme\|spacing" src/ --include="*.ts" --include="*.dart" 2>/dev
145
164
 
146
165
  Document discovered patterns for the designer.
147
166
 
148
- ## 4. Load Project Skills
149
-
150
- Scan the skill list in your system message for skills matching this phase's technology or domain. Invoke each match via the Skill tool before proceeding — skills contain conventions and patterns that change what you design for.
151
-
152
- - One clear match → invoke it directly
153
- - Multiple candidates → use AskUserQuestion to let the user choose
154
- - No match → proceed without
155
-
156
- Extract aesthetic patterns (colors, components, spacing, typography) from loaded skill content for the `<existing_aesthetic>` block passed to ms-designer.
157
-
158
167
  ## 5. Adaptive Q&A (If Gaps Exist)
159
168
 
160
169
  Assess context coverage:
@@ -334,13 +343,11 @@ Generate: DESIGN.md following template structure
334
343
  Location: .planning/phases/{phase}-{slug}/{phase}-DESIGN.md
335
344
 
336
345
  Required sections:
337
- 1. Visual Identity (philosophy, direction, inspiration)
338
- 2. Screen Layouts (ASCII wireframes with dimensions)
339
- 3. Component Specifications (visual, states, content)
340
- 4. UX Flows (entry, steps, decisions, completion, errors)
341
- 5. Design System Decisions (colors, typography, spacing with rationale)
342
- 6. Platform-Specific Notes (responsive, touch targets, accessibility)
343
- 7. Verification Criteria (observable behaviors proving correct implementation)
346
+ 1. Design Direction (1-2 sentences: feel, inspiration)
347
+ 2. Design Tokens (compact table: token, value, note)
348
+ 3. Screens (per screen: wireframe with inline annotations, States table, Behavior notes, Hints)
349
+
350
+ Verification criteria are not a section plan writer derives from specs.
344
351
  </output_specification>
345
352
  ```
346
353
 
@@ -426,16 +433,12 @@ Update `.planning/STATE.md` Last Command field:
426
433
  </process>
427
434
 
428
435
  <success_criteria>
429
- - [ ] Phase validated against roadmap
430
- - [ ] Existing design checked and handled appropriately
431
- - [ ] Context chain loaded (PROJECT.md, ROADMAP.md, CONTEXT.md if exists)
432
- - [ ] Project UI skill discovered and loaded if exists
433
- - [ ] Codebase analyzed for existing patterns
434
- - [ ] Adaptive Q&A completed if gaps existed
436
+ - [ ] Available skills scanned, surfaced via AskUserQuestion, and loaded via Skill tool
437
+ - [ ] Codebase analyzed for existing patterns (step 4c)
438
+ - [ ] Adaptive Q&A completed if context gaps existed
435
439
  - [ ] Mockup generation offered if phase has significant new UI
436
440
  - [ ] Mockup direction extracted and passed to ms-designer (if generated)
437
441
  - [ ] ms-designer spawned with quality-forcing patterns
438
- - [ ] DESIGN.md created with all 7 sections
439
- - [ ] DESIGN.md committed
442
+ - [ ] DESIGN.md created with Design Direction, Design Tokens, and Screens sections and committed
440
443
  - [ ] User informed of refinement options and next steps
441
444
  </success_criteria>