| name | piv-review-changes |
| description | Performs a technical code review of recently changed files for bugs, security issues, and standards compliance, then writes a report. Use before committing, as a pre-commit quality gate. |
Code Review
Perform technical code review on recently changed files.
Core Principles
Review Philosophy:
- Simplicity is the ultimate sophistication - every line should justify its existence
- Code is read far more often than it's written - optimize for readability
- The best code is often the code you don't write
- Elegance emerges from clarity of intent and economy of expression
What to Review
Start by gathering codebase context to understand the codebase standards and patterns.
Start by examining:
- CLAUDE.md
- README.md
- Key files in the core module
- Documented standards in the docs directory (and any
.claude/references/ docs)
After you have a good understanding, run these commands:
git status
git diff HEAD
git diff --stat HEAD
Then check the list of new files:
git ls-files --others --exclude-standard
Read each new file in its entirety. Read each changed file in its entirety (not just the diff) to understand full context.
For each changed file or new file, analyze for:
-
Logic Errors
- Off-by-one errors
- Incorrect conditionals
- Missing error handling
- Race conditions
-
Security Issues
- SQL injection vulnerabilities
- XSS vulnerabilities
- Insecure data handling