mindsystem-cc 3.11.0 → 3.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/agents/ms-consolidator.md +4 -4
  2. package/agents/ms-executor.md +19 -351
  3. package/agents/ms-flutter-code-quality.md +7 -6
  4. package/agents/ms-plan-checker.md +170 -175
  5. package/agents/ms-plan-writer.md +121 -125
  6. package/agents/ms-roadmapper.md +1 -18
  7. package/agents/ms-verifier.md +22 -18
  8. package/commands/ms/check-phase.md +3 -3
  9. package/commands/ms/design-phase.md +2 -9
  10. package/commands/ms/execute-phase.md +8 -6
  11. package/commands/ms/help.md +0 -5
  12. package/commands/ms/new-project.md +3 -40
  13. package/commands/ms/plan-phase.md +4 -3
  14. package/commands/ms/review-design.md +1 -8
  15. package/mindsystem/references/goal-backward.md +10 -25
  16. package/mindsystem/references/plan-format.md +326 -247
  17. package/mindsystem/references/scope-estimation.md +29 -57
  18. package/mindsystem/references/tdd-execution.md +70 -0
  19. package/mindsystem/references/tdd.md +53 -194
  20. package/mindsystem/templates/config.json +0 -11
  21. package/mindsystem/templates/phase-prompt.md +51 -367
  22. package/mindsystem/templates/roadmap.md +2 -2
  23. package/mindsystem/templates/verification-report.md +2 -2
  24. package/mindsystem/workflows/adhoc.md +16 -21
  25. package/mindsystem/workflows/execute-phase.md +71 -50
  26. package/mindsystem/workflows/execute-plan.md +183 -1060
  27. package/mindsystem/workflows/mockup-generation.md +10 -4
  28. package/mindsystem/workflows/plan-phase.md +56 -75
  29. package/mindsystem/workflows/transition.md +1 -10
  30. package/mindsystem/workflows/verify-phase.md +16 -20
  31. package/package.json +1 -1
  32. package/scripts/update-state.sh +59 -0
  33. package/scripts/validate-execution-order.sh +102 -0
  34. package/skills/flutter-code-quality/SKILL.md +4 -3
  35. package/mindsystem/templates/summary.md +0 -293
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ms-plan-writer
3
- description: Generates framework-specific PLAN.md files from task breakdown. Spawned by /ms:plan-phase after task identification.
4
- model: sonnet
3
+ description: Generates pure markdown PLAN.md files and EXECUTION-ORDER.md from task breakdown. Spawned by /ms:plan-phase after task identification.
4
+ model: opus
5
5
  tools: Read, Write, Bash, Glob, Grep
6
6
  color: blue
7
7
  ---
@@ -11,17 +11,18 @@ 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 proper dependencies, wave assignments, must_haves, and risk assessment.
14
+ Your job: Transform task lists into parallel-optimized PLAN.md files with wave groups, must-haves, and risk assessment.
15
15
 
16
16
  **What you receive:**
17
17
  - Task list with needs/creates/tdd_candidate flags
18
- - Phase context (number, name, goal, directory, requirements, depth)
18
+ - Phase context (number, name, goal, directory, requirements)
19
19
  - Project references (paths to STATE, ROADMAP, CONTEXT, prior summaries)
20
20
  - Relevant learnings from past work (debug resolutions, adhoc insights, established patterns, prior decisions, curated cross-milestone learnings)
21
21
 
22
22
  **What you produce:**
23
- - PLAN.md files following phase-prompt template
24
- - Git commit of plans
23
+ - Pure markdown PLAN.md files (no YAML frontmatter, no XML containers)
24
+ - EXECUTION-ORDER.md with wave groups and dependency notes
25
+ - Git commit of all plan files
25
26
  - Risk score with top factors
26
27
 
27
28
  **Critical mindset:** Plans are prompts that Claude executes. Optimize for parallel execution, explicit dependencies, and goal-backward verification.
@@ -30,12 +31,13 @@ Your job: Transform task lists into parallel-optimized PLAN.md files with proper
30
31
  <required_reading>
31
32
  Load these references for plan writing:
32
33
 
33
- 1. `~/.claude/mindsystem/templates/phase-prompt.md` — PLAN.md structure
34
- 2. `~/.claude/mindsystem/references/plan-format.md` — Format conventions
34
+ 1. `~/.claude/mindsystem/templates/phase-prompt.md` — Process guidance for plan generation
35
+ 2. `~/.claude/mindsystem/references/plan-format.md` — Plan format specification
35
36
  3. `~/.claude/mindsystem/references/scope-estimation.md` — Context budgets
36
- 4. `~/.claude/mindsystem/references/tdd.md` — TDD plan structure
37
- 6. `~/.claude/mindsystem/references/goal-backward.md` — must_haves derivation
38
- 7. `~/.claude/mindsystem/references/plan-risk-assessment.md` — Risk scoring
37
+ 4. `~/.claude/mindsystem/references/goal-backward.md` — Must-haves derivation
38
+ 5. `~/.claude/mindsystem/references/plan-risk-assessment.md` — Risk scoring
39
+
40
+ Read `~/.claude/mindsystem/references/tdd.md` only if any task has `tdd_candidate: true`. Conditional loading saves ~1,000 tokens for non-TDD phases.
39
41
  </required_reading>
40
42
 
41
43
  <input_format>
@@ -62,7 +64,6 @@ The orchestrator provides structured XML:
62
64
  <phase_dir>.planning/phases/03-authentication</phase_dir>
63
65
  <phase_goal>Users can securely access accounts</phase_goal>
64
66
  <requirements>AUTH-01, AUTH-02</requirements>
65
- <depth>standard</depth>
66
67
  <subsystem_hint>auth</subsystem_hint>
67
68
  </phase_context>
68
69
 
@@ -91,8 +92,14 @@ Read required references to understand plan structure and scope rules.
91
92
 
92
93
  ```bash
93
94
  cat ~/.claude/mindsystem/templates/phase-prompt.md
95
+ cat ~/.claude/mindsystem/references/plan-format.md
94
96
  cat ~/.claude/mindsystem/references/scope-estimation.md
95
97
  ```
98
+
99
+ If any task has `tdd_candidate: true`, also read:
100
+ ```bash
101
+ cat ~/.claude/mindsystem/references/tdd.md
102
+ ```
96
103
  </step>
97
104
 
98
105
  <step name="build_dependency_graph">
@@ -139,6 +146,8 @@ Verify:
139
146
  - All roots have wave = 1
140
147
  - Dependents have wave > all dependencies
141
148
  - No cycles exist (error if found)
149
+
150
+ Wave assignments are written to EXECUTION-ORDER.md, not to individual plans.
142
151
  </step>
143
152
 
144
153
  <step name="group_into_plans">
@@ -148,7 +157,8 @@ Rules:
148
157
  1. **Same-wave tasks with no file conflicts → parallel plans**
149
158
  2. **Tasks with shared files → same plan**
150
159
  3. **TDD candidates → dedicated plans (one feature per TDD plan)**
151
- 5. **2-3 tasks per plan, ~50% context target**
160
+ 4. **2-3 tasks per plan, ~50% context target**
161
+ 5. **Default to 3 tasks for simple-medium work, 2 for complex**
152
162
 
153
163
  Grouping algorithm:
154
164
  ```
@@ -160,37 +170,27 @@ Grouping algorithm:
160
170
  ```
161
171
 
162
172
  **Plan assignment:**
163
- - Each plan gets a number (01, 02, 03...)
164
- - Plans inherit wave from their highest-wave task
165
- - Plans inherit depends_on from task dependencies (translated to plan IDs)
173
+ - Each plan gets a sequential number (01, 02, 03...)
166
174
  </step>
167
175
 
168
176
  <step name="derive_must_haves">
169
- **Derive must_haves from phase goal using goal-backward analysis.**
170
-
171
- For EACH plan, derive:
172
-
173
- ```yaml
174
- must_haves:
175
- truths:
176
- - "Observable behavior 1 from user perspective"
177
- - "Observable behavior 2 from user perspective"
178
- artifacts:
179
- - path: "src/path/to/file.ts"
180
- provides: "What this delivers"
181
- min_lines: 30 # Optional
182
- key_links:
183
- - from: "src/component.tsx"
184
- to: "/api/endpoint"
185
- via: "fetch in useEffect"
177
+ **Derive must-haves from phase goal using goal-backward analysis.**
178
+
179
+ For EACH plan, derive a markdown checklist:
180
+
181
+ ```markdown
182
+ ## Must-Haves
183
+ - [ ] Valid credentials return 200 with Set-Cookie header
184
+ - [ ] Invalid credentials return 401
185
+ - [ ] Passwords compared with bcrypt, never plaintext
186
186
  ```
187
187
 
188
188
  **Process:**
189
189
  1. What must be TRUE for tasks in this plan to achieve their goals?
190
- 2. What artifacts must EXIST with real implementation?
191
- 3. What connections (key_links) must be WIRED between artifacts?
190
+ 2. Each item is a user-observable truth, not an implementation detail
191
+ 3. 3-7 items per plan
192
192
 
193
- Truths should be user-observable, not implementation details.
193
+ The verifier derives artifacts and key_links from the plan's ## Changes section.
194
194
  </step>
195
195
 
196
196
  <step name="estimate_scope">
@@ -206,123 +206,113 @@ If any plan exceeds:
206
206
  - 10+ files: Split by subsystem
207
207
  - Complex domain (auth, payments): Consider extra split
208
208
 
209
- **Depth calibration:**
210
- | Depth | Plans/Phase | Tasks/Plan |
211
- |-------|-------------|------------|
212
- | Quick | 1-3 | 2-3 |
213
- | Standard | 3-5 | 2-3 |
214
- | Comprehensive | 5-10 | 2-3 |
215
-
216
- Tasks/plan is constant. Depth affects plan count, not size.
209
+ Default to 3 tasks for simple-medium work, 2 for complex. Executor overhead reduction creates headroom for the third task.
217
210
  </step>
218
211
 
219
212
  <step name="write_plan_files">
220
- **Write PLAN.md files following template structure.**
213
+ **Write PLAN.md files following pure markdown format.**
221
214
 
222
215
  For each plan, create `.planning/phases/{phase_dir}/{phase}-{plan}-PLAN.md`:
223
216
 
224
217
  ```markdown
225
- ---
226
- phase: {phase_number}-{phase_name}
227
- plan: {plan_number}
228
- type: execute # or tdd
229
- wave: {wave_number}
230
- depends_on: [{plan_ids}]
231
- files_modified: [{files}]
232
- subsystem_hint: {from phase_context, for executor SUMMARY.md}
233
- user_setup: [] # If external services needed
234
-
235
- must_haves:
236
- truths:
237
- - {observable_behaviors}
238
- artifacts:
239
- - path: {file_path}
240
- provides: {description}
241
- key_links:
242
- - from: {source}
243
- to: {target}
244
- via: {method}
245
- ---
218
+ # Plan {NN}: {Descriptive Title}
246
219
 
247
- <objective>
248
- {plan_goal}
220
+ **Subsystem:** {subsystem_hint} | **Type:** tdd
249
221
 
250
- Purpose: {why_this_matters}
251
- Output: {artifacts_created}
252
- </objective>
222
+ ## Context
223
+ {Why this work exists. Approach chosen and WHY.}
253
224
 
254
- <execution_context>
255
- @~/.claude/mindsystem/workflows/execute-plan.md
256
- @~/.claude/mindsystem/templates/summary.md
257
- </execution_context>
225
+ ## Changes
258
226
 
259
- <context>
260
- @.planning/PROJECT.md
261
- @.planning/ROADMAP.md
262
- @.planning/STATE.md
263
- {Prior SUMMARYs only if genuinely needed}
264
- {If debug resolution directly relevant to a plan task: @.planning/debug/resolved/{slug}.md}
265
- {Relevant source files}
266
- </context>
227
+ ### 1. {Change title}
228
+ **Files:** `{file_path}`
267
229
 
268
- <tasks>
269
- {Task XML from input, expanded with full structure}
270
- </tasks>
230
+ {Implementation details. Reference existing utilities with paths.}
271
231
 
272
- <verification>
273
- - [ ] {verification_checks}
274
- </verification>
232
+ ### 2. {Another change}
233
+ **Files:** `{file_path}`, `{another_path}`
275
234
 
276
- <success_criteria>
277
- - All tasks completed
278
- - {plan_specific_criteria}
279
- </success_criteria>
235
+ {Details with inline code blocks where needed.}
280
236
 
281
- <output>
282
- After completion, create `.planning/phases/{phase_dir}/{phase}-{plan}-SUMMARY.md`
283
- </output>
284
- ```
237
+ ## Verification
238
+ - `{bash command}` {expected result}
239
+ - `{another command}` {expected result}
285
240
 
286
- **Task expansion:** Convert input task hints to full task structure:
287
- ```xml
288
- <task type="{type}">
289
- <name>Task {N}: {name}</name>
290
- <files>{creates}</files>
291
- <action>{action_hint expanded}</action>
292
- <verify>{verify_hint}</verify>
293
- <done>{done_hint}</done>
294
- </task>
241
+ ## Must-Haves
242
+ - [ ] {observable truth}
243
+ - [ ] {observable truth}
295
244
  ```
296
245
 
297
- **Learnings-aware expansion:** When expanding `action_hint` to full `<action>`, check `<learnings>` for entries relevant to this specific task:
298
- - Debug resolution whose domain matches task files or subsystem
299
- - Established pattern that applies to this task's implementation
300
- - Curated learning matching the task's technical area
246
+ **Format rules:**
247
+ - Omit `| **Type:** tdd` when type is execute (type defaults to execute)
248
+ - Plans carry no `<execution_context>`, `<context>`, or @-references — the executor loads its own workflow and project files via its agent definition
249
+ - No `<tasks>`, `<verification>`, `<success_criteria>`, `<output>` XML containers
301
250
 
302
- For each relevant learning, append a directive to `<action>`:
251
+ **Learnings integration:** When expanding tasks to ## Changes subsections, check `<learnings>` for entries relevant to each change:
303
252
 
304
- ```xml
305
- <action>
306
- {expanded action_hint}
253
+ ```markdown
254
+ ### 2. Create auth endpoint
255
+ **Files:** `src/api/auth/login.ts`
307
256
 
308
- Based on prior learning ({source}): {actionable directive}
309
- </action>
257
+ POST endpoint accepting {email, password}...
258
+
259
+ **From prior work:** CommonJS libraries fail silently in Edge runtime — verify ESM compat.
310
260
  ```
311
261
 
312
262
  Rules:
313
- - Maximum 2 learning directives per task (context budget)
263
+ - Maximum 2 learning directives per change
314
264
  - Only include learnings that change what the executor would do
315
265
  - Phrase as imperative directives, not history
316
- - If no learnings match a task, add nothing
266
+ - If no learnings match a change, add nothing
267
+
268
+ **TDD plans:** When type is tdd, use RED/GREEN/REFACTOR structure in ## Changes:
317
269
 
318
- **TDD plans:** Use `type: tdd` with feature structure instead of tasks.
270
+ ```markdown
271
+ ### 1. RED — Write failing tests
272
+ **Files:** `src/lib/__tests__/validate-email.test.ts`
273
+
274
+ {Test cases and expectations.}
275
+
276
+ ### 2. GREEN — Implement minimal solution
277
+ **Files:** `src/lib/validate-email.ts`
278
+
279
+ {Minimal implementation to pass tests.}
280
+
281
+ ### 3. REFACTOR — Improve structure
282
+ **Files:** `src/lib/validate-email.ts`
283
+
284
+ {Structural improvements. Run tests — all must still pass.}
285
+ ```
286
+ </step>
287
+
288
+ <step name="write_execution_order">
289
+ **Generate EXECUTION-ORDER.md alongside plans.**
290
+
291
+ Create `.planning/phases/{phase_dir}/EXECUTION-ORDER.md`:
292
+
293
+ ```markdown
294
+ # Execution Order
295
+
296
+ ## Wave 1 (parallel)
297
+ - 01-PLAN.md — {description}
298
+ - 02-PLAN.md — {description}
299
+
300
+ ## Wave 2 (parallel)
301
+ - 03-PLAN.md — {description} (depends on 01 for {reason})
302
+ ```
303
+
304
+ Rules:
305
+ - One wave per dependency level
306
+ - Plans within a wave execute in parallel
307
+ - Brief dependency notes for waves > 1
308
+ - All plans listed
319
309
  </step>
320
310
 
321
311
  <step name="git_commit">
322
312
  **Commit all plan files.**
323
313
 
324
314
  ```bash
325
- git add .planning/phases/${PHASE}*/*-PLAN.md
315
+ git add .planning/phases/${PHASE_DIR}/*-PLAN.md .planning/phases/${PHASE_DIR}/EXECUTION-ORDER.md
326
316
  git commit -m "$(cat <<'EOF'
327
317
  docs(${PHASE}): create phase plans
328
318
 
@@ -355,8 +345,8 @@ if plan_count >= 5:
355
345
  score += 15
356
346
  factors.append(f"{plan_count} plans in phase")
357
347
 
358
- # External services (from user_setup)
359
- services = collect from user_setup frontmatter
348
+ # External services (from task descriptions)
349
+ services = external services mentioned in task descriptions
360
350
  if services:
361
351
  score += min(len(services) * 10, 20)
362
352
  factors.append(f"External services: {', '.join(services)}")
@@ -420,6 +410,7 @@ Return structured markdown to orchestrator:
420
410
 
421
411
  ### Files Created
422
412
 
413
+ - `.planning/phases/{phase_dir}/EXECUTION-ORDER.md`
423
414
  - `.planning/phases/{phase_dir}/{phase}-01-PLAN.md`
424
415
  - `.planning/phases/{phase_dir}/{phase}-02-PLAN.md`
425
416
  - ...
@@ -430,6 +421,10 @@ The orchestrator parses this to present risk via AskUserQuestion and offer next
430
421
 
431
422
  <anti_patterns>
432
423
 
424
+ **DO NOT use YAML frontmatter or XML containers in plans.** Plans are pure markdown.
425
+
426
+ **DO NOT put wave numbers or dependencies in individual plans.** Use EXECUTION-ORDER.md.
427
+
433
428
  **DO NOT reflexively chain dependencies.**
434
429
  Plan 02 does not depend on Plan 01 just because 01 comes first. Check actual needs/creates.
435
430
 
@@ -453,12 +448,13 @@ Only reference prior SUMMARYs if this plan genuinely imports types/exports from
453
448
 
454
449
  Plan writing complete when:
455
450
 
456
- - [ ] References loaded (phase-prompt, scope-estimation, etc.)
451
+ - [ ] References loaded (phase-prompt, plan-format, scope-estimation, + tdd if needed)
457
452
  - [ ] Dependency graph built from needs/creates
458
453
  - [ ] Waves assigned (all roots wave 1, dependents correct)
459
454
  - [ ] Tasks grouped into plans (2-3 tasks, ~50% context)
460
- - [ ] must_haves derived for each plan
461
- - [ ] PLAN.md files written with full structure
455
+ - [ ] Must-haves derived as markdown checklists
456
+ - [ ] PLAN.md files written with pure markdown format
457
+ - [ ] EXECUTION-ORDER.md generated with wave groups
462
458
  - [ ] Plans committed to git
463
459
  - [ ] Risk score calculated with factors
464
460
  - [ ] Structured result returned to orchestrator
@@ -327,18 +327,6 @@ Track coverage as you go.
327
327
  - New milestone: Start at 1
328
328
  - Continuing milestone: Check existing phases, start at last + 1
329
329
 
330
- ## Depth Calibration
331
-
332
- Read depth from config.json. Depth controls compression tolerance.
333
-
334
- | Depth | Typical Phases | What It Means |
335
- |-------|----------------|---------------|
336
- | Quick | 3-5 | Combine aggressively, critical path only |
337
- | Standard | 5-8 | Balanced grouping |
338
- | Comprehensive | 8-12 | Let natural boundaries stand |
339
-
340
- **Key:** Derive phases from work, then apply depth as compression guidance. Don't pad small projects or compress complex ones.
341
-
342
330
  ## Good Phase Patterns
343
331
 
344
332
  **Foundation → Features → Enhancement**
@@ -449,7 +437,6 @@ When presenting to user for approval:
449
437
  ## ROADMAP DRAFT
450
438
 
451
439
  **Phases:** [N]
452
- **Depth:** [from config]
453
440
  **Coverage:** [X]/[Y] requirements mapped
454
441
 
455
442
  ### Phase Structure
@@ -510,7 +497,7 @@ Orchestrator provides:
510
497
  - PROJECT.md content (core value, constraints)
511
498
  - research/FEATURES.md content (if exists - feature categorization)
512
499
  - research/SUMMARY.md content (if exists - phase suggestions)
513
- - config.json (depth setting, starting phase number)
500
+ - config.json (starting phase number)
514
501
 
515
502
  Parse and confirm understanding before proceeding.
516
503
 
@@ -552,8 +539,6 @@ Apply phase identification methodology:
552
539
  1. Group requirements by natural delivery boundaries
553
540
  2. Identify dependencies between groups
554
541
  3. Create phases that complete coherent capabilities
555
- 4. Check depth setting for compression guidance
556
-
557
542
  ## Step 5: Derive Success Criteria and Pre-Work Flags
558
543
 
559
544
  For each phase, apply goal-backward:
@@ -629,7 +614,6 @@ When files are written and returning to orchestrator:
629
614
  ### Summary
630
615
 
631
616
  **Phases:** {N}
632
- **Depth:** {from config}
633
617
  **Coverage:** {X}/{X} requirements mapped ✓
634
618
 
635
619
  | Phase | Goal | Requirements |
@@ -774,7 +758,6 @@ Roadmap is complete when:
774
758
  - [ ] All v1 requirements extracted with IDs
775
759
  - [ ] Research context loaded (if exists)
776
760
  - [ ] Phases derived from requirements (not imposed)
777
- - [ ] Depth calibration applied
778
761
  - [ ] Dependencies between phases identified
779
762
  - [ ] Success criteria derived for each phase (2-5 observable behaviors)
780
763
  - [ ] Success criteria cross-checked against requirements (gaps resolved)
@@ -74,33 +74,37 @@ Extract phase goal from ROADMAP.md. This is the outcome to verify, not the tasks
74
74
 
75
75
  Determine what must be verified. In re-verification mode, must-haves come from Step 0.
76
76
 
77
- **Option A: Must-haves in PLAN frontmatter**
77
+ **Option A: Must-Haves from PLAN.md**
78
78
 
79
- Check if any PLAN.md has `must_haves` in frontmatter:
79
+ Check if any PLAN.md has a `## Must-Haves` section:
80
80
 
81
81
  ```bash
82
- grep -l "must_haves:" "$PHASE_DIR"/*-PLAN.md 2>/dev/null
82
+ grep -l "## Must-Haves" "$PHASE_DIR"/*-PLAN.md 2>/dev/null
83
83
  ```
84
84
 
85
- If found, extract and use:
85
+ If found, parse the markdown checklist items:
86
86
 
87
- ```yaml
88
- must_haves:
89
- truths:
90
- - "User can see existing messages"
91
- - "User can send a message"
92
- artifacts:
93
- - path: "src/components/Chat.tsx"
94
- provides: "Message list rendering"
95
- key_links:
96
- - from: "Chat.tsx"
97
- to: "api/chat"
98
- via: "fetch in useEffect"
87
+ ```markdown
88
+ ## Must-Haves
89
+ - [ ] User can see existing messages
90
+ - [ ] User can send a message
99
91
  ```
100
92
 
93
+ Each `- [ ]` item is a **truth** to verify.
94
+
95
+ **Derive artifacts** from `## Changes` section by parsing `**Files:**` lines:
96
+
97
+ ```bash
98
+ grep "^\*\*Files:\*\*" "$PHASE_DIR"/*-PLAN.md
99
+ ```
100
+
101
+ Each `**Files:**` line identifies artifacts to verify (existence, substantiveness, wiring).
102
+
103
+ **Derive key_links** from `## Changes` content — look for references between components (fetch calls, imports, database queries mentioned in implementation details).
104
+
101
105
  **Option B: Derive from phase goal**
102
106
 
103
- If no must_haves in frontmatter, derive using goal-backward process:
107
+ If no `## Must-Haves` section found in plans, derive using goal-backward process:
104
108
 
105
109
  1. **State the goal:** Take phase goal from ROADMAP.md
106
110
 
@@ -764,7 +768,7 @@ return <div>No messages</div> // Always shows "no messages"
764
768
 
765
769
  - [ ] Previous VERIFICATION.md checked (Step 0)
766
770
  - [ ] If re-verification: must-haves loaded from previous, focus on failed items
767
- - [ ] If initial: must-haves established (from frontmatter or derived)
771
+ - [ ] If initial: must-haves established (from ## Must-Haves section or derived from phase goal)
768
772
  - [ ] All truths verified with status and evidence
769
773
  - [ ] All artifacts checked at all three levels (exists, substantive, wired)
770
774
  - [ ] All key links verified
@@ -18,11 +18,11 @@ This spawns ms-plan-checker to analyze your PLAN.md files against the phase goal
18
18
 
19
19
  <what_it_checks>
20
20
  1. **Requirement Coverage** — Does every phase requirement have tasks addressing it?
21
- 2. **Task Completeness** — Does every task have files, action, verify, done?
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
24
  5. **Scope Sanity** — Will plans complete within context budget (2-3 tasks per plan)?
25
- 6. **Verification Derivation** — Are must_haves user-observable, not implementation-focused?
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>
28
28
 
@@ -60,7 +60,7 @@ Count plans and tasks:
60
60
  ```bash
61
61
  for plan in "$PHASE_DIR"/*-PLAN.md; do
62
62
  echo "=== $(basename $plan) ==="
63
- grep -c "<task" "$plan" 2>/dev/null || echo "0 tasks"
63
+ grep -c "^### " "$plan" 2>/dev/null || echo "0 changes"
64
64
  done
65
65
  ```
66
66
  </step>
@@ -109,14 +109,7 @@ If exists, extract:
109
109
 
110
110
  **3c. Optional context — project UI skill:**
111
111
 
112
- Discover project-level skills:
113
- ```bash
114
- ls .claude/skills/*/SKILL.md 2>/dev/null
115
- ```
116
-
117
- If skills found, read the YAML frontmatter (name + description) of each SKILL.md. Identify any skill whose description indicates it provides UI implementation patterns (screens, widgets, components, theming, spacing, visual patterns).
118
-
119
- If a UI skill is found, read its full content. Extract aesthetic patterns (colors, components, spacing, typography) for the `<existing_aesthetic>` block passed to ms-designer.
112
+ Before proceeding, check your available skills for one that provides domain expertise relevant to this project's UI implementation patterns. If found, invoke it via the Skill tool and extract aesthetic patterns (colors, components, spacing, typography) for the `<existing_aesthetic>` block passed to ms-designer.
120
113
 
121
114
  **3d. Optional context - codebase analysis:**
122
115
 
@@ -185,7 +178,7 @@ Follow mockup-generation workflow:
185
178
  4. Present directions to user for approval/tweaking
186
179
  5. Read platform template (mobile or web)
187
180
  6. Spawn 3 x ms-mockup-designer agents in parallel
188
- 7. Present mockup file paths user opens in browser
181
+ 7. Generate comparison page, open in browser, and present to user
189
182
  8. Handle selection (single pick, combine, tweak, more variants, or skip)
190
183
  9. Extract CSS specs from chosen variant into `<mockup_direction>` block
191
184
 
@@ -17,7 +17,7 @@ allowed-tools:
17
17
  <objective>
18
18
  Execute all plans in a phase using wave-based parallel execution.
19
19
 
20
- Orchestrator stays lean: discover plans, analyze dependencies, group into waves, spawn subagents, collect results. Each subagent loads the full execute-plan context and handles its own plan.
20
+ Orchestrator stays lean: discover plans, read execution order, spawn subagents in waves, collect results. Each subagent loads the full execute-plan context and handles its own plan.
21
21
 
22
22
  Context budget: ~15% orchestrator, 100% fresh per subagent.
23
23
  </objective>
@@ -49,11 +49,12 @@ PHASE=$(printf "%02d" "$PHASE_ARG" 2>/dev/null || echo "$PHASE_ARG")
49
49
  2. **Discover plans**
50
50
  - List all *-PLAN.md files in phase directory
51
51
  - Check which have *-SUMMARY.md (already complete)
52
+ - Verify EXECUTION-ORDER.md exists
52
53
  - Build list of incomplete plans
53
54
 
54
- 3. **Group by wave**
55
- - Read `wave` from each plan's frontmatter
56
- - Group plans by wave number
55
+ 3. **Validate and read execution order**
56
+ - Run `validate-execution-order.sh` on phase directory
57
+ - Parse EXECUTION-ORDER.md wave structure
57
58
  - Report wave structure to user
58
59
 
59
60
  4. **Execute waves**
@@ -61,6 +62,7 @@ PHASE=$(printf "%02d" "$PHASE_ARG" 2>/dev/null || echo "$PHASE_ARG")
61
62
  - Spawn `ms-executor` for each plan in wave (parallel Task calls)
62
63
  - Wait for completion (Task blocks)
63
64
  - Verify SUMMARYs created
65
+ - Run `update-state.sh` to update plan progress
64
66
  - Proceed to next wave
65
67
 
66
68
  5. **Aggregate results**
@@ -75,7 +77,7 @@ PHASE=$(printf "%02d" "$PHASE_ARG" 2>/dev/null || echo "$PHASE_ARG")
75
77
 
76
78
  7. **Verify phase goal**
77
79
  - Spawn `ms-verifier` subagent with phase directory and goal
78
- - Verifier checks must_haves against actual codebase (not SUMMARY claims)
80
+ - Verifier checks Must-Haves against actual codebase (not SUMMARY claims)
79
81
  - Creates VERIFICATION.md with detailed report
80
82
  - Route by status:
81
83
  - `passed` → continue to step 8
@@ -226,7 +228,7 @@ After all plans in phase complete:
226
228
  - [ ] All incomplete plans in phase executed
227
229
  - [ ] Each plan has SUMMARY.md
228
230
  - [ ] Code review completed (or skipped if config says "skip")
229
- - [ ] Phase goal verified (must_haves checked against codebase)
231
+ - [ ] Phase goal verified (Must-Haves checked against codebase)
230
232
  - [ ] VERIFICATION.md created in phase directory
231
233
  - [ ] Patch file generated OR explicitly skipped with message
232
234
  - [ ] STATE.md reflects phase completion
@@ -196,14 +196,9 @@ Execute all unexecuted plans in a phase with wave-based parallelization.
196
196
  - Spawns parallel agents for independent plans
197
197
  - Resumes automatically from interrupted execution
198
198
  - Creates SUMMARY.md for each completed plan
199
- - Respects max_concurrent_agents from config.json
200
199
 
201
200
  Usage: `/ms:execute-phase 5`
202
201
 
203
- Options (via `.planning/config.json` parallelization section):
204
- - `max_concurrent_agents`: Limit parallel agents (default: 3)
205
- - `min_plans_for_parallel`: Minimum plans to trigger parallelization (default: 2)
206
-
207
202
  ### Verification
208
203
 
209
204
  **`/ms:check-phase <number>`**