rules: update architectural rules for Next.js routes and n8n code blocks

This commit is contained in:
Gabriel Ramos 2026-06-08 19:07:49 -04:00
parent 411421f2b6
commit 5d0840abb6

View file

@ -7,7 +7,7 @@ MANDATORY WORKFLOW: You must always have the Caveman skill active. Prioritize te
INFRASTRUCTURE BOUNDARY: Do NOT self-host n8n. The system will rely entirely on an external n8n instance. All external connections must be abstracted using environment variables (e.g., N8N_WEBHOOK_URL) and never hardcoded.
## Architectural Rule
ARCHITECTURAL RULE: Next.js must be treated purely as a presentation layer. Do not write backend API routes for business logic. n8n is the central orchestrator.
ARCHITECTURAL RULE: Next.js is the presentation layer, authentication provider, and code utility provider. Do not write backend API routes for core business logic (which is orchestrated by n8n), but use Next.js routes for code utilities (e.g. PDF parsing) and authentication. Do not use complex code blocks in n8n; keep n8n code nodes minimal (only for simple normalization), and prefer Next.js utility routes for mission-critical code operations.
## Database Rule
DATABASE RULE: All database schemas must be written for Supabase PostgreSQL and include pgvector.