Luca Morelli
Software engineer and analyst
Team lead

AI pull request review: code quality and the growth of developers in training.

A confusing pull request forces several rounds of iteration before it is approved, and with coding agents there is more code to review. An AI review can help to check quality and to support developers in training, but it must remain a support tool, not a judge.

This also applies to developers who work without AI: keeping track of pull requests and how they evolve, round after round and over time, is useful anyway. Coding agents make the need more visible; they do not create it.

Where it comes from, and what I have not done yet

The problem of confusing pull requests has come up often in conversations with colleagues, on different occasions.

The method I describe comes from there and from my experience as a senior developer and team lead, which has always included training and mentoring junior developers.

I have not yet applied it on a project. To really put it to the test, you need a real team: several developers, tasks of varying complexity, and a period long enough to see a trend. It is part of a harness shared by the team which, as I explain in Quality and coding agents, I have not built yet. What follows is therefore a methodological proposal.

Two goals

  • Ensure the quality of the code that reaches the product.
  • Properly support developers in training, and understand whether they are really growing, even when they write code with the help of AI.

Code quality: the same threshold for everyone

The threshold for approving a pull request would be the same for everyone: security, correctness and the project's important rules block approval regardless of who wrote the code. AI would carry out a first review against the team's guidelines; the final word would stay with a person.

Author and reviewer should be kept separate: the session that reviews the code must not be the one that wrote it. A review is only as good as the project's written rules are clear.

Supporting developers in training: the path changes, not the threshold

What changes is how you get to approval. For a junior developer, comments explain the reason and point to the rule, and minor issues such as naming or style are flagged but do not block; for a senior developer, brief comments are enough. For every blocking issue, the author explains in a few lines what they changed and why; if they disagree with a comment they can challenge it, and a reasoned challenge is a good sign.

Within a single pull request I would set a limit on review rounds: once it is reached, it is better to sit down with a senior developer than to keep iterating.

The risk to avoid is a developer who passes the review without understanding. A controlled study by Anthropic of 52 developers, mostly junior, found lower comprehension scores among those learning a new library with the assistant (50% against 67%), without a significant time saving. Those who used AI to have concepts explained scored similarly to those working without it. The study is small and preliminary, but it shows what to look at: not whether developers use AI, but how they use it.

When pairing is normal and when it is a signal

As pull requests, or months, go by, you expect someone joining a project to reach approval more quickly. At the start it may be normal to need a senior developer alongside: it depends on the project, how complex it is and how well it is documented. If after five or six pull requests the situation is still repeating itself, there is something to understand. The figures are indicative.

The person is not necessarily the problem: the tasks assigned, a poorly documented part of the code or an unclear rule may all play a part.

Why collect review data

With several developers being onboarded, it is hard to keep track of each person's path from memory. A review log, with the issues raised, the area of the application and the rounds needed, shows whether the same mistakes come back or disappear, and how long it takes to become autonomous on different kinds of task.

Read by area of the application, the same log says something else too: if several junior developers run into the same problem in the same part of the code, the weak point is probably not them but the harness, that is, the documentation, rules or checks for that part. It is also a way of telling, over time, whether the harness works.

Commercial review tools already collect this data: CodeRabbit's documentation, for example, describes metrics that can be filtered by individual developer. So the question is not whether the data exists, but how it is used.

Preparing the work: clearer pull requests and lower spend

A confusing pull request often starts from a vague task. Preparing the work before assigning it does two things: the developer knows what to deliver and how to verify it, and the agent works on precise requests instead of exploring the code aimlessly, using less. This matters more and more, because many companies are putting limits on AI spending.

Tools and responsibilities in a team

Who assesses

The tool does not assess people. It provides technical data on pull requests: issues, rounds, recurring mistakes, defects found after approval and their cause. This data feeds into the growth assessment processes the company already has, where the judgement stays with a person.

Some conditions I consider necessary:

  • developers see everything their manager sees about them, and can respond;
  • no rankings between people and no overall scores;
  • only data on the technical content of pull requests is collected, not working hours or conversations with AI, and the excluded data is written down;
  • data is kept for a defined period.

Supporting sources

The method is a proposal drawn from experience and discussions with colleagues; the sources support individual points, not the method as a whole.

Content last updated

Would you like your developers to learn to use them methodically?

Detailed CV and references available on request.