Shifting left your effort when working with AI
When you start working with AI, more code is generated, and many more pull requests need to be reviewed. That's your bottleneck today, right? Let me tell you how to solve that problem.
In my teams, we are in continuous evolution. Since we started using AI for all our development, we've gained a lot of insights. More to come, for sure, since we cannot consider ourselves experts.
If you're a software developer overwhelmed by the increasing number of pull requests to review as AI agents accelerate development, this email is for you.
The problem you have
Let me tell you where you are:
You and your team adopted AI for development, using Claude Code, Cursor, or GitHub Copilot.
You clearly see a positive impact; you and your team are able to do more work in less time. You don’t visit Stack Overflow anymore.
And you want to keep “human in the loop”, meaning, you review all the pull requests opened. Yes, you caught AI in the act for some bugs already! So you have still to pay attention to what goes to production.
What’s your problem? You have many more pull requests to review.
And not only that.
Those pull requests are quite big. Maybe the same size as when your peers coded without AI, but now it’s different.
Before, you had:
And now you have:
👉🏼 In summary, you have more pull requests than ever, and they’re too large to review efficiently.
Does this ring a bell to you? I would love to hear about your experiences with this. Send me an email or drop a comment in Substack.
You are not alone, though. This is becoming a pattern in tech companies during the transition to AI Native.
Many people shared with me on social media how much they're struggling with this challenge. The growing volume of code reviews is consuming more and more of their time. Some sentences that I can write here are:
AI is a code-vomiting machine.
Another sentence:
The machine’s goal is to spend tokens and tokens, so you get code and more code.
👉🏼 The code review phase has become the bottleneck, when before it was the implementation or Product Management.
☝🏼 Is this true? In my opinion, yes, it is true.
You may ask:
Marcos, are we doomed to only do code reviews?
I don’t think so, at least, so far. It took me a while, but I found a way to:
Keep the human in the loop for code reviews,
And keep the increasing speed of development thanks to AI.
The solution
In a nutshell:
Use SKILLs so the agent works with SOLID principles, eventhough your previous code does not follow those.
Demand to your agent keep small pull requests, even though they are many. Ensure the agent saves that in its memory.
Demand to your agent to write an ADR/code-change-report for the pull request.
Now, let me elaborate on each item.
☝🏼 About the SKILL. You can rather try some from the Internet, like skills.sh, either create your own, or just add that requirement in your prompt.
Why I found this important? Because with that in its memory, the agent tends to create more organized and encapsulated code (which is a benefit of SOLID) and so it will make your code review easier to follow up.
📖 A pro-tip on this: Always start the the plan mode of your favourite AI agent. That helps you to understand what the AI agent will do and what will not do. Always iterate, do not go with the first plan provided; ask questions, so you can understand if the requirements are satisfied, and ensure you understand what will happen in the change.
✌🏼About the small pull requests. The AI tends to generate many code but, you have to rememeber this: the AI agent is there to do what you ask. Yeah, I know, sometime it does not listen properly, and you have to insist. You can ask to split a task in multiple pull requests and, my recommendation is that you explain to the agent why you want it that way: to make the code reviews of the humans more easy.
Why I found this important? As I mentioned before: small pull requests can be reviewed with more love and faster; the process becomes more efficient and effective.
📖 A pro-tip on this: Use the same human to review all the pull requests. Avoid the context switching for your peers, by rotating the responsibility of reviewing the code of your 5 pull requests, so only one person gets into it, making her/his review easier.
🖖🏼 About the ADR/code-change-report. The idea is quite simple:
Humans read natural language better than code, no matter how expert you are in a concrete language.
So, having a meaningful text that can help us to understand what has been done, will help us to achieve a better code review.
Maybe the word ADR is too much for a pull request, but I hope you get the point.
If you can ask your peers to keep small pull request, to can for sure demand that to your AI agent.
If you want to go deeper on this, I suggest you to read this post here entitled Code Reviews in the AI Native era.
📖 A pro-tip on this: To achieve this, Wether on the pull request description or in a separated file (HTML, Markdown), you must ask the AI agent to create a:
Summary of the work so the developer to perform the code review can easly understand the changes in the pull request, highligting the important parts to pay extra attention.
Those three points helped me, and so I hope they will help you, to have more efficient and effective code reviews, keeping the pace of more pull requests and ensuring the right quality for the human-in-the-loop code reviews.
Beyond those three points, another practice that helped me was following the I.N.V.E.S.T. principle and taking the time to write clear and small Jira tickets (or whatever tool you use to organize your work).
✨ Takeaways
We started this email saying:
The code review phase has become the bottleneck.
With the solution I brought to you, we are making (yet another) shift left:
We are putting more effort on the previous work with the AI, during the plan of the work to do, before open the pull request.
👉🏼 Because the effort now goes more on the plan phase, you are making the whole process more scalable.
At this point in time, I believe this the way to work with AI agents.
I would love to hear the tips and tricks you use so far to tame the AI agents. Send me an email to write a comment; I read them all!
Best,
Marcos



