# Code review checklist documented

- **Pattern:** `ab-002164` (`code-quality-essentials.organization.code-review-checklist`)
- **Severity:** info
- **Lifecycle:** active
- **Last modified:** 2026-04-18
- **Canonical URL:** https://auditbuffet.com/patterns/ab-002164
- **License:** CC-BY-4.0 — attribute to AuditBuffet Pattern Catalog (https://auditbuffet.com/patterns/ab-002164)

## Why it matters

Without a PR template or documented code review checklist, review quality is entirely reviewer-dependent — type safety checks, test coverage verification, and breaking change documentation happen only when a reviewer happens to think of them. ISO 25010:2011 §6.5.3 classifies undocumented review processes as a maintainability defect. PR templates enforce a minimum bar on every PR: the author must explicitly confirm that tests pass, lint is clean, and breaking changes are documented — reducing the rate of issues that slip through to main.

## Severity rationale

Info because absent PR templates do not break functionality but allow preventable defects to ship through code review gaps that a checklist would have caught.

## Remediation

Add a pull request template at `.github/PULL_REQUEST_TEMPLATE.md`. It pre-populates every new PR description with the checklist, so authors must actively uncheck items rather than passively forgetting them.

```markdown
<!-- .github/PULL_REQUEST_TEMPLATE.md -->
## Summary
Brief description of the change and why it was made.

## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Refactor
- [ ] Documentation

## Checklist
- [ ] No new TypeScript errors (`npm run build` passes)
- [ ] Tests added or updated for changed logic
- [ ] `npm run lint` passes with no warnings
- [ ] No `console.log` or `@ts-ignore` added without comment
- [ ] Breaking changes documented in PR description
```

## Detection

- **ID:** `code-review-checklist`
- **Severity:** `info`
- **What to look for:** Check for `.github/PULL_REQUEST_TEMPLATE.md` or `.github/pull_request_template.md` — this file pre-populates the PR description with a checklist when a new pull request is created. Also check for `docs/CODE_REVIEW.md`, `CONTRIBUTING.md` (which may include a review section), or any documented review standards. A PR template typically includes: type safety checklist, test coverage confirmation, documentation update check, and deployment considerations. Without a template, code review quality depends entirely on the reviewer's discipline.
- **Pass criteria:** Enumerate all relevant code locations. A pull request template or documented code review checklist exists.
- **Fail criteria:** No PR template and no documented review standards.
- **Skip (N/A) when:** Solo project where pull requests are not used (single developer, direct commits to main). Still good practice, but genuinely not applicable.
- **Detail on fail:** `"No pull request template or code review checklist found in .github/ or docs/"`
- **Remediation:** Add a pull request template:

  ```markdown
  <!-- .github/PULL_REQUEST_TEMPLATE.md -->
  ## Summary
  Brief description of the change and why it was made.

  ## Type of Change
  - [ ] Bug fix
  - [ ] New feature
  - [ ] Refactor
  - [ ] Documentation

  ## Checklist
  - [ ] No new TypeScript errors (`npm run build` passes)
  - [ ] Tests added or updated for changed logic
  - [ ] `npm run lint` passes with no warnings
  - [ ] No `console.log` or `@ts-ignore` added without comment
  - [ ] Breaking changes documented in PR description
  ```

---

## External references

- iso-25010 maintainability.modifiability

Taxons: code-quality

HTML version: https://auditbuffet.com/patterns/ab-002164
