1---2name: review3description: Review code changes or a selected code scope for correctness, regressions, missing tests, security risks, dependency risks, product mismatch, and mismatch with the requested behavior. Use when the user asks for a code review, PR review, branch review, diff review, security review, or review since a commit.4---56# Review78## Input910- A PR, branch, commit range, diff, file list, feature scope, or review category.11- Use explicit input first; otherwise infer from context, recent edits, selected files, or branch.12- Safest default: review current changes for correctness, regressions, tests, security, dependencies, product mismatch, and operational risk.1314## Workflow15161. **Identify input**. Determine whether the review target is a PR, branch, commit range, diff, files, or current worktree.172. **Read context**. Check relevant specs, issues, `AGENTS.md`, docs, tests, and config that define expected behavior or standards.183. **Inspect changes**. Review for correctness, regressions, missing tests, security risks, dependency risks, error handling gaps, operational risk, and product/spec mismatch.194. **Prioritize findings**. Report actionable issues first, ordered by severity, with file and line references when possible.205. **Separate uncertainty**. List open questions, assumptions, and residual risks after findings.216. **Report only**. Do not edit code unless the user explicitly asks for fixes.2223## Output2425- Findings first, ordered by severity26- File and line references when possible27- Open questions and assumptions28- Test gaps or unchecked risks29- Brief summary only after findings3031## Examples3233- Code review: correctness, regressions, maintainability, tests.34- Security review: auth, authorization, input handling, secrets, injection, SSRF, tenant isolation.35- Dependency review: vulnerable packages, license or supply-chain risk, unnecessary new dependencies.36- Product review: behavior mismatch, missing edge cases, confusing UX, acceptance criteria gaps.37- Operational review: deploy risk, migrations, rollback, observability, config, data safety.3839## Guardrails4041- Prioritize real bugs and behavioral risks over style preferences.42- Do not report issues already enforced by passing tooling unless the tooling coverage is itself the issue.43- If no issues are found, say so directly and mention any test gaps or unchecked risks.44- Keep summaries secondary to findings.