Entry 09Agent infrastructure · verification2026

An agent harness that judges each code change with four mechanical checks

A language model writes the code, and a separate oracle (a program that reports pass or fail) decides whether the change is acceptable. The oracle runs four checks: the project’s tests, a symbol contract, a credential scan and a vulnerability scan. It is mechanical and deterministic, and no language model is part of it.

checks in the verdict4
model calls in the verdict0
auto-commits0
runtime dependenciesPython standard library

How the verdict is decided

An agent that writes code is driven by a language model, and something else has to decide whether the change is acceptable. A common choice is a second model reviewing the first. That reviewer can be confident about a bad code change, and running it again does not guarantee the same answer tomorrow.

Here the verdict is four stateless checks (each keeps no memory between runs). Each one is a program that reports an exit code. Run twice on the same tree, the checks give the same answer, on any machine and with no network.

CheckFails when
teststhe project’s own test suite does not pass
ir_contract (symbol contract)a change leaves its declared scope, or removes a symbol without opting in
secretsa credential is found in the staged change (the edits prepared for the next commit)
cve (known vulnerabilities)a reachable vulnerability is found (one the project’s code can trigger, as opposed to one that is only listed)

A symbol is a named piece of code, such as a function, type or constant. The symbol contract check uses the same deterministic index that powers RunEcho. A change declares the scope it intends to touch, and the gate compares the structural diff (the list of symbols added, removed or changed) against that declaration. If an agent deletes a function while working on something else, a hash comparison catches it, and nobody has to notice it in review.

the four checks, illustrated
tests        the suite passes
ir_contract  scope held, no silent symbol removal
secrets      nothing credential-shaped is staged
cve          no reachable vulnerability

any failure  →  exit 1, nothing proceeds
all four     →  the branch waits for a human

A human commits the change after the checks pass

When all four checks pass, the harness leaves the branch for a person to commit. There is no auto-commit.

“Autonomous” here means the plan, produce and verify cycle runs unattended, and a person still sees the result. The gate matters most when nobody is watching each step. In an interactive tool the person already judges every diff (each set of line changes), so a mechanical oracle adds the least there.

How a gateway assigns a model to each role

The second part is the runtime. A role is a job (consult, scout, builder, reviewer or scribe), and a gateway assigns a model to each role. Swapping a model is a gateway configuration change and needs no code change here.

Roles carry tools, and the runtime runs the full loop against them: request, tool call, result, next request. There are two tool sets, a code-intelligence set and a retrieval set, and every tool in them is read-only. They can find, trace, fetch and reason. They cannot yet edit a file or run a command, and that is what still separates them from a self-driving loop.

The code-intelligence set picks its index by the question being asked. One index answers where a symbol is, and it is live and always current. Another answers how things connect; it is stored, so it can lag behind uncommitted edits. A structural answer costs a few hundred tokens (the units a model reads text in) where the file it was derived from costs thousands.

What runs the plan, produce and verify loop today

The orchestration that ties plan, produce and verify together runs in a separate agent runtime, with each phase as an agent call. Today this harness supplies the judge and the tools, and that runtime supplies the loop.

One known gap: the harness’s own event records are currently written by asking a model to run a shell command. That breaks the project’s rule of keeping models out of the mechanical parts. It is the first thing being fixed, before the runtime can read the event log back and well before any tool set that can write exists.

Runtime state is kept outside the repository. Every step of a run is appended to a local event log as newline-delimited JSON (one JSON record per line).

Why the project is not an interactive coding tool

I considered and rejected building a model-agnostic interactive tool (one that works with any model) that a person drives. Matching an interactive coding assistant means matching its write tools, session loop, approval layer and context management, against teams orders of magnitude larger than one person. Those tools have no equivalent of the mechanical verdict, so the roadmap is built around the verdict.

Agent infrastructure Verification Python LiteLLM

Private repository. The oracle it verifies against is public: RunEcho.

Questions or a use case in mind? Email [email protected] · Back to portfolio