@massu/core 0.4.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/README.md +40 -0
  2. package/agents/massu-architecture-reviewer.md +104 -0
  3. package/agents/massu-blast-radius-analyzer.md +84 -0
  4. package/agents/massu-competitive-scorer.md +126 -0
  5. package/agents/massu-help-sync.md +73 -0
  6. package/agents/massu-migration-writer.md +94 -0
  7. package/agents/massu-output-scorer.md +87 -0
  8. package/agents/massu-pattern-reviewer.md +84 -0
  9. package/agents/massu-plan-auditor.md +170 -0
  10. package/agents/massu-schema-sync-verifier.md +70 -0
  11. package/agents/massu-security-reviewer.md +98 -0
  12. package/agents/massu-ux-reviewer.md +106 -0
  13. package/commands/_shared-preamble.md +53 -23
  14. package/commands/_shared-references/auto-learning-protocol.md +71 -0
  15. package/commands/_shared-references/blast-radius-protocol.md +76 -0
  16. package/commands/_shared-references/security-pre-screen.md +64 -0
  17. package/commands/_shared-references/test-first-protocol.md +87 -0
  18. package/commands/_shared-references/verification-table.md +52 -0
  19. package/commands/massu-article-review.md +343 -0
  20. package/commands/massu-autoresearch/references/eval-runner.md +84 -0
  21. package/commands/massu-autoresearch/references/safety-rails.md +125 -0
  22. package/commands/massu-autoresearch/references/scoring-protocol.md +151 -0
  23. package/commands/massu-autoresearch.md +258 -0
  24. package/commands/massu-batch.md +44 -12
  25. package/commands/massu-bearings.md +42 -8
  26. package/commands/massu-checkpoint.md +588 -0
  27. package/commands/massu-ci-fix.md +2 -2
  28. package/commands/massu-command-health.md +132 -0
  29. package/commands/massu-command-improve.md +232 -0
  30. package/commands/massu-commit.md +205 -44
  31. package/commands/massu-create-plan.md +239 -57
  32. package/commands/massu-data/references/common-queries.md +79 -0
  33. package/commands/massu-data/references/table-guide.md +50 -0
  34. package/commands/massu-data.md +66 -0
  35. package/commands/massu-dead-code.md +29 -34
  36. package/commands/massu-debug/references/auto-learning.md +61 -0
  37. package/commands/massu-debug/references/codegraph-tracing.md +80 -0
  38. package/commands/massu-debug/references/common-shortcuts.md +98 -0
  39. package/commands/massu-debug/references/investigation-phases.md +294 -0
  40. package/commands/massu-debug/references/report-format.md +107 -0
  41. package/commands/massu-debug.md +105 -386
  42. package/commands/massu-docs.md +1 -1
  43. package/commands/massu-full-audit.md +61 -0
  44. package/commands/massu-gap-enhancement-analyzer.md +276 -16
  45. package/commands/massu-golden-path/references/approval-points.md +216 -0
  46. package/commands/massu-golden-path/references/competitive-mode.md +273 -0
  47. package/commands/massu-golden-path/references/error-handling.md +121 -0
  48. package/commands/massu-golden-path/references/phase-0-requirements.md +53 -0
  49. package/commands/massu-golden-path/references/phase-1-plan-creation.md +168 -0
  50. package/commands/massu-golden-path/references/phase-2-implementation.md +397 -0
  51. package/commands/massu-golden-path/references/phase-2.5-gap-analyzer.md +156 -0
  52. package/commands/massu-golden-path/references/phase-3-simplify.md +40 -0
  53. package/commands/massu-golden-path/references/phase-4-commit.md +94 -0
  54. package/commands/massu-golden-path/references/phase-5-push.md +116 -0
  55. package/commands/massu-golden-path/references/phase-5.5-production-verify.md +170 -0
  56. package/commands/massu-golden-path/references/phase-6-completion.md +113 -0
  57. package/commands/massu-golden-path/references/qa-evaluator-spec.md +137 -0
  58. package/commands/massu-golden-path/references/sprint-contract-protocol.md +117 -0
  59. package/commands/massu-golden-path/references/vr-visual-calibration.md +73 -0
  60. package/commands/massu-golden-path.md +114 -848
  61. package/commands/massu-guide.md +72 -69
  62. package/commands/massu-hooks.md +27 -12
  63. package/commands/massu-hotfix.md +221 -144
  64. package/commands/massu-incident.md +49 -20
  65. package/commands/massu-infra-audit.md +187 -0
  66. package/commands/massu-learning-audit.md +211 -0
  67. package/commands/massu-loop/references/auto-learning.md +49 -0
  68. package/commands/massu-loop/references/checkpoint-audit.md +40 -0
  69. package/commands/massu-loop/references/guardrails.md +17 -0
  70. package/commands/massu-loop/references/iteration-structure.md +115 -0
  71. package/commands/massu-loop/references/loop-controller.md +188 -0
  72. package/commands/massu-loop/references/plan-extraction.md +78 -0
  73. package/commands/massu-loop/references/vr-plan-spec.md +140 -0
  74. package/commands/massu-loop-playwright.md +9 -9
  75. package/commands/massu-loop.md +115 -670
  76. package/commands/massu-new-pattern.md +423 -0
  77. package/commands/massu-perf.md +422 -0
  78. package/commands/massu-plan-audit.md +1 -1
  79. package/commands/massu-plan.md +389 -122
  80. package/commands/massu-production-verify.md +433 -0
  81. package/commands/massu-push.md +62 -378
  82. package/commands/massu-recap.md +29 -3
  83. package/commands/massu-rollback.md +613 -0
  84. package/commands/massu-scaffold-hook.md +2 -4
  85. package/commands/massu-scaffold-page.md +2 -3
  86. package/commands/massu-scaffold-router.md +1 -2
  87. package/commands/massu-security.md +619 -0
  88. package/commands/massu-simplify.md +115 -85
  89. package/commands/massu-squirrels.md +2 -2
  90. package/commands/massu-tdd.md +38 -22
  91. package/commands/massu-test.md +3 -3
  92. package/commands/massu-type-mismatch-audit.md +469 -0
  93. package/commands/massu-ui-audit.md +587 -0
  94. package/commands/massu-verify-playwright.md +287 -32
  95. package/commands/massu-verify.md +150 -46
  96. package/dist/cli.js +1451 -1047
  97. package/dist/hooks/post-tool-use.js +75 -6
  98. package/dist/hooks/user-prompt.js +16 -0
  99. package/package.json +6 -2
  100. package/patterns/build-patterns.md +302 -0
  101. package/patterns/component-patterns.md +246 -0
  102. package/patterns/display-patterns.md +185 -0
  103. package/patterns/form-patterns.md +890 -0
  104. package/patterns/integration-testing-checklist.md +445 -0
  105. package/patterns/security-patterns.md +219 -0
  106. package/patterns/testing-patterns.md +569 -0
  107. package/patterns/tool-routing.md +81 -0
  108. package/patterns/ui-patterns.md +371 -0
  109. package/protocols/plan-implementation.md +267 -0
  110. package/protocols/recovery.md +225 -0
  111. package/protocols/verification.md +404 -0
  112. package/reference/command-taxonomy.md +178 -0
  113. package/reference/cr-rules-reference.md +76 -0
  114. package/reference/hook-execution-order.md +148 -0
  115. package/reference/lessons-learned.md +175 -0
  116. package/reference/patterns-quickref.md +208 -0
  117. package/reference/standards.md +135 -0
  118. package/reference/subagents-reference.md +17 -0
  119. package/reference/vr-verification-reference.md +867 -0
  120. package/src/commands/init.ts +27 -0
  121. package/src/commands/install-commands.ts +149 -53
  122. package/src/hooks/post-tool-use.ts +17 -0
  123. package/src/hooks/user-prompt.ts +21 -0
  124. package/src/memory-file-ingest.ts +127 -0
  125. package/src/memory-tools.ts +34 -1
@@ -1,15 +1,18 @@
1
1
  ---
2
2
  name: massu-verify-playwright
3
- description: Open Playwright browser and check pages for console errors, generate report and fix plan
3
+ description: "When user says 'check pages', 'scan for console errors', 'verify playwright', or needs to browser-test pages for console errors and generate a fix plan"
4
4
  allowed-tools: Bash(*), Read(*), Write(*), Edit(*), Grep(*), Glob(*), mcp__plugin_playwright_playwright__*
5
+ disable-model-invocation: true
5
6
  ---
6
7
  name: massu-verify-playwright
7
8
 
9
+ > **Shared rules apply.** Read `.claude/commands/_shared-preamble.md` before proceeding.
10
+
8
11
  # Massu Verify Playwright: Page Console Error Scanner
9
12
 
10
13
  ## Objective
11
14
 
12
- Open a Playwright browser, navigate to pages, collect console errors, and produce a structured report with a categorized fix plan. This command **REPORTS ONLY** -- it never auto-fixes anything.
15
+ Open a Playwright browser, navigate to ALL target pages, collect console errors, and produce a structured report with a categorized fix plan. This command **REPORTS ONLY** -- it never auto-fixes anything.
13
16
 
14
17
  ---
15
18
 
@@ -63,9 +66,10 @@ Check the user's input for `--full` flag. If absent, use Quick mode.
63
66
 
64
67
  ### 0.1 Navigate to Target URL
65
68
 
66
- The user provides the base URL. For the Massu website:
69
+ The user provides the base URL or page list. Navigate to the first page:
70
+
67
71
  ```
68
- Navigate to: http://localhost:3000 (dev) or the production URL
72
+ Navigate to: [user-provided URL or localhost]
69
73
  ```
70
74
 
71
75
  Use `mcp__plugin_playwright_playwright__browser_navigate` to open the URL.
@@ -79,16 +83,33 @@ After navigation, use `mcp__plugin_playwright_playwright__browser_snapshot` to c
79
83
  | Indicator | Meaning | Action |
80
84
  |-----------|---------|--------|
81
85
  | Page content visible | App loaded | PROCEED |
82
- | URL redirected to `/login` | Not logged in | STOP and instruct user |
83
- | Error page or blank | App not running | STOP and report |
86
+ | URL redirected to `/login` or auth page | Not logged in | STOP |
87
+ | Error page or blank | App not running | STOP |
84
88
 
85
89
  ### 0.3 If NOT Ready
86
90
 
87
- **STOP IMMEDIATELY.** Output instructions for the user to prepare the application.
91
+ **STOP IMMEDIATELY.** Output the following message and terminate:
92
+
93
+ ```
94
+ AUTHENTICATION REQUIRED (or APPLICATION NOT READY)
95
+
96
+ The Playwright browser cannot access the target application.
97
+
98
+ Please:
99
+ 1. The Playwright browser window should be open
100
+ 2. Log in to the target application manually in that browser (if auth required)
101
+ 3. Wait until you see the expected page loaded
102
+ 4. Re-run: /massu-verify-playwright
103
+
104
+ The command cannot proceed without access to the target pages.
105
+ ```
106
+
107
+ **Do NOT attempt to automate login. Do NOT proceed without a loaded page.**
88
108
 
89
109
  ### 0.4 If Ready
90
110
 
91
111
  Report to the user:
112
+
92
113
  ```
93
114
  Application confirmed. Starting page scan...
94
115
  Mode: [Quick / Full]
@@ -101,9 +122,10 @@ Pages to check: [N]
101
122
 
102
123
  ### 1.1 Page Lists
103
124
 
104
- The user provides page lists, OR use the website sitemap. For the Massu website, common pages include:
125
+ The user provides page lists, OR use the application's sitemap/route analysis.
126
+
127
+ #### Quick Mode Pages (example)
105
128
 
106
- #### Quick Mode (default)
107
129
  ```
108
130
  /
109
131
  /pricing
@@ -112,39 +134,56 @@ The user provides page lists, OR use the website sitemap. For the Massu website,
112
134
  /blog
113
135
  ```
114
136
 
115
- #### Full Mode
116
- All pages discovered from sitemap or route analysis.
137
+ #### Full Mode Pages
138
+
139
+ All pages discovered from sitemap, route analysis, or user-provided list.
117
140
 
118
141
  ### 1.2 Per-Page Procedure
119
142
 
120
143
  For EACH page in the list, execute these steps in order:
121
144
 
122
145
  **Step 1: Navigate**
123
- Use `mcp__plugin_playwright_playwright__browser_navigate` to go to the page URL.
146
+
147
+ ```
148
+ Use mcp__plugin_playwright_playwright__browser_navigate to go to:
149
+ {base_url}{page_path}
150
+ ```
124
151
 
125
152
  **Step 2: Wait for Loading to Complete**
126
- Use `mcp__plugin_playwright_playwright__browser_wait_for` or a brief pause (up to 10 seconds).
153
+
154
+ Use `mcp__plugin_playwright_playwright__browser_wait_for` or a brief pause (up to 10 seconds) to allow:
155
+ - Loading spinners to disappear
156
+ - Data to populate
157
+ - Any lazy-loaded components to render
158
+
159
+ If the page does not finish loading within 10 seconds, record it as a timeout and proceed.
127
160
 
128
161
  **Step 3: Collect Console Messages**
162
+
129
163
  Use `mcp__plugin_playwright_playwright__browser_console_messages` to retrieve ALL console messages.
130
- Filter for messages at the **error** level only.
164
+
165
+ Filter for messages at the **error** level only. Ignore warnings, info, and debug messages.
131
166
 
132
167
  **Step 4: Record Results**
133
168
 
169
+ For each page, record:
170
+
134
171
  | Field | Value |
135
172
  |-------|-------|
136
- | Page URL | The full path |
173
+ | Page URL | The full path (e.g., `/docs/getting-started`) |
137
174
  | Status | `clean` / `errors` / `timeout` / `404` |
138
175
  | Error Count | Number of console errors |
139
176
  | Error Messages | Full text of each error message |
140
177
  | Load Time | Approximate (fast / slow / timeout) |
141
178
 
142
179
  **Step 5: Move to Next Page**
180
+
143
181
  Proceed to the next page in the list. Do NOT stop on errors.
144
182
 
145
183
  ### 1.3 Progress Reporting
146
184
 
147
- After every 10 pages (or after all pages if fewer than 10 remain):
185
+ After every 10 pages (or after all pages if fewer than 10 remain), provide a brief progress update to the user:
186
+
148
187
  ```
149
188
  Progress: [X]/[TOTAL] pages checked | [Y] clean | [Z] with errors
150
189
  ```
@@ -176,22 +215,66 @@ Progress: [X]/[TOTAL] pages checked | [Y] clean | [Z] with errors
176
215
 
177
216
  ### 2.2 Error Categories
178
217
 
218
+ Categorize EVERY console error into one of these categories:
219
+
179
220
  | Category | Pattern to Match | Priority |
180
221
  |----------|-----------------|----------|
181
222
  | **API 500** | `500`, `Internal Server Error`, `failed to fetch` | P0 |
182
223
  | **React Crash** | `Uncaught Error`, `Cannot read properties of`, `TypeError` | P0 |
183
224
  | **Missing Module** | `is not defined`, `Cannot find module` | P1 |
225
+ | **i18n Missing** | `Missing message`, `MISSING_MESSAGE`, `IntlError` | P2 |
226
+ | **Realtime** | `realtime`, `subscription`, `websocket`, `channel` | P2 |
184
227
  | **404 Resource** | `404`, `Not Found`, failed resource loads | P2 |
185
228
  | **Deprecation** | `deprecated`, `will be removed` | P3 |
186
229
  | **Other** | Anything not matching above | P2 |
187
230
 
188
- ### 2.3 Per-Page Error Details
231
+ ### 2.3 Category Summary Table
232
+
233
+ ```markdown
234
+ ### Errors by Category
235
+
236
+ | Category | Count | Priority | Example |
237
+ |----------|-------|----------|---------|
238
+ | API 500 | [N] | P0 | [first error snippet] |
239
+ | React Crash | [N] | P0 | [first error snippet] |
240
+ | Missing Module | [N] | P1 | [first error snippet] |
241
+ | i18n Missing | [N] | P2 | [first error snippet] |
242
+ | Realtime | [N] | P2 | [first error snippet] |
243
+ | 404 Resource | [N] | P2 | [first error snippet] |
244
+ | Deprecation | [N] | P3 | [first error snippet] |
245
+ | Other | [N] | P2 | [first error snippet] |
246
+ ```
189
247
 
190
- For EACH page that had errors, produce a detail block with error count, category, priority, and full message.
248
+ ### 2.4 Per-Page Error Details
249
+
250
+ For EACH page that had errors, produce a detail block:
251
+
252
+ ```markdown
253
+ ### /docs/getting-started
191
254
 
192
- ### 2.4 Clean Pages List
255
+ **Status**: errors
256
+ **Error Count**: [N]
257
+ **Load Time**: fast / slow / timeout
193
258
 
194
- List all pages with zero errors.
259
+ #### Errors
260
+
261
+ | # | Category | Priority | Message |
262
+ |---|----------|----------|---------|
263
+ | 1 | Missing Module | P1 | Module 'lodash' is not defined |
264
+ | 2 | API 500 | P0 | Failed to fetch: /api/data |
265
+ ```
266
+
267
+ ### 2.5 Clean Pages List
268
+
269
+ ```markdown
270
+ ### Clean Pages (0 Errors)
271
+
272
+ | # | Page |
273
+ |---|------|
274
+ | 1 | / |
275
+ | 2 | /pricing |
276
+ | ... | ... |
277
+ ```
195
278
 
196
279
  ---
197
280
 
@@ -199,20 +282,80 @@ List all pages with zero errors.
199
282
 
200
283
  ### 3.1 Fix Plan Structure
201
284
 
202
- For each unique error (deduplicated across pages), propose a fix with:
203
- - Pages affected
204
- - Full error message
205
- - Category and priority
206
- - Likely root cause
207
- - Proposed fix
208
- - Files to investigate
209
- - Estimated effort
285
+ For each unique error (deduplicated across pages), propose a fix:
286
+
287
+ ```markdown
288
+ ## Fix Plan
289
+
290
+ ### Priority Levels
291
+
292
+ | Priority | Definition | Action |
293
+ |----------|------------|--------|
294
+ | **P0** | Crashes, 500 errors, data loss risk | Fix immediately |
295
+ | **P1** | Missing features, broken functionality | Fix this sprint |
296
+ | **P2** | Console noise, missing translations | Fix when convenient |
297
+ | **P3** | Deprecation warnings, cosmetic | Backlog |
298
+
299
+ ---
300
+
301
+ ### P0 Fixes (Critical)
302
+
303
+ #### FIX-001: [Error Description]
304
+
305
+ - **Pages Affected**: /docs, /blog
306
+ - **Error**: `[Full error message]`
307
+ - **Category**: API 500
308
+ - **Likely Root Cause**: [Analysis based on error message and codebase knowledge]
309
+ - **Proposed Fix**: [Description of fix]
310
+ - **Files to Investigate**:
311
+ - `packages/core/src/[module].ts` - Check handler
312
+ - `src/app/[path]/page.tsx` - Check component
313
+ - **Estimated Effort**: Small / Medium / Large
314
+
315
+ ---
316
+
317
+ ### P1 Fixes (High)
318
+
319
+ #### FIX-002: [Error Description]
320
+
321
+ [Same structure as above]
322
+
323
+ ---
324
+
325
+ ### P2 Fixes (Medium)
326
+
327
+ #### FIX-003: [Error Description]
328
+
329
+ [Same structure as above]
330
+
331
+ ---
332
+
333
+ ### P3 Fixes (Low)
334
+
335
+ #### FIX-004: [Error Description]
336
+
337
+ [Same structure as above]
338
+ ```
210
339
 
211
340
  ### 3.2 Deduplication Rules
212
341
 
213
- - Same error on multiple pages = ONE fix entry listing all affected pages
214
- - Multiple errors with same root cause = ONE grouped fix entry
215
- - Always list total occurrence count
342
+ - If the same error appears on multiple pages, create ONE fix entry listing all affected pages.
343
+ - If multiple errors share the same root cause (e.g., all i18n errors from same namespace), group them into ONE fix entry.
344
+ - Always list the total count of occurrences.
345
+
346
+ ### 3.3 Fix Plan Metadata
347
+
348
+ ```markdown
349
+ ### Fix Plan Summary
350
+
351
+ | Priority | Fix Count | Estimated Effort |
352
+ |----------|-----------|-----------------|
353
+ | P0 | [N] | [hours/days] |
354
+ | P1 | [N] | [hours/days] |
355
+ | P2 | [N] | [hours/days] |
356
+ | P3 | [N] | [hours/days] |
357
+ | **Total** | **[N]** | **[total]** |
358
+ ```
216
359
 
217
360
  ---
218
361
 
@@ -221,11 +364,40 @@ For each unique error (deduplicated across pages), propose a fix with:
221
364
  ### 4.1 Save the Plan Document
222
365
 
223
366
  Save the complete report + fix plan to:
367
+
224
368
  ```
225
369
  docs/plans/[YYYY-MM-DD]-playwright-verification-fixes.md
226
370
  ```
227
371
 
228
- ### 4.2 Present to User
372
+ The document should contain:
373
+ 1. The full report (Phase 2 output)
374
+ 2. The full fix plan (Phase 3 output)
375
+ 3. A header with metadata
376
+
377
+ ### 4.2 Document Header
378
+
379
+ ```markdown
380
+ # Playwright Page Verification Report
381
+
382
+ **Generated**: [YYYY-MM-DD HH:MM]
383
+ **Mode**: [Quick / Full]
384
+ **Pages Checked**: [N]
385
+ **Total Errors Found**: [N]
386
+ **Fix Plan Items**: [N]
387
+
388
+ ## Status: AWAITING REVIEW
389
+
390
+ > This report was generated by `/massu-verify-playwright`.
391
+ > Review the fix plan below and approve/modify before executing fixes.
392
+ >
393
+ > To execute approved fixes, run:
394
+ > - `/massu-loop` with this plan for systematic implementation
395
+ > - `/massu-hotfix` for individual P0 fixes that need immediate attention
396
+ ```
397
+
398
+ ### 4.3 Present to User
399
+
400
+ After saving, present to the user:
229
401
 
230
402
  1. The summary table (pages checked, error counts)
231
403
  2. The category breakdown
@@ -248,6 +420,8 @@ docs/plans/[YYYY-MM-DD]-playwright-verification-fixes.md
248
420
 
249
421
  ## ERROR HANDLING
250
422
 
423
+ ### Page Navigation Failures
424
+
251
425
  | Scenario | Action |
252
426
  |----------|--------|
253
427
  | Page returns 404 | Record as `404`, continue to next page |
@@ -255,9 +429,19 @@ docs/plans/[YYYY-MM-DD]-playwright-verification-fixes.md
255
429
  | Page redirects to /login | Session expired. STOP and report to user. |
256
430
  | Network error | Retry once. If still fails, record and continue. |
257
431
 
432
+ ### Session Expiration Mid-Scan
433
+
434
+ If at any point during the scan, the browser is redirected to `/login`:
435
+
436
+ 1. STOP the scan immediately
437
+ 2. Report how many pages were completed
438
+ 3. Save partial results
439
+ 4. Tell the user to log in again and re-run
440
+
258
441
  ### Playwright Not Available
259
442
 
260
443
  If Playwright MCP tools are not available:
444
+
261
445
  ```
262
446
  ERROR: Playwright MCP tools are not available in this session.
263
447
 
@@ -266,6 +450,77 @@ Please ensure the Playwright MCP server is running and try again.
266
450
 
267
451
  ---
268
452
 
453
+ ## REPORT FORMAT TEMPLATE
454
+
455
+ The complete saved document should follow this structure:
456
+
457
+ ```markdown
458
+ # Playwright Page Verification Report
459
+
460
+ **Generated**: [YYYY-MM-DD HH:MM]
461
+ **Mode**: [Quick / Full]
462
+ **Pages Checked**: [N]
463
+ **Total Errors Found**: [N]
464
+ **Fix Plan Items**: [N]
465
+
466
+ ## Status: AWAITING REVIEW
467
+
468
+ ---
469
+
470
+ ## 1. Summary
471
+
472
+ [Phase 2.1 Summary Table]
473
+
474
+ ## 2. Errors by Category
475
+
476
+ [Phase 2.3 Category Summary Table]
477
+
478
+ ## 3. Pages with Errors
479
+
480
+ [Phase 2.4 Per-Page Error Details - one section per error page]
481
+
482
+ ## 4. Clean Pages
483
+
484
+ [Phase 2.5 Clean Pages List]
485
+
486
+ ## 5. Fix Plan
487
+
488
+ [Phase 3 Fix Plan with all priority levels]
489
+
490
+ ## 6. Fix Plan Summary
491
+
492
+ [Phase 3.3 Fix Plan Metadata]
493
+
494
+ ---
495
+
496
+ ## Next Steps
497
+
498
+ - Review this plan and approve/modify fixes
499
+ - Run `/massu-loop` with this plan for systematic implementation
500
+ - Run `/massu-hotfix` for individual P0 fixes needing immediate attention
501
+ - Re-run `/massu-verify-playwright` after fixes to verify resolution
502
+ ```
503
+
504
+ ---
505
+
506
+ ## AUTO-LEARNING PROTOCOL (MANDATORY after every fix/finding)
507
+
508
+ **After EVERY fix or finding, the system MUST automatically learn. This is NOT optional.**
509
+
510
+ ### Step 1: Ingest into Memory
511
+ Use `mcp__massu-codegraph__massu_memory_ingest` with type="bugfix"|"pattern", description of what was found/fixed, affected files, and importance (5=security/data, 3=build/type, 2=cosmetic).
512
+
513
+ ### Step 2: Record Correct vs Incorrect Pattern
514
+ Update session state with the WRONG vs CORRECT pattern discovered.
515
+
516
+ ### Step 3: Add to Pattern Scanner (if grep-able)
517
+ If the bad pattern is detectable by grep, add check to `scripts/massu-pattern-scanner.sh`.
518
+
519
+ ### Step 4: Search Codebase-Wide (CR-9)
520
+ `grep -rn "[bad_pattern]" packages/core/src/ src/` - fix ALL instances of the same issue.
521
+
522
+ ---
523
+
269
524
  ## START NOW
270
525
 
271
526
  1. Check user input for `--full` flag to determine mode