AIFeed

You Still Need to Skim Every AI PR

Original text(via HN AI)

Why You Still Need to Skim Every AI PR

Reading every line of a PR doesn't scale with AI, but scanning each diff for a few seconds still matters. Spot architectural drift early and turn your intuition into rules.

Reading every line of a pull request is fading out. When AI agents write the code and AI reviewers review the PR alongside automated checks, catching logic bugs, edge cases, null checks, and style issues, spending 30 minutes tracing every line doesn’t scale.

That has led some teams to a tempting conclusion: stop having humans look at diffs at all.

I think that’s the wrong move. The future of code review isn’t reading every line. It’s scanning every PR for a few seconds, catching what doesn’t fit your system, and turning those catches into rules.

The Five Second Scan

You open a PR from an agent. AI review is clean. Tests and automated checks are green. You don’t read every function. You just skim the changed files for five seconds.

And something jumps out at you in a migration file:


        CREATE FUNCTION update_account_tier() RETURNS trigger AS $$
BEGIN
  IF NEW.total_spend > 1000 THEN
    UPDATE accounts SET tier = 'pro' WHERE id = NEW.account_id;
  END IF;
  RETURN NEW;
END;
$$ LANGUAGE plpgsql;

CREATE TRIGGER trg_orders_update_tier
AFTER INSERT ON orders
FOR EACH ROW EXECUTE FUNCTION update_account_tier();
      

There is no syntax error here. The test suite is green. It works.

Yet in five seconds, your reaction is: “Wait, you added a database trigger. I’m not sure I want triggers in this codebase.”

You didn’t need a deep dive to spot that. You just needed human eyes on the shape of the change.

Turn Every Surprise Into a Rule

In traditional code review, you leave a comment (“please move this logic into the order service”), the PR gets updated, and you move on. Two weeks later, another session introduces another trigger.

With AI agents, that quick catch is much more valuable if you close the loop.

Instead of only fixing the PR, you update your rules and review checklist:

“Do not use database triggers for business logic. Keep side effects explicit in application code where they are visible, testable, and traceable.”

Now your agent instructions, AI reviewers, and automated checks all know about this. You won’t have to catch that same pattern by hand again.

Over time, you build a trusted set of rules that encodes both your engineering standards and your personal taste. Every surprise strengthens the filter.

And even once that ruleset is solid, you still keep scanning each PR for a few seconds. You can never write down every architectural shortcut an agent might invent ahead of time. That quick scan is your ongoing radar for the next thing that doesn’t suit your codebase.

Just Let the AI Use Triggers?

It’s a fair pushback. Someone could argue: “If AI writes the code and AI maintains it, why do you care if it uses a database trigger? Let it build however it wants.”

There are three reasons that breaks down fast.

1. One Unnoticed Choice Becomes Your Whole Architecture

AI agents treat your existing codebase as ground truth. If you miss that first database trigger and merge it, the next agent inspecting your migrations/ folder sees a trigger and assumes triggers are how this project handles side effects.

So it adds another one. And another.

Within a few months, your entire app is built on database triggers, not because anyone designed it that way, but because nobody noticed the first one. What felt like a harmless local shortcut silently became an architectural foundation.

2. Software Engineering Principles Haven’t Changed

Hidden side effects, implicit control flow, and business logic split between application services and database internals were painful before AI, and they’re still painful now.

Good engineering principles exist because of how systems behave under change and failure, not just because humans used to type the characters. Implicit magic like triggers hurts AI agents too. When a production bug hits, an agent searching your application code won’t even see the hidden trigger mutating state behind the scenes.

3. Humans Are Still in the Loop

As long as humans own the system, answer for outages, and decide where the product goes next, we need to understand the shape of what we’re building.

And humans bring something specs rarely capture: intuition.

When you spot that database trigger in five seconds, you might not have a formal proof ready on the spot. You just have years of scars from debugging invisible side effects, awkward migrations, and brittle coupling. That gut feeling (“this is going to bite us later”) is a real engineering signal. It tells you what rule to write next before the pattern spreads.

The New Code Review Loop

Code review is shifting from reading every line to steering the architecture:

  • AI reviewers and automated checks handle depth. AI reviews the code for logic bugs, edge cases, and every rule you’ve already written down, while tests and linters verify the rest.
  • Humans scan each PR for a few seconds. You look for shape, taste, new primitives, hidden side effects, and anything that feels off.
  • Every catch upgrades the system. You update your rules and checklists so the next PR stays aligned automatically.

What to Look For in Ten Seconds

When you skim an AI written PR, don’t start by tracing line logic. Scan for structural surprises:

  • New architectural primitives. Did it introduce a DB trigger, cron job, queue, cache layer, or background worker we don’t normally use?
  • Hidden side effects. Does something happen implicitly (triggers, hooks, magic middleware, swallowed errors) instead of explicitly in the call path?
  • New dependencies or patterns. Did it pull in a new library or invent a second way to do something the codebase already solves?
  • The 10x test. If future agents copy this pattern ten times across the repo, would I still want to live in this codebase?
  • Rule update. If something felt off, did I add it to my rules and review checklist so I don’t have to catch it twice?

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by HN AI
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗