AMP code review agent has been reworked into a UI-agnostic, composable subroutine that can be invoked from multiple contexts. The agent no longer assumes a single review interface; it can be called directly from the CLI, from chat-style threads using natural language, or in parallel from an editor extension review panel, which makes the review workflow more adaptable to diverse development setups.
What changed
The core shift is full decoupling from any specific UI. This means review logic is treated as a portable service that other tools and workflows can call into. Key invocation paths described:
- CLI: run the review agent directly with
amp review. - Chat/threaded requests: request a review in any thread using natural language (examples include “review the outstanding changes” or “review changes since diverging from main”).
- Editor extension: launch multiple reviews in parallel from the extension’s review panel.
Because the review capability is composable, the review output can be fed into other commands or into the main agent to automatically apply fixes, enabling tighter automation between discovery and remediation.
Customizing review with Checks
Review behavior can be tailored by adding user-defined rules called Checks, placed under .agents/checks/ directories. Checks are intended as scoped, human-readable invariants or review criteria for specific parts of a repository; they are documented in the manual at https://ampcode.com/manual#checks.
An example performance check (saved as .agents/checks/perf.md) was shown as:
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 system’s code_review tool spawns a separate agent for each check, providing stronger guarantees that each rule will be evaluated rather than relying on a single, overloaded context file.
Scope and examples
Checks are directory-scoped: a root .agents/checks covers the entire repository, while a nested api/.agents/checks applies only to files under api/. Suggested uses for checks include:
- Performance best practices tailored to a stack
- Security invariants or common vulnerability patterns
- Migration reminders for deprecated APIs
- Stylistic conventions not enforced by linters
- Compliance requirements for specific code regions
Developer implications
Treating the review agent as a composable subroutine makes it easier to integrate automated review into different parts of the development lifecycle—local CLI runs, conversational threads, or editor-driven flows. The separate-agent-per-check model promotes clearer, more focused reviews and simplifies adding team-specific checks without bloating a single review context.
Original source: https://ampcode.com/news/liberating-code-review
