@vibecheckai/cli 3.4.0 → 3.5.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 (166) hide show
  1. package/bin/registry.js +243 -152
  2. package/bin/runners/cli-utils.js +2 -33
  3. package/bin/runners/context/generators/cursor.js +49 -2
  4. package/bin/runners/lib/agent-firewall/learning/learning-engine.js +849 -0
  5. package/bin/runners/lib/analyzers.js +544 -19
  6. package/bin/runners/lib/audit-logger.js +532 -0
  7. package/bin/runners/lib/authority/authorities/architecture.js +364 -0
  8. package/bin/runners/lib/authority/authorities/compliance.js +341 -0
  9. package/bin/runners/lib/authority/authorities/human.js +343 -0
  10. package/bin/runners/lib/authority/authorities/quality.js +420 -0
  11. package/bin/runners/lib/authority/authorities/security.js +228 -0
  12. package/bin/runners/lib/authority/index.js +293 -0
  13. package/bin/runners/lib/authority-badge.js +425 -425
  14. package/bin/runners/lib/bundle/bundle-intelligence.js +846 -0
  15. package/bin/runners/lib/cli-charts.js +368 -0
  16. package/bin/runners/lib/cli-config-display.js +405 -0
  17. package/bin/runners/lib/cli-demo.js +275 -0
  18. package/bin/runners/lib/cli-errors.js +438 -0
  19. package/bin/runners/lib/cli-help-formatter.js +439 -0
  20. package/bin/runners/lib/cli-interactive-menu.js +509 -0
  21. package/bin/runners/lib/cli-prompts.js +441 -0
  22. package/bin/runners/lib/cli-scan-cards.js +362 -0
  23. package/bin/runners/lib/compliance-reporter.js +710 -0
  24. package/bin/runners/lib/conductor/index.js +671 -0
  25. package/bin/runners/lib/easy/README.md +123 -0
  26. package/bin/runners/lib/easy/index.js +140 -0
  27. package/bin/runners/lib/easy/interactive-wizard.js +788 -0
  28. package/bin/runners/lib/easy/one-click-firewall.js +564 -0
  29. package/bin/runners/lib/easy/zero-config-reality.js +714 -0
  30. package/bin/runners/lib/engines/accessibility-engine.js +218 -18
  31. package/bin/runners/lib/engines/api-consistency-engine.js +335 -30
  32. package/bin/runners/lib/engines/async-patterns-engine.js +444 -0
  33. package/bin/runners/lib/engines/bundle-size-engine.js +433 -0
  34. package/bin/runners/lib/engines/confidence-scoring.js +276 -0
  35. package/bin/runners/lib/engines/context-detection.js +264 -0
  36. package/bin/runners/lib/engines/cross-file-analysis-engine.js +292 -27
  37. package/bin/runners/lib/engines/database-patterns-engine.js +429 -0
  38. package/bin/runners/lib/engines/duplicate-code-engine.js +354 -0
  39. package/bin/runners/lib/engines/empty-catch-engine.js +127 -17
  40. package/bin/runners/lib/engines/env-variables-engine.js +458 -0
  41. package/bin/runners/lib/engines/error-handling-engine.js +437 -0
  42. package/bin/runners/lib/engines/false-positive-prevention.js +630 -0
  43. package/bin/runners/lib/engines/framework-adapters/index.js +607 -0
  44. package/bin/runners/lib/engines/framework-detection.js +508 -0
  45. package/bin/runners/lib/engines/import-order-engine.js +429 -0
  46. package/bin/runners/lib/engines/mock-data-engine.js +53 -10
  47. package/bin/runners/lib/engines/naming-conventions-engine.js +544 -0
  48. package/bin/runners/lib/engines/noise-reduction-engine.js +452 -0
  49. package/bin/runners/lib/engines/orchestrator.js +334 -0
  50. package/bin/runners/lib/engines/performance-issues-engine.js +176 -36
  51. package/bin/runners/lib/engines/react-patterns-engine.js +457 -0
  52. package/bin/runners/lib/engines/security-vulnerabilities-engine.js +382 -54
  53. package/bin/runners/lib/engines/type-aware-engine.js +263 -39
  54. package/bin/runners/lib/engines/vibecheck-engines/index.js +122 -13
  55. package/bin/runners/lib/engines/vibecheck-engines/lib/ai-hallucination-engine.js +806 -0
  56. package/bin/runners/lib/engines/vibecheck-engines/lib/hardcoded-secrets-engine.js +373 -73
  57. package/bin/runners/lib/engines/vibecheck-engines/lib/smart-fix-engine.js +577 -0
  58. package/bin/runners/lib/engines/vibecheck-engines/lib/vibe-score-engine.js +543 -0
  59. package/bin/runners/lib/engines/vibecheck-engines.js +514 -0
  60. package/bin/runners/lib/enhanced-features/index.js +305 -0
  61. package/bin/runners/lib/enhanced-output.js +631 -0
  62. package/bin/runners/lib/enterprise.js +300 -0
  63. package/bin/runners/lib/entitlements-v2.js +103 -11
  64. package/bin/runners/lib/firewall/command-validator.js +351 -0
  65. package/bin/runners/lib/firewall/config.js +341 -0
  66. package/bin/runners/lib/firewall/content-validator.js +519 -0
  67. package/bin/runners/lib/firewall/index.js +101 -0
  68. package/bin/runners/lib/firewall/path-validator.js +256 -0
  69. package/bin/runners/lib/html-proof-report.js +350 -700
  70. package/bin/runners/lib/intelligence/cross-repo-intelligence.js +817 -0
  71. package/bin/runners/lib/mcp-utils.js +425 -0
  72. package/bin/runners/lib/missions/plan.js +46 -6
  73. package/bin/runners/lib/missions/templates.js +232 -0
  74. package/bin/runners/lib/output/index.js +1022 -0
  75. package/bin/runners/lib/policy-engine.js +652 -0
  76. package/bin/runners/lib/polish/autofix/accessibility-fixes.js +333 -0
  77. package/bin/runners/lib/polish/autofix/async-handlers.js +273 -0
  78. package/bin/runners/lib/polish/autofix/dead-code.js +280 -0
  79. package/bin/runners/lib/polish/autofix/imports-optimizer.js +344 -0
  80. package/bin/runners/lib/polish/autofix/index.js +200 -0
  81. package/bin/runners/lib/polish/autofix/remove-consoles.js +209 -0
  82. package/bin/runners/lib/polish/autofix/strengthen-types.js +245 -0
  83. package/bin/runners/lib/polish/backend-checks.js +148 -0
  84. package/bin/runners/lib/polish/documentation-checks.js +111 -0
  85. package/bin/runners/lib/polish/frontend-checks.js +168 -0
  86. package/bin/runners/lib/polish/index.js +71 -0
  87. package/bin/runners/lib/polish/infrastructure-checks.js +131 -0
  88. package/bin/runners/lib/polish/library-detection.js +175 -0
  89. package/bin/runners/lib/polish/performance-checks.js +100 -0
  90. package/bin/runners/lib/polish/security-checks.js +148 -0
  91. package/bin/runners/lib/polish/utils.js +203 -0
  92. package/bin/runners/lib/prompt-builder.js +540 -0
  93. package/bin/runners/lib/proof-certificate.js +634 -0
  94. package/bin/runners/lib/reality/accessibility-audit.js +946 -0
  95. package/bin/runners/lib/reality/api-contract-validator.js +1012 -0
  96. package/bin/runners/lib/reality/chaos-engineering.js +1084 -0
  97. package/bin/runners/lib/reality/performance-tracker.js +1077 -0
  98. package/bin/runners/lib/reality/scenario-generator.js +1404 -0
  99. package/bin/runners/lib/reality/visual-regression.js +852 -0
  100. package/bin/runners/lib/reality-profiler.js +717 -0
  101. package/bin/runners/lib/replay/flight-recorder-viewer.js +1160 -0
  102. package/bin/runners/lib/review/ai-code-review.js +832 -0
  103. package/bin/runners/lib/rules/custom-rule-engine.js +985 -0
  104. package/bin/runners/lib/sbom-generator.js +641 -0
  105. package/bin/runners/lib/scan-output-enhanced.js +512 -0
  106. package/bin/runners/lib/scan-output.js +47 -0
  107. package/bin/runners/lib/security/owasp-scanner.js +939 -0
  108. package/bin/runners/lib/terminal-ui.js +113 -1
  109. package/bin/runners/lib/unified-cli-output.js +603 -430
  110. package/bin/runners/lib/validators/contract-validator.js +283 -0
  111. package/bin/runners/lib/validators/dead-export-detector.js +279 -0
  112. package/bin/runners/lib/validators/dep-audit.js +245 -0
  113. package/bin/runners/lib/validators/env-validator.js +319 -0
  114. package/bin/runners/lib/validators/index.js +120 -0
  115. package/bin/runners/lib/validators/license-checker.js +252 -0
  116. package/bin/runners/lib/validators/route-validator.js +290 -0
  117. package/bin/runners/runAIAgent.js +5 -10
  118. package/bin/runners/runAgent.js +3 -0
  119. package/bin/runners/runApprove.js +1233 -1200
  120. package/bin/runners/runAuth.js +22 -1
  121. package/bin/runners/runAuthority.js +528 -0
  122. package/bin/runners/runCheckpoint.js +4 -24
  123. package/bin/runners/runClassify.js +862 -859
  124. package/bin/runners/runConductor.js +772 -0
  125. package/bin/runners/runContainer.js +366 -0
  126. package/bin/runners/runContext.js +3 -0
  127. package/bin/runners/runDoctor.js +28 -41
  128. package/bin/runners/runEasy.js +410 -0
  129. package/bin/runners/runFirewall.js +3 -0
  130. package/bin/runners/runFirewallHook.js +3 -0
  131. package/bin/runners/runFix.js +76 -66
  132. package/bin/runners/runGuard.js +411 -18
  133. package/bin/runners/runIaC.js +372 -0
  134. package/bin/runners/runInit.js +10 -60
  135. package/bin/runners/runMcp.js +11 -12
  136. package/bin/runners/runPolish.js +240 -64
  137. package/bin/runners/runPromptFirewall.js +5 -12
  138. package/bin/runners/runProve.js +20 -55
  139. package/bin/runners/runReality.js +68 -59
  140. package/bin/runners/runReport.js +31 -5
  141. package/bin/runners/runRuntime.js +5 -8
  142. package/bin/runners/runScan.js +194 -1286
  143. package/bin/runners/runShip.js +695 -47
  144. package/bin/runners/runTruth.js +3 -0
  145. package/bin/runners/runValidate.js +7 -11
  146. package/bin/runners/runVibe.js +791 -0
  147. package/bin/runners/runWatch.js +14 -23
  148. package/bin/vibecheck.js +175 -56
  149. package/mcp-server/index.js +190 -14
  150. package/mcp-server/package.json +1 -1
  151. package/mcp-server/tools-v3.js +397 -64
  152. package/mcp-server/tools.js +495 -0
  153. package/package.json +1 -1
  154. package/bin/runners/lib/engines/vibecheck-engines/lib/ast-cache.js +0 -164
  155. package/bin/runners/lib/engines/vibecheck-engines/lib/code-quality-engine.js +0 -291
  156. package/bin/runners/lib/engines/vibecheck-engines/lib/console-logs-engine.js +0 -83
  157. package/bin/runners/lib/engines/vibecheck-engines/lib/dead-code-engine.js +0 -198
  158. package/bin/runners/lib/engines/vibecheck-engines/lib/deprecated-api-engine.js +0 -275
  159. package/bin/runners/lib/engines/vibecheck-engines/lib/empty-catch-engine.js +0 -167
  160. package/bin/runners/lib/engines/vibecheck-engines/lib/file-filter.js +0 -217
  161. package/bin/runners/lib/engines/vibecheck-engines/lib/mock-data-engine.js +0 -140
  162. package/bin/runners/lib/engines/vibecheck-engines/lib/parallel-processor.js +0 -164
  163. package/bin/runners/lib/engines/vibecheck-engines/lib/performance-issues-engine.js +0 -234
  164. package/bin/runners/lib/engines/vibecheck-engines/lib/type-aware-engine.js +0 -217
  165. package/bin/runners/lib/engines/vibecheck-engines/lib/unsafe-regex-engine.js +0 -78
  166. package/mcp-server/index-v1.js +0 -698
package/bin/registry.js CHANGED
@@ -7,37 +7,45 @@
7
7
  * Simple 2-tier model:
8
8
  * - FREE ($0): Inspect & Observe
9
9
  * - PRO ($69/mo): Fix, Prove & Enforce
10
+ *
11
+ * SCAN = Quick lint (5 core engines, fast, FREE)
12
+ * SHIP = Comprehensive verdict (all engines + proof cert, PRO)
10
13
  */
11
14
 
12
15
  "use strict";
13
16
 
14
17
  // ─────────────────────────────────────────────────────────────
15
- // CLI COMMANDS (2-tier: FREE / PRO)
18
+ // CLI COMMANDS (22 total - 2-tier: FREE / PRO)
16
19
  // ─────────────────────────────────────────────────────────────
17
20
  const ALLOWED_COMMANDS = new Set([
18
- // FREE (10) - Inspect & Observe
19
- "init", // one-time setup
20
- "doctor", // health check
21
- "watch", // continuous mode
22
- "scan", // static analysis
23
- "report", // generate reports
24
- "context", // generate IDE rules
25
- "classify", // Authority: inventory (read-only)
26
- "login", // authenticate
27
- "logout", // remove credentials
28
- "whoami", // show current user
29
-
30
- // PRO (9) - Fix, Prove & Enforce
31
- "ship", // verdict engine (GO/NO-GO)
32
- "fix", // AI-powered fixes
33
- "prove", // runtime proof
34
- "reality", // browser verification
35
- "gate", // CI/CD enforcement
36
- "guard", // AI guardrails
37
- "mcp", // MCP server
38
- "checkpoint", // baseline comparison
39
- "approve", // Authority: verdicts
40
- "polish", // production polish
21
+ // FREE (12) - Inspect & Observe
22
+ "scan", // quick lint - 5 core engines
23
+ "context", // generate truthpack + IDE rules
24
+ "watch", // real-time file watching
25
+ "doctor", // environment diagnostics
26
+ "report", // generate HTML/SARIF reports
27
+ "authority", // authority system main command
28
+ "authority.list", // list available authorities
29
+ "guard", // agent firewall (observe mode FREE, enforce mode PRO)
30
+ "login", // authenticate
31
+ "logout", // clear auth
32
+ "whoami", // show current user
33
+ "init", // one-time setup (legacy, redirects to context)
34
+
35
+ // PRO (12) - Fix, Prove & Enforce
36
+ "ship", // comprehensive - all engines, verdict, proof cert
37
+ "fix", // AI-powered fixes with LLM
38
+ "polish", // production hardening
39
+ "reality", // playwright browser verification
40
+ "prove", // full proof loop with evidence pack
41
+ "gate", // CI/CD enforcement
42
+ "ai-test", // AI agent for autonomous app testing
43
+ "authority.approve", // get authority verdict
44
+ "conductor.status", // multi-agent coordination status
45
+ "conductor.register", // register AI agent
46
+ "conductor.lock", // acquire file lock
47
+ "conductor.unlock", // release file lock
48
+ "conductor.propose", // submit change proposal
41
49
  ]);
42
50
 
43
51
  function assertAllowedOnly(obj) {
@@ -55,39 +63,39 @@ const COMMANDS = {
55
63
  // FREE TIER - Inspect & Observe
56
64
  // ══════════════════════════════════════════════════════════════
57
65
 
58
- init: {
59
- description: "One-time setup (config + contracts + scripts)",
60
- longDescription: "Initialize vibecheck in your project. Creates configuration files, sets up IDE rules, and optionally connects to the dashboard.",
66
+ scan: {
67
+ description: "Quick lint - 5 core engines, fast feedback",
68
+ longDescription: "Fast static analysis using 5 core engines: secrets, mock data, console logs, type issues, and security vulnerabilities. Use for rapid feedback during development.",
61
69
  tier: "free",
62
- category: "setup",
63
- aliases: ["setup", "configure"],
64
- runner: () => require("./runners/runInit").runInit,
70
+ category: "analysis",
71
+ aliases: ["s", "check", "lint"],
72
+ runner: () => require("./runners/runScan").runScan,
65
73
  examples: [
66
- { command: "vibecheck init", description: "Interactive setup wizard" },
67
- { command: "vibecheck init --local", description: "Quick local-only setup" },
68
- { command: "vibecheck init --quick", description: "Non-interactive defaults" },
74
+ { command: "vibecheck scan", description: "Quick scan with 5 core engines" },
75
+ { command: "vibecheck scan --json", description: "JSON output for CI" },
76
+ { command: "vibecheck scan --allowlist list", description: "View suppressed findings" },
69
77
  ],
70
- related: ["doctor", "scan"],
78
+ related: ["ship", "fix", "report"],
71
79
  },
72
80
 
73
- doctor: {
74
- description: "Environment + dependency + config health check",
75
- longDescription: "Comprehensive diagnostics for your development environment.",
81
+ context: {
82
+ description: "Generate truthpack + IDE rules (.cursorrules, MDC, Copilot)",
83
+ longDescription: "Generate project-aware AI coding rules and truthpack for your IDE. Creates .cursorrules, MDC files, and other IDE configurations.",
76
84
  tier: "free",
77
85
  category: "setup",
78
- aliases: ["health", "diag"],
79
- runner: () => require("./runners/runDoctor").runDoctor,
86
+ aliases: ["rules", "ai-rules", "mdc", "ctx", "init"],
87
+ runner: () => require("./runners/runContext").runContext,
80
88
  examples: [
81
- { command: "vibecheck doctor", description: "Run all health checks" },
82
- { command: "vibecheck doctor --fix", description: "Auto-fix detected issues" },
83
- { command: "vibecheck doctor --json", description: "Output as JSON" },
89
+ { command: "vibecheck context", description: "Generate all IDE rules + truthpack" },
90
+ { command: "vibecheck context --format cursor", description: ".cursorrules only" },
91
+ { command: "vibecheck context --format mdc", description: "MDC files only" },
84
92
  ],
85
- related: ["init", "scan"],
93
+ related: ["scan", "guard"],
86
94
  },
87
95
 
88
96
  watch: {
89
- description: "Continuous mode - re-runs on changes",
90
- longDescription: "File watcher that automatically re-runs scans when your code changes.",
97
+ description: "Real-time file watching - re-runs scan on changes",
98
+ longDescription: "File watcher that automatically re-runs quick scan when your code changes.",
91
99
  tier: "free",
92
100
  category: "setup",
93
101
  aliases: ["w", "dev"],
@@ -99,24 +107,24 @@ const COMMANDS = {
99
107
  related: ["scan"],
100
108
  },
101
109
 
102
- scan: {
103
- description: "Static code analysis; use --allowlist for false positives",
104
- longDescription: "Scan your codebase for route integrity issues, security vulnerabilities, and code quality problems.",
110
+ doctor: {
111
+ description: "Environment diagnostics - config and dependency health check",
112
+ longDescription: "Comprehensive diagnostics for your development environment, configuration, and dependencies.",
105
113
  tier: "free",
106
- category: "proof",
107
- aliases: ["s", "check"],
108
- runner: () => require("./runners/runScan").runScan,
114
+ category: "setup",
115
+ aliases: ["health", "diag"],
116
+ runner: () => require("./runners/runDoctor").runDoctor,
109
117
  examples: [
110
- { command: "vibecheck scan", description: "Quick scan" },
111
- { command: "vibecheck scan --profile full", description: "Full scan" },
112
- { command: "vibecheck scan --allowlist list", description: "View suppressed findings" },
118
+ { command: "vibecheck doctor", description: "Run all health checks" },
119
+ { command: "vibecheck doctor --fix", description: "Auto-fix detected issues" },
120
+ { command: "vibecheck doctor --json", description: "Output as JSON" },
113
121
  ],
114
- related: ["ship", "fix", "report"],
122
+ related: ["context", "scan"],
115
123
  },
116
124
 
117
125
  report: {
118
- description: "Generate HTML/MD/SARIF reports",
119
- longDescription: "Create shareable reports from scan results.",
126
+ description: "Generate HTML/SARIF reports from scan results",
127
+ longDescription: "Create shareable reports from scan results in HTML, Markdown, or SARIF format.",
120
128
  tier: "free",
121
129
  category: "output",
122
130
  aliases: ["html", "artifact"],
@@ -126,42 +134,42 @@ const COMMANDS = {
126
134
  { command: "vibecheck report --format md", description: "Markdown report" },
127
135
  { command: "vibecheck report --format sarif", description: "SARIF for GitHub" },
128
136
  ],
129
- related: ["scan"],
137
+ related: ["scan", "ship"],
130
138
  },
131
139
 
132
- context: {
133
- description: "Generate IDE rules (.cursorrules, MDC, Copilot)",
134
- longDescription: "Generate project-aware AI coding rules for your IDE.",
140
+ "authority": {
141
+ description: "Authority System - automated and human approvals",
142
+ longDescription: "Request approval from built-in authorities (security, architecture, compliance, quality) or human reviewers. Use 'authority list' to see available authorities and 'authority approve' to request approval.",
135
143
  tier: "free",
136
- category: "truth",
137
- aliases: ["rules", "ai-rules", "mdc", "ctx"],
138
- runner: () => require("./runners/runContext").runContext,
144
+ category: "authority",
145
+ aliases: ["auth"],
146
+ runner: () => require("./runners/runAuthority").runAuthority,
139
147
  examples: [
140
- { command: "vibecheck context", description: "Generate all IDE rules" },
141
- { command: "vibecheck context --format cursor", description: ".cursorrules only" },
148
+ { command: "vibecheck authority list", description: "List all authorities" },
149
+ { command: "vibecheck authority approve --authority security", description: "Security review" },
150
+ { command: "vibecheck authority approve -a quality -a security", description: "Multi-authority" },
142
151
  ],
143
- related: ["scan", "guard"],
152
+ related: ["authority.list", "authority.approve", "ship"],
144
153
  },
145
154
 
146
- classify: {
147
- description: "Inventory authority - duplication & legacy code maps",
148
- longDescription: "Read-only inventory of your codebase including duplication maps and legacy code detection.",
155
+ "authority.list": {
156
+ description: "List available authorities",
157
+ longDescription: "List all available authorities for code analysis and approval workflows.",
149
158
  tier: "free",
150
159
  category: "authority",
151
- aliases: ["inventory", "audit"],
152
- runner: () => require("./runners/runClassify").runClassify,
160
+ aliases: ["authorities", "auth-list"],
161
+ runner: () => require("./runners/runAuthority").runAuthority,
153
162
  examples: [
154
- { command: "vibecheck classify", description: "Quick inventory" },
155
- { command: "vibecheck classify --json", description: "JSON output" },
163
+ { command: "vibecheck authority list", description: "List all authorities" },
156
164
  ],
157
- related: ["approve", "scan"],
165
+ related: ["authority", "authority.approve"],
158
166
  },
159
167
 
160
168
  login: {
161
169
  description: "Authenticate with API key",
162
- longDescription: "Connect your CLI to the vibecheck API.",
170
+ longDescription: "Connect your CLI to the vibecheck API with your API key.",
163
171
  tier: "free",
164
- category: "account",
172
+ category: "auth",
165
173
  aliases: ["auth", "signin"],
166
174
  runner: () => require("./runners/runAuth").runLogin,
167
175
  skipAuth: true,
@@ -173,9 +181,10 @@ const COMMANDS = {
173
181
  },
174
182
 
175
183
  logout: {
176
- description: "Remove stored credentials",
184
+ description: "Clear stored credentials",
185
+ longDescription: "Remove stored authentication credentials from your system.",
177
186
  tier: "free",
178
- category: "account",
187
+ category: "auth",
179
188
  aliases: ["signout"],
180
189
  runner: () => require("./runners/runAuth").runLogout,
181
190
  skipAuth: true,
@@ -187,8 +196,9 @@ const COMMANDS = {
187
196
 
188
197
  whoami: {
189
198
  description: "Show current user and plan",
199
+ longDescription: "Display information about the currently authenticated user and their subscription plan.",
190
200
  tier: "free",
191
- category: "account",
201
+ category: "auth",
192
202
  aliases: ["me", "user"],
193
203
  runner: () => require("./runners/runAuth").runWhoami,
194
204
  skipAuth: true,
@@ -198,16 +208,29 @@ const COMMANDS = {
198
208
  related: ["login", "logout"],
199
209
  },
200
210
 
211
+ init: {
212
+ description: "One-time setup (alias for context)",
213
+ longDescription: "Initialize vibecheck in your project. Alias for 'vibecheck context'.",
214
+ tier: "free",
215
+ category: "setup",
216
+ aliases: ["setup", "configure"],
217
+ runner: () => require("./runners/runContext").runContext,
218
+ examples: [
219
+ { command: "vibecheck init", description: "Initialize project" },
220
+ ],
221
+ related: ["context", "doctor"],
222
+ },
223
+
201
224
  // ══════════════════════════════════════════════════════════════
202
225
  // PRO TIER ($69/mo) - Fix, Prove & Enforce
203
226
  // ══════════════════════════════════════════════════════════════
204
227
 
205
228
  ship: {
206
- description: "Verdict engine - SHIP / WARN / BLOCK",
207
- longDescription: "The final word on whether your code is ready to ship. Combines all scan results and generates a clear verdict.",
229
+ description: "Comprehensive verdict - ALL engines + route validation + proof cert",
230
+ longDescription: "The final word on whether your code is ready to ship. Runs ALL 15+ analysis engines, validates routes and contracts, generates proof certificate. SHIP/WARN/BLOCK verdict.",
208
231
  tier: "pro",
209
- category: "proof",
210
- aliases: ["verdict", "go"],
232
+ category: "analysis",
233
+ aliases: ["verdict", "go", "full"],
211
234
  runner: () => require("./runners/runShip").runShip,
212
235
  examples: [
213
236
  { command: "vibecheck ship", description: "Get shipping verdict" },
@@ -218,131 +241,199 @@ const COMMANDS = {
218
241
  },
219
242
 
220
243
  fix: {
221
- description: "AI-powered auto-fix for findings",
222
- longDescription: "Generate AI prompts to fix detected issues. Use --apply to let AI make changes directly.",
244
+ description: "AI-powered auto-fix with LLM",
245
+ longDescription: "Generate AI-powered fixes for detected issues. Uses LLM to analyze and fix problems automatically.",
223
246
  tier: "pro",
224
- category: "proof",
225
- aliases: ["f", "repair"],
247
+ category: "repair",
248
+ aliases: ["f", "repair", "autofix"],
226
249
  runner: () => require("./runners/runFix").runFix,
227
250
  examples: [
228
251
  { command: "vibecheck fix", description: "Generate fix missions" },
229
252
  { command: "vibecheck fix --apply", description: "Apply AI fixes" },
230
253
  { command: "vibecheck fix --loop", description: "Fix loop until clean" },
231
254
  ],
232
- related: ["scan", "ship"],
255
+ related: ["scan", "ship", "polish"],
233
256
  },
234
257
 
235
- prove: {
236
- description: "Full proof loop with runtime verification",
237
- longDescription: "Complete verification cycle with runtime testing and evidence generation.",
258
+ polish: {
259
+ description: "Production hardening - console removal, dead code, type strengthening",
260
+ longDescription: "Automated code transformations for production readiness. Removes console statements, unused imports, strengthens types, and more - all without requiring an LLM.",
238
261
  tier: "pro",
239
- category: "proof",
240
- aliases: ["p", "verify"],
241
- runner: () => require("./runners/runProve").runProve,
262
+ category: "repair",
263
+ aliases: ["prod", "final", "harden"],
264
+ runner: () => require("./runners/runPolish").runPolish,
242
265
  examples: [
243
- { command: "vibecheck prove", description: "Run full proof loop" },
244
- { command: "vibecheck prove --url http://localhost:3000", description: "With runtime testing" },
245
- { command: "vibecheck prove --bundle", description: "Generate evidence pack" },
266
+ { command: "vibecheck polish", description: "Dry-run - preview changes" },
267
+ { command: "vibecheck polish --apply", description: "Apply all auto-fixes" },
268
+ { command: "vibecheck polish --passes remove-consoles,dead-code", description: "Run specific passes" },
269
+ { command: "vibecheck polish --safe-only --apply", description: "Apply only safe fixes" },
270
+ { command: "vibecheck polish --list-passes", description: "List available passes" },
246
271
  ],
247
- related: ["ship", "reality"],
272
+ related: ["ship", "fix", "scan"],
248
273
  },
249
274
 
250
275
  reality: {
251
- description: "Browser-based runtime verification",
252
- longDescription: "Verify your app's runtime behavior with Playwright-powered browser testing.",
276
+ description: "Playwright browser verification - test runtime behavior",
277
+ longDescription: "Verify your app's runtime behavior with Playwright-powered browser testing. Tests actual API responses, UI behavior, and auth flows.",
253
278
  tier: "pro",
254
- category: "proof",
255
- aliases: ["browser", "e2e"],
279
+ category: "verification",
280
+ aliases: ["browser", "e2e", "playwright"],
256
281
  runner: () => require("./runners/runReality").runReality,
257
282
  examples: [
258
283
  { command: "vibecheck reality --url http://localhost:3000", description: "Test localhost" },
259
284
  { command: "vibecheck reality --auth email:pass", description: "With authentication" },
260
- { command: "vibecheck reality --agent", description: "AI agent testing" },
285
+ { command: "vibecheck reality --record", description: "Record video evidence" },
261
286
  ],
262
- related: ["prove", "ship"],
287
+ related: ["prove", "ship", "ai-test"],
288
+ },
289
+
290
+ "ai-test": {
291
+ description: "AI agent for autonomous app testing",
292
+ longDescription: "AI-powered autonomous testing that explores your app like a real user. Supports common scenarios like login, checkout, and signup flows.",
293
+ tier: "pro",
294
+ category: "verification",
295
+ aliases: ["agent", "autonomous"],
296
+ runner: () => require("./runners/runAIAgent").runAIAgent,
297
+ examples: [
298
+ { command: "vibecheck ai-test --url http://localhost:3000", description: "Explore app autonomously" },
299
+ { command: "vibecheck ai-test --url http://localhost:3000 --scenario login", description: "Test login flow" },
300
+ { command: "vibecheck ai-test --url http://localhost:3000 --headed", description: "Watch the AI test" },
301
+ ],
302
+ related: ["reality", "prove"],
303
+ },
304
+
305
+ prove: {
306
+ description: "Full proof loop with evidence pack",
307
+ longDescription: "Complete verification cycle: scan + reality check + evidence generation. Creates cryptographically signed proof pack.",
308
+ tier: "pro",
309
+ category: "verification",
310
+ aliases: ["p", "verify", "evidence"],
311
+ runner: () => require("./runners/runProve").runProve,
312
+ examples: [
313
+ { command: "vibecheck prove", description: "Run full proof loop" },
314
+ { command: "vibecheck prove --url http://localhost:3000", description: "With runtime testing" },
315
+ { command: "vibecheck prove --bundle", description: "Generate evidence pack" },
316
+ ],
317
+ related: ["ship", "reality"],
263
318
  },
264
319
 
265
320
  gate: {
266
- description: "CI/CD enforcement - fail builds on issues",
267
- longDescription: "Enforce quality gates in your CI/CD pipeline.",
321
+ description: "CI/CD enforcement - blocks deploys on issues",
322
+ longDescription: "Enforce quality gates in your CI/CD pipeline. Returns exit code 1 on failures to block deployments.",
268
323
  tier: "pro",
269
324
  category: "automation",
270
- aliases: ["ci", "enforce"],
325
+ aliases: ["ci", "enforce", "block"],
271
326
  runner: () => require("./runners/runGuard").runGate,
272
327
  examples: [
273
328
  { command: "vibecheck gate", description: "Run CI gate check" },
274
- { command: "vibecheck gate --strict", description: "Strict mode" },
329
+ { command: "vibecheck gate --strict", description: "Strict mode (fail on warnings)" },
330
+ { command: "vibecheck gate --threshold 80", description: "Custom score threshold" },
275
331
  ],
276
332
  related: ["ship", "scan"],
277
333
  },
278
334
 
279
335
  guard: {
280
- description: "AI guardrails - prompt firewall & hallucination checking",
281
- longDescription: "Validate AI-generated code and prompts. Detects prompt injection and verifies claims.",
282
- tier: "pro",
283
- category: "truth",
284
- aliases: ["ai-guard", "firewall", "validate"],
336
+ description: "Agent firewall - monitors/blocks AI agent actions",
337
+ longDescription: "AI agent firewall that validates file writes, command execution, and content. Observe mode (FREE) logs violations. Enforce mode (PRO) blocks violations. Protects against forbidden paths, dangerous commands, and hallucination patterns.",
338
+ tier: "free",
339
+ category: "firewall",
340
+ skipAuth: true, // Allow observe mode without authentication
341
+ aliases: ["firewall", "ai-guard"],
285
342
  runner: () => require("./runners/runGuard").runGuard,
286
343
  examples: [
287
- { command: "vibecheck guard", description: "Run all guardrail checks" },
288
- { command: "vibecheck guard --claims", description: "Verify AI claims" },
344
+ { command: "vibecheck guard --init", description: "Initialize firewall config" },
345
+ { command: "vibecheck guard --mode observe --action write --path .env", description: "Check path (observe)" },
346
+ { command: "vibecheck guard --mode enforce --action write --path .env", description: "Block write (PRO)" },
347
+ { command: "vibecheck guard --action execute --command \"rm -rf /\"", description: "Validate command" },
348
+ { command: "vibecheck guard --claims", description: "Verify AI claims (legacy)" },
289
349
  ],
290
- related: ["context", "fix"],
350
+ related: ["context", "fix", "scan"],
291
351
  },
292
352
 
293
- mcp: {
294
- description: "Start MCP server for AI IDEs",
295
- longDescription: "Launch an MCP server for AI IDE integration.",
353
+ "authority.approve": {
354
+ description: "Get authority verdict - APPROVED/REJECTED/PENDING with proofs",
355
+ longDescription: "Request approval from an authority for a specific action. Returns structured verdict with evidence and findings.",
296
356
  tier: "pro",
297
- category: "automation",
298
- aliases: [],
299
- runner: () => require("./runners/runMcp").runMcp,
357
+ category: "authority",
358
+ aliases: ["auth-verdict"],
359
+ runner: () => {
360
+ const { runAuthority } = require("./runners/runAuthority");
361
+ return (args, context) => runAuthority(['approve', ...args], context);
362
+ },
300
363
  examples: [
301
- { command: "vibecheck mcp", description: "Start MCP server" },
302
- { command: "vibecheck mcp --port 3099", description: "Custom port" },
364
+ { command: "vibecheck authority approve --authority security", description: "Security review" },
365
+ { command: "vibecheck authority approve -a security -a quality", description: "Multi-authority" },
366
+ { command: "vibecheck authority approve -a security --json", description: "JSON output" },
303
367
  ],
304
- related: ["context"],
368
+ related: ["authority", "authority.list", "ship"],
305
369
  },
306
370
 
307
- checkpoint: {
308
- description: "Compare baseline vs current, hallucination scoring",
309
- longDescription: "Track changes between scan runs. Detects new issues, resolved issues, and regressions.",
371
+ "conductor.status": {
372
+ description: "Multi-agent coordination status",
373
+ longDescription: "View status of registered AI agents, active locks, and pending proposals.",
310
374
  tier: "pro",
311
- category: "analysis",
312
- aliases: ["cp", "compare", "diff"],
313
- runner: () => require("./runners/runCheckpoint").runCheckpoint,
375
+ category: "coordination",
376
+ aliases: ["cstatus"],
377
+ runner: () => require("./runners/runConductor").runConductorStatus,
314
378
  examples: [
315
- { command: "vibecheck checkpoint", description: "Compare against baseline" },
316
- { command: "vibecheck checkpoint --set", description: "Save new baseline" },
379
+ { command: "vibecheck conductor.status", description: "View coordination status" },
380
+ { command: "vibecheck conductor.status --json", description: "JSON output" },
317
381
  ],
318
- related: ["scan", "fix"],
382
+ related: ["conductor.register", "conductor.lock"],
319
383
  },
320
384
 
321
- approve: {
322
- description: "Authority verdicts - PROCEED/STOP/DEFER with proofs",
323
- longDescription: "Execute authorities to get structured verdicts with proofs.",
385
+ "conductor.register": {
386
+ description: "Register AI agent for coordination",
387
+ longDescription: "Register an AI agent with the conductor for multi-agent coordination.",
324
388
  tier: "pro",
325
- category: "authority",
326
- aliases: ["auth-verdict", "authority"],
327
- runner: () => require("./runners/runApprove").runApprove,
389
+ category: "coordination",
390
+ aliases: ["cregister"],
391
+ runner: () => require("./runners/runConductor").runConductorRegister,
328
392
  examples: [
329
- { command: "vibecheck approve safe-consolidation", description: "Run authority" },
330
- { command: "vibecheck approve --list", description: "List authorities" },
393
+ { command: "vibecheck conductor.register --name cursor", description: "Register agent" },
331
394
  ],
332
- related: ["classify", "ship"],
395
+ related: ["conductor.status", "conductor.lock"],
333
396
  },
334
397
 
335
- polish: {
336
- description: "Production polish - final cleanup before deploy",
337
- longDescription: "Final production readiness checks and cleanup.",
398
+ "conductor.lock": {
399
+ description: "Acquire file lock for exclusive editing",
400
+ longDescription: "Acquire a lock on files for exclusive editing by an AI agent.",
338
401
  tier: "pro",
339
- category: "proof",
340
- aliases: ["prod", "final"],
341
- runner: () => require("./runners/runPolish").runPolish,
402
+ category: "coordination",
403
+ aliases: ["clock"],
404
+ runner: () => require("./runners/runConductor").runConductorLock,
405
+ examples: [
406
+ { command: "vibecheck conductor.lock src/file.ts", description: "Lock file" },
407
+ { command: "vibecheck conductor.lock --agent cursor src/", description: "Lock directory" },
408
+ ],
409
+ related: ["conductor.unlock", "conductor.status"],
410
+ },
411
+
412
+ "conductor.unlock": {
413
+ description: "Release file lock",
414
+ longDescription: "Release a previously acquired lock on files.",
415
+ tier: "pro",
416
+ category: "coordination",
417
+ aliases: ["cunlock"],
418
+ runner: () => require("./runners/runConductor").runConductorUnlock,
419
+ examples: [
420
+ { command: "vibecheck conductor.unlock src/file.ts", description: "Unlock file" },
421
+ { command: "vibecheck conductor.unlock --all", description: "Release all locks" },
422
+ ],
423
+ related: ["conductor.lock", "conductor.status"],
424
+ },
425
+
426
+ "conductor.propose": {
427
+ description: "Submit change proposal for review",
428
+ longDescription: "Submit a proposed change for review by the conductor before applying.",
429
+ tier: "pro",
430
+ category: "coordination",
431
+ aliases: ["cpropose"],
432
+ runner: () => require("./runners/runConductor").runConductorPropose,
342
433
  examples: [
343
- { command: "vibecheck polish", description: "Run polish checks" },
434
+ { command: "vibecheck conductor.propose --diff changes.patch", description: "Submit proposal" },
344
435
  ],
345
- related: ["ship", "prove"],
436
+ related: ["conductor.status", "authority.approve"],
346
437
  },
347
438
  };
348
439
 
@@ -2,39 +2,8 @@
2
2
  // vibecheck CLI UTILS - Professional Terminal Styling
3
3
  // ═══════════════════════════════════════════════════════════════════════════
4
4
 
5
- // ANSI color codes
6
- const c = {
7
- reset: '\x1b[0m',
8
- bold: '\x1b[1m',
9
- dim: '\x1b[2m',
10
- italic: '\x1b[3m',
11
- underline: '\x1b[4m',
12
- // Colors
13
- red: '\x1b[31m',
14
- green: '\x1b[32m',
15
- yellow: '\x1b[33m',
16
- blue: '\x1b[34m',
17
- magenta: '\x1b[35m',
18
- cyan: '\x1b[36m',
19
- white: '\x1b[37m',
20
- gray: '\x1b[90m',
21
- // Bright colors
22
- brightRed: '\x1b[91m',
23
- brightGreen: '\x1b[92m',
24
- brightYellow: '\x1b[93m',
25
- brightBlue: '\x1b[94m',
26
- brightMagenta: '\x1b[95m',
27
- brightCyan: '\x1b[96m',
28
- brightWhite: '\x1b[97m',
29
- // Background
30
- bgRed: '\x1b[41m',
31
- bgGreen: '\x1b[42m',
32
- bgYellow: '\x1b[43m',
33
- bgBlue: '\x1b[44m',
34
- bgMagenta: '\x1b[45m',
35
- bgCyan: '\x1b[46m',
36
- bgGray: '\x1b[100m',
37
- };
5
+ // Terminal UI - Import from shared module
6
+ const { c, icons, Spinner, rgb, bgRgb } = require("./lib/terminal-ui");
38
7
 
39
8
  // ASCII Art Banner
40
9
  const BANNER = `