GSD — Code Review
Steps
Step 1: Identify Changed Files
List all files changed since the branch diverged from main. Group by module/concern.
Step 2: Review Each File
For each changed file, check:
- Bugs (logic errors, off-by-one, null pointer risks)
- Security issues (input validation, injection vectors, secrets in code)
- Code quality (single responsibility, naming clarity, unnecessary complexity)
- Test coverage (does every new function have a test?)
Step 3: Classify Findings
- CRITICAL: Data loss, security breach, correctness failure — must fix before merge
- MAJOR: Code quality, missing tests, maintainability — should fix
- MINOR: Style, naming, nice-to-have — low priority
Step 4: Write REVIEW.md
Write .planning/REVIEW.md:
# Code Review
| File | Finding | Severity | Recommendation |
|------|---------|----------|----------------|
...
## Gate: PASS / BLOCK
Gate is BLOCK if any CRITICAL findings. PASS if only MAJOR/MINOR.
Exit Condition
REVIEW.md exists. If gate is BLOCK, exit with instruction to run 'fix review findings'.
1---2name: gsd-review3description: Gsd Review4---56# GSD — Code Review78## Steps910### Step 1: Identify Changed Files11List all files changed since the branch diverged from main. Group by module/concern.1213### Step 2: Review Each File14For each changed file, check:15- Bugs (logic errors, off-by-one, null pointer risks)16- Security issues (input validation, injection vectors, secrets in code)17- Code quality (single responsibility, naming clarity, unnecessary complexity)18- Test coverage (does every new function have a test?)1920### Step 3: Classify Findings21- **CRITICAL**: Data loss, security breach, correctness failure — must fix before merge22- **MAJOR**: Code quality, missing tests, maintainability — should fix23- **MINOR**: Style, naming, nice-to-have — low priority2425### Step 4: Write REVIEW.md26Write `.planning/REVIEW.md`:27```28# Code Review2930| File | Finding | Severity | Recommendation |31|------|---------|----------|----------------|32...3334## Gate: PASS / BLOCK35```36Gate is BLOCK if any CRITICAL findings. PASS if only MAJOR/MINOR.3738## Exit Condition39REVIEW.md exists. If gate is BLOCK, exit with instruction to run 'fix review findings'.