ah review
Review code changes or a codebase slice using automated review agents.
ah review changes [COMMIT|BRANCH|RANGE] [OPTIONS]
ah review codebase [OPTIONS]changes reviews staged changes, then unstaged changes, then the last commit when no target is provided. codebase performs a repository review without assuming a diff. Review agents run sequentially through the normal foreground ah <agent> launchers, so their sessions are recorded and reported like direct agent runs.
Options
| Option | Description | Default |
|---|---|---|
--path <PATH> | Restrict the diff or codebase inventory | all tracked scope |
--focus <TEXT> | Free-form review focus; repeatable | — |
--reviewers <LIST> | Comma-separated reviewer types | all non-conditional |
--security | Shortcut for the security reviewer | — |
--agent <TYPE> | Agent software for reviews | claude |
--model <MODEL> | Model override | — |
--account <NAME> | Credential account for the launcher | configured default |
--output-dir <DIR> | Directory for prompts and JSON reports | target/ah-review |
--dry-run | Generate prompts and command lines only | false |
--print-prompts | Print generated reviewer prompts | false |
--parallel is accepted but rejected at runtime for fix-first review execution because reviewers may edit the shared working copy.
Available Reviewers
| Reviewer | Focus |
|---|---|
goal-adherence | Milestone requirements match |
test-integrity | Anti-cheating, weakened assertions |
security | OWASP Top 10, injection, auth bypass |
dependency-hygiene | Version drift, package hallucinations |
architecture | Module boundaries, layering violations |
duplication | Code clones, repeated logic |
performance | Asymptotic regressions |
concurrency | Deadlocks, races |
idioms | Project style, best practices |
compatibility | Breaking changes |
corner-cases | Real-world assumptions |
accessibility | UI/TUI accessibility |
Examples
# Review current changes
ah review changes
# Review last 3 commits with specific reviewers
ah review changes HEAD~3..HEAD --reviewers security,test-integrity
# Review the REST server security model without a diff
ah review codebase --security \
--focus "authentication, authorization, and tenant isolation" \
--path crates/ah-rest-server
# Preview generated prompts without launching agents
ah review changes --security --agent codex --dry-run --print-prompts