mindsystem-cc 4.1.2 → 4.2.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/agents/ms-browser-verifier.md +137 -0
- package/bin/install.js +2 -3
- package/commands/ms/add-todo.md +4 -4
- package/commands/ms/adhoc.md +2 -1
- package/commands/ms/audit-milestone.md +4 -3
- package/commands/ms/complete-milestone.md +2 -3
- package/commands/ms/config.md +72 -23
- package/commands/ms/create-roadmap.md +14 -7
- package/commands/ms/design-phase.md +3 -8
- package/commands/ms/doctor.md +7 -3
- package/commands/ms/execute-phase.md +50 -22
- package/commands/ms/map-codebase.md +1 -2
- package/commands/ms/new-milestone.md +3 -7
- package/commands/ms/new-project.md +6 -9
- package/commands/ms/remove-phase.md +2 -9
- package/commands/ms/research-milestone.md +3 -8
- package/commands/ms/research-phase.md +3 -8
- package/mindsystem/references/browser-verification.md +143 -0
- package/mindsystem/templates/config.json +4 -1
- package/mindsystem/workflows/adhoc.md +14 -15
- package/mindsystem/workflows/complete-milestone.md +1 -1
- package/mindsystem/workflows/compound.md +4 -11
- package/mindsystem/workflows/define-requirements.md +2 -1
- package/mindsystem/workflows/discuss-phase.md +5 -11
- package/mindsystem/workflows/doctor-fixes.md +32 -3
- package/mindsystem/workflows/execute-phase.md +84 -6
- package/mindsystem/workflows/map-codebase.md +4 -1
- package/mindsystem/workflows/verify-work.md +1 -1
- package/package.json +2 -2
- package/scripts/ms-tools.py +448 -52
|
@@ -195,9 +195,11 @@ These values are used throughout the system for consistent categorization of sum
|
|
|
195
195
|
|
|
196
196
|
<step name="commit">
|
|
197
197
|
|
|
198
|
-
**First run:**
|
|
198
|
+
**First run — update state and commit:**
|
|
199
199
|
```bash
|
|
200
|
+
ms-tools set-last-command "ms:new-project"
|
|
200
201
|
git add .planning/PROJECT.md .planning/config.json
|
|
202
|
+
[ -f .planning/STATE.md ] && git add .planning/STATE.md
|
|
201
203
|
git commit -m "$(cat <<'EOF'
|
|
202
204
|
docs: initialize [project-name]
|
|
203
205
|
|
|
@@ -208,9 +210,10 @@ EOF
|
|
|
208
210
|
)"
|
|
209
211
|
```
|
|
210
212
|
|
|
211
|
-
**Update mode:**
|
|
213
|
+
**Update mode — update state and commit:**
|
|
212
214
|
```bash
|
|
213
|
-
|
|
215
|
+
ms-tools set-last-command "ms:new-project"
|
|
216
|
+
git add .planning/PROJECT.md .planning/config.json .planning/STATE.md
|
|
214
217
|
git commit -m "$(cat <<'EOF'
|
|
215
218
|
docs: update [project-name] project context
|
|
216
219
|
|
|
@@ -268,12 +271,6 @@ Project updated:
|
|
|
268
271
|
|
|
269
272
|
</step>
|
|
270
273
|
|
|
271
|
-
<step name="update_last_command">
|
|
272
|
-
```bash
|
|
273
|
-
ms-tools set-last-command "ms:new-project"
|
|
274
|
-
```
|
|
275
|
-
</step>
|
|
276
|
-
|
|
277
274
|
</process>
|
|
278
275
|
|
|
279
276
|
<output>
|
|
@@ -259,14 +259,13 @@ Update any internal references to reflect new numbering.
|
|
|
259
259
|
</step>
|
|
260
260
|
|
|
261
261
|
<step name="commit">
|
|
262
|
-
|
|
262
|
+
**Update state and commit:**
|
|
263
263
|
|
|
264
264
|
```bash
|
|
265
|
+
ms-tools set-last-command "ms:remove-phase $ARGUMENTS"
|
|
265
266
|
git add .planning/
|
|
266
267
|
git commit -m "chore: remove phase {target} ({original-phase-name})"
|
|
267
268
|
```
|
|
268
|
-
|
|
269
|
-
The commit message preserves the historical record of what was removed.
|
|
270
269
|
</step>
|
|
271
270
|
|
|
272
271
|
<step name="completion">
|
|
@@ -297,12 +296,6 @@ Would you like to:
|
|
|
297
296
|
```
|
|
298
297
|
</step>
|
|
299
298
|
|
|
300
|
-
<step name="update_last_command">
|
|
301
|
-
```bash
|
|
302
|
-
ms-tools set-last-command "ms:remove-phase $ARGUMENTS"
|
|
303
|
-
```
|
|
304
|
-
</step>
|
|
305
|
-
|
|
306
299
|
</process>
|
|
307
300
|
|
|
308
301
|
<anti_patterns>
|
|
@@ -285,10 +285,11 @@ Write Executive Summary (2-3 paragraphs) synthesizing all findings.
|
|
|
285
285
|
|
|
286
286
|
Merge overlapping findings. Resolve conflicts by preferring higher-confidence sources.
|
|
287
287
|
|
|
288
|
-
## 7.
|
|
288
|
+
## 7. Update state and commit:
|
|
289
289
|
|
|
290
290
|
```bash
|
|
291
|
-
|
|
291
|
+
ms-tools set-last-command "ms:research-milestone"
|
|
292
|
+
git add .planning/MILESTONE-RESEARCH.md .planning/STATE.md
|
|
292
293
|
git commit -m "$(cat <<'EOF'
|
|
293
294
|
docs: complete milestone research
|
|
294
295
|
|
|
@@ -320,12 +321,6 @@ Key findings:
|
|
|
320
321
|
---
|
|
321
322
|
```
|
|
322
323
|
|
|
323
|
-
## 8. Update Last Command
|
|
324
|
-
|
|
325
|
-
```bash
|
|
326
|
-
ms-tools set-last-command "ms:research-milestone"
|
|
327
|
-
```
|
|
328
|
-
|
|
329
324
|
</process>
|
|
330
325
|
|
|
331
326
|
<success_criteria>
|
|
@@ -300,10 +300,11 @@ After all 3 agents return, read their structured outputs. Map findings to RESEAR
|
|
|
300
300
|
|
|
301
301
|
Write RESEARCH.md to `.planning/phases/{phase}-{slug}/{phase}-RESEARCH.md` using the standard template structure (semantic XML tags: `<research_summary>`, `<standard_stack>`, `<architecture_patterns>`, `<dont_hand_roll>`, `<common_pitfalls>`, `<code_examples>`, `<sota_updates>`, `<open_questions>`, `<sources>`, `<metadata>`).
|
|
302
302
|
|
|
303
|
-
## 7.
|
|
303
|
+
## 7. Update state and commit:
|
|
304
304
|
|
|
305
305
|
```bash
|
|
306
|
-
|
|
306
|
+
ms-tools set-last-command "ms:research-phase $ARGUMENTS"
|
|
307
|
+
git add .planning/phases/${PHASE}-*/*-RESEARCH.md .planning/STATE.md
|
|
307
308
|
git commit -m "docs: complete research for phase ${PHASE}"
|
|
308
309
|
```
|
|
309
310
|
|
|
@@ -324,12 +325,6 @@ If any section has LOW confidence or significant open questions, flag the weak a
|
|
|
324
325
|
3. Proceed to planning with caveats noted
|
|
325
326
|
4. Review full research
|
|
326
327
|
|
|
327
|
-
## 8. Update Last Command
|
|
328
|
-
|
|
329
|
-
```bash
|
|
330
|
-
ms-tools set-last-command "ms:research-phase $ARGUMENTS"
|
|
331
|
-
```
|
|
332
|
-
|
|
333
328
|
</process>
|
|
334
329
|
|
|
335
330
|
<checkpoint_handling>
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
<browser_verification>
|
|
2
|
+
|
|
3
|
+
# Browser Verification Reference
|
|
4
|
+
|
|
5
|
+
Lazily loaded by execute-phase when `ms-tools browser-check` returns READY (exit 0).
|
|
6
|
+
|
|
7
|
+
## Auth Flow
|
|
8
|
+
|
|
9
|
+
Handle browser authentication before spawning the verifier agent.
|
|
10
|
+
|
|
11
|
+
**Step 1: Check for existing auth state**
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
AUTH_STATE=".agent-browser-state.json"
|
|
15
|
+
[ -f "$AUTH_STATE" ] && echo "HAS_STATE" || echo "NO_STATE"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Step 2: Detect dev server URL**
|
|
19
|
+
|
|
20
|
+
Probe common ports to find the running dev server:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
for PORT in 5173 3000 8080 4200 3001; do
|
|
24
|
+
curl -s -o /dev/null -w "%{http_code}" "http://localhost:$PORT" 2>/dev/null | grep -q "200\|301\|302" && echo "http://localhost:$PORT" && break
|
|
25
|
+
done
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Store the result as `{dev_url}`.
|
|
29
|
+
|
|
30
|
+
**Step 3: Validate or establish auth**
|
|
31
|
+
|
|
32
|
+
If `HAS_STATE`:
|
|
33
|
+
1. Open app headless at `{dev_url}`
|
|
34
|
+
2. Check current URL — if redirected to a login/auth path, auth has expired
|
|
35
|
+
3. If still on app pages: auth valid, proceed to Derive Browser Checklist
|
|
36
|
+
|
|
37
|
+
If `NO_STATE` or auth expired:
|
|
38
|
+
1. Close headless browser
|
|
39
|
+
2. Open `{dev_url}` in **headed** mode (visible browser)
|
|
40
|
+
3. Use AskUserQuestion:
|
|
41
|
+
- header: "Browser authentication"
|
|
42
|
+
- question: "Please log in to the app in the browser window. Select 'Done' when you've logged in."
|
|
43
|
+
- options: ["Done — I'm logged in", "Skip browser verification"]
|
|
44
|
+
4. If user logged in: save browser state to `.agent-browser-state.json`, close headed browser, ensure gitignored:
|
|
45
|
+
```bash
|
|
46
|
+
grep -q "\.agent-browser-state\.json" .gitignore 2>/dev/null || echo '.agent-browser-state.json' >> .gitignore
|
|
47
|
+
```
|
|
48
|
+
5. If user skips: proceed to code_review, skip browser verification
|
|
49
|
+
|
|
50
|
+
## Derive Browser Checklist
|
|
51
|
+
|
|
52
|
+
Transform SUMMARY.md accomplishments into a structured checklist for the browser verifier.
|
|
53
|
+
|
|
54
|
+
**Step 1: Read summaries**
|
|
55
|
+
|
|
56
|
+
Read all `*-SUMMARY.md` files from the phase directory.
|
|
57
|
+
|
|
58
|
+
**Step 2: Extract per-summary**
|
|
59
|
+
|
|
60
|
+
For each SUMMARY, extract:
|
|
61
|
+
- **Accomplishments** section
|
|
62
|
+
- **mock_hints** frontmatter (if present) — specifically `external_data` entries
|
|
63
|
+
- **key-files** frontmatter (if present) — for route inference
|
|
64
|
+
|
|
65
|
+
**Step 3: Derive checklist items**
|
|
66
|
+
|
|
67
|
+
For each user-observable accomplishment, derive:
|
|
68
|
+
- `name`: brief description of what to verify
|
|
69
|
+
- `route`: URL path (infer from key-files paths, routing config, or component names)
|
|
70
|
+
- `expected`: what should be visible on screen (be specific — "table with columns X, Y, Z", not "data displays")
|
|
71
|
+
- `interaction`: optional action + expected result (e.g., "click Add button → modal opens with form fields A, B, C")
|
|
72
|
+
- `needs_backend_data`: true/false (from mock_hints `external_data` entries)
|
|
73
|
+
|
|
74
|
+
**Step 4: Filter**
|
|
75
|
+
|
|
76
|
+
Include: UI renders, navigation, forms, data display, visual states, user interactions.
|
|
77
|
+
Exclude: refactors, type changes, API internals, test files, build config, non-visual changes.
|
|
78
|
+
|
|
79
|
+
**Step 5: Group and format**
|
|
80
|
+
|
|
81
|
+
Group items by route for efficient navigation. Format as a numbered list:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
1. **{name}**
|
|
85
|
+
Route: {route}
|
|
86
|
+
Expected: {expected}
|
|
87
|
+
Interaction: {interaction or "none"}
|
|
88
|
+
Needs backend data: {yes/no}
|
|
89
|
+
|
|
90
|
+
2. **{name}**
|
|
91
|
+
...
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Spawn
|
|
95
|
+
|
|
96
|
+
Spawn the browser verifier agent after auth is established and checklist is derived:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
Task(
|
|
100
|
+
prompt="Run browser verification for phase {phase_number}.
|
|
101
|
+
|
|
102
|
+
Phase directory: {phase_dir}
|
|
103
|
+
Dev URL: {dev_url}
|
|
104
|
+
Auth state: .agent-browser-state.json
|
|
105
|
+
Screenshots directory: {phase_dir}/screenshots
|
|
106
|
+
|
|
107
|
+
## Browser Checklist
|
|
108
|
+
|
|
109
|
+
{derived_checklist}
|
|
110
|
+
|
|
111
|
+
## Backend Context
|
|
112
|
+
|
|
113
|
+
{summary of which items need real backend data — from mock_hints external_data entries.
|
|
114
|
+
Items needing backend data may show empty states or errors — mark as ENVIRONMENT_BLOCKED, not ISSUE.}
|
|
115
|
+
|
|
116
|
+
Verify each checklist item. Save all screenshots to {phase_dir}/screenshots/.
|
|
117
|
+
Fix trivial issues inline. Return structured report.",
|
|
118
|
+
subagent_type="ms-browser-verifier"
|
|
119
|
+
)
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Post-Verifier Handling
|
|
123
|
+
|
|
124
|
+
Route based on the report's **Status** field:
|
|
125
|
+
|
|
126
|
+
**`environment_blocked`:**
|
|
127
|
+
Surface the blocker description and screenshot evidence to the user. Use AskUserQuestion:
|
|
128
|
+
- header: "Browser verification blocked"
|
|
129
|
+
- question: "The browser verifier hit an environment issue: {blocker description}. How to proceed?"
|
|
130
|
+
- options: ["Re-run after fixing environment", "Skip browser verification"]
|
|
131
|
+
|
|
132
|
+
**`has_fixes`:**
|
|
133
|
+
Report: "Browser verification: {N} fixes applied, {M} issues found"
|
|
134
|
+
Include the Fixes Applied section in the consolidator prompt (step `consolidate_knowledge`) so browser-discovered patterns are captured in knowledge files.
|
|
135
|
+
|
|
136
|
+
**`has_issues`:**
|
|
137
|
+
Report: "Browser verification: {N} issues found (see screenshots in {phase_dir}/screenshots/)"
|
|
138
|
+
Note issues for verify-work — these are candidates for manual UAT.
|
|
139
|
+
|
|
140
|
+
**`all_passed`:**
|
|
141
|
+
Report: "Browser verification: all {N} items passed"
|
|
142
|
+
|
|
143
|
+
</browser_verification>
|
|
@@ -132,7 +132,12 @@ Present a summary to the user:
|
|
|
132
132
|
- Key files affected
|
|
133
133
|
- Must-Haves checklist
|
|
134
134
|
|
|
135
|
-
|
|
135
|
+
**AskUserQuestion** with options:
|
|
136
|
+
- Approve and execute
|
|
137
|
+
- Request edits (let me describe)
|
|
138
|
+
- Abort
|
|
139
|
+
|
|
140
|
+
If edits requested, apply them directly to the plan file, then re-present and ask again. If aborted, clean up `${exec_dir}` and stop.
|
|
136
141
|
</step>
|
|
137
142
|
|
|
138
143
|
<step name="spawn_executor">
|
|
@@ -202,8 +207,14 @@ The consolidator reads `adhoc-01-SUMMARY.md`, extracts knowledge (key-decisions,
|
|
|
202
207
|
|
|
203
208
|
**Finalize todo (when detected):** Follow the **Finalization**, **Commit Message Suffix**, and **Report Additions** sections from the loaded todo reference.
|
|
204
209
|
|
|
205
|
-
**
|
|
210
|
+
**Update STATE.md** "Recent Adhoc Work" section:
|
|
211
|
+
- Find or create "### Recent Adhoc Work" under "## Accumulated Context"
|
|
212
|
+
- Add entry at top: `- [YYYY-MM-DD]: [description] ({exec_dir}/adhoc-01-SUMMARY.md)`
|
|
213
|
+
- Keep last 5 entries (remove older ones from list)
|
|
214
|
+
|
|
215
|
+
**Update state and commit:**
|
|
206
216
|
```bash
|
|
217
|
+
ms-tools set-last-command "ms:adhoc ${slug}"
|
|
207
218
|
git add .planning/knowledge/*.md "${exec_dir}/adhoc-01-SUMMARY.md" .planning/STATE.md
|
|
208
219
|
# Only include patch if it was generated
|
|
209
220
|
[ -f "${exec_dir}/adhoc-01-changes.patch" ] && git add "${exec_dir}/adhoc-01-changes.patch"
|
|
@@ -215,16 +226,6 @@ EOF
|
|
|
215
226
|
)"
|
|
216
227
|
```
|
|
217
228
|
|
|
218
|
-
**Update STATE.md** "Recent Adhoc Work" section:
|
|
219
|
-
- Find or create "### Recent Adhoc Work" under "## Accumulated Context"
|
|
220
|
-
- Add entry at top: `- [YYYY-MM-DD]: [description] ({exec_dir}/adhoc-01-SUMMARY.md)`
|
|
221
|
-
- Keep last 5 entries (remove older ones from list)
|
|
222
|
-
|
|
223
|
-
**Set last command:**
|
|
224
|
-
```bash
|
|
225
|
-
ms-tools set-last-command "ms:adhoc $ARGUMENTS"
|
|
226
|
-
```
|
|
227
|
-
|
|
228
229
|
**Report completion:**
|
|
229
230
|
```
|
|
230
231
|
Adhoc work complete: [description]
|
|
@@ -242,9 +243,7 @@ Artifacts:
|
|
|
242
243
|
```
|
|
243
244
|
---
|
|
244
245
|
|
|
245
|
-
|
|
246
|
-
- `/ms:progress` — see project status
|
|
247
|
-
- `/ms:execute-phase` — continue phase execution
|
|
246
|
+
Check `/ms:progress` to see project status and next steps.
|
|
248
247
|
```
|
|
249
248
|
</step>
|
|
250
249
|
|
|
@@ -38,7 +38,7 @@ When a milestone completes, this workflow:
|
|
|
38
38
|
|
|
39
39
|
**PHASE-SUMMARIES** consolidates all `*-SUMMARY.md` files from phase directories, organized by phase and plan, before artifacts are deleted.
|
|
40
40
|
|
|
41
|
-
**phases/** contains the phase directories themselves (with remaining files like `.patch`, `mockups/`) moved from `.planning/phases/`.
|
|
41
|
+
**phases/** contains the phase directories themselves (with remaining files like `.patch`, `mockups/`, `screenshots/`) moved from `.planning/phases/`.
|
|
42
42
|
|
|
43
43
|
**REQUIREMENTS archive** contains:
|
|
44
44
|
- All v1 requirements marked complete with outcomes
|
|
@@ -97,20 +97,13 @@ Agent reads changes, reads affected knowledge files, writes updates, returns rep
|
|
|
97
97
|
ms-tools config-set subsystems --append "new-subsystem"
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
**
|
|
100
|
+
**Update state and commit:**
|
|
101
101
|
```bash
|
|
102
|
-
|
|
102
|
+
ms-tools set-last-command "ms:compound $ARGUMENTS"
|
|
103
|
+
git add .planning/knowledge/*.md .planning/STATE.md
|
|
103
104
|
# Only add config.json if modified
|
|
104
105
|
git add .planning/config.json 2>/dev/null
|
|
105
|
-
git commit -m "
|
|
106
|
-
docs: compound knowledge from <description>
|
|
107
|
-
EOF
|
|
108
|
-
)"
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
**Set last command:**
|
|
112
|
-
```bash
|
|
113
|
-
ms-tools set-last-command "ms:compound $ARGUMENTS"
|
|
106
|
+
git commit -m "docs: compound knowledge from <description>"
|
|
114
107
|
```
|
|
115
108
|
|
|
116
109
|
**Report:** Subsystems updated, entries added/changed/removed, new subsystems created (if any).
|
|
@@ -300,11 +300,13 @@ Created: .planning/phases/${PHASE}-${SLUG}/${PHASE}-CONTEXT.md
|
|
|
300
300
|
|
|
301
301
|
</step>
|
|
302
302
|
|
|
303
|
-
<step name="
|
|
304
|
-
|
|
303
|
+
<step name="commit">
|
|
304
|
+
|
|
305
|
+
**Update state and commit:**
|
|
305
306
|
|
|
306
307
|
```bash
|
|
307
|
-
|
|
308
|
+
ms-tools set-last-command "ms:discuss-phase ${PHASE}"
|
|
309
|
+
git add .planning/phases/${PHASE}-${SLUG}/${PHASE}-CONTEXT.md .planning/STATE.md
|
|
308
310
|
git commit -m "$(cat <<'EOF'
|
|
309
311
|
docs(${PHASE}): capture phase context
|
|
310
312
|
|
|
@@ -315,20 +317,12 @@ Phase ${PHASE}: ${PHASE_NAME}
|
|
|
315
317
|
EOF
|
|
316
318
|
)"
|
|
317
319
|
```
|
|
318
|
-
|
|
319
|
-
Confirm: "Committed: docs(${PHASE}): capture phase context"
|
|
320
320
|
</step>
|
|
321
321
|
|
|
322
322
|
<step name="show_prework_status">
|
|
323
323
|
Read `~/.claude/mindsystem/references/prework-status.md` and present what's done vs still needed for this phase.
|
|
324
324
|
</step>
|
|
325
325
|
|
|
326
|
-
<step name="update_state">
|
|
327
|
-
```bash
|
|
328
|
-
ms-tools set-last-command "ms:discuss-phase ${PHASE}"
|
|
329
|
-
```
|
|
330
|
-
</step>
|
|
331
|
-
|
|
332
326
|
</process>
|
|
333
327
|
|
|
334
328
|
<success_criteria>
|
|
@@ -80,7 +80,7 @@ For each flat file like `milestones/v0.1-ROADMAP.md`:
|
|
|
80
80
|
3. `git mv` the file, stripping the version prefix from the filename:
|
|
81
81
|
`git mv .planning/milestones/v0.1-ROADMAP.md .planning/milestones/v0.1/ROADMAP.md`
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
New milestones use slug-based directories (e.g., `milestones/mvp/`, `milestones/push-notifications/`). Old v-prefixed directories from previous format are valid and handled.
|
|
84
84
|
|
|
85
85
|
Commit:
|
|
86
86
|
|
|
@@ -106,7 +106,7 @@ EOF
|
|
|
106
106
|
2. **Resolve slugs** — For each versioned dir, match to MILESTONES.md name mapping:
|
|
107
107
|
- Standard dirs: version matches directly (v0.1 → "MVP" → slug "mvp")
|
|
108
108
|
- Nested dirs: match sub-directory name to the milestone name in MILESTONES.md (v2.0.0/quests → "Quests Feature" → slug "quests-feature")
|
|
109
|
-
- Derive
|
|
109
|
+
- Derive slugs from names: lowercase, hyphenated (e.g., "Demo Release" → "demo-release"). Claude proposes, user confirms
|
|
110
110
|
|
|
111
111
|
3. **Present mapping** to user with AskUserQuestion:
|
|
112
112
|
|
|
@@ -236,6 +236,35 @@ EOF
|
|
|
236
236
|
```
|
|
237
237
|
</step>
|
|
238
238
|
|
|
239
|
+
<step name="fix_phase_dirs">
|
|
240
|
+
**Only if Phase Directory Naming failed or warned.**
|
|
241
|
+
|
|
242
|
+
1. Create any missing phase directories:
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
ms-tools create-phase-dirs
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
2. For non-canonical directories (reported as FAIL), rename using `git mv`:
|
|
249
|
+
|
|
250
|
+
Parse each non-canonical suggestion from the doctor check output (format: `{old} → git mv .planning/phases/{old} .planning/phases/{canonical}`) and execute the `git mv`.
|
|
251
|
+
|
|
252
|
+
Commit:
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
git add .planning/phases/
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
git commit -m "$(cat <<'EOF'
|
|
260
|
+
chore(doctor): fix phase directory naming
|
|
261
|
+
|
|
262
|
+
Created missing and renamed non-canonical phase directories.
|
|
263
|
+
EOF
|
|
264
|
+
)"
|
|
265
|
+
```
|
|
266
|
+
</step>
|
|
267
|
+
|
|
239
268
|
<step name="fix_knowledge">
|
|
240
269
|
**Only if Knowledge Files failed.**
|
|
241
270
|
|
|
@@ -253,7 +282,7 @@ If `SUMMARIES > 0`: **artifact mode**. If `SUMMARIES == 0`: **source code mode**
|
|
|
253
282
|
|
|
254
283
|
### 2. Spawn subagent
|
|
255
284
|
|
|
256
|
-
Spawn a `general-purpose` subagent (Task tool) with the following structured prompt. Inject detected mode, subsystem list from config.json, and
|
|
285
|
+
Spawn a `general-purpose` subagent (Task tool) with the following structured prompt. Inject detected mode, subsystem list from config.json, and detection results (SUMMARIES, HAS_CODEBASE_DOCS, HAS_PROJECT) into the prompt.
|
|
257
286
|
|
|
258
287
|
---
|
|
259
288
|
|
|
@@ -291,6 +291,40 @@ If the verifier's return includes "Items Not Verified Programmatically" (uncerta
|
|
|
291
291
|
Read `~/.claude/mindsystem/references/routing/gap-closure-routing.md` and follow its triage instructions to present gap summary and route to the appropriate primitive based on scope analysis.
|
|
292
292
|
</step>
|
|
293
293
|
|
|
294
|
+
<step name="browser_verification">
|
|
295
|
+
Run browser verification prerequisites check:
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
ms-tools browser-check
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
**If exit 0 (READY):**
|
|
302
|
+
|
|
303
|
+
Ensure `$PHASE_DIR/*-SUMMARY.md` files are available (needed for checklist derivation — may already be in context from wave reports).
|
|
304
|
+
|
|
305
|
+
Read `~/.claude/mindsystem/references/browser-verification.md` and follow its sections in order:
|
|
306
|
+
1. **Auth Flow** — establish browser authentication
|
|
307
|
+
2. **Derive Browser Checklist** — transform SUMMARYs into visual checklist items
|
|
308
|
+
3. **Spawn** — launch verifier with derived checklist
|
|
309
|
+
4. **Post-Verifier Handling** — route by report status
|
|
310
|
+
|
|
311
|
+
**If exit 1 (MISSING_DEPS):**
|
|
312
|
+
|
|
313
|
+
Parse output for missing items. Use AskUserQuestion:
|
|
314
|
+
- header: "Browser verification"
|
|
315
|
+
- question: "Browser verification prerequisites are missing. How to proceed?"
|
|
316
|
+
- options:
|
|
317
|
+
- "Install missing dependencies" — follow install instructions from output
|
|
318
|
+
- "Skip browser verification" — proceed to code_review
|
|
319
|
+
|
|
320
|
+
If user installs: re-run `ms-tools browser-check`.
|
|
321
|
+
If user skips: proceed to code_review.
|
|
322
|
+
|
|
323
|
+
**If exit 2 (SKIP):**
|
|
324
|
+
|
|
325
|
+
Proceed silently to code_review.
|
|
326
|
+
</step>
|
|
327
|
+
|
|
294
328
|
<step name="code_review">
|
|
295
329
|
Read code review agent name from config:
|
|
296
330
|
|
|
@@ -311,7 +345,7 @@ Use CODE_REVIEW value directly as agent name.
|
|
|
311
345
|
1. **Gather changed files:**
|
|
312
346
|
```bash
|
|
313
347
|
# Get all files changed in this phase's commits
|
|
314
|
-
PHASE_COMMITS=$(
|
|
348
|
+
PHASE_COMMITS=$(ms-tools find-phase-commits ${PHASE_NUMBER})
|
|
315
349
|
CHANGED_FILES=$(git diff --name-only $(echo "$PHASE_COMMITS" | tail -1)^..HEAD | grep -E '\.(dart|ts|tsx|js|jsx|swift|kt|py|go|rs)$')
|
|
316
350
|
```
|
|
317
351
|
|
|
@@ -447,7 +481,7 @@ Check what changed during this phase:
|
|
|
447
481
|
|
|
448
482
|
```bash
|
|
449
483
|
# Get all source changes from this phase's commits
|
|
450
|
-
PHASE_COMMITS=$(
|
|
484
|
+
PHASE_COMMITS=$(ms-tools find-phase-commits {phase_number})
|
|
451
485
|
if [ -n "$PHASE_COMMITS" ]; then
|
|
452
486
|
FIRST=$(echo "$PHASE_COMMITS" | tail -1)
|
|
453
487
|
git diff --name-only ${FIRST}^..HEAD 2>/dev/null | grep -v "^\.planning/"
|
|
@@ -477,23 +511,67 @@ git commit -m "docs: update codebase map after phase {X}"
|
|
|
477
511
|
<step name="offer_next">
|
|
478
512
|
Present next steps based on milestone status.
|
|
479
513
|
|
|
514
|
+
**Thoroughness by default:** Verification is the natural next step after execution. The user can skip, but the system always suggests it first.
|
|
515
|
+
|
|
480
516
|
**First, surface user actions:**
|
|
481
517
|
|
|
482
518
|
Read `## User Actions Required` from all `*-SUMMARY.md` files in the phase directory. If any non-empty actions exist, present as `## ⚠ Action Required` block before route-specific content. Skip if all "None".
|
|
483
519
|
|
|
520
|
+
**Then, assess skip context** from SUMMARYs and VERIFICATION.md already in context:
|
|
521
|
+
- If all Must-Haves verified programmatically (uncertain = 0) AND phase involved only internal/structural changes (no user-facing UI, behavior, or API changes): include a brief skip note.
|
|
522
|
+
- Otherwise: present verify-work without qualification — human verification adds clear value.
|
|
523
|
+
|
|
524
|
+
**Present verify-work as Next Up:**
|
|
525
|
+
|
|
526
|
+
```markdown
|
|
527
|
+
## ✓ Phase {Z}: {Name} Complete
|
|
528
|
+
|
|
529
|
+
All {Y} plans finished. Phase goal verified.
|
|
530
|
+
|
|
531
|
+
---
|
|
532
|
+
|
|
533
|
+
## ▶ Next Up
|
|
534
|
+
|
|
535
|
+
`/ms:verify-work {Z}` — validate {phase name} through manual acceptance testing
|
|
536
|
+
|
|
537
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
538
|
+
|
|
539
|
+
{If skip context applies: "Phase involved only {description} with no user-facing changes — skip if structural verification is sufficient."}
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
**Then present "Also available" based on milestone status:**
|
|
543
|
+
|
|
484
544
|
**If more phases remain:**
|
|
485
545
|
|
|
486
|
-
Read `~/.claude/mindsystem/references/routing/next-phase-routing.md`
|
|
546
|
+
Read `~/.claude/mindsystem/references/routing/next-phase-routing.md` to determine the most appropriate command for the next phase (discuss/design/research/plan based on pre-work flags). Present concisely under "Also available":
|
|
487
547
|
|
|
488
|
-
After the "Next Up" section, add:
|
|
489
548
|
```markdown
|
|
549
|
+
---
|
|
550
|
+
|
|
551
|
+
**Phase {Z+1}: {Name}** — {Goal}
|
|
552
|
+
{If pre-work flagged: brief note about recommendations}
|
|
553
|
+
|
|
490
554
|
**Also available:**
|
|
491
|
-
- `/ms:
|
|
555
|
+
- `/ms:{suggested} {Z+1}` — {reason from routing}
|
|
556
|
+
- `/ms:plan-phase {Z+1}` — skip pre-work, plan directly
|
|
557
|
+
|
|
558
|
+
---
|
|
492
559
|
```
|
|
493
560
|
|
|
561
|
+
Include the pre-work recommendations table from the routing reference if any pre-work is flagged as "Likely".
|
|
562
|
+
|
|
494
563
|
**If milestone complete:**
|
|
495
564
|
|
|
496
|
-
|
|
565
|
+
```markdown
|
|
566
|
+
---
|
|
567
|
+
|
|
568
|
+
**Also available:**
|
|
569
|
+
- `/ms:audit-milestone` — verify requirements, cross-phase integration, E2E flows
|
|
570
|
+
- `/ms:complete-milestone` — skip audit, archive directly
|
|
571
|
+
- `/ms:add-phase <description>` — add another phase first
|
|
572
|
+
|
|
573
|
+
---
|
|
574
|
+
```
|
|
497
575
|
</step>
|
|
498
576
|
|
|
499
577
|
</process>
|
|
@@ -217,10 +217,13 @@ Continue to commit_codebase_map.
|
|
|
217
217
|
</step>
|
|
218
218
|
|
|
219
219
|
<step name="commit_codebase_map">
|
|
220
|
-
|
|
220
|
+
|
|
221
|
+
**Update state and commit:**
|
|
221
222
|
|
|
222
223
|
```bash
|
|
224
|
+
ms-tools set-last-command "ms:map-codebase $ARGUMENTS"
|
|
223
225
|
git add .planning/codebase/*.md
|
|
226
|
+
[ -f .planning/STATE.md ] && git add .planning/STATE.md
|
|
224
227
|
git commit -m "$(cat <<'EOF'
|
|
225
228
|
docs: map existing codebase
|
|
226
229
|
|
|
@@ -590,7 +590,7 @@ PRE_WORK_STASH=$(git stash list | grep "pre-verify-work" | head -1 | cut -d: -f1
|
|
|
590
590
|
[ -n "$PRE_WORK_STASH" ] && git stash pop "$PRE_WORK_STASH"
|
|
591
591
|
```
|
|
592
592
|
|
|
593
|
-
**4. Update
|
|
593
|
+
**4. Update state and commit:**
|
|
594
594
|
```bash
|
|
595
595
|
ms-tools uat-update $PHASE_NUMBER --session status=complete current_batch= mocked_files=
|
|
596
596
|
ms-tools set-last-command "ms:verify-work $ARGUMENTS"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mindsystem-cc",
|
|
3
|
-
"version": "4.1
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "4.2.1",
|
|
4
|
+
"description": "The engineer's meta-prompting system for Claude Code.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"mindsystem-cc": "bin/install.js"
|
|
7
7
|
},
|