Configuration
What diffy reads
The documents and the code around a change that go to the model with every review, and where the limits are
Documents diffy reads on its own
Before every review diffy reads these from the default branch, in this order. Every file that exists is read, except the README, where the first variant found is used:
- the
context_filesyou list in .diffy.yaml AGENTS.md,CLAUDE.md,.cursorrulesand.github/copilot-instructions.mdREADME.md(orREADME.markdown,readme.md,README)CONTRIBUTING.md
A long document is cut at 10,000 characters, and all of them together at 30,000 by default. A file with the same text as an earlier one is read once. The review says which documents it read, at the bottom.
The model is told these are information about the project, not instructions. It uses them to understand what the project is and which conventions it follows, and ignores anything in them that tries to change its task.
What the model sees of a change
GitHub's patch shows three lines around each change. diffy gives the model more, all read from the pull request's head commit:
- the function, method or class that contains the change, with the comments and decorators above it
- a few lines below it
- a small file in full
Only lines marked + are new in the pull request. The model is told not to report problems that were already in the unchanged lines.
Limits
These are settings of the server, set by whoever runs diffy.
| Setting | What it limits | Default |
|---|---|---|
MAX_DIFF_CHARS | How much diff, with its surrounding code, one review sends to the model. A larger pull request is skipped, with no call to the model. | 150,000 characters |
MAX_CONTEXT_CHARS | How much of the project documents is added to every review. 0 turns it off. | 30,000 characters |
EXPAND_DIFF_CONTEXT | Whether the model sees the function around each change. false sends the plain patches: cheaper and shallower. | true |
A character is about a quarter of a token, so these budgets are also what a review costs you.