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-code-review3description: Gsd Code Review4---5
6# GSD — Code Review
7
8## Steps
9
10### Step 1: Identify Changed Files
11List all files changed since the branch diverged from main. Group by module/concern.
12
13### Step 2: Review Each File
14For 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?)
19
20### Step 3: Classify Findings
21- **CRITICAL**: Data loss, security breach, correctness failure — must fix before merge
22- **MAJOR**: Code quality, missing tests, maintainability — should fix
23- **MINOR**: Style, naming, nice-to-have — low priority
24
25### Step 4: Write REVIEW.md
26Write `.planning/REVIEW.md`:
27```
28# Code Review
29
30| File | Finding | Severity | Recommendation |
31|------|---------|----------|----------------|
32...
33
34## Gate: PASS / BLOCK
35```
36Gate is BLOCK if any CRITICAL findings. PASS if only MAJOR/MINOR.
37
38## Exit Condition
39REVIEW.md exists. If gate is BLOCK, exit with instruction to run 'fix review findings'.