Free sample

The bug passed its own test. Would your review catch it?

A free sample for tech leads receiving AI-generated pull requests: one ownership rule, a ten-question rubric, a PR template and three bugs you can run yourself.

Get the free sample

PDF and EPUB, plus Markdown templates and Node.js examples. Written with AI assistance. Gumroad delivers the files and asks for your email to do it.

Cover of Own the Diff. The title sits above a dark field of pale horizontal bars arranged like 612 lines of code, with blank lines between blocks. One bar is vermilion.

The problem

Picture a 380-line PR. It is tidy, and the tests are green. You ask the author why checkout reopens when the flag service is down, and they go and ask the tool.

Reviewers used to read clumsy code as a clue about where to look. Generated code tends to look neat whether it is right or wrong. One engineer describes "explaining AI generated code to the developer who 'wrote' it." Another calls out "wrong but plausible answers."

What you get

One rule, written so you can adopt it. Whoever opens the PR owns the diff. Three short questions in the PR description check it, and the sample gives you wording to make returning a failed PR a team norm. It also says plainly how authors can fake those answers, and what to do about it.

Review depth set by blast radius. Three tiers, from a copy change to a migration, with a defined review for each. For the riskiest tier, a reviewer writes a test of their own.

Three bugs to run. A discount off by one unit, a kill switch that reopens checkout during an outage, and a purge job that leaves 100 of 250 rows behind. Each one ships with a passing test. Run node --test and watch.

A rubric that prints on one page. Ten questions in order of cost. The first two can stop a review before you read any code.

A PR template. Copy it to .github/pull_request_template.md today.

What it will not do

It cannot reduce the amount of code your organization produces, change a manager's mind about review time, or make an AI reviewer less noisy. A reviewer who follows every step can still miss a bug. Nobody has yet measured whether these rules speed up review or reduce incidents, so the sample includes a 30-day way to test that on one repository.

Who wrote it

Written by Sunil Kumar with substantial help from an AI assistant. Studies, guides and quoted comments link to their sources, and every code example runs, so you can check the work.

Questions

Do I have to detect AI code? No. The rule applies however the code was written.

We already use an AI review tool. Is this still useful? The sample treats those tools as a linter that sometimes finds something real. A tool's approval does not count as a review.

What language are the examples in? JavaScript, run on Node.js. The patterns apply elsewhere.

Is there a paid version? A fuller kit may be built if enough people want it. It does not exist today.

Who sees my email? Gumroad holds it, and the seller there appears as custom shopee, which is Sunil Kumar. It is used to deliver the files and, if a fuller kit is built, to tell you once. To be removed, write to the address below. This page itself sets no cookies and has no trackers.

Get the free sample