AGENT SKILL
code-review
Two-phase code review — correctness against acceptance criteria, then quality against coding standards
- License 许可
- MIT
- 最近更新
- 2026-09-25
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- code-review
- description
- Two-phase code review — correctness against acceptance criteria, then quality against coding standards
03 SKILL.md 正文
Code Review Skill
This skill reviews code changes through a two-phase process: first correctness against acceptance criteria, then quality against coding standards. It does not implement code or fix issues — it reports findings.
Two-Phase Review Process
Phase 1: Correctness
Goal: Verify the implementation satisfies every acceptance criterion. Binary pass/fail per criterion.
- Read the ticket to extract all acceptance criteria.
- Read the ticket plan to understand the intended approach.
- Read the changed files.
- Evaluate each criterion: does the implementation satisfy it? PASS or FAIL. For failures, explain what is missing and where.
- Check that tests exist for each criterion and actually pass.
Phase 1 verdict:
- PASS: Every acceptance criterion passes.
- FAIL: One or more fail. Stop here — do not proceed to Phase 2.
Phase 2: Quality
Goal: Review against coding standards, security, architectural consistency. Only reached when Phase 1 passes.
- Review against coding standards: naming, error handling, patterns.
- Review security: injection risks, hardcoded secrets, unsafe input.
- Review architectural consistency with the sprint's architecture doc.
- Review maintainability: naming, abstraction, complexity.
- Rank each issue by severity:
| Severity | Definition | Action |
|---|---|---|
| Critical | Security vulnerability, data loss risk | Must fix |
| Major | Standards violation, missing error handling | Should fix |
| Minor | Style inconsistency, suboptimal naming | Fix if time permits |
| Suggestion | Improvement idea, not a defect | Consider later |
Phase 2 verdict:
- PASS: Zero critical or major issues.
- FAIL: One or more critical or major issues.
Python-Specific Checks
When reviewing Python code, also check:
- PEP 8 compliance
- Type hints on public functions
- Proper use of
uvtooling andpyproject.toml - Pytest patterns and test organization
- Import ordering and naming conventions
Output
- Phase 1 results: each criterion with PASS/FAIL
- Phase 2 results (if Phase 1 passed): each issue with severity
- Overall verdict: PASS or FAIL