Verdict Contract banner
tonydzi tonydzi

Verdict Contract

AI community

Description

Your LLM reviewer said APPROVE. Did it? A structured verdict contract: prompt rule + parser + exit-code gate in one stdlib file, with the 42 counterexamples that forced every line. Free, MIT.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

verdict-contract

**Your LLM reviewer said APPROVE. Did it?**

If you pipe a diff to a model and grep its reply for `VERDICT: APPROVE`, you do not have a gate — you have a coin flip that fails in the dangerous direction, and `test_verdict_contract.py` shows five ways it does.

This repo is the stdlib-only module that replaced ours — 197 lines in `verdict_contract.py` — plus the 42 counterexamples that forced every line of it, all of them runnable as `test_verdict_contract.py`.

MIT. No dependencies. Python 3.8+. Copy one file and go.


The failure it fixes

We ran a real two-vendor review gate over our own diffs, then asked the two vendors to review the gate itself; both independently answered `ROOT-FIXED: NO`. Every counterexample below is reproduced live by `test_verdict_contract.py`, and the afternoon they came from is written up in [devlog/2026-08-04-seven-rounds-to-a-verdict.md](devlog/2026-08-04-seven-rounds-to-a-verdict.md):

what the model wrote what the old parser read why it matters
I refuse to give a VERDICT
APPROVE would be wrong
APPROVE \s in the gap class quietly includes \n
Example output: VERDICT: APPROVE APPROVE a quoted example shipped as a real pass
the prompt text itself, echoed back APPROVE the instruction contained both literals: prompt self-poisoning
## VERDICT: REQUEST_CHANGES (nothing) a silent miss: review happened, no verdict recorded, nobody shouting
a blocking review, printed then exit 0 "the review passed" the verdict never reached the exit code

The last one is the whole category: a gate whose verdict lives only in stdout is not a gate, it is a log line. The exit-code half of the fix lives in `verdict_contract.py`.

And one that only shows up in production: a reviewer quoted a bare ` ``` ` **inside** a ` ```text ` block, our fence tracker desynced, a quoted APPROVE became "visible", and the gate approved a diff the reviewer had just rejected. Fence