@massu/core 2.5.2 → 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 +70 -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 +1265 -876
- package/dist/hooks/auto-learning-pipeline.js +517 -56
- package/dist/hooks/classify-failure.js +495 -47
- package/dist/hooks/cost-tracker.js +65 -27
- package/dist/hooks/fix-detector.js +496 -47
- package/dist/hooks/incident-pipeline.js +72 -28
- package/dist/hooks/intent-suggester.js +65 -27
- package/dist/hooks/memory-recall.js +65 -27
- package/dist/hooks/post-edit-context.js +65 -27
- package/dist/hooks/post-tool-use.js +70 -29
- package/dist/hooks/pre-compact.js +65 -27
- package/dist/hooks/pre-delete-check.js +65 -27
- package/dist/hooks/pre-tool-use-gate.js +193 -37
- package/dist/hooks/quality-event.js +65 -27
- package/dist/hooks/rule-enforcement-pipeline.js +65 -27
- package/dist/hooks/security-gate.js +197 -38
- package/dist/hooks/session-end.js +68 -27
- package/dist/hooks/session-start.js +116 -61
- package/dist/hooks/user-prompt.js +65 -27
- 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
|
@@ -453,7 +453,7 @@ it('should update order', () => {
|
|
|
453
453
|
{
|
|
454
454
|
"lint-staged": {
|
|
455
455
|
"*.{ts,tsx}": [
|
|
456
|
-
"
|
|
456
|
+
"{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}} -- --related --run",
|
|
457
457
|
"npm run type-check",
|
|
458
458
|
"npm run lint --fix"
|
|
459
459
|
]
|
|
@@ -465,16 +465,16 @@ it('should update order', () => {
|
|
|
465
465
|
|
|
466
466
|
```bash
|
|
467
467
|
# Before starting work
|
|
468
|
-
git pull origin main && npm install &&
|
|
468
|
+
git pull origin main && npm install && {{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}
|
|
469
469
|
|
|
470
470
|
# During development
|
|
471
|
-
|
|
471
|
+
{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}} -- --watch
|
|
472
472
|
|
|
473
473
|
# Before committing
|
|
474
|
-
|
|
474
|
+
{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}} && npm run type-check && npm run lint
|
|
475
475
|
|
|
476
476
|
# Before pushing
|
|
477
|
-
|
|
477
|
+
{{verify.build | default("(this stack declares no build step)")}}
|
|
478
478
|
```
|
|
479
479
|
|
|
480
480
|
---
|
|
@@ -558,11 +558,11 @@ it('should submit form', async () => {
|
|
|
558
558
|
| Payment processing | E2E | `tests/e2e/critical/` |
|
|
559
559
|
|
|
560
560
|
```bash
|
|
561
|
-
|
|
562
|
-
|
|
561
|
+
{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}} # All unit + integration tests
|
|
562
|
+
{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}} -- --watch # Watch mode
|
|
563
563
|
npm run test:e2e # E2E tests
|
|
564
564
|
npm run type-check # TypeScript validation
|
|
565
|
-
|
|
565
|
+
{{verify.build | default("(this stack declares no build step)")}} # Verify production build
|
|
566
566
|
```
|
|
567
567
|
|
|
568
568
|
---
|
|
@@ -156,8 +156,8 @@ If plan says "Add to pages: A, B, C, D, E":
|
|
|
156
156
|
|
|
157
157
|
### Step 5: Run Build and Type Check
|
|
158
158
|
```bash
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
{{verify.build | default("(this stack declares no build step)")}} # VR-BUILD
|
|
160
|
+
{{verify.type | default("declare verification.LANG.type in massu.config.yaml")}} # VR-TYPE
|
|
161
161
|
```
|
|
162
162
|
|
|
163
163
|
### Step 6: Complete Verification Template
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
| VR-FILE | `ls -la [path]` | File exists | Claiming file created |
|
|
16
16
|
| VR-GREP | `grep "[pattern]" [file]` | Match found | Claiming code added |
|
|
17
17
|
| VR-NEGATIVE | `grep -rn "[old]" src/` | 0 matches | Claiming removal |
|
|
18
|
-
| VR-BUILD | `
|
|
19
|
-
| VR-TYPE | `
|
|
20
|
-
| VR-TEST | `
|
|
18
|
+
| VR-BUILD | `{{verify.build | default("(this stack declares no build step)")}}` | Exit 0 | Claiming production ready |
|
|
19
|
+
| VR-TYPE | `{{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}` | 0 errors | Claiming type safety |
|
|
20
|
+
| VR-TEST | `{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}` | All pass | Claiming tested |
|
|
21
21
|
| VR-DEPLOY | `./scripts/pre-deploy-check.sh` | All pass | Claiming deployable |
|
|
22
22
|
| VR-SCHEMA | `SELECT ... FROM information_schema` | Matches expectation | Before DB operations |
|
|
23
23
|
| VR-COUNT | `grep -c "[pattern]" [file]` | Expected count | Verifying all instances |
|
|
@@ -358,7 +358,7 @@ After any verification run, if issues found:
|
|
|
358
358
|
|
|
359
359
|
**Verification (VR-TEST):**
|
|
360
360
|
```bash
|
|
361
|
-
|
|
361
|
+
{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}
|
|
362
362
|
# Expected: Exit 0, ALL tests pass
|
|
363
363
|
# If ANY test fails, work is NOT complete
|
|
364
364
|
```
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
- Application completely broken for all users
|
|
48
48
|
|
|
49
49
|
**Root Cause:**
|
|
50
|
-
- Did not run `
|
|
50
|
+
- Did not run `{{verify.build | default("(this stack declares no build step)")}}` before pushing previous commit
|
|
51
51
|
- Assumed partial checks (type-check, prevention tests) were sufficient
|
|
52
52
|
- Did not analyze full import graph for client/server separation
|
|
53
53
|
- Did not test production build locally before deploying
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
- Zero users could access application
|
|
60
60
|
|
|
61
61
|
**Lessons:**
|
|
62
|
-
1. **ALWAYS run `
|
|
62
|
+
1. **ALWAYS run `{{verify.build | default("(this stack declares no build step)")}}` before pushing** - No exceptions
|
|
63
63
|
2. **Trace client import chains** - Verify no server code imported
|
|
64
|
-
3. **Test production build locally** - Run `
|
|
64
|
+
3. **Test production build locally** - Run `{{verify.build | default("(this stack declares no build step)")}} && npm start`
|
|
65
65
|
4. **ESLint warnings = deployment blockers** - Zero tolerance
|
|
66
66
|
5. **Import chain analysis required** - Client components must not transitively import server code
|
|
67
67
|
6. **Lazy-loading for external services** - Never instantiate at module load time
|
|
@@ -143,7 +143,7 @@ When encountering errors:
|
|
|
143
143
|
|
|
144
144
|
## Build Timeout Protocol
|
|
145
145
|
|
|
146
|
-
If `
|
|
146
|
+
If `{{verify.build | default("(this stack declares no build step)")}}` times out:
|
|
147
147
|
|
|
148
148
|
1. **DO NOT** assume it's just slow
|
|
149
149
|
2. **DO NOT** skip to other checks
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
| VR-FILE | `ls -la [path]` | File exists | Claiming file created | Missing files |
|
|
30
30
|
| VR-GREP | `grep "[pattern]" [file]` | Match found | Claiming code added | Missing code |
|
|
31
31
|
| VR-NEGATIVE | `grep -rn "[old]" src/` | 0 matches | Claiming removal | Leftover code |
|
|
32
|
-
| VR-BUILD | `
|
|
33
|
-
| VR-TYPE | `
|
|
34
|
-
| VR-TEST | `
|
|
32
|
+
| VR-BUILD | `{{verify.build | default("(this stack declares no build step)")}}` | Exit 0 | Claiming production ready | Build failures |
|
|
33
|
+
| VR-TYPE | `{{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}` | 0 errors | Claiming type safety | Type errors |
|
|
34
|
+
| VR-TEST | `{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}` | All pass | Claiming tested | Test failures |
|
|
35
35
|
| VR-DEPLOY | `./scripts/pre-deploy-check.sh` | All pass | Claiming deployable | Deploy blockers |
|
|
36
36
|
| VR-SCHEMA | `SELECT ... FROM information_schema` | Matches | Before DB operations | Schema mismatches |
|
|
37
37
|
| VR-SCHEMA-PRE | `SELECT column_name...` | Columns exist | BEFORE writing ANY query | Wrong column names |
|
|
@@ -129,7 +129,7 @@ grep -rn "legacyPattern" src/ | wc -l
|
|
|
129
129
|
**Purpose**: Verify code compiles for production deployment.
|
|
130
130
|
|
|
131
131
|
```bash
|
|
132
|
-
|
|
132
|
+
{{verify.build | default("(this stack declares no build step)")}}
|
|
133
133
|
# Expected: Exit 0, "Compiled successfully"
|
|
134
134
|
```
|
|
135
135
|
|
|
@@ -145,7 +145,7 @@ npm run build
|
|
|
145
145
|
**Purpose**: Verify zero TypeScript errors.
|
|
146
146
|
|
|
147
147
|
```bash
|
|
148
|
-
NODE_OPTIONS="--max-old-space-size=8192"
|
|
148
|
+
NODE_OPTIONS="--max-old-space-size=8192" {{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}
|
|
149
149
|
# Expected: 0 errors (no output)
|
|
150
150
|
```
|
|
151
151
|
|
|
@@ -166,7 +166,7 @@ npm run test:run
|
|
|
166
166
|
npm run test:e2e
|
|
167
167
|
|
|
168
168
|
# Specific test file
|
|
169
|
-
|
|
169
|
+
{{verify.test | default("declare verification.LANG.test in massu.config.yaml")}} -- src/components/feature/__tests__/MyComponent.test.tsx
|
|
170
170
|
```
|
|
171
171
|
|
|
172
172
|
**Expected Output**: All tests pass
|
|
@@ -279,12 +279,12 @@ grep "<MyComponent" src/app/**/page.tsx
|
|
|
279
279
|
|
|
280
280
|
```bash
|
|
281
281
|
# Combined check
|
|
282
|
-
grep "<MyComponent" src/app/feature/page.tsx &&
|
|
282
|
+
grep "<MyComponent" src/app/feature/page.tsx && {{verify.build | default("(this stack declares no build step)")}}
|
|
283
283
|
|
|
284
284
|
# Full integration verification
|
|
285
285
|
grep "import.*MyComponent" src/app/feature/page.tsx && \
|
|
286
286
|
grep "<MyComponent" src/app/feature/page.tsx && \
|
|
287
|
-
|
|
287
|
+
{{verify.build | default("(this stack declares no build step)")}}
|
|
288
288
|
```
|
|
289
289
|
|
|
290
290
|
**Expected Output**: All checks pass
|
|
@@ -849,7 +849,7 @@ When running verifications, document results in this format:
|
|
|
849
849
|
|---------|---------|----------|--------|--------|
|
|
850
850
|
| VR-FILE | `ls -la component.tsx` | File exists | File exists | PASS |
|
|
851
851
|
| VR-RENDER | `grep "<Component" page.tsx` | Match found | Match line 42 | PASS |
|
|
852
|
-
| VR-BUILD | `
|
|
852
|
+
| VR-BUILD | `{{verify.build | default("(this stack declares no build step)")}}` | Exit 0 | Exit 0 | PASS |
|
|
853
853
|
| VR-NEGATIVE | `grep "oldCode" src/` | 0 matches | 3 matches | **FAIL** |
|
|
854
854
|
|
|
855
855
|
**Overall Status**: FAIL (VR-NEGATIVE failed)
|
|
@@ -31,6 +31,8 @@ paths:
|
|
|
31
31
|
# — projects opt into it explicitly. Default to `.` so fresh `npx
|
|
32
32
|
# massu init` doesn't fail on `paths.source 'src' does not exist`.
|
|
33
33
|
source: .
|
|
34
|
+
# the .NET convention is a sibling test project; `dotnet test` discovers it
|
|
35
|
+
tests: Tests
|
|
34
36
|
aliases: {}
|
|
35
37
|
|
|
36
38
|
toolPrefix: massu
|
|
@@ -37,6 +37,8 @@ framework:
|
|
|
37
37
|
|
|
38
38
|
paths:
|
|
39
39
|
source: apps
|
|
40
|
+
# pytest default discovery under the api app, matching paths.source apps
|
|
41
|
+
tests: apps/api/tests
|
|
40
42
|
aliases:
|
|
41
43
|
"@": apps
|
|
42
44
|
|
|
@@ -50,7 +52,7 @@ verification:
|
|
|
50
52
|
python:
|
|
51
53
|
test: cd apps/api && python3 -m pytest -q
|
|
52
54
|
type: cd apps/api && python3 -m mypy .
|
|
53
|
-
syntax: cd apps/api && python3 -m
|
|
55
|
+
syntax: cd apps/api && python3 -m compileall -q .
|
|
54
56
|
lint: cd apps/api && python3 -m ruff check .
|
|
55
57
|
typescript:
|
|
56
58
|
test: cd apps/web && npm test
|
|
@@ -65,7 +67,7 @@ verification:
|
|
|
65
67
|
swift:
|
|
66
68
|
test: cd apps/ios && swift test
|
|
67
69
|
type: cd apps/ios && swift build
|
|
68
|
-
build: cd apps/ios &&
|
|
70
|
+
build: cd apps/ios && swift build -c release
|
|
69
71
|
lint: cd apps/ios && swiftlint
|
|
70
72
|
|
|
71
73
|
python:
|
|
@@ -22,6 +22,8 @@ framework:
|
|
|
22
22
|
|
|
23
23
|
paths:
|
|
24
24
|
source: src
|
|
25
|
+
# pytest-django discovery under the declared source root
|
|
26
|
+
tests: src/tests
|
|
25
27
|
aliases:
|
|
26
28
|
"@": src
|
|
27
29
|
|
|
@@ -35,7 +37,7 @@ verification:
|
|
|
35
37
|
python:
|
|
36
38
|
test: cd src && python3 -m pytest -q
|
|
37
39
|
type: cd src && python3 -m mypy .
|
|
38
|
-
syntax: cd src && python3 -m
|
|
40
|
+
syntax: cd src && python3 -m compileall -q .
|
|
39
41
|
lint: cd src && python3 -m ruff check .
|
|
40
42
|
|
|
41
43
|
python:
|
|
@@ -22,6 +22,8 @@ framework:
|
|
|
22
22
|
|
|
23
23
|
paths:
|
|
24
24
|
source: app
|
|
25
|
+
# FastAPI's own testing guide puts tests/ at the project root
|
|
26
|
+
tests: tests
|
|
25
27
|
aliases:
|
|
26
28
|
"@": app
|
|
27
29
|
|
|
@@ -35,7 +37,7 @@ verification:
|
|
|
35
37
|
python:
|
|
36
38
|
test: cd app && python3 -m pytest -q
|
|
37
39
|
type: cd app && python3 -m mypy .
|
|
38
|
-
syntax: cd app && python3 -m
|
|
40
|
+
syntax: cd app && python3 -m compileall -q .
|
|
39
41
|
lint: cd app && python3 -m ruff check .
|
|
40
42
|
|
|
41
43
|
python:
|
|
@@ -23,6 +23,8 @@ framework:
|
|
|
23
23
|
|
|
24
24
|
paths:
|
|
25
25
|
source: app
|
|
26
|
+
# Flask's testing docs use a top-level tests/ package
|
|
27
|
+
tests: tests
|
|
26
28
|
aliases:
|
|
27
29
|
"@": app
|
|
28
30
|
|
|
@@ -36,7 +38,7 @@ verification:
|
|
|
36
38
|
python:
|
|
37
39
|
test: cd app && python3 -m pytest -q
|
|
38
40
|
type: cd app && python3 -m mypy .
|
|
39
|
-
syntax: cd app && python3 -m
|
|
41
|
+
syntax: cd app && python3 -m compileall -q .
|
|
40
42
|
lint: cd app && python3 -m ruff check .
|
|
41
43
|
|
|
42
44
|
python:
|
|
@@ -25,6 +25,8 @@ framework:
|
|
|
25
25
|
|
|
26
26
|
paths:
|
|
27
27
|
source: app
|
|
28
|
+
# Minitest is the Rails default and `bin/rails test` reads test/
|
|
29
|
+
tests: test
|
|
28
30
|
aliases: {}
|
|
29
31
|
|
|
30
32
|
toolPrefix: massu
|
|
@@ -35,9 +37,9 @@ rules: []
|
|
|
35
37
|
|
|
36
38
|
verification:
|
|
37
39
|
ruby:
|
|
38
|
-
test:
|
|
40
|
+
test: bin/rails test
|
|
39
41
|
type: bundle exec sorbet tc
|
|
40
|
-
syntax:
|
|
42
|
+
syntax: find app lib -name '*.rb' -print0 | xargs -0 -n1 ruby -c > /dev/null
|
|
41
43
|
lint: bundle exec rubocop
|
|
42
44
|
|
|
43
45
|
ruby:
|
|
@@ -20,6 +20,8 @@ framework:
|
|
|
20
20
|
|
|
21
21
|
paths:
|
|
22
22
|
source: Sources
|
|
23
|
+
# SwiftPM reserves Tests/ and `swift test` requires it
|
|
24
|
+
tests: Tests
|
|
23
25
|
aliases:
|
|
24
26
|
"@": Sources
|
|
25
27
|
|
|
@@ -33,5 +35,5 @@ verification:
|
|
|
33
35
|
swift:
|
|
34
36
|
test: swift test
|
|
35
37
|
type: swift build
|
|
36
|
-
build:
|
|
38
|
+
build: swift build -c release
|
|
37
39
|
lint: swiftlint
|