The app
Prepare review
Let riff review a pull request for you and leave its findings as drafts and a review summary for you to edit.
Prepare review runs an AI reviewer over a pull request and hands you the result as draft comments and a review summary. You read them, keep or delete what you like, and submit when you’re ready. Riff never submits for you.
You find it as the AI review card at the top of a PR’s Review tab, and as a
Prepare review button on each row of the PR list. It needs an
assist model and key; without them the button stays
disabled and the card tells you to set them in config.toml. Settings has no screen for them.
Run a review
- Open a pull request and go to the Review tab.
- In AI review, choose Prepare review (or Run again).
- Check the note in the popover: what it runs on and about what it costs.
- Choose Start review.
The run shows four steps: Reading the change, Investigating, Re-rating findings and Drafting the review. A timer shows how long it has run.
While a run goes, its step and a timer also show on the PR’s tab in the sidebar and on its list row. The agent can offer a run too; you start it.
From the terminal, use riff prepare. The app and the CLI share one lock per PR, so the same PR never runs twice at once.
What the reviewer does
The default engine is Scrutiny. One model hunts for problems in the change with read-only tools: it can read files, search the repository and read the diff. It records concerns as it goes and checks each one. A second model then re-rates what it found. Scrutiny costs about $0.08 and takes about five minutes on a typical PR.
If you set review_engine = "pipeline", or pass another recipe from the CLI,
riff runs a recipe pipeline instead: context, triage, one agent per focus
area, then a verifier, merge and summary. Recipes are a recipe.toml plus
Markdown prompts. The built-in one is default; your own live in
~/.config/riff/review/recipes/<name>/. A recipe can set a spend limit, which
the confirmation shows.
Follow-up reviews
If you have reviewed the PR before, Scrutiny follows up instead of starting over. It checks all your earlier threads and reviews only what changed since your last submitted review. The popover offers two scopes:
- Since last review (with the commit): the default.
- Full review: reviews the whole PR.
Follow-up results appear in the summary only. From the CLI, --since <sha>
picks the starting commit and --full reviews everything. If riff can’t get
that commit, it falls back to a full review and says so in the report.
Watch it live
While Scrutiny runs, the card streams what it’s doing: the concerns it raises and whether each is checking, supported, ruled out or unresolved, then its draft findings and assessment. An activity log shows each turn and tool call.
Stop ends the run. What it found so far is not saved.
What you get
When a run finishes:
- Each finding becomes a draft comment on the PR’s Review tab, where you can edit or delete it. With draft sync on, it is also added to your pending GitHub review.
- The summary is written to the PR’s author, ready to submit. Open Review body in the card and choose Use as summary to put it in your summary (it asks before replacing text you wrote). Findings that became drafts carry a From AI review badge.
- The card shows the verdict (Changes needed, Approve or Comment) and how old the run is. A list row or tab marks a run outdated when you pushed after it.
- Open report shows the full report: the re-rater’s changes, the verdict, cost and what the run read.
By default, riff also rewords the summary, finding details and questions in its
own voice with one more small model call. If any code, path, number or piece of
evidence wouldn’t survive the rewrite, it keeps the plain wording. Turn this
off with persona = false in [assist].
Run it again
Every new run first tidies up what earlier unsubmitted runs left. It archives their AI drafts and summary, and deletes your pending GitHub review if nothing else is in it. The popover tells you when this will happen. Submitting a review marks the runs it covered as submitted and clears the draft body.
When a run doesn’t finish
- Failed: the card says so and shows the error.
- Stopped: nothing was saved.
- Incomplete: an area, the verification or the summary didn’t finish. The run is saved and marked incomplete, and the card lists what’s missing. The CLI exits with code 4. Running again attempts only the missing stages.
Cost and privacy
- Prepare runs on your assist endpoint and key. See Review assist for the spend guards.
- Each run is saved as a folder under
~/.cache/riff/reviews/with every model call and areport.md. Repeating a request is served from the cache.