Code Review Criteria code-review-criteria
Code review criteria for correctness, clarity, architecture, security and performance. Loaded by the review-code subagent.
Works in Claude, ChatGPT, Codex and more
- Our test
- 8/10✓ Verified
- tested Dec 6, 2026
- GitHub stars
- 63k
- penpot/penpot
- Added by
- 0
- members
- Updated
- Dec 6
- commit a290dbc
- Content
- 1 file
- no scripts · 6 KB
- License
- MPL 2.0
- free to use
What our test found
The skill provides practical, risk-based review guidance, especially for mixed-version compatibility, evidence limits, and actionable findings.
Request we tested it on“Review this backend change for merge readiness. Before: `GET /api/orders` accepted requests without a `status` parameter. After: the handler requires `status` and returns HTTP 400 when it is missing. The frontend is deployed separately, and no tests or CI results are included.”
Limits spotted
- Some project-specific guidance is referenced by name, so reviewers need access to those memories and procedures for full application.
name: code-review-criteria description: Code review criteria for correctness, clarity, architecture, security and performance. Loaded by the review-code subagent.
Code Review Criteria
- Assess whether the change improves the codebase and is safe to merge; review the diff in context, its intent and relevant tests.
- Follow project conventions and module memories. Apply each axis in proportion to the change and its risks; do not block on personal preferences or invent problems.
- Follow
review-codefor delegation, read-only rules and the exception for a focused check in a temporary worktree. - Inspect prior test results or CI evidence when available; identify its source and scope. If evidence is missing, stale or inaccessible, say what is unverified. Never claim a suite passed without evidence.
Review axes
Correctness and tests
- Check requirements, relevant boundaries, error paths, concurrency and state.
- Use module contracts to decide where validation belongs; do not demand redundant guards inside functions with established preconditions.
- Verify that tests cover new behavior and important failure cases at the appropriate layer, following project testing guidance. Missing required tests are findings; documentation-only changes need not add tests.
- Do not infer that a test failed before a fix without evidence.
Readability and simplicity
- Check names, control flow and maintainability against existing conventions.
- Flag duplication only when it creates a concrete risk of drift or maintenance cost.
- Prefer self-contained, readable tests even when they repeat setup. Suggest the simplest remedy that preserves behavior.
Architecture and compatibility
- Check module boundaries, existing abstractions, contracts and unnecessary complexity; review surrounding code when needed. Read the relevant guidance for Clojure, logging and translations.
- Check a compatibility shim's purpose before labeling it dead code.
- For file format or data model changes, consult the relevant compatibility, migration and feature memories.
- When a backend endpoint adds a required request parameter or changes any existing request parameter, verify that the new backend still handles requests from older frontend tabs correctly. During a rolling deploy, those tabs can run the old frontend until users refresh.
- Flag backend changes that break those requests and recommend a compatible transition, such as accepting the old request shape or providing a safe default. If compatibility is not feasible, require an explicit decision to accept the breakage and its impact.
Breaking changes and mixed-version deployments
- Assess compatibility in proportion to the change. During a rolling release, old and new processes can run against the same database: check whether new backend migrations, writes or background work break the old processes while they are still running. Consider rollback separately where relevant.
- For feature flags and persisted file changes, read
mem:common/feature-flags. Check whether an older version can open and use files created or modified by the new version, including when a feature is classified as no-migration. - Inspect actual readers, writers, migrations and feature negotiation; a flag's name or category alone does not prove compatibility. Consider activation, existing and new teams and files, and disabling the feature when relevant.
- Report a demonstrated breaking change even when it is intentional or no good compatible alternative is known, so the decision is explicit. State the versions and conditions, affected data and users, impact, evidence and possible remedies or tradeoffs, including conscious acceptance when relevant.
- Distinguish confirmed incompatibility from an unverified risk; state evidence limits rather than presenting speculation as a finding. Set severity and verdict from impact and project requirements, not from the presence of a flag alone.
- Where appropriate, point to
operations/for manual upgrade procedures andmem:workflow/updating-changelogfor the existing release-note process; do not assume every mixed-version incompatibility requires either.
Security
- Check relevant input boundaries, authorization, secrets, data handling and external integrations.
- Consult project security guidance for the affected technology; do not assume a generic framework or tool applies to the module.
Performance
- Assess relevant hot paths, resource bounds, data access and scaling.
- Explain the workload or conditions in which a problem matters; do not flag speculative optimizations without a concrete risk.
Scope and dependencies
- Review generated files or lockfile changes when they affect the contract, dependencies or security; do not skip a lockfile-only dependency change.
- Check dependency changes against available changelogs, project tools and relevant lockfile diffs.
- Treat size as a signal to assess reviewability, not an automatic finding.
- Identify unrelated work in the target diff when it materially impedes review; do not review unrelated working-tree changes.
Findings and verdict
- Assign each finding a stable ID (
F1,F2, …), independent of severity. Never renumber it within the review or follow-up; severity may change with evidence. Give new findings unused IDs. - For each finding state severity, file and location, concrete circumstances, impact, remedy and tests needed to verify it; explain when no new test is needed.
- If a consequential decision requires user input, give the real options, consequences and recommendation within that finding, without pausing to ask.
- Critical: security incident, data loss or comparably severe breakage; blocks merge.
- High: a significant defect or missing required test; must be addressed.
- Medium: a substantive issue worth fixing but not a merge blocker.
- Low / Suggestion: an optional improvement with a concrete benefit.
- Base severity on impact and project requirements. Missing tests required for new functionality must be addressed; do not invent a test requirement where none applies.
- Return a short summary, findings ordered by impact and a verdict with relevant IDs: Approve, Approve with minor changes, or Request changes.
- State verification evidence and limitations. Do not duplicate remedies or tests in separate sections. If no findings exist, say so.
- In follow-up, retain original IDs and report resolved, pending and not-addressed findings as
review-coderequires.