chati-dev 4.0.0 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/framework/agents/build/dev.md +23 -3
  2. package/framework/agents/plan/ux.md +395 -9
  3. package/framework/config.yaml +3 -3
  4. package/framework/constitution.md +10 -3
  5. package/framework/data/entity-registry.yaml +43 -3
  6. package/framework/domains/agents/architect.yaml +1 -3
  7. package/framework/domains/agents/brief.yaml +1 -1
  8. package/framework/domains/agents/brownfield-wu.yaml +2 -2
  9. package/framework/domains/agents/detail.yaml +1 -1
  10. package/framework/domains/agents/devops.yaml +2 -4
  11. package/framework/domains/agents/greenfield-wu.yaml +2 -2
  12. package/framework/domains/agents/phases.yaml +1 -1
  13. package/framework/domains/agents/qa-implementation.yaml +4 -6
  14. package/framework/domains/agents/qa-planning.yaml +7 -10
  15. package/framework/domains/agents/tasks.yaml +1 -1
  16. package/framework/domains/agents/ux.yaml +21 -3
  17. package/framework/domains/constitution.yaml +5 -5
  18. package/framework/domains/global.yaml +8 -4
  19. package/framework/domains/workflows/standard-flow.yaml +33 -0
  20. package/framework/i18n/en.yaml +11 -2
  21. package/framework/i18n/es.yaml +11 -2
  22. package/framework/i18n/fr.yaml +11 -2
  23. package/framework/i18n/pt.yaml +11 -2
  24. package/framework/intelligence/context-engine.md +1 -1
  25. package/framework/presets/nextjs.yaml +41 -0
  26. package/framework/presets/node-express.yaml +39 -0
  27. package/framework/presets/react-vite.yaml +37 -0
  28. package/framework/presets/supabase-fullstack.yaml +37 -0
  29. package/framework/templates/brandbook-tmpl.yaml +153 -0
  30. package/framework/templates/component-spec-tmpl.yaml +121 -0
  31. package/framework/templates/design-token-tmpl.yaml +55 -0
  32. package/framework/templates/icon-system-tmpl.yaml +95 -0
  33. package/package.json +1 -1
  34. package/scripts/bundle-framework.js +1 -1
  35. package/src/api/index.js +10 -19
  36. package/src/autonomy/build-loop.js +1 -1
  37. package/src/autonomy/cause-analyzer.js +1 -1
  38. package/src/autonomy/worktree-manager.js +7 -2
  39. package/src/config/agent-customizer.js +1 -5
  40. package/src/config/context-file-generator.js +1 -1
  41. package/src/context/bracket-tracker.js +2 -13
  42. package/src/decision/engine.js +4 -0
  43. package/src/health/auto-fix.js +1 -1
  44. package/src/installer/core.js +8 -1
  45. package/src/intelligence/context-status.js +2 -17
  46. package/src/intelligence/decision-engine.js +8 -5
  47. package/src/intelligence/timeline.js +1 -1
  48. package/src/merger/semantic-merger.js +1 -1
  49. package/src/orchestrator/pipeline-manager.js +33 -46
  50. package/src/quality/metrics-collector.js +0 -2
  51. package/src/telemetry/config.js +2 -2
  52. package/src/telemetry/schema.js +1 -1
  53. package/src/terminal/isolation.js +10 -1
  54. package/src/terminal/prompt-builder.js +77 -9
  55. package/src/utils/brackets.js +29 -0
  56. package/src/utils/event-bus.js +1 -1
  57. package/src/utils/provider-limits.js +13 -0
@@ -23,7 +23,7 @@ authority:
23
23
  redirectMessage: "Requirements are incomplete or ambiguous. Redirecting to brief agent for requirement extraction."
24
24
 
25
25
  outputs:
26
- - prd.yaml
26
+ - prd.md
27
27
 
28
28
  rules:
29
29
  - id: dt-01
@@ -21,13 +21,11 @@ authority:
21
21
  redirectMessage: "DevOps handles deployment. Dev agent handles code changes."
22
22
 
23
23
  outputs:
24
- - ci-config.yaml
25
- - deploy-config.yaml
26
- - release-notes.md
24
+ - deploy-report.md
27
25
 
28
26
  rules:
29
27
  - id: ops-qa-first
30
- text: "Never deploy without QA Implementation approval (PASS or WAIVED verdict)."
28
+ text: "Never deploy without QA Implementation approval (APPROVED verdict)."
31
29
  priority: critical
32
30
 
33
31
  - id: ops-rollback
@@ -23,7 +23,7 @@ authority:
23
23
  redirectMessage: "This appears to be an existing project with code. Redirecting to brownfield-wu for deep discovery analysis."
24
24
 
25
25
  outputs:
26
- - wu-report.yaml
26
+ - wu-operational-report.md
27
27
 
28
28
  rules:
29
29
  - id: gf-01
@@ -43,5 +43,5 @@ rules:
43
43
  priority: critical
44
44
 
45
45
  - id: gf-05
46
- text: "MUST include scaffolding recommendations in wu-report.yaml based on detected tech stack"
46
+ text: "MUST include scaffolding recommendations in wu-operational-report.md based on detected tech stack"
47
47
  priority: normal
@@ -23,7 +23,7 @@ authority:
23
23
  redirectMessage: "Phase breakdown is complete. Redirecting to tasks agent for task decomposition."
24
24
 
25
25
  outputs:
26
- - phases.yaml
26
+ - phases.md
27
27
 
28
28
  rules:
29
29
  - id: ph-01
@@ -21,13 +21,11 @@ authority:
21
21
  redirectMessage: "QA Implementation executes tests. Dev agent fixes issues found."
22
22
 
23
23
  outputs:
24
- - qa-report.yaml
25
- - test-results.yaml
26
- - sast-report.yaml
24
+ - qa-implementation-report.md
27
25
 
28
26
  rules:
29
27
  - id: qai-verdict
30
- text: "Verdict must be one of: PASS, CONCERNS, FAIL, or WAIVED."
28
+ text: "Verdict must be one of: APPROVED, NEEDS_REVISION, or BLOCKED."
31
29
  priority: critical
32
30
 
33
31
  - id: qai-sast
@@ -35,7 +33,7 @@ rules:
35
33
  priority: critical
36
34
 
37
35
  - id: qai-regression
38
- text: "All existing tests must pass (no regressions) before PASS verdict."
36
+ text: "All existing tests must pass (no regressions) before APPROVED verdict."
39
37
  priority: high
40
38
 
41
39
  - id: qai-backward
@@ -44,7 +42,7 @@ rules:
44
42
 
45
43
  - id: qai-adversarial
46
44
  text: >
47
- ADVERSARIAL REVIEW: Every QA pass MUST identify minimum 3 findings
45
+ ADVERSARIAL REVIEW: Every QA pass MUST identify minimum 5 findings
48
46
  (improvements, warnings, or suggestions). Zero findings is suspiciously
49
47
  clean — trigger mandatory re-review with deeper analysis. This prevents
50
48
  rubber-stamping. Findings can be any severity (low/info counts).
@@ -1,13 +1,13 @@
1
1
  # QA Planning Agent Domain — Authority boundaries and behavioral rules for PRISM L2
2
2
 
3
- mission: "Define test strategy, quality gates, coverage plans, and risk matrices for the project."
3
+ mission: "Validate traceability, consistency, and completeness across all PLAN artifacts (Brief -> PRD -> Phases -> Tasks -> Criteria)."
4
4
 
5
5
  authority:
6
6
  exclusive:
7
- - test_strategy_definition
8
- - qa_gate_definition
9
- - coverage_planning
10
- - risk_matrix_creation
7
+ - traceability_validation
8
+ - plan_consistency_check
9
+ - criteria_quality_review
10
+ - adversarial_planning_review
11
11
  allowed:
12
12
  - read_any_file
13
13
  - read_architecture_docs
@@ -21,10 +21,7 @@ authority:
21
21
  redirectMessage: "QA Planning defines the strategy. QA Implementation executes it."
22
22
 
23
23
  outputs:
24
- - qa-plan.yaml
25
- - test-strategy.yaml
26
- - coverage-plan.yaml
27
- - risk-matrix.yaml
24
+ - qa-planning-report.md
28
25
 
29
26
  rules:
30
27
  - id: qap-score
@@ -45,7 +42,7 @@ rules:
45
42
 
46
43
  - id: qap-adversarial
47
44
  text: >
48
- ADVERSARIAL REVIEW: Every planning validation MUST identify minimum 3
45
+ ADVERSARIAL REVIEW: Every planning validation MUST identify minimum 5
49
46
  findings (gaps, improvements, or suggestions). Zero findings is
50
47
  suspiciously clean — re-analyze with deeper scrutiny across all
51
48
  traceability chains. Findings can be any severity.
@@ -24,7 +24,7 @@ authority:
24
24
  redirectMessage: "Task decomposition is complete. Redirecting to dev agent for implementation."
25
25
 
26
26
  outputs:
27
- - tasks/*.yaml
27
+ - tasks.md
28
28
 
29
29
  rules:
30
30
  - id: tk-01
@@ -24,9 +24,7 @@ authority:
24
24
  redirectMessage: "UX design is complete. Redirecting to dev agent for implementation."
25
25
 
26
26
  outputs:
27
- - ux-spec.yaml
28
- - component-map.yaml
29
- - wireframes.yaml
27
+ - ux-specification.md
30
28
 
31
29
  rules:
32
30
  - id: ux-01
@@ -48,3 +46,23 @@ rules:
48
46
  - id: ux-05
49
47
  text: "MUST NOT design backend logic or data flows; focus on user-facing experience only"
50
48
  priority: critical
49
+
50
+ - id: ux-06
51
+ text: "MUST NOT produce centered single-column layouts as default; minimum 2 distinct layout structures per page"
52
+ priority: high
53
+
54
+ - id: ux-07
55
+ text: "MUST specify all interactive states (default, hover, active, focus, disabled) and all data view states (populated, empty, loading, error, skeleton) for every component"
56
+ priority: critical
57
+
58
+ - id: ux-08
59
+ text: "MUST NOT use placeholder content (lorem ipsum, John Doe, example.com); all sample data must be domain-realistic"
60
+ priority: high
61
+
62
+ - id: ux-09
63
+ text: "MUST define Motion System: specify animation library by stack, include animation token layer (duration + easing), and catalogue mandatory micro-interactions and scroll animations with reduced-motion alternatives (Directive 6)"
64
+ priority: critical
65
+
66
+ - id: ux-10
67
+ text: "MUST perform component discovery via 21st.dev for all Molecules and Organisms before designing custom components; document source or rationale for each (Directive 7)"
68
+ priority: high
@@ -2,7 +2,7 @@
2
2
  # Source: chati.dev/constitution.md (19 Articles + Preamble)
3
3
 
4
4
  summary: >
5
- Constitution governance: self-validation required (loop until quality >= 95%),
5
+ Constitution governance: self-validation required (loop until tier-specific threshold met),
6
6
  guided options (1,2,3 format), persistent session state, two-layer handoff,
7
7
  language protocol (interaction=user lang, artifacts=English),
8
8
  deviation protocol, mode governance (planning/build/deploy),
@@ -17,7 +17,7 @@ rules:
17
17
  priority: critical
18
18
 
19
19
  - id: art-ii
20
- text: "Quality >= 95% self-validation required. Loop until threshold met."
20
+ text: "Quality self-validation required. Tiered thresholds: QA >= 95%, standard >= 90%, discovery >= 85%. Loop until met."
21
21
  priority: critical
22
22
 
23
23
  - id: art-iii
@@ -29,7 +29,7 @@ rules:
29
29
  priority: critical
30
30
 
31
31
  - id: art-v
32
- text: "Communication follows structured protocol: guided options (1,2,3), clear formatting."
32
+ text: "Communication follows structured protocol: guided options (1,2,3), clear formatting. No em dashes or AI-detectable writing patterns."
33
33
  priority: normal
34
34
 
35
35
  - id: art-vi
@@ -77,7 +77,7 @@ rules:
77
77
  priority: high
78
78
 
79
79
  - id: art-xvii
80
- text: "Execution mode governance: autonomous requires gate >= 90%. Safety net with circuit breaker (3 failures)."
80
+ text: "Execution mode governance: QA gates >= 95%, other agents >= 90%. Safety net with circuit breaker (3 failures)."
81
81
  priority: critical
82
82
 
83
83
  articles:
@@ -89,7 +89,7 @@ articles:
89
89
  priority: critical
90
90
  - profile-guided: "In guided profile, agents propose actions and wait for user confirmation before writes."
91
91
  priority: high
92
- - profile-autonomous: "In autonomous profile, agents execute without confirmation when gate scores >= 90%."
92
+ - profile-autonomous: "In autonomous profile, agents execute without confirmation when gate scores >= 95%."
93
93
  priority: critical
94
94
  - profile-always-confirm: "Destructive operations, deployments, deviations, and backward transitions always require confirmation regardless of profile."
95
95
  priority: critical
@@ -18,13 +18,17 @@ rules:
18
18
  text: "Interact with user in their preferred language. Artifacts stay in English."
19
19
  priority: normal
20
20
 
21
+ - id: anti-dash
22
+ text: "Never use em dashes in generated content. Avoid AI-detectable writing patterns (formulaic transitions, over-hedging, stacking connectors)."
23
+ priority: high
24
+
21
25
  # Execution Profile Rules (v3.0.0)
22
26
  execution-profiles:
23
27
  - explore-readonly: "In explore profile, all write/edit tool calls are blocked."
24
28
  priority: critical
25
29
  - guided-confirmation: "In guided profile, significant writes require user confirmation."
26
30
  priority: high
27
- - autonomous-gate-check: "Autonomous profile requires cumulative gate scores >= 90%."
31
+ - autonomous-gate-check: "Autonomous profile requires cumulative gate scores >= 95%."
28
32
  priority: critical
29
33
  - profile-downgrade: "If quality drops below threshold during autonomous execution, auto-downgrade to guided."
30
34
  priority: critical
@@ -75,10 +79,10 @@ modes:
75
79
 
76
80
  brackets:
77
81
  FRESH:
78
- behavior: "Full context injection. All layers active. Include detailed rules and examples."
82
+ behavior: "Moderate context injection. All layers active but model is warming up. Budget lower than MODERATE."
79
83
  MODERATE:
80
- behavior: "Standard injection. Skip task detail layer (L4). Summarize long rules."
84
+ behavior: "Peak context injection. Maximum token budget. Model has context and needs maximum reinforcement."
81
85
  DEPLETED:
82
- behavior: "Minimal injection. Only L0+L1+L2. Use rule IDs instead of full text."
86
+ behavior: "Reduced injection. Only L0+L1+L2. Use rule IDs instead of full text."
83
87
  CRITICAL:
84
88
  behavior: "Emergency. L0+L1 only. Trigger handoff advisory. Preserve essential state."
@@ -0,0 +1,33 @@
1
+ # Standard Flow Workflow Domain — PRISM L3
2
+ # Balanced pipeline for moderate tasks (features, integrations, brownfield enhancements)
3
+ # Uses 8 agents — between Quick Flow (4) and Full Flow (12)
4
+
5
+ steps:
6
+ - brief
7
+ - detail
8
+ - architect
9
+ - tasks
10
+ - qa-planning
11
+ - dev
12
+ - qa-implementation
13
+ - devops
14
+
15
+ rules:
16
+ - id: sf-scope
17
+ text: "Standard Flow targets 2-5 requirements. Escalate to full pipeline if scope exceeds this range."
18
+ priority: critical
19
+ - id: sf-quality
20
+ text: "Both QA gates (planning and implementation) are mandatory. Score >= 95% required at each gate."
21
+ priority: critical
22
+ - id: sf-no-ux-skip
23
+ text: "UX agent is excluded. If design-heavy requirements surface, escalate to full pipeline."
24
+ priority: high
25
+ - id: sf-no-phases
26
+ text: "Phases agent is excluded. Tasks agent handles scope decomposition directly from PRD + Architecture."
27
+ priority: high
28
+ - id: sf-escalation-up
29
+ text: "If architect discovers multi-service complexity or QA finds UX gaps, offer escalation to full pipeline."
30
+ priority: high
31
+ - id: sf-escalation-down
32
+ text: "If detail finds only 1 simple requirement and architect confirms no changes needed, suggest quick flow."
33
+ priority: medium
@@ -29,8 +29,8 @@ installer:
29
29
  created_overlays: "Created provider overlay directories"
30
30
  will_install: "Will install:"
31
31
  agents_count: "13 agent definitions (DISCOVER, PLAN, BUILD, DEPLOY phases)"
32
- workflows_count: "6 workflow blueprints"
33
- templates_count: "6 templates (PRD, Brownfield PRD, Architecture, Task, QA Gate, Quick Brief)"
32
+ workflows_count: "7 workflow blueprints"
33
+ templates_count: "10 templates (PRD, Brownfield PRD, Architecture, Task, QA Gate, Quick Brief, Brandbook, Design Tokens, Component Spec, Icon System)"
34
34
  constitution: "Constitution (19 Articles + Preamble)"
35
35
  session_mgmt: "Session management system"
36
36
  quality_gates: "Quality gates (3-tier verdicts)"
@@ -85,6 +85,15 @@ status:
85
85
  backlog_items: "Backlog Items"
86
86
  high_priority: "high priority"
87
87
 
88
+ features:
89
+ brandbook_step: "Phase 0: Establishing brand identity (Brandbook)"
90
+ tech_preset_loaded: "Tech preset loaded: {preset}"
91
+ tech_preset_detected: "Detected tech stack: {stack}"
92
+ doctor_running: "Running Doctor diagnostics..."
93
+ doctor_healthy: "Doctor: All checks passed"
94
+ doctor_degraded: "Doctor: Issues found (see report)"
95
+ doctor_fix_applied: "Doctor: Applied {count} auto-fix(es)"
96
+
88
97
  errors:
89
98
  session_corrupted: "Session file appears corrupted. Attempting recovery..."
90
99
  handoff_missing: "Handoff not found. Using session.yaml + CLAUDE.md as fallback."
@@ -29,8 +29,8 @@ installer:
29
29
  created_overlays: "Creados directorios de overlay de proveedores"
30
30
  will_install: "Se instalara:"
31
31
  agents_count: "13 definiciones de agentes (fases DISCOVER, PLAN, BUILD, DEPLOY)"
32
- workflows_count: "6 blueprints de workflow"
33
- templates_count: "6 templates (PRD, PRD Brownfield, Arquitectura, Task, QA Gate, Quick Brief)"
32
+ workflows_count: "7 blueprints de workflow"
33
+ templates_count: "10 templates (PRD, PRD Brownfield, Arquitectura, Task, QA Gate, Quick Brief, Brandbook, Design Tokens, Component Spec, Icon System)"
34
34
  constitution: "Constitucion (19 Articulos + Preambulo)"
35
35
  session_mgmt: "Sistema de gestion de sesion"
36
36
  quality_gates: "Quality gates (veredictos en 3 niveles)"
@@ -85,6 +85,15 @@ status:
85
85
  backlog_items: "Items del Backlog"
86
86
  high_priority: "alta prioridad"
87
87
 
88
+ features:
89
+ brandbook_step: "Fase 0: Estableciendo identidad de marca (Brandbook)"
90
+ tech_preset_loaded: "Tech preset cargado: {preset}"
91
+ tech_preset_detected: "Stack tecnologico detectado: {stack}"
92
+ doctor_running: "Ejecutando diagnosticos del Doctor..."
93
+ doctor_healthy: "Doctor: Todos los checks pasaron"
94
+ doctor_degraded: "Doctor: Problemas encontrados (ver reporte)"
95
+ doctor_fix_applied: "Doctor: Aplicado(s) {count} auto-fix(es)"
96
+
88
97
  errors:
89
98
  session_corrupted: "Archivo de sesion parece corrupto. Intentando recuperacion..."
90
99
  handoff_missing: "Handoff no encontrado. Usando session.yaml + CLAUDE.md como respaldo."
@@ -29,8 +29,8 @@ installer:
29
29
  created_overlays: "Crees les repertoires d'overlay des fournisseurs"
30
30
  will_install: "Sera installe:"
31
31
  agents_count: "13 definitions d'agents (phases DISCOVER, PLAN, BUILD, DEPLOY)"
32
- workflows_count: "6 blueprints de workflow"
33
- templates_count: "6 templates (PRD, PRD Brownfield, Architecture, Task, QA Gate, Quick Brief)"
32
+ workflows_count: "7 blueprints de workflow"
33
+ templates_count: "10 templates (PRD, PRD Brownfield, Architecture, Task, QA Gate, Quick Brief, Brandbook, Design Tokens, Component Spec, Icon System)"
34
34
  constitution: "Constitution (19 Articles + Preambule)"
35
35
  session_mgmt: "Systeme de gestion de session"
36
36
  quality_gates: "Quality gates (verdicts en 3 niveaux)"
@@ -85,6 +85,15 @@ status:
85
85
  backlog_items: "Elements du Backlog"
86
86
  high_priority: "haute priorite"
87
87
 
88
+ features:
89
+ brandbook_step: "Phase 0: Etablissement de l'identite de marque (Brandbook)"
90
+ tech_preset_loaded: "Tech preset charge: {preset}"
91
+ tech_preset_detected: "Stack technologique detecte: {stack}"
92
+ doctor_running: "Execution des diagnostics du Doctor..."
93
+ doctor_healthy: "Doctor: Tous les checks ont reussi"
94
+ doctor_degraded: "Doctor: Problemes trouves (voir rapport)"
95
+ doctor_fix_applied: "Doctor: Applique(s) {count} auto-fix(es)"
96
+
88
97
  errors:
89
98
  session_corrupted: "Le fichier de session semble corrompu. Tentative de recuperation..."
90
99
  handoff_missing: "Passation non trouvee. Utilisation de session.yaml + CLAUDE.md comme repli."
@@ -29,8 +29,8 @@ installer:
29
29
  created_overlays: "Criados diretorios de overlay de provedores"
30
30
  will_install: "Sera instalado:"
31
31
  agents_count: "13 definicoes de agentes (fases DISCOVER, PLAN, BUILD, DEPLOY)"
32
- workflows_count: "6 blueprints de workflow"
33
- templates_count: "6 templates (PRD, PRD Brownfield, Arquitetura, Task, QA Gate, Quick Brief)"
32
+ workflows_count: "7 blueprints de workflow"
33
+ templates_count: "10 templates (PRD, PRD Brownfield, Arquitetura, Task, QA Gate, Quick Brief, Brandbook, Design Tokens, Component Spec, Icon System)"
34
34
  constitution: "Constituicao (19 Artigos + Preambulo)"
35
35
  session_mgmt: "Sistema de gerenciamento de sessao"
36
36
  quality_gates: "Quality gates (veredictos em 3 niveis)"
@@ -85,6 +85,15 @@ status:
85
85
  backlog_items: "Itens do Backlog"
86
86
  high_priority: "alta prioridade"
87
87
 
88
+ features:
89
+ brandbook_step: "Fase 0: Estabelecendo identidade de marca (Brandbook)"
90
+ tech_preset_loaded: "Tech preset carregado: {preset}"
91
+ tech_preset_detected: "Stack tecnologico detectado: {stack}"
92
+ doctor_running: "Executando diagnosticos do Doctor..."
93
+ doctor_healthy: "Doctor: Todos os checks passaram"
94
+ doctor_degraded: "Doctor: Problemas encontrados (veja relatorio)"
95
+ doctor_fix_applied: "Doctor: Aplicado(s) {count} auto-fix(es)"
96
+
88
97
  errors:
89
98
  session_corrupted: "Arquivo de sessao parece corrompido. Tentando recuperacao..."
90
99
  handoff_missing: "Handoff nao encontrado. Usando session.yaml + CLAUDE.md como fallback."
@@ -165,7 +165,7 @@ Memory injection follows the same progressive reinforcement principle: as contex
165
165
 
166
166
  ---
167
167
 
168
- *Context Engine v2.0 — Chati.dev Intelligence Layer (Progressive Reinforcement Model)*
168
+ *Context Engine v4.0 — Chati.dev Intelligence Layer (Progressive Reinforcement Model)*
169
169
 
170
170
  ---
171
171
 
@@ -0,0 +1,41 @@
1
+ # Tech Preset: Next.js
2
+ # Auto-loaded by Architect agent when Next.js stack is detected
3
+
4
+ stack: nextjs
5
+ displayName: "Next.js"
6
+
7
+ detection:
8
+ - next.config.js
9
+ - next.config.mjs
10
+ - next.config.ts
11
+
12
+ conventions:
13
+ routing: "App Router preferred (app/ directory)"
14
+ components: "Server Components by default, 'use client' for interactivity"
15
+ data_fetching: "Server-side fetch in page/layout, React Query for client"
16
+ styling: "Tailwind CSS or CSS Modules (no global CSS imports in components)"
17
+ api: "Route Handlers in app/api/ (not pages/api/)"
18
+
19
+ structure:
20
+ - "app/ — Routes, layouts, and pages"
21
+ - "app/api/ — Route Handlers (REST endpoints)"
22
+ - "components/ — Reusable UI components"
23
+ - "lib/ — Utility functions and shared logic"
24
+ - "public/ — Static assets"
25
+
26
+ rules:
27
+ - id: nextjs-ssr
28
+ text: "Prefer Server Components. Only add 'use client' when interactivity is needed."
29
+ priority: high
30
+ - id: nextjs-api
31
+ text: "Use Route Handlers (app/api/) for API endpoints. Not pages/api/."
32
+ priority: high
33
+ - id: nextjs-layout
34
+ text: "Use layout.tsx for shared UI. Avoid prop drilling through layouts."
35
+ priority: normal
36
+ - id: nextjs-metadata
37
+ text: "Export metadata from page.tsx for SEO. Use generateMetadata for dynamic pages."
38
+ priority: normal
39
+ - id: nextjs-loading
40
+ text: "Use loading.tsx and error.tsx for streaming and error boundaries."
41
+ priority: normal
@@ -0,0 +1,39 @@
1
+ # Tech Preset: Node.js + Express
2
+ # Auto-loaded by Architect agent when Express stack is detected
3
+
4
+ stack: node-express
5
+ displayName: "Node.js + Express"
6
+
7
+ detection:
8
+ - "package.json containing express"
9
+
10
+ conventions:
11
+ routing: "Express Router with modular route files"
12
+ middleware: "Error-handling middleware at the end of the chain"
13
+ validation: "Zod or Joi for request validation"
14
+ auth: "JWT or session-based, middleware pattern"
15
+ errors: "Centralized error handler with error classes"
16
+
17
+ structure:
18
+ - "src/ — Application source code"
19
+ - "src/routes/ — Express route definitions"
20
+ - "src/controllers/ — Request handlers"
21
+ - "src/middleware/ — Custom middleware"
22
+ - "src/services/ — Business logic"
23
+ - "src/models/ — Data models (ORM or raw queries)"
24
+ - "src/utils/ — Utility functions"
25
+ - "src/config/ — Configuration and environment"
26
+
27
+ rules:
28
+ - id: express-error-handler
29
+ text: "Always use a centralized error-handling middleware. Never swallow errors silently."
30
+ priority: critical
31
+ - id: express-validation
32
+ text: "Validate all request input (body, params, query) before processing."
33
+ priority: high
34
+ - id: express-async
35
+ text: "Wrap async route handlers to catch rejected promises (express-async-errors or manual try/catch)."
36
+ priority: high
37
+ - id: express-env
38
+ text: "Use environment variables for all configuration. Never hardcode secrets."
39
+ priority: critical
@@ -0,0 +1,37 @@
1
+ # Tech Preset: React + Vite
2
+ # Auto-loaded by Architect agent when React+Vite stack is detected
3
+
4
+ stack: react-vite
5
+ displayName: "React + Vite"
6
+
7
+ detection:
8
+ - vite.config.js
9
+ - vite.config.ts
10
+ - vite.config.mjs
11
+
12
+ conventions:
13
+ routing: "React Router v6+ with createBrowserRouter"
14
+ components: "Functional components with hooks"
15
+ state: "React Context for simple state, Zustand/Jotai for complex"
16
+ styling: "Tailwind CSS or CSS Modules"
17
+ build: "Vite with ESBuild for dev, Rollup for production"
18
+
19
+ structure:
20
+ - "src/ — Application source code"
21
+ - "src/components/ — Reusable UI components"
22
+ - "src/pages/ — Route-level components"
23
+ - "src/hooks/ — Custom React hooks"
24
+ - "src/lib/ — Utility functions"
25
+ - "src/assets/ — Static assets (images, fonts)"
26
+ - "public/ — Public static files"
27
+
28
+ rules:
29
+ - id: vite-env
30
+ text: "Use import.meta.env for environment variables. Prefix with VITE_ for client exposure."
31
+ priority: high
32
+ - id: vite-lazy
33
+ text: "Use React.lazy() and Suspense for route-level code splitting."
34
+ priority: normal
35
+ - id: vite-alias
36
+ text: "Configure path aliases in vite.config.ts (e.g., @ for src/)."
37
+ priority: normal
@@ -0,0 +1,37 @@
1
+ # Tech Preset: Supabase Fullstack
2
+ # Auto-loaded by Architect agent when Supabase stack is detected
3
+
4
+ stack: supabase-fullstack
5
+ displayName: "Supabase Fullstack"
6
+
7
+ detection:
8
+ - supabase/config.toml
9
+ - .env.local containing SUPABASE_URL
10
+
11
+ conventions:
12
+ auth: "Supabase Auth with RLS policies for authorization"
13
+ database: "PostgreSQL with Row Level Security (RLS) on every table"
14
+ storage: "Supabase Storage for file uploads with bucket policies"
15
+ functions: "Supabase Edge Functions (Deno) for serverless logic"
16
+ realtime: "Supabase Realtime for live subscriptions"
17
+
18
+ structure:
19
+ - "supabase/ — Supabase project configuration"
20
+ - "supabase/migrations/ — SQL migration files"
21
+ - "supabase/functions/ — Edge Functions (Deno)"
22
+ - "supabase/seed.sql — Seed data"
23
+ - "src/lib/supabase.ts — Supabase client initialization"
24
+
25
+ rules:
26
+ - id: supabase-rls
27
+ text: "EVERY table MUST have RLS enabled. No exceptions. Create policies before exposing data."
28
+ priority: critical
29
+ - id: supabase-migrations
30
+ text: "All schema changes go through migration files. Never modify production DB directly."
31
+ priority: critical
32
+ - id: supabase-types
33
+ text: "Generate TypeScript types from database schema (supabase gen types)."
34
+ priority: high
35
+ - id: supabase-auth
36
+ text: "Use Supabase Auth helpers for SSR frameworks. Handle auth state server-side."
37
+ priority: high