Enforcing AI Agent Completion with Runnable Acceptance Gates
AICodeKinggo watch the original →
the gist
unlazy replaces subjective 'done' reports from AI agents with a mandatory ledger of shell-based acceptance gates that require verifiable evidence before a task is considered complete.
The Breakthrough
unlazy shifts the definition of task completion from an AI agent's internal state to an external, machine-verifiable ledger called gates.md, which requires successful shell command execution and specific output matching before a task is marked as finished.
What Actually Worked
- Runnable Acceptance Ledger: The agent must author a
gates.mdfile containingCHECK(shell command) andEXPECT(success marker) lines. A gate is only met if the command exits with code 0 and the output contains the expected text. - Evidence-Based Verification: The checker records a permanent evidence line in the ledger, including the resolved shell, working directory, exit status, and a path fingerprint, preventing the agent from falsely claiming completion.
- Strict Approval Safety: The system blocks execution of shell commands until the user explicitly approves them. Approvals are cryptographically bound to the exact command, path, environment, and ledger state, ensuring that any change in the task scope requires re-approval.
- Depth Tree Orchestration: For complex tasks, the tool uses a
depth treeto decompose work into scoped leaves. Each leaf owns specific file paths and must satisfy its own integration gates before the parent task can verify completion. - Claude Code Stop Hook: An optional hook prevents the agent from ending a session if the
gates.mdledger still contains unmet requirements, with a built-in escape valve after six consecutive blocks to prevent infinite loops.
Context
AI coding agents frequently suffer from 'laziness,' where they report tasks as complete while leaving code unfinished, untested, or filled with placeholders. The unlazy tool addresses this by forcing agents to define success criteria upfront and providing a framework to verify those criteria through actual execution. It is designed for substantial, multi-hour refactors or parallel builds where the cost of silent failure is high, rather than for trivial edits.
Notable Quotes
"The model does not get to grade its own homework anymore; the ledger does."
Content References
{"type": "tool", "title": "unlazy", "url": "https://github.com/leongx/unlazy", "context": "reviewed"}, {"type": "tool", "title": "Claude Code", "context": "mentioned"}, {"type": "tool", "title": "Codeex CLI", "context": "mentioned"}, {"type": "paper", "title": "SWE-bench", "context": "cited"}