@jigyasudham/veto 1.2.18 → 1.4.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.
package/README.md CHANGED
@@ -1,8 +1,50 @@
1
1
  # veto
2
2
 
3
- > **50 agents. 46 tools. 3 AIs. Self-learning. Zero extra cost.**
3
+ > **50 agents. 49 tools. 3 AIs. Self-learning. Zero extra cost.**
4
4
 
5
- An MCP server that runs locally on your machine, plugs into Claude Code, Codex CLI, and Gemini CLI using your existing subscriptions — giving every AI a council of specialist agents, persistent cross-platform memory, a self-learning router that improves automatically from every tool call, live usage tracking, CI/CD pipeline gates, workspace discovery, live documentation fetching, auto session save, and the ability to say no to bad decisions.
5
+ An MCP server that runs locally on your machine, plugs into Claude Code, Codex CLI, Gemini CLI, Cursor, Windsurf, and Zed using your existing subscriptions — giving every AI a council of specialist agents, persistent cross-platform memory, a self-learning router, CI/CD gates, workspace discovery, live docs, cross-platform handoff, usage metrics, and the ability to say no to bad decisions before any code is written.
6
+
7
+ ---
8
+
9
+ ## How the Agents Actually Work
10
+
11
+ **This is the most important thing to understand about Veto.**
12
+
13
+ Veto has two fundamentally different types of agents:
14
+
15
+ ### Council agents — real LLM reasoning (7 agents)
16
+
17
+ The 7 council agents call your existing AI subscription via MCP Sampling — they do not use a separate API key or cost anything extra. Each agent gets a tight system prompt, reasons independently, and returns a structured JSON verdict.
18
+
19
+ | Agent | Role |
20
+ |---|---|
21
+ | Lead Developer | Code quality, maintainability, implementation risk |
22
+ | Product Manager | Scope, timeline, business value |
23
+ | System Architect | Architecture fit, scalability, coupling |
24
+ | UX Designer | User impact, accessibility, friction |
25
+ | Devil's Advocate | Challenges assumptions, stress-tests the plan |
26
+ | Legal & Compliance | License risks, data handling, regulatory exposure |
27
+ | Security | OWASP, auth, injection, data leakage |
28
+
29
+ Use `strictness` to control depth:
30
+ - `fast` — 3 agents (Lead Dev + Architect + Security), instant
31
+ - `standard` — all 7 agents, default
32
+ - `strict` — all 7 agents + Devil's Advocate rebuttal round on the most critical blocker
33
+
34
+ `veto_benchmark` also runs LLM council — two debates in parallel for side-by-side approach comparison.
35
+
36
+ ### Expert modules — deterministic, instant, zero tokens (42+ agents)
37
+
38
+ Every other agent in Veto — coder, reviewer, tester, debugger, security scanner, secrets scanner, database, frontend, devops, and all 30+ others — is a **deterministic expert module**: structured templates, OWASP regex patterns, and domain heuristics compiled into code. They run offline, produce zero token cost, and return results in milliseconds.
39
+
40
+ ```
41
+ veto_agent_plan { agent: "coder", task: "..." } ← deterministic plan, instant
42
+ veto_code_review { code: "..." } ← regex + heuristic scanner, instant
43
+ veto_secrets_scan{ text: "..." } ← pattern matching, instant
44
+ veto_council_debate { task: "..." } ← 7 LLM calls via MCP Sampling
45
+ ```
46
+
47
+ **Why this split?** LLM reasoning costs tokens and latency — it's only worth it for high-stakes decisions before architecture/security/migration work. Pattern-matching is MORE reliable than LLMs for secrets detection and OWASP scanning (no hallucinations). The deterministic agents are the workhorses; the council is the gatekeeper.
6
48
 
7
49
  ---
8
50
 
@@ -10,8 +52,8 @@ An MCP server that runs locally on your machine, plugs into Claude Code, Codex C
10
52
 
11
53
  | Requirement | Version | Notes |
12
54
  |---|---|---|
13
- | **Node.js** | 22.5.0 or higher | Required — uses the built-in `node:sqlite` module (no native compilation). Download at [nodejs.org](https://nodejs.org). |
14
- | **At least one AI CLI** | Latest | Claude Code, Gemini CLI, or Codex CLI — whichever you use. Veto works with all three. |
55
+ | **Node.js** | 22.5.0 or higher | Required — uses built-in `node:sqlite` (no native compilation). Download at [nodejs.org](https://nodejs.org). |
56
+ | **At least one AI CLI** | Latest | Claude Code, Gemini CLI, or Codex CLI — whichever you use. Veto works with all. |
15
57
 
16
58
  ```bash
17
59
  node --version # must be v22.5.0 or higher
@@ -33,18 +75,19 @@ npx @jigyasudham/veto@latest init
33
75
  claude mcp add veto -s user -- npx -y --package @jigyasudham/veto veto-server
34
76
  ```
35
77
 
36
- The `-s user` flag registers Veto at user scope so it is available in **every VS Code window and project** without re-running anything. `veto init` does this automatically.
78
+ The `-s user` flag registers Veto at user scope so it is available in **every window and project** automatically.
37
79
 
38
80
  ### Other platforms
39
81
 
40
82
  | Platform | Config file written by `veto init` |
41
83
  |---|---|
42
84
  | **Gemini CLI** | `~/.gemini/settings.json` |
43
- | **Codex CLI** | `~/.codex/config.json` |
85
+ | **Codex CLI** | `~/.codex/config.toml` |
44
86
  | **Cursor** | `~/.cursor/mcp.json` |
45
87
  | **Windsurf** | `~/.codeium/windsurf/mcp_config.json` |
88
+ | **Zed** | `~/.config/zed/settings.json` · Windows: `%APPDATA%\Zed\settings.json` (`context_servers` key) |
46
89
 
47
- All config files are home-directory relative — they apply globally across all projects and windows. Restart the AI client after `veto init` to pick up the new config.
90
+ All config files are home-directory relative — they apply globally across all projects. Restart the AI client after `veto init`.
48
91
 
49
92
  ```json
50
93
  {
@@ -61,64 +104,73 @@ All config files are home-directory relative — they apply globally across all
61
104
 
62
105
  ## What Veto Does
63
106
 
64
- **Council** — Before any significant task, 7 specialist agents debate it in parallel and return a GREEN / YELLOW / RED / DEADLOCK verdict. Bad decisions get blocked before any code is written.
107
+ **Council** — Before any significant task, 7 specialist agents (LLM-backed via MCP Sampling) debate it in parallel and return a GREEN / YELLOW / RED / DEADLOCK verdict. Bad decisions get blocked before any code is written. Use `strictness: "fast"` for quick checks or `"strict"` for a full rebuttal round.
108
+
109
+ **Metrics** — `veto_metrics` gives you a live usage dashboard: sessions saved, council verdict breakdown, top agents by call count, 7-day quality trend, and knowledge base stats. Zero cost, pure SQLite.
110
+
111
+ **Changelog** — `veto_changelog` reads your git history since the last tag, groups commits by conventional type (feat, fix, refactor...), and returns a structured changelog ready to publish.
65
112
 
66
- **Codebase-aware agents** — Pass `project_dir` to any tool and Veto auto-reads `package.json`, detects your tech stack, and injects recent `git diff` context. Every agent responds to your actual project, not generic templates.
113
+ **Git blame** — `veto_git_blame` returns contribution history for any file or directory total commits, contributor list with counts, and last-modified metadata. Instant, local, no network.
114
+
115
+ **Codebase-aware agents** — Pass `project_dir` to any tool and Veto auto-reads `package.json`, detects your tech stack, and injects recent `git diff` context. Every agent responds to your actual project.
67
116
 
68
117
  **Structured output** — Every agent result carries `confidence`, `severity`, `recommendation`, `affected_files`, and `line_refs` — composable and actionable.
69
118
 
70
- **Router** — Every task is scored locally (zero tokens) and sent to the right model tier. Rate limits are tracked across all 3 platforms. The router self-adjusts from recorded outcomes and learns which agents perform best per file type.
119
+ **Router** — Every task is scored locally (zero tokens) and sent to the right model tier. Rate limits are tracked across all platforms. The router self-adjusts from recorded outcomes and learns which agents perform best per file type.
71
120
 
72
- **50 Agents** — Domain experts for every task type. Each agent knows when it is the right tool and when to defer.
121
+ **Memory** — Sessions, decisions, knowledge, and coding patterns persist across every conversation and platform. Sessions are searchable by summary, context, tags, or project path. Tag sessions with `tags: ["auth", "migration"]` and find them later with `query: "auth"`.
73
122
 
74
- **Memory** — Sessions, decisions, knowledge, and coding patterns persist across every conversation and every platform. Memory is automatically scoped to the active session's project directory two instances working on different projects stay isolated without any extra configuration.
123
+ **Workspace discovery** — `veto_discover` scans a project once and builds a rich context map: git state, tech stack, file tree, dependencies, and key config files.
75
124
 
76
- **Workspace discovery** — `veto_discover` scans a project once and builds a rich context map: git state, tech stack, file tree, dependencies, and key config files. Stored in Veto memory so every agent has accurate project context without re-reading files each time.
125
+ **Project summarization** — `veto_summarize` generates a concise expert briefing of a project, directory, or file.
77
126
 
78
- **Project summarization** — `veto_summarize` generates a concise expert briefing of a project, directory, or file in seconds. Use it at the start of a session to orient yourself on unfamiliar code.
127
+ **Explain anything** — `veto_explain` accepts a file path or raw text (error messages, stack traces, compiler output). Auto-routes to the right expert file extension detection for source files, debugger agent for error-like content.
79
128
 
80
- **Diff review** — `veto_diff_review` runs code review, security scan, and secrets scan in parallel across a git diff. Returns a pass/warn/fail verdict with per-file findings — ready for CI and pre-commit hooks.
129
+ **Diff review** — `veto_diff_review` runs code review, security scan, and secrets scan in parallel across a git diff. Returns a pass/warn/fail verdict ready for CI and pre-commit hooks.
81
130
 
82
131
  **File watching** — `veto_watch` monitors your project and tells you which agent to call when files change.
83
132
 
84
133
  **Sequential pipelines** — `veto_workflow` runs a chain of agents with pass/fail gates end to end.
85
134
 
86
- **File explanation** — `veto_explain` reads any file and routes it to the best-fit expert agent automatically.
135
+ **Cross-platform handoff** — Claude hitting its rate limit? `veto_handoff` open Gemini `veto_continue`. Full context restored in seconds.
87
136
 
88
137
  **Plugin system** — Drop a `.js` file in `~/.veto/agents/` and it registers as a custom agent available in every tool.
89
138
 
90
- **MCP Resources + Prompts** — Read Veto's memory as MCP Resources. Use built-in Prompts as reusable task templates.
91
-
92
- **Cross-platform handoff** — Claude hitting its rate limit? `veto_handoff` → open Gemini → `veto_continue`. Full context restored in seconds.
93
-
94
139
  ---
95
140
 
96
141
  ## The 50 Agents
97
142
 
98
- ### Council Layer (8) runs before any code is written
143
+ ### Council Layer — LLM-backed via MCP Sampling (8)
144
+
145
+ > These agents call your existing AI subscription. Real reasoning, real cost. Used exclusively by `veto_council_debate` and `veto_benchmark`.
146
+
99
147
  `Lead Developer` · `Product Manager` · `System Architect` · `UX Designer` · `Devil's Advocate` · `Legal & Compliance` · `Security` · `Decision Engine`
100
148
 
101
- ### Development (12)
149
+ ### Expert Modules — deterministic, instant, zero tokens (42)
150
+
151
+ > Pattern matching, domain heuristics, and structured templates compiled into code. Offline capable. No LLM calls.
152
+
153
+ **Development (12)**
102
154
  `Coder` · `Code Reviewer` · `Tester` · `Debugger` · `Refactor` · `Database` · `API` · `Frontend` · `Backend` · `DevOps` · `Performance` · `Migration`
103
155
 
104
- ### Security (6)
156
+ **Security (6)**
105
157
  `Security Scanner` · `Auth Agent` · `Data Privacy` · `Secrets Agent` · `Dependency Audit` · `Penetration Tester`
106
158
 
107
- ### Memory (5)
159
+ **Memory (5)**
108
160
  `Context Manager` · `Decision Logger` · `Project Mapper` · `Pattern Learner` · `Knowledge Base`
109
161
 
110
- ### Research (7)
162
+ **Research (7)**
111
163
  `Researcher` · `Tech Advisor` · `Cost Analyzer` · `Competitor Analyzer` · `Risk Assessor` · `Estimator` · `Ethics & Bias`
112
164
 
113
- ### Quality (5)
165
+ **Quality (5)**
114
166
  `Code Quality` · `Documentation` · `Accessibility` · `Compatibility` · `Error Handling`
115
167
 
116
- ### Workflow (7)
168
+ **Workflow (7)**
117
169
  `Task Planner` · `Task Coordinator` · `File Manager` · `Git Agent` · `Search Agent` · `Reporter` · `Automation`
118
170
 
119
171
  ---
120
172
 
121
- ## MCP Tools (46)
173
+ ## MCP Tools (49)
122
174
 
123
175
  | Category | Tools |
124
176
  |---|---|
@@ -133,9 +185,9 @@ All config files are home-directory relative — they apply globally across all
133
185
  | **Learning** | `veto_record_outcome` · `veto_learning_stats` · `veto_learning_apply` |
134
186
  | **Handoff** | `veto_handoff` · `veto_continue` · `veto_platform_setup` |
135
187
  | **Intelligence** | `veto_docs_fetch` · `veto_context_status` · `veto_task_parse` |
136
- | **Observability** | `veto_usage_status` · `veto_audit_log` · `veto_health` |
188
+ | **Observability** | `veto_usage_status` · `veto_audit_log` · `veto_health` · `veto_metrics` |
137
189
  | **CI/CD** | `veto_ci_gate` · `veto_pr_review` |
138
- | **Discover** | `veto_discover` · `veto_summarize` |
190
+ | **Discover** | `veto_discover` · `veto_summarize` · `veto_git_blame` · `veto_changelog` |
139
191
  | **Plugins** | `veto_plugins` |
140
192
 
141
193
  ## MCP Resources
@@ -160,10 +212,6 @@ All config files are home-directory relative — they apply globally across all
160
212
 
161
213
  ## CLI Commands
162
214
 
163
- Use these from any terminal to inspect Veto's brain without opening an AI session.
164
-
165
- After installing globally (`npm i -g @jigyasudham/veto`) or via npx:
166
-
167
215
  ```bash
168
216
  veto init # Configure all AI tools + scan project
169
217
  veto doctor # Check MCP registrations + system health
@@ -173,24 +221,17 @@ veto sessions # List last 20 saved sessions ([auto] badge on
173
221
  veto sessions --clean # Remove auto-saves older than 7 days
174
222
  veto memory [query] # Search knowledge base (blank = all entries)
175
223
  veto patterns [prefix] # List learned agent/routing patterns
176
- veto hook install # Install pre-commit secrets scan hook
177
- veto hook remove # Remove the veto pre-commit hook
178
- veto check # Scan staged changes for secrets (used by hook)
224
+ veto hook install # Install pre-commit secrets scan hook
225
+ veto hook remove # Remove the veto pre-commit hook
226
+ veto check # Scan staged changes for secrets (used by hook)
179
227
  veto help # Commands + MCP tools reference
180
228
  veto help --troubleshoot # Full troubleshooting guide (14 scenarios)
181
-
182
- # Without installing:
183
- npx @jigyasudham/veto help # Same help output, no install needed
184
- npx @jigyasudham/veto status # Check status from any machine
185
- npx @jigyasudham/veto doctor # Diagnose MCP setup from any machine
186
229
  ```
187
230
 
188
- `veto help` shows all CLI commands, all 45 MCP tool names, MCP Resources, and MCP Prompts. `veto help --troubleshoot` shows the full troubleshooting guide.
231
+ `veto help` shows all CLI commands, all 49 MCP tool names, MCP Resources, and MCP Prompts.
189
232
 
190
233
  ### `veto doctor`
191
234
 
192
- Diagnoses your full Veto setup in one command:
193
-
194
235
  ```
195
236
  veto doctor
196
237
 
@@ -206,122 +247,153 @@ veto doctor
206
247
  ✓ Claude Code — registered
207
248
  ✓ Gemini CLI — registered
208
249
  · Codex CLI — not installed
209
- · Cursor — not installed
250
+ · Zed — not installed
210
251
 
211
252
  ✓ All checks passed — Veto is healthy!
212
253
  ```
213
254
 
214
- Run `veto init` to repair any failing check.
215
-
216
255
  ---
217
256
 
218
- ## Workspace Discovery
219
-
220
- `veto_discover` scans a project once and stores a rich context map in Veto memory. Every subsequent agent call can read from this map instead of re-scanning files.
257
+ ## Council Debate
221
258
 
222
259
  ```
223
- veto_discover { "project_dir": "/your/project" }
260
+ veto_council_debate {
261
+ task: "migrate auth from sessions to JWTs",
262
+ project_dir: "/your/project",
263
+ strictness: "standard" ← fast | standard | strict
264
+ }
224
265
  → {
225
- git: { branch: "main", commit: "a3f2b1", dirty_files: [], recent_commits: [...] },
226
- ecosystems: { node: "my-app v2.1.0" },
227
- tech_stack: ["TypeScript", "React", "Prisma"],
228
- key_files: ["tsconfig.json", "prisma/schema.prisma", ".env.example"],
229
- total_files: 142,
230
- structure: ["src/", " components/", " api/", ...]
266
+ final_verdict: "YELLOW",
267
+ block_reasons: [],
268
+ warnings: ["JWT revocation requires a token blocklist — plan storage", "Clock skew between services can break expiry checks"],
269
+ votes: {
270
+ lead_dev: { verdict: "warn", reason: "Stateless JWTs complicate logout flows...", concerns: [...] },
271
+ architect: { verdict: "approve", reason: "Good fit for microservices...", concerns: [...] },
272
+ security: { verdict: "warn", reason: "Refresh token rotation must be atomic...", concerns: [...] },
273
+ ...
274
+ },
275
+ recommended: "Proceed with JWT migration. Implement a Redis blocklist for logout..."
231
276
  }
232
277
  ```
233
278
 
234
- Three depth levels: `quick` (git + package metadata only), `standard` (+ file tree, default), `full`.
279
+ ---
280
+
281
+ ## Session Tagging + Search
282
+
283
+ Tag sessions when saving to make them findable later:
284
+
285
+ ```
286
+ veto_session_save {
287
+ summary: "Implemented JWT auth middleware",
288
+ context: "...",
289
+ tags: ["auth", "jwt", "middleware"]
290
+ }
291
+
292
+ # Find it weeks later:
293
+ veto_sessions_list { query: "auth" }
294
+ → sessions matching "auth" in summary, context, tags, or project_dir
295
+ ```
235
296
 
236
297
  ---
237
298
 
238
- ## Project Summarization
299
+ ## New in v1.4.0
239
300
 
240
- `veto_summarize` gives you a concise expert briefing on any project or file useful when starting work on unfamiliar code.
301
+ ### `veto_metrics` — usage dashboard
241
302
 
242
303
  ```
243
- veto_summarize { "project_dir": "/your/project" }
304
+ veto_metrics {}
244
305
  → {
245
- subject: "project",
246
- tech_stack: ["TypeScript", "Next.js", "Prisma"],
247
- summary: {
248
- bullets: [
249
- "Full-stack Next.js app with Prisma ORM and PostgreSQL",
250
- "Auth via NextAuth sessions stored in DB, not JWT",
251
- "API routes under /src/app/api — RESTful, no tRPC",
252
- "Background jobs via BullMQ with Redis",
253
- "Deployed on Vercel — preview branches auto-deploy"
254
- ]
255
- }
306
+ sessions: { total: 45, today: 2, this_week: 8 },
307
+ council: { total: 24, today: 1, by_verdict: { GREEN: 12, YELLOW: 9, RED: 3 } },
308
+ agents: [ { agent: "coder", calls: 38, avg_quality: 86 }, ... ],
309
+ quality: { overall_avg: 86, trend: [{ date: "2026-05-17", avg: 89, count: 5 }] },
310
+ knowledge:{ total_entries: 12, by_type: { solution: 6, decision: 4, pattern: 2 } },
311
+ patterns: { total: 10 }
256
312
  }
313
+ ```
257
314
 
258
- # File-level:
259
- veto_summarize { "file_path": "/your/project/src/auth.ts", "focus": "security" }
315
+ ### `veto_changelog` — git changelog
260
316
 
261
- # Detailed prose instead of bullets:
262
- veto_summarize { "project_dir": "/your/project", "format": "detailed" }
317
+ ```
318
+ veto_changelog { project_dir: "/your/project" }
319
+ → {
320
+ since_tag: "v1.3.0",
321
+ total_commits: 23,
322
+ sections: [
323
+ { section: "Features", items: [{ message: "Add council strictness param", hash: "a3f2b1c0", ... }] },
324
+ { section: "Bug Fixes", items: [...] },
325
+ { section: "Refactoring", items: [...] }
326
+ ]
327
+ }
263
328
  ```
264
329
 
265
- ---
330
+ ### `veto_git_blame` — ownership data
331
+
332
+ ```
333
+ veto_git_blame { file_path: "/your/project/src/auth.ts" }
334
+ → {
335
+ path: "/your/project/src/auth.ts",
336
+ total_commits: 14,
337
+ contributors: [
338
+ { commits: 9, author: "Jigyasu Dham" },
339
+ { commits: 5, author: "contributor" }
340
+ ],
341
+ last_modified_at: "2026-05-16 18:30:00 +0530",
342
+ last_author: "Jigyasu Dham",
343
+ last_commit_message: "fix: JWT expiry check for clock skew"
344
+ }
345
+ ```
266
346
 
267
- ## Codebase-Aware Agents
347
+ ### `veto_explain` — now accepts raw text
268
348
 
269
- Pass `project_dir` to any agent tool — Veto auto-injects:
270
- - Project name, version, dependency list
271
- - Detected tech stack (React, Next.js, Prisma, Express, MCP, etc.)
272
- - Recent `git diff --stat` and last 5 commits
273
- - Config files present (tsconfig, vite.config, tailwind, etc.)
349
+ ```
350
+ # Error message / stack trace
351
+ veto_explain { text: "TypeError: Cannot read properties of undefined (reading 'id')\n at auth.ts:42" }
352
+ debugger agent explains the error and suggests root causes
274
353
 
354
+ # Still works for files
355
+ veto_explain { file_path: "/your/project/src/auth.ts", depth: "detailed" }
275
356
  ```
276
- veto_council_debate {
277
- task: "migrate auth from sessions to JWTs",
278
- project_dir: "/your/project" ← agents now know your actual stack
279
- }
357
+
358
+ ### Council `strictness` parameter
359
+
360
+ ```
361
+ veto_council_debate { task: "...", strictness: "fast" } # 3 agents, instant
362
+ veto_council_debate { task: "...", strictness: "standard" } # 7 agents, default
363
+ veto_council_debate { task: "...", strictness: "strict" } # 7 + devil rebuttal
280
364
  ```
281
365
 
282
366
  ---
283
367
 
284
- ## Diff Review
285
-
286
- Auto-reads `git diff HEAD` from `project_dir`, or pass a diff string directly:
368
+ ## Workspace Discovery
287
369
 
288
370
  ```
289
- veto_diff_review { project_dir: "/your/project" }
371
+ veto_discover { "project_dir": "/your/project" }
290
372
  → {
291
- verdict: "warn",
292
- files_changed: 4,
293
- code_review: { score: 78, critical: 0, high: 2, findings: [...] },
294
- security: { score: 91, critical: 0, high: 0, findings: [...] },
295
- secrets: { findings: [] },
296
- summary: "⚠️ WARN — 4 file(s) changed\nCode: approved_with_warnings (78/100)\n..."
373
+ git: { branch: "main", commit: "a3f2b1", dirty_files: [], recent_commits: [...] },
374
+ ecosystems: { node: "my-app v2.1.0" },
375
+ tech_stack: ["TypeScript", "React", "Prisma"],
376
+ key_files: ["tsconfig.json", "prisma/schema.prisma", ".env.example"],
377
+ total_files: 142
297
378
  }
298
379
  ```
299
380
 
300
- Works as a pre-commit hook or CI step. The `summary` field is a single string ready to post as a PR comment.
301
-
302
381
  ---
303
382
 
304
- ## GitHub PR Review
305
-
306
- Pass a PR URL — Veto fetches the diff and runs the full triple-scan automatically:
383
+ ## Diff Review
307
384
 
308
385
  ```
309
- veto_pr_review { pr_url: "https://github.com/owner/repo/pull/42" }
386
+ veto_diff_review { project_dir: "/your/project" }
310
387
  → {
311
388
  verdict: "warn",
312
- pr: { title: "Add auth middleware", author: "jigyasudham", changed_files: 6, ... },
313
- checks: {
314
- code_review: { score: 78, critical: 0, high: 2 },
315
- security: { score: 91, critical: 0, high: 0 },
316
- secrets: { clean: true }
317
- },
318
- review_comment: "## ⚠️ Veto Review — WARN\n...", ← paste directly into GitHub
319
- blocking_issues: []
389
+ files_changed: 4,
390
+ code_review: { score: 78, critical: 0, high: 2, findings: [...] },
391
+ security: { score: 91, critical: 0, high: 0, findings: [...] },
392
+ secrets: { findings: [] },
393
+ summary: "⚠️ WARN 4 file(s) changed..."
320
394
  }
321
395
  ```
322
396
 
323
- Set `GITHUB_TOKEN` in your environment for private repos. Public repos need no auth.
324
-
325
397
  ---
326
398
 
327
399
  ## Sequential Pipelines
@@ -329,80 +401,23 @@ Set `GITHUB_TOKEN` in your environment for private repos. Public repos need no a
329
401
  ```
330
402
  veto_workflow {
331
403
  steps: [
332
- { id: "code", agent: "coder", task: "implement auth middleware", gate: 70 },
333
- { id: "review", agent: "reviewer", task: "review the implementation", gate: 75 },
334
- { id: "security", agent: "security-scanner", task: "scan for vulnerabilities", gate: 80 },
335
- { id: "test", agent: "tester", task: "write test cases" }
404
+ { id: "code", agent: "coder", task: "implement auth middleware", gate: 70 },
405
+ { id: "review", agent: "reviewer", task: "review the implementation", gate: 75 },
406
+ { id: "security", agent: "security-scanner", task: "scan for vulnerabilities", gate: 80 },
407
+ { id: "test", agent: "tester", task: "write test cases" }
336
408
  ],
337
409
  project_dir: "/your/project"
338
410
  }
339
411
  → { verdict: "passed", steps_passed: 4, steps_failed: 0, results: [...] }
340
412
  ```
341
413
 
342
- If any step's confidence falls below its gate, the pipeline halts and returns `partial` with the exact failure point.
343
-
344
- ---
345
-
346
- ## Reactive File Watching
347
-
348
- ```bash
349
- veto_watch { project_dir: "/your/project" }
350
- → { watch_id: "a3f2b1c0" }
351
-
352
- # make some changes, then:
353
- veto_watch_poll { watch_id: "a3f2b1c0" }
354
- → [
355
- { file: "src/auth.ts", recommended_agent: "code-quality", suggested_tool: "veto_code_review" },
356
- { file: "package.json", recommended_agent: "dependency-audit", suggested_tool: "veto_agent_plan" },
357
- { file: ".env", recommended_agent: "secrets", suggested_tool: "veto_secrets_scan" }
358
- ]
359
- ```
360
-
361
414
  ---
362
415
 
363
416
  ## Self-Learning Router
364
417
 
365
- The router improves automatically no manual steps needed.
366
-
367
- Every tool that runs an agent auto-records a `learning_data` row when it completes. After any normal working session, `veto_learning_stats` will show live data and `veto_learning_apply` will start producing meaningful threshold adjustments after ~20 tool calls.
368
-
369
- **What auto-records (all of these, without any extra call):**
370
-
371
- | Tool | Quality signal used |
372
- |---|---|
373
- | `veto_council_debate` | Verdict: GREEN → 90, YELLOW → 60, RED → 20, DEADLOCK → 50 |
374
- | `veto_workflow` | Per-step confidence score |
375
- | `veto_execute_parallel` | Per-task confidence score |
376
- | `veto_route_task` | Routing registered (tier distribution) |
377
- | `veto_agent_plan` | Agent confidence |
378
- | `veto_code_review` | Analysis score |
379
- | `veto_security_scan` | Analysis score |
380
- | `veto_secrets_scan` | Clean = 100, findings found = score |
381
- | `veto_diff_review` | Average of code + security scores |
382
- | `veto_ci_gate` | Average of code + security scores |
383
- | `veto_pr_review` | Average of code + security scores |
384
- | `veto_explain` | Agent confidence |
385
- | `veto_task_parse` | Planner confidence |
386
- | `veto_summarize` | Agent confidence |
387
-
388
- You can still record manually for custom signals:
418
+ Every agent tool auto-records a quality signal when it completes. After any working session, `veto_learning_stats` shows live data and `veto_learning_apply` adjusts tier thresholds automatically after ~20 calls.
389
419
 
390
420
  ```bash
391
- veto_record_outcome {
392
- task_type: "fix-auth-bug",
393
- complexity: 45,
394
- model_tier: 2,
395
- output_quality: 88,
396
- agent: "debugger",
397
- file_ext: ".ts" # ← teaches which agent works best for .ts files
398
- }
399
- ```
400
-
401
- ```bash
402
- # After 20+ outcomes (auto or manual):
403
- veto_learning_apply # adjusts tier thresholds from your actual data
404
-
405
- # Next route_task call:
406
421
  veto_route_task { task: "debug auth issue", file_ext: ".ts" }
407
422
  → { ..., recommended_agent: "debugger" } # ← predicted from history
408
423
  ```
@@ -411,15 +426,11 @@ veto_route_task { task: "debug auth issue", file_ext: ".ts" }
411
426
 
412
427
  ## Plugin System
413
428
 
414
- Register custom agents without forking:
415
-
416
429
  ```js
417
430
  // ~/.veto/agents/my-agent.js
418
431
  export function plan(task, context) {
419
432
  return {
420
- agent: 'my-agent',
421
- task,
422
- tier: 2,
433
+ agent: 'my-agent', task, tier: 2,
423
434
  approach: 'Your custom approach...',
424
435
  steps: ['Step 1', 'Step 2'],
425
436
  checklist: ['[ ] Check 1'],
@@ -430,31 +441,16 @@ export function plan(task, context) {
430
441
  }
431
442
  ```
432
443
 
433
- Veto loads it on start. Use it in `veto_agent_plan { agent: "my-agent" }` or `veto_execute_parallel`.
434
-
435
444
  ---
436
445
 
437
446
  ## Cross-Platform Handoff
438
447
 
439
- **Rate limit mid-task:**
440
448
  ```
441
449
  Claude at 90% → veto_handoff { summary, context }
442
450
  Open Gemini → veto_continue { resuming_as: "gemini" }
443
451
  Full context restored. Continue exactly where you stopped.
444
452
  ```
445
453
 
446
- Every session tracks two fields:
447
- - `created_by` — which AI originally saved the session
448
- - `active_client` — which AI last resumed it (updated on every `veto_continue` or `veto_session_restore`)
449
-
450
- **Multiple AIs on different projects simultaneously:** Each MCP server process is independent. Sessions are always separate. Memory is automatically scoped to each process's active project — no cross-contamination.
451
-
452
- **Switch machines:**
453
- ```
454
- Machine A → veto_memory_export → veto-export.json
455
- Machine B → veto_memory_import → veto_session_restore
456
- ```
457
-
458
454
  | Platform | Support |
459
455
  |---|---|
460
456
  | Claude Code | ✅ Native MCP |
@@ -462,6 +458,7 @@ Machine B → veto_memory_import → veto_session_restore
462
458
  | Codex CLI | ✅ MCP support |
463
459
  | Cursor | ✅ MCP support |
464
460
  | Windsurf | ✅ MCP support |
461
+ | Zed | ✅ MCP support (`context_servers`) |
465
462
 
466
463
  ---
467
464
 
@@ -469,76 +466,62 @@ Machine B → veto_memory_import → veto_session_restore
469
466
 
470
467
  | Phase | Status | Version |
471
468
  |---|---|---|
472
- | 1 — Foundation | ✅ Complete | v0.1.0 |
473
- | 2 — Router | ✅ Complete | v0.2.0 |
474
- | 3 — Council | ✅ Complete | v0.3.0 |
475
- | 4 — Core Agents | ✅ Complete | v0.4.0 |
476
- | 5 — Memory System | ✅ Complete | v0.5.0 |
477
- | 6 — Self-Learning | ✅ Complete | v0.6.0 |
478
- | 7 — Cross-Platform | ✅ Complete | v0.7.0 |
479
- | 8 — All 50 Agents | ✅ Complete | v0.8.0 |
480
- | 9 — Codebase Context + Structured Output + MCP Resources/Prompts | ✅ Complete | v0.9.0 |
481
- | 10 — Watch, Workflow, Explain, Plugins | ✅ Complete | v0.10.0 |
482
- | 11 — Smarter Council + Predictive Routing + Auto Project Map | ✅ Complete | v0.11.0 |
483
- | 12 — CLI Subcommands + Diff Review | ✅ Complete | v1.0.0 |
469
+ | 1–12 — Foundation through CLI + Diff Review | ✅ Complete | v0.1.0 – v1.0.0 |
484
470
  | 13 — Developer Intelligence + Auto Docs | ✅ Complete | v1.1.0 |
485
471
  | 14 — Observability + Usage Stats + Audit Log | ✅ Complete | v1.2.0 |
486
472
  | 15 — CI/CD Gates + GitHub PR Review | ✅ Complete | v1.2.5 |
487
473
  | 16 — Workspace Discovery + Summarization + Doctor | ✅ Complete | v1.2.8 |
488
474
  | 17 — VS Code Extension + Token Budget + Risk Annotations | ✅ Complete | v1.2.14 |
489
- | 18 — Extension Upgrades (status bar, PR review, Learning Stats panel, secrets trigger) | ✅ Complete | veto-vscode v0.6.0 |
490
- | 19 — Auto-Learning Hooks (every agent tool auto-records outcomes) | ✅ Complete | v1.2.15 |
491
- | 20 — Auto-Store Memory (RED verdict + critical scan findings → Memory panel) | ✅ Complete | v1.2.16 |
492
- | CLI Polish `veto version`, short help, session transparency, TAGLINE constant | ✅ Complete | v1.2.17 |
493
- | 21Closing the Loop (#42 auto-thresholds, #43 pre-commit hook, #44 veto_benchmark) | ✅ Complete | v1.2.18 |
475
+ | 18 — Extension Upgrades | ✅ Complete | veto-vscode v0.6.0 |
476
+ | 19 — Auto-Learning Hooks | ✅ Complete | v1.2.15 |
477
+ | 20 — Auto-Store Memory on RED | ✅ Complete | v1.2.16 |
478
+ | 21Closing the Loop (auto-thresholds, pre-commit hook, benchmark) | ✅ Complete | v1.2.18 |
479
+ | 22LLM Council (MCP Sampling, per-model context windows) | ✅ Complete | v1.3.0 |
480
+ | 23 — Quality + Features (TTL cache, metrics, git blame, changelog, Zed, session tags) | ✅ Complete | v1.4.0 |
494
481
 
495
482
  ---
496
483
 
497
484
  ## Changelog
498
485
 
486
+ ### v1.4.0
487
+ - **feat:** `veto_metrics` — live usage dashboard (sessions, council verdicts, top agents, quality trend, knowledge stats). Pure SQLite reads, zero cost.
488
+ - **feat:** `veto_changelog` — structured changelog from git history since last tag, grouped by conventional commit type.
489
+ - **feat:** `veto_git_blame` — file/directory ownership data from local git (contributors, commit counts, last-modified metadata).
490
+ - **feat:** Council `strictness` param — `fast` (3 core agents, instant) / `standard` (7 agents, default) / `strict` (7 + Devil's Advocate rebuttal round on most critical blocker).
491
+ - **feat:** Session tagging — `veto_session_save` accepts `tags: string[]`; `veto_sessions_list` accepts `query` for full-text search across summary, context, tags, and project_dir.
492
+ - **feat:** Zed editor support — `veto init` now auto-configures Zed via `~/.config/zed/settings.json` (`context_servers` key).
493
+ - **feat:** `veto_explain` accepts raw `text` — error messages, stack traces, and compiler output are auto-routed to the debugger agent.
494
+ - **fix:** `task_plans` TTL — cached plans older than 7 days are no longer returned; `veto_task_parse` checks cache before running the planner agent.
495
+ - **fix:** Complexity scorer — word-count cap raised from 20→25 pts; +5 bonus for tasks over 60 words.
496
+ - **fix:** Path sanitization — `readProjectContext` now validates that the resolved path is a directory before running any `git` commands.
497
+ - **refactor:** Tool definitions extracted from `server.ts` into `src/tools/definitions.ts` (49 tools, grouped by category). `server.ts` reduced from 2640 → 1907 lines.
498
+
499
+ ### v1.3.0
500
+ - **feat:** Council agents are now LLM-backed via MCP Sampling — all 7 agents call the host LLM in parallel and return real reasoning, not deterministic templates. Deterministic fallback per agent if sampling is unavailable.
501
+ - **feat:** Full agent reasoning returned — `votes` now includes each agent's complete `reason`, `concerns`, and `recommendation`.
502
+ - **feat:** Knowledge retrieval pre-hook — council searches `knowledge_base` for similar past decisions before each debate.
503
+ - **feat:** `veto_benchmark` runs two LLM council debates in parallel.
504
+ - **feat:** Auto-store on YELLOW — significant YELLOW verdicts now stored in knowledge base with per-agent reasoning.
505
+ - **feat:** Per-model context windows — `veto_status` and `veto_session_save` accept `model` param for exact window resolution.
506
+
507
+ ### v1.2.19
508
+ - **fix:** `veto_session_save` accepts optional `session_id` — updates that row in-place instead of inserting a new one.
509
+
499
510
  ### v1.2.18
500
- - **feat:** Auto-apply learned thresholds after every 20 `autoRecord()` calls the router thresholds update automatically, no manual `veto_learning_apply` needed
501
- - **feat:** `veto hook install` / `veto hook remove` — writes a `.git/hooks/pre-commit` that blocks commits containing critical/high secrets
502
- - **feat:** `veto check` — fast secrets scan on staged changes (used by the hook, also runnable standalone)
503
- - **feat:** `veto_benchmark` tool (tool #46) — two approaches → two parallel council debates → structured winner with verdict, confidence, warning delta, and per-agent votes
511
+ - **feat:** Auto-apply learned thresholds after every 20 `autoRecord()` calls.
512
+ - **feat:** `veto hook install` / `veto hook remove` — pre-commit secrets scan hook.
513
+ - **feat:** `veto check` — fast secrets scan on staged changes.
514
+ - **feat:** `veto_benchmark` (tool #46) — two approaches → two parallel council debates → structured winner.
504
515
 
505
516
  ### v1.2.17
506
- - **fix:** `veto version` (and `veto v`) no longer shows "Unknown command" — now an alias for `veto status`
507
- - **fix:** Unknown commands show a short 2-line error instead of the full 100-line help wall
508
- - **fix:** `veto help` is now ~50 lines (commands + tools + resources). Full troubleshooting guide moved to `veto help --troubleshoot`
509
- - **fix:** Tagline `"50 agents. 45 tools. 3 AIs."` extracted to a single `TAGLINE` constant in `cli.ts` only one place to update when tool count changes
510
- - **feat:** Sessions now track `save_type` (`manual` | `auto`) — auto-saves show a dim `[auto]` badge in `veto sessions` output
511
- - **feat:** `veto sessions --clean` removes auto-saves older than 7 days (keeps all manual saves)
512
-
513
- ### v1.2.16
514
- - **feat:** Auto-store knowledge entries on RED council verdict and critical scan failures — entries appear in the VS Code Memory panel immediately without any manual `veto_memory_store` call. RED verdict stores block reasons + warnings + recommended action. Critical findings from `veto_diff_review`, `veto_ci_gate`, and `veto_pr_review` store the blocking issue list when verdict is `fail`.
515
-
516
- ### v1.2.15
517
- - **feat:** Auto-learning hooks — `learning_data` now fills automatically from every agent-producing tool. No manual `veto_record_outcome` calls needed. Hooks fire on `veto_council_debate` (verdict → quality score), `veto_workflow` (per-step confidence), `veto_execute_parallel` (per-task confidence), `veto_route_task` (tier distribution), plus `veto_agent_plan`, `veto_code_review`, `veto_security_scan`, `veto_secrets_scan`, `veto_diff_review`, `veto_ci_gate`, `veto_pr_review`, `veto_explain`, `veto_task_parse`, and `veto_summarize`. After any working session, `veto_learning_stats` shows live data and `veto_learning_apply` starts producing real threshold adjustments after ~20 calls.
518
-
519
- ### v1.2.14
520
- - **feat:** Token budget per operation — `max_tokens` optional param on `veto_council_debate` and `veto_execute_parallel`; warns if estimated output exceeds budget; all calls logged to new `usage_log` table; `veto_usage_status` now includes `operation_budget_log`
521
- - **feat:** MCP tool risk annotations — all 45 tools annotated with `readOnlyHint`, `destructiveHint`, `openWorldHint` using the official MCP SDK annotation fields; 23 read-only, 3 destructive, 2 open-world
522
-
523
- ### v1.2.13
524
- - **feat:** Real token tracking for Rate Status — `tokens_today` and `budget_used_pct` per platform; `veto_usage_status` accepts `set_budget` to configure daily token limits (defaults: Claude 500K, Gemini 1M, Codex 200K)
525
-
526
- ### v1.2.12
527
- - **feat:** `veto_pr_review` — pass a GitHub PR URL, Veto fetches the diff via GitHub API and runs the full triple-scan (code review + security + secrets). Returns a structured verdict and ready-to-post GitHub review comment. Set `GITHUB_TOKEN` for private repos.
528
-
529
- ### v1.2.11
530
- - **fix:** `veto init` now registers Codex CLI via `codex mcp add` (writes to `~/.codex/config.toml`) instead of `config.json` — Codex CLI ignores `mcpServers` in JSON entirely
531
- - **fix:** `veto doctor` checks `codex mcp list` / `config.toml` for Codex registration instead of the wrong `config.json` key
532
- - **fix:** `veto_platform_setup` for Codex now shows the correct TOML-based config path, `codex mcp add` install command, and a Windows `npx.cmd` note
533
- - **fix:** Windows — `veto init` passes `npx.cmd` to `codex mcp add` so the Codex Rust binary can resolve the command
534
-
535
- ### v1.2.10
536
- - **fix:** `veto init` writes `npx.cmd` (not `npx`) for all platform configs on Windows — Node's `child_process.spawn` cannot resolve bare `npx` on Windows
517
+ - **fix:** `veto version` no longer shows "Unknown command".
518
+ - **fix:** Unknown commands show a short 2-line error.
519
+ - **fix:** `veto help` is now ~50 lines; full troubleshooting moved to `veto help --troubleshoot`.
520
+ - **feat:** Sessions track `save_type` (`manual` | `auto`); `veto sessions --clean` removes old auto-saves.
537
521
 
538
- ### v1.2.8 v1.2.9
539
- - `veto_summarize` toolcompress any session into a portable summary
540
- - `veto doctor` CLI command full system health check with per-platform registration status
541
- - Shared `discover` module powering both `veto_discover` and `veto init` project scanning
522
+ ### v1.2.15 v1.2.16
523
+ - Auto-learning hooks`learning_data` fills automatically from every agent-producing tool.
524
+ - Auto-store knowledge entries on RED council verdict and critical scan failures.
542
525
 
543
526
  ---
544
527
 
@@ -548,7 +531,7 @@ Machine B → veto_memory_import → veto_session_restore
548
531
  - **Runtime:** Node.js 22.5+ (built-in `node:sqlite` — no native compilation)
549
532
  - **Dependencies:** `@modelcontextprotocol/sdk` only — one package, zero native addons
550
533
  - **Memory:** Local SQLite — zero config, works offline, portable via JSON export
551
- - **Platforms:** Claude Code · Gemini CLI · Codex CLI · Cursor · Windsurf
534
+ - **Platforms:** Claude Code · Gemini CLI · Codex CLI · Cursor · Windsurf · Zed
552
535
 
553
536
  ---
554
537