Skip to content
Back to Blog
Blog series
5 posts · 27 min read

Building the runtime

Compile, gateway, Critic, evaluators, failure handling — the per-request pipeline.

Share:XHN
1
April 21, 2026·6 min read

Build the Context Pack Compiler: Eight Stages, Eight Files

The first compile function we wrote was 600 lines, four mixed concerns, and a dozen places to add a bucket. Eight stages and eight short files later, the compile is something one engineer can hold in their head in an afternoon. Here is each stage as code, with what enters and what leaves.

2
May 5, 2026·5 min read

Build the Tool Gateway: The Boundary That Actually Stops a Bad Action

The Tool Gateway is the only path to external effect, which means it is the only place a destructive call can be stopped before it happens. Most stacks treat it as glue. Here is the resolver, the typed envelopes, and the destructive-path handshake — code you can paste in today.

3
May 2, 2026·5 min read

The Critic: verify, score, consolidate — in 80 Lines

The Planner is creative. The Executor is mechanical. The Critic is the part that says 'no' or 'yes, with caveats'. Most agent stacks ship without one, which means the Planner's output is also the verdict. Here is the Critic as three small functions and one typed report — concrete enough to wire into the loop today.

4
April 5, 2026·5 min read

Wiring the Five Evaluators: Policy, Utility, Latency, Safety, Cost

Five evaluators is not a slogan — it is the smallest set that catches the failure modes that actually ship to production. Here is each one as TypeScript you can paste into your harness today, plus the scorecard envelope they emit and the release gate that consumes it.

5
May 7, 2026·6 min read

Failure Playbooks: The Typed Verdict Map

When a tool call fails, the right next action depends on what kind of failure it was. Most stacks have one retry-with-backoff loop and call that 'failure handling'. The harness's job is to be specific — typed verdicts, dispatched to typed compensations, with a reversal-token check before any compensating write.

Analytics consent

We use Google Analytics to understand site usage. You can opt in or decline.