UTA DevHub
Guides

Code Review Templates

Experience-based code review templates to ensure consistent feedback and learning

Code Review Templates

Overview

These templates ensure code reviews are consistent, educational, and appropriate for the developer's experience level. Use the correct template based on the PR author's experience.

Code reviews are not just about finding bugs - they're opportunities for learning, knowledge sharing, and ensuring our "single author" consistency.

Review Templates by Experience Level

Code Review - Junior Developer

✅ Compliance Checklist

  • File placement follows decision tree
  • Naming conventions followed exactly
  • No TypeScript any types used
  • Error handling present for all async operations
  • Tests included for new functionality
  • Documentation updated

📚 Learning Objectives

  • Understands why this approach was chosen
  • Can explain the code's purpose clearly
  • Identifies potential edge cases

🎯 Growth Areas

Please provide:

  1. One improvement for code clarity
  2. One performance consideration
  3. One additional test case

💬 Feedback Format

## What's Great 👍
- [Specific positive feedback with examples]
 
## Required Changes 🔧
1. [Clear, actionable change with example]
   ```typescript
   // Current
   [current code]
   
   // Suggested
   [improved code]

Learning Opportunities 📖

  • [Link to relevant documentation]
  • [Pattern to study in existing codebase]

Questions for Understanding 🤔

  • Can you explain why you chose [specific approach]?
  • What edge cases did you consider?

### 🎓 Mentorship Notes
- Focus on teaching, not just correcting
- Provide examples from our codebase
- Encourage questions
</Tab>

<Tab>
## Code Review - Mid-Level Developer

### ✅ Compliance Checklist
- [ ] Architecture aligns with established patterns
- [ ] Proper abstraction levels maintained
- [ ] Performance implications considered
- [ ] Security best practices followed
- [ ] Integration points properly handled
- [ ] Documentation comprehensive

### 🏗️ Architectural Alignment
- [ ] **Follows** domain boundaries correctly
- [ ] **Maintains** separation of concerns
- [ ] **Reuses** existing patterns appropriately

### 🔍 Deep Dive Areas
1. **Pattern Consistency**: Compare with similar features
2. **Error Scenarios**: Validate all paths covered
3. **Performance Impact**: Check for N+1, memory leaks
4. **Test Quality**: Beyond coverage numbers

### 💬 Feedback Format
```markdown
## Architecture & Design 🏛️
- [Comments on structural decisions]

## Implementation Quality 💎
- [Specific code quality observations]

## Suggestions for Enhancement 🚀
1. [Advanced pattern that could be applied]
2. [Performance optimization opportunity]

## Knowledge Sharing 🤝
- [Pattern that others could learn from]
- [Candidate for shared utility/component]

🎯 Focus Areas

  • Pattern recognition and reuse
  • Cross-feature consistency
  • Performance optimization opportunities

Review Response Templates

For PR Authors

## PR Author Response Template
 
### Changes Made ✅
- [x] Fixed [issue 1] as suggested
- [x] Updated [component] to follow pattern
- [ ] Refactored [function] - need clarification
 
### Questions 🤔
1. Regarding [feedback point], could you clarify...?
2. I chose [approach] because... Is there a better pattern?
 
### Learning Notes 📚
- Learned about [pattern/concept]
- Will apply [technique] in future PRs

For Reviewers Following Up

## Follow-up Review
 
### Previous Concerns ✅
- [x] [Issue 1] - Resolved
- [x] [Issue 2] - Addressed well
- [ ] [Issue 3] - Still needs work
 
### New Observations 👀
- [Any new issues found]
 
### Ready to Merge? 🚀
[ ] Yes, all concerns addressed
[ ] No, see remaining items above

Best Practices

For All Reviews

  1. Be Specific: Point to exact lines and provide examples
  2. Be Kind: Remember there's a person reading your feedback
  3. Be Educational: Every review is a learning opportunity
  4. Be Consistent: Apply standards uniformly

Review Timing

  • Initial Review: Within 4 hours of PR creation
  • Follow-up: Within 2 hours of changes
  • Final Approval: After all checks pass

Escalation Path

  1. Disagreement on Approach: Consult team lead
  2. Architecture Concerns: Schedule design review
  3. Breaking Changes: Require additional approvals

Automation Support

Pre-Review Checks

# Run before requesting review
npm run pre-review
 
# This runs:
# - TypeScript check
# - Linting
# - Tests
# - Bundle size check
# - Documentation check

Review Assignment

Based on PR content and developer experience:

  • UI Changes: Assign UI expert
  • API Changes: Assign backend expert
  • Critical Path: Require 2 reviewers
  • Junior PR: Assign mentor + peer