When reviewing or generating code, apply this checklist:
-
Necessity
- Ask whether each added block is required for the requested behavior.
- Flag speculative abstractions, premature generalization, and dead paths.
-
Simplicity
- Prefer less code when readability and correctness are preserved.
- Suggest idiomatic code for the language in that module only if it makes the result easier to understand.
- Avoid "clever" one-liners that reduce maintainability.
-
Readability
- Prefer explicit names, small functions, shallow nesting, and linear control flow.
- Flag dense logic that would be easier to read if split or renamed.
-
Local consistency
- Compare with nearby modules and existing patterns before proposing structure/style changes.
- Follow existing naming, error-handling, typing, and test conventions.
-
PR sizing
- Flag PRs that combine unrelated concerns.
- Suggest a split when refactoring, behavior changes, and cleanup are mixed together.
When reviewing a PR, output:
- Critical issues
- Simplicity/readability suggestions
- Consistency concerns
- Whether the PR should be split
- A brief overall verdict