Chapter 9: Backpressure

Now the machinery, cheapest first. The cheapest of all doesn't refuse anything. It just fixes the problem.

Formatter

A program that rewrites your code into one fixed layout: spacing, line breaks, quote marks. It doesn't change what the code does, and running it a second time changes nothing.

The layout of an agent's output can drift from one edit to the next, and a one-line change can arrive looking like a rewrite. You pay to read that noise, and so does the next agent. A formatter removes it without asking anyone to decide anything, so it costs no retry and no review.

Say it to your agent

“Add a PostToolUse hook that runs biome format --write on each file you edit, and a CI step that runs biome format . and fails if anything would change. Don't reformat files you aren't otherwise changing in this commit.”

The workshop

Name a word, or describe what you mean in everyday language.