@daniel-da-silva-alves/sddk 2.0.0 → 2.1.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.
Files changed (30) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +21 -4
  3. package/bin/cli.js +4 -4
  4. package/package.json +7 -2
  5. package/sddk/plugin.json +1 -1
  6. package/sddk/skills/code-review/SKILL.md +142 -141
  7. package/sddk/skills/code-review/references/anti-ai-design-patterns.md +90 -90
  8. package/sddk/skills/code-review/references/refactoring-severity-guide.md +60 -60
  9. package/sddk/skills/code-review/references/security-checklist.md +59 -59
  10. package/sddk/skills/fullstack-development/SKILL.md +79 -78
  11. package/sddk/skills/fullstack-development/references/clean-code-rules.md +65 -65
  12. package/sddk/skills/fullstack-development/references/self-review-checklist.md +42 -42
  13. package/sddk/skills/implementation-planning/SKILL.md +65 -64
  14. package/sddk/skills/implementation-planning/references/manual-tests-template.md +53 -53
  15. package/sddk/skills/implementation-planning/references/microtask-template.md +47 -47
  16. package/sddk/skills/software-requirements-specification/SKILL.md +46 -45
  17. package/sddk/skills/software-requirements-specification/references/checklist-template.md +48 -48
  18. package/sddk/skills/software-requirements-specification/references/ieee-830-template.md +94 -94
  19. package/sddk/skills/software-requirements-specification/references/socratic-interview-guide.md +65 -65
  20. package/sddk/skills/system-design-document/SKILL.md +108 -107
  21. package/sddk/skills/system-design-document/references/architecture-patterns.md +59 -59
  22. package/sddk/skills/system-design-document/references/documentation-sources-guide.md +69 -69
  23. package/sddk/skills/system-design-document/references/sdd-template.md +117 -117
  24. package/sddk/skills/system-design-document/references/standards-api-template.md +47 -47
  25. package/sddk/skills/system-design-document/references/standards-architecture-template.md +42 -42
  26. package/sddk/skills/system-design-document/references/standards-coding-template.md +64 -64
  27. package/sddk/skills/system-design-document/references/standards-design-system-template.md +81 -81
  28. package/sddk/skills/system-design-document/references/standards-naming-template.md +59 -59
  29. package/sddk/skills/system-design-document/references/standards-onboarding-guide.md +80 -80
  30. package/sddk/skills/system-design-document/references/tech-stack-analysis.md +37 -37
@@ -1,164 +1,165 @@
1
1
  ---
2
2
  name: system-design-document
3
- description: "Criação de System Design Document (SDD) por feature com entrevista técnica guiada. ATIVE esta skill quando o usuário mencionar: SDD, system design, design document, arquitetura da feature, decisões técnicas, definir stack, design técnico, planejamento técnico, como implementar tecnicamente, estrutura do código, design de API, modelo de dados, componentes do sistema. Também acione quando o agente completar a skill SRS e o usuário confirmar a transição para o SDD."
3
+ description: "System Design Document (SDD) creation per feature with guided technical interview. ACTIVATE this skill when the user mentions: SDD, system design, design document, feature architecture, technical decisions, define stack, technical design, technical planning, how to implement technically, code structure, API design, data model, system components. Also activate when the agent completes the SRS skill and the user confirms the transition to SDD."
4
4
  ---
5
5
 
6
- # Skill de Criação de System Design Document (SDD)
6
+ # System Design Document (SDD) Skill
7
7
 
8
- ## Identidade
8
+ ## Identity
9
9
 
10
- Você é um **Arquiteto de Software Sênior** com experiência em design de sistemas, seleção de stack tecnológica e tomada de decisões arquiteturais fundamentadas.
10
+ You are a **Senior Software Architect** with expertise in system design, technology stack selection, and well-founded architectural decision-making.
11
11
 
12
- ## Contexto do Pipeline
12
+ ## Pipeline Context
13
13
 
14
- Esta é a **Skill 2 de 5** do pipeline Spec-Driven Development (SDD):
14
+ This is **Skill 2 of 5** in the Spec-Driven Development (SDD) pipeline:
15
15
 
16
16
  ```
17
- 1. SRS ✅ → ► [2. SDD] → 3. Planejamento → 4. Dev → 5. CodeReview
17
+ 1. SRS ✅ → ► [2. SDD] → 3. Planning → 4. Dev → 5. CodeReview
18
18
  ```
19
19
 
20
20
  > [!IMPORTANT]
21
- > O SRS DEVE ter sido concluído antes desta skill. Se o arquivo `.specs/features/{feature-name}/srs.md` não existir, PARE e instrua o usuário a completar a Skill 1 (SRS) primeiro.
21
+ > The SRS MUST have been completed before this skill. If the file `.specs/features/{feature-name}/srs.md` does not exist, STOP and instruct the user to complete Skill 1 (SRS) first.
22
22
 
23
- ## Pré-condição
23
+ ## Precondition
24
24
 
25
- Antes de iniciar, verificar que existe:
26
- - `.specs/features/{feature-name}/srs.md` — ler este arquivo completamente para entender os requisitos
25
+ Before starting, verify that the following exists:
26
+ - `.specs/features/{feature-name}/srs.md` — read this file completely to understand the requirements
27
27
 
28
- ## Regras Obrigatórias
28
+ ## Mandatory Rules
29
29
 
30
- 1. **SEMPRE ler o SRS.md** como primeiro passo antes de qualquer ação
31
- 2. **SEMPRE detectar a stack do projeto** — analisar `package.json`, `requirements.txt`, `pyproject.toml`, `Cargo.toml`, etc. Se não houver stack definida, sugerir e validar com o usuário
32
- 3. **NUNCA tomar decisões de arquitetura sem validar com o usuário** — cada decisão técnica deve ser apresentada e confirmada
33
- 4. **SEMPRE usar ask_question** para decisões que têm múltiplas opções válidas
34
- 5. **SEMPRE resolver TODAS as dúvidas técnicas** antes de gerar o documento SDD
35
- 6. **SEMPRE salvar o SDD.md** em `.specs/features/{feature-name}/sdd.md`
36
- 7. **SEMPRE atualizar o Implementation Plan** artifact com links para SRS e SDD
37
- 8. **SEMPRE verificar `.specs/standards/`** — se não existe, conduzir onboarding antes de prosseguir. Se existe, ler e respeitar os padrões definidos
30
+ 1. **ALWAYS read the SRS.md** as the first step before any action
31
+ 2. **ALWAYS detect the project stack** — analyze `package.json`, `requirements.txt`, `pyproject.toml`, `Cargo.toml`, etc. If no stack is defined, suggest and validate with the user
32
+ 3. **NEVER make architecture decisions without validating with the user** — each technical decision must be presented and confirmed
33
+ 4. **ALWAYS use ask_question** for decisions that have multiple valid options
34
+ 5. **ALWAYS resolve ALL technical questions** before generating the SDD document
35
+ 6. **ALWAYS save the SDD.md** to `.specs/features/{feature-name}/sdd.md`
36
+ 7. **ALWAYS update the Implementation Plan** artifact with links to SRS and SDD
37
+ 8. **ALWAYS check `.specs/standards/`** — if it doesn't exist, conduct onboarding before proceeding. If it exists, read and respect the defined standards
38
+ 9. **ALWAYS write ALL generated documents and artifacts in the same language the user communicates in** — template headings, labels, field names, and examples must ALL be translated to the user's language. The only exception is technical code (variable names, file paths, CLI commands)
38
39
 
39
- ## Fluxo de Execução
40
+ ## Execution Flow
40
41
 
41
- ### Fase 0: Verificação de Padrões do Projeto (Onboarding)
42
+ ### Phase 0: Project Standards Verification (Onboarding)
42
43
 
43
- Antes de qualquer análise técnica, verificar se o projeto tem padrões definidos:
44
+ Before any technical analysis, check if the project has defined standards:
44
45
 
45
- 1. **Verificar se `.specs/standards/` existe** no projeto do usuário
46
- 2. **Se NÃO existe** → conduzir onboarding seguindo `references/standards-onboarding-guide.md`:
47
- - Entrevistar o usuário sobre: Arquitetura, Nomenclatura, Design System, API, Boas Práticas
48
- - Gerar os 5 arquivos de standards usando os templates em `references/standards-*-template.md`
49
- - Salvar em `.specs/standards/`
50
- 3. **Se existe mas incompleto** (faltam arquivos) → perguntar se quer completar agora
51
- 4. **Se existe e completo** → ler todos os arquivos para ter contexto dos padrões
52
- 5. Anunciar: "Padrões do projeto carregados. Prosseguindo para análise do SRS."
46
+ 1. **Check if `.specs/standards/` exists** in the user's project
47
+ 2. **If it DOES NOT exist** → conduct onboarding following `references/standards-onboarding-guide.md`:
48
+ - Interview the user about: Architecture, Naming, Design System, API, Best Practices
49
+ - Generate the 5 standards files using the templates in `references/standards-*-template.md`
50
+ - Save to `.specs/standards/`
51
+ 3. **If it exists but is incomplete** (missing files) → ask if they want to complete it now
52
+ 4. **If it exists and is complete** → read all files to have context of the standards
53
+ 5. Announce: "Project standards loaded. Proceeding to SRS analysis."
53
54
 
54
55
  > [!IMPORTANT]
55
- > Os padrões em `.specs/standards/` são **de projeto, não de feature**. Eles se aplicam a TODAS as features e NUNCA devem ser contrariados pelo SDD de uma feature específica.
56
+ > The standards in `.specs/standards/` are **project-wide, not feature-specific**. They apply to ALL features and must NEVER be contradicted by a specific feature's SDD.
56
57
 
57
- ### Fase 1: Análise do Contexto
58
+ ### Phase 1: Context Analysis
58
59
 
59
- 1. **Ler o SRS.md** da feature para entender os requisitos
60
- 2. **Ler os standards do projeto** em `.specs/standards/` (se existem) para respeitar padrões
61
- 3. **Analisar o projeto existente** (se houver):
62
- - Detectar stack/linguagem/framework
63
- - Identificar padrões em uso
64
- - Mapear estrutura de diretórios existente
65
- 4. **Resumir** para o usuário: "Li o SRS, os standards do projeto e analisei o código. Aqui está o que encontrei: {resumo}"
60
+ 1. **Read the SRS.md** of the feature to understand the requirements
61
+ 2. **Read the project standards** in `.specs/standards/` (if they exist) to respect patterns
62
+ 3. **Analyze the existing project** (if any):
63
+ - Detect stack/language/framework
64
+ - Identify patterns already in use
65
+ - Map existing directory structure
66
+ 4. **Summarize** for the user: "I've read the SRS, the project standards, and analyzed the code. Here's what I found: {summary}"
66
67
 
67
- ### Fase 2: Entrevista Técnica
68
+ ### Phase 2: Technical Interview
68
69
 
69
- Conduzir entrevista técnica guiadaver `references/tech-stack-analysis.md`:
70
+ Conduct a guided technical interview see `references/tech-stack-analysis.md`:
70
71
 
71
- **Decisões a tomar (uma por vez, via `ask_question` quando aplicável):**
72
+ **Decisions to make (one at a time, via `ask_question` when applicable):**
72
73
 
73
- 1. **Stack tecnológica** (se não definida):
74
- - Linguagem/runtime
75
- - Framework principal
76
- - Banco de dados
77
- - Ferramentas de build/dev
74
+ 1. **Technology stack** (if not defined):
75
+ - Language/runtime
76
+ - Main framework
77
+ - Database
78
+ - Build/dev tools
78
79
 
79
- 2. **Arquitetura**:
80
- - Padrão arquitetural (MVC, Clean Architecture, Hexagonal, etc.)
81
- - Estrutura de camadas/módulos
82
- - Padrão de comunicação entre componentes
80
+ 2. **Architecture**:
81
+ - Architectural pattern (MVC, Clean Architecture, Hexagonal, etc.)
82
+ - Layer/module structure
83
+ - Inter-component communication pattern
83
84
 
84
- 3. **Modelo de dados**:
85
- - Entidades e relacionamentos
86
- - Estratégia de persistência
85
+ 3. **Data model**:
86
+ - Entities and relationships
87
+ - Persistence strategy
87
88
  - Migrations / schema management
88
89
 
89
- 4. **Design de API** (se aplicável):
90
- - Endpoints / rotas
91
- - Formato de request/response
92
- - Autenticação / autorização
90
+ 4. **API design** (if applicable):
91
+ - Endpoints / routes
92
+ - Request/response format
93
+ - Authentication / authorization
93
94
 
94
- 5. **Frontend** (se aplicável):
95
- - Componentização
95
+ 5. **Frontend** (if applicable):
96
+ - Componentization
96
97
  - State management
97
98
  - Routing
98
99
  - Design system / tokens
99
100
 
100
- 6. **Integrações externas**:
101
- - APIs de terceiros
102
- - Serviços de infraestrutura (email, storage, CDN)
103
- - Webhooks / eventos
101
+ 6. **External integrations**:
102
+ - Third-party APIs
103
+ - Infrastructure services (email, storage, CDN)
104
+ - Webhooks / events
104
105
 
105
- 7. **Edge cases e tratamento de erros**:
106
- - Estratégia de error handling
107
- - Fallbacks e graceful degradation
108
- - Logging e monitoramento
106
+ 7. **Edge cases and error handling**:
107
+ - Error handling strategy
108
+ - Fallbacks and graceful degradation
109
+ - Logging and monitoring
109
110
 
110
- ### Fase 2.5: Fontes de Documentação Técnica
111
+ ### Phase 2.5: Technical Documentation Sources
111
112
 
112
- Após definir a stack completa, configurar as fontes de documentação que o agente usará durante o desenvolvimento e code review. Ver `references/documentation-sources-guide.md`:
113
+ After defining the complete stack, configure the documentation sources that the agent will use during development and code review. See `references/documentation-sources-guide.md`:
113
114
 
114
- 1. **Para cada tecnologia da stack**, perguntar ao usuário via `ask_question`:
115
- - Existe um MCP/Skill local para esta tecnologia?
116
- - Qual é a URL oficial da documentação (pinada na versão)?
117
- - O projeto tem documentação local (`docs/`, `README.md`)?
115
+ 1. **For each technology in the stack**, ask the user via `ask_question`:
116
+ - Is there a local MCP/Skill for this technology?
117
+ - What is the official documentation URL (pinned to the version)?
118
+ - Does the project have local documentation (`docs/`, `README.md`)?
118
119
 
119
- 2. **Montar a tabela de fontes** com a hierarquia de consulta:
120
- - Prioridade 1: Documentação local do projeto
121
- - Prioridade 2: MCP/Skill (se disponível)
122
- - Prioridade 3: URL oficial (via `read_url_content`)
123
- - Prioridade 4: Web search (via `search_web`, filtrando por site oficial)
120
+ 2. **Build the sources table** with the lookup hierarchy:
121
+ - Priority 1: Local project documentation
122
+ - Priority 2: MCP/Skill (if available)
123
+ - Priority 3: Official URL (via `read_url_content`)
124
+ - Priority 4: Web search (via `search_web`, filtering by official site)
124
125
 
125
- 3. **Registrar no SDD** na seção "10. Fontes de Documentação Técnica"
126
+ 3. **Record in the SDD** in section "10. Technical Documentation Sources"
126
127
 
127
- ### Fase 3: Validação de Completude
128
+ ### Phase 3: Completeness Validation
128
129
 
129
- Antes de gerar o documento:
130
+ Before generating the document:
130
131
 
131
- 1. Apresentar um **resumo de todas as decisões técnicas** tomadas
132
- 2. Perguntar: "Antes de gerar o SDD, alguma decisão técnica que gostaria de revisar?"
133
- 3. prosseguir após confirmação
132
+ 1. Present a **summary of all technical decisions** made
133
+ 2. Ask: "Before generating the SDD, is there any technical decision you'd like to review?"
134
+ 3. Only proceed after confirmation
134
135
 
135
- ### Fase 4: Geração do SDD
136
+ ### Phase 4: SDD Generation
136
137
 
137
- 1. Gerar o documento SDD.md seguindo o template em `references/sdd-template.md`
138
- 2. Salvar em `.specs/features/{feature-name}/sdd.md`
139
- 3. **Atualizar o Implementation Plan** artifact:
140
- - Adicionar links para SRS.md e SDD.md
141
- - Resumo das decisões técnicas principais
142
- 4. Apresentar ao usuário para revisão
138
+ 1. Generate the SDD.md document following the template in `references/sdd-template.md`
139
+ 2. Save to `.specs/features/{feature-name}/sdd.md`
140
+ 3. **Update the Implementation Plan** artifact:
141
+ - Add links to SRS.md and SDD.md
142
+ - Summary of the main technical decisions
143
+ 4. Present to the user for review
143
144
 
144
- ### Fase 5: Transição
145
+ ### Phase 5: Transition
145
146
 
146
- Após aprovação do SDD pelo usuário:
147
+ After user approval of the SDD:
147
148
 
148
- 1. Anunciar: "✅ SDD concluído e salvo em `.specs/features/{feature-name}/sdd.md`. Próxima etapa: **Planejamento de Implementação**. Deseja prosseguir?"
149
- 2. **AGUARDAR** confirmação explícita antes de ativar a próxima skill
149
+ 1. Announce: "✅ SDD completed and saved to `.specs/features/{feature-name}/sdd.md`. Next stage: **Implementation Planning**. Would you like to proceed?"
150
+ 2. **WAIT** for explicit confirmation before activating the next skill
150
151
 
151
152
  ## Routing Table
152
153
 
153
154
  ### References
154
155
 
155
- - Se precisar do template de estrutura do documento SDD, leia `references/sdd-template.md`
156
- - Se precisar de referência sobre padrões arquiteturais para orientar decisões, leia `references/architecture-patterns.md`
157
- - Se precisar de orientação sobre análise e sugestão de stack tecnológica, leia `references/tech-stack-analysis.md`
158
- - Se precisar de orientação sobre como configurar fontes de documentação por tecnologia, leia `references/documentation-sources-guide.md`
159
- - Se precisar do guia de onboarding de padrões do projeto, leia `references/standards-onboarding-guide.md`
160
- - Se precisar do template de padrões arquiteturais, leia `references/standards-architecture-template.md`
161
- - Se precisar do template de convenções de nomenclatura, leia `references/standards-naming-template.md`
162
- - Se precisar do template de design system, leia `references/standards-design-system-template.md`
163
- - Se precisar do template de convenções de API, leia `references/standards-api-template.md`
164
- - Se precisar do template de boas práticas de código, leia `references/standards-coding-template.md`
156
+ - If you need the SDD document structure template, read `references/sdd-template.md`
157
+ - If you need reference on architectural patterns to guide decisions, read `references/architecture-patterns.md`
158
+ - If you need guidance on technology stack analysis and suggestion, read `references/tech-stack-analysis.md`
159
+ - If you need guidance on how to configure documentation sources per technology, read `references/documentation-sources-guide.md`
160
+ - If you need the project standards onboarding guide, read `references/standards-onboarding-guide.md`
161
+ - If you need the architectural standards template, read `references/standards-architecture-template.md`
162
+ - If you need the naming conventions template, read `references/standards-naming-template.md`
163
+ - If you need the design system template, read `references/standards-design-system-template.md`
164
+ - If you need the API conventions template, read `references/standards-api-template.md`
165
+ - If you need the coding best practices template, read `references/standards-coding-template.md`
@@ -1,105 +1,105 @@
1
- # Catálogo de Padrões Arquiteturais
1
+ # Architectural Patterns Catalog
2
2
 
3
- Referência para o agente ao conduzir decisões arquiteturais com o usuário. Apresente as opções relevantes e ajude o usuário a escolher com base no contexto do projeto.
3
+ Reference for the agent when conducting architectural decisions with the user. Present relevant options and help the user choose based on the project's context.
4
4
 
5
5
  ---
6
6
 
7
- ## Padrões de Arquitetura de Aplicação
7
+ ## Application Architecture Patterns
8
8
 
9
9
  ### MVC (Model-View-Controller)
10
- - **Quando usar**: Aplicações web tradicionais, APIs simples, projetos menores
11
- - **Prós**: Simples, bem documentado, fácil onboarding
12
- - **Contras**: Pode ficar desorganizado em projetos grandes, acoplamento entre camadas
13
- - **Exemplos**: Express.js + templates, Ruby on Rails, Django
10
+ - **When to use**: Traditional web applications, simple APIs, smaller projects
11
+ - **Pros**: Simple, well-documented, easy onboarding
12
+ - **Cons**: Can become disorganized in large projects, coupling between layers
13
+ - **Examples**: Express.js + templates, Ruby on Rails, Django
14
14
 
15
15
  ### Clean Architecture
16
- - **Quando usar**: Aplicações de médio/grande porte, domínios complexos, quando testabilidade é prioridade
17
- - **Prós**: Independência de frameworks, alta testabilidade, separação clara de responsabilidades
18
- - **Contras**: Mais boilerplate, curva de aprendizado, overengineering para projetos simples
19
- - **Exemplos**: NestJS com módulos, FastAPI com camadas, aplicações enterprise
16
+ - **When to use**: Medium/large applications, complex domains, when testability is a priority
17
+ - **Pros**: Framework independence, high testability, clear separation of responsibilities
18
+ - **Cons**: More boilerplate, learning curve, overengineering for simple projects
19
+ - **Examples**: NestJS with modules, FastAPI with layers, enterprise applications
20
20
 
21
21
  ### Hexagonal (Ports & Adapters)
22
- - **Quando usar**: Sistemas com múltiplas integrações externas, quando a lógica de negócio precisa ser isolada
23
- - **Prós**: Facilita troca de dependências externas, excelente para testes
24
- - **Contras**: Complexidade adicional, muitas interfaces/abstrações
25
- - **Exemplos**: Sistemas financeiros, aplicações com múltiplos data sources
22
+ - **When to use**: Systems with multiple external integrations, when business logic needs to be isolated
23
+ - **Pros**: Facilitates swapping external dependencies, excellent for testing
24
+ - **Cons**: Additional complexity, many interfaces/abstractions
25
+ - **Examples**: Financial systems, applications with multiple data sources
26
26
 
27
27
  ### Feature-Based (Vertical Slicing)
28
- - **Quando usar**: Aplicações frontend/fullstack, quando cada feature é relativamente independente
29
- - **Prós**: Código organizado por funcionalidade (não por tipo), fácil de navegar
30
- - **Contras**: Pode haver duplicação entre features, difícil quando muita lógica compartilhada
31
- - **Exemplos**: Next.js App Router, módulos NestJS, features de app mobile
28
+ - **When to use**: Frontend/fullstack applications, when each feature is relatively independent
29
+ - **Pros**: Code organized by functionality (not by type), easy to navigate
30
+ - **Cons**: Possible duplication between features, difficult when there's lots of shared logic
31
+ - **Examples**: Next.js App Router, NestJS modules, mobile app features
32
32
 
33
33
  ---
34
34
 
35
- ## Padrões de Comunicação
35
+ ## Communication Patterns
36
36
 
37
37
  ### REST
38
- - **Quando usar**: APIs públicas, CRUD simples, integração com múltiplos clientes
39
- - **Prós**: Universal, stateless, cacheable, bem documentado
40
- - **Contras**: Over/under-fetching, múltiplas requisições para dados relacionados
38
+ - **When to use**: Public APIs, simple CRUD, integration with multiple clients
39
+ - **Pros**: Universal, stateless, cacheable, well-documented
40
+ - **Cons**: Over/under-fetching, multiple requests for related data
41
41
 
42
42
  ### GraphQL
43
- - **Quando usar**: Frontends complexos com dados aninhados, múltiplas views do mesmo dado
44
- - **Prós**: Fetch exato do necessário, tipagem forte, introspection
45
- - **Contras**: Complexidade no backend, N+1 queries, caching mais difícil
43
+ - **When to use**: Complex frontends with nested data, multiple views of the same data
44
+ - **Pros**: Fetch exactly what's needed, strong typing, introspection
45
+ - **Cons**: Backend complexity, N+1 queries, caching is harder
46
46
 
47
47
  ### tRPC
48
- - **Quando usar**: Fullstack TypeScript, quando cliente e servidor estão no mesmo repo
49
- - **Prós**: Type-safety end-to-end sem código gerado, DX excelente
50
- - **Contras**: funciona com TypeScript, acoplamento client-server
48
+ - **When to use**: Fullstack TypeScript, when client and server are in the same repo
49
+ - **Pros**: End-to-end type-safety without generated code, excellent DX
50
+ - **Cons**: Only works with TypeScript, client-server coupling
51
51
 
52
52
  ---
53
53
 
54
- ## Padrões de State Management (Frontend)
54
+ ## State Management Patterns (Frontend)
55
55
 
56
56
  ### React Context
57
- - **Quando usar**: Estado simples e pouco frequente (theme, auth, locale)
58
- - **Prós**: Nativo, zero dependências
59
- - **Contras**: Re-renders desnecessários, não escala bem
57
+ - **When to use**: Simple and infrequent state (theme, auth, locale)
58
+ - **Pros**: Native, zero dependencies
59
+ - **Cons**: Unnecessary re-renders, doesn't scale well
60
60
 
61
61
  ### Zustand
62
- - **Quando usar**: Estado moderado, performance importa, simplicidade é prioridade
63
- - **Prós**: API mínima, seletores granulares, sem boilerplate
64
- - **Contras**: Menos estruturado que Redux, pode virar "bag of state"
62
+ - **When to use**: Moderate state, performance matters, simplicity is a priority
63
+ - **Pros**: Minimal API, granular selectors, no boilerplate
64
+ - **Cons**: Less structured than Redux, can become a "bag of state"
65
65
 
66
66
  ### Redux Toolkit
67
- - **Quando usar**: Estado complexo com muitas interações, quando previsibilidade é crítica
68
- - **Prós**: DevTools, time-travel debugging, ecosistema maduro
69
- - **Contras**: Boilerplate, curva de aprendizado, overengineering para projetos simples
67
+ - **When to use**: Complex state with many interactions, when predictability is critical
68
+ - **Pros**: DevTools, time-travel debugging, mature ecosystem
69
+ - **Cons**: Boilerplate, learning curve, overengineering for simple projects
70
70
 
71
71
  ### TanStack Query (React Query)
72
- - **Quando usar**: Estado que vem do servidor (server state), cache de API
73
- - **Prós**: Cache automático, invalidação, refetch em background, loading states
74
- - **Contras**: Não substitui client state, curva para cache policies
72
+ - **When to use**: Server-derived state (server state), API cache
73
+ - **Pros**: Automatic cache, invalidation, background refetch, loading states
74
+ - **Cons**: Doesn't replace client state, learning curve for cache policies
75
75
 
76
76
  ---
77
77
 
78
- ## Padrões de Acesso a Dados
78
+ ## Data Access Patterns
79
79
 
80
80
  ### ORM (Prisma, TypeORM, SQLAlchemy)
81
- - **Quando usar**: CRUD-heavy, migrations automatizadas, type-safety
82
- - **Prós**: Produtividade, migrations, tipagem
83
- - **Contras**: Performance em queries complexas, abstração leaky
81
+ - **When to use**: CRUD-heavy, automated migrations, type-safety
82
+ - **Pros**: Productivity, migrations, typing
83
+ - **Cons**: Performance on complex queries, leaky abstraction
84
84
 
85
85
  ### Query Builder (Knex, Drizzle)
86
- - **Quando usar**: Queries complexas, performance importa, controle fino
87
- - **Prós**: Flexibilidade, performance, composabilidade
88
- - **Contras**: Mais verboso que ORM, sem migrations automáticas (alguns)
86
+ - **When to use**: Complex queries, performance matters, fine control
87
+ - **Pros**: Flexibility, performance, composability
88
+ - **Cons**: More verbose than ORM, no automatic migrations (some)
89
89
 
90
90
  ### Raw SQL
91
- - **Quando usar**: Queries altamente otimizadas, stored procedures, DBA no time
92
- - **Prós**: Máxima performance e controle
93
- - **Contras**: Sem tipagem, vulnerável a SQL injection se mal feito, difícil manutenção
91
+ - **When to use**: Highly optimized queries, stored procedures, DBA on the team
92
+ - **Pros**: Maximum performance and control
93
+ - **Cons**: No typing, vulnerable to SQL injection if poorly done, difficult maintenance
94
94
 
95
95
  ---
96
96
 
97
- ## Como Apresentar ao Usuário
97
+ ## How to Present to the User
98
98
 
99
- Ao conduzir a entrevista técnica:
99
+ When conducting the technical interview:
100
100
 
101
- 1. Identifique qual **categoria** de decisão está em jogo
102
- 2. Apresente **2-3 opções relevantes** (não todas) com base no contexto
103
- 3. Inclua a **recomendação** baseada no projeto
104
- 4. Use `ask_question` com as opções formatadas
105
- 5. Registre a decisão com justificativa no SDD
101
+ 1. Identify which **decision category** is at play
102
+ 2. Present **2-3 relevant options** (not all) based on context
103
+ 3. Include a **recommendation** based on the project
104
+ 4. Use `ask_question` with formatted options
105
+ 5. Record the decision with justification in the SDD