truth-mirror
truth-mirror is a Rust CLI that makes coding-agent claims falsifiable. It puts a
deterministic gate before commits, runs adversarial review by a different model
after commits, writes verdicts to a machine-readable ledger, blocks pushes with
unresolved rejections, and reinjects unresolved findings into Claude / Codex / Pi
prompt surfaces.
The whole point: a coding agent grading its own work over-rates it. truth-mirror
puts an opposed reviewer model on the critical path to falsify the agent's claims
without slowing its commit cadence.
Install
Quickstart
# Install the shared git hooks + per-agent reinjection surfaces (any subset).
# Review a commit with an opposed reviewer model (harness != model is enforced).
# Drain the async post-commit review queue.
# Sic the adversarial reviewer in a loop until N lies / N fuckups.
# Inspect the ledger.
Architecture
Three layers keep the expensive review off the agent's critical path while the cheap deterministic gates sit on the frequency-controllable actions:
- Pre-commit (commit-msg) gate — blocks mechanical lies (completion wording without evidence, configured fake markers) with no LLM, in milliseconds.
- Async post-commit review — a different reviewer model falsifies the
commit's machine-parseable
CLAIM:and recordsPASS/REJECTto the ledger. Optional strict two-pass and strict goal loop. - Pre-push gate + reinjection — a fast ledger read blocks pushes with unresolved rejections, and per-agent adapters surface findings into the next agent turn.
See the repository for the full threat model, the honest "what this does NOT
catch" section, BRIEF.md (source contract), and the OpenSpec requirements.
License
MIT