No. 137 Review the diff

Code Review Rules

Use when a diff needs a second pass that stops at findings

  • Claude Code
  • Codex
  • Cursor
  • Review the diff

Prompt

## Code Review Rules

### Experiment cohorts

- Do not filter treatment comparisons on post-exposure behavior, including conversion or retention.
  Safe path: build cohorts from assignment or exposure; report conversion as an outcome.

When to use

“Code Review Rules” fits when a diff needs a second pass that stops at findings, because it says “Code Review Rules”, and it is written to stay in force on later turns rather than to finish one task.

With “Code Review Rules” loaded, the user message can be as small as “fix the empty-cart total in src/cart.js and do not touch the test runner”, because “Code Review Rules” is already in force.

When not to use

Leave “Code Review Rules” unused when you wanted the fix applied in the same turn, because “Code Review Rules” points the other way

How to run it

Claude Code

Claude Code loads “Code Review Rules” from .claude/rules on later sessions, so “Code Review Rules” survives a new chat, which a one-off paste does not.

Codex

Codex keeps “Code Review Rules” only if you put “Code Review Rules” in AGENTS.md, or in AGENTS.override.md beside the directory that should inherit it. A paste that is not saved is gone next thread.

Cursor

Cursor keeps “Code Review Rules” by saving “Code Review Rules” as .cursor/rules. The chat transcript alone will not reload it tomorrow.

Comparison

“Code Review Rules” did not turn the cart task into an experiment-cohort review. The bare answer added a toFiniteNumber helper. The prompted answer was a shorter loop that uses a nullish fallback of 0 for price and qty.

Related

来源:OpenAI · https://developers.openai.com/codex/guides/agents-md · 2026-12-01