@maestro-ai/cli 1.0.0
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.
- package/README.md +59 -0
- package/content/guides/Cat/303/241logo de Stacks para Cloud Moderna.md" +119 -0
- package/content/guides/Cat/303/241logo de Stacks para Hospedagem Compartilhada.md" +147 -0
- package/content/guides/Checklist Mestre de Entrega.md +68 -0
- package/content/guides/Gates de Qualidade.md +209 -0
- package/content/guides/Guia de Adi/303/247/303/243o de Novas Funcionalidades.md" +355 -0
- package/content/guides/Guia de Chaos Engineering.md +267 -0
- package/content/guides/Guia de Debugging com IA.md +135 -0
- package/content/guides/Guia de Estrat/303/251gias de Cache.md" +352 -0
- package/content/guides/Guia de Migrations Zero-Downtime.md +311 -0
- package/content/guides/Guia de Multi-tenancy.md +368 -0
- package/content/guides/Guia de Otimiza/303/247/303/243o de Custos Cloud.md" +195 -0
- package/content/guides/Guia de Refatora/303/247/303/243o de C/303/263digo Legado com IA.md" +162 -0
- package/content/guides/Guia de SLOs e Error Budgets.md +315 -0
- package/content/guides/M/303/251tricas de Efici/303/252ncia do Desenvolvimento com IA.md" +93 -0
- package/content/guides/Rules base.md +90 -0
- package/content/prompts/README.md +203 -0
- package/content/prompts/acessibilidade/analise-acessibilidade.md +257 -0
- package/content/prompts/apis/design-api-rest.md +303 -0
- package/content/prompts/apis/idempotencia.md +254 -0
- package/content/prompts/apis/versionamento.md +313 -0
- package/content/prompts/arquitetura/arquitetura-c4-completo.md +190 -0
- package/content/prompts/arquitetura/clean-architecture.md +151 -0
- package/content/prompts/arquitetura/ddd-bounded-contexts.md +183 -0
- package/content/prompts/arquitetura/ddd-cqrs.md +176 -0
- package/content/prompts/arquitetura/modelo-dominio.md +207 -0
- package/content/prompts/arquitetura/multi-tenancy.md +235 -0
- package/content/prompts/database/migrations-zero-downtime.md +192 -0
- package/content/prompts/database/otimizacao-queries.md +296 -0
- package/content/prompts/desenvolvimento/code-review.md +301 -0
- package/content/prompts/desenvolvimento/gerar-servico.md +271 -0
- package/content/prompts/devops/docker-compose.md +336 -0
- package/content/prompts/devops/feature-flags.md +374 -0
- package/content/prompts/devops/kubernetes-deploy.md +460 -0
- package/content/prompts/devops/pipeline-cicd.md +358 -0
- package/content/prompts/devops/terraform-iac.md +502 -0
- package/content/prompts/escalabilidade/analise-performance.md +240 -0
- package/content/prompts/escalabilidade/analise-performance.txt +94 -0
- package/content/prompts/escalabilidade/caching.md +255 -0
- package/content/prompts/observabilidade/chaos-testing.md +237 -0
- package/content/prompts/observabilidade/estrategia-observabilidade.md +263 -0
- package/content/prompts/observabilidade/estrategia-observabilidade.txt +134 -0
- package/content/prompts/observabilidade/slos.md +215 -0
- package/content/prompts/produto/discovery-inicial.md +203 -0
- package/content/prompts/produto/discovery-inicial.txt +33 -0
- package/content/prompts/requisitos/refinar-requisitos.md +232 -0
- package/content/prompts/requisitos/refinar-requisitos.txt +40 -0
- package/content/prompts/seguranca/analise-seguranca.md +243 -0
- package/content/prompts/seguranca/pentest-checklist.md +333 -0
- package/content/prompts/seguranca/rate-limiting.md +356 -0
- package/content/prompts/seguranca/revisao-lgpd.md +227 -0
- package/content/prompts/seguranca/threat-modeling.md +224 -0
- package/content/prompts/testes/contract-testing.md +340 -0
- package/content/prompts/testes/gerar-testes-unitarios.md +474 -0
- package/content/prompts/testes/testes-e2e.md +460 -0
- package/content/prompts/testes/testes-integracao.md +418 -0
- package/content/prompts/testes/testes-performance.md +458 -0
- package/content/prompts/ux/gerar-ui-stitch.md +151 -0
- package/content/skills/api-patterns/SKILL.md +81 -0
- package/content/skills/api-patterns/api-style.md +42 -0
- package/content/skills/api-patterns/auth.md +24 -0
- package/content/skills/api-patterns/documentation.md +26 -0
- package/content/skills/api-patterns/graphql.md +41 -0
- package/content/skills/api-patterns/rate-limiting.md +31 -0
- package/content/skills/api-patterns/response.md +37 -0
- package/content/skills/api-patterns/rest.md +40 -0
- package/content/skills/api-patterns/scripts/api_validator.py +211 -0
- package/content/skills/api-patterns/security-testing.md +122 -0
- package/content/skills/api-patterns/trpc.md +41 -0
- package/content/skills/api-patterns/versioning.md +22 -0
- package/content/skills/app-builder/SKILL.md +75 -0
- package/content/skills/app-builder/agent-coordination.md +71 -0
- package/content/skills/app-builder/feature-building.md +53 -0
- package/content/skills/app-builder/project-detection.md +34 -0
- package/content/skills/app-builder/scaffolding.md +118 -0
- package/content/skills/app-builder/tech-stack.md +40 -0
- package/content/skills/app-builder/templates/SKILL.md +39 -0
- package/content/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/content/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/content/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/content/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/content/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/content/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/content/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/content/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
- package/content/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
- package/content/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
- package/content/skills/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
- package/content/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/content/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
- package/content/skills/architecture/SKILL.md +55 -0
- package/content/skills/architecture/context-discovery.md +43 -0
- package/content/skills/architecture/examples.md +94 -0
- package/content/skills/architecture/pattern-selection.md +68 -0
- package/content/skills/architecture/patterns-reference.md +50 -0
- package/content/skills/architecture/trade-off-analysis.md +77 -0
- package/content/skills/bash-linux/SKILL.md +199 -0
- package/content/skills/behavioral-modes/SKILL.md +242 -0
- package/content/skills/brainstorming/SKILL.md +163 -0
- package/content/skills/brainstorming/dynamic-questioning.md +350 -0
- package/content/skills/clean-code/SKILL.md +201 -0
- package/content/skills/code-review-checklist/SKILL.md +109 -0
- package/content/skills/database-design/SKILL.md +52 -0
- package/content/skills/database-design/database-selection.md +43 -0
- package/content/skills/database-design/indexing.md +39 -0
- package/content/skills/database-design/migrations.md +48 -0
- package/content/skills/database-design/optimization.md +36 -0
- package/content/skills/database-design/orm-selection.md +30 -0
- package/content/skills/database-design/schema-design.md +56 -0
- package/content/skills/database-design/scripts/schema_validator.py +172 -0
- package/content/skills/deployment-procedures/SKILL.md +241 -0
- package/content/skills/doc.md +177 -0
- package/content/skills/documentation-templates/SKILL.md +194 -0
- package/content/skills/frontend-design/SKILL.md +396 -0
- package/content/skills/frontend-design/animation-guide.md +331 -0
- package/content/skills/frontend-design/color-system.md +311 -0
- package/content/skills/frontend-design/decision-trees.md +418 -0
- package/content/skills/frontend-design/motion-graphics.md +306 -0
- package/content/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/content/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/content/skills/frontend-design/typography-system.md +345 -0
- package/content/skills/frontend-design/ux-psychology.md +541 -0
- package/content/skills/frontend-design/visual-effects.md +383 -0
- package/content/skills/game-development/2d-games/SKILL.md +119 -0
- package/content/skills/game-development/3d-games/SKILL.md +135 -0
- package/content/skills/game-development/SKILL.md +167 -0
- package/content/skills/game-development/game-art/SKILL.md +185 -0
- package/content/skills/game-development/game-audio/SKILL.md +190 -0
- package/content/skills/game-development/game-design/SKILL.md +129 -0
- package/content/skills/game-development/mobile-games/SKILL.md +108 -0
- package/content/skills/game-development/multiplayer/SKILL.md +132 -0
- package/content/skills/game-development/pc-games/SKILL.md +144 -0
- package/content/skills/game-development/vr-ar/SKILL.md +123 -0
- package/content/skills/game-development/web-games/SKILL.md +150 -0
- package/content/skills/geo-fundamentals/SKILL.md +156 -0
- package/content/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/content/skills/i18n-localization/SKILL.md +154 -0
- package/content/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/content/skills/intelligent-routing/SKILL.md +334 -0
- package/content/skills/lint-and-validate/SKILL.md +45 -0
- package/content/skills/lint-and-validate/scripts/lint_runner.py +172 -0
- package/content/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/content/skills/mcp-builder/SKILL.md +176 -0
- package/content/skills/mobile-design/SKILL.md +394 -0
- package/content/skills/mobile-design/decision-trees.md +516 -0
- package/content/skills/mobile-design/mobile-backend.md +491 -0
- package/content/skills/mobile-design/mobile-color-system.md +420 -0
- package/content/skills/mobile-design/mobile-debugging.md +122 -0
- package/content/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/content/skills/mobile-design/mobile-navigation.md +458 -0
- package/content/skills/mobile-design/mobile-performance.md +767 -0
- package/content/skills/mobile-design/mobile-testing.md +356 -0
- package/content/skills/mobile-design/mobile-typography.md +433 -0
- package/content/skills/mobile-design/platform-android.md +666 -0
- package/content/skills/mobile-design/platform-ios.md +561 -0
- package/content/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/content/skills/mobile-design/touch-psychology.md +537 -0
- package/content/skills/nextjs-best-practices/SKILL.md +203 -0
- package/content/skills/nodejs-best-practices/SKILL.md +333 -0
- package/content/skills/parallel-agents/SKILL.md +175 -0
- package/content/skills/performance-profiling/SKILL.md +143 -0
- package/content/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/content/skills/plan-writing/SKILL.md +152 -0
- package/content/skills/powershell-windows/SKILL.md +167 -0
- package/content/skills/python-patterns/SKILL.md +441 -0
- package/content/skills/react-patterns/SKILL.md +198 -0
- package/content/skills/red-team-tactics/SKILL.md +199 -0
- package/content/skills/seo-fundamentals/SKILL.md +129 -0
- package/content/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/content/skills/server-management/SKILL.md +161 -0
- package/content/skills/systematic-debugging/SKILL.md +109 -0
- package/content/skills/tailwind-patterns/SKILL.md +269 -0
- package/content/skills/tdd-workflow/SKILL.md +149 -0
- package/content/skills/testing-patterns/SKILL.md +178 -0
- package/content/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/content/skills/vulnerability-scanner/SKILL.md +276 -0
- package/content/skills/vulnerability-scanner/checklists.md +121 -0
- package/content/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/content/skills/webapp-testing/SKILL.md +187 -0
- package/content/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/content/specialists/Especialista em Acessibilidade.md +266 -0
- package/content/specialists/Especialista em An/303/241lise de Testes.md" +434 -0
- package/content/specialists/Especialista em Arquitetura Avan/303/247ada.md" +358 -0
- package/content/specialists/Especialista em Arquitetura de Software.md +177 -0
- package/content/specialists/Especialista em Banco de Dados.md +260 -0
- package/content/specialists/Especialista em Contrato de API.md +172 -0
- package/content/specialists/Especialista em Dados e Analytics com IA.md +246 -0
- package/content/specialists/Especialista em Debugging e Troubleshooting.md +191 -0
- package/content/specialists/Especialista em Desenvolvimento Frontend.md +477 -0
- package/content/specialists/Especialista em Desenvolvimento Mobile.md +241 -0
- package/content/specialists/Especialista em Desenvolvimento e Vibe Coding Estruturado.md +417 -0
- package/content/specialists/Especialista em DevOps e Infraestrutura.md +294 -0
- package/content/specialists/Especialista em Documenta/303/247/303/243o T/303/251cnica.md" +227 -0
- package/content/specialists/Especialista em Engenharia de Requisitos com IA.md +299 -0
- package/content/specialists/Especialista em Explora/303/247/303/243o de Codebase.md" +179 -0
- package/content/specialists/Especialista em Gest/303/243o de Produto.md" +179 -0
- package/content/specialists/Especialista em Migra/303/247/303/243o e Moderniza/303/247/303/243o.md" +410 -0
- package/content/specialists/Especialista em Modelagem e Arquitetura de Dom/303/255nio com IA.md" +248 -0
- package/content/specialists/Especialista em Observabilidade.md +415 -0
- package/content/specialists/Especialista em Performance e Escalabilidade.md +373 -0
- package/content/specialists/Especialista em Plano de Execu/303/247/303/243o com IA.md" +341 -0
- package/content/specialists/Especialista em Prototipagem R/303/241pida com Google Stitch.md" +419 -0
- package/content/specialists/Especialista em Seguran/303/247a da Informa/303/247/303/243o.md" +508 -0
- package/content/specialists/Especialista em UX Design.md +453 -0
- package/content/specialists/INDEX.md +43 -0
- package/content/templates/PRD.md +165 -0
- package/content/templates/README.md +65 -0
- package/content/templates/adr.md +103 -0
- package/content/templates/arquitetura.md +279 -0
- package/content/templates/backlog.md +185 -0
- package/content/templates/checklist-seguranca.md +180 -0
- package/content/templates/contexto.md +120 -0
- package/content/templates/criterios-aceite.md +99 -0
- package/content/templates/design-banco.md +270 -0
- package/content/templates/design-doc.md +240 -0
- package/content/templates/feature.md +88 -0
- package/content/templates/historia-backend.md +84 -0
- package/content/templates/historia-frontend.md +75 -0
- package/content/templates/historia-usuario.md +125 -0
- package/content/templates/mapa-navegacao.md +133 -0
- package/content/templates/matriz-rastreabilidade.md +121 -0
- package/content/templates/modelo-dominio.md +219 -0
- package/content/templates/plano-testes.md +199 -0
- package/content/templates/prototipo-stitch.md +138 -0
- package/content/templates/requisitos.md +162 -0
- package/content/templates/slo-sli.md +197 -0
- package/content/workflows/README-MCP.md +363 -0
- package/content/workflows/brainstorm.md +113 -0
- package/content/workflows/create.md +59 -0
- package/content/workflows/debug.md +103 -0
- package/content/workflows/deploy.md +176 -0
- package/content/workflows/enhance.md +63 -0
- package/content/workflows/mcp-debug.md +506 -0
- package/content/workflows/mcp-feature.md +385 -0
- package/content/workflows/mcp-gate.md +413 -0
- package/content/workflows/mcp-next.md +388 -0
- package/content/workflows/mcp-refactor.md +600 -0
- package/content/workflows/mcp-start.md +304 -0
- package/content/workflows/mcp-status.md +400 -0
- package/content/workflows/orchestrate.md +237 -0
- package/content/workflows/plan.md +89 -0
- package/content/workflows/preview.md +81 -0
- package/content/workflows/status.md +86 -0
- package/content/workflows/test.md +144 -0
- package/content/workflows/ui-ux-pro-max.md +296 -0
- package/dist/commands/init.d.ts +6 -0
- package/dist/commands/init.js +138 -0
- package/dist/commands/update.d.ts +5 -0
- package/dist/commands/update.js +50 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +21 -0
- package/package.json +48 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: nuxt-app
|
|
3
|
+
description: Nuxt 3 full-stack template. Vue 3, Pinia, Tailwind, Prisma.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Nuxt 3 Full-Stack Template
|
|
7
|
+
|
|
8
|
+
## Tech Stack
|
|
9
|
+
|
|
10
|
+
| Component | Technology |
|
|
11
|
+
|-----------|------------|
|
|
12
|
+
| Framework | Nuxt 3 |
|
|
13
|
+
| Language | TypeScript |
|
|
14
|
+
| UI | Vue 3 (Composition API) |
|
|
15
|
+
| State | Pinia |
|
|
16
|
+
| Database | PostgreSQL + Prisma |
|
|
17
|
+
| Styling | Tailwind CSS |
|
|
18
|
+
| Validation | Zod |
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Directory Structure
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
project-name/
|
|
26
|
+
├── prisma/
|
|
27
|
+
│ └── schema.prisma
|
|
28
|
+
├── server/
|
|
29
|
+
│ ├── api/
|
|
30
|
+
│ │ └── [resource]/
|
|
31
|
+
│ │ └── index.ts
|
|
32
|
+
│ └── utils/
|
|
33
|
+
│ └── db.ts # Prisma client
|
|
34
|
+
├── composables/
|
|
35
|
+
│ └── useAuth.ts
|
|
36
|
+
├── stores/
|
|
37
|
+
│ └── user.ts # Pinia store
|
|
38
|
+
├── components/
|
|
39
|
+
│ └── ui/
|
|
40
|
+
├── pages/
|
|
41
|
+
│ ├── index.vue
|
|
42
|
+
│ └── [...slug].vue
|
|
43
|
+
├── layouts/
|
|
44
|
+
│ └── default.vue
|
|
45
|
+
├── assets/
|
|
46
|
+
│ └── css/
|
|
47
|
+
│ └── main.css
|
|
48
|
+
├── .env.example
|
|
49
|
+
├── nuxt.config.ts
|
|
50
|
+
└── package.json
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Key Concepts
|
|
56
|
+
|
|
57
|
+
| Concept | Description |
|
|
58
|
+
|---------|-------------|
|
|
59
|
+
| Auto-imports | Components, composables, utils |
|
|
60
|
+
| File-based routing | pages/ → routes |
|
|
61
|
+
| Server Routes | server/api/ → API endpoints |
|
|
62
|
+
| Composables | Reusable reactive logic |
|
|
63
|
+
| Pinia | State management |
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Environment Variables
|
|
68
|
+
|
|
69
|
+
| Variable | Purpose |
|
|
70
|
+
|----------|---------|
|
|
71
|
+
| DATABASE_URL | Prisma connection |
|
|
72
|
+
| NUXT_PUBLIC_APP_URL | Public URL |
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Setup Steps
|
|
77
|
+
|
|
78
|
+
1. `npx nuxi@latest init {{name}}`
|
|
79
|
+
2. `cd {{name}}`
|
|
80
|
+
3. `npm install @pinia/nuxt @prisma/client prisma zod`
|
|
81
|
+
4. `npm install -D @nuxtjs/tailwindcss`
|
|
82
|
+
5. Add modules to `nuxt.config.ts`:
|
|
83
|
+
```ts
|
|
84
|
+
modules: ['@pinia/nuxt', '@nuxtjs/tailwindcss']
|
|
85
|
+
```
|
|
86
|
+
6. `npx prisma init`
|
|
87
|
+
7. Configure schema
|
|
88
|
+
8. `npx prisma db push`
|
|
89
|
+
9. `npm run dev`
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Best Practices
|
|
94
|
+
|
|
95
|
+
- Use `<script setup>` for components
|
|
96
|
+
- Composables for reusable logic
|
|
97
|
+
- Pinia stores in `stores/` folder
|
|
98
|
+
- Server routes for API logic
|
|
99
|
+
- Auto-import for clean code
|
|
100
|
+
- TypeScript for type safety
|
|
101
|
+
- See `@[skills/vue-expert]` for Vue patterns
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: python-fastapi
|
|
3
|
+
description: FastAPI REST API template principles. SQLAlchemy, Pydantic, Alembic.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# FastAPI API Template
|
|
7
|
+
|
|
8
|
+
## Tech Stack
|
|
9
|
+
|
|
10
|
+
| Component | Technology |
|
|
11
|
+
|-----------|------------|
|
|
12
|
+
| Framework | FastAPI |
|
|
13
|
+
| Language | Python 3.11+ |
|
|
14
|
+
| ORM | SQLAlchemy 2.0 |
|
|
15
|
+
| Validation | Pydantic v2 |
|
|
16
|
+
| Migrations | Alembic |
|
|
17
|
+
| Auth | JWT + passlib |
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Directory Structure
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
project-name/
|
|
25
|
+
├── alembic/ # Migrations
|
|
26
|
+
├── app/
|
|
27
|
+
│ ├── main.py # FastAPI app
|
|
28
|
+
│ ├── config.py # Settings
|
|
29
|
+
│ ├── database.py # DB connection
|
|
30
|
+
│ ├── models/ # SQLAlchemy models
|
|
31
|
+
│ ├── schemas/ # Pydantic schemas
|
|
32
|
+
│ ├── routers/ # API routes
|
|
33
|
+
│ ├── services/ # Business logic
|
|
34
|
+
│ ├── dependencies/ # DI
|
|
35
|
+
│ └── utils/
|
|
36
|
+
├── tests/
|
|
37
|
+
├── .env.example
|
|
38
|
+
└── requirements.txt
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Key Concepts
|
|
44
|
+
|
|
45
|
+
| Concept | Description |
|
|
46
|
+
|---------|-------------|
|
|
47
|
+
| Async | async/await throughout |
|
|
48
|
+
| Dependency Injection | FastAPI Depends |
|
|
49
|
+
| Pydantic v2 | Validation + serialization |
|
|
50
|
+
| SQLAlchemy 2.0 | Async sessions |
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## API Structure
|
|
55
|
+
|
|
56
|
+
| Layer | Responsibility |
|
|
57
|
+
|-------|---------------|
|
|
58
|
+
| Routers | HTTP handling |
|
|
59
|
+
| Dependencies | Auth, validation |
|
|
60
|
+
| Services | Business logic |
|
|
61
|
+
| Models | Database entities |
|
|
62
|
+
| Schemas | Request/response |
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Setup Steps
|
|
67
|
+
|
|
68
|
+
1. `python -m venv venv`
|
|
69
|
+
2. `source venv/bin/activate`
|
|
70
|
+
3. `pip install fastapi uvicorn sqlalchemy alembic pydantic`
|
|
71
|
+
4. Create `.env`
|
|
72
|
+
5. `alembic upgrade head`
|
|
73
|
+
6. `uvicorn app.main:app --reload`
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Best Practices
|
|
78
|
+
|
|
79
|
+
- Use async everywhere
|
|
80
|
+
- Pydantic v2 for validation
|
|
81
|
+
- SQLAlchemy 2.0 async sessions
|
|
82
|
+
- Alembic for migrations
|
|
83
|
+
- pytest-asyncio for tests
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: react-native-app
|
|
3
|
+
description: React Native mobile app template principles. Expo, TypeScript, navigation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# React Native App Template
|
|
7
|
+
|
|
8
|
+
## Tech Stack
|
|
9
|
+
|
|
10
|
+
| Component | Technology |
|
|
11
|
+
|-----------|------------|
|
|
12
|
+
| Framework | React Native + Expo |
|
|
13
|
+
| Language | TypeScript |
|
|
14
|
+
| Navigation | Expo Router |
|
|
15
|
+
| State | Zustand + React Query |
|
|
16
|
+
| Styling | NativeWind |
|
|
17
|
+
| Testing | Jest + RNTL |
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Directory Structure
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
project-name/
|
|
25
|
+
├── app/ # Expo Router (file-based)
|
|
26
|
+
│ ├── _layout.tsx # Root layout
|
|
27
|
+
│ ├── index.tsx # Home
|
|
28
|
+
│ ├── (tabs)/ # Tab navigation
|
|
29
|
+
│ └── [id].tsx # Dynamic route
|
|
30
|
+
├── components/
|
|
31
|
+
│ ├── ui/ # Reusable
|
|
32
|
+
│ └── features/
|
|
33
|
+
├── hooks/
|
|
34
|
+
├── lib/
|
|
35
|
+
│ ├── api.ts
|
|
36
|
+
│ └── storage.ts
|
|
37
|
+
├── store/
|
|
38
|
+
├── constants/
|
|
39
|
+
└── app.json
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Navigation Patterns
|
|
45
|
+
|
|
46
|
+
| Pattern | Use |
|
|
47
|
+
|---------|-----|
|
|
48
|
+
| Stack | Page hierarchy |
|
|
49
|
+
| Tabs | Bottom navigation |
|
|
50
|
+
| Drawer | Side menu |
|
|
51
|
+
| Modal | Overlay screens |
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## State Management
|
|
56
|
+
|
|
57
|
+
| Type | Tool |
|
|
58
|
+
|------|------|
|
|
59
|
+
| Local | Zustand |
|
|
60
|
+
| Server | React Query |
|
|
61
|
+
| Forms | React Hook Form |
|
|
62
|
+
| Storage | Expo SecureStore |
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Key Packages
|
|
67
|
+
|
|
68
|
+
| Package | Purpose |
|
|
69
|
+
|---------|---------|
|
|
70
|
+
| expo-router | File-based routing |
|
|
71
|
+
| zustand | Local state |
|
|
72
|
+
| @tanstack/react-query | Server state |
|
|
73
|
+
| nativewind | Tailwind styling |
|
|
74
|
+
| expo-secure-store | Secure storage |
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Setup Steps
|
|
79
|
+
|
|
80
|
+
1. `npx create-expo-app {{name}} -t expo-template-blank-typescript`
|
|
81
|
+
2. `npx expo install expo-router react-native-safe-area-context`
|
|
82
|
+
3. Install state: `npm install zustand @tanstack/react-query`
|
|
83
|
+
4. `npx expo start`
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Best Practices
|
|
88
|
+
|
|
89
|
+
- Expo Router for navigation
|
|
90
|
+
- Zustand for local, React Query for server state
|
|
91
|
+
- NativeWind for consistent styling
|
|
92
|
+
- Expo SecureStore for tokens
|
|
93
|
+
- Test on both iOS and Android
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: architecture
|
|
3
|
+
description: Architectural decision-making framework. Requirements analysis, trade-off evaluation, ADR documentation. Use when making architecture decisions or analyzing system design.
|
|
4
|
+
allowed-tools: Read, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Architecture Decision Framework
|
|
8
|
+
|
|
9
|
+
> "Requirements drive architecture. Trade-offs inform decisions. ADRs capture rationale."
|
|
10
|
+
|
|
11
|
+
## 🎯 Selective Reading Rule
|
|
12
|
+
|
|
13
|
+
**Read ONLY files relevant to the request!** Check the content map, find what you need.
|
|
14
|
+
|
|
15
|
+
| File | Description | When to Read |
|
|
16
|
+
|------|-------------|--------------|
|
|
17
|
+
| `context-discovery.md` | Questions to ask, project classification | Starting architecture design |
|
|
18
|
+
| `trade-off-analysis.md` | ADR templates, trade-off framework | Documenting decisions |
|
|
19
|
+
| `pattern-selection.md` | Decision trees, anti-patterns | Choosing patterns |
|
|
20
|
+
| `examples.md` | MVP, SaaS, Enterprise examples | Reference implementations |
|
|
21
|
+
| `patterns-reference.md` | Quick lookup for patterns | Pattern comparison |
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 🔗 Related Skills
|
|
26
|
+
|
|
27
|
+
| Skill | Use For |
|
|
28
|
+
|-------|---------|
|
|
29
|
+
| `@[skills/database-design]` | Database schema design |
|
|
30
|
+
| `@[skills/api-patterns]` | API design patterns |
|
|
31
|
+
| `@[skills/deployment-procedures]` | Deployment architecture |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Core Principle
|
|
36
|
+
|
|
37
|
+
**"Simplicity is the ultimate sophistication."**
|
|
38
|
+
|
|
39
|
+
- Start simple
|
|
40
|
+
- Add complexity ONLY when proven necessary
|
|
41
|
+
- You can always add patterns later
|
|
42
|
+
- Removing complexity is MUCH harder than adding it
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Validation Checklist
|
|
47
|
+
|
|
48
|
+
Before finalizing architecture:
|
|
49
|
+
|
|
50
|
+
- [ ] Requirements clearly understood
|
|
51
|
+
- [ ] Constraints identified
|
|
52
|
+
- [ ] Each decision has trade-off analysis
|
|
53
|
+
- [ ] Simpler alternatives considered
|
|
54
|
+
- [ ] ADRs written for significant decisions
|
|
55
|
+
- [ ] Team expertise matches chosen patterns
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Context Discovery
|
|
2
|
+
|
|
3
|
+
> Before suggesting any architecture, gather context.
|
|
4
|
+
|
|
5
|
+
## Question Hierarchy (Ask User FIRST)
|
|
6
|
+
|
|
7
|
+
1. **Scale**
|
|
8
|
+
- How many users? (10, 1K, 100K, 1M+)
|
|
9
|
+
- Data volume? (MB, GB, TB)
|
|
10
|
+
- Transaction rate? (per second/minute)
|
|
11
|
+
|
|
12
|
+
2. **Team**
|
|
13
|
+
- Solo developer or team?
|
|
14
|
+
- Team size and expertise?
|
|
15
|
+
- Distributed or co-located?
|
|
16
|
+
|
|
17
|
+
3. **Timeline**
|
|
18
|
+
- MVP/Prototype or long-term product?
|
|
19
|
+
- Time to market pressure?
|
|
20
|
+
|
|
21
|
+
4. **Domain**
|
|
22
|
+
- CRUD-heavy or business logic complex?
|
|
23
|
+
- Real-time requirements?
|
|
24
|
+
- Compliance/regulations?
|
|
25
|
+
|
|
26
|
+
5. **Constraints**
|
|
27
|
+
- Budget limitations?
|
|
28
|
+
- Legacy systems to integrate?
|
|
29
|
+
- Technology stack preferences?
|
|
30
|
+
|
|
31
|
+
## Project Classification Matrix
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
MVP SaaS Enterprise
|
|
35
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
36
|
+
│ Scale │ <1K │ 1K-100K │ 100K+ │
|
|
37
|
+
│ Team │ Solo │ 2-10 │ 10+ │
|
|
38
|
+
│ Timeline │ Fast (weeks) │ Medium (months)│ Long (years)│
|
|
39
|
+
│ Architecture │ Simple │ Modular │ Distributed │
|
|
40
|
+
│ Patterns │ Minimal │ Selective │ Comprehensive│
|
|
41
|
+
│ Example │ Next.js API │ NestJS │ Microservices│
|
|
42
|
+
└─────────────────────────────────────────────────────────────┘
|
|
43
|
+
```
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Architecture Examples
|
|
2
|
+
|
|
3
|
+
> Real-world architecture decisions by project type.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Example 1: MVP E-commerce (Solo Developer)
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
Requirements:
|
|
11
|
+
- <1000 users initially
|
|
12
|
+
- Solo developer
|
|
13
|
+
- Fast to market (8 weeks)
|
|
14
|
+
- Budget-conscious
|
|
15
|
+
|
|
16
|
+
Architecture Decisions:
|
|
17
|
+
App Structure: Monolith (simpler for solo)
|
|
18
|
+
Framework: Next.js (full-stack, fast)
|
|
19
|
+
Data Layer: Prisma direct (no over-abstraction)
|
|
20
|
+
Authentication: JWT (simpler than OAuth)
|
|
21
|
+
Payment: Stripe (hosted solution)
|
|
22
|
+
Database: PostgreSQL (ACID for orders)
|
|
23
|
+
|
|
24
|
+
Trade-offs Accepted:
|
|
25
|
+
- Monolith → Can't scale independently (team doesn't justify it)
|
|
26
|
+
- No Repository → Less testable (simple CRUD doesn't need it)
|
|
27
|
+
- JWT → No social login initially (can add later)
|
|
28
|
+
|
|
29
|
+
Future Migration Path:
|
|
30
|
+
- Users > 10K → Extract payment service
|
|
31
|
+
- Team > 3 → Add Repository pattern
|
|
32
|
+
- Social login requested → Add OAuth
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Example 2: SaaS Product (5-10 Developers)
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
Requirements:
|
|
41
|
+
- 1K-100K users
|
|
42
|
+
- 5-10 developers
|
|
43
|
+
- Long-term (12+ months)
|
|
44
|
+
- Multiple domains (billing, users, core)
|
|
45
|
+
|
|
46
|
+
Architecture Decisions:
|
|
47
|
+
App Structure: Modular Monolith (team size optimal)
|
|
48
|
+
Framework: NestJS (modular by design)
|
|
49
|
+
Data Layer: Repository pattern (testing, flexibility)
|
|
50
|
+
Domain Model: Partial DDD (rich entities)
|
|
51
|
+
Authentication: OAuth + JWT
|
|
52
|
+
Caching: Redis
|
|
53
|
+
Database: PostgreSQL
|
|
54
|
+
|
|
55
|
+
Trade-offs Accepted:
|
|
56
|
+
- Modular Monolith → Some module coupling (microservices not justified)
|
|
57
|
+
- Partial DDD → No full aggregates (no domain experts)
|
|
58
|
+
- RabbitMQ later → Initial synchronous (add when proven needed)
|
|
59
|
+
|
|
60
|
+
Migration Path:
|
|
61
|
+
- Team > 10 → Consider microservices
|
|
62
|
+
- Domains conflict → Extract bounded contexts
|
|
63
|
+
- Read performance issues → Add CQRS
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Example 3: Enterprise (100K+ Users)
|
|
69
|
+
|
|
70
|
+
```yaml
|
|
71
|
+
Requirements:
|
|
72
|
+
- 100K+ users
|
|
73
|
+
- 10+ developers
|
|
74
|
+
- Multiple business domains
|
|
75
|
+
- Different scaling needs
|
|
76
|
+
- 24/7 availability
|
|
77
|
+
|
|
78
|
+
Architecture Decisions:
|
|
79
|
+
App Structure: Microservices (independent scale)
|
|
80
|
+
API Gateway: Kong/AWS API GW
|
|
81
|
+
Domain Model: Full DDD
|
|
82
|
+
Consistency: Event-driven (eventual OK)
|
|
83
|
+
Message Bus: Kafka
|
|
84
|
+
Authentication: OAuth + SAML (enterprise SSO)
|
|
85
|
+
Database: Polyglot (right tool per job)
|
|
86
|
+
CQRS: Selected services
|
|
87
|
+
|
|
88
|
+
Operational Requirements:
|
|
89
|
+
- Service mesh (Istio/Linkerd)
|
|
90
|
+
- Distributed tracing (Jaeger/Tempo)
|
|
91
|
+
- Centralized logging (ELK/Loki)
|
|
92
|
+
- Circuit breakers (Resilience4j)
|
|
93
|
+
- Kubernetes/Helm
|
|
94
|
+
```
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Pattern Selection Guidelines
|
|
2
|
+
|
|
3
|
+
> Decision trees for choosing architectural patterns.
|
|
4
|
+
|
|
5
|
+
## Main Decision Tree
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
START: What's your MAIN concern?
|
|
9
|
+
|
|
10
|
+
┌─ Data Access Complexity?
|
|
11
|
+
│ ├─ HIGH (complex queries, testing needed)
|
|
12
|
+
│ │ → Repository Pattern + Unit of Work
|
|
13
|
+
│ │ VALIDATE: Will data source change frequently?
|
|
14
|
+
│ │ ├─ YES → Repository worth the indirection
|
|
15
|
+
│ │ └─ NO → Consider simpler ORM direct access
|
|
16
|
+
│ └─ LOW (simple CRUD, single database)
|
|
17
|
+
│ → ORM directly (Prisma, Drizzle)
|
|
18
|
+
│ Simpler = Better, Faster
|
|
19
|
+
│
|
|
20
|
+
├─ Business Rules Complexity?
|
|
21
|
+
│ ├─ HIGH (domain logic, rules vary by context)
|
|
22
|
+
│ │ → Domain-Driven Design
|
|
23
|
+
│ │ VALIDATE: Do you have domain experts on team?
|
|
24
|
+
│ │ ├─ YES → Full DDD (Aggregates, Value Objects)
|
|
25
|
+
│ │ └─ NO → Partial DDD (rich entities, clear boundaries)
|
|
26
|
+
│ └─ LOW (mostly CRUD, simple validation)
|
|
27
|
+
│ → Transaction Script pattern
|
|
28
|
+
│ Simpler = Better, Faster
|
|
29
|
+
│
|
|
30
|
+
├─ Independent Scaling Needed?
|
|
31
|
+
│ ├─ YES (different components scale differently)
|
|
32
|
+
│ │ → Microservices WORTH the complexity
|
|
33
|
+
│ │ REQUIREMENTS (ALL must be true):
|
|
34
|
+
│ │ - Clear domain boundaries
|
|
35
|
+
│ │ - Team > 10 developers
|
|
36
|
+
│ │ - Different scaling needs per service
|
|
37
|
+
│ │ IF NOT ALL MET → Modular Monolith instead
|
|
38
|
+
│ └─ NO (everything scales together)
|
|
39
|
+
│ → Modular Monolith
|
|
40
|
+
│ Can extract services later when proven needed
|
|
41
|
+
│
|
|
42
|
+
└─ Real-time Requirements?
|
|
43
|
+
├─ HIGH (immediate updates, multi-user sync)
|
|
44
|
+
│ → Event-Driven Architecture
|
|
45
|
+
│ → Message Queue (RabbitMQ, Redis, Kafka)
|
|
46
|
+
│ VALIDATE: Can you handle eventual consistency?
|
|
47
|
+
│ ├─ YES → Event-driven valid
|
|
48
|
+
│ └─ NO → Synchronous with polling
|
|
49
|
+
└─ LOW (eventual consistency acceptable)
|
|
50
|
+
→ Synchronous (REST/GraphQL)
|
|
51
|
+
Simpler = Better, Faster
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## The 3 Questions (Before ANY Pattern)
|
|
55
|
+
|
|
56
|
+
1. **Problem Solved**: What SPECIFIC problem does this pattern solve?
|
|
57
|
+
2. **Simpler Alternative**: Is there a simpler solution?
|
|
58
|
+
3. **Deferred Complexity**: Can we add this LATER when needed?
|
|
59
|
+
|
|
60
|
+
## Red Flags (Anti-patterns)
|
|
61
|
+
|
|
62
|
+
| Pattern | Anti-pattern | Simpler Alternative |
|
|
63
|
+
|---------|-------------|-------------------|
|
|
64
|
+
| Microservices | Premature splitting | Start monolith, extract later |
|
|
65
|
+
| Clean/Hexagonal | Over-abstraction | Concrete first, interfaces later |
|
|
66
|
+
| Event Sourcing | Over-engineering | Append-only audit log |
|
|
67
|
+
| CQRS | Unnecessary complexity | Single model |
|
|
68
|
+
| Repository | YAGNI for simple CRUD | ORM direct access |
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Architecture Patterns Reference
|
|
2
|
+
|
|
3
|
+
> Quick reference for common patterns with usage guidance.
|
|
4
|
+
|
|
5
|
+
## Data Access Patterns
|
|
6
|
+
|
|
7
|
+
| Pattern | When to Use | When NOT to Use | Complexity |
|
|
8
|
+
|---------|-------------|-----------------|------------|
|
|
9
|
+
| **Active Record** | Simple CRUD, rapid prototyping | Complex queries, multiple sources | Low |
|
|
10
|
+
| **Repository** | Testing needed, multiple sources | Simple CRUD, single database | Medium |
|
|
11
|
+
| **Unit of Work** | Complex transactions | Simple operations | High |
|
|
12
|
+
| **Data Mapper** | Complex domain, performance | Simple CRUD, rapid dev | High |
|
|
13
|
+
|
|
14
|
+
## Domain Logic Patterns
|
|
15
|
+
|
|
16
|
+
| Pattern | When to Use | When NOT to Use | Complexity |
|
|
17
|
+
|---------|-------------|-----------------|------------|
|
|
18
|
+
| **Transaction Script** | Simple CRUD, procedural | Complex business rules | Low |
|
|
19
|
+
| **Table Module** | Record-based logic | Rich behavior needed | Low |
|
|
20
|
+
| **Domain Model** | Complex business logic | Simple CRUD | Medium |
|
|
21
|
+
| **DDD (Full)** | Complex domain, domain experts | Simple domain, no experts | High |
|
|
22
|
+
|
|
23
|
+
## Distributed System Patterns
|
|
24
|
+
|
|
25
|
+
| Pattern | When to Use | When NOT to Use | Complexity |
|
|
26
|
+
|---------|-------------|-----------------|------------|
|
|
27
|
+
| **Modular Monolith** | Small teams, unclear boundaries | Clear contexts, different scales | Medium |
|
|
28
|
+
| **Microservices** | Different scales, large teams | Small teams, simple domain | Very High |
|
|
29
|
+
| **Event-Driven** | Real-time, loose coupling | Simple workflows, strong consistency | High |
|
|
30
|
+
| **CQRS** | Read/write performance diverges | Simple CRUD, same model | High |
|
|
31
|
+
| **Saga** | Distributed transactions | Single database, simple ACID | High |
|
|
32
|
+
|
|
33
|
+
## API Patterns
|
|
34
|
+
|
|
35
|
+
| Pattern | When to Use | When NOT to Use | Complexity |
|
|
36
|
+
|---------|-------------|-----------------|------------|
|
|
37
|
+
| **REST** | Standard CRUD, resources | Real-time, complex queries | Low |
|
|
38
|
+
| **GraphQL** | Flexible queries, multiple clients | Simple CRUD, caching needs | Medium |
|
|
39
|
+
| **gRPC** | Internal services, performance | Public APIs, browser clients | Medium |
|
|
40
|
+
| **WebSocket** | Real-time updates | Simple request/response | Medium |
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Simplicity Principle
|
|
45
|
+
|
|
46
|
+
**"Start simple, add complexity only when proven necessary."**
|
|
47
|
+
|
|
48
|
+
- You can always add patterns later
|
|
49
|
+
- Removing complexity is MUCH harder than adding it
|
|
50
|
+
- When in doubt, choose simpler option
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Trade-off Analysis & ADR
|
|
2
|
+
|
|
3
|
+
> Document every architectural decision with trade-offs.
|
|
4
|
+
|
|
5
|
+
## Decision Framework
|
|
6
|
+
|
|
7
|
+
For EACH architectural component, document:
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
## Architecture Decision Record
|
|
11
|
+
|
|
12
|
+
### Context
|
|
13
|
+
- **Problem**: [What problem are we solving?]
|
|
14
|
+
- **Constraints**: [Team size, scale, timeline, budget]
|
|
15
|
+
|
|
16
|
+
### Options Considered
|
|
17
|
+
|
|
18
|
+
| Option | Pros | Cons | Complexity | When Valid |
|
|
19
|
+
|--------|------|------|------------|-----------|
|
|
20
|
+
| Option A | Benefit 1 | Cost 1 | Low | [Conditions] |
|
|
21
|
+
| Option B | Benefit 2 | Cost 2 | High | [Conditions] |
|
|
22
|
+
|
|
23
|
+
### Decision
|
|
24
|
+
**Chosen**: [Option B]
|
|
25
|
+
|
|
26
|
+
### Rationale
|
|
27
|
+
1. [Reason 1 - tied to constraints]
|
|
28
|
+
2. [Reason 2 - tied to requirements]
|
|
29
|
+
|
|
30
|
+
### Trade-offs Accepted
|
|
31
|
+
- [What we're giving up]
|
|
32
|
+
- [Why this is acceptable]
|
|
33
|
+
|
|
34
|
+
### Consequences
|
|
35
|
+
- **Positive**: [Benefits we gain]
|
|
36
|
+
- **Negative**: [Costs/risks we accept]
|
|
37
|
+
- **Mitigation**: [How we'll address negatives]
|
|
38
|
+
|
|
39
|
+
### Revisit Trigger
|
|
40
|
+
- [When to reconsider this decision]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## ADR Template
|
|
44
|
+
|
|
45
|
+
```markdown
|
|
46
|
+
# ADR-[XXX]: [Decision Title]
|
|
47
|
+
|
|
48
|
+
## Status
|
|
49
|
+
Proposed | Accepted | Deprecated | Superseded by [ADR-YYY]
|
|
50
|
+
|
|
51
|
+
## Context
|
|
52
|
+
[What problem? What constraints?]
|
|
53
|
+
|
|
54
|
+
## Decision
|
|
55
|
+
[What we chose - be specific]
|
|
56
|
+
|
|
57
|
+
## Rationale
|
|
58
|
+
[Why - tie to requirements and constraints]
|
|
59
|
+
|
|
60
|
+
## Trade-offs
|
|
61
|
+
[What we're giving up - be honest]
|
|
62
|
+
|
|
63
|
+
## Consequences
|
|
64
|
+
- **Positive**: [Benefits]
|
|
65
|
+
- **Negative**: [Costs]
|
|
66
|
+
- **Mitigation**: [How to address]
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## ADR Storage
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
docs/
|
|
73
|
+
└── architecture/
|
|
74
|
+
├── adr-001-use-nextjs.md
|
|
75
|
+
├── adr-002-postgresql-over-mongodb.md
|
|
76
|
+
└── adr-003-adopt-repository-pattern.md
|
|
77
|
+
```
|