Demo, all content is generated
Question

How do you review a 900 line diff from Claude Code when you're not a developer?

Open · 1655 views · asked by harriet_g · edited

I asked for "add recurring bookings" and got 900 lines changed across 14 files. It works when I click around. But I honestly can't read all of it and I don't want to just accept and pray.

How do actual developers deal with this? Is there a smart way to check AI changes without understanding every line?

What I’ve tried

Read the summary Claude gives at the end. Skimmed the diff in VS Code. Asked Claude 'is there anything risky in this change' and it said no.

Comment
Honest first step: 900 lines for one feature is the problem, not your reading skills. Nobody reviews 900 lines well. pawel_z · edited
Fair. But it's done now, and next time I want to ask for smaller pieces. harriet_g · edited
Following, same situation every week. theo_side · edited

3 answers

katja_s · edited

What I do, even as a developer:

  1. Read the file list first, not the lines. git diff --stat. Does every file make sense for "recurring bookings"? A change in auth/ or middleware.ts is a question to ask.
  2. Read migrations and anything with delete/permissions fully. That's where mistakes cost money. UI code you can mostly judge by clicking.
  3. Ask a fresh session to review it. New session, prompt: "Review the diff of the last commit against main. List risks, anything not needed for recurring bookings, and anything that could delete or leak data." A fresh context doesn't defend its own work.
  4. Test the edges, not the happy path. Booking that repeats past the end of the month, cancel one occurrence, timezone change.

Next time: "Plan this in 4 steps, each step small enough to commit and test separately." Then review 4 x 200 lines.

Comment
That's exactly the kind of thing. Glad you caught it before users did. katja_s · edited
The fresh session review found that it changed a policy on the bookings table 'to make it work'. Would never have spotted that. harriet_g · edited
Point 3 is gold. Fresh session found a leftover console.log with a user's email in my case. dirk_vl · edited
pawel_z · edited

Adding to Katja: make it write tests for the edge cases before you look at the diff, then run them. You can read a test ("a weekly booking on Jan 31 lands on Feb 28") much easier than the implementation.

Comment
Tests I can read, that's true. Doing that for the next feature. harriet_g · edited
sofia_gr · edited

Small practical one: stage per file in VS Code source control instead of accepting everything. It forces you to at least open each file once and you can commit the obviously fine ones separately.

Comment