Review the lines a change adds
An agent changes forty lines across six files, and whole-repository scanners report everything that was already wrong. RepoOps reviews only the lines the diff adds: your repository's own decision rules, the security and env checks, a quality pass and blast radius. The same desk ranks inbound pull requests and gives one ship verdict before a deploy. No model call, and a clean result says which rules ran.
Watch it
Read the narration
- 0:00 An agent wrote the change.
- 0:02 Which of its added lines carry new risk?
- 0:06 RepoOps reviews only the lines this diff adds,
- 0:09 and it makes no model call.
- 0:13 Each finding names the file, the line, the pass and its reason.
- 0:17 A clean result still says which brain guards ran.
- 0:23 Decide on the line, not the whole repository.
- 0:26 The guide covers guards.
Synthetic example. Read the guide
How to
The RepoOps desktop app tracking the repository, with git on the machine and the tracked branch fetched.
For inbound triage: a connected GitHub token for the repository.
- Open AI Security, then the Secrets tab, and press Review diff under The change under review.
It runs once when the tab first shows, for the repository picked above the card. With both fields empty it reviews the working tree against the tracked branch (origin/main by default). Type a base ref to review against another ref, or a base and a head ref to review committed work such as a branch.
- Read the findings by file.
Each finding has a severity, the line, the kind and one sentence of reason. The card's footer says how many guards from your decisions file ran against this diff, or why none did.
- Declare a guard for a decision you want checked on every diff.
In
.claude/brain/decisions.md, under the decision's dated heading, add one line:**Guard.** `lib/routes/checkout*.mjs` must not match `process\.env` (severity: high). Severity is optional and defaults to medium. A guard over 200 characters or with a nested quantifier is listed as skipped with its reason. - Run the same review in CI with npm run review-check.
It diffs the pull request against its base and exits 1 when a finding matches an active lesson;
--strictalso fails on any high finding. Make it a required check in branch protection if you want it to hold merges. - Rank inbound pull requests on the Overview.
Open AI Security; the Overview's Inbound pull requests card reads the repository and window picked on it. Each open external pull request gets a provenance band (Review first, Agent-authored, Needs signals or Human-likely) and a slop-risk percentage for thin-content markers, most likely agent and slop first, 20 rows at a time.
- Before a deploy, open Remediation, then the Fix runs tab, and press Re-run preflight under Go-live preflight.
It rolls the guardrails scan, the env scan, the git state against the tracked branch and a build-readiness look into one verdict, then prints the Deploy runbook and the Custom-domain runbook for the stack it detected. The same check runs as
npm run ship-check, which exits 1 when blocked.
Use cases
An agent's uncommitted change, before the pull request
- Situation
- Claude Code added a route handler and a helper in one session.
- You do
- Open AI Security, then the Secrets tab, and press Review diff.
- You see
- Under the changed file a medium row flags unreachable new code and a low row flags new I/O with no error guard. You know which added lines to read before anyone else sees the change.
A push stopped by a variable nothing declares
- Situation
- A new route reads a webhook secret no env file declares, and the developer runs ship-check before pushing.
- You do
- Read the blocking check and its fix, declare the variable in .env.example, set it on the host, and run it again.
- You see
- The verdict moves from Blocked to Ready to ship. The check reads the working tree only; it cannot see what your host has set.
Expected outcome
Next step: The base ref is not fetched locally. Sync the repository, then press Review diff.
Next step: decisions.md declares no Guard lines. Pass one checks nothing until one does.
Next step: No GitHub token is connected on this machine (Connect GitHub on the card), or nothing is open in the window. It does not fall back to internal history.
Next step: A critical or high security finding, a high env finding, or an uncommitted change to a protected path. Read the check that blocked and apply its fix.
What else to consider
Only added lines
A defect already in the file stays invisible here; the guardrails and env scans cover the whole tree. It flags patterns, not intent, and the blast-radius pass skips a file the code graph does not hold.
What it never does
On the desktop it merges, blocks and edits nothing, and inbound triage never merges or closes a pull request. The CI gate and the GitHub App's RepoOps review check are the only places a merge can be held; GITHUB_REVIEW_MERGE_BLOCK on the hosted side turns a high finding into a failing check.
A direct push to main
A pull request gets the RepoOps review check; a push straight to the default branch does not. Write your team's rules as a list in .repoops/rules.md, one rule per item, optionally starting with [high], [medium] or [low]. With the RepoOps GitHub App installed, each push to the production branch (the default branch unless you name another, below) is judged against that file: RepoOps reads the diff the push landed, asks a model on the team owner's own key from My Brain which rules it breaks, and posts a RepoOps push review check on the commit naming the rule, file and line of each finding. A broken rule also lands on the Review queue on AI Security. The push has already landed, so the check alerts and blocks nothing. With no model key it makes no call and the check says the review was skipped. A repository with no rules file gets no check. This and the pull request rules review below are the two reviews on this page that call a model.
Your rules on a pull request
The same rules file is checked on every pull request, on the same key. When a pull request opens, gets a new commit or leaves draft, RepoOps reads .repoops/rules.md at the base branch (so a pull request cannot change the rules it is judged by), asks the model which rules the diff breaks, and posts a RepoOps rules review check on the head commit: failure when a rule is broken, success when none is, neutral with the reason when it was skipped. A broken rule also gets one comment on the pull request and a row on the Review queue. Three limits hold the spend on your key. Each commit is judged once, so a webhook GitHub sends twice costs nothing extra. A repository makes at most 50 model calls a day (UTC), push and pull request reviews together; past that the check says the limit was reached and the key is not used. A pull request from a fork is not judged until a maintainer adds the repoops-rules-review label, which the fork's author cannot add.
A production branch other than the default
The review watches the default branch until you name another. Put a line such as production_branch: release in the first 20 lines of .repoops/rules.md, or open the repository under Team, Repositories and save the branch in the Push review band (an owner or admin, with a code from your authenticator app). The line in the rules file wins over the saved setting. Each push review check says which branch it treated as production and where that came from. The Repositories list shows the last push under each repository's activity: a time there means GitHub delivered a push for that repository in the last 30 days, so the App is subscribed to Push events.
One side effect
When a finding matches an active lesson, that lesson's prevented count goes up by one and a prevention event is recorded once per lesson, file, line and kind. That is what the prevented-recurrence figures read.
Cost and egress
No model call. The review runs git on this machine. Inbound triage calls GitHub with your token. The working tree never leaves the machine, so diff review runs only in the desktop app; on repoops.ai, /team/diff-review opens the AI Security page.