r/BuildWithClaude • u/Emergency-Tutor-7 • 7h ago
Project A stop gate that makes Claude Code prove "done" with command output
Repo: https://github.com/Furox-Art/plan-auditor - MIT, 2.6.5.
The annoying part of agent work is not the code, it is the summary at the end. "Tests pass, refactor complete" is indistinguishable from "I changed the assertion until it went green" unless something re-runs the checks outside the agent's own process.
plan-auditor is that something, and for Claude Code it wires in as a stop hook: scripts/stop_gate.py delegates to the same evaluate_workspace the CLI uses, so the hook and plan-auditor audit cannot disagree about what counts as done. hooks/gate_hook.py is the primary gate; copy the skill folder into ~/.claude/skills/plan-auditor/ and point the blocking hook at one of them.
What a plan step has to look like: at least one behavioral check (run, exec or pytest). regex and file_exists exist for convenience and cannot verify a step on their own. The verification contract is sealed when the plan is approved and can only be tightened afterwards.
Exit codes are the interface: 0 proven, 1 failed, 2 blocked, 3 UNKNOWN. 3 withholds completion rather than passing it, which is what makes an inconclusive check safe to run in a loop. Evidence lands in a SHA-256 hash chain, and a completion claim needs it HMAC-authenticated, because a bare chain is only tamper-evident - anyone with write access to the workspace can rebuild an identical one.
Install:
pipx install plan-auditor
npm i -g plan-auditorThe npm package is a thin Node launcher around the same CLI and needs Python on PATH. Python 3.11+, no third-party runtime dependencies, no LLM anywhere in the verification path.
The limit: it proves the sealed commands exited as declared. It cannot tell whether a command that exits 0 actually tests the behavior you asked for. A weak check seals exactly as cleanly as a strong one.
•
u/AutoModerator 7h ago
Welcome to r/BuildWithClaude!
Whether you are sharing what you built, exploring new workflows, or troubleshooting, please make sure your post is flaired correctly so others can easily find and filter it.
Community Wiki & Resources:
If you're asking for troubleshooting help, please edit your post to include your model version, OS/environment, and error logs.
Let’s keep the energy positive and support our fellow creators!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.