mindsystem-cc 3.10.1 → 3.12.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 (34) hide show
  1. package/README.md +1 -1
  2. package/agents/ms-designer.md +8 -8
  3. package/agents/ms-executor.md +14 -163
  4. package/agents/ms-plan-checker.md +2 -3
  5. package/agents/ms-plan-writer.md +6 -21
  6. package/agents/ms-roadmapper.md +1 -18
  7. package/agents/ms-verify-fixer.md +1 -1
  8. package/commands/ms/design-phase.md +9 -14
  9. package/commands/ms/execute-phase.md +0 -9
  10. package/commands/ms/help.md +1 -8
  11. package/commands/ms/new-project.md +3 -40
  12. package/commands/ms/review-design.md +4 -7
  13. package/commands/ms/verify-work.md +1 -1
  14. package/mindsystem/references/design-directions.md +1 -1
  15. package/mindsystem/references/mock-patterns.md +48 -0
  16. package/mindsystem/references/plan-format.md +2 -129
  17. package/mindsystem/references/scope-estimation.md +3 -36
  18. package/mindsystem/templates/config.json +0 -13
  19. package/mindsystem/templates/design.md +1 -1
  20. package/mindsystem/templates/phase-prompt.md +6 -142
  21. package/mindsystem/templates/roadmap.md +1 -1
  22. package/mindsystem/templates/summary.md +24 -0
  23. package/mindsystem/workflows/execute-phase.md +4 -99
  24. package/mindsystem/workflows/execute-plan.md +12 -523
  25. package/mindsystem/workflows/generate-mocks.md +74 -0
  26. package/mindsystem/workflows/mockup-generation.md +11 -5
  27. package/mindsystem/workflows/plan-phase.md +15 -60
  28. package/mindsystem/workflows/transition.md +1 -10
  29. package/mindsystem/workflows/verify-work.md +97 -17
  30. package/package.json +1 -1
  31. package/scripts/__pycache__/compare_mockups.cpython-314.pyc +0 -0
  32. package/scripts/compare_mockups.py +219 -0
  33. package/mindsystem/references/checkpoint-detection.md +0 -50
  34. package/mindsystem/references/checkpoints.md +0 -788
@@ -16,7 +16,6 @@ type: execute
16
16
  wave: N # Execution wave (1, 2, 3...). Pre-computed at plan time.
17
17
  depends_on: [] # Plan IDs this plan requires (e.g., ["01-01"]).
18
18
  files_modified: [] # Files this plan modifies.
19
- autonomous: true # false if plan has checkpoints requiring user interaction
20
19
  subsystem_hint: "" # From planner, for executor SUMMARY.md
21
20
  user_setup: [] # Human-required setup Claude cannot automate (see below)
22
21
 
@@ -37,8 +36,6 @@ Output: [What artifacts will be created]
37
36
  <execution_context>
38
37
  @~/.claude/mindsystem/workflows/execute-plan.md
39
38
  @~/.claude/mindsystem/templates/summary.md
40
- [If plan contains checkpoint tasks (type="checkpoint:*"), add:]
41
- @~/.claude/mindsystem/references/checkpoints.md
42
39
  </execution_context>
43
40
 
44
41
  <context>
@@ -73,35 +70,6 @@ Output: [What artifacts will be created]
73
70
  <done>[Acceptance criteria]</done>
74
71
  </task>
75
72
 
76
- <task type="checkpoint:decision" gate="blocking">
77
- <decision>[What needs deciding]</decision>
78
- <context>[Why this decision matters]</context>
79
- <options>
80
- <option id="option-a">
81
- <name>[Option name]</name>
82
- <pros>[Benefits and advantages]</pros>
83
- <cons>[Tradeoffs and limitations]</cons>
84
- </option>
85
- <option id="option-b">
86
- <name>[Option name]</name>
87
- <pros>[Benefits and advantages]</pros>
88
- <cons>[Tradeoffs and limitations]</cons>
89
- </option>
90
- </options>
91
- <resume-signal>[How to indicate choice - "Select: option-a or option-b"]</resume-signal>
92
- </task>
93
-
94
- <task type="checkpoint:human-verify" gate="blocking">
95
- <what-built>[What Claude just built that needs verification]</what-built>
96
- <how-to-verify>
97
- 1. Run: [command to start dev server/app]
98
- 2. Visit: [URL to check]
99
- 3. Test: [Specific interactions]
100
- 4. Confirm: [Expected behaviors]
101
- </how-to-verify>
102
- <resume-signal>Type "approved" to continue, or describe issues to fix</resume-signal>
103
- </task>
104
-
105
73
  </tasks>
106
74
 
107
75
  <verification>
@@ -136,7 +104,6 @@ After completion, create `.planning/phases/XX-name/{phase}-{plan}-SUMMARY.md`
136
104
  | `wave` | Yes | Execution wave number (1, 2, 3...). Pre-computed at plan time. |
137
105
  | `depends_on` | Yes | Array of plan IDs this plan requires. |
138
106
  | `files_modified` | Yes | Files this plan touches. |
139
- | `autonomous` | Yes | `true` if no checkpoints, `false` if has checkpoints |
140
107
  | `subsystem_hint` | No | Subsystem from config.json, assigned by planner for executor to use in SUMMARY.md |
141
108
  | `user_setup` | No | Array of human-required setup items (external services) |
142
109
  | `must_haves` | Yes | Goal-backward verification criteria (see below) |
@@ -158,19 +125,16 @@ After completion, create `.planning/phases/XX-name/{phase}-{plan}-SUMMARY.md`
158
125
  wave: 1
159
126
  depends_on: []
160
127
  files_modified: [src/models/user.ts, src/api/users.ts]
161
- autonomous: true
162
128
 
163
129
  # Plan 02 - Product feature (no overlap with Plan 01)
164
130
  wave: 1
165
131
  depends_on: []
166
132
  files_modified: [src/models/product.ts, src/api/products.ts]
167
- autonomous: true
168
133
 
169
134
  # Plan 03 - Order feature (no overlap)
170
135
  wave: 1
171
136
  depends_on: []
172
137
  files_modified: [src/models/order.ts, src/api/orders.ts]
173
- autonomous: true
174
138
  ```
175
139
 
176
140
  All three run in parallel (Wave 1) - no dependencies, no file conflicts.
@@ -182,28 +146,15 @@ All three run in parallel (Wave 1) - no dependencies, no file conflicts.
182
146
  wave: 1
183
147
  depends_on: []
184
148
  files_modified: [src/lib/auth.ts, src/middleware/auth.ts]
185
- autonomous: true
186
149
 
187
150
  # Plan 02 - Protected features (needs auth)
188
151
  wave: 2
189
152
  depends_on: ["01"]
190
153
  files_modified: [src/features/dashboard.ts]
191
- autonomous: true
192
154
  ```
193
155
 
194
156
  Plan 02 in Wave 2 waits for Plan 01 in Wave 1 - genuine dependency on auth types/middleware.
195
157
 
196
- **Checkpoint plan:**
197
-
198
- ```yaml
199
- # Plan 03 - UI with verification
200
- wave: 3
201
- depends_on: ["01", "02"]
202
- files_modified: [src/components/Dashboard.tsx]
203
- autonomous: false # Has checkpoint:human-verify
204
- ```
205
-
206
- Wave 3 runs after Waves 1 and 2. Pauses at checkpoint, orchestrator presents to user, resumes on approval.
207
158
 
208
159
  </parallel_examples>
209
160
 
@@ -283,19 +234,12 @@ See `~/.claude/mindsystem/references/tdd.md` for TDD plan structure.
283
234
 
284
235
  ## Task Types
285
236
 
286
- | Type | Use For | Autonomy |
287
- |------|---------|----------|
288
- | `auto` | Everything Claude can do independently | Fully autonomous |
289
- | `checkpoint:human-verify` | Visual/functional verification | Pauses, returns to orchestrator |
290
- | `checkpoint:decision` | Implementation choices | Pauses, returns to orchestrator |
291
- | `checkpoint:human-action` | Truly unavoidable manual steps (rare) | Pauses, returns to orchestrator |
237
+ | Type | Use For |
238
+ |------|---------|
239
+ | `auto` | Everything Claude can do independently (default) |
240
+ | `tdd` | TDD features with RED GREEN REFACTOR cycle |
292
241
 
293
- **Checkpoint behavior in parallel execution:**
294
- - Plan runs until checkpoint
295
- - Agent returns with checkpoint details + agent_id
296
- - Orchestrator presents to user
297
- - User responds
298
- - Orchestrator resumes agent with `resume: agent_id`
242
+ **Decisions:** Resolve during planning via AskUserQuestion, not during execution. For purely technical choices, make the decision and document it in the plan's objective.
299
243
 
300
244
  ---
301
245
 
@@ -311,7 +255,6 @@ type: execute
311
255
  wave: 1
312
256
  depends_on: []
313
257
  files_modified: [src/features/user/model.ts, src/features/user/api.ts, src/features/user/UserList.tsx]
314
- autonomous: true
315
258
  ---
316
259
 
317
260
  <objective>
@@ -360,76 +303,6 @@ After completion, create `.planning/phases/03-features/03-01-SUMMARY.md`
360
303
  </output>
361
304
  ```
362
305
 
363
- **Plan with checkpoint (non-autonomous):**
364
-
365
- ```markdown
366
- ---
367
- phase: 03-features
368
- plan: 03
369
- type: execute
370
- wave: 2
371
- depends_on: ["03-01", "03-02"]
372
- files_modified: [src/components/Dashboard.tsx]
373
- autonomous: false
374
- ---
375
-
376
- <objective>
377
- Build dashboard with visual verification.
378
-
379
- Purpose: Integrate user and product features into unified view.
380
- Output: Working dashboard component.
381
- </objective>
382
-
383
- <execution_context>
384
- @~/.claude/mindsystem/workflows/execute-plan.md
385
- @~/.claude/mindsystem/templates/summary.md
386
- @~/.claude/mindsystem/references/checkpoints.md
387
- </execution_context>
388
-
389
- <context>
390
- @.planning/PROJECT.md
391
- @.planning/ROADMAP.md
392
- @.planning/phases/03-features/03-01-SUMMARY.md
393
- @.planning/phases/03-features/03-02-SUMMARY.md
394
- </context>
395
-
396
- <tasks>
397
- <task type="auto">
398
- <name>Task 1: Build Dashboard layout</name>
399
- <files>src/components/Dashboard.tsx</files>
400
- <action>Create responsive grid with UserList and ProductList components. Use Tailwind for styling.</action>
401
- <verify>npm run build succeeds</verify>
402
- <done>Dashboard renders without errors</done>
403
- </task>
404
-
405
- <task type="checkpoint:human-verify" gate="blocking">
406
- <what-built>Responsive dashboard with user and product sections</what-built>
407
- <how-to-verify>
408
- 1. Run: npm run dev
409
- 2. Visit: http://localhost:3000/dashboard
410
- 3. Desktop: Verify two-column grid
411
- 4. Mobile: Verify stacked layout
412
- 5. Check: No layout shift, no scroll issues
413
- </how-to-verify>
414
- <resume-signal>Type "approved" or describe issues</resume-signal>
415
- </task>
416
- </tasks>
417
-
418
- <verification>
419
- - [ ] npm run build succeeds
420
- - [ ] Visual verification passed
421
- </verification>
422
-
423
- <success_criteria>
424
- - All tasks completed
425
- - User approved visual layout
426
- </success_criteria>
427
-
428
- <output>
429
- After completion, create `.planning/phases/03-features/03-03-SUMMARY.md`
430
- </output>
431
- ```
432
-
433
306
  ---
434
307
 
435
308
  ## Anti-Patterns
@@ -446,14 +319,6 @@ Plan 02: All APIs (depends on 01)
446
319
  Plan 03: All UIs (depends on 02)
447
320
  ```
448
321
 
449
- **Bad: Missing autonomy flag**
450
- ```yaml
451
- # Has checkpoint but no autonomous: false
452
- depends_on: []
453
- files_modified: [...]
454
- # autonomous: ??? <- Missing!
455
- ```
456
-
457
322
  **Bad: Vague tasks**
458
323
  ```xml
459
324
  <task type="auto">
@@ -467,10 +332,9 @@ files_modified: [...]
467
332
  ## Guidelines
468
333
 
469
334
  - Always use XML structure for Claude parsing
470
- - Include `wave`, `depends_on`, `files_modified`, `autonomous` in every plan
335
+ - Include `wave`, `depends_on`, `files_modified` in every plan
471
336
  - Prefer vertical slices over horizontal layers
472
337
  - Only reference prior SUMMARYs when genuinely needed
473
- - Group checkpoints with related auto tasks in same plan
474
338
  - 2-3 tasks per plan, ~50% context max
475
339
 
476
340
  ---
@@ -121,7 +121,7 @@ Phases execute in numeric order: 2 → 2.1 → 2.2 → 3 → 3.1 → 4
121
121
 
122
122
  <guidelines>
123
123
  **Initial planning (v1.0):**
124
- - Phase count depends on depth setting (quick: 3-5, standard: 5-8, comprehensive: 8-12)
124
+ - Phase count derived from actual work (not a target number)
125
125
  - Each phase delivers something coherent
126
126
  - Phases can have 1+ plans (split if >3 tasks or multiple subsystems)
127
127
  - Plans use naming: {phase}-{plan}-PLAN.md (e.g., 01-02-PLAN.md)
@@ -38,6 +38,17 @@ patterns-established:
38
38
  - "Pattern 1: description"
39
39
  - "Pattern 2: description"
40
40
 
41
+ # Verification hints (required — aids verify-work mock classification, use `none` if not applicable)
42
+ mock_hints:
43
+ transient_states:
44
+ - state: "[description of transient UI state]"
45
+ component: "[file path]"
46
+ trigger: "[async call | animation | timer]"
47
+ external_data:
48
+ - source: "[API endpoint or data source]"
49
+ data_type: "[what kind of data]"
50
+ components: ["[file1]", "[file2]"]
51
+
41
52
  # Metrics
42
53
  duration: Xmin
43
54
  completed: YYYY-MM-DD
@@ -76,6 +87,17 @@ _Note: TDD tasks may have multiple commits (test → feat → refactor)_
76
87
  - `path/to/file.ts` - What it does
77
88
  - `path/to/another.ts` - What it does
78
89
 
90
+ ## Verification Hints
91
+
92
+ [If phase built UI with transient states or external data dependencies, list them.
93
+ If not applicable: "None — no transient states or external data dependencies."]
94
+
95
+ **Transient states:** [States that appear briefly during async operations]
96
+ - [state description] in `[component]` — triggered by [what]
97
+
98
+ **External data:** [Features that fetch specific data from APIs]
99
+ - [data type] from [source] — used by `[component1]`, `[component2]`
100
+
79
101
  ## Decisions Made
80
102
  [Key decisions with brief rationale, or "None - followed plan as specified"]
81
103
 
@@ -143,6 +165,8 @@ None - no external service configuration required.
143
165
  **Patterns:** Established conventions future phases should maintain.
144
166
 
145
167
  **Population:** Frontmatter is populated during summary creation in execute-plan.md. See `<step name="create_summary">` for field-by-field guidance.
168
+
169
+ **Mock hints (required):** Captures verification-relevant knowledge about transient UI states and external data dependencies. Transient states are UI states that appear briefly (loading skeletons, animations, transitions) — verify-work needs these to generate mocks that force/extend the state. External data entries identify features depending on API data — verify-work uses these to ask the user whether test data exists locally. Populate when the phase builds UI with these characteristics. When a phase has no transient states or external data dependencies, write `mock_hints: none` (with optional comment, e.g., `mock_hints: none # purely backend, no async UI`). Always populate — `none` is a valid value that tells verify-work to skip mock analysis.
146
170
  </frontmatter_guidance>
147
171
 
148
172
  <one_liner_rules>
@@ -3,7 +3,7 @@ Execute all plans in a phase using wave-based parallel execution. Orchestrator s
3
3
  </purpose>
4
4
 
5
5
  <core_principle>
6
- The orchestrator's job is coordination, not execution. Each subagent loads the full execute-plan context itself. Orchestrator discovers plans, analyzes dependencies, groups into waves, spawns agents, handles checkpoints, collects results.
6
+ The orchestrator's job is coordination, not execution. Each subagent loads the full execute-plan context itself. Orchestrator discovers plans, analyzes dependencies, groups into waves, spawns agents, collects results.
7
7
  </core_principle>
8
8
 
9
9
  <required_reading>
@@ -68,13 +68,11 @@ ls -1 "$PHASE_DIR"/*-SUMMARY.md 2>/dev/null | sort
68
68
 
69
69
  For each plan, read frontmatter to extract:
70
70
  - `wave: N` - Execution wave (pre-computed)
71
- - `autonomous: true/false` - Whether plan has checkpoints
72
71
 
73
72
  Build plan inventory:
74
73
  - Plan path
75
74
  - Plan ID (e.g., "03-01")
76
75
  - Wave number
77
- - Autonomous flag
78
76
  - Completion status (SUMMARY exists = complete)
79
77
 
80
78
  Skip completed plans. If all complete, report "Phase already executed" and exit.
@@ -87,8 +85,7 @@ Read `wave` from each plan's frontmatter and group by wave number:
87
85
  # For each plan, extract wave from frontmatter
88
86
  for plan in $PHASE_DIR/*-PLAN.md; do
89
87
  wave=$(grep "^wave:" "$plan" | cut -d: -f2 | tr -d ' ')
90
- autonomous=$(grep "^autonomous:" "$plan" | cut -d: -f2 | tr -d ' ')
91
- echo "$plan:$wave:$autonomous"
88
+ echo "$plan:$wave"
92
89
  done
93
90
  ```
94
91
 
@@ -113,7 +110,7 @@ Report wave structure with context:
113
110
  |------|-------|----------------|
114
111
  | 1 | 01-01, 01-02 | {from plan objectives} |
115
112
  | 2 | 01-03 | {from plan objectives} |
116
- | 3 | 01-04 [checkpoint] | {from plan objectives} |
113
+ | 3 | 01-04 | {from plan objectives} |
117
114
 
118
115
  ```
119
116
 
@@ -167,14 +164,12 @@ Execute each wave in sequence. Autonomous plans within a wave run in parallel.
167
164
  <execution_context>
168
165
  @~/.claude/mindsystem/workflows/execute-plan.md
169
166
  @~/.claude/mindsystem/templates/summary.md
170
- @~/.claude/mindsystem/references/checkpoints.md
171
167
  @~/.claude/mindsystem/references/tdd.md
172
168
  </execution_context>
173
169
 
174
170
  <context>
175
171
  Plan: @{plan_path}
176
172
  Project state: @.planning/STATE.md
177
- Config: @.planning/config.json (if exists)
178
173
  </context>
179
174
 
180
175
  <success_criteria>
@@ -228,93 +223,8 @@ Execute each wave in sequence. Autonomous plans within a wave run in parallel.
228
223
  - If continue: proceed to next wave (dependent plans may also fail)
229
224
  - If stop: exit with partial completion report
230
225
 
231
- 5. **Execute checkpoint plans between waves:**
226
+ 5. **Proceed to next wave**
232
227
 
233
- See `<checkpoint_handling>` for details.
234
-
235
- 6. **Proceed to next wave**
236
-
237
- </step>
238
-
239
- <step name="checkpoint_handling">
240
- Plans with `autonomous: false` require user interaction.
241
-
242
- **Detection:** Check `autonomous` field in frontmatter.
243
-
244
- **Execution flow for checkpoint plans:**
245
-
246
- 1. **Spawn agent for checkpoint plan:**
247
- ```
248
- Task(prompt="{subagent-task-prompt}", subagent_type="general-purpose")
249
- ```
250
-
251
- 2. **Agent runs until checkpoint:**
252
- - Executes auto tasks normally
253
- - Reaches checkpoint task (e.g., `type="checkpoint:human-verify"`) or auth gate
254
- - Agent returns with structured checkpoint (see checkpoint-return.md template)
255
-
256
- 3. **Agent return includes (structured format):**
257
- - Completed Tasks table with commit hashes and files
258
- - Current task name and blocker
259
- - Checkpoint type and details for user
260
- - What's awaited from user
261
-
262
- 4. **Orchestrator presents checkpoint to user:**
263
-
264
- Extract and display the "Checkpoint Details" and "Awaiting" sections from agent return:
265
- ```
266
- ## Checkpoint: [Type]
267
-
268
- **Plan:** 03-03 Dashboard Layout
269
- **Progress:** 2/3 tasks complete
270
-
271
- [Checkpoint Details section from agent return]
272
-
273
- [Awaiting section from agent return]
274
- ```
275
-
276
- 5. **User responds:**
277
- - "approved" / "done" → spawn continuation agent
278
- - Description of issues → spawn continuation agent with feedback
279
- - Decision selection → spawn continuation agent with choice
280
-
281
- 6. **Spawn continuation agent (NOT resume):**
282
-
283
- Use the continuation-prompt.md template:
284
- ```
285
- Task(
286
- prompt=filled_continuation_template,
287
- subagent_type="general-purpose"
288
- )
289
- ```
290
-
291
- Fill template with:
292
- - `{completed_tasks_table}`: From agent's checkpoint return
293
- - `{resume_task_number}`: Current task from checkpoint
294
- - `{resume_task_name}`: Current task name from checkpoint
295
- - `{user_response}`: What user provided
296
- - `{resume_instructions}`: Based on checkpoint type (see continuation-prompt.md)
297
-
298
- 7. **Continuation agent executes:**
299
- - Verifies previous commits exist
300
- - Continues from resume point
301
- - May hit another checkpoint (repeat from step 4)
302
- - Or completes plan
303
-
304
- 8. **Repeat until plan completes or user stops**
305
-
306
- **Why fresh agent instead of resume:**
307
- Resume relies on Claude Code's internal serialization which breaks with parallel tool calls.
308
- Fresh agents with explicit state are more reliable and maintain full context.
309
-
310
- **Checkpoint in parallel context:**
311
- If a plan in a parallel wave has a checkpoint:
312
- - Spawn as normal
313
- - Agent pauses at checkpoint and returns with structured state
314
- - Other parallel agents may complete while waiting
315
- - Present checkpoint to user
316
- - Spawn continuation agent with user response
317
- - Wait for all agents to finish before next wave
318
228
  </step>
319
229
 
320
230
  <step name="aggregate_results">
@@ -617,10 +527,6 @@ Each subagent: Fresh 200k context
617
527
  - Stop execution
618
528
  - Report for manual investigation
619
529
 
620
- **Checkpoint fails to resolve:**
621
- - User can't approve or provides repeated issues
622
- - Ask: "Skip this plan?" or "Abort phase execution?"
623
- - Record partial progress in STATE.md
624
530
  </failure_handling>
625
531
 
626
532
  <resumption>
@@ -637,5 +543,4 @@ If phase execution was interrupted (context limit, user exit, error):
637
543
  **STATE.md tracks:**
638
544
  - Last completed plan
639
545
  - Current wave
640
- - Any pending checkpoints
641
546
  </resumption>