Reviewing Code
Feature Branches
Use --branch to review all commits since your branch diverged from main:
roborev review --branch # Review branch vs auto-detected main/masterroborev review --branch --base dev # Review branch vs specific baseroborev review --branch --wait # Wait for review and show resultThis is useful for pre-merge reviews of entire feature branches.
How It Works
- roborev detects the merge-base between your current branch and the base branch
- All commits from the merge-base to HEAD are queued for review
- Each commit is reviewed individually by the AI agent
- Results are stored and can be viewed in the TUI
Pre-Merge Review
Before creating a pull request, review your entire branch:
git checkout feature-branchroborev review --branch --waitroborev fix # Address any failed reviewsroborev tui # Browse resultsCI Integration
if ! roborev review --branch --wait --quiet; then echo "Reviews found issues" exit 1fiBranch Review Options
| Flag | Description |
|---|---|
--base <branch> | Compare against a specific base branch (default: auto-detect main/master) |
--wait | Wait for all reviews to complete |
--quiet | Suppress output |
--agent <name> | Use specific agent |
--reasoning <level> | Set reasoning depth |
Uncommitted Changes
Use --dirty to review working tree changes before committing:
roborev review --dirty # Queue review of uncommitted changesroborev review --dirty --wait # Wait for review and show resultWhat Gets Reviewed
The --dirty flag includes:
- Staged changes
- Unstaged changes to tracked files
- Untracked files
Dirty Review Options
| Flag | Description |
|---|---|
--wait | Wait for review to complete |
--quiet | Suppress output |
--agent <name> | Use specific agent |
--reasoning <level> | Set reasoning depth |
Exit Codes
The --wait flag exits with:
- Code 0 for passing reviews
- Code 1 for failing reviews
This is useful for CI or pre-commit workflows:
if ! roborev review --dirty --wait --quiet; then echo "Review failed - please address findings" exit 1fiReview Types
Use --type to change what the reviewer focuses on. Omitting --type gives you the standard code review.
roborev review # Default code reviewroborev review --type security # Security-focused reviewroborev review --type design # Design-focused reviewroborev review --branch --type security # Security review of branch| Type | Focus |
|---|---|
| (default) | Bugs, security, testing gaps, regressions, code quality. This is what you get when you omit --type. |
security | Injection, auth, credential exposure, path traversal, unsafe patterns |
design | Completeness, feasibility, task scoping, missing considerations |
Review types work with all review modes (--branch, --dirty, --since, single commits, ranges).
Each type can have its own agent and model configuration via {type}_agent and {type}_model in .roborev.toml or global config. See Workflow-Specific Agent and Model.
Specific Commit Ranges
Use --since to review commits since a specific point:
roborev review --since HEAD~5 # Review last 5 commitsroborev review --since abc123 # Review commits since abc123 (exclusive)roborev review --since v1.0.0 # Review commits since a tagThe range is exclusive of the starting commit (like git’s .. range syntax). Unlike --branch, this works on any branch including main.
Large Diffs
For --dirty reviews, diffs are limited to 200KB since uncommitted changes cannot be easily inspected by the agent. If your dirty diff exceeds this limit, commit your changes in smaller chunks.
For committed changes, diffs over 250KB are omitted from the prompt - the agent is given only the commit hash and can inspect changes using git show.
Addressing Findings
After reviewing, use roborev fix to let an agent address any failed reviews:
roborev review --dirty --wait# commit your changesroborev fix # Address unaddressed reviewsSee Also
- Responding to Reviews - Fix findings and add comments
- Code Analysis & Refactoring - Targeted analysis with
roborev analyze - Auto-Fix with Refine - Automated fix loop