Follow us LinkedIn X YouTube

What does PR review even mean in today’s day and age?

Agents now catch most correctness issues before a pull request is raised. So human review has a different job: building a shared mental model of the codebase.

A cross-section of a dark sea. Divers with lamps light up parts of a vast sunken city of arches and towers, while a figure in a small boat watches from the surface with a red lantern.
illustration: realfast

I got my first professional job in 2022. Back then (way back then) I was mostly copying code from other files in the codebase or from Stack Overflow. I will not say I understood every line, but I did understand (most of) it.

When my teammates would review my PR, they were able to look at the code and provide a variety of feedback. The common types of feedback I used to get:

  • My abstraction is bad
  • I should have reused this util
  • I have written this in an overly complex way
  • The query will be slow in production
  • I will cause some unintended changes

We can split this feedback into two parts:

  1. Feedback arising from a deeper understanding of the codebase and business
  2. Feedback arising from better technical knowledge

Bad abstractions, using the wrong utils, and unintended changes can probably be filed in the first bucket, and bad queries and unnecessary complexity in the latter.

Coming to the first bucket - this kind of feedback was only possible if at least someone in your team had a good idea of the current system and where it’s headed.

They knew the architecture and a lot of the codebase. They also knew what’s coming over the next few quarters and would mould the architecture bit by bit to prepare for the future.

Their feedback would optimize for what’s best for the codebase given today’s and upcoming business needs.

Correctness is getting solved before the PR even exists

Today, a huge chunk of that feedback happens before a human ever opens a pull request.

On one of our projects, we’ve spent the last six months evolving a PR review skill. We started barebones by collecting comments from a senior engineer who reviewed our PRs, then parsed PR comments across the organization to add conventions around utils, joins, and our language stack.

Every time something slipped through, we updated the harness:

  • We touched shared code and caused a regression → We built a Code Indexer so agents could trace related flows before making changes.
  • Slow queries turned up → We added a Query Plan skill to run query plan analysis on every change.
  • The skill got bulky → We split it into Subagents invoked only when needed, for example - a copy change doesn’t need a query plan pass.
  • The same dropdown looked slightly different across screens → We added a UI Audit to catch design papercuts.

The takeaway isn’t the specific setup - every codebase has its own quirks, so start barebones, and let every problem you solve evolve your harness.

So by the time a PR reaches me, the agents have already caught most issues. They solve for correctness. What they don’t do is give the team a shared understanding of the codebase.

So what are we actually reviewing for?

That deeper, architectural feedback from 2022 was only possible because everyone involved was actively in touch with the codebase.

With the advent of agents and software factories and what not, we are increasingly losing touch with our own codebases. It is humanly impossible to keep up with all the volume of code being generated - something has to give somewhere.

If agents handle the correctness pass before the PR is even raised, we need to stop treating PR review as a bug hunt and start treating it as a mixture of two questions:

  1. Do I, the reviewer, have a similar mental model of the codebase as the person who wrote this change?
  2. Are we - the person who wrote the change and the person who reviewed it - confident that this is going to work as intended and not break anything?

Because our PR harness already answers question (2), human PR review needs to be almost entirely about question (1).

Brain-to-brain connection

A good quote around mental models comes to mind:

“All models are wrong, but some are useful.”

— George E. P. Box

The best way to get to the same mental model of the codebase is to obviously rebuild the same feature yourself. That is not going to happen. I want to understand what matters about the change without getting bogged down in the specifics.

Two heads face each other. The first holds a complete map of connected points. Dots travel across to the second head, where the same map is still being filled in.

The point I’m trying to make is that this is a matter of choosing the right abstraction for presenting information.

Maybe your definition of “understanding the system” is effectively getting a user walkthrough. Or maybe you want more detail - you want to understand the specific tables or data structures involved.

Here are a few mock-up views of abstractions I have tried, using a partial-refund MR as an example:

1. Understanding a before-after

This is effectively breaking the MR down into a series of user stories. In this mock-up, a partial-refund MR is split into what a user could do before versus after, alongside the key rules the author decided on.

What this MR does · Story 1 of 3
“I refund one item out of three”
You can now pick which lines of an order to refund. Until now it was the whole order or nothing.
Before
Paperback$18.00
Notebook$14.00
Tote bag$6.00
Shipping$5.00
Refund order
Refunds everything: $43.00
After
Paperback$18.00
Notebook$14.00
Tote bag$6.00
Shipping$5.00
Refund 1 item
Refunds the ticked line: $18.00
DecisionShipping comes back only when every line is refunded.
DecisionThe refunded amount is kept on each line, not once on the order.
The before-after view. One user story showing what the user could do before versus now, plus the key decisions made along the way.

This tries to break the MR into visuals showing a before and after. You can dive deeper into each story and map it back to the underlying code files. It also highlights the key decisions made along the way, like shipping only returning on full-order refunds, which helps you quickly understand what the author was trying to do.

2. Explicitly mapping the code to what it does

This view maps the code directly to what it changes in the overall flow, breaking the diff into narrative chapters with plain-English notes pinned to the lines that matter.

Chapter 2 · Where the amount comes from
The amount is added up from the ticked lines.
Chapter 1 added the tick boxes. This is the only place that reads them.
RefundService.cs   lines 41–46   Orders/Refunds
4141 var lines = order.Lines
4242 .Where(l => request.LineIds.Contains(l.Id));
43+var amount = lines.Sum(l => l.Price * l.Quantity);
44+if (lines.Count() == order.Lines.Count)
45+ amount += order.Shipping;
Shipping only comes back when every line is refunded. A partial refund never includes it.
4346 return payments.Refund(order.PaymentId, amount);
The code-mapped view. The diff cut into narrative chapters, with plain-English notes pinned directly to the lines that matter.

It sounds like the “correct” view, but it still expects a human to effectively “execute code” in their head and immediately figure out what changes.

I would not use this view to update my mental model after an MR, though I would definitely use something like this when I want to do a line-by-line review on a sensitive change.

3. An “alignment with document” view

As everyone builds a harness, we all end up with several markdown files per ticket created across the lifecycle - design, implementation, testing, release.

This view compares what the MR actually built against the original design or spec documents, flagging every fork in the road.

Every design decision in this MR, as a fork in the road
Where is the refunded amount stored?
All8Agreed5Changed vs plan2Open1
Changed, with no recorded decision
Not taken
The plan
Once on the order. One refunded total per order. ORDERS.REFUNDED_AMOUNT
Taken
This MR
On each line. Every line knows how much of it was refunded. ORDER_LINES.REFUNDED_AMOUNT
The alignment view. The original plan on the left, what the MR actually did on the right, and a flag where the two parted ways.

Knowing the MR has drifted slightly from the plan is useful, though it does not drastically improve my understanding of the system. I would treat this more as a CI check - if there is drift, either the docs or the code are stale.


I feel that understanding a “before and after” and then asking targeted technical questions is probably the best way to build a shared understanding with the team. All of the above are just experiments in conveying information during a PR review.

A codebase is like a dark ocean: agents can check whether the code works before you merge it, but as your teammates explore the ocean’s depths, it’d be a waste to review their PRs without finding out what they’ve seen down there.