Code standards and review scope
Hold every pull request to your own standard: local code standards, a fully editable review prompt, and the check against what the PR promised.
DiffGuardian can hold a pull request to your standard, not just describe it. Everything on this page is available on every plan.
#Local code standards
Your code standards are a plain list of rules — markdown, bullets, whatever you like — that is injected into every AI review, so each review has something concrete to enforce instead of generic advice. DiffGuardian ships a starter list and you edit it freely:
- Prefer named exports over default exports for library modules
- All async functions must handle errors
- Avoid direct
fetch()calls — use the project's HTTP service instead - React components must not perform side effects in render
The review shows how many rules it ran against, so you can tell at a glance that your standards were actually applied. Standards are stored on your machine; the DiffGuardian service never sees them.
#The review prompt itself
If editing the standards is not enough, Settings → Custom AI review prompt lets you replace the reviewer's instructions outright — the text that decides what it looks for. Your standards, the review depth and the required output format are appended automatically, so the prompt only has to say what you care about. Saving an empty prompt restores the DiffGuardian default.
The prompt is read once, when a review starts, so editing it mid-run cannot change the review that is already going.
#Checked against what it promised
Separately from your standards, DiffGuardian compares the pull request against what its description claims it does. It pulls the author's stated intent out of the body — a Goals, Requirements, Acceptance Criteria, Definition of Done or Scope heading — and puts that in front of the model as its own section, so the walkthrough and the findings are written against what the change was for. A body that states no intent yields nothing rather than a guess made out of template boilerplate.
A PR whose description promises a fix and whose diff also quietly changes an authorisation rule is exactly the case this is for.
#Linked tickets
If you have connected a Jira or Linear MCP server and turned MCP tool calls on, a review will fetch the ticket linked from the pull request and raise an advisory when the change does not appear to address it. The check runs on Anthropic and OpenAI models; on other backends the review simply proceeds without it.
#How deep the review goes
Review effort, automatic-AI behaviour and the small-diff threshold are covered in How a review works.