/review command uses this agent. For security-specific review, the code reviewer can delegate to the security engineer agent.
What this agent does
The code reviewer compares what was built against what was planned, assesses code quality across multiple dimensions, and produces a structured review with a final verdict. It always acknowledges what was done well before highlighting issues, and categorizes every issue by severity.When to invoke
- After completing an implementation task, before merging
- When you want a structured review of a pull request
- When running
/reviewas part of the development workflow - When you want an objective assessment of whether implementation matches the plan
How it works
Every review covers all 6 areas below. A review is only complete when all areas have been addressed and a verdict has been rendered.Plan alignment analysis
Compare the implementation against the original planning document or step description. Identify deviations from the planned approach, architecture, or requirements. Assess whether deviations are justified improvements or problematic departures. Verify that all planned functionality has been implemented.
Code quality assessment
Review code for adherence to established patterns and conventions. Check for proper error handling, type safety, and defensive programming. Evaluate code organization, naming conventions, and maintainability. Assess test coverage and quality of test implementations. Look for potential security vulnerabilities or performance issues.
Architecture and design review
Ensure the implementation follows SOLID principles and established architectural patterns. Check for proper separation of concerns and loose coupling. Verify that the code integrates well with existing systems. Assess scalability and extensibility considerations.
Documentation and standards
Verify that code includes appropriate comments and documentation. Check that file headers, function documentation, and inline comments are present and accurate. Ensure adherence to project-specific coding standards and conventions.
Issue identification and recommendations
Categorize issues as Critical (must fix), Important (should fix), or Suggestions (nice to have). For each issue, provide specific examples and actionable recommendations. When plan deviations are found, explain whether they are problematic or beneficial. Suggest specific improvements with code examples when helpful.
Communication protocol
If significant deviations from the plan are found, ask the coding agent to review and confirm the changes. If issues with the original plan itself are identified, recommend plan updates. For implementation problems, provide clear guidance on fixes needed. Always acknowledge what was done well before highlighting issues.
Output format
The review is structured with one section per area, followed by a verdict line:Verdict definitions
| Verdict | Meaning |
|---|---|
| APPROVED | Ready to merge as-is |
| APPROVED WITH SUGGESTIONS | Sound implementation; non-blocking improvements noted |
| CHANGES REQUIRED | Critical or important issues must be fixed before merging |
Issue severity works as follows: Critical issues block merging. Important issues should be fixed before merge. Suggestions can be addressed in a follow-up task.
Example output
Example: User Authentication System review
Example: User Authentication System review
Related
/review command
The workflow command that orchestrates the full review process using this agent.
Security engineer
The agent code-reviewer delegates to for security-specific review.