WAYS OF WORKING · APPLIED NINO CHAVEZ
Telling an AI agent "don't do that" works until the session ends, then the correction evaporates and you teach it again. The technique: stop correcting, and change the agent's environment so the rule enforces itself.
→ or scroll to advance · ← to go back
02 THE PROBLEM
You catch the agent doing something wasteful or wrong, you tell it, it apologizes and adjusts. Good — for about an hour. The next session starts with a blank slate, and the same correction is due again. Multiply that by every rule you've ever given it.
"Corrections given in chat decay when the session ends. The fix is changing the agent's environment — helpers, deny-hooks, and CI ratchets that carry the rule forever." the technique, stated — session demo 03, "Taught Once, Enforced Forever"
The move is to promote the repeated correction one rung up a ladder — from a sentence you repeat, to a mechanism that can't forget.
03 THE LADDER
Each rung enforces harder and costs more to build. You don't jump to the top; you climb only as high as the rule actually needs.
Make the right thing the easy thing — a helper that's cheaper to reach for than the wrong way. Doesn't block anything.
Grip: gentle · Cost: minutes
Block the wrong thing at the moment it's attempted, with a message that says what to do instead — and an escape hatch.
Grip: firm · Cost: an afternoon
Fail the build if the rule is violated in committed code. Outlives every session, every agent, and every reviewer.
Grip: absolute · Cost: a gate + a test
04 RUNG ONE · WRAPPER
The agent kept dumping whole build logs into context — hundreds of lines to carry one bit of signal. The correction "only show me pass/fail" didn't survive sessions. The wrapper does: q runs any build/test and prints one line on success, the tail plus a log path on failure.
$ q npm run build # one line, not a wall of output ✓ build ok (full log: /tmp/q-build.log) $ gs # git status, capped and summarized $ with-secret STRIPE ... # 1Password, no hand-rolled op incantation $ preview dist # serve a dir, no stray http.server to chase
Lowest friction, weakest enforcement: a wrapper doesn't stop the wasteful way, it just makes the cheap way the path of least resistance. For habits, that's often enough.
05 RUNG TWO · DENY-HOOK
When a habit has to not happen, a wrapper isn't enough. A PreToolUse hook inspects the call before it runs and denies it with a message that redirects. Both of these fired on my agent while it built this very deck:
The escape hatch is not optional: touch ~/.claude/cache/read-guard/.guard-off. A guardrail with no way out gets ripped out the first time it's wrong.
06 RUNG THREE · CI RATCHET
The strongest rung: a rule that can't be forgotten because a machine checks it on every push, and a violation stops the ship. When the tournament app pushed a README change this session, a gate ran before the push completed:
$ git push pre-push: no layout-affecting changes — skipping layout specs. ✓ pre-push design gates passed 40cc85a..5adc2f4 main -> main
The same shape enforces design-token purity, frontmatter conventions, and "no raw colors that break dark mode" — rules that once lived in a doc nobody re-read. A CI ratchet turns a convention into a fact the codebase can't violate and still merge.
07 HONEST LIMITS
Most corrections stay corrections
Promoting every note into a hook is its own waste. The trigger is repetition — the second or third time the same thing breaks for the same reason. A one-off correction is just a correction.
Fail open, always
A hook that blocks on its own uncertainty will block legitimate work and get disabled wholesale. Every guard here fails open on anything ambiguous and ships an escape hatch. The weaker default beats the stricter one nobody keeps.
It happened to me, here
The deny examples aren't reconstructions — the read-guard fired on my agent perhaps a dozen times building these demos. The guardrail I'm describing was actively governing the session that describes it.The rule you keep is the one you no longer have to remember.
08 USE IT
If you never touch code
The idea transfers past agents: when you correct someone or something twice, ask what would make the mistake impossible instead of asking again. A template, a checklist gate, a default — the human versions of the same three rungs.
If you're technical
Count your repeated corrections to the agent. Promote each to the lowest rung that holds: a wrapper for a habit, a PreToolUse hook for a must-not, a CI check for anything that reaches committed code. Add the escape hatch first.
If you build systems
Treat your agent's environment as the real prompt. Helpers, deny-hooks, and gates outlast any instruction you type, and they apply to every session and teammate at once — including future you, who will have forgotten the rule.