Code review against team rules
Give Claude Opus 4.6 the diff and your team’s review checklist, and have it list each change that breaks a rule, with the line. A reviewer still approves the merge.
Example: Does this diff follow our review rules?
Material
- Review checklist
- 1) No secrets in code. 2) Every new endpoint needs an auth check. 3) Database queries use parameters, never string concatenation.
- Diff
- + app.get('/export', async (req, res) => { const rows = await db.query(`SELECT * FROM orders WHERE region = '${req.query.region}'`); res.json(rows); });
PromptCheck the diff against the checklist and list each rule it breaks, quoting the line.
Sample answer · written by hand to show the reasoning
Two rules are broken. Rule 2: the new /export endpoint has no auth check before it returns orders. Rule 3: the query builds SQL by inserting req.query.region into the string; pass the region as a parameter instead. No secrets appear in the diff.