Code Review and Quality
Conducts multi-axis code review. Use before merging any change. Review covers five axes: correctness, readability, architecture, security, and performance.
Conducts multi-axis code review. Use before merging any change. Review covers five axes: correctness, readability, architecture, security, and performance.
Multi-dimensional code review with quality gates. Every change gets reviewed before merge.
Every review evaluates code across these dimensions:
Does the code do what it claims to do?
Can another engineer understand this code without the author explaining it?
Does the change fit the system's design?
Does the change introduce vulnerabilities?
Does the change introduce performance problems?
Target these sizes:
~100 lines changed → Good. Reviewable in one sitting.
~300 lines changed → Acceptable if it's a single logical change.
~1000 lines changed → Too large. Split it.
Splitting strategies:
| Strategy | How | When | |----------|-----|------| | Stack | Submit a small change, start the next one based on it | Sequential dependencies | | By file group | Separate changes for groups needing different reviewers | Cross-cutting concerns | | Horizontal | Create shared code/stubs first, then consumers | Layered architecture | | Vertical | Break into smaller full-stack slices | Feature work |
Every change needs a description that stands alone in version control history.
First line: Short, imperative, standalone. "Delete the FizzBuzz RPC" not "Deleting the FizzBuzz RPC."
Body: What is changing and why. Include context, decisions, and reasoning not visible in the code itself.
Before looking at code, understand the intent:
Tests reveal intent and coverage:
Walk through the code with the five axes in mind:
For each file changed:
Label every comment with its severity:
| Prefix | Meaning | Author Action | |--------|---------|---------------| | (no prefix) | Required change | Must address before merge | | Critical: | Blocks merge | Security vulnerability, data loss, broken functionality | | Nit: | Minor, optional | Author may ignore — formatting, style preferences | | Optional: / Consider: | Suggestion | Worth considering but not required | | FYI | Informational only | No action needed |
Check the author's verification story:
## Review: [PR/Change title]
### Context
- [ ] I understand what this change does and why
### Correctness
- [ ] Change matches spec/task requirements
- [ ] Edge cases handled
- [ ] Error paths handled
- [ ] Tests cover the change adequately
### Readability
- [ ] Names are clear and consistent
- [ ] Logic is straightforward
- [ ] No unnecessary complexity
### Architecture
- [ ] Follows existing patterns
- [ ] No unnecessary coupling or dependencies
- [ ] Appropriate abstraction level
### Security
- [ ] No secrets in code
- [ ] Input validated at boundaries
- [ ] No injection vulnerabilities
- [ ] Auth checks in place
### Performance
- [ ] No N+1 patterns
- [ ] No unbounded operations
- [ ] Pagination on list endpoints
### Verification
- [ ] Tests pass
- [ ] Build succeeds
- [ ] Manual verification done (if applicable)
### Verdict
- [ ] **Approve** — Ready to merge
- [ ] **Request changes** — Issues must be addressed
When resolving review disputes, apply this hierarchy:
After review is complete: