Coding agents can generate a 500-line diff in 60 seconds, which has shifted the bottleneck from writing code to reviewing it. Most of the bugs that slip through aren't dramatic syntax errors — they're quiet shortcuts:
- Skipping a failing test (
it.skip,pytest.mark.skip) or deleting assertions - Adding an empty
catch {}block or bareexcept: pass - Loosening security (
cors({ origin: '*' }),rejectUnauthorized: false) - Leaving hardcoded test keys or
debuggerstatements behind - Quietly bumping dependencies in
package.jsonorrequirements.txt
Most AI review tools either just render the raw diff or require an API key and cloud round-trip. So I built diffvet — a zero-API-key, sub-50ms local CLI that triages your git diff deterministically by risk and intent.
Try it in 1 command (zero install)
# Preview on a built-in sample AI PR
npx diffvet --demo
# Vet your current working tree (or last commit)
npx diffvet
# Interactive walkthrough (press 'c' to copy a fix prompt back to your agent)
npx diffvet -i
How it works
-
Deterministic Risk Engine (Zero LLM required): Scans added/removed diff hunks across 7 high-signal rules (
test-deletion-or-skip,silent-error-swallow,dangerous-exec-sink,auth-security-loosened,hardcoded-secrets,supply-chain-drift,debug-leftover). - Intent Bucketing: Separates files into High Risk, Logic, Tests & Docs, and Noise (lockfiles, formatting-only diffs, pure renames).
-
Optional
--aimode: Off by default — if you want a 3-bullet summary of the high-risk hunks, it uses native NodefetchwithGEMINI_API_KEY,ANTHROPIC_API_KEY,OPENAI_API_KEY, or localOLLAMA_HOST. -
CI / Pre-commit Ready: Run
npx diffvet --fail-on highto block risky agent commits automatically.
Repo (MIT): https://github.com/WaifuPuller/diffvet
If you try npx diffvet --demo or run it on one of your recent agent PRs, let me know what rules or languages you'd want added next!

Top comments (0)