vaspera 2.10.0 → 2.11.0

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 (206) hide show
  1. package/dist/__tests__/scanners/ai-code/ai-detector.test.d.ts +2 -0
  2. package/dist/__tests__/scanners/ai-code/ai-detector.test.d.ts.map +1 -0
  3. package/dist/__tests__/scanners/ai-code/ai-detector.test.js +188 -0
  4. package/dist/__tests__/scanners/ai-code/ai-detector.test.js.map +1 -0
  5. package/dist/__tests__/scanners/ai-code/confidence-scorer.test.d.ts +2 -0
  6. package/dist/__tests__/scanners/ai-code/confidence-scorer.test.d.ts.map +1 -0
  7. package/dist/__tests__/scanners/ai-code/confidence-scorer.test.js +363 -0
  8. package/dist/__tests__/scanners/ai-code/confidence-scorer.test.js.map +1 -0
  9. package/dist/__tests__/scanners/ai-code/hallucination-checker.test.d.ts +2 -0
  10. package/dist/__tests__/scanners/ai-code/hallucination-checker.test.d.ts.map +1 -0
  11. package/dist/__tests__/scanners/ai-code/hallucination-checker.test.js +226 -0
  12. package/dist/__tests__/scanners/ai-code/hallucination-checker.test.js.map +1 -0
  13. package/dist/__tests__/scanners/ai-code/index.test.d.ts +2 -0
  14. package/dist/__tests__/scanners/ai-code/index.test.d.ts.map +1 -0
  15. package/dist/__tests__/scanners/ai-code/index.test.js +214 -0
  16. package/dist/__tests__/scanners/ai-code/index.test.js.map +1 -0
  17. package/dist/__tests__/scanners/deploy/health-checker.test.d.ts +2 -0
  18. package/dist/__tests__/scanners/deploy/health-checker.test.d.ts.map +1 -0
  19. package/dist/__tests__/scanners/deploy/health-checker.test.js +67 -0
  20. package/dist/__tests__/scanners/deploy/health-checker.test.js.map +1 -0
  21. package/dist/__tests__/scanners/deploy/index.test.d.ts +2 -0
  22. package/dist/__tests__/scanners/deploy/index.test.d.ts.map +1 -0
  23. package/dist/__tests__/scanners/deploy/index.test.js +84 -0
  24. package/dist/__tests__/scanners/deploy/index.test.js.map +1 -0
  25. package/dist/__tests__/scanners/deploy/provider-detector.test.d.ts +2 -0
  26. package/dist/__tests__/scanners/deploy/provider-detector.test.d.ts.map +1 -0
  27. package/dist/__tests__/scanners/deploy/provider-detector.test.js +88 -0
  28. package/dist/__tests__/scanners/deploy/provider-detector.test.js.map +1 -0
  29. package/dist/__tests__/scanners/deploy/types.test.d.ts +2 -0
  30. package/dist/__tests__/scanners/deploy/types.test.d.ts.map +1 -0
  31. package/dist/__tests__/scanners/deploy/types.test.js +126 -0
  32. package/dist/__tests__/scanners/deploy/types.test.js.map +1 -0
  33. package/dist/__tests__/scanners/fp-feedback.test.js +1 -1
  34. package/dist/__tests__/scanners/fp-feedback.test.js.map +1 -1
  35. package/dist/__tests__/scanners/fp-tracker.test.js +1 -1
  36. package/dist/__tests__/scanners/fp-tracker.test.js.map +1 -1
  37. package/dist/__tests__/scanners/runtime/app-launcher.test.d.ts +2 -0
  38. package/dist/__tests__/scanners/runtime/app-launcher.test.d.ts.map +1 -0
  39. package/dist/__tests__/scanners/runtime/app-launcher.test.js +94 -0
  40. package/dist/__tests__/scanners/runtime/app-launcher.test.js.map +1 -0
  41. package/dist/__tests__/scanners/runtime/golden-path-runner.test.d.ts +2 -0
  42. package/dist/__tests__/scanners/runtime/golden-path-runner.test.d.ts.map +1 -0
  43. package/dist/__tests__/scanners/runtime/golden-path-runner.test.js +195 -0
  44. package/dist/__tests__/scanners/runtime/golden-path-runner.test.js.map +1 -0
  45. package/dist/__tests__/scanners/runtime/index.test.d.ts +2 -0
  46. package/dist/__tests__/scanners/runtime/index.test.d.ts.map +1 -0
  47. package/dist/__tests__/scanners/runtime/index.test.js +120 -0
  48. package/dist/__tests__/scanners/runtime/index.test.js.map +1 -0
  49. package/dist/__tests__/scanners/runtime/types.test.d.ts +2 -0
  50. package/dist/__tests__/scanners/runtime/types.test.d.ts.map +1 -0
  51. package/dist/__tests__/scanners/runtime/types.test.js +126 -0
  52. package/dist/__tests__/scanners/runtime/types.test.js.map +1 -0
  53. package/dist/__tests__/scanners/scale/bottleneck-detector.test.d.ts +2 -0
  54. package/dist/__tests__/scanners/scale/bottleneck-detector.test.d.ts.map +1 -0
  55. package/dist/__tests__/scanners/scale/bottleneck-detector.test.js +187 -0
  56. package/dist/__tests__/scanners/scale/bottleneck-detector.test.js.map +1 -0
  57. package/dist/__tests__/scanners/scale/index.test.d.ts +2 -0
  58. package/dist/__tests__/scanners/scale/index.test.d.ts.map +1 -0
  59. package/dist/__tests__/scanners/scale/index.test.js +87 -0
  60. package/dist/__tests__/scanners/scale/index.test.js.map +1 -0
  61. package/dist/__tests__/scanners/scale/load-profiler.test.d.ts +2 -0
  62. package/dist/__tests__/scanners/scale/load-profiler.test.d.ts.map +1 -0
  63. package/dist/__tests__/scanners/scale/load-profiler.test.js +122 -0
  64. package/dist/__tests__/scanners/scale/load-profiler.test.js.map +1 -0
  65. package/dist/__tests__/scanners/scale/types.test.d.ts +2 -0
  66. package/dist/__tests__/scanners/scale/types.test.d.ts.map +1 -0
  67. package/dist/__tests__/scanners/scale/types.test.js +129 -0
  68. package/dist/__tests__/scanners/scale/types.test.js.map +1 -0
  69. package/dist/action/pr-comment.test.js +8 -0
  70. package/dist/action/pr-comment.test.js.map +1 -1
  71. package/dist/action/sarif-upload.test.js +8 -0
  72. package/dist/action/sarif-upload.test.js.map +1 -1
  73. package/dist/index.d.ts.map +1 -1
  74. package/dist/index.js +874 -0
  75. package/dist/index.js.map +1 -1
  76. package/dist/install-skills.d.ts +11 -0
  77. package/dist/install-skills.d.ts.map +1 -0
  78. package/dist/install-skills.js +81 -0
  79. package/dist/install-skills.js.map +1 -0
  80. package/dist/scanners/ai-code/ai-detector.d.ts +25 -0
  81. package/dist/scanners/ai-code/ai-detector.d.ts.map +1 -0
  82. package/dist/scanners/ai-code/ai-detector.js +192 -0
  83. package/dist/scanners/ai-code/ai-detector.js.map +1 -0
  84. package/dist/scanners/ai-code/confidence-scorer.d.ts +40 -0
  85. package/dist/scanners/ai-code/confidence-scorer.d.ts.map +1 -0
  86. package/dist/scanners/ai-code/confidence-scorer.js +148 -0
  87. package/dist/scanners/ai-code/confidence-scorer.js.map +1 -0
  88. package/dist/scanners/ai-code/hallucination-checker.d.ts +36 -0
  89. package/dist/scanners/ai-code/hallucination-checker.d.ts.map +1 -0
  90. package/dist/scanners/ai-code/hallucination-checker.js +298 -0
  91. package/dist/scanners/ai-code/hallucination-checker.js.map +1 -0
  92. package/dist/scanners/ai-code/index.d.ts +30 -0
  93. package/dist/scanners/ai-code/index.d.ts.map +1 -0
  94. package/dist/scanners/ai-code/index.js +224 -0
  95. package/dist/scanners/ai-code/index.js.map +1 -0
  96. package/dist/scanners/ai-code/types.d.ts +192 -0
  97. package/dist/scanners/ai-code/types.d.ts.map +1 -0
  98. package/dist/scanners/ai-code/types.js +37 -0
  99. package/dist/scanners/ai-code/types.js.map +1 -0
  100. package/dist/scanners/cache.d.ts.map +1 -1
  101. package/dist/scanners/cache.js +8 -0
  102. package/dist/scanners/cache.js.map +1 -1
  103. package/dist/scanners/dast.d.ts +40 -0
  104. package/dist/scanners/dast.d.ts.map +1 -0
  105. package/dist/scanners/dast.js +228 -0
  106. package/dist/scanners/dast.js.map +1 -0
  107. package/dist/scanners/deploy/health-checker.d.ts +38 -0
  108. package/dist/scanners/deploy/health-checker.d.ts.map +1 -0
  109. package/dist/scanners/deploy/health-checker.js +272 -0
  110. package/dist/scanners/deploy/health-checker.js.map +1 -0
  111. package/dist/scanners/deploy/index.d.ts +44 -0
  112. package/dist/scanners/deploy/index.d.ts.map +1 -0
  113. package/dist/scanners/deploy/index.js +208 -0
  114. package/dist/scanners/deploy/index.js.map +1 -0
  115. package/dist/scanners/deploy/provider-detector.d.ts +25 -0
  116. package/dist/scanners/deploy/provider-detector.d.ts.map +1 -0
  117. package/dist/scanners/deploy/provider-detector.js +177 -0
  118. package/dist/scanners/deploy/provider-detector.js.map +1 -0
  119. package/dist/scanners/deploy/types.d.ts +406 -0
  120. package/dist/scanners/deploy/types.d.ts.map +1 -0
  121. package/dist/scanners/deploy/types.js +58 -0
  122. package/dist/scanners/deploy/types.js.map +1 -0
  123. package/dist/scanners/deploy/vercel-integration.d.ts +52 -0
  124. package/dist/scanners/deploy/vercel-integration.d.ts.map +1 -0
  125. package/dist/scanners/deploy/vercel-integration.js +280 -0
  126. package/dist/scanners/deploy/vercel-integration.js.map +1 -0
  127. package/dist/scanners/index.d.ts +4 -4
  128. package/dist/scanners/index.d.ts.map +1 -1
  129. package/dist/scanners/index.js +133 -15
  130. package/dist/scanners/index.js.map +1 -1
  131. package/dist/scanners/index.test.js +6 -6
  132. package/dist/scanners/index.test.js.map +1 -1
  133. package/dist/scanners/openapi.d.ts +20 -0
  134. package/dist/scanners/openapi.d.ts.map +1 -0
  135. package/dist/scanners/openapi.js +226 -0
  136. package/dist/scanners/openapi.js.map +1 -0
  137. package/dist/scanners/runtime/app-launcher.d.ts +33 -0
  138. package/dist/scanners/runtime/app-launcher.d.ts.map +1 -0
  139. package/dist/scanners/runtime/app-launcher.js +419 -0
  140. package/dist/scanners/runtime/app-launcher.js.map +1 -0
  141. package/dist/scanners/runtime/golden-path-runner.d.ts +48 -0
  142. package/dist/scanners/runtime/golden-path-runner.d.ts.map +1 -0
  143. package/dist/scanners/runtime/golden-path-runner.js +373 -0
  144. package/dist/scanners/runtime/golden-path-runner.js.map +1 -0
  145. package/dist/scanners/runtime/index.d.ts +41 -0
  146. package/dist/scanners/runtime/index.d.ts.map +1 -0
  147. package/dist/scanners/runtime/index.js +164 -0
  148. package/dist/scanners/runtime/index.js.map +1 -0
  149. package/dist/scanners/runtime/playwright-executor.d.ts +50 -0
  150. package/dist/scanners/runtime/playwright-executor.d.ts.map +1 -0
  151. package/dist/scanners/runtime/playwright-executor.js +387 -0
  152. package/dist/scanners/runtime/playwright-executor.js.map +1 -0
  153. package/dist/scanners/runtime/types.d.ts +215 -0
  154. package/dist/scanners/runtime/types.d.ts.map +1 -0
  155. package/dist/scanners/runtime/types.js +40 -0
  156. package/dist/scanners/runtime/types.js.map +1 -0
  157. package/dist/scanners/rust.d.ts +22 -0
  158. package/dist/scanners/rust.d.ts.map +1 -0
  159. package/dist/scanners/rust.js +239 -0
  160. package/dist/scanners/rust.js.map +1 -0
  161. package/dist/scanners/scale/bottleneck-detector.d.ts +17 -0
  162. package/dist/scanners/scale/bottleneck-detector.d.ts.map +1 -0
  163. package/dist/scanners/scale/bottleneck-detector.js +250 -0
  164. package/dist/scanners/scale/bottleneck-detector.js.map +1 -0
  165. package/dist/scanners/scale/capacity-estimator.d.ts +17 -0
  166. package/dist/scanners/scale/capacity-estimator.d.ts.map +1 -0
  167. package/dist/scanners/scale/capacity-estimator.js +197 -0
  168. package/dist/scanners/scale/capacity-estimator.js.map +1 -0
  169. package/dist/scanners/scale/index.d.ts +37 -0
  170. package/dist/scanners/scale/index.d.ts.map +1 -0
  171. package/dist/scanners/scale/index.js +101 -0
  172. package/dist/scanners/scale/index.js.map +1 -0
  173. package/dist/scanners/scale/load-profiler.d.ts +48 -0
  174. package/dist/scanners/scale/load-profiler.d.ts.map +1 -0
  175. package/dist/scanners/scale/load-profiler.js +377 -0
  176. package/dist/scanners/scale/load-profiler.js.map +1 -0
  177. package/dist/scanners/scale/types.d.ts +529 -0
  178. package/dist/scanners/scale/types.d.ts.map +1 -0
  179. package/dist/scanners/scale/types.js +57 -0
  180. package/dist/scanners/scale/types.js.map +1 -0
  181. package/dist/scanners/secrets.d.ts.map +1 -1
  182. package/dist/scanners/secrets.js +13 -2
  183. package/dist/scanners/secrets.js.map +1 -1
  184. package/dist/scanners/terraform.d.ts +23 -0
  185. package/dist/scanners/terraform.d.ts.map +1 -0
  186. package/dist/scanners/terraform.js +207 -0
  187. package/dist/scanners/terraform.js.map +1 -0
  188. package/dist/scanners/types.d.ts +1 -1
  189. package/dist/scanners/types.d.ts.map +1 -1
  190. package/dist/scanners/types.js +8 -0
  191. package/dist/scanners/types.js.map +1 -1
  192. package/package.json +4 -2
  193. package/skills/vaspera-add-tests/SKILL.md +102 -0
  194. package/skills/vaspera-ai-verify/SKILL.md +166 -0
  195. package/skills/vaspera-audit/SKILL.md +67 -0
  196. package/skills/vaspera-certify/SKILL.md +130 -0
  197. package/skills/vaspera-deploy/SKILL.md +152 -0
  198. package/skills/vaspera-fix-critical/SKILL.md +52 -0
  199. package/skills/vaspera-fix-high/SKILL.md +81 -0
  200. package/skills/vaspera-fix-medium/SKILL.md +56 -0
  201. package/skills/vaspera-fix-rls/SKILL.md +85 -0
  202. package/skills/vaspera-harden/SKILL.md +102 -0
  203. package/skills/vaspera-help/SKILL.md +61 -0
  204. package/skills/vaspera-load-test/SKILL.md +167 -0
  205. package/skills/vaspera-verify/SKILL.md +70 -0
  206. package/skills/vaspera-verify-e2e/SKILL.md +117 -0
@@ -0,0 +1,102 @@
1
+ ---
2
+ description: Run complete 6-phase hardening pipeline
3
+ argument-hint: "[project-path: defaults to .]"
4
+ allowed-tools: Read, Edit, Write, Bash, Grep, Glob
5
+ ---
6
+
7
+ Execute the full hardening pipeline with verification at each phase.
8
+
9
+ ## Pipeline Overview
10
+
11
+ ```
12
+ Phase 1: Audit → Baseline assessment
13
+ Phase 2: Fix Critical → Resolve all CRITICAL findings
14
+ Phase 3: Fix High → Resolve HIGH findings (4 rounds)
15
+ Phase 4: Fix Medium → Resolve MEDIUM findings
16
+ Phase 5: Add Tests → Generate security tests
17
+ Phase 6: Verify → Before/after comparison
18
+ ```
19
+
20
+ ## Execution
21
+
22
+ ### Phase 1: Audit
23
+ Run `/vaspera-audit` to establish baseline.
24
+ - Record initial Production Readiness Score
25
+ - Save finding counts by severity
26
+
27
+ ### Phase 2: Fix Critical
28
+ Run `/vaspera-fix-critical`
29
+ - Must resolve ALL critical findings before proceeding
30
+ - Commit: `fix: resolve critical security issues`
31
+ - **Gate**: If any critical remains, STOP and report
32
+
33
+ ### Phase 3: Fix High
34
+ Run `/vaspera-fix-high`
35
+ - 4 rounds: validation → types → UI → API
36
+ - Commit after each round: `fix: resolve high-severity issues (round X)`
37
+ - **Verification**: Re-scan after each round
38
+
39
+ ### Phase 4: Fix Medium
40
+ Run `/vaspera-fix-medium`
41
+ - Single pass through medium findings
42
+ - Commit: `fix: resolve medium-severity issues`
43
+
44
+ ### Phase 5: Add Tests
45
+ Run `/vaspera-add-tests`
46
+ - Priority: API routes → data layer → UI → utilities
47
+ - Commit: `test: add security tests for critical paths`
48
+ - **Gate**: `npm test` must pass
49
+
50
+ ### Phase 6: Verify
51
+ Run `/vaspera-verify`
52
+ - Generate HARDENING-REPORT.md
53
+ - Compare before/after scores
54
+ - Flag any regressions
55
+
56
+ ## Pre-commit Gate
57
+
58
+ Before each commit, verify:
59
+ - [ ] `npm run build` passes (TypeScript)
60
+ - [ ] `npm test` passes (all tests)
61
+ - [ ] No new console.logs introduced
62
+ - [ ] No commented code added
63
+ - [ ] No circular imports
64
+
65
+ ## Failure Handling
66
+
67
+ **Build fails**: Pause, report error, suggest fix
68
+ **Tests fail**: Roll back phase changes, report
69
+ **Regressions detected**: Flag prominently, pause for review
70
+
71
+ ## Final Report
72
+
73
+ ```markdown
74
+ # Hardening Complete
75
+
76
+ ## Score Improvement
77
+ Before: XX/100 (LEVEL)
78
+ After: YY/100 (LEVEL)
79
+ Delta: +ZZ points
80
+
81
+ ## Findings Resolved
82
+ - Critical: X → 0
83
+ - High: Y → N
84
+ - Medium: Z → M
85
+
86
+ ## Commits Made
87
+ 1. fix: resolve critical security issues
88
+ 2. fix: resolve high-severity issues (round A)
89
+ ...
90
+
91
+ ## Next Steps
92
+ - Review and merge PR
93
+ - Deploy to staging
94
+ - Run production certification
95
+ ```
96
+
97
+ ## Important
98
+
99
+ - This is a LONG-RUNNING operation — may take 30+ minutes
100
+ - Each phase commits independently for clean rollback
101
+ - The pipeline can be resumed from any phase if interrupted
102
+ - Do NOT push to remote unless user explicitly requests
@@ -0,0 +1,61 @@
1
+ ---
2
+ description: List all available Vaspera Hardening skills
3
+ argument-hint: ""
4
+ allowed-tools: Bash
5
+ ---
6
+
7
+ Display the Vaspera Hardening skill menu.
8
+
9
+ ## Output
10
+
11
+ ```
12
+ Vaspera Hardening Skills
13
+ ========================
14
+
15
+ AUDIT & VERIFY
16
+ /vaspera-audit Run security audit, write findings to .vaspera/audit/
17
+ /vaspera-verify Compare before/after audit state, generate report
18
+ /vaspera-verify-e2e Runtime verification (M7) - test app actually works
19
+
20
+ FIX BY SEVERITY
21
+ /vaspera-fix-critical Fix all CRITICAL severity findings
22
+ /vaspera-fix-high Fix HIGH severity findings (4 rounds)
23
+ /vaspera-fix-medium Fix MEDIUM severity findings
24
+
25
+ SPECIALIZED
26
+ /vaspera-fix-rls Generate Supabase RLS policies
27
+ /vaspera-add-tests Generate security tests (priority order)
28
+
29
+ ORCHESTRATION
30
+ /vaspera-harden Full 6-phase hardening pipeline
31
+ (audit → fix-critical → fix-high → fix-medium → add-tests → verify)
32
+
33
+ RUNTIME & SCALE (M7-M8)
34
+ /vaspera-verify-e2e Launch app, run golden paths, calculate runtime score
35
+ /vaspera-load-test Run k6 load tests, detect bottlenecks, estimate capacity
36
+ /vaspera-certify Full production readiness certification (all dimensions)
37
+
38
+ DEPLOYMENT (M9)
39
+ /vaspera-deploy Health checks, smoke tests, Vercel integration
40
+
41
+ AI CODE VERIFICATION (M10)
42
+ /vaspera-ai-verify Detect AI patterns, hallucinations, confidence scoring
43
+
44
+ DISCOVERY
45
+ /vaspera-help This menu
46
+
47
+ MCP TOOLS (stateful operations)
48
+ hardening_dashboard Portfolio view across all projects
49
+ certification_* Stateful certification workflow
50
+ consensus_* Multi-agent consensus calculation
51
+ runtime_* Runtime verification (7 tools)
52
+ scale_* Scale assessment (5 tools)
53
+ deploy_* Deployment verification (7 tools)
54
+ ```
55
+
56
+ ## Usage Tips
57
+
58
+ - Start with `/vaspera-audit` to get a baseline
59
+ - Fix by severity: critical → high → medium
60
+ - Run `/vaspera-verify` after fixes to confirm improvement
61
+ - Use `/vaspera-harden` for the full automated pipeline
@@ -0,0 +1,167 @@
1
+ ---
2
+ description: Run scale assessment and load testing (M8)
3
+ argument-hint: "[project-path: defaults to .]"
4
+ allowed-tools: Bash, Read, Write, Glob, Grep
5
+ ---
6
+
7
+ Run scale assessment including load testing, bottleneck detection, and capacity estimation.
8
+
9
+ ## Prerequisites
10
+
11
+ Install a load testing tool (k6 recommended):
12
+ ```bash
13
+ # macOS
14
+ brew install k6
15
+
16
+ # Linux
17
+ sudo apt install k6
18
+
19
+ # Windows
20
+ choco install k6
21
+ ```
22
+
23
+ ## Steps
24
+
25
+ 1. **Validate project path**
26
+ - Default to `.` if no argument provided
27
+ - Confirm the project exists
28
+
29
+ 2. **Check load testing tools**
30
+ - Use `scale_tools_check` MCP tool
31
+ - Verify k6 or Artillery is installed
32
+
33
+ 3. **Discover load profiles**
34
+ - Look for `.vaspera/load/*.yaml`
35
+ - If no profiles exist, offer to generate sample
36
+
37
+ 4. **Start the application**
38
+ - Use `runtime_launch` to start the dev server
39
+ - Wait for health check
40
+
41
+ 5. **Run load tests**
42
+ - Execute each profile scenario
43
+ - Collect latency, throughput, error metrics
44
+
45
+ 6. **Detect bottlenecks**
46
+ - Scan code for N+1 queries, memory leaks, blocking ops
47
+ - Analyze load test results for slow endpoints
48
+
49
+ 7. **Estimate capacity**
50
+ - Calculate max concurrent users
51
+ - Estimate breakpoint (where system fails)
52
+ - Project infrastructure costs
53
+
54
+ 8. **Stop the application**
55
+ - Clean shutdown of dev server
56
+
57
+ 9. **Present results**
58
+ ```
59
+ Scale Assessment Results
60
+ ========================
61
+ Load Testing Tool: k6
62
+
63
+ Profile: production
64
+ ┌─────────────────┬──────────┬──────────┬──────────┐
65
+ │ Scenario │ VUs │ RPS │ p95 (ms) │
66
+ ├─────────────────┼──────────┼──────────┼──────────┤
67
+ │ Ramp Up │ 1→50 │ 245 │ 89 │
68
+ │ Steady State │ 50 │ 312 │ 124 │
69
+ │ Spike │ 50→200 │ 156 │ 456 │
70
+ └─────────────────┴──────────┴──────────┴──────────┘
71
+
72
+ Bottlenecks Found: 3
73
+ - [HIGH] N+1 query in src/api/products.ts
74
+ - [MEDIUM] Blocking readFileSync in lib/config.ts
75
+ - [MEDIUM] No connection pooling detected
76
+
77
+ Capacity Estimate:
78
+ - Max Concurrent Users: ~250
79
+ - Max Requests/sec: ~400
80
+ - Breakpoint: ~300 VUs (60% confidence)
81
+
82
+ Projected Cost: $140/month (2x m5.large)
83
+
84
+ Scale Score: 72/100
85
+
86
+ Certification Level: 🟡 APPROVED
87
+ → Ship with monitoring
88
+ ```
89
+
90
+ 10. **Write assessment report**
91
+ - Create `.vaspera/scale/` directory
92
+ - Write to `.vaspera/scale/{ISO-timestamp}.json`
93
+
94
+ ## Load Profile Format
95
+
96
+ Profiles are defined in `.vaspera/load/*.yaml`:
97
+
98
+ ```yaml
99
+ name: "production"
100
+ description: "Production-like load test"
101
+ tool: k6
102
+
103
+ endpoints:
104
+ - path: "/"
105
+ method: GET
106
+ weight: 50
107
+ - path: "/api/products"
108
+ method: GET
109
+ weight: 30
110
+ - path: "/api/checkout"
111
+ method: POST
112
+ weight: 20
113
+ body:
114
+ items: [{ id: 1, qty: 1 }]
115
+
116
+ thresholds:
117
+ p95: 500 # 95th percentile < 500ms
118
+ p99: 1000 # 99th percentile < 1s
119
+ errorRate: 0.01 # < 1% errors
120
+
121
+ scenarios:
122
+ - name: "Ramp Up"
123
+ type: ramp
124
+ duration: "2m"
125
+ vus:
126
+ start: 1
127
+ end: 50
128
+
129
+ - name: "Steady State"
130
+ type: ramp
131
+ duration: "5m"
132
+ vus:
133
+ start: 50
134
+ end: 50
135
+
136
+ - name: "Spike"
137
+ type: spike
138
+ duration: "30s"
139
+ vus:
140
+ start: 50
141
+ end: 200
142
+ ```
143
+
144
+ ## Bottleneck Types
145
+
146
+ | Type | Examples | Severity |
147
+ |------|----------|----------|
148
+ | database | N+1 queries, missing indexes | High |
149
+ | memory | Leaks, unbounded caches | Medium |
150
+ | cpu | Blocking operations, sync crypto | Medium |
151
+ | endpoint | Slow handlers, no caching | High |
152
+ | network | No connection reuse | Low |
153
+
154
+ ## MCP Tools Used
155
+
156
+ - `scale_tools_check` — Verify load testing tools
157
+ - `scale_profiles_list` — Discover profiles
158
+ - `scale_profile_generate` — Create sample profile
159
+ - `scale_assess` — Full scale assessment
160
+ - `scale_bottlenecks` — Quick bottleneck scan
161
+
162
+ ## Important
163
+
164
+ - Requires k6 or Artillery installed
165
+ - Load tests hit the actual app — use a test environment
166
+ - Results vary by hardware — run on similar specs to production
167
+ - Consider running during off-peak hours for accurate results
@@ -0,0 +1,70 @@
1
+ ---
2
+ description: Compare before/after audit state to verify fixes worked
3
+ argument-hint: "[project-path: defaults to .]"
4
+ allowed-tools: Read, Write, Bash, Grep, Glob
5
+ ---
6
+
7
+ Verify that fixes improved the security posture by comparing audit snapshots.
8
+
9
+ ## Steps
10
+
11
+ 1. **Preserve baseline**
12
+ - If `AUDIT.md` exists, rename to `AUDIT-BEFORE.md`
13
+ - If `.vaspera/audit/*.json` exists, note the latest as "before" snapshot
14
+
15
+ 2. **Run fresh audit**
16
+ - Execute `/vaspera-audit` to generate new findings
17
+ - This creates a new `.vaspera/audit/{timestamp}.json`
18
+
19
+ 3. **Compare before vs after**
20
+ Calculate deltas:
21
+ - Critical: before → after (delta)
22
+ - High: before → after (delta)
23
+ - Medium: before → after (delta)
24
+ - Low: before → after (delta)
25
+ - Total: before → after (delta)
26
+
27
+ 4. **Calculate Production Readiness Score**
28
+ Score = 100 - (critical×10 + high×5 + medium×2 + low×0.5)
29
+
30
+ Certification levels:
31
+ - 90-100: CERTIFIED (green)
32
+ - 70-89: APPROVED (yellow)
33
+ - 40-69: REVIEW_REQUIRED (orange)
34
+ - 0-39: BLOCKED (red)
35
+
36
+ 5. **Detect regressions**
37
+ - New findings that didn't exist in "before" snapshot
38
+ - Flag these prominently — fixes may have introduced new issues
39
+
40
+ 6. **Generate HARDENING-REPORT.md**
41
+ ```markdown
42
+ # Hardening Report
43
+
44
+ ## Summary
45
+ | Severity | Before | After | Delta |
46
+ |----------|--------|-------|-------|
47
+ | Critical | X | Y | -N |
48
+ ...
49
+
50
+ ## Production Readiness Score
51
+ Before: XX/100 (LEVEL)
52
+ After: YY/100 (LEVEL)
53
+
54
+ ## Remaining Issues
55
+ - [file:line] — description
56
+
57
+ ## Regressions (NEW)
58
+ - [file:line] — description
59
+
60
+ ## Deployment Checklist
61
+ - [ ] All critical fixed
62
+ - [ ] Tests passing
63
+ - [ ] Build succeeds
64
+ ```
65
+
66
+ ## Important
67
+
68
+ - This skill is READ-ONLY for code — it generates reports, doesn't fix
69
+ - Always flag regressions prominently
70
+ - The score is informational — use judgment on whether to deploy
@@ -0,0 +1,117 @@
1
+ ---
2
+ description: Run E2E runtime verification against a project (M7)
3
+ argument-hint: "[project-path: defaults to .]"
4
+ allowed-tools: Bash, Read, Write, Glob, Grep
5
+ ---
6
+
7
+ Run runtime verification to ensure the app actually works, not just compiles.
8
+
9
+ ## Steps
10
+
11
+ 1. **Validate project path**
12
+ - Default to `.` if no argument provided
13
+ - Confirm the path exists and contains a recognizable framework
14
+
15
+ 2. **Detect framework**
16
+ - Use `runtime_detect` MCP tool if available
17
+ - Otherwise: check for Next.js, Vite, Express, FastAPI, Flask, Django, Rails
18
+ - Display detected framework and confidence
19
+
20
+ 3. **Discover golden path flows**
21
+ - Look for `.vaspera/flows/*.yaml`
22
+ - If no flows exist, offer to generate sample flow
23
+
24
+ 4. **Launch the application**
25
+ - Use `runtime_launch` MCP tool if available
26
+ - Otherwise: run `npm run dev` or detected dev command
27
+ - Wait for health check to pass
28
+ - Display startup time and URL
29
+
30
+ 5. **Run golden path flows**
31
+ - Execute each flow in priority order (critical → high → medium → low)
32
+ - For each flow, report:
33
+ - Flow name and priority
34
+ - Steps passed/failed
35
+ - Duration
36
+ - Stop on critical flow failure
37
+
38
+ 6. **Calculate runtime score**
39
+ - Score formula: weighted average of flow results
40
+ - Critical flows: weight 3
41
+ - High flows: weight 2
42
+ - Medium flows: weight 1.5
43
+ - Low flows: weight 1
44
+
45
+ 7. **Stop the application**
46
+ - Gracefully terminate the dev server
47
+ - Confirm cleanup
48
+
49
+ 8. **Present results**
50
+ ```
51
+ Runtime Verification Results
52
+ ============================
53
+ Framework: Next.js (confidence: 95%)
54
+ Startup Time: 2.3s
55
+ App URL: http://localhost:3000
56
+
57
+ Golden Path Flows:
58
+ ┌────────────────────┬──────────┬──────────┬──────────┐
59
+ │ Flow │ Priority │ Status │ Duration │
60
+ ├────────────────────┼──────────┼──────────┼──────────┤
61
+ │ checkout │ critical │ ✅ PASS │ 1.2s │
62
+ │ user-registration │ high │ ✅ PASS │ 0.8s │
63
+ │ profile-update │ medium │ ❌ FAIL │ 0.5s │
64
+ └────────────────────┴──────────┴──────────┴──────────┘
65
+
66
+ Runtime Score: 75/100
67
+
68
+ Certification Level: APPROVED (70-89)
69
+ → Ship with monitoring
70
+ ```
71
+
72
+ 9. **Write verification report**
73
+ - Create `.vaspera/runtime/` directory if needed
74
+ - Write to `.vaspera/runtime/{ISO-timestamp}.json`
75
+
76
+ ## Golden Path Flow Format
77
+
78
+ Flows are defined in `.vaspera/flows/*.yaml`:
79
+
80
+ ```yaml
81
+ name: "checkout"
82
+ description: "Verify checkout flow works"
83
+ priority: critical
84
+ tags:
85
+ - smoke
86
+ - e2e
87
+
88
+ steps:
89
+ - action: navigate
90
+ url: "/"
91
+ - action: click
92
+ selector: "[data-testid='add-to-cart']"
93
+ - action: fill
94
+ selector: "#email"
95
+ value: "test@example.com"
96
+ - action: api
97
+ url: "/api/checkout"
98
+ method: POST
99
+ - action: assert
100
+ url: "/confirmation"
101
+ ```
102
+
103
+ ## Certification Levels
104
+
105
+ | Score | Level | Recommendation |
106
+ |-------|-------|----------------|
107
+ | 90-100 | CERTIFIED | Ship to production |
108
+ | 70-89 | APPROVED | Ship with monitoring |
109
+ | 40-69 | REVIEW_REQUIRED | Fix before shipping |
110
+ | 0-39 | BLOCKED | Critical issues |
111
+
112
+ ## Important
113
+
114
+ - This skill launches the dev server — ensure port is available
115
+ - Playwright integration for DOM actions is planned but not yet available
116
+ - HTTP-based actions (navigate, api) work immediately
117
+ - Click/fill/select actions require Playwright (marked as skipped)