Verification Gates
The agent does not get to mark its own work as done. A verification gate reads the scope contract, the feedback log, the rule report, and the diff, and answers a single question: is this task actually complete? If the gate says no, the task is not done, no matter what the chat says. Define a verification gate as a deterministic function over workbench artifacts. Combine rule report, scope report, feedback records, and diff into a single verdict. Emit a verificationreport.json the reviewer agent and CI can both read. Refuse to advance a task on any block-severity failure, without exception. Agents declare success too easily. Three failure shapes dominate: "Looks good." The model read its own diff and decided it was correct. "Tests passed." Said with confidence. No record of the test actually running. "Acceptance met." Acceptance criteria interpreted loosely enough to mean "anything resembling done.". The workbench fix is a single verification gate that reads the artifacts the agent has already produced and makes the call. The gate is deterministic. The gate is in version control. The gate is wired into CI. The agent cannot bribe it. A warn finding annotates the verdict; a block finding prevents passed: true. The gate must produce the same verdict for the same artifact set every time. No LLM judges. LLM judges belong…
Verification Gates: The agent does not get to mark its own work as done. A verification gate reads the scope contract, the feedback log, the rule report, and…
This free lesson is part of the AI Engineering from Scratch curriculum. Read the full explanation, run the lesson code, and verify the result in the interactive reader or from the repository source.
Browse the complete course catalog or open this lesson on GitHub.