Further Left
Software engineering has been through a revolution. I was rereading some of my old posts and came across one called “Shift Left”. One significant part of it remains valid: placing tools and gates as close as possible to where the code is produced is still the best way to ensure code quality.
We don’t write code anymore. Plenty of people still preach that a human has to review the code anyway. I’ve given up on that idea.
However, AI still makes mistakes and introduces bugs. Sometimes it gets laser-focused on something like testing and creates hundreds of useless tests. It also leaves behind the old kind of mess: badly formatted code, style that ignores the language, readability issues, dead code, and more.
None of this is new. Humans were writing sloppy code ages before AI came around. Luckily, the fix has been around for years: pre-commit hooks and peer review.
The fix still works. What has to change is who runs it, and how far it goes.
We used to run those hooks on a developer’s machine, then ask a colleague to read the diff. That fit a world where a person typed the branch. The typist is an agent now.
A person sitting on the pull request is not a better hook. It is a slower one, and it does not keep up.
Last December I wrote that you should review every line before you commit. I don’t think that is honest anymore.
The work that used to happen in a human review still has to happen. It cannot depend on a person doing it, line by line, on the way to production.
So we take the same two tools, move them all the way left, and take the human out of the gate.
The hooks come first: formatters, linters, type checks, dead code detection. None of that is a matter of taste to argue about in a comment thread. These are rules we have been able to enforce by machine for years.
They should run where the code is produced, in the same loop that writes it. A change that fails them should never go further.
They also have to catch the new sloppiness. An agent obsessed with testing will happily write a mountain of tests that test nothing. A gate that only counts tests will applaud that. The gate has to ask whether the tests can actually fail.
Mutation testing is one way to do it. You break the code on purpose and see if anything notices. The specific tool matters less than the idea: measure what the tests catch, not how many of them there are.
Years ago I worked with in-house tooling that ran mutation testing automatically, and it was fantastic. Most companies don’t have that, and small projects even less. It’s costly and painful to set up. Or it was, before AI. Now it’s one of my gates.
Peer review still matters too. The peer is just no longer a person with a queue.
A separate reviewer agent should read the diff, not the one that wrote the change. Does this match the architecture we already agreed on? Did the author quietly weaken a test to get a green build? Is this dead code dressed up as a cleanup? The agent does not grade its own homework, and that separation is what makes it peer review. The rules that judge a change cannot be rewritten by that same change.
Then the change goes through CI, including security scanning: secrets, known vulnerabilities, the boring failures a tired reviewer will miss. If those gates fail, the agent fixes the work and tries again. Nobody needs to click approve on a linter finding.
Then production. This is where a lot of people will want a human back in the chair. I don’t. If the gates passed, the change should be able to ship without a person pressing the button.
Send it out in stages, watch the signals, and roll it back automatically if they go bad. That is still a gate. It just runs after the deploy, and it does not need a committee.
This is also not new. Deployment strategies like Blue/Green and Canary have existed for ages, and having AI supervise them is a perfect combination.
This only works if the gates are honest, and as strict as the cost of a bad change. Weak gates and no human in the middle are a faster way to ship a mess.
So where does the human actually sit? Upstream, before a line of code exists. What are we building, what does the architecture allow, and what does the business need and forbid? Those are product, architectural, and business decisions, and they are the work the human keeps. Once they are made, the agent picks up from there, and the pipeline is the only gate to production.
If the gates keep failing, that is often a sign that the decision was wrong or incomplete. That is a reason to send the question back upstream and change the decision, not a reason to put a person back on the diff.
We already knew how to deal with sloppy code. We just left a human in the middle, reading, as if the reading were the point.
Place the tools as close as possible to where the code is produced, and let them run all the way to production. The human decides what to build. The gates decide whether it ships.
If your team is still the gate between an agent and production, I can help you put the real checks in the pipeline and keep people on the decisions that actually need them. Here’s what I offer.