# Good Code Review > Review code against stable cards, from a diff up to an incident. Use when asked to review, audit, or check code. ## When to use this site Use this site when you are asked to review, audit, or check code: a diff or pull request, a file or function, a package, a service, a design document that spans services, a repository, a release, or an incident. Match the input to a level in the routing table, then check every stable card for that level and report each as `PASS`, `FAIL`, or `N/A` with evidence. To review only some concerns, such as performance, check only the cards that list them. Do not use it to write code or to run tests, and never turn a draft card into a verdict. ## Routing | Input | Entry point | |---|---| | diff / PR | change | | file / function | function | | package / path | module | | service | service | | cross-service design doc | system | | repo | codebase | | release / launch | production | | incident | incident | An incident review also checks the stable cards of the level where the cause lived: `change` for a bad release or migration, `function`, `module`, `service`, or `system` for code and design, and `production` for rollout, alerting, and capacity. Quote the incident text as evidence in place of `file:line`. Those `FAIL` and `PASS` lines are real verdicts, and any `block` `FAIL` still means request changes. ## Verdict format Report each check as `PASS`, `FAIL`, or `N/A` with `file:line` evidence. A `FAIL` carries the card's severity. Any `block` `FAIL` means request changes. A `should-fix` or `discuss` `FAIL` goes in the review but does not block. ``` FAIL [block] chg-expand-contract - src/a.py:42 - renames the column and drops the old one in one migration FAIL [should-fix] chg-one-concern - src/b.py:7 - a logging rewrite rides along with the bug fix PASS chg-breaking-change-taxonomy - src/c.py:15 - no signature or return shape changes N/A chg-perf-claim-evidence - the description makes no performance claim ``` Draft cards are never verdicts. For a system or codebase review, end with one note outside the ledger: name the decision you would most want written down and what its alternative costs. Cite file:line for the decision. Give no verdict and no severity for it. ## Scope by concern Each card lists its concerns in braces: `correctness`, `security`, `performance`, `reliability`, `compatibility`, `testing`, `maintainability`, `accessibility`, `usability`, `observability`, `process`. To review only some concerns, such as a performance-only review, check only the cards that list them. ## Severity - `block`: must be fixed before merge or release. - `should-fix`: fix it, but it need not block. - `discuss`: raise it and decide together. ## change - [Change review, full text](https://goodcodereview.com/change.md): every stable change card with its FAIL and PASS examples. - `chg-author-hygiene` [should-fix] {process}: Self-review the diff and write the description before requesting review. - `chg-breaking-change-taxonomy` [block] {compatibility}: Treat any observable difference in signature, return shape, error type, ordering, timing, defaults, or side effects as breaking until a consumer check says otherwise. - `chg-expand-contract` [block] {compatibility}: Evolve shared contracts in steps: add the new form beside the old (expand), migrate every consumer, then remove the old form (contract) in a later change. - `chg-match-codebase-pattern` [should-fix] {correctness, maintainability}: Follow the established pattern nearby. - `chg-one-concern` [should-fix] {process}: Make each change do one logical thing; if the description needs "and" between unrelated outcomes, split it. - `chg-perf-claim-evidence` [should-fix] {performance, testing}: Back a performance claim with measured before-and-after numbers. - `chg-refactor-has-behaviour-pin` [should-fix] {testing, maintainability}: Pin current behaviour with a characterization test, snapshot or equivalence check before the refactor moves any structure. - `chg-refactor-separate` [should-fix] {maintainability, process}: Put refactors, renames, and reformatting in their own commit or PR, apart from behaviour changes. - `chg-review-signal` [discuss] {process}: Do not comment on what a tool enforces or on taste with no written rule; spend comments on a few high-conviction findings, and if there are many, talk to the author. - `chg-size-ceiling` [discuss] {process}: Split a change past about 400 changed lines or about 20 files, or say in the description why not; aim for about 200. - `chg-tests-ship-with-change` [block] {testing}: Ship new or changed behaviour in the same change as a test that fails if the behaviour breaks; a code-only change needs a stated reason. - `chg-verify-before-claim` [block] {testing, process}: Back every "works" or "bug" claim with something run: a repro, a test or command output. ## function - [Function audit, full text](https://goodcodereview.com/function.md): every stable function card with its FAIL and PASS examples. - `fn-aria-role-has-state-and-keys` [should-fix] {accessibility}: When a native element cannot do the job, give the custom widget the state attribute and the keys its role promises. - `fn-colour-not-sole-cue` [should-fix] {accessibility, usability}: Pair every colour that carries meaning with a second cue: text, an icon, a shape, or an underline. - `fn-comments-explain-why` [should-fix] {maintainability}: Write comments that give a reason, a constraint, or a trade-off; rename before commenting, and never restate what the next line does. - `fn-confine-file-path` [block] {security}: Resolve the final path and check that it stays inside the intended base directory before using it. - `fn-csprng-for-secrets` [block] {security}: Draw every security-relevant random value from the platform CSPRNG. - `fn-destructive-confirm-or-undo` [should-fix] {usability}: Make a destructive action reversible with undo, or ask the user to confirm it before it runs. - `fn-dialog-focus-managed` [block] {accessibility, usability}: When a modal opens, move focus into it and keep Tab inside it. Make Escape close it. - `fn-error-says-what-and-how` [should-fix] {usability, accessibility}: Show each validation error next to its field, in plain words that name what is wrong and how to fix it. - `fn-fetch-only-needed-data` [should-fix] {performance}: Filter, count, and aggregate in the query, and select only the columns the code uses. - `fn-focus-indicator-visible` [block] {accessibility, usability}: Keep a visible focus indicator on every focusable element. Never set `outline: none` without a replacement. - `fn-form-control-has-label` [block] {accessibility, usability}: Tie every form control to a visible `