production-code-review
Production Code Review
Review only concrete production-impact issues. Ignore preferences, cosmetic style, speculation, broad architecture advice, and generic "add tests" feedback unless tied to a specific risky behavior.
Scope
- No target given: review the working tree if it has changes; otherwise review the current branch against its base.
- Working tree (
changes,all changes,diff):git status --short,git diff,git diff --cached, and read untracked (??) files in full. - Branch or PR:
git diff <base>...HEAD, where base is the repo default branch (e.g.origin/main), orgh pr diff <number>. Ask if the base is unclear. all source code: inspect source tree, entry points, high-risk paths, and enough callers/callees to support findings.- Explicit paths/snippets: stay within them unless related code is needed to prove impact.
- Skip generated, vendored, lock, and build-output files unless directly changed or needed to prove impact.
For diff reviews, report issues the change introduces, worsens, or makes newly reachable. Report pre-existing issues only when 🔴 High, and append (มีอยู่เดิม) to the title.
Use read-only git only: never checkout, switch, stash, reset, or pull to obtain a diff. Do not edit code, write tests, stage, commit, start servers, or run browser tests unless asked.
Run the project's existing typecheck/lint when it is fast and side-effect free. Do not run long test suites, install dependencies, or commands that touch databases, networks, or migrations unless asked.