diff --git a/.agents/rules/architecture.md b/.agents/rules/architecture.md index 2b82761..b7840b8 100644 --- a/.agents/rules/architecture.md +++ b/.agents/rules/architecture.md @@ -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.