Guardrails and Requirements

Unit 4 · Control·Module 10 of 20·13 min

By the end of this module

  • Separate an obligation written in a prompt from a mechanism that enforces one
  • Place a check at the right hook point for what it needs to see and do
  • Judge when a control should block and when it should only watch

Definition

Every team has a list of things their agent must never do. The list is usually real, usually agreed, and usually written in a prompt. That last part is the subject of this module.

A requirement is an obligation met by instruction. The agent is told, and nothing enforces it. A control is an intervention on the loop: code that runs at a defined point and can stop, change or record what passes. A guardrail is the policy itself, which may be implemented either way.

This is the binding distinction from unit three wearing different clothes. An obligation the model is asked to honour is discretionary. An obligation checked by code at a hook is edge-bound. Both appear in a design document as a bullet point beginning "must".

Three Things With One Name

RequirementControl
How it is metBy telling the agent, in its instructions.By code that runs whether the agent cooperates or not.
What enforces itNothing.The runtime, at a defined hook point.
How it failsQuietly, on a run that looks like every other run.Loudly, and the run gets a guardrail exit.
CostContext budget, and nothing else.Latency if it blocks, engineering either way.
What it is good forObligations no mechanism can judge: tone, pitching an explanation, knowing when to stop.Obligations with a decidable answer: amounts, permissions, destinations, formats.
How you know it holdsSampling, which tells you about the runs you sampled.By construction, which tells you about the runs you have not seen.

Requirements are not a failure of engineering. Plenty of obligations cannot be checked by code, because judging them needs the judgement the model is there to provide. Tone, helpfulness, not being condescending: no mechanism catches these, so they are instructed and sampled. The mistake is not having requirements. It is not knowing which of your obligations are only requirements.

The Hook Plane

A control does not sit in the flow. It attaches beside a stage, at one of eight points, and each point differs in what it can see and what it can still do about it. Click through them.

The run, left to right. Hooks sit beside the stages, never in them.
Run starts
Model call
Tool call
Message added
Run ends
blocking, costs latencystreamingshadow, costs nothing
before-toolblocking
What it seesThe proposed call and its arguments, before the tool runs.
What it can doProceed, guide, confirm with a person, or deny.
Typical useThe argument check from unit two. Anything with side effects.
CostOn every tool call, which is why a fast check matters here.

Position decides capability. A check that needs to see the model's complete answer cannot also stop the run before the model was called, and a check that wants to stop something cheaply has to run before the expense, when it knows least. Most arguments about guardrails are really arguments about this trade, held without naming it.

Drawing a control as a box in the flow is the commonest mistake in a hand-made agent diagram, and it is not cosmetic. A check drawn as a step looks like something the agent passes through, which invites implementing it as a tool the agent may call, which makes it discretionary, which means it is not a control at all.

Blocking and Watching

The second property of a control is whether it is in the way.

ModeBehaviourWhen it is right
BlockingThe run waits for the check, and the check can stop it.The thing being prevented is worse than the delay. Anything with side effects or money.
StreamingRuns against output as it is produced, and can halt mid-reply.The answer is streamed to a person and part of it has already been read.
ShadowSees everything, delays nothing, prevents nothing.Measuring how often something happens before deciding whether to block it.

The honest version of most guardrail conversations is this: blocking controls are the ones that work and the ones that cost. A shadow control that has been firing on 4% of runs for six months has prevented nothing. It has told you that 4% of runs need a blocking control, which is worth knowing and is not the same as having one.

quizCheck

A policy says the agent must never state a specific refund amount. It is written in the system prompt, and in six months of sampled transcripts it has never been violated. Is it a control?

Discussion

Take your team's list of things the agent must never do. Mark each one as instructed or enforced. Then, for every item that is only instructed, say what a violation would cost and who would be the first to know. The items where nobody would find out are the ones worth the meeting.