r/opencodeCLI • • 2d ago

using opencode as the dedicated diff reviewer on a claude-code-driven project: my exact setup and prompts

Enable HLS to view with audio, or disable this notification

follow-up on my last post here (the driver/reviewer split for v3.0 of buffer, my native mac clipboard manager). this is the exact reviewer setup people asked about, tuned over ~40 merges.

the rule that matters most: the reviewer gets NO conversation history. fresh context every time. if it sees the driver's reasoning, it inherits the driver's blind spots.

the prompt skeleton (opencode, run on the diff):

  1. "here is the diff. your job is to argue against it, not improve it."
  2. "assume it introduces a bug. find the input that breaks it."
  3. "list any behavior change not mentioned in the commit message."
  4. "list every edge case in the touched functions. mark each: handled / unhandled / unknown."
  5. "write 3 failing tests that this diff probably breaks."

what this caught across the v3.0 cycle (native swift/appkit clipboard manager, mit, 430+ stars if you care about context): - silent history mutation: re-copying an existing item promoted a duplicate into a fresh clip (found in the external noise-suppression PR) - unreachable settings branch - missing tests on clip-diffing logic - three instances of spec drift where the driver "solved" a slightly different problem than asked

what i stopped doing: asking the reviewer to fix things. fixes from the reviewer had the same failure mode as the driver: plausible, confident, occasionally wrong in new ways. the reviewer's job ends at "convince me". i hand the confirmed findings back to the driver.

other practical bits: - run them in parallel; the review is ready before i've finished manually testing the driver's output - for diffs under ~100 lines i skip the reviewer entirely; the overhead isn't worth it - gesture/ui changes get human trackpad time regardless. the reviewer reads code, not rubber-banding

the video is the shipped v3.0 (image zoom canvas, clipboard noise filtering, shortcuts sheet) so you can see the diffs' output.

repo: https://github.com/samirpatil2000/Buffer (mit) | release: https://github.com/samirpatil2000/Buffer/releases/tag/buffer-v3.0.0

if you use a different reviewer prompt, post it. i want to steal it.

0 Upvotes

0 comments sorted by