- Backend: FastAPI app with all models, services, schemas, routes - Admin Panel: Next.js dashboard with all modules (CRM, POS, repairs, warranties, billing, notifications, etc.) - Ecommerce: storefront (submodule) + product catalog - AI Agents: .agents/ skill library for Antigravity IDE - Docs: architecture, billing, notification gateway markdown - Submodules: Backend/OpenWA, Ecommerce/File 2/storefront
43 lines
1.3 KiB
Markdown
43 lines
1.3 KiB
Markdown
---
|
|
name: "Code Review"
|
|
description: "Alias to the canonical Graphify-first backend review workflow"
|
|
---
|
|
|
|
# Skill: Code Review
|
|
|
|
## 1. Purpose
|
|
Enforce strict checks on coding styles, performance, transaction rollbacks, and dependencies before merging backend code.
|
|
|
|
## 2. When to Use
|
|
Prior to creating pull requests or merging changes into main branch.
|
|
|
|
## 3. Preconditions
|
|
* Code must compile successfully with zero syntax errors.
|
|
* Graphify model of the codebase must be generated.
|
|
|
|
## 4. Step-by-Step Checklist
|
|
1. Run Git diffs to isolate modified files.
|
|
2. Audit SQL queries for N+1 performance loops.
|
|
3. Verify all DB mutations utilize atomic transactions with rollbacks on exceptions.
|
|
4. Check that endpoint routers authenticate via JWT tokens.
|
|
5. Run lint checkers to verify style conventions.
|
|
|
|
## 5. Validation Checklist
|
|
* Zero syntax, linting, or import warnings found.
|
|
* All modified routes use schema validators (Zod / Pydantic).
|
|
* Transaction scopes are restricted to write operations.
|
|
|
|
## 6. Examples
|
|
```python
|
|
# Good: Clean transaction scope with rollback
|
|
try:
|
|
db.add(new_order)
|
|
db.commit()
|
|
except Exception as e:
|
|
db.rollback()
|
|
raise e
|
|
```
|
|
|
|
## 7. Failure Cases
|
|
* Reviewing files in isolation without checking database schema constraints.
|
|
* Allowing API route mutations to execute without explicit user role authorization checks.
|