mindsystem-cc 4.4.2 → 4.5.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.
- package/README.md +17 -8
- package/agents/ms-designer.md +25 -47
- package/agents/ms-executor.md +1 -1
- package/agents/ms-mockup-designer.md +7 -4
- package/agents/ms-plan-checker.md +32 -27
- package/agents/ms-plan-writer.md +12 -8
- package/commands/ms/adhoc.md +11 -1
- package/commands/ms/config.md +47 -9
- package/commands/ms/design-phase.md +83 -63
- package/commands/ms/discuss-phase.md +1 -0
- package/commands/ms/doctor.md +7 -3
- package/commands/ms/execute-phase.md +1 -5
- package/commands/ms/help.md +6 -5
- package/commands/ms/remove-phase.md +7 -25
- package/commands/ms/research-phase.md +13 -0
- package/commands/ms/review-design.md +1 -1
- package/commands/ms/verify-work.md +1 -3
- package/mindsystem/references/design-directions.md +2 -2
- package/mindsystem/references/plan-format.md +2 -13
- package/mindsystem/references/prework-status.md +6 -32
- package/mindsystem/references/routing/next-phase-routing.md +7 -41
- package/mindsystem/references/scope-estimation.md +8 -4
- package/mindsystem/templates/config.json +6 -0
- package/mindsystem/templates/design.md +1 -1
- package/mindsystem/workflows/adhoc.md +63 -0
- package/mindsystem/workflows/discuss-phase.md +12 -0
- package/mindsystem/workflows/doctor-fixes.md +71 -0
- package/mindsystem/workflows/execute-phase.md +19 -6
- package/mindsystem/workflows/execute-plan.md +1 -7
- package/mindsystem/workflows/mockup-generation.md +1 -1
- package/mindsystem/workflows/plan-phase.md +41 -77
- package/mindsystem/workflows/verify-work.md +8 -77
- package/package.json +1 -1
- package/scripts/ms-tools.py +481 -0
- package/agents/ms-verify-fixer.md +0 -125
|
@@ -13,7 +13,7 @@ Template for `.planning/phases/XX-name/{phase}-DESIGN.md` - captures visual/UX d
|
|
|
13
13
|
|
|
14
14
|
**Designed:** [date]
|
|
15
15
|
**Platform:** [web / mobile / both]
|
|
16
|
-
**Aesthetic source:** [project
|
|
16
|
+
**Aesthetic source:** [project design skill / codebase extraction / fresh design]
|
|
17
17
|
|
|
18
18
|
## Design Direction
|
|
19
19
|
|
|
@@ -100,6 +100,35 @@ Governing principle: each question must save more context than it costs. A quest
|
|
|
100
100
|
**On corrections:** Absorb user feedback and proceed to planning. Do not re-present the full briefing.
|
|
101
101
|
</step>
|
|
102
102
|
|
|
103
|
+
<step name="select_and_load_skills">
|
|
104
|
+
**Select from all configured skills.**
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
DISCUSS_SKILLS=$(ms-tools config-get skills.discuss --default "[]")
|
|
108
|
+
DESIGN_SKILLS=$(ms-tools config-get skills.design --default "[]")
|
|
109
|
+
RESEARCH_SKILLS=$(ms-tools config-get skills.research --default "[]")
|
|
110
|
+
PLAN_SKILLS=$(ms-tools config-get skills.plan --default "[]")
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Combine all arrays and deduplicate into a single list.
|
|
114
|
+
|
|
115
|
+
**If no skills configured across any phase:** Continue silently — adhoc is a fast path.
|
|
116
|
+
|
|
117
|
+
**If skills exist:** Analyze the task description and exploration findings against each unique skill. For each skill, assess whether it's relevant to the work at hand based on:
|
|
118
|
+
- Work description keywords and domain
|
|
119
|
+
- Subsystem(s) involved
|
|
120
|
+
- Types of files affected (from exploration step)
|
|
121
|
+
|
|
122
|
+
Present via AskUserQuestion with `multiSelect: true`:
|
|
123
|
+
- header: "Skills"
|
|
124
|
+
- question: "Which skills should inform this work?"
|
|
125
|
+
- Each unique skill as an option, append "(recommended)" to skills judged relevant
|
|
126
|
+
- Include "None — skip skill loading" option
|
|
127
|
+
- Free-text field for unlisted skills
|
|
128
|
+
|
|
129
|
+
**After selection:** Invoke selected skills via the Skill tool. Extract relevant implementation conventions for the adhoc planner — include as `<skill_context>` in the prompt sent to ms-adhoc-planner.
|
|
130
|
+
</step>
|
|
131
|
+
|
|
103
132
|
<step name="spawn_plan_writer">
|
|
104
133
|
Create per-execution subdirectory:
|
|
105
134
|
|
|
@@ -153,6 +182,40 @@ Provide in the prompt:
|
|
|
153
182
|
The executor reads the plan, executes tasks with atomic commits, creates SUMMARY.md, and returns completion report.
|
|
154
183
|
</step>
|
|
155
184
|
|
|
185
|
+
<step name="browser_verification">
|
|
186
|
+
Run browser verification prerequisites check:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
ms-tools browser-check
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
**If exit 0 (READY):**
|
|
193
|
+
|
|
194
|
+
Ensure `${exec_dir}/adhoc-01-SUMMARY.md` is available (needed for journey derivation — may already be in context from executor report).
|
|
195
|
+
|
|
196
|
+
Read `~/.claude/mindsystem/references/browser-verification.md` and follow its sections in order:
|
|
197
|
+
1. **Auth Flow** — establish browser authentication
|
|
198
|
+
2. **Derive User Journeys** — transform SUMMARY into user journeys (single file: `${exec_dir}/adhoc-01-SUMMARY.md`)
|
|
199
|
+
3. **Spawn** — launch ms-browser-verifier with derived journeys, screenshots directory: `${exec_dir}/screenshots`
|
|
200
|
+
4. **Post-Verifier Handling** — route by report status
|
|
201
|
+
|
|
202
|
+
**If exit 1 (MISSING_DEPS):**
|
|
203
|
+
|
|
204
|
+
Parse output for missing items. Use AskUserQuestion:
|
|
205
|
+
- header: "Browser verification"
|
|
206
|
+
- question: "Browser verification prerequisites are missing. How to proceed?"
|
|
207
|
+
- options:
|
|
208
|
+
- "Install missing dependencies" — follow install instructions from output
|
|
209
|
+
- "Skip browser verification" — proceed to code_review
|
|
210
|
+
|
|
211
|
+
If user installs: re-run `ms-tools browser-check`.
|
|
212
|
+
If user skips: proceed to code_review.
|
|
213
|
+
|
|
214
|
+
**If exit 2 (SKIP):**
|
|
215
|
+
|
|
216
|
+
Proceed silently to code_review.
|
|
217
|
+
</step>
|
|
218
|
+
|
|
156
219
|
<step name="code_review">
|
|
157
220
|
Read code review agent from config:
|
|
158
221
|
|
|
@@ -76,6 +76,18 @@ cat .planning/knowledge/{subsystem}.md 2>/dev/null
|
|
|
76
76
|
**If no knowledge files exist:** Skip silently (normal for first phase).
|
|
77
77
|
</step>
|
|
78
78
|
|
|
79
|
+
<step name="load_skills">
|
|
80
|
+
**Load configured skills for discussion context.**
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
DISCUSS_SKILLS=$(ms-tools config-get skills.discuss --default "[]")
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**If skills configured:** Invoke each via the Skill tool. Skill content informs product analysis, assumption generation, and collaborative questioning throughout the discussion.
|
|
87
|
+
|
|
88
|
+
**If no skills configured:** Continue silently. Discuss-phase works well without skills — they're an enhancement, not a requirement.
|
|
89
|
+
</step>
|
|
90
|
+
|
|
79
91
|
<step name="check_existing">
|
|
80
92
|
Check if CONTEXT.md already exists for this phase:
|
|
81
93
|
|
|
@@ -350,4 +350,75 @@ EOF
|
|
|
350
350
|
Replace `{phase summaries|source code analysis}` with the appropriate phrase based on detected mode.
|
|
351
351
|
</step>
|
|
352
352
|
|
|
353
|
+
<step name="fix_roadmap_format">
|
|
354
|
+
**Only if Roadmap Format failed.**
|
|
355
|
+
|
|
356
|
+
Fix missing or malformed pre-work flags (Discuss/Design/Research) in incomplete phases.
|
|
357
|
+
|
|
358
|
+
1. Read `.planning/ROADMAP.md` and `.planning/PROJECT.md`.
|
|
359
|
+
|
|
360
|
+
2. For each incomplete phase with flag issues (from doctor-scan output), determine the correct pre-work flags by applying roadmapper principles:
|
|
361
|
+
|
|
362
|
+
**Discussion** — Default Likely. Unlikely only when ALL of: fully mechanical (zero design decisions), zero ambiguity in scope or approach (version bump, rename-only refactor, config-only change, pure deletion/cleanup). When Likely, enumerate 2-4 phase-specific assumptions or open questions in the parenthetical reason.
|
|
363
|
+
|
|
364
|
+
**Design** — Likely when ANY of: significant new UI work, novel interactions, visual success criteria, cross-platform UI. Unlikely when ALL of: no UI work, backend/API only, infrastructure/testing/deployment, exclusively established UI patterns.
|
|
365
|
+
|
|
366
|
+
**Research** — Likely when ANY of: external APIs/services, new libraries/frameworks, unresolved architectural decisions, unclear technical approach. Unlikely when ALL of: established internal patterns, CRUD with known stack, well-documented conventions.
|
|
367
|
+
|
|
368
|
+
Use the phase's Goal, Success Criteria, Requirements, and project context from PROJECT.md to make these assessments.
|
|
369
|
+
|
|
370
|
+
3. Present proposed flags per phase:
|
|
371
|
+
|
|
372
|
+
```
|
|
373
|
+
## Roadmap Format Fixes
|
|
374
|
+
|
|
375
|
+
### Phase 8: Week Navigation
|
|
376
|
+
Current: Only **Research** flag present
|
|
377
|
+
Proposed:
|
|
378
|
+
**Discuss**: Likely (assumes carryover model unclear, week boundary behavior unspecified)
|
|
379
|
+
**Discuss topics**: carryover rules, week start day preference
|
|
380
|
+
**Design**: Likely (new navigation UI, week transition flow)
|
|
381
|
+
**Design focus**: week picker, carryover modal
|
|
382
|
+
**Research**: Likely (carryover) ← already present, keeping as-is
|
|
383
|
+
|
|
384
|
+
### Phase 9: Visual Polish
|
|
385
|
+
Current: Only **Research** flag present
|
|
386
|
+
Proposed:
|
|
387
|
+
**Discuss**: Likely (JARVIS aesthetic interpretation ambiguous, typography priorities unclear)
|
|
388
|
+
**Discuss topics**: aesthetic reference points, typography hierarchy
|
|
389
|
+
**Design**: Likely (significant visual redesign)
|
|
390
|
+
**Design focus**: color palette, component styling, typography system
|
|
391
|
+
**Research**: Unlikely (established patterns) ← updating from current
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
4. Use AskUserQuestion:
|
|
395
|
+
- header: "Roadmap format fixes"
|
|
396
|
+
- question: "These pre-work flags were derived from phase goals and project context. Apply?"
|
|
397
|
+
- options:
|
|
398
|
+
- "Apply all" — update ROADMAP.md with all proposed flags
|
|
399
|
+
- "Review each" — iterate per phase
|
|
400
|
+
- "Skip" — leave as-is
|
|
401
|
+
|
|
402
|
+
5. Apply accepted changes using Edit tool. Insert flags in the standard order within each phase section:
|
|
403
|
+
- After `**Success Criteria**` block (and any existing plan lines)
|
|
404
|
+
- Before `Plans:` or next phase header
|
|
405
|
+
- Standard format: `**Flag**: Likely/Unlikely (reason)` with detail lines for Likely flags
|
|
406
|
+
- Preserve any existing valid flags — only add missing or fix malformed ones
|
|
407
|
+
|
|
408
|
+
6. Commit:
|
|
409
|
+
|
|
410
|
+
```bash
|
|
411
|
+
git add .planning/ROADMAP.md
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
```bash
|
|
415
|
+
git commit -m "$(cat <<'EOF'
|
|
416
|
+
chore(doctor): fix roadmap pre-work flags
|
|
417
|
+
|
|
418
|
+
Added missing Discuss/Design/Research flags to incomplete phases.
|
|
419
|
+
EOF
|
|
420
|
+
)"
|
|
421
|
+
```
|
|
422
|
+
</step>
|
|
423
|
+
|
|
353
424
|
</process>
|
|
@@ -120,6 +120,23 @@ Report wave structure with context:
|
|
|
120
120
|
The "What it builds" column comes from skimming plan names/objectives. Keep it brief (3-8 words).
|
|
121
121
|
</step>
|
|
122
122
|
|
|
123
|
+
<step name="load_skill_reminders">
|
|
124
|
+
**Load plan skills and distill reminders for executors.**
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
PLAN_SKILLS=$(ms-tools config-get skills.plan --default "[]")
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**If skills configured:** Invoke each via the Skill tool. Distill to a concise `<skill_reminders>` block — 5-10 bullet points of key conventions that an executor should keep in mind while implementing. Focus on:
|
|
131
|
+
- Patterns to follow (naming, structure, API usage)
|
|
132
|
+
- Critical anti-patterns to avoid
|
|
133
|
+
- Quality signals specific to this domain
|
|
134
|
+
|
|
135
|
+
Plans were already written with skill context, so these reminders are a safety net for executor autonomous decisions (deviations, verification, edge cases).
|
|
136
|
+
|
|
137
|
+
**If no skills configured:** Skip. No reminders to inject.
|
|
138
|
+
</step>
|
|
139
|
+
|
|
123
140
|
<step name="execute_waves">
|
|
124
141
|
Execute each wave in sequence. Autonomous plans within a wave run in parallel.
|
|
125
142
|
|
|
@@ -158,7 +175,7 @@ Execute each wave in sequence. Autonomous plans within a wave run in parallel.
|
|
|
158
175
|
```
|
|
159
176
|
Task(
|
|
160
177
|
subagent_type="ms-executor",
|
|
161
|
-
prompt="Execute plan at {plan_path}\n\nPlan: @{plan_path}\nProject state: @.planning/STATE.md"
|
|
178
|
+
prompt="Execute plan at {plan_path}\n\nPlan: @{plan_path}\nProject state: @.planning/STATE.md\n\n<skill_reminders>\n{distilled bullet points, or omit block if none}\n</skill_reminders>"
|
|
162
179
|
)
|
|
163
180
|
```
|
|
164
181
|
|
|
@@ -541,11 +558,7 @@ All {Y} plans finished. Phase goal verified.
|
|
|
541
558
|
|
|
542
559
|
**If more phases remain AND skip context applies:**
|
|
543
560
|
|
|
544
|
-
|
|
545
|
-
- From ROADMAP.md (already in context), get Phase {Z+1} pre-work flags
|
|
546
|
-
- Check: CONTEXT.md exists? DESIGN.md? RESEARCH.md? in next phase dir
|
|
547
|
-
- Priority: discuss (if Likely + no CONTEXT.md) > design (if Likely + no DESIGN.md) > research (if Likely + no RESEARCH.md) > plan-phase
|
|
548
|
-
- Present ONE "Also available" entry:
|
|
561
|
+
Run `ms-tools prework-status {Z+1}` and use the Suggested line for the "Also available" entry:
|
|
549
562
|
|
|
550
563
|
```markdown
|
|
551
564
|
---
|
|
@@ -28,7 +28,7 @@ cat .planning/STATE.md 2>/dev/null
|
|
|
28
28
|
<step name="load_plan">
|
|
29
29
|
Read the plan file provided in your prompt context.
|
|
30
30
|
|
|
31
|
-
Parse inline metadata from header: `**Subsystem
|
|
31
|
+
Parse inline metadata from header: `**Subsystem:**` and `**Type:**` values.
|
|
32
32
|
|
|
33
33
|
Parse plan sections:
|
|
34
34
|
- Context (files to read, @-references)
|
|
@@ -43,12 +43,6 @@ Parse plan sections:
|
|
|
43
43
|
**If `**Type:** tdd`:** Read `~/.claude/mindsystem/references/tdd-execution.md` for RED-GREEN-REFACTOR execution flow.
|
|
44
44
|
</step>
|
|
45
45
|
|
|
46
|
-
<step name="load_skills">
|
|
47
|
-
**If `**Skills:**` is present in plan metadata:** Invoke each listed skill via the Skill tool before proceeding. These were confirmed by the user during planning — load them without further confirmation.
|
|
48
|
-
|
|
49
|
-
**If `**Skills:**` is absent:** Proceed without loading skills. Skill discovery happens during `/ms:plan-phase` — absence means no skills were relevant.
|
|
50
|
-
</step>
|
|
51
|
-
|
|
52
46
|
<step name="execute">
|
|
53
47
|
Record start time: `PLAN_START_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ"); PLAN_START_EPOCH=$(date +%s)`
|
|
54
48
|
|
|
@@ -91,7 +91,7 @@ Spawn 3 ms-mockup-designer agents IN PARALLEL, each receiving:
|
|
|
91
91
|
- `<design_direction>` — one of the 3 directions from `derive_directions` (name, philosophy, concrete choices)
|
|
92
92
|
- `<platform>` — `mobile` or `web` from `determine_platform`
|
|
93
93
|
- `<feature_grounding>` — screen/feature identified in `identify_primary_screen`
|
|
94
|
-
- `<existing_aesthetic>` —
|
|
94
|
+
- `<existing_aesthetic>` — pass through from orchestrator as-is
|
|
95
95
|
- `<mockup_template>` — HTML scaffold from `read_template`
|
|
96
96
|
- Output path: `.planning/phases/{phase}-{slug}/mockups/variant-a.html` (b, c for others)
|
|
97
97
|
|
|
@@ -39,12 +39,6 @@ Create executable phase prompts (PLAN.md files) from task breakdown.
|
|
|
39
39
|
**Vertical slices over horizontal layers:** Group by feature (User: model + API + UI) not by type (all models → all APIs → all UIs).
|
|
40
40
|
|
|
41
41
|
**Explicit dependencies:** EXECUTION-ORDER.md centralizes dependency and parallelism tracking. Plans with no dependencies = parallel candidates.
|
|
42
|
-
|
|
43
|
-
**Secure by design:** Assume hostile input on every boundary. Validate, parameterize, authenticate, fail closed.
|
|
44
|
-
|
|
45
|
-
**Performance by design:** Assume production load, not demo conditions. Plan for efficient data access, appropriate caching, minimal round trips.
|
|
46
|
-
|
|
47
|
-
**Observable by design:** Plan to debug your own work. Include meaningful error messages, appropriate logging, and clear failure states.
|
|
48
42
|
</planning_principles>
|
|
49
43
|
|
|
50
44
|
<process>
|
|
@@ -246,26 +240,9 @@ For each potential task, ask:
|
|
|
246
240
|
- **Verify hint**: How to prove it worked
|
|
247
241
|
- **Done hint**: Acceptance criteria
|
|
248
242
|
|
|
249
|
-
**TDD detection:**
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
- Business logic with defined inputs/outputs
|
|
253
|
-
- API endpoints with request/response contracts
|
|
254
|
-
- Data transformations, parsing, formatting
|
|
255
|
-
- Validation rules and constraints
|
|
256
|
-
- Algorithms with testable behavior
|
|
257
|
-
- State machines and workflows
|
|
258
|
-
|
|
259
|
-
Standard tasks (remain in standard plans):
|
|
260
|
-
- UI layout, styling, visual components
|
|
261
|
-
- Configuration changes
|
|
262
|
-
- Glue code connecting existing components
|
|
263
|
-
- One-off scripts and migrations
|
|
264
|
-
- Simple CRUD with no business logic
|
|
265
|
-
|
|
266
|
-
**Heuristic:** Can you write `expect(fn(input)).toBe(output)` before writing `fn`?
|
|
267
|
-
→ Yes: Mark as tdd_candidate=true
|
|
268
|
-
→ No: Standard task
|
|
243
|
+
**TDD detection:** Can you write `expect(fn(input)).toBe(output)` before writing `fn`?
|
|
244
|
+
→ Yes (business logic, validation, data transforms, algorithms): tdd_candidate=true
|
|
245
|
+
→ No (UI layout, config, glue code, simple CRUD): standard task
|
|
269
246
|
|
|
270
247
|
**If any tasks were marked tdd_candidate=true:** Read `~/.claude/mindsystem/references/tdd.md` for TDD plan structure guidance.
|
|
271
248
|
|
|
@@ -297,6 +274,11 @@ Format: numbered list with task name, key files, dependency hint, and `[TDD]` fl
|
|
|
297
274
|
|
|
298
275
|
**Retain full task details internally.** For each task, maintain in your analysis: id, name, type, needs, creates, tdd_candidate, action_hint, verify_hint, done_hint. These are needed for the handoff step — they just don't need to be displayed.
|
|
299
276
|
</output_format>
|
|
277
|
+
|
|
278
|
+
**Task quality check:** If you can't specify Files + Action + Verify + Done, the task is too vague.
|
|
279
|
+
|
|
280
|
+
**Good:** "Create POST /api/auth/login endpoint with bcrypt validation"
|
|
281
|
+
**Bad:** "Set up authentication" / "Make it secure" / "Handle edge cases"
|
|
300
282
|
</step>
|
|
301
283
|
|
|
302
284
|
<step name="propose_grouping">
|
|
@@ -308,7 +290,7 @@ MULTI_PLAN=$(ms-tools config-get multi_plan --default "false")
|
|
|
308
290
|
|
|
309
291
|
**If `false` (default) — single plan mode:**
|
|
310
292
|
|
|
311
|
-
All tasks go into Plan 01, Wave 1. No dependency analysis, clustering, or budget estimation. No AskUserQuestion. Proceed directly to
|
|
293
|
+
All tasks go into Plan 01, Wave 1. No dependency analysis, clustering, or budget estimation. No AskUserQuestion. Proceed directly to load_skills.
|
|
312
294
|
|
|
313
295
|
**If `true` — multi-plan mode:**
|
|
314
296
|
|
|
@@ -342,28 +324,34 @@ Tasks: {task_ids} — {brief rationale}
|
|
|
342
324
|
- question: "Does this plan structure look good?"
|
|
343
325
|
- Options: "Looks good, proceed", "Adjust grouping"
|
|
344
326
|
|
|
345
|
-
**"Looks good, proceed":** Continue to
|
|
327
|
+
**"Looks good, proceed":** Continue to load_skills.
|
|
346
328
|
**"Adjust grouping":** User describes changes in free-text. Apply adjustments, re-present, and confirm again.
|
|
347
329
|
</step>
|
|
348
330
|
|
|
349
|
-
<step name="
|
|
350
|
-
**
|
|
331
|
+
<step name="load_skills">
|
|
332
|
+
**Load configured skills for planning.**
|
|
351
333
|
|
|
352
|
-
|
|
334
|
+
```bash
|
|
335
|
+
PLAN_SKILLS=$(ms-tools config-get skills.plan --default "[]")
|
|
336
|
+
```
|
|
353
337
|
|
|
354
|
-
**
|
|
355
|
-
- The phase's technology stack (Flutter, React, Node.js, etc.)
|
|
356
|
-
- The domain of the tasks identified (UI patterns, API design, state management, etc.)
|
|
357
|
-
- Keywords from RESEARCH.md or CONTEXT.md if they exist
|
|
338
|
+
**If skills configured (non-empty array):** Invoke each via the Skill tool. These provide implementation conventions, code patterns, and framework best practices that must influence the resulting plans.
|
|
358
339
|
|
|
359
|
-
|
|
360
|
-
-
|
|
361
|
-
-
|
|
362
|
-
-
|
|
340
|
+
After loading, extract implementation-relevant content:
|
|
341
|
+
- Code patterns and conventions (naming, structure, architecture rules)
|
|
342
|
+
- Framework-specific best practices (routing patterns, state management, data fetching)
|
|
343
|
+
- Anti-patterns to avoid
|
|
344
|
+
- Quality criteria specific to the domain
|
|
363
345
|
|
|
364
|
-
|
|
346
|
+
Distill into a `<skill_context>` block (aim for high signal density — conventions that change what code looks like, not general advice). This block will be passed to the plan-writer.
|
|
365
347
|
|
|
366
|
-
**
|
|
348
|
+
**If no skills configured:**
|
|
349
|
+
|
|
350
|
+
```
|
|
351
|
+
Tip: Configuring plan skills in /ms:config can improve plan quality — conventions get encoded directly into plans. Run /ms:config to set them up.
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
Non-blocking. Continue with empty `<skill_context>`.
|
|
367
355
|
</step>
|
|
368
356
|
|
|
369
357
|
<step name="handoff_to_writer">
|
|
@@ -389,6 +377,7 @@ Assemble handoff payload:
|
|
|
389
377
|
</proposed_grouping>
|
|
390
378
|
|
|
391
379
|
<phase_context>
|
|
380
|
+
<!-- Extract phase_goal from ROADMAP.md line after "Phase N:" and REQ-IDs from "Requirements:" field -->
|
|
392
381
|
<phase_number>{PHASE}</phase_number>
|
|
393
382
|
<phase_name>{PHASE_NAME}</phase_name>
|
|
394
383
|
<phase_dir>.planning/phases/{PHASE}-{PHASE_NAME}</phase_dir>
|
|
@@ -416,9 +405,9 @@ Assemble handoff payload:
|
|
|
416
405
|
{list of services detected in task breakdown}
|
|
417
406
|
</external_services>
|
|
418
407
|
|
|
419
|
-
<
|
|
420
|
-
|
|
421
|
-
</
|
|
408
|
+
<skill_context>
|
|
409
|
+
{Distilled implementation conventions from loaded skills. Code patterns, framework best practices, anti-patterns, quality criteria. Omit if no skills loaded.}
|
|
410
|
+
</skill_context>
|
|
422
411
|
|
|
423
412
|
<learnings>
|
|
424
413
|
<!-- Flat list from read_project_history step 6. Omit if no matches found. -->
|
|
@@ -498,20 +487,13 @@ Extract:
|
|
|
498
487
|
|
|
499
488
|
**Present via AskUserQuestion based on tier from subagent:**
|
|
500
489
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
-
|
|
504
|
-
-
|
|
505
|
-
|
|
506
|
-
**Optional tier (40-69):**
|
|
507
|
-
- header: "Plan Verification"
|
|
508
|
-
- question: "Risk Score: {score}/100 — Moderate complexity\n\nTop factors:\n- {factor_1}\n- {factor_2}\n\nVerification recommended but optional."
|
|
509
|
-
- Options: "Verify plans" (first), "Skip verification", "Review plans manually"
|
|
490
|
+
| Tier | Score | Default option | Message |
|
|
491
|
+
|------|-------|----------------|---------|
|
|
492
|
+
| Skip | 0-39 | "Skip verification" | "Low risk. Verification optional." |
|
|
493
|
+
| Optional | 40-69 | "Verify plans" | "Moderate complexity. Verification recommended." |
|
|
494
|
+
| Verify | 70-100 | "Verify plans (Recommended)" | "Higher complexity. Verification strongly recommended." |
|
|
510
495
|
|
|
511
|
-
|
|
512
|
-
- header: "Plan Verification Recommended"
|
|
513
|
-
- question: "Risk Score: {score}/100 — Higher complexity\n\nTop factors:\n- {factor_1}\n- {factor_2}\n- {factor_3}\n\nVerification strongly recommended."
|
|
514
|
-
- Options: "Verify plans (Recommended)" (first), "Skip verification", "Review plans manually"
|
|
496
|
+
Include top risk factors for Optional/Verify tiers. Optional/Verify tiers also offer "Review plans manually".
|
|
515
497
|
|
|
516
498
|
**Handle response:**
|
|
517
499
|
|
|
@@ -615,23 +597,8 @@ Wave 2: {plan-03}
|
|
|
615
597
|
|
|
616
598
|
</process>
|
|
617
599
|
|
|
618
|
-
<task_quality>
|
|
619
|
-
**Good tasks:** Specific files, actions, verification
|
|
620
|
-
- "Add User model to Prisma schema with email, passwordHash, createdAt"
|
|
621
|
-
- "Create POST /api/auth/login endpoint with bcrypt validation"
|
|
622
|
-
|
|
623
|
-
**Bad tasks:** Vague, not actionable
|
|
624
|
-
- "Set up authentication" / "Make it secure" / "Handle edge cases"
|
|
625
|
-
|
|
626
|
-
If you can't specify Files + Action + Verify + Done, the task is too vague.
|
|
627
|
-
|
|
628
|
-
**TDD candidates get dedicated plans.** If "Create price calculator with discount rules" warrants TDD, mark as tdd_candidate=true. Refer to `~/.claude/mindsystem/references/tdd.md` (loaded during task breakdown) for TDD criteria.
|
|
629
|
-
</task_quality>
|
|
630
|
-
|
|
631
600
|
<anti_patterns>
|
|
632
601
|
- No story points or hour estimates
|
|
633
|
-
- No team assignments
|
|
634
|
-
- No acceptance criteria committees
|
|
635
602
|
- No sub-sub-sub tasks
|
|
636
603
|
- **No reflexive sequential chaining** (Plan 02 depends on 01 "just because")
|
|
637
604
|
Tasks are instructions for Claude, not Jira tickets.
|
|
@@ -639,15 +606,12 @@ Tasks are instructions for Claude, not Jira tickets.
|
|
|
639
606
|
|
|
640
607
|
<success_criteria>
|
|
641
608
|
Phase planning complete when:
|
|
642
|
-
- [ ] STATE.md read, project history absorbed
|
|
643
|
-
- [ ] Mandatory discovery completed (Level 0-3)
|
|
644
609
|
- [ ] Prior decisions, issues, concerns synthesized
|
|
645
610
|
- [ ] Tasks identified with needs/creates dependencies
|
|
646
611
|
- [ ] Plan grouping determined (auto-grouped or user-confirmed)
|
|
647
|
-
- [ ] Task list + proposed grouping +
|
|
612
|
+
- [ ] Task list + proposed grouping + skill context handed off to ms-plan-writer
|
|
648
613
|
- [ ] PLAN files + EXECUTION-ORDER.md created (pure markdown, Must-Haves, follows proposed grouping)
|
|
649
614
|
- [ ] Plans committed with maximized wave parallelism
|
|
650
|
-
- [ ] Risk assessment presented
|
|
651
|
-
- [ ] User chose verify/skip (or verified if chosen)
|
|
615
|
+
- [ ] Risk assessment presented and user decision captured (verify/skip)
|
|
652
616
|
- [ ] User knows next steps and wave structure
|
|
653
617
|
</success_criteria>
|
|
@@ -376,14 +376,13 @@ Format:
|
|
|
376
376
|
Fix: {what the fix changes, 1-2 sentences}
|
|
377
377
|
```
|
|
378
378
|
|
|
379
|
-
|
|
380
|
-
- Go to `apply_fix` immediately
|
|
381
|
-
|
|
382
|
-
**If fix is complex (multiple files, architectural):**
|
|
383
|
-
- Spawn ms-verify-fixer subagent (go to `escalate_to_fixer`)
|
|
379
|
+
Go to `apply_fix`.
|
|
384
380
|
|
|
385
381
|
**If cause NOT found after 2-3 checks:**
|
|
386
|
-
-
|
|
382
|
+
- Present options via AskUserQuestion:
|
|
383
|
+
1. Try different approach — Investigate from another angle
|
|
384
|
+
2. Skip as assumption — Log and move on
|
|
385
|
+
3. Manual investigation — You'll look into this yourself
|
|
387
386
|
</step>
|
|
388
387
|
|
|
389
388
|
<step name="apply_fix">
|
|
@@ -423,74 +422,6 @@ Fix applied. Please re-test: {specific instruction}
|
|
|
423
422
|
Go to `handle_retest`.
|
|
424
423
|
</step>
|
|
425
424
|
|
|
426
|
-
<step name="escalate_to_fixer">
|
|
427
|
-
**Spawn fixer subagent for complex issue:**
|
|
428
|
-
|
|
429
|
-
**1. Stash mocks (if active):**
|
|
430
|
-
`ms-tools uat-stash-mocks $PHASE_NUMBER`
|
|
431
|
-
|
|
432
|
-
**2. Spawn ms-verify-fixer:**
|
|
433
|
-
```
|
|
434
|
-
Task(
|
|
435
|
-
prompt="""
|
|
436
|
-
You are a Mindsystem verify-fixer. Investigate this issue, find the root cause, implement a fix, and commit it.
|
|
437
|
-
|
|
438
|
-
## Issue
|
|
439
|
-
|
|
440
|
-
**Test:** {test_name}
|
|
441
|
-
**Expected:** {expected_behavior}
|
|
442
|
-
**Actual:** {user_reported_behavior}
|
|
443
|
-
**Severity:** {inferred_severity}
|
|
444
|
-
|
|
445
|
-
## Context
|
|
446
|
-
|
|
447
|
-
**Phase:** {phase_name}
|
|
448
|
-
**Mock state active:** {mock_type or "none"}
|
|
449
|
-
**Relevant files (suspected):** {file_list}
|
|
450
|
-
|
|
451
|
-
## What was already checked
|
|
452
|
-
|
|
453
|
-
{lightweight_investigation_results}
|
|
454
|
-
|
|
455
|
-
## Knowledge Context
|
|
456
|
-
|
|
457
|
-
{loaded_knowledge_content or "No knowledge files loaded for this session."}
|
|
458
|
-
|
|
459
|
-
## Your task
|
|
460
|
-
|
|
461
|
-
1. Investigate to find root cause
|
|
462
|
-
2. Implement minimal fix
|
|
463
|
-
3. Commit with message: fix({phase}-uat): {description}
|
|
464
|
-
4. Return FIX COMPLETE or INVESTIGATION INCONCLUSIVE
|
|
465
|
-
|
|
466
|
-
Mocks are stashed — working tree is clean.
|
|
467
|
-
""",
|
|
468
|
-
subagent_type="ms-verify-fixer",
|
|
469
|
-
description="Fix: {test_name}"
|
|
470
|
-
)
|
|
471
|
-
```
|
|
472
|
-
|
|
473
|
-
**3. Handle fixer return:**
|
|
474
|
-
|
|
475
|
-
**If FIX COMPLETE:**
|
|
476
|
-
- Record fix via ms-tools (same as `apply_fix` step 4: `uat-update --test N` + `--append-fix`)
|
|
477
|
-
- Restore mocks: `ms-tools uat-pop-mocks $PHASE_NUMBER`
|
|
478
|
-
- Request re-test
|
|
479
|
-
|
|
480
|
-
**If INVESTIGATION INCONCLUSIVE:**
|
|
481
|
-
- Restore mocks: `ms-tools uat-pop-mocks $PHASE_NUMBER`
|
|
482
|
-
- Present options:
|
|
483
|
-
```
|
|
484
|
-
Investigation didn't find root cause.
|
|
485
|
-
|
|
486
|
-
Options:
|
|
487
|
-
1. Try different approach — I'll investigate from another angle
|
|
488
|
-
2. Skip as assumption — Log and move on
|
|
489
|
-
3. Manual investigation — You'll look into this yourself
|
|
490
|
-
```
|
|
491
|
-
- Handle response accordingly
|
|
492
|
-
</step>
|
|
493
|
-
|
|
494
425
|
<step name="handle_retest">
|
|
495
426
|
**Handle re-test result:**
|
|
496
427
|
|
|
@@ -515,12 +446,12 @@ ms-tools uat-update $PHASE_NUMBER --test N retry_count=1
|
|
|
515
446
|
|
|
516
447
|
Options:
|
|
517
448
|
1. Try different approach — Investigate from scratch
|
|
518
|
-
2.
|
|
519
|
-
3.
|
|
449
|
+
2. Skip as assumption — Log and move on
|
|
450
|
+
3. Manual investigation — You'll look into this yourself
|
|
520
451
|
```
|
|
521
452
|
- "Try different" → Reset investigation, try again
|
|
522
|
-
- "Escalate" → Go to `escalate_to_fixer`
|
|
523
453
|
- "Skip" → Mark as skipped assumption
|
|
454
|
+
- "Manual" → Mark as skipped, user will investigate
|
|
524
455
|
|
|
525
456
|
**If New issue:**
|
|
526
457
|
- Mark original as pass
|