Start right: thin slices, one job per agent, no premature optimization
You ask an agent to "build the billing module." Twenty minutes later, it has generated 3,000 lines, and nothing compiles.
You ask an agent to “build the billing module.” Twenty minutes later, it has generated 3,000 lines, fourteen files, a “provider” abstraction for three payment methods when you only use one, an LRU cache “for performance”… and nothing compiles. That’s not a model problem. It’s a batch-size problem, a role problem, and a scope problem.
Three old ideas fix it: start small, give each agent one job, and don’t optimize what you haven’t measured.
Start small (KISS and Gall’s Law)
KISS has been circulating in engineering since the 1960s. In 1975, John Gall put it more bluntly in Systemantics: a complex system that works is invariably found to have evolved from a simple system that worked. A complex system designed from scratch never works and can’t be patched into working.
Agents make this sharper: the cost of producing complex code has dropped to almost zero, but the cost of making it work hasn’t budged. In practice:
- A thin end-to-end slice. Not “the billing module,” but “an endpoint that creates an invoice for one payment method, persisted, with a passing test.” Every layer, one line through it.
- Extend afterwards. The second payment method is a separate task, on a base that works. Abstractions emerge from two or three real cases, not speculation.
- Short tasks. If the diff can’t be summarized in one sentence, split it.
Add a simplifier agent whose only job is to propose deletions on a working branch: dead code, single-implementation abstractions, unused parameters, pass-through layers. Generators add; something has to subtract.
One agent, one job (Unix philosophy)
In 1978, in the Bell System Technical Journal, Doug McIlroy summarized Unix: make each program do one thing well, and expect its output to become the input of another program. He’s the one who pushed for pipes.
The “super-agent” that reads the ticket, specs, implements, tests, reviews, and drafts the PR is a monolith: conflicting instructions, opaque failures, a four-page prompt where every fix breaks something else. The Unix alternative:
- One agent per role: spec, implementation, tests, critique, simplification. Short prompt, single goal.
- Text artifacts between roles: a Markdown spec, a task list, a review report, a diff. Those are the pipes. They’re inspectable (you see where things went wrong), replayable (rerun one step), and they isolate contexts (the critic sees the diff, not the implementer’s reasoning).
- An explicit pipeline, not an agent’s internal loop “deciding” what’s next.
The right grain: every step produces an artifact a human can read. Ten micro-agents is ceremony, not design.
Don’t optimize yet (Knuth)
In 1974, in “Structured Programming with go to Statements,” Donald Knuth wrote the line everyone quotes: premature optimization is the root of all evil. The full message is more useful: correct and simple first, then measure, then optimize the few critical percent that measurement identifies.
Agents reproduce micro-optimizations by reflex — memoization, pre-allocation, pooling — without proof of need. More code, less readability, sometimes a real regression. Put one rule in the repo constitution: no benchmark in the PR, no optimization.
- Ship the simplest correct version, covered by tests.
- Any optimization cites a profile or benchmark with a quantified target.
- Attach before/after numbers and the command to reproduce them (
vitest bench/tinybench, or Rustcriterion/divan). - No speculative caches, concurrency, pooling, or unsafe without measurement.
- Keep it local, behind a stable interface. If the gain is marginal, revert.
Takeaways
- Gall’s Law (1975): thin end-to-end slice first, one green test, then widen. If the diff can’t be summarized in one sentence, split it.
- A simplifier agent offsets generators’ tendency to add.
- McIlroy (1978): one agent per role, text artifacts as pipes, an explicit pipeline instead of a super-agent.
- Knuth (1974): correct and simple first; a PR without a benchmark can’t claim a performance win.
Share this post