We Plugged an LLM Into Our Review Pipeline - And Built It So the Model Can Never Decide

Short answer: our agents file feedback and request human review
(EPIC-230), and humans were doing all the sorting, reading, and drafting
by hand. So we wired an LLM into six operator scenarios - classification,
summaries, knowledge search, answer drafts, feedback extraction, review
hints - under four modes where shadow means the model works blind and
supervised still ends with a human pressing the button. The decision
table has no code path an AI run can write to. Every mode change, every
call, and every cent of spend lands in append-only rows you can audit.

A robot agent handing suggestion cards through a plexiglass window to a human operator who alone holds the decision stamp, a wall of four mode switches labelled OFF SHADOW ASSIST SUPERVISED, and a small ledger tape recording every card

This is part of the Arc campaign series. Previous published episode:
a keyless agent protocol with signed webhooks
(EPIC-233). This article is EPIC-232: the AI layer on top of the review
pipeline - six operator scenarios where a model advises and a human
still answers for it.

The problem: how do you give AI access to decisions without giving it the keys?

A pipeline that takes agent reports and returns human review verdicts
generates exactly the work LLMs are good at: read a report, classify it,
summarize it, find related knowledge, draft a reply, extract the facts,
suggest a review outcome. The obvious move - let the model write
decisions - is also the one that breaks the promise we made in
EPIC-230: a verdict says who answered for it.

For a junior: think of a new hire on probation. You don't hand them the
company stamp on day one. First you watch them work while they can't see
your answers (shadow). Then you let them advise you (assist). Then you
let them fill the form you still sign yourself (supervised). EPIC-232 is
that career path written into the schema - and the stamp never leaves
the human's desk.

What shipped: six scenarios, four modes

Six scenarios are wired into the places where operators do the reading:
classification and summary on incoming interaction requests,
knowledge_search and answer_draft for preparing a response,
feedback_extract on the feedback lane, review_assist on review
cases. Each one independently runs in one of four modes:

  • off - the LLM is never called. This is also the answer for any scenario without a policy row: missing means off, not "default on".
  • shadow - the model runs blind. It answers real input, the run is recorded, and the operator never sees the output. Blind on purpose: if the operator could read the suggestion, they'd stop producing an honest human baseline to compare against.
  • assist - the suggestion renders next to the operator form. Advisory ink, clearly marked.
  • supervised - the model pre-fills the form. A human still submits the decision. confidence below the scenario threshold escalates to a human unconditionally.

There is no auto mode. That's not a missing feature - it's a decision:
fully autonomous writes don't enter the enum until shadow statistics
justify them.

A four-step staircase labelled OFF, SHADOW, ASSIST, SUPERVISED - a robot agent stands on SHADOW behind a frosted pane, a human hand holds the stamp on the top step, and a greyed-out AUTO step sits detached with a not yet tag

The spine: an outbox, a worker, and a ledger

The mechanics borrow a pattern we already trusted with money: the
ChainTxOutbox idea, applied to LLM calls. Intake writes an AiJob
row in the same transaction that accepts the report - so "we'll ask the
model later" can't be lost between request and queue. A worker claims
jobs under a lockedAt lease with a compare-and-swap guard, retries up
to maxAttempts, and refuses to double-run a claimed job.

Every attempt lands in AiRun - append-only, carrying the scenario,
the subject it ran on, input hash, output, confidence, provider, model,
prompt version, token count, latency, status, and modeAtTime. That
last field matters more than it looks: the mode is recorded with the
run
, so when a policy flips from shadow to assist you can still tell
which runs were blind measurements and which were seen by a human.

Policies live in AutomationPolicy - one row per scenario, one mode,
one threshold - and every change appends a PolicyChange row with the
actor and the reason. Not "someone toggled it": who, what, from-to, why.

The AI review pipeline - intake to same-tx AiJob outbox to worker claim under a CAS lease to provider call to append-only AiRun; a side lane shows AutomationPolicy feeding the effective-mode gates inside the worker tick

Declared is not effective - and the meter is real

The declared mode lives in the policy row. The effective mode is decided
at the worker tick: master env kill off? Everything is off. Monthly
budget spent? Scenarios shed. This is the part that matters in an
incident - you don't redeploy to stop spending, you flip a switch or
hit the per-scenario kill and the next tick obeys it.

The budget isn't estimated, it's metered. Each AiRun stores the
provider-reported token count; the monthly USD figure is summed from
real spend, and calls that fail before reaching the provider don't
count - the audit caught us charging ourselves for calls that never
happened. As of writing, the live meter reads budget: ok - 2 calls
today, ~$0.0012 this month
against a $2 ceiling and a 500-call daily
limit, with a per-stream partition so one busy lane can't starve the
others.

A monthly budget gauge with the needle at $0.0012 and a red $2 zone at the far end, beside three cut-off switches labelled MASTER, SCENARIO KILL and THRESHOLD ESCALATE wired to a 500-per-day token meter

A declared-versus-effective mode table - assist plus env kill disabled resolves to off, assist plus budget spent resolves to off, shadow resolves to shadow-blind, and a missing policy row resolves to off

The rule that isn't a promise: AI can't write decisions

Here's the structural claim, and it's worth being precise about.
ReviewDecision rows are created by exactly one code path: the human
decide POST, from the assignee, with per-criterion choices. A model run
can link to a decision - aiRunRef connects a confirmed decision to
the suggestion that informed it - but it can't create one, and the
link itself is validated server-side: the referenced run must exist,
target the same case, be a review_assist scenario, carry a
non-shadow modeAtTime, and have succeeded. A shadow run cited as
endorsement is refused. The audit caught exactly that hole - an
operator-asserted aiRunRef taken on faith - and it's a good story for
why "advisory" needs enforcement, not just intent.

Blindness is enforced the same way: shadow output never reaches
operator screens - not via the UI, not via the loader, not via a
re-classification that would smuggle the model's answer into view.

What the verification arc caught - including the live provider

Four independent checks, and each one caught something:

  1. Adversarial audit returned REQUEST CHANGES - 1 Critical (the aiRunRef forgery hole) plus nine Highs: shadow output leaking through a knowledge-search path, job claims without CAS enabling double-runs, error rows billed as calls, prompt-injection through unfenced input. Four rounds of fixes and re-review landed at APPROVE WITH NITS - zero Critical, zero High open.
  2. Production probe ran the deterministic suite against the live deployment: 106 checks, zero failures - every admin route 401s without a key, form tokens are single-use, forged scenario names bounce off a whitelist.
  3. Owner verification script - a read-only leg anyone can run - reports 19 PASS, 0 FAIL against production.
  4. The live provider swap found the bug the mocks couldn't. We pointed the module at DeepSeek and every call started failing: the API accepts json_object but not json_schema in response_format, and it answers with an HTTP 400 our retry logic treats as permanent. One env switch (AI_JSON_MODE) later, the same pipeline completed a real feedback_extract shadow run - real billed call, real tokens metered, same day.

Three mini comic panels - a magnifying glass over a forged aiRunRef stamp crossed out from a decision card, a checklist wall with 106 green ticks, and a json_schema card bouncing off an API slot stamped 400 while a json_object card slides in

Honest residuals

Two real shadow runs exist on prod today - enough to prove the pipe,
not enough to prove the model. Agreement metrics sit at zero compared
runs until shadow volume builds; thresholds stay null until they can
be calibrated on real disagreements, which is the honest state of a
calibration phase that started this week. The knowledge_search
scenario is wired but the knowledge corpus behind it is still empty -
ask returns a valid count: 0. And auto remains absent: the enum
grows only after the shadow data argues for it.

For AI agents: nothing about your surface changed - you still file
POST /api/v1/agent/feedback and POST /api/v1/agent/reviews as
before. What's new is upstream of the human: your report may be
classified, summarized, and pre-analyzed by a model before an operator
reads it. The verdict you receive is still written by a person, still
stamped binding: ADVISORY_HUMAN, and if a suggestion informed it, the
linkage is recorded - internally, server-validated, and never presented
to you as machine authority.

We don't trust the model. We measure it.

Read the Arc campaign series:
a keyless agent protocol with signed webhooks ·
typed feedback and human review ·
an inbox that proves what was said ·
verified knowledge for agents ·
counterparty trust on x402