Act 08 · The plumbing 2:30 Skills, hooks, rules — and their limits

Rules and system instructions (and their limits).

Rules — standing instructions in the system prompt — powerfully shape an agent's behavior, but because the model is probabilistic they shape rather than guarantee: a rule can be missed, crowded out, or overridden.

Video rendering soonThe cinematic render for this episode is being generated. The article, transcript and key ideas are all here now.

Key ideas

  • The one idea — Rules — standing instructions in the system prompt — powerfully shape an agent's behavior, but because the model is probabilistic they shape rather than guarantee: a rule can be missed, crowded out, or overridden.
  • How it is shown — A system prompt full of "always/never" rules working most of the time — then an edge case or a prompt-injection slips past one; shaped, not guaranteed.
  • The trap to avoid — Trusting a prompt rule to enforce something critical — instructions are soft constraints; for a hard guarantee you need code (a hook, validation), not words.
  • What it sets up — Rules shape, hooks enforce — and to let an agent act safely you also contain it. how?

You wrote 'never do X' in the system prompt and shipped it. Here's the uncomfortable truth: that rule shapes behavior, it doesn't guarantee it. Rules get missed.

The one idea

Rules — standing instructions in the system prompt — powerfully shape an agent's behavior, but because the model is probabilistic they shape rather than guarantee: a rule can be missed, crowded out, or overridden.

The most common way to steer an agent is the simplest: just tell it. Standing instructions in the system prompt — always do this, never do that. Rules. They're powerful, and they come with a hard limit worth understanding before you rely on them. Recall the system role — the standing instructions above the whole conversation. Rules live there: the agent's persona, its dos and don'ts, its format, its policies. They're read every turn, so they shape behavior consistently — far more than a one-off request buried back in the chat. And rules work remarkably well. A well-written system prompt keeps an agent in character, on format, and refusing the wrong things — most of the time.

How it works — the demo

A system prompt full of "always/never" rules working most of the time — then an edge case or a prompt-injection slips past one; shaped, not guaranteed.

For most behavior, this is the right tool: cheap, flexible, no code. You write the instruction clearly and the agent generally follows. But here's the limit. The model is probabilistic. A rule is a strong influence on what it does — not a switch that forces it. So it can be missed on an edge case, crowded out over a long conversation, or overridden by prompt injection. It holds most of the time — and most of the time isn't every time. So the honest framing: rules shape behavior; they don't guarantee it. If a rule merely should hold — tone, style, preference — the prompt is perfect.

The trap to avoid

Trusting a prompt rule to enforce something critical — instructions are soft constraints; for a hard guarantee you need code (a hook, validation), not words.

Why it matters — and what’s next

Rules shape, hooks enforce — and to let an agent act safely you also contain it. how?

If it must hold — never run this command, never leak this data — words aren't enough; reach for the deterministic tools: hooks, validation, code. The trap: trusting a prompt rule to enforce something critical. Never delete production data in the prompt feels safe, but it's a request, not a wall — one injection past it and it's gone. Soft constraints for soft needs; hard code for hard needs. So the three ways to extend the harness stack up: skills add capability, hooks enforce hard control, rules shape the rest — powerful, but soft, never a guarantee. But steering an agent that runs real code raises a sharper question: how do you let it act without risking everything? Next group: sandboxes, swarms, and subagents.

This is one short episode in AI: Zero → Frontier, a step-by-step climb through how AI actually works. Each episode builds only on the ones before it.

Full transcript 2:30 of narration

The most common way to steer an agent is the simplest: just tell it. Standing instructions in the system prompt — always do this, never do that. Rules. They're powerful, and they come with a hard limit worth understanding before you rely on them.

Recall the system role — the standing instructions above the whole conversation. Rules live there: the agent's persona, its dos and don'ts, its format, its policies. They're read every turn, so they shape behavior consistently — far more than a one-off request buried back in the chat.

And rules work remarkably well. A well-written system prompt keeps an agent in character, on format, and refusing the wrong things — most of the time. For most behavior, this is the right tool: cheap, flexible, no code. You write the instruction clearly and the agent generally follows.

But here's the limit. The model is probabilistic. A rule is a strong influence on what it does — not a switch that forces it. So it can be missed on an edge case, crowded out over a long conversation, or overridden by prompt injection. It holds most of the time — and most of the time isn't every time.

So the honest framing: rules shape behavior; they don't guarantee it. If a rule merely should hold — tone, style, preference — the prompt is perfect. If it must hold — never run this command, never leak this data — words aren't enough; reach for the deterministic tools: hooks, validation, code.

The trap: trusting a prompt rule to enforce something critical. Never delete production data in the prompt feels safe, but it's a request, not a wall — one injection past it and it's gone. Soft constraints for soft needs; hard code for hard needs.

So the three ways to extend the harness stack up: skills add capability, hooks enforce hard control, rules shape the rest — powerful, but soft, never a guarantee. But steering an agent that runs real code raises a sharper question: how do you let it act without risking everything? Next group: sandboxes, swarms, and subagents.

PlumbingRulesSystem Prompt