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.
- package/agents/ms-consolidator.md +4 -4
- package/agents/ms-executor.md +19 -351
- package/agents/ms-flutter-code-quality.md +7 -6
- package/agents/ms-plan-checker.md +170 -175
- package/agents/ms-plan-writer.md +121 -125
- package/agents/ms-roadmapper.md +1 -18
- package/agents/ms-verifier.md +22 -18
- package/commands/ms/check-phase.md +3 -3
- package/commands/ms/design-phase.md +2 -9
- package/commands/ms/execute-phase.md +8 -6
- package/commands/ms/help.md +0 -5
- package/commands/ms/new-project.md +3 -40
- package/commands/ms/plan-phase.md +4 -3
- package/commands/ms/review-design.md +1 -8
- package/mindsystem/references/goal-backward.md +10 -25
- package/mindsystem/references/plan-format.md +326 -247
- package/mindsystem/references/scope-estimation.md +29 -57
- package/mindsystem/references/tdd-execution.md +70 -0
- package/mindsystem/references/tdd.md +53 -194
- package/mindsystem/templates/config.json +0 -11
- package/mindsystem/templates/phase-prompt.md +51 -367
- package/mindsystem/templates/roadmap.md +2 -2
- package/mindsystem/templates/verification-report.md +2 -2
- package/mindsystem/workflows/adhoc.md +16 -21
- package/mindsystem/workflows/execute-phase.md +71 -50
- package/mindsystem/workflows/execute-plan.md +183 -1060
- package/mindsystem/workflows/mockup-generation.md +10 -4
- package/mindsystem/workflows/plan-phase.md +56 -75
- package/mindsystem/workflows/transition.md +1 -10
- package/mindsystem/workflows/verify-phase.md +16 -20
- package/package.json +1 -1
- package/scripts/update-state.sh +59 -0
- package/scripts/validate-execution-order.sh +102 -0
- package/skills/flutter-code-quality/SKILL.md +4 -3
- package/mindsystem/templates/summary.md +0 -293
package/agents/ms-plan-writer.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ms-plan-writer
|
|
3
|
-
description: Generates
|
|
4
|
-
model:
|
|
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
|
|
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
|
|
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
|
|
24
|
-
-
|
|
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` —
|
|
34
|
-
2. `~/.claude/mindsystem/references/plan-format.md` —
|
|
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/
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
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
|
|
170
|
-
|
|
171
|
-
For EACH plan, derive:
|
|
172
|
-
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
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.
|
|
191
|
-
3.
|
|
190
|
+
2. Each item is a user-observable truth, not an implementation detail
|
|
191
|
+
3. 3-7 items per plan
|
|
192
192
|
|
|
193
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
248
|
-
{plan_goal}
|
|
220
|
+
**Subsystem:** {subsystem_hint} | **Type:** tdd
|
|
249
221
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
</objective>
|
|
222
|
+
## Context
|
|
223
|
+
{Why this work exists. Approach chosen and WHY.}
|
|
253
224
|
|
|
254
|
-
|
|
255
|
-
@~/.claude/mindsystem/workflows/execute-plan.md
|
|
256
|
-
@~/.claude/mindsystem/templates/summary.md
|
|
257
|
-
</execution_context>
|
|
225
|
+
## Changes
|
|
258
226
|
|
|
259
|
-
|
|
260
|
-
|
|
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
|
-
|
|
269
|
-
{Task XML from input, expanded with full structure}
|
|
270
|
-
</tasks>
|
|
230
|
+
{Implementation details. Reference existing utilities with paths.}
|
|
271
231
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
</verification>
|
|
232
|
+
### 2. {Another change}
|
|
233
|
+
**Files:** `{file_path}`, `{another_path}`
|
|
275
234
|
|
|
276
|
-
|
|
277
|
-
- All tasks completed
|
|
278
|
-
- {plan_specific_criteria}
|
|
279
|
-
</success_criteria>
|
|
235
|
+
{Details with inline code blocks where needed.}
|
|
280
236
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
```
|
|
237
|
+
## Verification
|
|
238
|
+
- `{bash command}` {expected result}
|
|
239
|
+
- `{another command}` {expected result}
|
|
285
240
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
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
|
-
**
|
|
298
|
-
-
|
|
299
|
-
-
|
|
300
|
-
-
|
|
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
|
-
|
|
251
|
+
**Learnings integration:** When expanding tasks to ## Changes subsections, check `<learnings>` for entries relevant to each change:
|
|
303
252
|
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
|
|
253
|
+
```markdown
|
|
254
|
+
### 2. Create auth endpoint
|
|
255
|
+
**Files:** `src/api/auth/login.ts`
|
|
307
256
|
|
|
308
|
-
|
|
309
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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/${
|
|
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
|
|
359
|
-
services =
|
|
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,
|
|
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
|
-
- [ ]
|
|
461
|
-
- [ ] PLAN.md files written with
|
|
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
|
package/agents/ms-roadmapper.md
CHANGED
|
@@ -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 (
|
|
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)
|
package/agents/ms-verifier.md
CHANGED
|
@@ -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-
|
|
77
|
+
**Option A: Must-Haves from PLAN.md**
|
|
78
78
|
|
|
79
|
-
Check if any PLAN.md has `
|
|
79
|
+
Check if any PLAN.md has a `## Must-Haves` section:
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
|
-
grep -l "
|
|
82
|
+
grep -l "## Must-Haves" "$PHASE_DIR"/*-PLAN.md 2>/dev/null
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
If found,
|
|
85
|
+
If found, parse the markdown checklist items:
|
|
86
86
|
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 "
|
|
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
|
-
|
|
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.
|
|
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,
|
|
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. **
|
|
55
|
-
-
|
|
56
|
-
-
|
|
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
|
|
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 (
|
|
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
|
package/commands/ms/help.md
CHANGED
|
@@ -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>`**
|