@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.
Files changed (92) hide show
  1. package/CHANGELOG.md +240 -0
  2. package/agents/massu-output-scorer.md +2 -2
  3. package/agents/massu-plan-auditor.md +1 -1
  4. package/commands/_shared-references/test-first-protocol.md +4 -4
  5. package/commands/_shared-references/verification-table.md +5 -5
  6. package/commands/massu-audit-deps.md +2 -2
  7. package/commands/massu-batch.md +3 -3
  8. package/commands/massu-checkpoint.md +7 -7
  9. package/commands/massu-ci-fix.md +1 -1
  10. package/commands/massu-cleanup.md +16 -16
  11. package/commands/massu-commit.md +7 -7
  12. package/commands/massu-create-plan.md +7 -7
  13. package/commands/massu-dead-code.md +3 -3
  14. package/commands/massu-debug/references/common-shortcuts.md +1 -1
  15. package/commands/massu-debug/references/investigation-phases.md +4 -4
  16. package/commands/massu-debug/references/report-format.md +2 -2
  17. package/commands/massu-deploy.md +1 -1
  18. package/commands/massu-deps.md +5 -5
  19. package/commands/massu-doc-gen.md +3 -3
  20. package/commands/massu-docs.md +6 -6
  21. package/commands/massu-estimate.md +3 -3
  22. package/commands/massu-golden-path/references/competitive-mode.md +2 -2
  23. package/commands/massu-golden-path/references/phase-1-plan-creation.md +1 -1
  24. package/commands/massu-golden-path/references/phase-2-implementation.md +2 -2
  25. package/commands/massu-golden-path/references/phase-4-commit.md +3 -3
  26. package/commands/massu-golden-path/references/phase-5-push.md +5 -5
  27. package/commands/massu-guide.md +3 -3
  28. package/commands/massu-hotfix.md +14 -14
  29. package/commands/massu-loop/references/checkpoint-audit.md +3 -3
  30. package/commands/massu-loop/references/iteration-structure.md +3 -3
  31. package/commands/massu-loop/references/loop-controller.md +5 -5
  32. package/commands/massu-loop/references/plan-extraction.md +4 -4
  33. package/commands/massu-loop/references/vr-plan-spec.md +3 -3
  34. package/commands/massu-loop-playwright.md +5 -5
  35. package/commands/massu-loop.md +1 -1
  36. package/commands/massu-new-feature.md +6 -24
  37. package/commands/massu-perf.md +1 -1
  38. package/commands/massu-plan.md +21 -21
  39. package/commands/massu-push-light.md +9 -9
  40. package/commands/massu-recap.md +1 -1
  41. package/commands/massu-refactor.md +8 -8
  42. package/commands/massu-release.md +3 -3
  43. package/commands/massu-review.md +1 -1
  44. package/commands/massu-rollback.md +6 -6
  45. package/commands/massu-scaffold-page.md +1 -1
  46. package/commands/massu-scaffold-router.md +1 -1
  47. package/commands/massu-status.md +9 -9
  48. package/commands/massu-tdd.md +2 -2
  49. package/commands/massu-test.md +13 -13
  50. package/commands/massu-verify-playwright.md +1 -1
  51. package/commands/massu-verify.md +20 -20
  52. package/dist/cli.js +1731 -976
  53. package/dist/hooks/auto-learning-pipeline.js +745 -87
  54. package/dist/hooks/classify-failure.js +747 -45
  55. package/dist/hooks/cost-tracker.js +89 -28
  56. package/dist/hooks/fix-detector.js +536 -48
  57. package/dist/hooks/incident-pipeline.js +96 -29
  58. package/dist/hooks/intent-suggester.js +89 -28
  59. package/dist/hooks/memory-recall.js +89 -28
  60. package/dist/hooks/post-edit-context.js +137 -29
  61. package/dist/hooks/post-tool-use.js +95 -30
  62. package/dist/hooks/pre-compact.js +89 -28
  63. package/dist/hooks/pre-delete-check.js +137 -31
  64. package/dist/hooks/pre-tool-use-gate.js +271 -43
  65. package/dist/hooks/quality-event.js +89 -28
  66. package/dist/hooks/rule-enforcement-pipeline.js +89 -28
  67. package/dist/hooks/security-gate.js +219 -39
  68. package/dist/hooks/session-end.js +92 -28
  69. package/dist/hooks/session-start.js +140 -62
  70. package/dist/hooks/user-prompt.js +89 -28
  71. package/fragments/feature-components.md +15 -0
  72. package/fragments/feature-components.python.md +15 -0
  73. package/fragments/feature-components.typescript.md +15 -0
  74. package/package.json +6 -5
  75. package/patterns/testing-patterns.md +8 -8
  76. package/protocols/plan-implementation.md +2 -2
  77. package/protocols/verification.md +4 -4
  78. package/reference/lessons-learned.md +4 -4
  79. package/reference/vr-verification-reference.md +9 -9
  80. package/templates/aspnet/massu.config.yaml +2 -0
  81. package/templates/go-chi/massu.config.yaml +2 -0
  82. package/templates/multi-runtime/massu.config.yaml +4 -2
  83. package/templates/phoenix/massu.config.yaml +2 -0
  84. package/templates/python-django/massu.config.yaml +3 -1
  85. package/templates/python-fastapi/massu.config.yaml +3 -1
  86. package/templates/python-flask/massu.config.yaml +3 -1
  87. package/templates/rails/massu.config.yaml +4 -2
  88. package/templates/rust-actix/massu.config.yaml +2 -0
  89. package/templates/spring/massu.config.yaml +2 -0
  90. package/templates/swift-ios/massu.config.yaml +3 -1
  91. package/templates/ts-nestjs/massu.config.yaml +2 -0
  92. package/templates/ts-nextjs/massu.config.yaml +2 -0
@@ -33,7 +33,7 @@ Run ALL applicable VR-* verification checks and produce proof output. This comma
33
33
  **ALL tests MUST pass before verification can be marked complete. Tests are NEVER optional.**
34
34
 
35
35
  ```bash
36
- npm test
36
+ {{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}
37
37
  # Expected: Exit 0, ALL tests pass
38
38
  ```
39
39
 
@@ -114,21 +114,21 @@ grep -n "[pattern]" [file]
114
114
  ### VR-NEGATIVE: Removal Verification (CRITICAL)
115
115
  ```bash
116
116
  # For each pattern claimed to be removed:
117
- grep -rn "[removed_pattern]" packages/core/src/ | wc -l
117
+ grep -rn "[removed_pattern]" {{paths.source}}/ | wc -l
118
118
  # Expected: 0
119
119
  # Failure: Any matches found
120
120
  ```
121
121
 
122
122
  ### VR-BUILD: Build Integrity Verification
123
123
  ```bash
124
- npm run build
124
+ {{verify.build | default("(this stack declares no build step)")}}
125
125
  # Expected: Exit 0, "Build complete" message
126
126
  # Failure: Exit non-zero or errors
127
127
  ```
128
128
 
129
129
  ### VR-TYPE: Type Safety Verification
130
130
  ```bash
131
- npx tsc --noEmit
131
+ {{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}
132
132
  # Expected: 0 errors
133
133
  # Failure: Any type errors
134
134
  ```
@@ -149,10 +149,10 @@ grep -c "[pattern]" [file]
149
149
  node -e "const yaml = require('yaml'); const fs = require('fs'); yaml.parse(fs.readFileSync('massu.config.yaml', 'utf-8'));"
150
150
 
151
151
  # VR-CONFIG-002: Extract ALL config keys used in code
152
- grep -rn "getConfig()" packages/core/src/ | sed 's/.*\(config\.[a-zA-Z_]*\).*/\1/' | sort -u
152
+ grep -rn "getConfig()" {{paths.source}}/ | sed 's/.*\(config\.[a-zA-Z_]*\).*/\1/' | sort -u
153
153
 
154
154
  # VR-CONFIG-003: Verify config values match code expectations
155
- grep -rn "toolPrefix\|config\." packages/core/src/ | head -20
155
+ grep -rn "toolPrefix\|config\." {{paths.source}}/ | head -20
156
156
  ```
157
157
 
158
158
  **VR-CONFIG Alignment Checklist:**
@@ -209,14 +209,14 @@ grep "<ComponentName" src/app/**/page.tsx
209
209
  ### VR-INTEGRATION: Full Integration Verification
210
210
  ```bash
211
211
  # Module is imported AND registered AND build passes
212
- grep "[ModuleName]" packages/core/src/tools.ts && npm run build
212
+ grep "[ModuleName]" packages/core/src/tools.ts && {{verify.build | default("(this stack declares no build step)")}}
213
213
  # Expected: Both checks pass
214
214
  ```
215
215
 
216
216
  ### VR-REUSE: Component/Code Reuse Verification
217
217
  ```bash
218
218
  # BEFORE creating new module, search for existing:
219
- grep -rn "[functionality]" packages/core/src/
219
+ grep -rn "[functionality]" {{paths.source}}/
220
220
 
221
221
  # Expected: Use existing or document why new needed
222
222
  ```
@@ -343,7 +343,7 @@ grep -A 10 "[procedure]:" src/server/api/routers/[router].ts | grep "input"
343
343
 
344
344
  ```bash
345
345
  # Step 1: Find all env var usage
346
- grep -rn "process.env\." packages/core/src/ src/ | sed 's/.*\(process\.env\.[a-zA-Z_]*\).*/\1/' | sort -u
346
+ grep -rn "process.env\." {{paths.source}}/ src/ | sed 's/.*\(process\.env\.[a-zA-Z_]*\).*/\1/' | sort -u
347
347
 
348
348
  # Step 2: Compare to .env.example
349
349
  cat .env.example | grep -v "^#" | cut -d= -f1 | sort
@@ -388,8 +388,8 @@ For each feature/change:
388
388
 
389
389
  ```bash
390
390
  # Find code defaults
391
- grep -rn "default:" packages/core/src/
392
- grep -rn "?? '" packages/core/src/ | grep -v node_modules
391
+ grep -rn "default:" {{paths.source}}/
392
+ grep -rn "?? '" {{paths.source}}/ | grep -v node_modules
393
393
  ```
394
394
 
395
395
  ```markdown
@@ -409,7 +409,7 @@ Read the plan document and extract ALL deliverables:
409
409
 
410
410
  | Item # | Type | Description | Expected Location | Verification | Status |
411
411
  |--------|------|-------------|-------------------|--------------|--------|
412
- | P-001 | FILE | module.ts | packages/core/src/ | ls -la | PENDING |
412
+ | P-001 | FILE | module.ts | {{paths.source}}/ | ls -la | PENDING |
413
413
  | P-002 | TOOL | tool_action | tools.ts | grep | PENDING |
414
414
  | P-003 | REMOVAL | old_pattern | all files | grep = 0 | PENDING |
415
415
 
@@ -459,7 +459,7 @@ git diff --cached --name-only | grep -E '\.(env|pem|key|secret)' && echo "FAIL:
459
459
 
460
460
  ### No Credentials in Code
461
461
  ```bash
462
- grep -rn "sk-\|password.*=.*['\"]" --include="*.ts" --include="*.tsx" packages/core/src/ src/ | grep -v "process.env" | wc -l
462
+ grep -rn "sk-\|password.*=.*['\"]" --include="*.ts" --include="*.tsx" {{paths.source}}/ src/ | grep -v "process.env" | wc -l
463
463
  # Expected: 0
464
464
  ```
465
465
 
@@ -501,7 +501,7 @@ grep -rn "sk-\|password.*=.*['\"]" --include="*.ts" --include="*.tsx" packages/c
501
501
 
502
502
  ## VR-BUILD Verification
503
503
  ```bash
504
- npm run build
504
+ {{verify.build | default("(this stack declares no build step)")}}
505
505
  ```
506
506
  **Status**: PASS/FAIL
507
507
  **Output**: [build output summary]
@@ -510,7 +510,7 @@ npm run build
510
510
 
511
511
  ## VR-TYPE Verification
512
512
  ```bash
513
- npx tsc --noEmit
513
+ {{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}
514
514
  ```
515
515
  **Status**: PASS/FAIL
516
516
  **Errors**: 0/N
@@ -600,8 +600,8 @@ For faster verification, use **Task agents** to run independent checks simultane
600
600
  ```markdown
601
601
  ### Launch Parallel Verification Agents (single message, all at once)
602
602
  - Agent 1: "Run pattern scanner" -> bash scripts/massu-pattern-scanner.sh
603
- - Agent 2: "Run TypeScript check" -> npx tsc --noEmit
604
- - Agent 3: "Run unit tests" -> npm test
603
+ - Agent 2: "Run TypeScript check" -> {{verify.type | default("declare verification.LANG.type in massu.config.yaml")}}
604
+ - Agent 3: "Run unit tests" -> {{verify.test | default("declare verification.LANG.test in massu.config.yaml")}}
605
605
  ```
606
606
 
607
607
  ### Benefits
@@ -620,8 +620,8 @@ For quick checks without full report:
620
620
  ```bash
621
621
  # Run all critical checks
622
622
  bash scripts/massu-pattern-scanner.sh && \
623
- npx tsc --noEmit && \
624
- npm run build && \
623
+ {{verify.type | default("declare verification.LANG.type in massu.config.yaml")}} && \
624
+ {{verify.build | default("(this stack declares no build step)")}} && \
625
625
  echo "QUICK VERIFY: PASS"
626
626
  ```
627
627
 
@@ -750,7 +750,7 @@ Update session state with the WRONG vs CORRECT pattern discovered.
750
750
  If the bad pattern is detectable by grep, add check to `scripts/massu-pattern-scanner.sh`.
751
751
 
752
752
  ### Step 3: Search Codebase-Wide (CR-9)
753
- `grep -rn "[bad_pattern]" packages/core/src/` - fix ALL instances of the same issue.
753
+ `grep -rn "[bad_pattern]" {{paths.source}}/` - fix ALL instances of the same issue.
754
754
 
755
755
  ---
756
756