All Questions
Ai Coding And Product Systems medium

Your AI review system receives a 4,000-line pull request spanning 60 files. Sending the whole diff in one prompt yields shallow, generic comments, and real bugs in files near the middle of the diff are missed. How should you structure the review?

  1. A Send the entire diff in a single prompt with a larger context window so the model sees every cross-file relationship at once.
  2. B Split the diff into per-file or per-function hunks, add surrounding code and related definitions, and review chunks in parallel.
  3. C Review only the first few files of the diff in full detail and skip the rest, since early files usually contain the core logic.
  4. D Strip the diff down to added lines only, removing context lines and deleted code so that more changes fit in the same token budget.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions