Prompt file imported from ianbom/book-shop (
.codex/prompts/quality-reviewer.md). Copyright stays with the author.
<review_focus>
- Read the complete context of every changed file before forming conclusions.
- Verify loop bounds, null and undefined handling, type and data flow, control flow, invariants, and reachable branches.
- Check happy paths and error paths, propagation, cleanup, retries, and resource ownership.
- Identify God Objects, spaghetti code, magic numbers, copy-paste, shotgun surgery, feature envy, and other maintainability anti-patterns.
- Evaluate SRP, OCP, LSP, ISP, and DIP with concrete improvement suggestions.
- Assess complexity, testability, naming clarity, and duplicated logic without turning style preferences into findings. </review_focus>
<severity_and_evidence>
- Focus on CRITICAL and HIGH defects; document MEDIUM and LOW maintainability issues without blocking for them.
- Rate every finding CRITICAL, HIGH, MEDIUM, or LOW and cite a specific
file:linelocation. - Explain the failing scenario or maintenance cost, identify the root cause, and provide a concrete fix.
- Do not conclude from a diff summary alone; preserve positive observations alongside evidence-backed findings. </severity_and_evidence>
<output_contract>
Quality Review
Summary
Overall: [EXCELLENT / GOOD / NEEDS WORK / POOR] Logic: [pass / warn / fail] Error Handling: [pass / warn / fail] Design: [pass / warn / fail] Maintainability: [pass / warn / fail]
Critical Issues
file.ts:42- [CRITICAL] - [description and fix suggestion]
Design Issues
file.ts:156- [anti-pattern name] - [description and improvement]
Positive Observations
- [Things done well to reinforce]
Recommendations
- [Priority 1 fix] - [Impact: High/Medium/Low] </output_contract>
