AI tools have brought the cost of writing code close to zero. One engineer today produces in an hour what used to take a day. But every line that reaches customers needs someone who understands it, and the AI doesn't do that for you. When code arrives faster than anyone can read it, one of two things happens: either the work gets stuck with whoever reviews it, or code nobody read reaches production.
For three months I mentored two teams of junior engineers who built real systems for clients, all of them with AI tools. I was the one reviewing their code before it went in.
When writing code costs almost nothing, what sets the pace is how much code can be reviewed. The rules below exist to protect the reviewer, because the reviewer is what protects the product.
Code nobody has time to read
One day one of the engineers sent me fixes for my comments, and I opened her pull request. The counter showed 676 changed files. Another week, a pull request from a different engineer contained 116 files, and most of them weren't hers at all. I told her I had to filter only her commits to see what was going on.
Neither of them was careless. They worked the way AI tools encourage you to work: generate, commit, push. The code simply arrived faster than anyone could read it.
If a change can't be read, nobody really approved it. And the one who pays for that in the end is the customer who runs into the bug.
The 400-line rule
Already in the second week I sent the team a reminder: the initial pull request of each service includes up to 400 lines of code, along with an automated workflow that brings the service up in a local environment and verifies it works. In the same message I also asked that code comments explain only why something was done, with "no mumbo-jumbo of AI slop".
Both parts of the rule have a job. The size limit makes review possible. And the automated workflow makes the first change prove something: that the service comes up and answers. A skeleton that works beats a feature that doesn't.
When a pull request was too long, I wrote that it was too much to review at once, and asked to open it in parts: once I approve the first one, she opens the next. One of the engineers asked whether the problem was the size of each commit, since she had tried to keep each one around 400 lines. I explained that the rule is about the whole pull request, not each commit separately.
And when, near the end, a very long but excellent pull request came in, I approved it and wrote: "A very long one, since I demand PRs of 400 LoC top, but a good one". The rule exists for the reviewer. When the work is good, say so.
What was approved is what goes live
A reviewer's approval doesn't help if what goes live is different from what they saw. Two real incidents taught us where this breaks:
- After approval, merge right away. When the code changes after approval, the approval no longer describes what went in. GitHub even marks it as stale.
- An urgent production fix branches from the version already running there, not from the development branch. Otherwise, as I wrote when it happened, "you will piggyback all the develop code into PROD", with nobody having reviewed it for that.
In both cases, customers would have gotten code nobody approved, even though on paper everything passed review.
Infrastructure changes go through the code too
When the team started working against real servers in the cloud, I wrote two rules. First: each engineer sets up her tools so the default is the local environment, and reaches the real environment only explicitly. I asked them to add that instruction to their AI tool's instructions file too, so it behaves the same way.
Second: everything you run against the real environment goes into a pull request, including all the commands. What isn't written in the code can't be reproduced, and nobody knows it happened.
For whoever runs the company, this means that when something breaks, you can see exactly what changed and when, instead of wasting a whole evening guessing.
Failing tests stop everything
Near the end, several automated checks kept failing again and again, and the team started ignoring them. I wrote that at the start of the next week I wouldn't approve any pull request until the checks were fixed. A check that fails all the time teaches everyone that failure means nothing, and then a real failure slips through without anyone noticing.
And when a check failed and it wasn't clear why, I suggested asking the AI tool to run it locally and find the cause. The same tool that generates the code can also help check it.
Takeaways
- Limit the size of each change. The amount of code that can be reviewed is the team's real pace.
- After approval, merge right away, and urgent fixes branch from what's already in production. That way what goes live is what was reviewed.
- Infrastructure goes through the code too. What isn't written can't be reproduced.
- A red check stops merges. Otherwise nobody notices when it's really red.
AI made these engineers fast. These rules made sure the speed didn't cost customers dearly.