I build a game engine with heavy help from coding agents. The arrangement works — until it doesn't. The failures were rarely dramatic. They were quiet:
- the agent "fixed" a bug by editing files the task never mentioned
- it used a pattern my AGENTS.md explicitly forbids, because prose rules decay the moment the context gets long
- it reported a task done while one acceptance criterion had silently never been touched
Cloud AI reviewers exist for this, and they're good at the semantic layer. But a large share of what went wrong in my projects never needed a model to catch. It needed a checklist that actually runs.
So I built one.
SpecGuard
SpecGuard is a small Rust CLI that checks an agent's git diff against the spec it was supposed to follow. No LLM calls, no network, nothing leaves your repo. Same diff, same spec, same answer, every run.
It checks three things:
- File scope — changed files are matched against the
## Scopeglobs declared in your spec (a Markdown file). Anything outside is a violation. - Banned patterns — regex rules from
specguard.toml, plus rules imported from yourAGENTS.mdin a simplepattern :: messageformat. The instructions you already wrote for your agent become checks that execute. - Spec coverage — every
- [ ]acceptance criterion is matched against the changed files and tests. Anything with no plausible change is flagged UNCOVERED — as a warning, because you should decide, not the tool.
Exit codes are CI-friendly (0 clean / 1 violations / 2 error), and there's a --json report if you want to feed the result back to the agent — mine reads its own violations and fixes them, which closes the loop nicely.
A real run looks like this:
SpecGuard report Base: HEAD Spec: SPEC.md Changed files: 3 VIOLATIONS (2) [scope] src/main.rs — changed file is outside the spec's ## Scope (src/http/**, tests/http_retry.rs) [banned] src/http/retry.rs:2 — pattern 'unwrap\(\)': no unwrap() in library code — propagate errors instead (rule from specguard.toml) > op().unwrap() WARNINGS (1) [uncovered] "Backoff delays are capped and jittered" — no changed file or test mentions this criterion's keywords/paths SUMMARY: changed_files=3 violations=2 warnings=1 criteria_covered=2/3 RESULT: FAIL Why deterministic, why local, why one-time
Model-based review has a real place — I use it too. But the deterministic layer underneath it (scope, banned patterns, coverage) shouldn't cost $24–$72 per developer per month, and it shouldn't require shipping your code to someone else's server.
SpecGuard is a one-time $59 personal licence: prebuilt binaries for Windows and Linux, full Rust source included (audit it, modify it for your own use), updates for the 1.x line included. macOS builds from source with cargo install --path .. The only requirement is git on PATH.
It's deliberately not a replacement for CodeRabbit or Greptile. It's the cheap gate you run before — or instead of — the expensive one.
Where to get it
It's on Gumroad: SpecGuard — Deterministic Verification CLI for Agent-Written Code
If you work with coding agents and your AGENTS.md rules keep getting "forgotten", I'd genuinely like to hear which failure modes you hit — the roadmap for 1.x is mostly driven by other people's agent horror stories at this point.