@massu/core 2.5.1 → 2.5.3
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/CHANGELOG.md +240 -0
- package/agents/massu-output-scorer.md +2 -2
- package/agents/massu-plan-auditor.md +1 -1
- package/commands/_shared-references/test-first-protocol.md +4 -4
- package/commands/_shared-references/verification-table.md +5 -5
- package/commands/massu-audit-deps.md +2 -2
- package/commands/massu-batch.md +3 -3
- package/commands/massu-checkpoint.md +7 -7
- package/commands/massu-ci-fix.md +1 -1
- package/commands/massu-cleanup.md +16 -16
- package/commands/massu-commit.md +7 -7
- package/commands/massu-create-plan.md +7 -7
- package/commands/massu-dead-code.md +3 -3
- package/commands/massu-debug/references/common-shortcuts.md +1 -1
- package/commands/massu-debug/references/investigation-phases.md +4 -4
- package/commands/massu-debug/references/report-format.md +2 -2
- package/commands/massu-deploy.md +1 -1
- package/commands/massu-deps.md +5 -5
- package/commands/massu-doc-gen.md +3 -3
- package/commands/massu-docs.md +6 -6
- package/commands/massu-estimate.md +3 -3
- package/commands/massu-golden-path/references/competitive-mode.md +2 -2
- package/commands/massu-golden-path/references/phase-1-plan-creation.md +1 -1
- package/commands/massu-golden-path/references/phase-2-implementation.md +2 -2
- package/commands/massu-golden-path/references/phase-4-commit.md +3 -3
- package/commands/massu-golden-path/references/phase-5-push.md +5 -5
- package/commands/massu-guide.md +3 -3
- package/commands/massu-hotfix.md +14 -14
- package/commands/massu-loop/references/checkpoint-audit.md +3 -3
- package/commands/massu-loop/references/iteration-structure.md +3 -3
- package/commands/massu-loop/references/loop-controller.md +5 -5
- package/commands/massu-loop/references/plan-extraction.md +4 -4
- package/commands/massu-loop/references/vr-plan-spec.md +3 -3
- package/commands/massu-loop-playwright.md +5 -5
- package/commands/massu-loop.md +1 -1
- package/commands/massu-new-feature.md +6 -24
- package/commands/massu-perf.md +1 -1
- package/commands/massu-plan.md +21 -21
- package/commands/massu-push-light.md +9 -9
- package/commands/massu-recap.md +1 -1
- package/commands/massu-refactor.md +8 -8
- package/commands/massu-release.md +3 -3
- package/commands/massu-review.md +1 -1
- package/commands/massu-rollback.md +6 -6
- package/commands/massu-scaffold-page.md +1 -1
- package/commands/massu-scaffold-router.md +1 -1
- package/commands/massu-status.md +9 -9
- package/commands/massu-tdd.md +2 -2
- package/commands/massu-test.md +13 -13
- package/commands/massu-verify-playwright.md +1 -1
- package/commands/massu-verify.md +20 -20
- package/dist/cli.js +1731 -976
- package/dist/hooks/auto-learning-pipeline.js +745 -87
- package/dist/hooks/classify-failure.js +747 -45
- package/dist/hooks/cost-tracker.js +89 -28
- package/dist/hooks/fix-detector.js +536 -48
- package/dist/hooks/incident-pipeline.js +96 -29
- package/dist/hooks/intent-suggester.js +89 -28
- package/dist/hooks/memory-recall.js +89 -28
- package/dist/hooks/post-edit-context.js +137 -29
- package/dist/hooks/post-tool-use.js +95 -30
- package/dist/hooks/pre-compact.js +89 -28
- package/dist/hooks/pre-delete-check.js +137 -31
- package/dist/hooks/pre-tool-use-gate.js +271 -43
- package/dist/hooks/quality-event.js +89 -28
- package/dist/hooks/rule-enforcement-pipeline.js +89 -28
- package/dist/hooks/security-gate.js +219 -39
- package/dist/hooks/session-end.js +92 -28
- package/dist/hooks/session-start.js +140 -62
- package/dist/hooks/user-prompt.js +89 -28
- package/fragments/feature-components.md +15 -0
- package/fragments/feature-components.python.md +15 -0
- package/fragments/feature-components.typescript.md +15 -0
- package/package.json +6 -5
- package/patterns/testing-patterns.md +8 -8
- package/protocols/plan-implementation.md +2 -2
- package/protocols/verification.md +4 -4
- package/reference/lessons-learned.md +4 -4
- package/reference/vr-verification-reference.md +9 -9
- package/templates/aspnet/massu.config.yaml +2 -0
- package/templates/go-chi/massu.config.yaml +2 -0
- package/templates/multi-runtime/massu.config.yaml +4 -2
- package/templates/phoenix/massu.config.yaml +2 -0
- package/templates/python-django/massu.config.yaml +3 -1
- package/templates/python-fastapi/massu.config.yaml +3 -1
- package/templates/python-flask/massu.config.yaml +3 -1
- package/templates/rails/massu.config.yaml +4 -2
- package/templates/rust-actix/massu.config.yaml +2 -0
- package/templates/spring/massu.config.yaml +2 -0
- package/templates/swift-ios/massu.config.yaml +3 -1
- package/templates/ts-nestjs/massu.config.yaml +2 -0
- package/templates/ts-nextjs/massu.config.yaml +2 -0
|
@@ -85,9 +85,9 @@ If NO references found: candidate for removal.
|
|
|
85
85
|
|
|
86
86
|
After user approval:
|
|
87
87
|
1. Remove files/exports/dependencies
|
|
88
|
-
2. Run `
|
|
89
|
-
3. Run `
|
|
90
|
-
4. Run `
|
|
88
|
+
2. Run `{{verify.build | default("(this stack declares no build step)")}}` (VR-BUILD)
|
|
89
|
+
3. Run `{{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}` (VR-TYPE)
|
|
90
|
+
4. Run `{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}` (VR-TEST)
|
|
91
91
|
5. Run `./scripts/pattern-scanner.sh`
|
|
92
92
|
|
|
93
93
|
### Step 7: Report
|
|
@@ -77,7 +77,7 @@ grep -rn "publicProcedure.mutation" src/ | wc -l # Should be 0
|
|
|
77
77
|
1. Check for static jsdom/cheerio imports (must use `await import()`)
|
|
78
78
|
2. Check client/server boundary violations (`@/lib/db` in client components)
|
|
79
79
|
3. Check `next-intl` setup (plugin + request.ts + Provider)
|
|
80
|
-
4. Run `NODE_OPTIONS="--max-old-space-size=8192"
|
|
80
|
+
4. Run `NODE_OPTIONS="--max-old-space-size=8192" {{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}`
|
|
81
81
|
5. Check for circular dependencies in import chains
|
|
82
82
|
|
|
83
83
|
---
|
|
@@ -66,10 +66,10 @@ git log --oneline -10
|
|
|
66
66
|
git diff HEAD~5 --name-only | grep -E "(component|router|page)"
|
|
67
67
|
|
|
68
68
|
# Check build status
|
|
69
|
-
|
|
69
|
+
{{verify.build | default("(this stack declares no build step)")}} 2>&1 | tail -20
|
|
70
70
|
|
|
71
71
|
# Check for type errors
|
|
72
|
-
|
|
72
|
+
{{verify.type | default("declare verification.LANG.type in massu.config.yaml")}} 2>&1 | head -30
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
---
|
|
@@ -253,10 +253,10 @@ grep -n "[correct_pattern]" [file]
|
|
|
253
253
|
# Expected: Match found
|
|
254
254
|
|
|
255
255
|
# VR-BUILD: Build passes
|
|
256
|
-
|
|
256
|
+
{{verify.build | default("(this stack declares no build step)")}}
|
|
257
257
|
|
|
258
258
|
# VR-TYPE: Types pass
|
|
259
|
-
|
|
259
|
+
{{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}
|
|
260
260
|
|
|
261
261
|
# Pattern scanner
|
|
262
262
|
./scripts/pattern-scanner.sh
|
|
@@ -30,8 +30,8 @@ Templates for the debug report and session state update.
|
|
|
30
30
|
### Verification Evidence
|
|
31
31
|
| Check | Command | Result | Status |
|
|
32
32
|
|-------|---------|--------|--------|
|
|
33
|
-
| Build |
|
|
34
|
-
| Types |
|
|
33
|
+
| Build | {{verify.build | default("(this stack declares no build step)")}} | Exit 0 | PASS |
|
|
34
|
+
| Types | {{verify.type | default("declare verification.LANG.type in massu.config.yaml")}} | 0 errors | PASS |
|
|
35
35
|
| Patterns | ./scripts/pattern-scanner.sh | Exit 0 | PASS |
|
|
36
36
|
| VR-NEGATIVE | grep [old] | 0 matches | PASS |
|
|
37
37
|
|
package/commands/massu-deploy.md
CHANGED
|
@@ -27,7 +27,7 @@ name: massu-deploy
|
|
|
27
27
|
### Pre-Flight Checks (automatic)
|
|
28
28
|
1. Branch check — must be on `main` with clean working tree
|
|
29
29
|
2. Project target verification — must match projectId `prj_Io7AaGCM27cwRQerAj3BdihUur1Y`
|
|
30
|
-
3. Local build verification — `
|
|
30
|
+
3. Local build verification — `{{verify.build | default("(this stack declares no build step)")}}` must succeed
|
|
31
31
|
4. Deploy to production — `vercel --prod --yes`
|
|
32
32
|
5. Smoke tests — GET `/` and `/docs` must return 200
|
|
33
33
|
6. Rollback guidance — if smoke tests fail, prints rollback command
|
package/commands/massu-deps.md
CHANGED
|
@@ -155,10 +155,10 @@ npm dedupe --dry-run
|
|
|
155
155
|
npx depcheck packages/core
|
|
156
156
|
|
|
157
157
|
# Verify no phantom MCP SDK references (should be 0 — raw JSON-RPC 2.0)
|
|
158
|
-
grep -rn "@modelcontextprotocol/sdk"
|
|
158
|
+
grep -rn "@modelcontextprotocol/sdk" {{paths.source}}/ --include="*.ts" | wc -l
|
|
159
159
|
|
|
160
160
|
# Check better-sqlite3 usage
|
|
161
|
-
grep -rn "better-sqlite3\|Database"
|
|
161
|
+
grep -rn "better-sqlite3\|Database" {{paths.source}}/ --include="*.ts" | wc -l
|
|
162
162
|
```
|
|
163
163
|
|
|
164
164
|
### 3.4 Dependency Matrix
|
|
@@ -215,13 +215,13 @@ npm outdated | grep @types
|
|
|
215
215
|
# After EACH update:
|
|
216
216
|
|
|
217
217
|
# 1. Type check
|
|
218
|
-
|
|
218
|
+
{{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}
|
|
219
219
|
|
|
220
220
|
# 2. Build (includes hook compilation)
|
|
221
|
-
|
|
221
|
+
{{verify.build | default("(this stack declares no build step)")}}
|
|
222
222
|
|
|
223
223
|
# 3. Test
|
|
224
|
-
|
|
224
|
+
{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}
|
|
225
225
|
|
|
226
226
|
# 4. Pattern scanner
|
|
227
227
|
bash scripts/massu-pattern-scanner.sh
|
|
@@ -159,7 +159,7 @@ export interface MyType {
|
|
|
159
159
|
|
|
160
160
|
```bash
|
|
161
161
|
# Verify no TypeScript errors introduced
|
|
162
|
-
|
|
162
|
+
{{verify.type | default("declare verification.LANG.type in massu.config.yaml")}} 2>&1
|
|
163
163
|
# MUST show same or fewer errors than baseline
|
|
164
164
|
```
|
|
165
165
|
|
|
@@ -213,7 +213,7 @@ sectionName:
|
|
|
213
213
|
|
|
214
214
|
### Gate 1: Type Check (VR-TYPE)
|
|
215
215
|
```bash
|
|
216
|
-
|
|
216
|
+
{{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}
|
|
217
217
|
# MUST show 0 errors (or <= baseline before docs were added)
|
|
218
218
|
```
|
|
219
219
|
|
|
@@ -225,7 +225,7 @@ bash scripts/massu-pattern-scanner.sh
|
|
|
225
225
|
|
|
226
226
|
### Gate 3: All Tests (VR-TEST)
|
|
227
227
|
```bash
|
|
228
|
-
|
|
228
|
+
{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}
|
|
229
229
|
# Documentation changes MUST NOT affect test results
|
|
230
230
|
```
|
|
231
231
|
|
package/commands/massu-docs.md
CHANGED
|
@@ -92,10 +92,10 @@ Compare tools found in codebase against README documentation.
|
|
|
92
92
|
### 2.1 Extract Tool Output Strings
|
|
93
93
|
```bash
|
|
94
94
|
# Find tool output text
|
|
95
|
-
grep -rn "text:"
|
|
95
|
+
grep -rn "text:" {{paths.source}}/ --include="*.ts" | grep -v "__tests__" | head -30
|
|
96
96
|
|
|
97
97
|
# Find error messages
|
|
98
|
-
grep -rn "Error\|error\|Invalid\|invalid"
|
|
98
|
+
grep -rn "Error\|error\|Invalid\|invalid" {{paths.source}}/ --include="*.ts" | grep -v "__tests__" | head -20
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
### 2.2 Terminology Matrix
|
|
@@ -159,7 +159,7 @@ grep -c "description\|comment\|//" packages/core/src/config.ts
|
|
|
159
159
|
### 4.2 API Documentation
|
|
160
160
|
```bash
|
|
161
161
|
# Check if tool inputSchema has descriptions for all properties
|
|
162
|
-
grep -rn "description:"
|
|
162
|
+
grep -rn "description:" {{paths.source}}/ --include="*.ts" | grep -v "__tests__" | wc -l
|
|
163
163
|
```
|
|
164
164
|
|
|
165
165
|
### 4.3 Config Documentation Matrix
|
|
@@ -204,7 +204,7 @@ grep -c "tool\|hook\|config\|install\|usage" packages/core/README.md 2>/dev/null
|
|
|
204
204
|
### 6.1 CLAUDE.md Accuracy
|
|
205
205
|
```bash
|
|
206
206
|
# Check if CLAUDE.md file locations match actual
|
|
207
|
-
grep "
|
|
207
|
+
grep "{{paths.source}}/" .claude/CLAUDE.md | while read line; do
|
|
208
208
|
path=$(echo "$line" | sed -n 's/.*\(packages\/core\/src\/[a-zA-Z0-9_.\/-]*\).*/\1/p')
|
|
209
209
|
if [ -n "$path" ]; then
|
|
210
210
|
[ -f "$path" ] && echo "OK: $path" || echo "MISSING: $path"
|
|
@@ -218,8 +218,8 @@ grep -c "\.ts" .claude/CLAUDE.md
|
|
|
218
218
|
### 6.2 Build & Test Commands Accuracy
|
|
219
219
|
```bash
|
|
220
220
|
# Verify each documented build command works
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
{{verify.build | default("(this stack declares no build step)")}} --dry-run 2>/dev/null
|
|
222
|
+
{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}} --help 2>/dev/null
|
|
223
223
|
```
|
|
224
224
|
|
|
225
225
|
### 6.3 Developer Docs Matrix
|
|
@@ -70,7 +70,7 @@ Determine what the change will touch.
|
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
72
|
# Search for related code to the requested feature
|
|
73
|
-
grep -rn "$ARGUMENTS"
|
|
73
|
+
grep -rn "$ARGUMENTS" {{paths.source}}/ --include="*.ts" | head -20
|
|
74
74
|
grep -rn "$ARGUMENTS" website/src/ --include="*.ts" --include="*.tsx" | head -20
|
|
75
75
|
```
|
|
76
76
|
|
|
@@ -106,7 +106,7 @@ grep -A 30 "interface.*Config\|type.*Config" packages/core/src/config.ts 2>/dev/
|
|
|
106
106
|
|
|
107
107
|
```bash
|
|
108
108
|
# How many files import from core modules that would change
|
|
109
|
-
grep -rn "from.*tools\|from.*server\|from.*config"
|
|
109
|
+
grep -rn "from.*tools\|from.*server\|from.*config" {{paths.source}}/ --include="*.ts" | wc -l
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
```markdown
|
|
@@ -162,7 +162,7 @@ Score: [1-5] — Justification: [number of integration points]
|
|
|
162
162
|
|
|
163
163
|
```bash
|
|
164
164
|
# Existing test patterns for reference
|
|
165
|
-
ls
|
|
165
|
+
ls {{paths.tests | default("tests")}}/ 2>/dev/null
|
|
166
166
|
wc -l packages/core/src/__tests__/*.test.ts 2>/dev/null | sort -rn | head -5
|
|
167
167
|
```
|
|
168
168
|
|
|
@@ -78,7 +78,7 @@ IMPLEMENTATION RULES:
|
|
|
78
78
|
2. Follow ALL CLAUDE.md patterns (ctx.db, protectedProcedure, etc.)
|
|
79
79
|
3. Do NOT run database migrations (handled separately)
|
|
80
80
|
4. Run pattern-scanner after each file: bash scripts/massu-pattern-scanner.sh
|
|
81
|
-
5. Run tsc after implementation:
|
|
81
|
+
5. Run tsc after implementation: {{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}
|
|
82
82
|
6. Fix any issues before declaring done
|
|
83
83
|
|
|
84
84
|
OUTPUT FORMAT (at completion):
|
|
@@ -252,7 +252,7 @@ IF cleanup fails:
|
|
|
252
252
|
|
|
253
253
|
```
|
|
254
254
|
1. Run bash scripts/massu-pattern-scanner.sh (exit 0 required)
|
|
255
|
-
2. Run
|
|
255
|
+
2. Run {{verify.type | default("declare verification.LANG.type in massu.config.yaml")}} (0 errors required)
|
|
256
256
|
3. IF either fails:
|
|
257
257
|
Fix issues from merge
|
|
258
258
|
Re-run verification
|
|
@@ -34,7 +34,7 @@ If feature uses config-driven values:
|
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
36
|
# Check config keys used in code
|
|
37
|
-
grep -rn "getConfig()"
|
|
37
|
+
grep -rn "getConfig()" {{paths.source}}/ | grep -o 'config\.\w\+' | sort -u
|
|
38
38
|
# Compare to massu.config.yaml structure
|
|
39
39
|
```
|
|
40
40
|
|
|
@@ -61,8 +61,8 @@ For each plan item:
|
|
|
61
61
|
CHECKPOINT:
|
|
62
62
|
[1] READ plan section [2] GREP tool registrations [3] LS modules
|
|
63
63
|
[4] VR-CONFIG check [5] VR-TOOL-REG check [6] VR-HOOK-BUILD check
|
|
64
|
-
[7] Pattern scanner [8]
|
|
65
|
-
[10]
|
|
64
|
+
[7] Pattern scanner [8] {{verify.build | default("(this stack declares no build step)")}} [9] {{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}
|
|
65
|
+
[10] {{verify.test | default("declare verification.LANG.test in massu.config.yaml")}} [11] VR-GENERIC check [12] Security scanner
|
|
66
66
|
[13] COUNT gaps -> IF > 0: FIX and return to [1]
|
|
67
67
|
```
|
|
68
68
|
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
| Gate | Command | Expected |
|
|
14
14
|
|------|---------|----------|
|
|
15
15
|
| 1. Pattern Scanner | `bash scripts/massu-pattern-scanner.sh` | Exit 0 |
|
|
16
|
-
| 2. Type Safety (VR-TYPE) | `
|
|
17
|
-
| 3. Build (VR-BUILD) | `
|
|
18
|
-
| 4. Tests (VR-TEST) | `
|
|
16
|
+
| 2. Type Safety (VR-TYPE) | `{{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}` | 0 errors |
|
|
17
|
+
| 3. Build (VR-BUILD) | `{{verify.build | default("(this stack declares no build step)")}}` | Exit 0 |
|
|
18
|
+
| 4. Tests (VR-TEST) | `{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}` | ALL pass |
|
|
19
19
|
| 5. Hook Compilation (VR-HOOK-BUILD) | `cd packages/core && npm run build:hooks` | Exit 0 |
|
|
20
20
|
| 6. Generalization (VR-GENERIC) | `bash scripts/massu-generalization-scanner.sh` | Exit 0 |
|
|
21
21
|
| 7. Security Scanner | `bash scripts/massu-security-scanner.sh` | Exit 0 |
|
|
@@ -22,8 +22,8 @@ Run in parallel where possible:
|
|
|
22
22
|
|-------|---------|
|
|
23
23
|
| Pattern Scanner | `bash scripts/massu-pattern-scanner.sh` |
|
|
24
24
|
| Generalization | `bash scripts/massu-generalization-scanner.sh` |
|
|
25
|
-
| TypeScript | `
|
|
26
|
-
| Build | `
|
|
25
|
+
| TypeScript | `{{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}` |
|
|
26
|
+
| Build | `{{verify.build | default("(this stack declares no build step)")}}` |
|
|
27
27
|
| Hook Compilation | `cd packages/core && npm run build:hooks` |
|
|
28
28
|
|
|
29
29
|
## 5.3 Tier 2: Test Suite (CRITICAL)
|
|
@@ -33,11 +33,11 @@ Run in parallel where possible:
|
|
|
33
33
|
```bash
|
|
34
34
|
# Establish baseline on main
|
|
35
35
|
git stash && git checkout main -q
|
|
36
|
-
|
|
36
|
+
{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}} 2>&1 | tee /tmp/baseline-tests.txt
|
|
37
37
|
git checkout - -q && git stash pop -q
|
|
38
38
|
|
|
39
39
|
# Run on current branch
|
|
40
|
-
|
|
40
|
+
{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}} 2>&1 | tee /tmp/current-tests.txt
|
|
41
41
|
|
|
42
42
|
# Compare: any test passing on main but failing now = REGRESSION
|
|
43
43
|
# Regressions MUST be fixed before push
|
|
@@ -49,7 +49,7 @@ Use **parallel Task agents** for independent checks:
|
|
|
49
49
|
|
|
50
50
|
```
|
|
51
51
|
Agent Group A (parallel):
|
|
52
|
-
- Agent 1:
|
|
52
|
+
- Agent 1: {{verify.test | default("declare verification.LANG.test in massu.config.yaml")}} (unit tests)
|
|
53
53
|
- Agent 2: npm audit --audit-level=high
|
|
54
54
|
- Agent 3: bash scripts/massu-security-scanner.sh
|
|
55
55
|
|
package/commands/massu-guide.md
CHANGED
|
@@ -109,9 +109,9 @@ Present the standard development workflow:
|
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
Explain the verification system:
|
|
112
|
-
- **VR-BUILD**: `
|
|
113
|
-
- **VR-TYPE**: `
|
|
114
|
-
- **VR-TEST**: `
|
|
112
|
+
- **VR-BUILD**: `{{verify.build | default("(this stack declares no build step)")}}` must exit 0
|
|
113
|
+
- **VR-TYPE**: `{{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}` must have 0 errors
|
|
114
|
+
- **VR-TEST**: `{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}` must pass (MANDATORY)
|
|
115
115
|
- **VR-SCHEMA**: Query database before using column names
|
|
116
116
|
- **VR-NEGATIVE**: grep returns 0 matches for removed code
|
|
117
117
|
|
package/commands/massu-hotfix.md
CHANGED
|
@@ -128,7 +128,7 @@ ORDER BY ordinal_position;
|
|
|
128
128
|
```bash
|
|
129
129
|
# VR-CONFIG: Verify config values match code expectations
|
|
130
130
|
cat massu.config.yaml
|
|
131
|
-
grep -rn "getConfig()"
|
|
131
|
+
grep -rn "getConfig()" {{paths.source}}/ | head -10
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
---
|
|
@@ -226,8 +226,8 @@ git checkout -b hotfix/[issue-name]
|
|
|
226
226
|
### 3.3 Verify Fix Locally
|
|
227
227
|
```bash
|
|
228
228
|
# Quick verification
|
|
229
|
-
|
|
230
|
-
|
|
229
|
+
{{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}
|
|
230
|
+
{{verify.build | default("(this stack declares no build step)")}}
|
|
231
231
|
|
|
232
232
|
# Pattern check
|
|
233
233
|
bash scripts/massu-pattern-scanner.sh
|
|
@@ -240,16 +240,16 @@ bash scripts/massu-pattern-scanner.sh
|
|
|
240
240
|
### 4.1 Essential Checks Only
|
|
241
241
|
```bash
|
|
242
242
|
# Type safety
|
|
243
|
-
|
|
243
|
+
{{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}
|
|
244
244
|
|
|
245
245
|
# Build integrity
|
|
246
|
-
|
|
246
|
+
{{verify.build | default("(this stack declares no build step)")}}
|
|
247
247
|
|
|
248
248
|
# Pattern scanner
|
|
249
249
|
bash scripts/massu-pattern-scanner.sh
|
|
250
250
|
|
|
251
251
|
# Tests
|
|
252
|
-
|
|
252
|
+
{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}
|
|
253
253
|
|
|
254
254
|
# Security check
|
|
255
255
|
git diff --cached --name-only | grep -E '\.(env|pem|key)' && echo "FAIL" || echo "PASS"
|
|
@@ -261,10 +261,10 @@ git diff --cached --name-only | grep -E '\.(env|pem|key)' && echo "FAIL" || echo
|
|
|
261
261
|
|
|
262
262
|
| Check | Command | Result | Status |
|
|
263
263
|
|-------|---------|--------|--------|
|
|
264
|
-
| Types |
|
|
265
|
-
| Build |
|
|
264
|
+
| Types | {{verify.type | default("declare verification.LANG.type in massu.config.yaml")}} | 0 errors | PASS |
|
|
265
|
+
| Build | {{verify.build | default("(this stack declares no build step)")}} | Exit 0 | PASS |
|
|
266
266
|
| Patterns | massu-pattern-scanner.sh | Exit 0 | PASS |
|
|
267
|
-
| Tests |
|
|
267
|
+
| Tests | {{verify.test | default("declare verification.LANG.test in massu.config.yaml")}} | All pass | PASS |
|
|
268
268
|
| Secrets | git diff check | 0 files | PASS |
|
|
269
269
|
|
|
270
270
|
**ALL CRITICAL CHECKS: PASS/FAIL**
|
|
@@ -351,7 +351,7 @@ git push origin main
|
|
|
351
351
|
```bash
|
|
352
352
|
# Check for new errors in output/logs
|
|
353
353
|
# Run tests again post-deploy
|
|
354
|
-
|
|
354
|
+
{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}
|
|
355
355
|
```
|
|
356
356
|
|
|
357
357
|
---
|
|
@@ -448,7 +448,7 @@ After hotfix, update `session-state/CURRENT.md`:
|
|
|
448
448
|
## Verification Evidence
|
|
449
449
|
|
|
450
450
|
### Hotfix: [Name]
|
|
451
|
-
- Command: `
|
|
451
|
+
- Command: `{{verify.build | default("(this stack declares no build step)")}} && {{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}`
|
|
452
452
|
- Result: Exit 0
|
|
453
453
|
- Status: VERIFIED COMPLETE
|
|
454
454
|
```
|
|
@@ -469,8 +469,8 @@ git push origin main
|
|
|
469
469
|
### Verify Rollback
|
|
470
470
|
```bash
|
|
471
471
|
# Confirm no new issues from hotfix revert
|
|
472
|
-
|
|
473
|
-
|
|
472
|
+
{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}
|
|
473
|
+
{{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}
|
|
474
474
|
```
|
|
475
475
|
|
|
476
476
|
---
|
|
@@ -551,7 +551,7 @@ This ensures that if the session compacts, the recovery protocol knows only `/ma
|
|
|
551
551
|
1. **Ingest into massu memory**: Use `mcp__massu-codegraph__massu_memory_ingest` with type="bugfix", importance=5 (hotfixes are always high importance), description of root cause + fix
|
|
552
552
|
2. **Record in session state**: Add the wrong pattern and correct pattern to `.claude/session-state/CURRENT.md`
|
|
553
553
|
3. **Add to pattern scanner**: If the bad pattern is grep-able, add detection to `scripts/massu-pattern-scanner.sh`
|
|
554
|
-
4. **Search codebase-wide**: `grep -rn "[bad_pattern]"
|
|
554
|
+
4. **Search codebase-wide**: `grep -rn "[bad_pattern]" {{paths.source}}/` and fix ALL instances (CR-9)
|
|
555
555
|
5. **Consider new CR rule**: If this is a class of bug (not one-off), propose a new CR rule for CLAUDE.md
|
|
556
556
|
|
|
557
557
|
**Hotfixes without learning are wasted crises. Every outage teaches something -- capture it.**
|
|
@@ -13,9 +13,9 @@ CHECKPOINT AUDIT FLOW:
|
|
|
13
13
|
[3] LS files to verify they exist
|
|
14
14
|
[4] VR-TOOL-REG: Verify tools are WIRED in tools.ts (not just created)
|
|
15
15
|
[5] GREP for pattern violations
|
|
16
|
-
[6] RUN build verification (
|
|
17
|
-
[7] RUN type verification (
|
|
18
|
-
[8] RUN tests (
|
|
16
|
+
[6] RUN build verification ({{verify.build | default("(this stack declares no build step)")}})
|
|
17
|
+
[7] RUN type verification ({{verify.type | default("declare verification.LANG.type in massu.config.yaml")}})
|
|
18
|
+
[8] RUN tests ({{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}) - MANDATORY, NOT optional
|
|
19
19
|
[9] RUN hook build (cd packages/core && npm run build:hooks)
|
|
20
20
|
[10] RUN pattern scanner (bash scripts/massu-pattern-scanner.sh)
|
|
21
21
|
[11] RUN security check (secrets staged)
|
|
@@ -73,10 +73,10 @@ For every file you create or modify, verify against:
|
|
|
73
73
|
bash scripts/massu-pattern-scanner.sh
|
|
74
74
|
|
|
75
75
|
# Type check
|
|
76
|
-
|
|
76
|
+
{{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}
|
|
77
77
|
|
|
78
78
|
# Tests still pass
|
|
79
|
-
|
|
79
|
+
{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
### Massu-Specific Implementation Checks
|
|
@@ -99,7 +99,7 @@ Verify tools exist with 3-function pattern (getDefs, isTool, handleCall) in tool
|
|
|
99
99
|
|
|
100
100
|
## ENVIRONMENT & CONFIG VERIFICATION
|
|
101
101
|
|
|
102
|
-
Verify env vars documented, no hardcoded secrets (`grep -rn "sk-\|password.*="
|
|
102
|
+
Verify env vars documented, no hardcoded secrets (`grep -rn "sk-\|password.*=" {{paths.source}}/` = 0), config files exist.
|
|
103
103
|
|
|
104
104
|
---
|
|
105
105
|
|
|
@@ -140,8 +140,8 @@ WHILE true:
|
|
|
140
140
|
Fix any gaps you find (code or plan document).
|
|
141
141
|
|
|
142
142
|
CONTEXT: Massu is a TypeScript monorepo with:
|
|
143
|
-
-
|
|
144
|
-
-
|
|
143
|
+
- {{paths.source}}/ (MCP server source)
|
|
144
|
+
- {{paths.tests | default("tests")}}/ (vitest tests)
|
|
145
145
|
- packages/core/src/hooks/ (esbuild-compiled hooks)
|
|
146
146
|
- website/ (Next.js + Supabase website)
|
|
147
147
|
- massu.config.yaml (project config)
|
|
@@ -149,13 +149,13 @@ WHILE true:
|
|
|
149
149
|
|
|
150
150
|
VERIFICATION COMMANDS:
|
|
151
151
|
- Pattern scanner: bash scripts/massu-pattern-scanner.sh
|
|
152
|
-
- Type check:
|
|
153
|
-
- Tests:
|
|
152
|
+
- Type check: {{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}
|
|
153
|
+
- Tests: {{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}
|
|
154
154
|
- Hook build: cd packages/core && npm run build:hooks
|
|
155
155
|
|
|
156
156
|
VR-* CHECKS (use ONLY these, per CLAUDE.md):
|
|
157
157
|
- VR-FILE, VR-GREP, VR-NEGATIVE, VR-COUNT (generic)
|
|
158
|
-
- VR-BUILD:
|
|
158
|
+
- VR-BUILD: {{verify.build | default("(this stack declares no build step)")}} (tsc + hooks)
|
|
159
159
|
- VR-TYPE, VR-TEST, VR-TOOL-REG, VR-HOOK-BUILD, VR-CONFIG, VR-PATTERN
|
|
160
160
|
|
|
161
161
|
CRITICAL INSTRUCTION FOR GAPS_DISCOVERED:
|
|
@@ -31,9 +31,9 @@ For EACH section of the plan, extract concrete items into a table:
|
|
|
31
31
|
### Extracted Items
|
|
32
32
|
| Item # | Type | Description | Location | Verification Command | Status |
|
|
33
33
|
|--------|------|-------------|----------|---------------------|--------|
|
|
34
|
-
| P1-001 | MODULE_CREATE | foo-tools.ts |
|
|
34
|
+
| P1-001 | MODULE_CREATE | foo-tools.ts | {{paths.source}}/ | ls -la [path] | PENDING |
|
|
35
35
|
| P1-002 | TOOL_WIRE | Wire into tools.ts | packages/core/src/tools.ts | grep [module] tools.ts | PENDING |
|
|
36
|
-
| P2-001 | TEST | foo.test.ts |
|
|
36
|
+
| P2-001 | TEST | foo.test.ts | {{paths.tests | default("tests")}}/ | {{verify.test | default("declare verification.LANG.test in massu.config.yaml")}} | PENDING |
|
|
37
37
|
|
|
38
38
|
### Item Types
|
|
39
39
|
- MODULE_CREATE: New TypeScript module
|
|
@@ -55,10 +55,10 @@ For EACH section of the plan, extract concrete items into a table:
|
|
|
55
55
|
| MODULE_CREATE | `ls -la [path]` | File exists, size > 0 |
|
|
56
56
|
| MODULE_MODIFY | `grep "[change]" [file]` | Pattern found |
|
|
57
57
|
| TOOL_WIRE | `grep "getXDefs\|isXTool\|handleXCall" tools.ts` | All 3 present |
|
|
58
|
-
| TEST | `
|
|
58
|
+
| TEST | `{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}` | All pass |
|
|
59
59
|
| CONFIG | Parse YAML, grep interface | Valid |
|
|
60
60
|
| HOOK | `cd packages/core && npm run build:hooks` | Exit 0 |
|
|
61
|
-
| REMOVAL | `grep -rn "[old]"
|
|
61
|
+
| REMOVAL | `grep -rn "[old]" {{paths.source}}/ | wc -l` | 0 matches |
|
|
62
62
|
|
|
63
63
|
### Step 0.4: Track Coverage Throughout
|
|
64
64
|
|
|
@@ -110,9 +110,9 @@ CS Loop is COMPLETE **only when BOTH gates pass: Code Quality AND Plan Coverage*
|
|
|
110
110
|
| Gate | Command | Result |
|
|
111
111
|
|------|---------|--------|
|
|
112
112
|
| Pattern scanner | `bash scripts/massu-pattern-scanner.sh` | Exit 0 |
|
|
113
|
-
| Type check | `
|
|
114
|
-
| Build | `
|
|
115
|
-
| Tests | `
|
|
113
|
+
| Type check | `{{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}` | 0 errors |
|
|
114
|
+
| Build | `{{verify.build | default("(this stack declares no build step)")}}` | Exit 0 |
|
|
115
|
+
| Tests | `{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}` | All pass |
|
|
116
116
|
| Hook build | `cd packages/core && npm run build:hooks` | Exit 0 |
|
|
117
117
|
|
|
118
118
|
### GATE 2: Plan Coverage Evidence
|
|
@@ -500,8 +500,8 @@ FOR EACH issue in issues WHERE priority <= P2:
|
|
|
500
500
|
- For code-level verification: run applicable VR-* checks
|
|
501
501
|
- VR-GREP: Confirm correct pattern is present
|
|
502
502
|
- VR-NEGATIVE: Confirm incorrect pattern is removed
|
|
503
|
-
- VR-BUILD:
|
|
504
|
-
- VR-TYPE:
|
|
503
|
+
- VR-BUILD: {{verify.build | default("(this stack declares no build step)")}} (must pass)
|
|
504
|
+
- VR-TYPE: {{verify.type | default("declare verification.LANG.type in massu.config.yaml")}} (must pass)
|
|
505
505
|
|
|
506
506
|
4. LOG the fix
|
|
507
507
|
- Record in fix log table (see report format below)
|
|
@@ -629,7 +629,7 @@ Timestamps MUST be in PST (America/Los_Angeles).
|
|
|
629
629
|
|
|
630
630
|
| # | Issue | Severity | File(s) Changed | Fix Applied | VR Check | Verified |
|
|
631
631
|
|---|-------|----------|-----------------|-------------|----------|----------|
|
|
632
|
-
| 1 | TypeError in DocsPage | P0 |
|
|
632
|
+
| 1 | TypeError in DocsPage | P0 | {{paths.source}}/... | Added null guard | VR-GREP | YES |
|
|
633
633
|
|
|
634
634
|
---
|
|
635
635
|
|
|
@@ -653,8 +653,8 @@ Timestamps MUST be in PST (America/Los_Angeles).
|
|
|
653
653
|
|
|
654
654
|
| Check | Command | Result |
|
|
655
655
|
|-------|---------|--------|
|
|
656
|
-
| Build |
|
|
657
|
-
| Types |
|
|
656
|
+
| Build | {{verify.build | default("(this stack declares no build step)")}} | Exit 0 / PENDING |
|
|
657
|
+
| Types | {{verify.type | default("declare verification.LANG.type in massu.config.yaml")}} | 0 errors / PENDING |
|
|
658
658
|
| Browser Retest | Console errors after reload | 0 / PENDING DEPLOY |
|
|
659
659
|
```
|
|
660
660
|
|
package/commands/massu-loop.md
CHANGED
|
@@ -59,7 +59,7 @@ Execute task/plan autonomously with **verified proof at every step**. Continue u
|
|
|
59
59
|
|
|
60
60
|
## COMPLETION MANDATE
|
|
61
61
|
|
|
62
|
-
Loop does NOT stop until: (1) every plan item verified 100%, (2) every VR-* check passes with proof, (3) pattern scanner 0 violations, (4) type check passes, (5) ALL tests pass (
|
|
62
|
+
Loop does NOT stop until: (1) every plan item verified 100%, (2) every VR-* check passes with proof, (3) pattern scanner 0 violations, (4) type check passes, (5) ALL tests pass ({{verify.test | default("declare verification.LANG.test in massu.config.yaml")}} exit 0), (6) hook build succeeds. Test failures must be fixed regardless of origin. No deferral, no "should I continue?", no partial progress reports. Register features with massu_sentinel (CR-11).
|
|
63
63
|
|
|
64
64
|
---
|
|
65
65
|
|
|
@@ -172,25 +172,7 @@ Before starting, determine what the feature needs:
|
|
|
172
172
|
```markdown
|
|
173
173
|
### Feature: [FEATURE_NAME]
|
|
174
174
|
|
|
175
|
-
|
|
176
|
-
- [ ] Tool module file (packages/core/src/[feature].ts)
|
|
177
|
-
- [ ] Tool definitions (getXToolDefinitions)
|
|
178
|
-
- [ ] Tool name matcher (isXTool)
|
|
179
|
-
- [ ] Tool handler (handleXToolCall)
|
|
180
|
-
- [ ] Wire into tools.ts
|
|
181
|
-
- [ ] Input schemas
|
|
182
|
-
- [ ] Config integration
|
|
183
|
-
- [ ] Tests (packages/core/src/__tests__/[feature].test.ts)
|
|
184
|
-
- [ ] Documentation
|
|
185
|
-
|
|
186
|
-
#### Patterns to Apply (MANDATORY)
|
|
187
|
-
|
|
188
|
-
**Tool Registration Patterns:**
|
|
189
|
-
- [ ] 3-function pattern (getDefs + isTool + handleCall)
|
|
190
|
-
- [ ] Config-driven tool prefix via getConfig().toolPrefix
|
|
191
|
-
- [ ] Wire definitions into getToolDefinitions() in tools.ts
|
|
192
|
-
- [ ] Wire handler into handleToolCall() in tools.ts
|
|
193
|
-
- [ ] stripPrefix() for base name matching
|
|
175
|
+
{{> feature-components}}
|
|
194
176
|
|
|
195
177
|
**Database Patterns:**
|
|
196
178
|
- [ ] getMemoryDb() with try/finally for memory operations
|
|
@@ -234,7 +216,7 @@ Based on feature type, load relevant patterns from CLAUDE.md:
|
|
|
234
216
|
ls packages/core/src/*[feature]* 2>/dev/null
|
|
235
217
|
|
|
236
218
|
# Find modules with similar functionality
|
|
237
|
-
grep -rln "[functionality]"
|
|
219
|
+
grep -rln "[functionality]" {{paths.source}}/ | head -20
|
|
238
220
|
|
|
239
221
|
# Check existing tool modules
|
|
240
222
|
grep "ToolDefinitions" packages/core/src/*.ts
|
|
@@ -359,7 +341,7 @@ describe('[feature] tools', () => {
|
|
|
359
341
|
### 2.2 Verify Tests
|
|
360
342
|
```bash
|
|
361
343
|
# Run tests
|
|
362
|
-
|
|
344
|
+
{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}
|
|
363
345
|
|
|
364
346
|
# Verify test file exists
|
|
365
347
|
ls -la packages/core/src/__tests__/[feature].test.ts
|
|
@@ -375,16 +357,16 @@ ls -la packages/core/src/__tests__/[feature].test.ts
|
|
|
375
357
|
bash scripts/massu-pattern-scanner.sh
|
|
376
358
|
|
|
377
359
|
# Type check
|
|
378
|
-
|
|
360
|
+
{{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}
|
|
379
361
|
|
|
380
362
|
# Build (includes hook compilation)
|
|
381
|
-
|
|
363
|
+
{{verify.build | default("(this stack declares no build step)")}}
|
|
382
364
|
|
|
383
365
|
# Hook build
|
|
384
366
|
cd packages/core && npm run build:hooks
|
|
385
367
|
|
|
386
368
|
# Tests
|
|
387
|
-
|
|
369
|
+
{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}
|
|
388
370
|
```
|
|
389
371
|
|
|
390
372
|
### 3.2 Tool Registration Verification (VR-TOOL-REG)
|
package/commands/massu-perf.md
CHANGED
|
@@ -141,7 +141,7 @@ grep -rn "take:\s*[0-9]\{3,\}" src/
|
|
|
141
141
|
### 2.1 Bundle Analysis
|
|
142
142
|
```bash
|
|
143
143
|
# Analyze bundle size
|
|
144
|
-
|
|
144
|
+
{{verify.build | default("(this stack declares no build step)")}} 2>&1 | grep -A 50 "Route\|Size"
|
|
145
145
|
|
|
146
146
|
# Check for large dependencies
|
|
147
147
|
npm ls --depth=0 | head -30
|