47 lines
2.4 KiB
Markdown
47 lines
2.4 KiB
Markdown
# The Verifier Pattern
|
|
|
|
**May 26, 2026**
|
|
|
|
Here's the problem: engineers spend roughly half their day reviewing agent output. Every "I created the table," "I added the foreign key," "I applied the migration" gets re-checked by hand. That review work is the binding constraint on agentic engineering throughput.
|
|
|
|
The verifier pattern solves this: a second, read-only agent that automatically checks every claim the builder makes.
|
|
|
|
## Architecture
|
|
|
|
```
|
|
Builder (your terminal) ---unix socket---> Verifier (new window, input LOCKED)
|
|
| |
|
|
v writes: v reads (read-only tools):
|
|
session.jsonl session.jsonl
|
|
| |
|
|
<--- verifier_prompt (corrective feedback) ----'
|
|
```
|
|
|
|
The builder doesn't know the verifier exists. The verifier CANNOT write code — it only reads files, greps for evidence, and reports confidence.
|
|
|
|
## The Confidence Ladder
|
|
|
|
| Level | Meaning | Bar Color |
|
|
|-------|---------|-----------|
|
|
| PERFECT | Every claim verified, zero gaps | Green |
|
|
| VERIFIED | All passed, minor non-blocking gaps | Green |
|
|
| PARTIAL | No failures, significant unverifiable gaps | Orange |
|
|
| FEEDBACK | Claims failed, correction sent | Orange |
|
|
| FAILED | Cannot verify, escalating to human | Red |
|
|
|
|
## Why This Works
|
|
|
|
1. **Spend tokens to save time** — The verifier costs 2-5x more compute but collapses the review constraint from hours to seconds. Tokens are cheap. Your time is not.
|
|
|
|
2. **Structurally un-promptable** — The verifier's input is locked. You can't drop one-off instructions into it. The only way to fix a verification gap is to edit the persona or the prompt template — improvements solve the entire problem class, not one instance.
|
|
|
|
3. **Defense in depth** — The verifier has zero write tools. Even if compromised, it can't modify files. Its bash is restricted to read-only commands. This is the highest level of control you can give an agent.
|
|
|
|
## The Feedback Loop
|
|
|
|
Every "could not verify" report becomes the next improvement. The verifier teaches you what your verifier is missing. This is how you build the system that builds the system.
|
|
|
|
---
|
|
|
|
*This is an excerpt from Module 3 of the [Agentic Engineering Course](/). The full module includes runnable code for setting up the verifier-builder pattern with Unix socket communication and the confidence ladder.*
|