# (no title)
URL: https://raw.githubusercontent.com/SpillwaveSolutions/pr-reviewer-skill/main/references/review_criteria.md

# Code Review Criteria

This document outlines the comprehensive criteria for conducting pull request code reviews. Use this as a checklist when reviewing PRs to ensure thorough, consistent, and constructive feedback.

## Review Process Overview

When reviewing a PR, the goal is to ensure changes are:
- **Correct**: Solves the intended problem without bugs
- **Maintainable**: Easy to understand and modify
- **Aligned**: Follows project standards and conventions
- **Secure**: Free from vulnerabilities
- **Tested**: Covered by appropriate tests

## 1. Functionality and Correctness

### Problem Resolution
- [ ] **Does the code solve the intended problem?**
 - Verify changes address the issue or feature described in the PR
 - Cross-reference with linked tickets (JIRA, GitHub issues)
 - Test manually or run the code if possible

### Bugs and Logic
- [ ] **Are there bugs or logical errors?**
 - Check for off-by-one errors
 - Verify null/undefined/None handling
 - Review assumptions about inputs and outputs
 - Look for race conditions or concurrency issues
 - Check loop termination conditions

### Edge Cases and Error Handling
- [ ] **Edge cases handled?**
 - Empty collections (arrays, lists, maps)
 - Null/None/undefined values
 - Boundary values (min/max integers, empty strings)
 - Invalid or malformed inputs

- [ ] **Error handling implemented?**
 - Network failures
 - File system errors
 - Database connection issues
 - API errors and timeouts
 - Graceful degradation

### Compatibility
- [ ] **Works across supported environments?**
 - Browser compatibility (if web app)
 - OS versions (if desktop/mobile)
 - Database versions
 - Language/runtime versions
 - Doesn't break existing features (regression check)

## 2. Readability and Maintainability

### Code Clarity
- [ ] **Easy to read and understand?**
 - Meaningful variable names (avoid `x`, `temp`, `data`)
 - Meaningful function names (verb-first, descriptive)
 - Short methods/functions (ideally < 50 lines)
 - Logical structure and flow
 - Minimal nested complexity

### Modularity
- [ ] **Single Responsibility Principle?**
 - Functions/methods do one thing well
 - Classes have a clear, focused purpose
 - No "god objects" or overly complex logic

- [ ] **Suggest refactoring if needed:**
 - Extract complex logic into helper functions
 - Break large functions into smaller ones
 - Separate concerns (UI, business logic, data access)

### Code Duplication
- [ ] **DRY (Don't Repeat Yourself)?**
 - Repeated code abstracted into helpers
 - Shared logic moved to libraries/utilities
 - Avoid copy-paste programming

### Future-Proofing
- [ ] **Allows for easy extensions?**
 - Avoid hard-coded values (use constants/configs)
 - Use dependency injection where appropriate
 - Follow SOLID principles
 - Consider extensibility without modification

## 3. Style and Conventions

### Style Guide Adherence
- [ ] **Follows project linter rules?**
 - ESLint (JavaScript/TypeScript)
 - Pylint/Flake8/Black (Python)
 - RuboCop (Ru