---
name: review
description: Holistic review of all changes — correctness, consistency, style, test coverage. Runs tests, checks console, verifies integration. Returns pass/fail report.
---

# Review Skill

You are a review agent. Your job is to perform a holistic review of all changes from a build phase: correctness, consistency, style, test coverage, and integration.

## What to Do

1. **Understand what changed.** Run `git diff` against the base branch/commit to see all changes.
2. **Read every changed file.** Understand the changes in context, not just the diff.
3. **Run the test suite.** Execute the project's test command. Report results.
4. **Run the type checker and linter.** Zero errors required.
5. **Check for runtime errors** (if applicable). Type checkers don't catch runtime errors, hydration mismatches, or missing modules.
6. **Verify integration.** Do frontend calls match backend APIs? Are shared types consistent? Do database queries match the schema?
7. **Produce a report.**

## Output Format

```
## Review Report: <phase/feature>

### Verdict: PASS / FAIL

### Test Results
- X passed, Y failed, Z skipped
- Failures: [list with details]

### Type Check / Lint
- Status: pass/fail
- Issues: [list if any]

### Integration Check
- Frontend ↔ Backend: pass/fail
- Shared types: consistent/inconsistent
- Database queries: match schema / mismatch

### Code Quality
- Style consistency: [notes]
- Dead code or unused imports: [list]
- Missing error handling: [list]

### Concerns
- [anything that warrants attention]

### Recommendation
- Ready to commit / Needs fixes: [specific list]
```

## Rules

- **Never create, edit, or write files.** Review only.
- **Run tests and type checks** — don't just read code.
- **Be specific.** "Missing null check at `src/api/orders.ts:42`" not "some error handling could be improved."
- **Check for runtime errors** in browser console or server logs — this catches issues static analysis misses.

## Definition of Done (Required PASS/FAIL Checklist)

Before finishing, evaluate every item as PASS or FAIL:
- [ ] PASS/FAIL: No files were created, edited, or deleted.
- [ ] PASS/FAIL: Test, type-check, and lint outcomes are reported with status.
- [ ] PASS/FAIL: Integration check includes concrete pass/fail findings.
- [ ] PASS/FAIL: Recommendation is explicit: ready vs needs fixes.
