@massu/core 0.6.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.
@@ -23,6 +23,9 @@
23
23
  | VR-BROWSER | Playwright: navigate, snapshot, console_messages, interact | 0 errors, UI works | ANY UI fix/change (CR-41) |
24
24
  | VR-SPEC-MATCH | Grep for EXACT CSS classes/structure from plan | All plan-specified strings found | UI plan items (CR-42) |
25
25
  | VR-PIPELINE | Trigger pipeline procedure, verify non-empty output | Output contains data | Data pipeline features (CR-43) |
26
+ | VR-BOOT | Start service via launchctl/python, wait 5s, check process alive + exit 0 | Process running after 5s | ANY plan item creating/modifying a daemon, LaunchAgent, or service (CR-44) |
27
+ | VR-DEPS | Verify `.venv/bin/python3` exists + all imports in main.py are importable | All imports resolve | ANY Python service with a venv-based plist (CR-44) |
28
+ | VR-COMPAT | Check Python version vs syntax used (`\|` unions require 3.10+, `match` requires 3.10+) | No version-incompatible syntax | Python services on systems with Python < 3.10 (CR-44) |
26
29
 
27
30
  **Full VR-* reference (50+ types)**: [reference/vr-verification-reference.md](../../reference/vr-verification-reference.md)
28
31
 
@@ -199,6 +199,12 @@ WHILE true:
199
199
  VR-PIPELINE: For features with data pipelines (AI, cron, generation),
200
200
  trigger the pipeline procedure and verify output is non-empty. Empty = gap.
201
201
 
202
+ VR-BOOT (CR-44): For ANY plan item that creates/modifies a daemon,
203
+ LaunchAgent, or service: actually start it and verify it stays alive for 5s.
204
+ Check: venv exists, imports resolve, process exit code 0, no stderr crashes.
205
+ Static verification CANNOT catch missing venvs, missing pip packages, or
206
+ Python version incompatibilities. This check is MANDATORY for service items.
207
+
202
208
  SPRINT CONTRACT VERIFICATION: For each plan item with a sprint contract
203
209
  (from Phase 2A.5), verify EVERY acceptance criterion is met:
204
210
  - Read the contract's acceptance criteria list
@@ -91,6 +91,20 @@ WHILE iteration < MAX_ITERATIONS:
91
91
  - Background-only features (crons, webhooks): WRITE->STORE->READ sufficient
92
92
  - Query-only features (read views): READ->DISPLAY sufficient
93
93
 
94
+ I. RUNTIME & BOOT VERIFICATION (CR-44, Incident 2026-03-29)
95
+ - For EACH service that was created, modified, or registered in this session:
96
+ 1. VR-DEPS: Verify .venv/bin/python3 exists (if plist references it)
97
+ 2. VR-DEPS: Parse imports from main.py, verify each is installed in the venv
98
+ 3. VR-COMPAT: Check for Python 3.10+ syntax (x | None, match/case) on Python 3.9 systems
99
+ 4. VR-BOOT: Actually start the service (launchctl bootstrap or direct python), wait 5s, verify:
100
+ - Process is still alive (pgrep)
101
+ - Exit code is 0 (launchctl list | grep service)
102
+ - stderr log has no import errors or crashes
103
+ 5. If boot fails: read stderr log, diagnose (missing package? wrong path? syntax error?), fix, retry
104
+ - Skip condition: plan has NO service/daemon/LaunchAgent items
105
+ - This category exists because static verification (VR-SYNTAX, VR-GREP) cannot catch:
106
+ missing venvs, missing pip packages, Python version incompatibilities, or runtime import errors
107
+
94
108
  H. SPRINT CONTRACT COMPLIANCE (if contracts exist from Phase 2A.5)
95
109
  - Read the sprint contracts from the Phase 2A tracking table
96
110
  - For EACH plan item with a sprint contract:
@@ -0,0 +1,108 @@
1
+ # Phase 3.5: Deep Security Audit
2
+
3
+ > Reference doc for `/massu-golden-path`. Return to main file for overview.
4
+
5
+ ```
6
+ [GOLDEN PATH -- PHASE 3.5: DEEP SECURITY AUDIT]
7
+ ```
8
+
9
+ ## Purpose
10
+
11
+ Run a full adversarial security audit loop against ALL files changed in this golden path run. This is a deep, iterative audit with parallel red-team agents that converges to zero findings. It runs AFTER simplification (Phase 3) so the audit targets the final, cleaned-up code -- and BEFORE pre-commit verification (Phase 4) so all security fixes are included in the verification gates.
12
+
13
+ **This phase is NEVER skipped.** Security is non-negotiable regardless of change size, type, or scope.
14
+
15
+ ---
16
+
17
+ ## 3.5.1 Determine Audit Scope
18
+
19
+ Collect ALL files changed during this golden path run:
20
+
21
+ ```bash
22
+ git diff --name-only HEAD
23
+ ```
24
+
25
+ If files were already committed in earlier phases, also include:
26
+ ```bash
27
+ git diff --name-only main...HEAD
28
+ ```
29
+
30
+ The audit scope is the union of all changed files. Do NOT narrow scope -- every changed file gets audited.
31
+
32
+ **Output:**
33
+ ```
34
+ SECURITY AUDIT SCOPE:
35
+ Files: [N]
36
+ [list of files]
37
+ ```
38
+
39
+ ---
40
+
41
+ ## 3.5.2 Execute Deep Security Audit
42
+
43
+ Run the full security audit protocol against the scoped files:
44
+
45
+ 1. **Launch 2-4 parallel adversarial reviewer agents** adapted to the codebase area:
46
+ - Backend/API code: 4 agents (Injection, Network/Leakage, DoS/Resources, Red Team Bypass)
47
+ - Frontend code: 3 agents (XSS/Injection, Auth/Data Exposure, Input Validation/Logic)
48
+ - Infrastructure/config: 2 agents (Secrets/Config, Dependencies/Supply Chain)
49
+
50
+ 2. **Consolidate findings** -- deduplicate across agents, take higher severity on disagreements
51
+
52
+ 3. **Fix ALL findings** -- CRITICAL first, then HIGH, MEDIUM, LOW. INFO documented only.
53
+
54
+ 4. **Verify fixes** -- import checks, input validation tests, functionality preserved
55
+
56
+ 5. **Loop until zero findings** -- max 5 iterations, escalate to user if still failing after 5
57
+
58
+ ---
59
+
60
+ ## 3.5.3 Attack Vector Coverage
61
+
62
+ Every audit iteration MUST verify the complete attack vector checklist:
63
+
64
+ ### Universal
65
+ - Hardcoded secrets / API keys / credentials
66
+ - Error messages leaking internal details
67
+ - Dependency vulnerabilities
68
+ - Input validation on ALL external boundaries
69
+
70
+ ### Backend / API
71
+ - SQL injection, command injection, path traversal
72
+ - SSRF, authentication bypass, authorization bypass
73
+ - DoS via unbounded inputs, memory leaks, race conditions
74
+ - Response validation, type confusion
75
+
76
+ ### Frontend
77
+ - XSS, open redirects, sensitive data in client state
78
+ - CSRF, client-side auth bypass
79
+
80
+ ### LLM / AI Specific
81
+ - Prompt injection, model output trust
82
+ - Tool argument injection, vision/multimodal injection
83
+
84
+ ---
85
+
86
+ ## 3.5.4 Completion Gate
87
+
88
+ The phase completes ONLY when the audit loop achieves a clean pass with zero findings.
89
+
90
+ ```
91
+ SECURITY_AUDIT_GATE: PASS
92
+ Iterations: [N]
93
+ Total findings fixed: [N]
94
+ Breakdown: [X] CRITICAL, [X] HIGH, [X] MEDIUM, [X] LOW fixed
95
+ Clean pass: Iteration [N]
96
+ ```
97
+
98
+ **Do NOT proceed to Phase 4 until SECURITY_AUDIT_GATE = PASS.**
99
+
100
+ ---
101
+
102
+ ## Rules
103
+
104
+ 1. **NEVER skip this phase** -- not for small changes, not for docs, not for config
105
+ 2. **NEVER proceed with findings unfixed** -- zero means zero
106
+ 3. **ALL severity levels get fixed** -- CRITICAL through LOW
107
+ 4. **No commit prompt** -- unlike standalone security audit commands, do NOT offer to commit here (Phase 4 handles commits)
108
+ 5. **Findings feed Phase 4** -- security fixes are verified by Phase 4's type check, build, lint, and secrets gates automatically
@@ -12,10 +12,10 @@ name: massu-golden-path
12
12
  ## Objective
13
13
 
14
14
  Execute the COMPLETE development workflow in one continuous run:
15
- **Requirements -> Plan Creation -> Plan Audit -> Implementation -> Gap Analysis -> Simplification -> Commit -> Push**
15
+ **Requirements -> Plan Creation -> Plan Audit -> Implementation -> Gap Analysis -> Simplification -> Security Audit -> Commit -> Push**
16
16
 
17
17
  This command has FULL FEATURE PARITY with the individual commands it replaces:
18
- `/massu-create-plan` -> `/massu-plan` -> `/massu-loop` -> `/massu-loop-playwright` -> `/massu-simplify` -> `/massu-commit` -> `/massu-push`
18
+ `/massu-create-plan` -> `/massu-plan` -> `/massu-loop` -> `/massu-loop-playwright` -> `/massu-simplify` -> `/massu-security` -> `/massu-commit` -> `/massu-push`
19
19
 
20
20
  ---
21
21
 
@@ -76,6 +76,7 @@ After receiving approval, immediately continue. Do NOT ask "shall I continue?" -
76
76
  | 2-COMP | Competitive Implementation | Spawn N agents with bias presets, score, select winner (`--competitive` only) | WINNER SELECTION |
77
77
  | 2.5 | Gap & Enhancement Analysis | Find+fix gaps, UX issues, security, pattern compliance; loop until zero | -- |
78
78
  | 3 | Simplification | Pattern scanner, parallel semantic review, apply findings | -- |
79
+ | 3.5 | Deep Security Audit | Full adversarial audit loop with parallel red-team agents, iterate to zero findings | -- |
79
80
  | 4 | Pre-Commit Verification | Verification gates, quality scoring | COMMIT APPROVAL |
80
81
  | 5 | Push Verification | `scripts/push-verify.sh`, CI monitoring via `scripts/ci-status.sh` | PUSH APPROVAL |
81
82
  | 6 | Completion | Final report, plan update, auto-learning, feature registration | -- |
@@ -137,6 +138,14 @@ Read `references/phase-3-simplify.md` for full details.
137
138
 
138
139
  ---
139
140
 
141
+ ## PHASE 3.5: DEEP SECURITY AUDIT
142
+
143
+ Read `references/phase-3.5-security-audit.md` for full details.
144
+
145
+ **Summary**: Run a full adversarial security audit loop against ALL changed files. Launches 2-4 parallel red-team agents (injection, network/leakage, DoS, bypass) per iteration. Every finding is fixed in-place. Loop iterates until zero findings remain (max 5 iterations). This phase is NEVER skipped -- security is non-negotiable. Security fixes flow into Phase 4's verification gates automatically.
146
+
147
+ ---
148
+
140
149
  ## PHASE 4: PRE-COMMIT VERIFICATION
141
150
 
142
151
  Read `references/phase-4-commit.md` for full details.
@@ -179,6 +188,7 @@ This skill is a folder. The following files are available for reference:
179
188
  | `references/vr-visual-calibration.md` | Score 5/3/1 calibration examples for VR-VISUAL weighted dimensions | Calibrating VR-VISUAL evaluator scoring |
180
189
  | `references/phase-2.5-gap-analyzer.md` | Gap/enhancement analysis loop, 7 categories (incl. sprint contract compliance), fix-and-repass until zero | After implementation, before simplification |
181
190
  | `references/phase-3-simplify.md` | Pattern scanner fast gate, dead code detection, parallel semantic review agents | Running simplification after implementation |
191
+ | `references/phase-3.5-security-audit.md` | Deep adversarial security audit loop with parallel red-team agents, iterate to zero findings | After simplification, before commit verification |
182
192
  | `references/phase-4-commit.md` | Verification gates, quality scoring, commit format | Preparing a commit |
183
193
  | `references/phase-5-push.md` | Pre-flight, push verification, regression detection | Preparing to push to remote |
184
194
  | `references/phase-6-completion.md` | Final report, plan status update, auto-learning, feature registration | After all verification; completing the golden path |
@@ -232,6 +242,7 @@ AUTHORIZED_COMMAND: massu-golden-path
232
242
  4a. **Phase 2-COMP**: Competitive implementation (if --competitive) -> **PAUSE: Winner Selection**
233
243
  5. **Phase 2.5**: Gap & enhancement analysis loop (until zero gaps)
234
244
  6. **Phase 3**: Simplification (efficiency, reuse, patterns)
245
+ 6.5. **Phase 3.5**: Deep security audit (adversarial red-team loop to zero findings)
235
246
  7. **Phase 4**: Pre-commit verification -> **PAUSE: Commit Approval**
236
247
  8. **Phase 5**: Push verification via `scripts/push-verify.sh` -> **PAUSE: Push Approval**
237
248
  9. **Phase 6**: Completion, learning, quality metrics
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@massu/core",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "type": "module",
5
5
  "description": "AI Engineering Governance MCP Server - Session memory, knowledge system, feature registry, code intelligence, rule enforcement, tiered tooling (12 free / 72 total), 55+ workflow commands, 11 agents, 20+ patterns",
6
6
  "main": "src/server.ts",