Devanity Open
Devanity makes a repository able to accept more AI-generated change without growing review cost, defects or entropy in proportion. It is written for the person who answers for the repository, and it works in two loops:
- Per change: every agent change is cheap to accept. Rigor is proportional to what is at stake, every change carries a proof that was seen failing before the fix, and the agent never spends authority it was not given.
- Over time: every change leaves the repository easier to change correctly next time. Agents reproduce the patterns of the context they are given, and the repository is that context: a clean repository propagates cleanliness, one with debt propagates debt. So every observed failure becomes structure (a declared check, a ratchet — a baseline that lets a problem's count only go down —, a map entry), never just a corrected mistake.
What it solves
| Problem | What devanity does |
|---|
| False-ready: the agent says "done" or "verified" without evidence | "Verified" exists only in a devanity-proof block; the Stop hook re-runs the check the repository declares (never one the agent wrote) against HEAD and, when the claim does not hold, blocks the turn with the block it measured |
| Usurped authority: an available tool becomes a permission | high-risk and irreversible decisions stop as a [DECIDE][blocking], with the dependent slice left as a failing stub instead of a guessed default; the guard blocks high-risk paths and commands above the session's authority; the reference CI job fails a pull request whose high-risk check fails or that carries no proof block |
| Wrong rigor: the same process for a rename and for billing | a proportionality ladder that stops at the first rung that holds, from NO_CHANGE to "propose and stop" |
| Decision load: asking what the repository already answers, or deciding what belongs to a human | derive from the principles in the map before asking; a human-owned choice that is reversible before merge is taken on the recommendation, marked [DECIDE][provisional], and judged in batch at review; every answer is a rule written into the map, so the same axis is never asked twice; only the high-risk class and the irreversible block |
| Over-build: speculative abstraction, configuration and scaffolding | a craft ladder: what exists here, then stdlib, platform, installed dependency, one line |
| Rules that rot in prose: conventions nobody enforces | a durability ladder: audit proposes moving a recurring rule from prose into a test, lint rule, schema or CI gate, and dropping the prose in the same change |
| Pattern inertia: the agent replicates the repository's debt | reuse behavior through interfaces, never the shape of debt; debt is what the repository's gates say, not taste; init and audit propose ratchets from the repository's own stack so legacy stays frozen and new code meets the target, and debt turns recurring signals into the next proposal |
Where it works. In a repository. Every rule reads something there: the files a change touches, the check the repository declares, its ADRs and siblings, its gates. Without one (a chat, a system prompt with no files) devanity is outside its design; the field's text-only suites measure it there for comparison only (field suites), and the kernel is not tuned for them.
What it does not do. It protects against the agent that errs or races for a green check, not against an adversarial one. The binding boundary is the pipeline, outside the agent: the reference CI job, branch protection and CODEOWNERS. The in-session hooks are fast sensors that stop honest mistakes and measure; the agent never authors, and never weakens, the check that judges it.
Evidence so far (stage round, Sonnet, n=4, against baseline, ponytail, superpowers, a one-sentence control and an unreleased control that has only the craft ladder): devanity is the only arm that never took a human-owned decision (0/12 cells across rounds; the others took it in 2/4 to 4/4), it ties ponytail on leaving unneeded changes undone (4/4), and it reads the repository's ADR before guessing in 3/4 cells where the best competitor does 1/4. That round measured the kernel as of 439f8b5, before the v1 convergence rewrote it; only the Decisions block it measured is carried over unchanged. Size, rung-2 cost, greenfield, weaker models and the modes are not measured yet.
How to use
Install it once; the kernel applies to every coding turn without being invoked. Before touching anything, the agent stops at the first rung that holds: