r/devtools • u/Emergency-Tutor-7 • 5d ago
plan-auditor: a completion gate that only accepts sealed command output as proof a task is done
Repo: https://github.com/Furox-Art/plan-auditor - MIT, Python 3.11+, standard library only, 2.6.5 on PyPI.
A plan is JSON. Each step carries machine-checkable verify entries, and at least one per step has to be behavioral: run, pytest or exec. file_exists and regex can sit beside it but cannot verify a step on their own. The implementing agent's claims are not an input to the verdict.
How it is built: the check runs in a separate process with its own implementation, so the agent's shell is not what decides. Command output goes into a SHA-256 hash-chained log, and a completion claim needs that chain HMAC-authenticated, because a hash chain alone is only tamper-evident - anyone with write access to the workspace can rebuild an identical one. The plan is sealed at activation and the verification contract at approval, so "done" cannot be redefined afterwards. check_monotonic only accepts strengthening; changing step identity or verification scope needs a newly approved generation.
Integration is a process boundary, not a plugin: hooks/gate_hook.py returns 0 for pass, 1 for blocked, 3 for unknown, and plan-auditor audit . prints JSON on every run with exit codes 0/1/2/3. A host with a blocking stop hook wires it there.
Why it matters: the failure it targets is narrow and common - the suite never ran, or it failed once and the test was edited until it passed. In prose those two look identical to a real pass.
One honest limit: a workspace with no active plan passes the hook, so read outcome in the JSON instead of trusting rc == 0, or "no plan activated" reads the same as "verified".