[Intro] (low choir hum, distant siren) (whispered) it reads like a contract... but it isn't one [Verse 1] You wrote the rule in capitals, bold and underlined, "never refund a caller till the identity's verified." Feels like a lock, feels like a wall you can trust, ships green in the demo, a hundred clean runs and no fuss. But the model is a sample, every token's a roll, "almost always verify" ain't "always" at the goal. [Pre-Chorus] (build) Scale it to thousands and the rare path arrives — one strange phrasing, the rule drifts, the refund flies. [Chorus] (drop) Put it in the code, not the prompt, a prompt only asks, the gate is what you want. (no flag, no call) Put it in the code, not the prompt, "guarantee" and "must never" live outside the model's thought. (deterministic) [Verse 2] Draw the line between the layers, that's the move: the prompt lives inside judgement, where outcomes are loose. Enforcement lives outside it, in the code that you own, a check in front of danger that the model can't postpone. The model can beg for the refund all day — the gate reads the precondition and it answers yes or nay. [Verse - Rap] (gritty, half-time) Prerequisite gate: a guard before the sensitive call, block process_refund till get_customer cleared it all. Claude Code? That's a PreToolUse hook, fires before the run — deny the action cold; PostToolUse comes after, can't undo what's done. Raw API? Same shape — your loop checks state on its own, sees the tool_use request, holds the line, leaves the refund alone. Five hook types but watch it, only three of them are tight: command, http, mcp_tool — deterministic, locked down right. prompt and agent ask a model, so the guarantee's a lie — you walked a circle back to sampling, that's the trap, ask why. And the exit code'll burn you: only 2 will block the gate, 1 is "non-blocking", lets it through — or return an explicit deny on a clean exit, mate. [Chorus] (drop) Put it in the code, not the prompt, a prompt only asks, the gate is what you want. (no flag, no call) Put it in the code, not the prompt, "guarantee" and "must never" live outside the model's thought. (deterministic) [Bridge] (half-time, sparse) "Just write a sterner prompt" — that's the distractor by design, a few-shot, a louder tone, still probabilistic every time. A request can be ignored; a gate cannot be swayed — if it must never happen, don't ask... make it impossible to obey. [Final Chorus] (full drop, choir swells) Put it in the code, not the prompt! (no flag, no call!) A prompt only asks, the gate is what you want. Put it in the code, not the prompt, move it out the sampling to the layer that can't change its thought. (deterministic!) [Outro — call to action] (spoken over the final fade) Want the deep version? Get *The CCA-F Study Guide* on Leanpub — leanpub.com/cca-f (...put it in the code)