mindsystem-cc 3.14.0 → 3.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/agents/ms-codebase-researcher.md +105 -0
- package/agents/ms-consolidator.md +137 -286
- package/agents/ms-debugger.md +1 -0
- package/agents/ms-designer.md +1 -0
- package/agents/ms-executor.md +2 -1
- package/agents/ms-flutter-code-quality.md +1 -1
- package/agents/ms-flutter-reviewer.md +1 -0
- package/agents/ms-flutter-simplifier.md +1 -1
- package/agents/ms-integration-checker.md +1 -0
- package/agents/ms-plan-checker.md +17 -327
- package/agents/ms-researcher.md +25 -343
- package/agents/ms-roadmapper.md +10 -75
- package/agents/ms-verifier.md +33 -309
- package/agents/ms-verify-fixer.md +1 -0
- package/commands/ms/check-phase.md +24 -55
- package/commands/ms/complete-milestone.md +6 -25
- package/commands/ms/create-roadmap.md +3 -15
- package/commands/ms/design-phase.md +52 -15
- package/commands/ms/discuss-phase.md +7 -9
- package/commands/ms/doctor.md +224 -0
- package/commands/ms/execute-phase.md +22 -12
- package/commands/ms/help.md +11 -0
- package/commands/ms/new-milestone.md +3 -3
- package/commands/ms/plan-phase.md +1 -1
- package/commands/ms/research-phase.md +249 -85
- package/commands/ms/verify-work.md +1 -0
- package/mindsystem/references/plan-risk-assessment.md +1 -2
- package/mindsystem/templates/context.md +1 -11
- package/mindsystem/templates/discovery.md +2 -3
- package/mindsystem/templates/knowledge.md +99 -0
- package/mindsystem/templates/requirements.md +3 -61
- package/mindsystem/templates/research-comparison-output.md +50 -0
- package/mindsystem/templates/research-feasibility-output.md +43 -0
- package/mindsystem/templates/research-project-output.md +81 -0
- package/mindsystem/templates/research-subagent-prompt.md +164 -48
- package/mindsystem/templates/roadmap-milestone.md +67 -0
- package/mindsystem/templates/roadmap.md +2 -66
- package/mindsystem/workflows/complete-milestone.md +23 -140
- package/mindsystem/workflows/define-requirements.md +4 -8
- package/mindsystem/workflows/discuss-phase.md +25 -8
- package/mindsystem/workflows/execute-phase.md +34 -0
- package/mindsystem/workflows/execute-plan.md +8 -0
- package/mindsystem/workflows/plan-phase.md +40 -104
- package/mindsystem/workflows/verify-work.md +20 -0
- package/package.json +1 -1
- package/scripts/cleanup-phase-artifacts.sh +68 -0
- package/scripts/scan-artifact-subsystems.sh +55 -0
- package/scripts/scan-planning-context.py +689 -0
- package/mindsystem/templates/decisions.md +0 -145
- package/mindsystem/templates/learnings.md +0 -150
|
@@ -7,6 +7,7 @@ allowed-tools:
|
|
|
7
7
|
- Bash
|
|
8
8
|
- Task
|
|
9
9
|
- AskUserQuestion
|
|
10
|
+
- Skill
|
|
10
11
|
---
|
|
11
12
|
|
|
12
13
|
<objective>
|
|
@@ -107,15 +108,24 @@ If exists, extract:
|
|
|
107
108
|
- What Must Be Nailed (essentials)
|
|
108
109
|
- Specific Ideas (references to products)
|
|
109
110
|
|
|
110
|
-
**
|
|
111
|
+
**3b2. Optional context — prior knowledge:**
|
|
111
112
|
|
|
112
|
-
|
|
113
|
+
Match subsystem(s) to this phase by comparing ROADMAP phase description against subsystem names in config.json. Load matching knowledge files:
|
|
113
114
|
|
|
114
|
-
|
|
115
|
+
```bash
|
|
116
|
+
jq -r '.subsystems[]' .planning/config.json 2>/dev/null
|
|
117
|
+
cat .planning/knowledge/{matched_subsystem}.md 2>/dev/null
|
|
118
|
+
```
|
|
115
119
|
|
|
116
|
-
If
|
|
120
|
+
If knowledge files exist, extract:
|
|
121
|
+
- Architecture patterns (tech constraints the design must respect)
|
|
122
|
+
- Prior design patterns (visual consistency)
|
|
123
|
+
- Key decisions (constraints)
|
|
124
|
+
- Pitfalls (design must avoid known traps)
|
|
117
125
|
|
|
118
|
-
|
|
126
|
+
Pass the extracted knowledge to ms-designer in the design prompt (see step 6 `<prior_knowledge>` block).
|
|
127
|
+
|
|
128
|
+
**3c. Optional context - codebase analysis:**
|
|
119
129
|
|
|
120
130
|
```bash
|
|
121
131
|
# Platform detection
|
|
@@ -135,14 +145,24 @@ grep -r "colors\|theme\|spacing" src/ --include="*.ts" --include="*.dart" 2>/dev
|
|
|
135
145
|
|
|
136
146
|
Document discovered patterns for the designer.
|
|
137
147
|
|
|
138
|
-
## 4.
|
|
148
|
+
## 4. Load Project Skills
|
|
149
|
+
|
|
150
|
+
Scan the skill list in your system message for skills matching this phase's technology or domain. Invoke each match via the Skill tool before proceeding — skills contain conventions and patterns that change what you design for.
|
|
151
|
+
|
|
152
|
+
- One clear match → invoke it directly
|
|
153
|
+
- Multiple candidates → use AskUserQuestion to let the user choose
|
|
154
|
+
- No match → proceed without
|
|
155
|
+
|
|
156
|
+
Extract aesthetic patterns (colors, components, spacing, typography) from loaded skill content for the `<existing_aesthetic>` block passed to ms-designer.
|
|
157
|
+
|
|
158
|
+
## 5. Adaptive Q&A (If Gaps Exist)
|
|
139
159
|
|
|
140
160
|
Assess context coverage:
|
|
141
161
|
- Can platform be inferred? (from codebase or PROJECT.md)
|
|
142
162
|
- Can visual style be inferred? (from project UI skill or codebase)
|
|
143
163
|
- Can design priorities be inferred? (from CONTEXT.md or phase requirements)
|
|
144
164
|
|
|
145
|
-
**If everything can be inferred:** Skip to step
|
|
165
|
+
**If everything can be inferred:** Skip to step 6.
|
|
146
166
|
|
|
147
167
|
**If gaps exist:** Use AskUserQuestion with targeted questions.
|
|
148
168
|
|
|
@@ -160,7 +180,7 @@ Use AskUserQuestion to confirm:
|
|
|
160
180
|
2. **Ask more questions** — Continue gathering context
|
|
161
181
|
3. **Add context** — Let user provide additional information
|
|
162
182
|
|
|
163
|
-
##
|
|
183
|
+
## 5b. Mockup Generation (Optional)
|
|
164
184
|
|
|
165
185
|
After gathering context and closing gaps, assess whether this phase has significant new UI (new screens, novel flows, complex layouts — not minor tweaks to existing patterns).
|
|
166
186
|
|
|
@@ -186,11 +206,11 @@ Follow mockup-generation workflow:
|
|
|
186
206
|
8. Handle selection (single pick, combine, tweak, more variants, or skip)
|
|
187
207
|
9. Extract CSS specs from chosen variant into `<mockup_direction>` block
|
|
188
208
|
|
|
189
|
-
Pass gathered context (PROJECT.md, ROADMAP.md phase entry, existing aesthetic) to the workflow. The workflow returns either a `<mockup_direction>` block for step
|
|
209
|
+
Pass gathered context (PROJECT.md, ROADMAP.md phase entry, existing aesthetic) to the workflow. The workflow returns either a `<mockup_direction>` block for step 6, or nothing if user skips.
|
|
190
210
|
|
|
191
|
-
**If user selects "No":** Proceed directly to step
|
|
211
|
+
**If user selects "No":** Proceed directly to step 6.
|
|
192
212
|
|
|
193
|
-
##
|
|
213
|
+
## 6. Spawn ms-designer Agent
|
|
194
214
|
|
|
195
215
|
Assemble the design prompt from gathered context:
|
|
196
216
|
|
|
@@ -238,6 +258,23 @@ Vision inferred from phase requirements and PROJECT.md context.
|
|
|
238
258
|
Reference products: [From Q&A if asked, or "None specified"]
|
|
239
259
|
</user_vision>
|
|
240
260
|
|
|
261
|
+
<prior_knowledge>
|
|
262
|
+
[If knowledge files exist:]
|
|
263
|
+
|
|
264
|
+
Architecture constraints:
|
|
265
|
+
[From knowledge Architecture sections]
|
|
266
|
+
|
|
267
|
+
Prior design patterns:
|
|
268
|
+
[From knowledge Design sections]
|
|
269
|
+
|
|
270
|
+
Pitfalls to avoid:
|
|
271
|
+
[From knowledge Pitfalls sections]
|
|
272
|
+
|
|
273
|
+
[If no knowledge files exist:]
|
|
274
|
+
|
|
275
|
+
No prior knowledge files. First phase or no prior execution.
|
|
276
|
+
</prior_knowledge>
|
|
277
|
+
|
|
241
278
|
<existing_aesthetic>
|
|
242
279
|
[If project UI skill exists:]
|
|
243
280
|
|
|
@@ -260,7 +297,7 @@ No existing aesthetic. Design fresh with platform conventions.
|
|
|
260
297
|
</existing_aesthetic>
|
|
261
298
|
|
|
262
299
|
<mockup_direction>
|
|
263
|
-
[If mockups were generated in step
|
|
300
|
+
[If mockups were generated in step 5b, include the extracted specs:]
|
|
264
301
|
|
|
265
302
|
Direction: [chosen direction name]
|
|
266
303
|
Philosophy: [direction one-sentence philosophy]
|
|
@@ -317,7 +354,7 @@ Task(
|
|
|
317
354
|
)
|
|
318
355
|
```
|
|
319
356
|
|
|
320
|
-
##
|
|
357
|
+
## 7. Handle Agent Return
|
|
321
358
|
|
|
322
359
|
**`## DESIGN COMPLETE`:**
|
|
323
360
|
|
|
@@ -344,7 +381,7 @@ Also offer:
|
|
|
344
381
|
|
|
345
382
|
Present the question to user. Get response. Spawn continuation with the clarification.
|
|
346
383
|
|
|
347
|
-
##
|
|
384
|
+
## 8. Conversational Refinement
|
|
348
385
|
|
|
349
386
|
After initial generation, if user wants to refine:
|
|
350
387
|
|
|
@@ -379,7 +416,7 @@ Use the iteration template from `~/.claude/mindsystem/templates/design-iteration
|
|
|
379
416
|
- Verify "what needs improvement" was addressed
|
|
380
417
|
- Update design version in DESIGN.md frontmatter
|
|
381
418
|
|
|
382
|
-
##
|
|
419
|
+
## 9. Update Last Command
|
|
383
420
|
|
|
384
421
|
Update `.planning/STATE.md` Last Command field:
|
|
385
422
|
- Find line starting with `Last Command:` in Current Position section
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
name: ms:discuss-phase
|
|
3
3
|
description: Gather phase context through adaptive questioning before planning
|
|
4
4
|
argument-hint: "[phase]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
- Glob
|
|
10
|
+
- AskUserQuestion
|
|
5
11
|
---
|
|
6
12
|
|
|
7
13
|
<objective>
|
|
@@ -13,9 +19,7 @@ Output: {phase}-CONTEXT.md capturing the user's vision for the phase
|
|
|
13
19
|
</objective>
|
|
14
20
|
|
|
15
21
|
<execution_context>
|
|
16
|
-
@~/.claude/mindsystem/references/principles.md
|
|
17
22
|
@~/.claude/mindsystem/workflows/discuss-phase.md
|
|
18
|
-
@~/.claude/mindsystem/templates/context.md
|
|
19
23
|
</execution_context>
|
|
20
24
|
|
|
21
25
|
<context>
|
|
@@ -38,6 +42,7 @@ PHASE=$(printf "%02d" "$PHASE_ARG" 2>/dev/null || echo "$PHASE_ARG")
|
|
|
38
42
|
1. Validate phase number argument (error if missing or invalid)
|
|
39
43
|
2. Check if phase exists in roadmap
|
|
40
44
|
3. Check if CONTEXT.md already exists (offer to update if yes)
|
|
45
|
+
3.5. **Load prior knowledge** — determine relevant subsystem(s) by matching ROADMAP.md phase description against subsystem names in config.json. Load matching `.planning/knowledge/{subsystem}.md` files. If knowledge exists, present brief "What we know so far" summary before questioning.
|
|
41
46
|
4. Follow discuss-phase.md workflow with **ALL questions using AskUserQuestion**:
|
|
42
47
|
- Present phase from roadmap
|
|
43
48
|
- Use AskUserQuestion: "How do you imagine this working?" with interpretation options
|
|
@@ -50,13 +55,6 @@ PHASE=$(printf "%02d" "$PHASE_ARG" 2>/dev/null || echo "$PHASE_ARG")
|
|
|
50
55
|
- Format: `Last Command: ms:discuss-phase $ARGUMENTS | YYYY-MM-DD HH:MM`
|
|
51
56
|
|
|
52
57
|
**CRITICAL: ALL questions use AskUserQuestion. Never ask inline text questions.**
|
|
53
|
-
|
|
54
|
-
User is the visionary, you are the builder:
|
|
55
|
-
- Ask about vision, feel, essential outcomes
|
|
56
|
-
- DON'T ask about technical risks (you figure those out)
|
|
57
|
-
- DON'T ask about codebase patterns (you read the code)
|
|
58
|
-
- DON'T ask about success metrics (too corporate)
|
|
59
|
-
- DON'T interrogate about constraints they didn't mention
|
|
60
58
|
</process>
|
|
61
59
|
|
|
62
60
|
<success_criteria>
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ms:doctor
|
|
3
|
+
description: Health check and fix project configuration
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Write
|
|
7
|
+
- Edit
|
|
8
|
+
- Bash
|
|
9
|
+
- Glob
|
|
10
|
+
- Grep
|
|
11
|
+
- AskUserQuestion
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<objective>
|
|
15
|
+
Run health checks on project configuration. Detect and fix configuration issues.
|
|
16
|
+
|
|
17
|
+
V1 check: subsystem vocabulary setup and validation. Ensures `.planning/config.json` has a canonical `subsystems` array and all artifacts use values from it.
|
|
18
|
+
|
|
19
|
+
Idempotent — safe to run repeatedly.
|
|
20
|
+
</objective>
|
|
21
|
+
|
|
22
|
+
<context>
|
|
23
|
+
@.planning/config.json
|
|
24
|
+
</context>
|
|
25
|
+
|
|
26
|
+
<process>
|
|
27
|
+
|
|
28
|
+
<step name="check_planning_dir">
|
|
29
|
+
```bash
|
|
30
|
+
[ -d .planning ] && echo "EXISTS" || echo "MISSING"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
If MISSING:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
No .planning/ directory found.
|
|
37
|
+
|
|
38
|
+
Run `/ms:new-project` to initialize this project.
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Exit.
|
|
42
|
+
</step>
|
|
43
|
+
|
|
44
|
+
<step name="ensure_config">
|
|
45
|
+
```bash
|
|
46
|
+
[ -f .planning/config.json ] && echo "EXISTS" || echo "MISSING"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
If MISSING, create from template structure:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"subsystems": [],
|
|
54
|
+
"code_review": {
|
|
55
|
+
"adhoc": null,
|
|
56
|
+
"phase": null,
|
|
57
|
+
"milestone": null
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Write to `.planning/config.json`. Log: "Created config.json with empty subsystems."
|
|
63
|
+
|
|
64
|
+
Proceed to next step.
|
|
65
|
+
</step>
|
|
66
|
+
|
|
67
|
+
<step name="read_current_subsystems">
|
|
68
|
+
```bash
|
|
69
|
+
jq -r '.subsystems // [] | length' .planning/config.json
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
- If 0 → **State A**: no subsystems configured. Go to `audit_existing_usage`.
|
|
73
|
+
- If >0 → **State B**: subsystems exist. Go to `validate_vocabulary`.
|
|
74
|
+
</step>
|
|
75
|
+
|
|
76
|
+
<step name="audit_existing_usage">
|
|
77
|
+
**State A only.** Scan all artifact types for existing free-form `subsystem:` values.
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
~/.claude/mindsystem/scripts/scan-artifact-subsystems.sh --values-only
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Collect all unique values found. Note count of artifacts scanned and values found.
|
|
84
|
+
</step>
|
|
85
|
+
|
|
86
|
+
<step name="derive_and_confirm">
|
|
87
|
+
**State A only.** Read `.planning/PROJECT.md` and `.planning/ROADMAP.md`.
|
|
88
|
+
|
|
89
|
+
Derive 5-12 canonical subsystem identifiers from:
|
|
90
|
+
|
|
91
|
+
1. Unique values found in `audit_existing_usage`
|
|
92
|
+
2. Project domain from PROJECT.md
|
|
93
|
+
3. Phase structure from ROADMAP.md
|
|
94
|
+
|
|
95
|
+
Rules:
|
|
96
|
+
- Lowercase, single-word or hyphenated (e.g., "auth", "real-time", "ui")
|
|
97
|
+
- Merge synonyms into one canonical value (pick shortest/most common)
|
|
98
|
+
- Cover all existing usage plus obvious gaps
|
|
99
|
+
- Include infrastructure-level subsystems if relevant (api, database, infra, testing)
|
|
100
|
+
|
|
101
|
+
Present the proposed list with merge mappings (e.g., "authentication" -> "auth").
|
|
102
|
+
|
|
103
|
+
Use AskUserQuestion:
|
|
104
|
+
- header: "Subsystems"
|
|
105
|
+
- question: "These subsystems were derived from your project. Look good?"
|
|
106
|
+
- options:
|
|
107
|
+
- "Looks good" — accept and apply
|
|
108
|
+
- "Add/remove some" — iterate on the list
|
|
109
|
+
- "Start over" — re-derive from scratch
|
|
110
|
+
|
|
111
|
+
After confirmation:
|
|
112
|
+
|
|
113
|
+
1. Update `config.json` — set `subsystems` array as first field
|
|
114
|
+
2. If existing artifacts had free-form values, standardize each `subsystem:` field to the canonical value using the Edit tool (only modify the `subsystem:` line, never body content)
|
|
115
|
+
3. Commit all changes:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
git add .planning/config.json
|
|
119
|
+
git add .planning/phases/*/*-SUMMARY.md 2>/dev/null
|
|
120
|
+
git add .planning/adhoc/*-SUMMARY.md 2>/dev/null
|
|
121
|
+
git add .planning/debug/*.md 2>/dev/null
|
|
122
|
+
git add .planning/debug/resolved/*.md 2>/dev/null
|
|
123
|
+
git add .planning/todos/pending/*.md 2>/dev/null
|
|
124
|
+
git add .planning/todos/done/*.md 2>/dev/null
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
git commit -m "$(cat <<'EOF'
|
|
129
|
+
chore: initialize subsystem vocabulary
|
|
130
|
+
|
|
131
|
+
Added subsystems array to config.json and standardized existing artifact values.
|
|
132
|
+
EOF
|
|
133
|
+
)"
|
|
134
|
+
```
|
|
135
|
+
</step>
|
|
136
|
+
|
|
137
|
+
<step name="validate_vocabulary">
|
|
138
|
+
**State B only.** Read canonical list from config.json:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
jq -r '.subsystems[]' .planning/config.json
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Scan all artifacts for `subsystem:` values. Extract from YAML frontmatter:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
~/.claude/mindsystem/scripts/scan-artifact-subsystems.sh
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Classify each artifact's `subsystem:` value:
|
|
151
|
+
- **OK** — value is in canonical list
|
|
152
|
+
- **MISMATCH** — value exists but not in canonical list
|
|
153
|
+
- **MISSING** — no `subsystem:` field found
|
|
154
|
+
|
|
155
|
+
Display results grouped by status. If all OK:
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
## Subsystem Vocabulary
|
|
159
|
+
|
|
160
|
+
PASS — all N artifacts use canonical subsystem values.
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Go to `report`.
|
|
164
|
+
|
|
165
|
+
If MISMATCH or MISSING found, use AskUserQuestion:
|
|
166
|
+
- header: "Fix issues"
|
|
167
|
+
- question: "Found N issues (X mismatches, Y missing). How to proceed?"
|
|
168
|
+
- options:
|
|
169
|
+
- "Fix all" — apply best-match canonical values to all issues
|
|
170
|
+
- "Review each" — present each issue individually for decision
|
|
171
|
+
- "Skip" — leave as-is
|
|
172
|
+
|
|
173
|
+
For fixes:
|
|
174
|
+
- MISMATCH: propose closest canonical value (fuzzy match on prefix/synonym)
|
|
175
|
+
- MISSING: propose based on artifact content/path context
|
|
176
|
+
|
|
177
|
+
Apply fixes using Edit tool. Commit:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
git add .planning/phases/*/*-SUMMARY.md 2>/dev/null
|
|
181
|
+
git add .planning/adhoc/*-SUMMARY.md 2>/dev/null
|
|
182
|
+
git add .planning/debug/*.md 2>/dev/null
|
|
183
|
+
git add .planning/debug/resolved/*.md 2>/dev/null
|
|
184
|
+
git add .planning/todos/pending/*.md 2>/dev/null
|
|
185
|
+
git add .planning/todos/done/*.md 2>/dev/null
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
git commit -m "$(cat <<'EOF'
|
|
190
|
+
chore: fix subsystem vocabulary mismatches
|
|
191
|
+
|
|
192
|
+
Standardized artifact subsystem values to canonical vocabulary.
|
|
193
|
+
EOF
|
|
194
|
+
)"
|
|
195
|
+
```
|
|
196
|
+
</step>
|
|
197
|
+
|
|
198
|
+
<step name="report">
|
|
199
|
+
Final summary:
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
## Doctor Report
|
|
203
|
+
|
|
204
|
+
| Check | Result | Details |
|
|
205
|
+
|------------------------|-------------|----------------------------|
|
|
206
|
+
| Subsystem vocabulary | PASS / INIT | N artifacts, M subsystems |
|
|
207
|
+
|
|
208
|
+
All checks passed.
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
- **PASS**: subsystems were already configured and all artifacts validated
|
|
212
|
+
- **INIT**: subsystems were initialized during this run
|
|
213
|
+
- Include artifact count (how many scanned) and subsystem count
|
|
214
|
+
</step>
|
|
215
|
+
|
|
216
|
+
</process>
|
|
217
|
+
|
|
218
|
+
<success_criteria>
|
|
219
|
+
- [ ] State A: config.json updated, existing artifacts standardized to canonical values, changes committed
|
|
220
|
+
- [ ] State B issues: offers fix/review/skip, applies fixes, commits
|
|
221
|
+
- [ ] Final report displayed with check name, result, and artifact/subsystem counts
|
|
222
|
+
- [ ] State A: derives canonical list from audit + project context, confirms with user before applying
|
|
223
|
+
- [ ] State B: all artifacts scanned and classified; reports PASS if all OK
|
|
224
|
+
</success_criteria>
|
|
@@ -90,10 +90,17 @@ PHASE=$(printf "%02d" "$PHASE_ARG" 2>/dev/null || echo "$PHASE_ARG")
|
|
|
90
90
|
- Verify: patch file exists OR skip message logged
|
|
91
91
|
- Note: Patch captures all changes including simplifications
|
|
92
92
|
|
|
93
|
-
9. **
|
|
94
|
-
-
|
|
93
|
+
9. **Consolidate knowledge**
|
|
94
|
+
- Spawn `ms-consolidator` with phase directory and number
|
|
95
|
+
- Consolidator reads phase artifacts and existing knowledge files
|
|
96
|
+
- Produces updated `.planning/knowledge/{subsystem}.md` files
|
|
97
|
+
- Deletes PLAN.md files (execution instructions consumed)
|
|
98
|
+
- Verify: knowledge files written to `.planning/knowledge/`
|
|
95
99
|
|
|
96
|
-
10. **Update
|
|
100
|
+
10. **Update roadmap and state**
|
|
101
|
+
- Update ROADMAP.md, STATE.md
|
|
102
|
+
|
|
103
|
+
11. **Update requirements**
|
|
97
104
|
Mark phase requirements as Complete:
|
|
98
105
|
- Read ROADMAP.md, find this phase's `Requirements:` line (e.g., "AUTH-01, AUTH-02")
|
|
99
106
|
- Read REQUIREMENTS.md traceability table
|
|
@@ -101,16 +108,18 @@ PHASE=$(printf "%02d" "$PHASE_ARG" 2>/dev/null || echo "$PHASE_ARG")
|
|
|
101
108
|
- Write updated REQUIREMENTS.md
|
|
102
109
|
- Skip if: REQUIREMENTS.md doesn't exist, or phase has no Requirements line
|
|
103
110
|
|
|
104
|
-
|
|
111
|
+
12. **Commit phase completion**
|
|
105
112
|
Bundle all phase metadata updates in one commit:
|
|
106
113
|
- Stage: `git add .planning/ROADMAP.md .planning/STATE.md`
|
|
114
|
+
- Stage knowledge files: `git add .planning/knowledge/*.md`
|
|
115
|
+
- Stage PLAN.md deletions: `git add -u .planning/phases/{phase_dir}/*-PLAN.md`
|
|
107
116
|
- Stage REQUIREMENTS.md if updated: `git add .planning/REQUIREMENTS.md`
|
|
108
117
|
- Commit: `docs({phase}): complete {phase-name} phase`
|
|
109
118
|
|
|
110
|
-
|
|
119
|
+
13. **Offer next steps**
|
|
111
120
|
- Route to next action (see `<offer_next>`)
|
|
112
121
|
|
|
113
|
-
|
|
122
|
+
14. **Update last command**
|
|
114
123
|
- Update `.planning/STATE.md` Last Command field
|
|
115
124
|
- Format: `Last Command: ms:execute-phase $ARGUMENTS | YYYY-MM-DD HH:MM`
|
|
116
125
|
</process>
|
|
@@ -213,8 +222,10 @@ After code simplification step:
|
|
|
213
222
|
|
|
214
223
|
After all plans in phase complete:
|
|
215
224
|
1. Stage: ROADMAP.md, STATE.md, REQUIREMENTS.md (if updated), VERIFICATION.md
|
|
216
|
-
2.
|
|
217
|
-
3.
|
|
225
|
+
2. Stage knowledge files: `git add .planning/knowledge/*.md`
|
|
226
|
+
3. Stage PLAN.md deletions: `git add -u .planning/phases/{phase_dir}/*-PLAN.md`
|
|
227
|
+
4. Commit with format: `docs({phase}): complete {phase-name} phase`
|
|
228
|
+
5. Bundles all phase-level state updates in one commit
|
|
218
229
|
|
|
219
230
|
**NEVER use:**
|
|
220
231
|
- `git add .`
|
|
@@ -226,13 +237,12 @@ After all plans in phase complete:
|
|
|
226
237
|
|
|
227
238
|
<success_criteria>
|
|
228
239
|
- [ ] All incomplete plans in phase executed
|
|
229
|
-
- [ ] Each plan has SUMMARY.md
|
|
230
240
|
- [ ] Code review completed (or skipped if config says "skip")
|
|
231
241
|
- [ ] Phase goal verified (Must-Haves checked against codebase)
|
|
232
242
|
- [ ] VERIFICATION.md created in phase directory
|
|
233
243
|
- [ ] Patch file generated OR explicitly skipped with message
|
|
234
|
-
- [ ]
|
|
235
|
-
- [ ]
|
|
244
|
+
- [ ] Knowledge files written to .planning/knowledge/ (consolidation complete)
|
|
245
|
+
- [ ] PLAN.md files deleted from phase directory
|
|
246
|
+
- [ ] STATE.md and ROADMAP.md reflect phase completion
|
|
236
247
|
- [ ] REQUIREMENTS.md updated (phase requirements marked Complete)
|
|
237
|
-
- [ ] User informed of next steps
|
|
238
248
|
</success_criteria>
|
package/commands/ms/help.md
CHANGED
|
@@ -376,6 +376,17 @@ Usage: `/ms:adhoc Fix auth token not refreshing on 401`
|
|
|
376
376
|
|
|
377
377
|
### Utility Commands
|
|
378
378
|
|
|
379
|
+
**`/ms:doctor`**
|
|
380
|
+
Health check and fix project configuration.
|
|
381
|
+
|
|
382
|
+
- Use when: subsystems are missing, artifacts have inconsistent vocabulary, or periodic health check
|
|
383
|
+
- V1: subsystem vocabulary setup and validation
|
|
384
|
+
- If subsystems missing: derives from project context and guides through setup
|
|
385
|
+
- If subsystems present: validates all artifacts use canonical values
|
|
386
|
+
- Idempotent — safe to run repeatedly
|
|
387
|
+
|
|
388
|
+
Usage: `/ms:doctor`
|
|
389
|
+
|
|
379
390
|
**`/ms:help`**
|
|
380
391
|
Show this command reference.
|
|
381
392
|
|
|
@@ -63,10 +63,9 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
|
|
|
63
63
|
|
|
64
64
|
3. **Strategic assessment (silent — do not output this step):**
|
|
65
65
|
- Check for previous milestone artifacts using calculated version:
|
|
66
|
-
- `.planning/
|
|
66
|
+
- `.planning/knowledge/*.md` (subsystem knowledge files — persist across milestones)
|
|
67
67
|
- `.planning/milestones/v{VERSION}-MILESTONE-AUDIT.md` (if exists)
|
|
68
68
|
- `.planning/TECH-DEBT.md` (if exists)
|
|
69
|
-
- `.planning/LEARNINGS.md` (if exists)
|
|
70
69
|
- Identify: outstanding tech debt, untested assumptions, high-impact gaps, unaddressed requirements
|
|
71
70
|
- This is background analysis — synthesize silently, surface through suggestions in step 4
|
|
72
71
|
|
|
@@ -85,7 +84,8 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
|
|
|
85
84
|
```
|
|
86
85
|
|
|
87
86
|
Sources for suggestions:
|
|
88
|
-
-
|
|
87
|
+
- Tech debt from TECH-DEBT.md, MILESTONE-AUDIT.md, or knowledge file Pitfalls sections
|
|
88
|
+
- Settled decisions and patterns from knowledge files
|
|
89
89
|
- Untested assumptions from previous audit
|
|
90
90
|
- Unaddressed requirements from previous milestones
|
|
91
91
|
- Strategic features inferred from PROJECT.md's problem/audience/USP
|
|
@@ -84,7 +84,7 @@ Check for `.planning/codebase/` and load relevant documents based on phase type.
|
|
|
84
84
|
5. Follow plan-phase.md workflow:
|
|
85
85
|
- Load project state and accumulated decisions
|
|
86
86
|
- Perform mandatory discovery (Level 0-3 as appropriate)
|
|
87
|
-
-
|
|
87
|
+
- Scan project history via context scanner script (prior decisions, issues, debug resolutions, adhoc learnings, cross-milestone patterns)
|
|
88
88
|
- Break phase into tasks
|
|
89
89
|
- Estimate scope and split into multiple plans if needed
|
|
90
90
|
- Create PLAN.md file(s) with executable structure
|