new: learn Agentic Engineering live with Ben in a 5 week O'Reilly Intensive, from 26 Jan. early bird $750 off for the first five →

Exponential
Engineering

Turn every AI mistake into an automatic check, not AI marking its own homework, so that kind of mistake never comes back and quality snowballs.

how to make every mistake
the last of its kind

by Ben O'Mahony and Fabian Nonnenmacher

the whole idea in fifteen seconds

Nobody reviewed that. The lint rule did.

the big idea

When you find a mistake, don't fix it.
Fix every future version of it.

"What deterministic rule would have caught this automatically?"

Write it as a lint rule, not a line in RULES.md. Five minutes. One rule. Never the same lap twice.

why exponential?

A fix touches one line. A deterministic rule touches every line, by every agent, forever.

Your agents get better without getting smarter.

it cuts both ways

Agents copy what they see. Every pattern in your repo is a template for the next thousand lines.

No rules isn't standing still.
It's compounding the other way.

harden the codebase, not the agent

Agents come and go. Claude Code today, Codex tomorrow, something new next quarter.

tied to one agentprompts, skills, memory, clever system messages
lives in the repolint config, types, tests, CI, watchers

The repo is the shared context. Harden it and every agent gets better, including ones that don't exist yet.

More: hardening codebases for agentic coding

the swiss cheese model

Every check is a slice with holes in it, and no slice catches everything. Stack slices whose holes sit in different places and a bug that slips through one hits cheese in the next.

Three bugs from the agent's payments change: a swallowed error, a rounding bug that loses a penny, and a retry that double charges when the network drops a reply. Types miss all three. Lint catches the swallowed error, property tests catch the lost penny and deterministic simulation testing (DST) catches the double charge. No single slice had to be perfect.

One slice leaks. The stack doesn't.

More: James Reason's Swiss cheese model

don't let agents drill holes

Stuck on a red build, an agent reaches for the escape hatch.

drilling holesa noqa, a loosened config, a skipped test, a deleted assertion
rules about the ruleslint config changes need review, relaxed checks fail the build, the ratchet only tightens

So add a rule that stops the rules getting weaker.

zanity's relaxed-check rule catches continue-on-error: true, || true, --exit-zero and friends.

everything on. zero warnings.

NASA's Power of 10, rule 10: every warning on at the most pedantic setting, static analysers every day, and ship with zero warnings.

the usualdefaults, a few hundred warnings, infos nobody reads
the NASA wayevery rule on, strictest mode, warnings and infos fail the build

A warning you tolerate is a rule you taught the agent to ignore.

More: The Power of 10 by Gerard Holzmann, TigerStyle, and zanity to enforce it across Python, Zig, Go, TypeScript, Rust and Java.

actionable errors are just in time prompts

AGENTS.mdloaded every session, all of it, relevant or not. Burns context. Easy to skim past.
an actionable errorappears only when the mistake happens, on the exact line, with the exact fix.

Don't front load the context.
Deliver it the moment it's needed.

A lint rule that never fires costs zero tokens. One that fires is the most relevant prompt the agent will see all day.

The error message is the prompt:

error: forbidden call

😐 the agent guesses

error: datetime.now() reads the wall clock.
  Use clock.now() so tests can
  freeze time.
  See docs/time.md

😎 the agent knows

real rules, real cheap

Point agents at the right API with ruff:

[tool.ruff.lint.flake8-tidy-imports.banned-api]
"datetime.datetime.now".msg = "Use clock.now() so tests can freeze time."

Ban a pattern with ast-grep:

id: no-print-in-lib
language: python
rule:
  pattern: print($$$ARGS)
message: Use the logger from app.log, not print().
severity: error

Most mistakes are already a rule someone wrote. Turn it on before you write your own.

your first five rules

The mistakes agents make most, and a rule that already catches each one. Turn them on today.

the mistakethe rule
a silenced exceptionruff BLE001, S110, zanity swallowed-error
an httpx call with no timeoutruff S113
a naive datetime.now()ruff DTZ005
print instead of the loggerruff T201
a skipped testzanity skipped-test

Each is one line of config. None of them is a line in RULES.md.

quality ratchets

Pick a number. Commit it. CI fails if it gets worse and tightens when it gets better.

lint violations
mon  412
tue  398  ✓ ratchet tightened
wed  401  ✗ CI fails: 401 > 398
thu  371  ✓ ratchet tightened

No big bang cleanup. Turn the rule on today, freeze the old violations, block every new one.

Quality Ratchets are from Building AI Agent Platforms by Ben O'Mahony and Fabian Nonnenmacher (O'Reilly). See also every failure becomes a ratchet.

no backlog

Allen Holub: "Backlogs are a symptom, not a tool." A backlog is work stockpiled in front of development, going stale while it waits.

the backloghundreds of tickets, groomed, estimated, reprioritised, mostly never built
a short queueonly what you build next, the next thing pulled when the last one ships

Agents made building fast. The queue is the delay.

Toss the backlog. If it's important, it will come back.

More: #NoBacklog by Allen Holub.

zero technical debt

TigerBeetle's TigerStyle: do it right the first time, because you may never come back.

fix it latera TODO, a skipped test, a "temporary" workaround that ships
fix it nowthe agent just made the fix cheap, and "later" never gets cheaper

Debt compounds too. Pay it while it's small.

More: TigerStyle by TigerBeetle.

certain and instant

Every check sits on two axes: how sure it is, and how fast the agent hears about it. Aim for the top left.

Agent hooks tie you to one agent. LSPs and watch mode daemons live with the codebase and work for all of them, humans included.

overwatch

The fastest loop is the one nobody has to start. Run your tests and linters in watch mode, right beside the agent.

/plugin install overwatch --marketplace benomahony/overwatch

Works with Claude Code, Codex and Neovim. github.com/benomahony/overwatch

no software factory

The pitch: write a spec, start a fleet of long running agents, come back to a finished product. We don't buy it.

the factoryhours of autonomous work, judged at the end, often the wrong thing built well
I know exactly what I wantthen I want it fast: a thin slice, on trunk in minutes
I don't know what I want yetthen I want feedback fast: something real to react to in minutes, then another lap

Either way the answer is short loops.

A long running agent is a long lived feature branch with extra steps.

thin slices, straight to trunk

Small enough to review in a minute. Small enough to revert in a second. On main many times a day.

harness engineeringworktree swarms, orchestrator agents, forty parallel branches, merge queues for robots
thin slicesone small change, green, on trunk, next

Most harness engineering is a workaround for slices that are too thick.

We once had a feature branch live for 45 minutes. We now call that long lived.

tapas teams

Two pizza teams were sized for humans typing. With agents, the plates got smaller.

two pizza teameight people, a backlog, a sprint, a demo in two weeks
tapas teamthree or four people across product, design and engineering, mobbing with agents, lots of small plates, everyone tastes everything

The only number that matters:

time to first customer feedback

Not lines of code. Not PRs merged. How fast does a real person tell you whether it's any good?

careful now

try it monday

we practice what we preach

Every change runs zanity strict, axe, the W3C Nu validator, stylelint, actionlint, zizmor pedantic, typos and lychee with zero findings. Then these rules, each one a correction we got along the way:

See them run: .github/workflows/lint.yml

wait, isn't this just continuous improvement?

...yes. 🤫

Toyota, 1950sus, now
kaizenexponential engineering
poka yokea lint rule
andon cordoverwatch going red
jidoka: stop the linethe turn can't end while red
five whysfive whys, but the agent answers instantly and confidently
the new hirethe new hire, typing 400 words a second, with no memory of yesterday

The ideas aren't new. The speed is. When your juniors write a thousand lines an hour, a missing rule doesn't cost you a bug. It costs you a pattern.

Please don't tell W. Edwards Deming we put a GPU in it.