Code Review
Reviews staged/recent changes in TenantFlow for security, correctness, and quality.
Workflow
- Identify what changed —
git diff --statto see scope - Security pass — check for: tenant data leaks (missing tenantId filters), exposed secrets, auth bypass, IDOR, Stripe webhook signature skipping
- Correctness pass — does the logic match the intent? edge cases handled? subscription tier gates enforced?
- Quality pass — readability, test coverage, adherence to CLAUDE.md conventions
- Report — categorize findings as: 🔴 Must fix, 🟡 Should fix, 🟢 Suggestion
- Summary — overall assessment: ready to merge / needs work
Project specifics
- High-risk areas: tenant isolation in every DB query, Stripe webhook signature verification, Clerk organization scoping, invoice state transitions
- Conventions: shadcn/ui over custom components, tenantId on all queries, no direct DB modifications outside Prisma