Machine-checked coherence for the rules that govern AI agents.
github.com/abenenson/legitimacy ↗
An AI agent is constantly making decisions that aren't about any single output: which tool call runs, what gets written to memory, when something is escalated to a human, which of several competing requests gets the one scarce review slot. That is a governance layer — an institution deciding who gets what authority — and today it is mostly unverified scripts. The usual answer, “AI governance,” checks whether each action is allowed; legitimacy asks a prior question about the rule doing the checking: is it even coherent? On exactly these surfaces, some coherence turns out to be provably impossible — worth knowing before you trust the rule.
Legitimacy treats an agent's rule layer as an institution — something that allocates authority among competing claims — and asks whether it does so coherently. Two results, both machine-checked in Lean 4:
The Legitimacy v1.0.0 set — six papers, readable on this site or as signed PDFs in the repository.
sorry, admit, or first-party axiom under the verification gate.
The diagnostic bites on real code: under the repository's declared extraction convention,
the committed OpenAI Codex and Claude Agent SDK models each expose specific monotonicity
failures — results about the extracted graph models, not behavioral verdicts on
the live products. Source-to-graph extraction is heuristic and empirical, a
stated trusted-base boundary, so reviewers can target attacks at the right layer.
Orthogonal to gateway products — they enforce; this audits.
v1.0.0 · public
Read the source and verification instructions, or download the signed release and paper artifacts. Development continues in a private upstream repository; accepted public contributions are reviewed and integrated through the curated release process.