Code Review
Perform a structured engineering review of the requested code or the most relevant files in scope.
If the user passed arguments, treat $ARGUMENTS as the review scope.
If no arguments were provided, infer the most relevant files from the current task and state what you reviewed.
Review goals
Focus on the issues most likely to matter to an engineering team:
- Correctness and edge-case handling
- Data validation and error handling
- Test coverage gaps and missing regression protection
- Readability and maintainability risks
- Performance or cost risks when they are meaningful
- Developer-facing documentation gaps when they block safe use
Review workflow
- Identify the review scope and summarize it in one short sentence.
- Read the code carefully before writing findings.
- Use checklist.md to pressure-test the code systematically.
- Use examples.md when you need the expected review style and level of detail.
- Prioritize the top issues instead of listing every small nit.
- Prefer concrete, evidence-based findings tied to specific files, functions, conditions, or scenarios.
- If you are uncertain, say what you checked and why confidence is limited.
Output format
Use this structure:
Review scope
- What was reviewed
- What assumption or context shaped the review
Top findings
For each finding, include:
- Severity:
high,medium, orlow - Short title
- Why it matters
- Evidence from the code
- Recommended next step
Test gaps
- List the most important missing tests or say
No major new test gaps identified
Merge recommendation
Choose one:
Ready to mergeMerge with follow-upNeeds changes before merge
Review quality bar
- Lead with the highest-risk issues first.
- Do not invent bugs without evidence.
- Do not suggest rewrites unless the current code creates meaningful risk.
- Distinguish between correctness issues and style preferences.
- Keep the tone direct, practical, and useful to a teammate.
Special handling
- If the code is mostly sound, say so clearly and focus on residual risk.
- If only low-severity issues exist, avoid overstating them.
- If a test suite exists, compare the code risk to what the tests actually protect.
- If the request is broad, review the most relevant files first and say what you did not inspect.