Every guardrail in my agent-built project was earned from a real failure, not designed up front. A cost test for when to build one, when to wait, and when to retire it.
On a Wednesday in late May I caught a bug by reading. The project's glossary — the
canonical list of the domain terms my coding agent is required to use — had drifted
from the domain model I actually carried in my head. Nothing flagged it. No test
failed, no check fired, no compiler complained. I noticed because I happened to be
reading the file and the words were wrong.
What I typed next is the whole argument in one line. Not "fix the glossary," not
"I'll be more careful," but a question aimed at the toolchain instead of the error:
the GLOSSARY already drifted away from my domain model vision and I would like
to prevent this in future refactors
That reframes the task. The drift stops being an error to correct once
and becomes a signal about the toolchain: if I caught a class of drift by
reading, an enforcement axis is missing. The fix isn't to read harder next time.
Reading harder is just minting another rule in your head, another wish. The fix is
to add the check that couples the two things that drifted, and then never spend
that attention again.
I did not sit down and design a governance system, and that's the most transferable
thing here. Every check in this project — a couple dozen now, wired as pre-commit
hooks — was born from a particular drift I'd already been bitten by. The ordering is
the point. The failure came first; the gate came second, shaped to the exact failure.
Renames stopped being discipline
The clearest place this showed up was renaming. (I told the measurement side of
this story in a companion piece, , the mistake-proofing of the
Toyota Production System, already splits a control that makes the error
impossible from a warning that only signals it. The two middle rungs below are
those two ideas wearing software clothes. Birgitta Böckeler's
.
An agent makes this worse, not better, because it will cheerfully and fluently use
whichever term it last saw, in whichever surface it's editing.
The transferable move is to stop treating your instruction file as the place where
correctness lives. Prose is where preferences live. Correctness lives in the gates,
default paths, and tripwires you build, each one shaped to a failure specific
enough to point at. You don't govern an agent by
predicting how it'll go wrong. You let it go wrong cheaply where you can, and you
convert each real miss into the cheapest rung that makes it impossible to miss that
way again.
This essay was written by directing a coding agent over the project it describes;
I direct and judge, the agent drafts and argues back. The argument-back, in this
case, is most of beats four and five.
I build governed agent systems at the intersection of Contact Center software and Published at vasyltretiakov.dev.
AI. If that's a problem you're chewing on, I'm reachable on ,"
vasyltretiakov.dev, 1 Jun 2026 — companion essay.
martinfowler.com, 2 Apr 2026 (accessed 9 Jun 2026).
9 Jun 2026). Shigeo Shingo's mistake-proofing; the control-vs-warning split.
SOCIAL SHARE CARD GENERATOR