Keyboard shortcuts

Scrolling

dorCtrl+d
Scroll down
uorCtrl+u
Scroll up
Ctrl+e
One line down
Ctrl+y
One line up
gtheng
Top of article
G
Bottom of article

Articles

j
Older article
k
Newer article
O
Open original
H
Open hackernews
R
Open reddit

Lists

jor↓
Next item
kor↑
Previous item
gtheng
First item
G
Last item
oorEnter
Open selected item

Go to

gthenforgtheni
Feed
gthen1–9
Open feed entry
gthenb
Browse
gthenp
Preferences

Search and help

⌘+kCtrl+kor/
Global search
?
Show this help
Esc
Close this help

Liberating Code Review

ampcode.com original

Code review has traditionally been tied to an interface where a human reads diffs. Now, we've fully decoupled the review agent from any UI, making it a composable and extensible subroutine that can be invoked from many different places where it is useful:

  • You can run amp review in the CLI to run the review agent directly
  • You can request a review in any thread using natural language like "review the outstanding changes" or "review changes since diverging from main"

This composability also means you can more easily close the loop by asking the main agent to automatically fix the issues found or by piping review comments into another command.

Invoking the review agent directly using amp review:

Requesting a review from within a thread: Review tool

Customizing Review with Checks#

You can also define Checks within your codebase. Checks are user-defined invariants or review criteria scoped to specific parts of your codebase. They are defined in .agents/checks/ directories.

Here's an example performance check, which you could save to .agents/checks/perf.md:

---
name: performance
description: Flags common performance anti-patterns
---

Look for these patterns:

- Nested loops over the same collection (O(n²) → O(n) with a Set/Map)
- Repeated `array.includes()` in a loop
- Sorting inside a loop
- String concatenation in a loop (use array + join)

Report the line, why it matters, and how to fix it.

The code_review tool will kick off a separate agent for each check. This provides a stronger guarantee that each check will actually be checked than if the checks were embedded in a general context file like AGENTS.md.

Here are some more examples of useful checks:

  • Performance best practices specific to your stack
  • Common anti-patterns your team has hit before
  • Security best practices or invariants
  • Migration reminders for deprecated APIs
  • Stylistic conventions that aren't in the linter
  • Compliance requirements

Checks are scoped to the directory that contains .agents/, so a root .agents/checks directory would cover the entire codebase while api/.agents/checks would cover files under api/.