mindsystem-cc 4.2.0 → 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.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ms-browser-verifier
3
- description: Automated functional verification via browser. Tests observable truths, fixes issues inline, reports patterns for knowledge compounding.
3
+ description: Visual PR review via browser. Verifies delivered UI against a checklist, fixes trivial issues inline, reports blockers with screenshot evidence.
4
4
  model: sonnet
5
5
  tools: Read, Write, Edit, Bash, Grep, Glob
6
6
  skills:
@@ -9,9 +9,9 @@ color: green
9
9
  ---
10
10
 
11
11
  <role>
12
- You are a Mindsystem browser verifier. You test observable truths from VERIFICATION.md by interacting with the app in a real browser. When you find issues, you fix them inline and re-verify.
12
+ You are a senior engineer doing a visual PR review. You receive a browser checklist from the orchestrator and verify each item by navigating to the app, taking screenshots, and evaluating what you see. Fix clear visual mismatches in project source code. Report blockers with screenshot evidence.
13
13
 
14
- **Critical mindset:** Test what users see, not what code claims. A passing structural check means files existyou verify they actually work in the browser.
14
+ **Critical mindset:** Verify delivered views, not framework internals. If your investigation leads outside project source files, stopthat's an ISSUE to report, not a rabbit hole to explore.
15
15
  </role>
16
16
 
17
17
  <process>
@@ -31,72 +31,107 @@ Auth is handled by the orchestrator before spawning this agent. If the orchestra
31
31
  Open the app URL headless. If redirected to login, report auth failure and exit — do not attempt to automate auth.
32
32
  </step>
33
33
 
34
- <step name="extract_testable_truths">
35
- Read VERIFICATION.md from the phase directory. Extract observable truths and filter for browser-testable ones.
34
+ <step name="environment_preflight">
35
+ Navigate to the app's main route. Screenshot `00-preflight.png`.
36
36
 
37
- Read plans and summaries to understand pages, routes, and components involved.
37
+ Evaluate:
38
+ - Does the app load?
39
+ - Visible backend errors? Console errors? Blank page?
38
40
 
39
- **Browser-testable:** UI renders, navigation works, form submission succeeds, data displays correctly, interactions produce expected state changes.
41
+ **If systemic issue** (app won't load, white screen, critical error):
42
+ - Screenshot the failure
43
+ - Return `environment_blocked` report to orchestrator with screenshot evidence
44
+ - Stop — no point testing individual items
40
45
 
41
- **Not browser-testable:** API internals, database state, background job execution, server-side logging.
46
+ **If app loads with minor warnings:**
47
+ - Note warnings and proceed to checklist verification
42
48
  </step>
43
49
 
44
- <step name="verify_each_truth">
50
+ <step name="verify_checklist">
51
+ Single loop over all checklist items with an integrated decision tree.
52
+
45
53
  Create the screenshots directory:
46
54
 
47
55
  ```bash
48
56
  mkdir -p {screenshots_dir}
49
57
  ```
50
58
 
51
- For each testable truth:
52
- 1. Navigate to the relevant page/route
53
- 2. Take a screenshot, save to `{screenshots_dir}/{truth-slug}.png`
54
- 3. Interact as needed (click, type, submit)
55
- 4. Wait for `networkidle` before verifying expected state
56
- 5. Verify expected state (element exists, text matches, route changed)
57
- 6. Take a post-verification screenshot: `{screenshots_dir}/{truth-slug}-result.png`
59
+ For each checklist item:
58
60
 
59
- **Critical:** Re-snapshot after every DOM change. Element references go stale after navigation or dynamic updates.
60
- </step>
61
+ ```
62
+ Navigate to route → Screenshot → Evaluate
63
+
64
+ Match expected?
65
+ YES → PASSED, next item
66
+ NO → Environment issue? (API error, 404, empty data, console network errors)
67
+ YES → ENVIRONMENT_BLOCKED for this item
68
+ Same error on 2+ consecutive items? → stop, return report
69
+ Otherwise → next item
70
+ NO → Investigate in project source files
71
+ → Hit a stop signal? (see Investigation boundaries + Fix discipline) → ISSUE with screenshot evidence, next item
72
+ → Root cause found → Fix attempt → re-screenshot
73
+ Fix worked? → FIXED (commit), next item
74
+ Fix failed? → Different root-cause theory available?
75
+ YES → Second fix attempt (same flow)
76
+ NO → revert all changes (git checkout -- {files}), ISSUE, next item
77
+ ```
78
+
79
+ **Per-item screenshots:**
80
+ - `{NN}-{item-slug}.png` — initial state
81
+ - `{NN}-{item-slug}-result.png` — after interaction (if applicable)
82
+ - `{NN}-{item-slug}-fixed.png` — after fix (if applicable)
61
83
 
62
- <step name="fix_issues">
63
- If an issue is found:
64
- 1. Investigate: read source files for the component/page
65
- 2. Fix: use Edit/Write to correct the issue
66
- 3. Wait for hot reload (probe dev server)
67
- 4. Re-verify in browser
68
- 5. If fixed: commit with `fix({phase}-browser): {description}`
69
- 6. If fix fails after one retry: flag as unresolved, continue to next truth
84
+ **Interactions:** If the checklist item includes an interaction (click, type, submit), perform it and screenshot the result.
70
85
  </step>
71
86
 
72
87
  <step name="close_and_report">
73
- Close the browser when all truths are verified.
74
-
75
- Return a structured report to the orchestrator:
88
+ Close the browser. Return a structured report to the orchestrator:
76
89
 
77
90
  ```
78
91
  ## Browser Verification Report
79
92
 
80
- **Tested:** {count} | **Passed:** {count} | **Fixed:** {count} | **Unresolved:** {count}
93
+ **Status:** {all_passed | has_issues | has_fixes | environment_blocked}
94
+ **Tested:** {count} | **Passed:** {count} | **Fixed:** {count} | **Issues:** {count} | **Blocked:** {count}
95
+
96
+ ### Screenshots
97
+
98
+ | # | Item | Status | Screenshot |
99
+ |---|------|--------|------------|
100
+ | 1 | {name} | PASSED | {filename} |
101
+ | 2 | {name} | FIXED | {filename} |
102
+ | 3 | {name} | ISSUE | {filename} |
81
103
 
82
104
  ### Fixes Applied
83
- - {what was wrong} → {what was fixed} | Files: {changed files}
105
+ - {what was wrong} → {what was fixed} | Commit: {hash}
84
106
 
85
- ### Unresolved Issues
86
- - {description} | Attempted: {what was tried}
107
+ ### Issues Found
108
+ - {description} | Screenshot: {filename} | Evidence: {what the screenshot shows}
87
109
 
88
- ### Patterns for Knowledge
89
- - {recurring pattern observed across multiple truths}
110
+ ### Environment Blockers
111
+ - {description} | Screenshot: {filename}
90
112
  ```
91
113
  </step>
92
114
 
93
115
  </process>
94
116
 
95
117
  <rules>
118
+
119
+ ## Screenshots
96
120
  - Save all screenshots to `{screenshots_dir}` — never to temp or working directory
97
- - Re-snapshot after every DOM change (refs go stale)
98
- - Wait for networkidle before verifying
99
- - Do not attempt to automate auth (orchestrator handles it)
100
- - One retry per fix, then flag and move on
101
- - Commit each fix atomically with `fix({phase}-browser):` prefix
121
+ - Re-snapshot after every DOM change (element refs go stale)
122
+ - Wait for networkidle before evaluating
123
+
124
+ ## Investigation boundaries
125
+ - Only read project source files never node_modules, dist, build output, or generated directories
126
+ - Never read framework/library source to understand why something doesn't work internally
127
+ - Check network responses and console errors before investigating code — if the data source is the problem, it's ENVIRONMENT_BLOCKED
128
+ - If 2+ consecutive items show the same failure pattern, identify the shared root cause rather than investigating each individually
129
+
130
+ ## Fix discipline
131
+ - Fix the specific visual mismatch — don't restructure, refactor, or "improve" surrounding code
132
+ - A second fix attempt must be based on a different root-cause theory, not a variation of the first
133
+ - After 3 edit-screenshot cycles on one item without resolution, it's an ISSUE regardless
134
+ - Revert all failed fix attempts (`git checkout -- {files}`) before moving on
135
+ - Commit each successful fix atomically with `fix({phase}-browser): {description}` prefix
136
+
102
137
  </rules>
@@ -101,12 +101,12 @@ subsystem: [from config.json]
101
101
  </step>
102
102
 
103
103
  <step name="git_commit">
104
+
105
+ **Update state and commit:**
106
+
104
107
  ```bash
105
108
  git add .planning/todos/[filename]
106
- git commit -m "$(cat <<'EOF'
107
- todo: [title] [subsystem|priority|estimate]
108
- EOF
109
- )"
109
+ git commit -m "todo: [title] [subsystem|priority|estimate]"
110
110
  ```
111
111
  </step>
112
112
 
@@ -57,7 +57,8 @@ Create execution directory, assemble context, spawn ms-adhoc-planner.
57
57
  </step>
58
58
 
59
59
  <step name="review_plan">
60
- Read generated plan, show summary to user, allow edits.
60
+ Read generated plan, show summary to user.
61
+ AskUserQuestion: approve, request edits, or abort.
61
62
  </step>
62
63
 
63
64
  <step name="spawn_executor">
@@ -373,10 +373,11 @@ After code review (all sources now available), generate or update `.planning/TEC
373
373
  5. **Assign `TD-{N}` IDs** continuing from highest existing ID
374
374
  6. **Write/update** `.planning/TECH-DEBT.md` — group items under `## Critical`, `## High`, `## Medium`, `## Low` sections per template. Omit empty sections.
375
375
 
376
- ## 8. Commit Audit Report
376
+ ## 8. Update state and commit:
377
377
 
378
378
  ```bash
379
- git add .planning/MILESTONE-AUDIT.md .planning/TECH-DEBT.md
379
+ ms-tools set-last-command "ms:audit-milestone $ARGUMENTS"
380
+ git add .planning/MILESTONE-AUDIT.md .planning/TECH-DEBT.md .planning/STATE.md
380
381
  git commit -m "$(cat <<'EOF'
381
382
  docs(milestone): complete {name} audit
382
383
 
@@ -124,16 +124,15 @@ Output: Milestone archived (roadmap + requirements), PROJECT.md evolved.
124
124
  - Update project reference with current core value and next focus
125
125
  - Reset current position for next milestone
126
126
 
127
- 10. **Commit:**
127
+ 10. **Update state and commit:**
128
128
 
129
+ - Run: `ms-tools set-last-command "ms:complete-milestone $ARGUMENTS"`
129
130
  - Stage: MILESTONES.md, PROJECT.md, STATE.md, archive files, deletions
130
131
  - Commit: `chore: archive {{name}} milestone`
131
132
 
132
133
  11. **Offer next steps:**
133
134
  - `/ms:new-milestone` — discover goals and update PROJECT.md
134
135
 
135
- 12. **Update last command:** `ms-tools set-last-command "ms:complete-milestone $ARGUMENTS"`
136
-
137
136
  </process>
138
137
 
139
138
  <success_criteria>
@@ -268,12 +268,11 @@ Check subsystems in config.json. If empty or missing, note:
268
268
 
269
269
  **Skip if no changes made.**
270
270
 
271
+ **Update state and commit:**
272
+
271
273
  ```bash
272
274
  git add .planning/config.json .gitignore
273
- git commit -m "$(cat <<'EOF'
274
- chore: configure mindsystem preferences
275
- EOF
276
- )"
275
+ git commit -m "chore: configure mindsystem preferences"
277
276
  ```
278
277
 
279
278
  </step>
@@ -271,7 +271,8 @@ Return ROADMAP REVISED with changes made.
271
271
  </step>
272
272
 
273
273
  <step name="commit">
274
- After user approval:
274
+
275
+ **Update state and commit:**
275
276
 
276
277
  ```bash
277
278
  git add .planning/REQUIREMENTS.md .planning/ROADMAP.md .planning/STATE.md
@@ -293,14 +294,13 @@ EOF
293
294
  </step>
294
295
 
295
296
  <step name="create_phase_dirs">
296
- Create phase directories from the roadmap:
297
297
 
298
- ```bash
299
- ms-tools create-phase-dirs
300
- ```
298
+ **Update state and commit:**
301
299
 
302
300
  ```bash
303
- git add .planning/phases/
301
+ ms-tools create-phase-dirs
302
+ ms-tools set-last-command "ms:create-roadmap"
303
+ git add .planning/phases/ .planning/STATE.md
304
304
  git commit -m "chore: create phase directories from roadmap"
305
305
  ```
306
306
  </step>
@@ -318,12 +318,6 @@ Requirements and roadmap created:
318
318
  Read `~/.claude/mindsystem/references/routing/next-phase-routing.md` and follow its instructions to present "Next Up" with pre-work context for Phase $START_PHASE.
319
319
  </step>
320
320
 
321
- <step name="update_last_command">
322
- ```bash
323
- ms-tools set-last-command "ms:create-roadmap"
324
- ```
325
- </step>
326
-
327
321
  </process>
328
322
 
329
323
  <success_criteria>
@@ -373,10 +373,11 @@ Task(
373
373
 
374
374
  **`## DESIGN COMPLETE`:**
375
375
 
376
- Commit the design file:
376
+ **Update state and commit:**
377
377
 
378
378
  ```bash
379
- git add .planning/phases/${PHASE}-*/*-DESIGN.md
379
+ ms-tools set-last-command "ms:design-phase $ARGUMENTS"
380
+ git add .planning/phases/${PHASE}-*/*-DESIGN.md .planning/STATE.md
380
381
  git commit -m "docs: create design for phase ${PHASE}"
381
382
  ```
382
383
 
@@ -431,12 +432,6 @@ Read `~/.claude/mindsystem/templates/design-iteration.md` and use the iteration
431
432
  - Verify "what needs improvement" was addressed
432
433
  - Update design version in DESIGN.md frontmatter
433
434
 
434
- ## 9. Update Last Command
435
-
436
- ```bash
437
- ms-tools set-last-command "ms:design-phase $ARGUMENTS"
438
- ```
439
-
440
435
  </process>
441
436
 
442
437
  <success_criteria>
@@ -113,8 +113,8 @@ ms-tools find-phase "$ARGUMENTS"
113
113
  - Write updated REQUIREMENTS.md
114
114
  - Skip if: REQUIREMENTS.md doesn't exist, or phase has no Requirements line
115
115
 
116
- 13. **Commit phase completion**
117
- Bundle all phase metadata updates in one commit:
116
+ 13. **Update state and commit:**
117
+ - Run: `ms-tools set-last-command "ms:execute-phase $ARGUMENTS"`
118
118
  - Stage: `git add .planning/ROADMAP.md .planning/STATE.md`
119
119
  - Stage knowledge files: `git add .planning/knowledge/*.md`
120
120
  - Stage PLAN.md deletions: `git add -u .planning/phases/{phase_dir}/*-PLAN.md`
@@ -123,8 +123,6 @@ ms-tools find-phase "$ARGUMENTS"
123
123
 
124
124
  14. **Offer next steps**
125
125
  - Route to next action (see `<offer_next>`)
126
-
127
- 15. **Update last command:** `ms-tools set-last-command "ms:execute-phase $ARGUMENTS"`
128
126
  </process>
129
127
 
130
128
  <offer_next>
@@ -147,8 +145,10 @@ Then route based on status:
147
145
  | Status | Route |
148
146
  |--------|-------|
149
147
  | `gaps_found` | Route C (gap closure) |
150
- | `passed` + more phases | Route A (next phase) |
151
- | `passed` + last phase | Route B (milestone complete) |
148
+ | `passed` + more phases | Route A (verify + next phase) |
149
+ | `passed` + last phase | Route B (verify + milestone complete) |
150
+
151
+ Thoroughness by default: verify-work is the primary "Next Up" in both routes. Assess skip context per workflow `offer_next` step.
152
152
 
153
153
  ---
154
154
 
@@ -161,19 +161,40 @@ Then route based on status:
161
161
  All {Y} plans finished. Phase goal verified.
162
162
  ```
163
163
 
164
- 2. Read `~/.claude/mindsystem/references/routing/next-phase-routing.md` and follow its instructions to present the "Next Up" section with pre-work context for Phase {Z+1}.
164
+ 2. Assess skip context (see workflow `offer_next` step for criteria).
165
+
166
+ 3. Present verify-work as "Next Up":
167
+ ```
168
+ ## ▶ Next Up
169
+
170
+ `/ms:verify-work {Z}` — validate {phase name} through manual acceptance testing
171
+
172
+ <sub>`/clear` first → fresh context window</sub>
165
173
 
166
- 3. After the "Next Up" section, add:
174
+ {If skip context: "Phase involved only {description} with no user-facing changes — skip if structural verification is sufficient."}
167
175
  ```
176
+
177
+ 4. Read `~/.claude/mindsystem/references/routing/next-phase-routing.md` to determine the most appropriate command for Phase {Z+1}. Present next phase context and options:
178
+ ```
179
+ **Phase {Z+1}: {Name}** — {Goal}
180
+ {If pre-work flagged: brief note about recommendations}
181
+
168
182
  **Also available:**
169
- - `/ms:verify-work {Z}` — manual acceptance testing before continuing
183
+ - `/ms:{suggested} {Z+1}` — {reason}
184
+ - `/ms:plan-phase {Z+1}` — skip pre-work, plan directly
170
185
  ```
171
186
 
172
187
  ---
173
188
 
174
189
  **Route B: Phase verified, milestone complete**
175
190
 
176
- Show phase completion summary, then read `~/.claude/mindsystem/references/routing/milestone-complete-routing.md` and follow its instructions to present the milestone complete section.
191
+ Follow Route A steps 1-3, then present milestone options:
192
+ ```
193
+ **Also available:**
194
+ - `/ms:audit-milestone` — verify requirements, cross-phase integration, E2E flows
195
+ - `/ms:complete-milestone` — skip audit, archive directly
196
+ - `/ms:add-phase <description>` — add another phase first
197
+ ```
177
198
 
178
199
  ---
179
200
 
@@ -58,9 +58,8 @@ Check for .planning/STATE.md - loads context if project already initialized
58
58
  - Agent 4: concerns focus → writes CONCERNS.md
59
59
  4. Wait for agents to complete, collect confirmations (NOT document contents)
60
60
  5. Verify all 7 documents exist with line counts
61
- 6. Commit codebase map
61
+ 6. Update last command and commit codebase map (together with STATE.md)
62
62
  7. Offer next steps (adapts: /ms:new-project if no PROJECT.md, /ms:doctor if PROJECT.md exists)
63
- 8. **Update last command:** `ms-tools set-last-command "ms:map-codebase $ARGUMENTS"`
64
63
  </process>
65
64
 
66
65
  <success_criteria>
@@ -254,14 +254,12 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
254
254
 
255
255
  Keep Accumulated Context (decisions, blockers) from previous milestone.
256
256
 
257
- 17. **Git commit:**
257
+ 17. **Update state and commit:**
258
258
 
259
259
  ```bash
260
+ ms-tools set-last-command "ms:new-milestone $ARGUMENTS"
260
261
  git add .planning/PROJECT.md .planning/STATE.md .planning/MILESTONE-CONTEXT.md
261
- git commit -m "$(cat <<'EOF'
262
- docs: start milestone [Name]
263
- EOF
264
- )"
262
+ git commit -m "docs: start milestone [Name]"
265
263
  ```
266
264
 
267
265
  18. **Calculate next phase number:**
@@ -302,8 +300,6 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
302
300
  ---
303
301
  ```
304
302
 
305
- 20. **Update last command:** `ms-tools set-last-command "ms:new-milestone $ARGUMENTS"`
306
-
307
303
  </process>
308
304
 
309
305
  <success_criteria>
@@ -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
- git add .planning/PROJECT.md .planning/config.json
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
- Stage and commit the removal:
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. Present Results and Commit
288
+ ## 7. Update state and commit:
289
289
 
290
290
  ```bash
291
- git add .planning/MILESTONE-RESEARCH.md
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. Commit and Present
303
+ ## 7. Update state and commit:
304
304
 
305
305
  ```bash
306
- git add .planning/phases/${PHASE}-*/*-RESEARCH.md
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>
@@ -32,7 +32,7 @@ Store the result as `{dev_url}`.
32
32
  If `HAS_STATE`:
33
33
  1. Open app headless at `{dev_url}`
34
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 Spawn
35
+ 3. If still on app pages: auth valid, proceed to Derive Browser Checklist
36
36
 
37
37
  If `NO_STATE` or auth expired:
38
38
  1. Close headless browser
@@ -47,30 +47,97 @@ If `NO_STATE` or auth expired:
47
47
  ```
48
48
  5. If user skips: proceed to code_review, skip browser verification
49
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
+
50
94
  ## Spawn
51
95
 
52
- Spawn the browser verifier agent after auth is established:
96
+ Spawn the browser verifier agent after auth is established and checklist is derived:
53
97
 
54
98
  ```
55
99
  Task(
56
100
  prompt="Run browser verification for phase {phase_number}.
57
101
 
58
102
  Phase directory: {phase_dir}
59
- Phase goal: {phase_goal}
60
- VERIFICATION.md: {verification_path}
61
103
  Dev URL: {dev_url}
62
104
  Auth state: .agent-browser-state.json
63
105
  Screenshots directory: {phase_dir}/screenshots
64
106
 
65
- Read VERIFICATION.md for observable truths. Test browser-testable ones.
66
- Save all screenshots to {phase_dir}/screenshots/.
67
- Fix issues inline. Return structured report.",
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.",
68
118
  subagent_type="ms-browser-verifier"
69
119
  )
70
120
  ```
71
121
 
72
- **After verifier returns:**
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.
73
139
 
74
- If fixes were made, include the report summary in the consolidator prompt (step `consolidate_knowledge`) so browser-discovered patterns are captured in knowledge files.
140
+ **`all_passed`:**
141
+ Report: "Browser verification: all {N} items passed"
75
142
 
76
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
- Allow the user to approve, request edits, or abort. If edits requested, apply them directly to the plan file.
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
- **Commit knowledge updates:**
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
- Continue with current work or check project status:
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
 
@@ -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
- **Commit changes:**
100
+ **Update state and commit:**
101
101
  ```bash
102
- git add .planning/knowledge/*.md
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 "$(cat <<'EOF'
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).
@@ -258,7 +258,8 @@ If "adjust": Return to scope_categories or identify_gaps as appropriate.
258
258
  </step>
259
259
 
260
260
  <step name="git_commit">
261
- Commit requirements:
261
+
262
+ **Update state and commit:**
262
263
 
263
264
  ```bash
264
265
  git add .planning/REQUIREMENTS.md
@@ -300,11 +300,13 @@ Created: .planning/phases/${PHASE}-${SLUG}/${PHASE}-CONTEXT.md
300
300
 
301
301
  </step>
302
302
 
303
- <step name="git_commit">
304
- Commit phase context:
303
+ <step name="commit">
304
+
305
+ **Update state and commit:**
305
306
 
306
307
  ```bash
307
- git add .planning/phases/${PHASE}-${SLUG}/${PHASE}-CONTEXT.md
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>
@@ -300,11 +300,13 @@ ms-tools browser-check
300
300
 
301
301
  **If exit 0 (READY):**
302
302
 
303
- Read `~/.claude/mindsystem/references/browser-verification.md` and follow its Auth Flow and Spawn sections.
303
+ Ensure `$PHASE_DIR/*-SUMMARY.md` files are available (needed for checklist derivation — may already be in context from wave reports).
304
304
 
305
- After verifier returns, if fixes were made:
306
- - Report: "Browser verification: {N} issues found and fixed"
307
- - Include report summary in consolidator prompt (step `consolidate_knowledge`)
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
308
310
 
309
311
  **If exit 1 (MISSING_DEPS):**
310
312
 
@@ -509,23 +511,67 @@ git commit -m "docs: update codebase map after phase {X}"
509
511
  <step name="offer_next">
510
512
  Present next steps based on milestone status.
511
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
+
512
516
  **First, surface user actions:**
513
517
 
514
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".
515
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
+
516
544
  **If more phases remain:**
517
545
 
518
- Read `~/.claude/mindsystem/references/routing/next-phase-routing.md` and follow its instructions to present "Next Up" with pre-work context for the next phase.
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":
519
547
 
520
- After the "Next Up" section, add:
521
548
  ```markdown
549
+ ---
550
+
551
+ **Phase {Z+1}: {Name}** — {Goal}
552
+ {If pre-work flagged: brief note about recommendations}
553
+
522
554
  **Also available:**
523
- - `/ms:verify-work {Z}` — manual acceptance testing before continuing
555
+ - `/ms:{suggested} {Z+1}` — {reason from routing}
556
+ - `/ms:plan-phase {Z+1}` — skip pre-work, plan directly
557
+
558
+ ---
524
559
  ```
525
560
 
561
+ Include the pre-work recommendations table from the routing reference if any pre-work is flagged as "Likely".
562
+
526
563
  **If milestone complete:**
527
564
 
528
- Read `~/.claude/mindsystem/references/routing/milestone-complete-routing.md` and follow its instructions to present the milestone complete section.
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
+ ```
529
575
  </step>
530
576
 
531
577
  </process>
@@ -217,10 +217,13 @@ Continue to commit_codebase_map.
217
217
  </step>
218
218
 
219
219
  <step name="commit_codebase_map">
220
- Commit the codebase map:
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 UAT.md and commit together with STATE.md:**
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,6 +1,6 @@
1
1
  {
2
2
  "name": "mindsystem-cc",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "description": "The engineer's meta-prompting system for Claude Code.",
5
5
  "bin": {
6
6
  "mindsystem-cc": "bin/install.js"