@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
@@ -0,0 +1,433 @@
1
+ ---
2
+ name: massu-production-verify
3
+ description: "When user says 'verify production', 'is it working', 'production check', or after a deploy to verify features are actually working in production — not just deployed"
4
+ allowed-tools: Bash(*), Read(*), Grep(*), Glob(*), mcp__supabase__NEW_PROD__*, mcp__supabase__DEV__*, mcp__plugin_playwright_playwright__*, mcp__claude_ai_Vercel__get_deployment, mcp__claude_ai_Vercel__get_runtime_logs, mcp__claude_ai_Vercel__list_deployments, mcp__claude_ai_Vercel__web_fetch_vercel_url
5
+ ---
6
+ name: massu-production-verify
7
+
8
+ > **Shared rules apply.** Read `.claude/commands/_shared-preamble.md` before proceeding. CR-14, CR-5, CR-12 enforced.
9
+
10
+ # Massu Production Verify: Confirm Features Work in Production
11
+
12
+ ## Core Principle
13
+
14
+ **"Deployed" is NOT "Working." A feature is only complete when real users can use it in production and it produces real results.**
15
+
16
+ Code existing, builds passing, and deploys succeeding prove NOTHING about whether the feature actually works for users. This command verifies operational correctness — the last mile that all other verification misses.
17
+
18
+ ---
19
+
20
+ ## NON-NEGOTIABLE RULES
21
+
22
+ - **Proof from production, not dev** — queries must hit NEW PROD database, URLs must hit production deployment
23
+ - **Data, not structure** — verifying a table exists is NOT the same as verifying data flows through it
24
+ - **End-to-end, not component** — verify the full chain: trigger -> process -> store -> display
25
+ - **Every feature, every deploy** — no exceptions for "simple" changes
26
+ - **Deferred items tracked** — async verifications get a checklist with deadlines, picked up by `/massu-bearings`
27
+
28
+ ---
29
+
30
+ ## INPUT MODES
31
+
32
+ | Mode | Input | Behavior |
33
+ |------|-------|----------|
34
+ | **Auto-detect** | `/massu-production-verify` | Reads recent commits + plan to determine what to verify |
35
+ | **Specific feature** | `/massu-production-verify "calendar sync"` | Verify specific feature |
36
+ | **From plan** | `/massu-production-verify /path/to/plan.md` | Verify all items from a plan |
37
+ | **Deferred check** | `/massu-production-verify --deferred` | Re-check pending deferred verifications only |
38
+
39
+ ---
40
+
41
+ ## PHASE 1: DETERMINE WHAT TO VERIFY
42
+
43
+ ### 1.1 Identify Recent Changes
44
+
45
+ ```bash
46
+ # What was just deployed?
47
+ git log origin/main~5..origin/main --oneline --no-merges
48
+ git diff origin/main~5..origin/main --stat
49
+ ```
50
+
51
+ ### 1.2 Categorize Changes
52
+
53
+ For each changed file/feature, categorize the verification type:
54
+
55
+ | Change Type | Verification Method | Timing |
56
+ |------------|--------------------| -------|
57
+ | **UI page/component** | Playwright: navigate, snapshot, interact | Immediate |
58
+ | **API endpoint** | HTTP request to production URL | Immediate |
59
+ | **Database schema** | Query NEW PROD for table/column existence + sample data | Immediate |
60
+ | **tRPC procedure** | Verify via API or UI that calls it | Immediate |
61
+ | **Cron job** | Query DB for evidence of cron execution | Deferred (wait for next cycle) |
62
+ | **Webhook handler** | Trigger event, verify handler processed it | Deferred (trigger + wait) |
63
+ | **External API integration** | Verify data from external source appears in DB | Deferred (wait for sync) |
64
+ | **Email/notification** | Verify delivery log or recipient confirmation | Deferred (wait for send) |
65
+ | **Background job** | Verify queue processed and results stored | Deferred (wait for processing) |
66
+ | **Feature flag** | Verify flag exists AND feature behaves differently when toggled | Immediate |
67
+ | **Environment variable** | Verify var exists on Vercel AND code reads it | Immediate |
68
+
69
+ ### 1.3 Build Verification Matrix
70
+
71
+ ```markdown
72
+ ## Production Verification Matrix
73
+
74
+ | # | Feature/Change | Type | Method | Timing | Status |
75
+ |---|----------------|------|--------|--------|--------|
76
+ | PV-001 | [description] | UI | Playwright snapshot | Immediate | PENDING |
77
+ | PV-002 | [description] | Cron | DB query for last_run | Deferred (15min) | PENDING |
78
+ | PV-003 | [description] | API | HTTP GET /api/... | Immediate | PENDING |
79
+ ```
80
+
81
+ ---
82
+
83
+ ## PHASE 2: IMMEDIATE VERIFICATIONS
84
+
85
+ Run all immediate verifications now. Each must produce PROOF.
86
+
87
+ ### 2.1 Deployment Health
88
+
89
+ ```bash
90
+ # Verify deployment is live
91
+ # Use Vercel MCP to check deployment status
92
+ ```
93
+
94
+ Check via Vercel MCP tools:
95
+ - `list_deployments` — confirm latest deployment is READY
96
+ - `get_runtime_logs` — check for startup errors or crashes
97
+ - `web_fetch_vercel_url` — hit the production URL and verify 200 response
98
+
99
+ ### 2.2 UI Verification (Playwright)
100
+
101
+ For each UI change, use Playwright MCP:
102
+
103
+ ```
104
+ 1. browser_navigate to production URL
105
+ 2. browser_snapshot — verify page renders without errors
106
+ 3. browser_console_messages — check for JS errors
107
+ 4. browser_click / browser_fill_form — test interactive elements
108
+ 5. browser_snapshot — verify result of interaction
109
+ ```
110
+
111
+ **Verification criteria:**
112
+ - Page loads without errors
113
+ - Key UI elements are visible (not just existing in DOM)
114
+ - Interactive elements respond to user actions
115
+ - Data displays correctly (not empty, not placeholder, not "undefined")
116
+
117
+ ### 2.3 API/Endpoint Verification
118
+
119
+ For each API endpoint or tRPC procedure:
120
+
121
+ ```bash
122
+ # Direct API test (if public endpoint)
123
+ curl -s -o /dev/null -w "%{http_code}" https://[production-url]/api/[endpoint]
124
+ # Expected: 200
125
+
126
+ # For tRPC procedures: verify via UI that calls them
127
+ # Navigate to the page that uses the procedure, verify data loads
128
+ ```
129
+
130
+ ### 2.4 Database Verification
131
+
132
+ Query NEW PROD to verify data exists and flows correctly:
133
+
134
+ ```sql
135
+ -- Verify table has recent data (not just that it exists)
136
+ SELECT COUNT(*), MAX(created_at), MIN(created_at)
137
+ FROM [table_name]
138
+ WHERE created_at > NOW() - INTERVAL '24 hours';
139
+
140
+ -- Verify specific feature data
141
+ -- Example: calendar sync should have recent events
142
+ SELECT COUNT(*) FROM calendar_events
143
+ WHERE synced_at > NOW() - INTERVAL '1 hour';
144
+
145
+ -- Verify cron execution log
146
+ SELECT * FROM cron_execution_log
147
+ WHERE job_name = '[cron_name]'
148
+ ORDER BY executed_at DESC LIMIT 3;
149
+ ```
150
+
151
+ ### 2.5 Environment & Config Verification
152
+
153
+ ```bash
154
+ # Verify feature flags are set correctly on production
155
+ # Query the feature_flags table on NEW PROD
156
+ ```
157
+
158
+ ```sql
159
+ -- Feature flags
160
+ SELECT key, enabled, description
161
+ FROM feature_flags
162
+ WHERE key IN ('[relevant_flags]');
163
+
164
+ -- Verify config values match what code expects (VR-DATA)
165
+ SELECT id, [config_column]
166
+ FROM [config_table]
167
+ WHERE [relevant_filter]
168
+ LIMIT 5;
169
+ ```
170
+
171
+ ### 2.6 Integration Chain Verification
172
+
173
+ For features involving multiple systems, verify the FULL chain:
174
+
175
+ ```markdown
176
+ ### Integration Chain: [Feature Name]
177
+
178
+ | Step | System | Verification | Proof | Status |
179
+ |------|--------|-------------|-------|--------|
180
+ | 1 | Trigger | [how triggered] | [proof] | PASS/FAIL |
181
+ | 2 | Process | [how processed] | [proof] | PASS/FAIL |
182
+ | 3 | Store | [where stored] | [proof] | PASS/FAIL |
183
+ | 4 | Display | [where displayed] | [proof] | PASS/FAIL |
184
+ ```
185
+
186
+ ---
187
+
188
+ ## PHASE 3: DEFERRED VERIFICATIONS
189
+
190
+ For items that can't be verified immediately (crons, webhooks, async jobs):
191
+
192
+ ### 3.1 Generate Deferred Checklist
193
+
194
+ Write to `session-state/deferred-verifications.md`:
195
+
196
+ ```markdown
197
+ # Deferred Production Verifications
198
+
199
+ **Generated**: [YYYY-MM-DD HH:MM PST]
200
+ **Deploy Commit**: [hash]
201
+ **Feature**: [name]
202
+
203
+ ## Pending Verifications
204
+
205
+ ### DV-001: [Description]
206
+ - **Type**: Cron / Webhook / External API / Background Job
207
+ - **Expected By**: [YYYY-MM-DD HH:MM PST] (e.g., next cron cycle)
208
+ - **Verification Query**:
209
+ ```sql
210
+ SELECT COUNT(*) FROM [table]
211
+ WHERE [condition] AND created_at > '[deploy_timestamp]';
212
+ ```
213
+ - **Expected Result**: Count > 0 (or specific condition)
214
+ - **Status**: PENDING
215
+ - **Checked**: (not yet)
216
+
217
+ ### DV-002: [Description]
218
+ ...
219
+
220
+ ## Verification History
221
+
222
+ | # | Description | Expected By | Checked At | Result | Status |
223
+ |---|-------------|-------------|------------|--------|--------|
224
+ ```
225
+
226
+ ### 3.2 Set Expectations
227
+
228
+ For each deferred item, calculate when it should be verifiable:
229
+
230
+ | Trigger Type | Typical Wait Time | Check After |
231
+ |-------------|-------------------|-------------|
232
+ | Cron (every 15 min) | 15-20 minutes | Next cron cycle + buffer |
233
+ | Cron (hourly) | 1-2 hours | Next scheduled run |
234
+ | Cron (daily) | Up to 24 hours | Next scheduled run |
235
+ | Webhook | Minutes (after trigger) | Trigger + 5 min |
236
+ | External API sync | Varies (check sync interval) | Next sync cycle |
237
+ | Email delivery | 1-5 minutes | Send + 5 min |
238
+ | Background job | Varies (check queue config) | Submit + processing time |
239
+
240
+ ---
241
+
242
+ ## PHASE 4: RESULTS & REPORT
243
+
244
+ ### 4.1 Production Verification Report
245
+
246
+ ```
247
+ ===============================================================================
248
+ PRODUCTION VERIFICATION REPORT
249
+ ===============================================================================
250
+
251
+ Deploy: [commit hash] — [commit message]
252
+ Verified: [YYYY-MM-DD HH:MM PST]
253
+
254
+ IMMEDIATE VERIFICATIONS:
255
+ --------------------------------------------------------------------------
256
+ | # | Feature | Method | Result | Proof |
257
+ |---|---------|--------|--------|-------|
258
+ | PV-001 | [desc] | Playwright | PASS | Page loads, data visible |
259
+ | PV-002 | [desc] | DB Query | PASS | 47 rows, latest 2min ago |
260
+ | PV-003 | [desc] | API Call | PASS | 200 OK, valid response |
261
+ --------------------------------------------------------------------------
262
+ Immediate: [X]/[Y] PASSED
263
+
264
+ DEFERRED VERIFICATIONS:
265
+ --------------------------------------------------------------------------
266
+ | # | Feature | Type | Check After | Status |
267
+ |---|---------|------|-------------|--------|
268
+ | DV-001 | [desc] | Cron (15min) | [time] | PENDING |
269
+ | DV-002 | [desc] | Webhook | [time] | PENDING |
270
+ --------------------------------------------------------------------------
271
+ Deferred: [N] items pending (saved to session-state/deferred-verifications.md)
272
+
273
+ OVERALL STATUS: [VERIFIED / PARTIALLY VERIFIED / FAILED]
274
+ - Immediate checks: [X]/[Y] PASSED
275
+ - Deferred checks: [N] PENDING (will be surfaced in /massu-bearings)
276
+ ===============================================================================
277
+ ```
278
+
279
+ ### 4.2 Status Definitions
280
+
281
+ | Status | Meaning |
282
+ |--------|---------|
283
+ | **VERIFIED** | All immediate checks PASS, no deferred items |
284
+ | **VERIFIED + DEFERRED** | All immediate checks PASS, deferred items pending |
285
+ | **PARTIALLY VERIFIED** | Some immediate checks PASS, others FAIL or pending |
286
+ | **FAILED** | Any immediate check FAILED |
287
+
288
+ ### 4.3 Update Plan Status (if from plan)
289
+
290
+ If verifying a plan, update the plan document:
291
+
292
+ ```markdown
293
+ # PRODUCTION VERIFICATION
294
+
295
+ **Status**: VERIFIED / VERIFIED + DEFERRED / FAILED
296
+ **Verified At**: [timestamp]
297
+ **Deploy Commit**: [hash]
298
+
299
+ | # | Feature | Production Status | Proof |
300
+ |---|---------|-------------------|-------|
301
+ | 1 | [feature] | WORKING | [query result] |
302
+ | 2 | [feature] | PENDING (cron) | Check after [time] |
303
+ ```
304
+
305
+ ---
306
+
307
+ ## PHASE 5: FOLLOW-UP
308
+
309
+ ### 5.1 If ANY Immediate Check Fails
310
+
311
+ 1. Diagnose the failure
312
+ 2. Fix the root cause
313
+ 3. Commit and push the fix
314
+ 4. Re-run production verification
315
+ 5. Do NOT mark feature as complete until production verification passes
316
+
317
+ ### 5.2 Deferred Item Follow-Up
318
+
319
+ Deferred items are picked up by `/massu-bearings` in the next session:
320
+ - Bearings reads `session-state/deferred-verifications.md`
321
+ - Surfaces pending items with their verification queries
322
+ - User can run `/massu-production-verify --deferred` to check them
323
+
324
+ When checking deferred items:
325
+ 1. Run each verification query
326
+ 2. Update status in `deferred-verifications.md`
327
+ 3. If PASS: mark VERIFIED with timestamp
328
+ 4. If FAIL: investigate, fix, and re-verify
329
+ 5. When ALL items verified: update plan status to COMPLETE -- PRODUCTION VERIFIED
330
+
331
+ ---
332
+
333
+ ## COMMON VERIFICATION PATTERNS
334
+
335
+ ### Cron Job Verification
336
+
337
+ ```sql
338
+ -- 1. Check if cron ran since deploy
339
+ SELECT job_name, last_run, status
340
+ FROM cron_execution_log
341
+ WHERE job_name = '[name]'
342
+ AND last_run > '[deploy_timestamp]';
343
+
344
+ -- 2. Check if cron produced data
345
+ SELECT COUNT(*) FROM [target_table]
346
+ WHERE created_at > '[deploy_timestamp]';
347
+
348
+ -- 3. Check Vercel cron logs
349
+ -- Use get_runtime_logs MCP tool filtered to cron route
350
+ ```
351
+
352
+ ### Gmail/Calendar Sync Verification
353
+
354
+ ```sql
355
+ -- Check sync status per user
356
+ SELECT u.email, gs.last_sync_at, gs.status, gs.error_message
357
+ FROM gmail_sync_status gs
358
+ JOIN user_profiles u ON u.id = gs.user_id
359
+ ORDER BY gs.last_sync_at DESC;
360
+
361
+ -- Check if new emails were synced
362
+ SELECT COUNT(*) FROM gmail_messages
363
+ WHERE synced_at > '[deploy_timestamp]';
364
+
365
+ -- Check calendar events
366
+ SELECT COUNT(*) FROM calendar_events
367
+ WHERE synced_at > '[deploy_timestamp]';
368
+ ```
369
+
370
+ ### Webhook Verification
371
+
372
+ ```sql
373
+ -- Check webhook delivery log
374
+ SELECT webhook_type, status, created_at, error_message
375
+ FROM webhook_delivery_log
376
+ WHERE created_at > '[deploy_timestamp]'
377
+ ORDER BY created_at DESC LIMIT 10;
378
+ ```
379
+
380
+ ### Feature Flag Verification
381
+
382
+ ```sql
383
+ -- Verify flag state
384
+ SELECT key, enabled, metadata
385
+ FROM feature_flags
386
+ WHERE key = '[flag_name]';
387
+ ```
388
+
389
+ Then use Playwright to:
390
+ 1. Navigate to the feature page
391
+ 2. Verify behavior matches flag state (enabled = visible, disabled = hidden)
392
+
393
+ ---
394
+
395
+ ## QUALITY SCORING (silent)
396
+
397
+ After verification completes, append one JSONL line to `.claude/metrics/command-scores.jsonl`:
398
+
399
+ | Check | Pass condition |
400
+ |-------|---------------|
401
+ | `deployment_verified` | Production deployment is READY |
402
+ | `immediate_checks_passed` | All immediate PV-* items PASS |
403
+ | `deferred_items_tracked` | All deferred items saved with queries + deadlines |
404
+ | `db_data_verified` | At least one production DB query confirmed real data |
405
+ | `full_chain_verified` | At least one end-to-end chain verified |
406
+
407
+ ```json
408
+ {"command":"massu-production-verify","timestamp":"ISO8601","scores":{"deployment_verified":true,"immediate_checks_passed":true,"deferred_items_tracked":true,"db_data_verified":true,"full_chain_verified":true},"pass_rate":"5/5","input_summary":"[feature]"}
409
+ ```
410
+
411
+ ---
412
+
413
+ ## GOTCHAS
414
+
415
+ - **Never verify against DEV** — production verification means NEW PROD database and production URL
416
+ - **Don't confuse schema with data** — a table existing is meaningless if no data flows through it
417
+ - **Cron timing** — crons run on Vercel's schedule, not instantly. Check `vercel.json` for the schedule
418
+ - **Auth-gated pages** — some pages require login. Use Playwright to handle auth flow or verify via API
419
+ - **Rate limits** — don't hammer production endpoints. One verification request per endpoint is enough
420
+ - **Read-only on production** — NEVER write/modify production data during verification. Query only.
421
+ - **Time zones** — all timestamps in PST (user's timezone). Database may store UTC — convert in queries.
422
+
423
+ ---
424
+
425
+ ## START NOW
426
+
427
+ 1. **Determine scope**: Auto-detect from git log, or use provided feature/plan
428
+ 2. **Build verification matrix**: Categorize all changes into immediate/deferred
429
+ 3. **Run immediate verifications**: Playwright, DB queries, API checks
430
+ 4. **Generate deferred checklist**: Save to `session-state/deferred-verifications.md`
431
+ 5. **Produce report**: Show all results with proof
432
+ 6. **Update plan status**: If verifying plan work
433
+ 7. **Surface failures**: If anything fails, diagnose and fix immediately