@massu/core 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -0
- package/agents/massu-architecture-reviewer.md +104 -0
- package/agents/massu-blast-radius-analyzer.md +84 -0
- package/agents/massu-competitive-scorer.md +126 -0
- package/agents/massu-help-sync.md +73 -0
- package/agents/massu-migration-writer.md +94 -0
- package/agents/massu-output-scorer.md +87 -0
- package/agents/massu-pattern-reviewer.md +84 -0
- package/agents/massu-plan-auditor.md +170 -0
- package/agents/massu-schema-sync-verifier.md +70 -0
- package/agents/massu-security-reviewer.md +98 -0
- package/agents/massu-ux-reviewer.md +106 -0
- package/commands/_shared-preamble.md +53 -23
- package/commands/_shared-references/auto-learning-protocol.md +71 -0
- package/commands/_shared-references/blast-radius-protocol.md +76 -0
- package/commands/_shared-references/security-pre-screen.md +64 -0
- package/commands/_shared-references/test-first-protocol.md +87 -0
- package/commands/_shared-references/verification-table.md +55 -0
- package/commands/massu-article-review.md +343 -0
- package/commands/massu-autoresearch/references/eval-runner.md +84 -0
- package/commands/massu-autoresearch/references/safety-rails.md +125 -0
- package/commands/massu-autoresearch/references/scoring-protocol.md +151 -0
- package/commands/massu-autoresearch.md +258 -0
- package/commands/massu-batch.md +44 -12
- package/commands/massu-bearings.md +42 -8
- package/commands/massu-checkpoint.md +588 -0
- package/commands/massu-ci-fix.md +2 -2
- package/commands/massu-command-health.md +132 -0
- package/commands/massu-command-improve.md +232 -0
- package/commands/massu-commit.md +205 -44
- package/commands/massu-create-plan.md +239 -57
- package/commands/massu-data/references/common-queries.md +79 -0
- package/commands/massu-data/references/table-guide.md +50 -0
- package/commands/massu-data.md +66 -0
- package/commands/massu-dead-code.md +29 -34
- package/commands/massu-debug/references/auto-learning.md +61 -0
- package/commands/massu-debug/references/codegraph-tracing.md +80 -0
- package/commands/massu-debug/references/common-shortcuts.md +98 -0
- package/commands/massu-debug/references/investigation-phases.md +294 -0
- package/commands/massu-debug/references/report-format.md +107 -0
- package/commands/massu-debug.md +105 -386
- package/commands/massu-docs.md +1 -1
- package/commands/massu-full-audit.md +61 -0
- package/commands/massu-gap-enhancement-analyzer.md +276 -16
- package/commands/massu-golden-path/references/approval-points.md +216 -0
- package/commands/massu-golden-path/references/competitive-mode.md +273 -0
- package/commands/massu-golden-path/references/error-handling.md +121 -0
- package/commands/massu-golden-path/references/phase-0-requirements.md +53 -0
- package/commands/massu-golden-path/references/phase-1-plan-creation.md +168 -0
- package/commands/massu-golden-path/references/phase-2-implementation.md +403 -0
- package/commands/massu-golden-path/references/phase-2.5-gap-analyzer.md +170 -0
- package/commands/massu-golden-path/references/phase-3-simplify.md +40 -0
- package/commands/massu-golden-path/references/phase-3.5-security-audit.md +108 -0
- package/commands/massu-golden-path/references/phase-4-commit.md +94 -0
- package/commands/massu-golden-path/references/phase-5-push.md +116 -0
- package/commands/massu-golden-path/references/phase-5.5-production-verify.md +170 -0
- package/commands/massu-golden-path/references/phase-6-completion.md +113 -0
- package/commands/massu-golden-path/references/qa-evaluator-spec.md +137 -0
- package/commands/massu-golden-path/references/sprint-contract-protocol.md +117 -0
- package/commands/massu-golden-path/references/vr-visual-calibration.md +73 -0
- package/commands/massu-golden-path.md +121 -844
- package/commands/massu-guide.md +72 -69
- package/commands/massu-hooks.md +27 -12
- package/commands/massu-hotfix.md +221 -144
- package/commands/massu-incident.md +49 -20
- package/commands/massu-infra-audit.md +187 -0
- package/commands/massu-learning-audit.md +211 -0
- package/commands/massu-loop/references/auto-learning.md +49 -0
- package/commands/massu-loop/references/checkpoint-audit.md +40 -0
- package/commands/massu-loop/references/guardrails.md +17 -0
- package/commands/massu-loop/references/iteration-structure.md +115 -0
- package/commands/massu-loop/references/loop-controller.md +188 -0
- package/commands/massu-loop/references/plan-extraction.md +78 -0
- package/commands/massu-loop/references/vr-plan-spec.md +140 -0
- package/commands/massu-loop-playwright.md +9 -9
- package/commands/massu-loop.md +115 -670
- package/commands/massu-new-pattern.md +423 -0
- package/commands/massu-perf.md +422 -0
- package/commands/massu-plan-audit.md +1 -1
- package/commands/massu-plan.md +389 -122
- package/commands/massu-production-verify.md +433 -0
- package/commands/massu-push.md +62 -378
- package/commands/massu-recap.md +29 -3
- package/commands/massu-rollback.md +613 -0
- package/commands/massu-scaffold-hook.md +2 -4
- package/commands/massu-scaffold-page.md +2 -3
- package/commands/massu-scaffold-router.md +1 -2
- package/commands/massu-security.md +619 -0
- package/commands/massu-simplify.md +115 -85
- package/commands/massu-squirrels.md +2 -2
- package/commands/massu-tdd.md +38 -22
- package/commands/massu-test.md +3 -3
- package/commands/massu-type-mismatch-audit.md +469 -0
- package/commands/massu-ui-audit.md +587 -0
- package/commands/massu-verify-playwright.md +287 -32
- package/commands/massu-verify.md +150 -46
- package/dist/cli.js +146 -95
- package/package.json +6 -2
- package/patterns/build-patterns.md +302 -0
- package/patterns/component-patterns.md +246 -0
- package/patterns/display-patterns.md +185 -0
- package/patterns/form-patterns.md +890 -0
- package/patterns/integration-testing-checklist.md +445 -0
- package/patterns/security-patterns.md +219 -0
- package/patterns/testing-patterns.md +569 -0
- package/patterns/tool-routing.md +81 -0
- package/patterns/ui-patterns.md +371 -0
- package/protocols/plan-implementation.md +267 -0
- package/protocols/recovery.md +225 -0
- package/protocols/verification.md +404 -0
- package/reference/command-taxonomy.md +178 -0
- package/reference/cr-rules-reference.md +76 -0
- package/reference/hook-execution-order.md +148 -0
- package/reference/lessons-learned.md +175 -0
- package/reference/patterns-quickref.md +208 -0
- package/reference/standards.md +135 -0
- package/reference/subagents-reference.md +17 -0
- package/reference/vr-verification-reference.md +867 -0
- package/src/commands/install-commands.ts +149 -53
|
@@ -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
|