@onion-architect-ai/cli 4.1.0-beta.1 → 4.1.0-beta.3
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/dist/cli.js +8 -19
- package/dist/cli.js.map +1 -1
- package/package.json +4 -3
- package/templates/.cursor/agents/compliance/iso-22301-specialist.md +917 -0
- package/templates/.cursor/agents/compliance/iso-27001-specialist.md +641 -0
- package/templates/.cursor/agents/compliance/pmbok-specialist.md +669 -0
- package/templates/.cursor/agents/compliance/security-information-master.md +824 -0
- package/templates/.cursor/agents/compliance/soc2-specialist.md +818 -0
- package/templates/.cursor/agents/deployment/docker-specialist.md +1192 -0
- package/templates/.cursor/agents/meta/agent-creator-specialist.md +1135 -0
- package/templates/.cursor/agents/meta/command-creator-specialist.md +1519 -0
- package/templates/.cursor/agents/meta/metaspec-gate-keeper.md +240 -0
- package/templates/.cursor/agents/meta/onion.md +753 -0
- package/templates/.cursor/agents/research/research-agent.md +292 -0
- package/templates/.cursor/agents/review/corporate-compliance-specialist.md +370 -0
- package/templates/.cursor/commands/common/prompts/README.md +187 -0
- package/templates/.cursor/commands/common/prompts/clickup-patterns.md +144 -0
- package/templates/.cursor/commands/common/prompts/code-review-checklist.md +168 -0
- package/templates/.cursor/commands/common/prompts/git-workflow-patterns.md +235 -0
- package/templates/.cursor/commands/common/prompts/output-formats.md +240 -0
- package/templates/.cursor/commands/common/prompts/technical.md +172 -0
- package/templates/.cursor/commands/common/prompts/validation-rules.md +173 -0
- package/templates/.cursor/commands/common/templates/abstraction-template.md +400 -0
- package/templates/.cursor/commands/common/templates/agent-template.md +353 -0
- package/templates/.cursor/commands/common/templates/business_context_template.md +748 -0
- package/templates/.cursor/commands/common/templates/command-template.md +273 -0
- package/templates/.cursor/commands/common/templates/technical_context_template.md +526 -0
- package/templates/.cursor/commands/development/runflow-dev.md +465 -0
- package/templates/.cursor/commands/docs/build-compliance-docs.md +143 -0
- package/templates/.cursor/commands/git/README.md +606 -0
- package/templates/.cursor/commands/meta/all-tools.md +50 -0
- package/templates/.cursor/commands/meta/analyze-complex-problem.md +186 -0
- package/templates/.cursor/commands/meta/create-abstraction.md +859 -0
- package/templates/.cursor/commands/meta/create-agent-express.md +83 -0
- package/templates/.cursor/commands/meta/create-agent.md +210 -0
- package/templates/.cursor/commands/meta/create-command.md +203 -0
- package/templates/.cursor/commands/meta/create-knowledge-base.md +143 -0
- package/templates/.cursor/commands/meta/create-task-structure.md +150 -0
- package/templates/.cursor/commands/meta/setup-integration.md +257 -0
- package/templates/.cursor/commands/onion/setup.md +843 -0
- package/templates/.cursor/commands/onion.md +168 -0
- package/templates/.cursor/commands/product/README.md +230 -0
- package/templates/.cursor/commands/quick/analisys.md +17 -0
- package/templates/.cursor/commands/validate/collab/pair-testing.md +633 -0
- package/templates/.cursor/commands/validate/collab/three-amigos.md +505 -0
- package/templates/.cursor/commands/validate/qa-points/estimate.md +660 -0
- package/templates/.cursor/commands/validate/test-strategy/analyze.md +1134 -0
- package/templates/.cursor/commands/validate/test-strategy/create.md +392 -0
- package/templates/.cursor/commands/validate/workflow.md +360 -0
- package/templates/.cursor/commands/warm-up.md +91 -0
- package/templates/.cursor/docs/architecture/acoplamento-clickup-problema-analise.md +446 -0
- package/templates/.cursor/docs/architecture/desacoplamento-roadmap.md +360 -0
- package/templates/.cursor/docs/architecture/validacao-fase-1.md +219 -0
- package/templates/.cursor/docs/c4/c4-detection-rules.md +395 -0
- package/templates/.cursor/docs/c4/c4-documentation-templates.md +579 -0
- package/templates/.cursor/docs/c4/c4-mermaid-patterns.md +331 -0
- package/templates/.cursor/docs/c4/c4-templates.md +256 -0
- package/templates/.cursor/docs/clickup/clickup-acceptance-criteria-strategy.md +329 -0
- package/templates/.cursor/docs/clickup/clickup-auto-update-strategy.md +318 -0
- package/templates/.cursor/docs/clickup/clickup-comment-formatter.md +239 -0
- package/templates/.cursor/docs/clickup/clickup-description-fix.md +355 -0
- package/templates/.cursor/docs/clickup/clickup-dual-comment-strategy.md +505 -0
- package/templates/.cursor/docs/clickup/clickup-formatting.md +302 -0
- package/templates/.cursor/docs/clickup/separador-tamanho-otimizado.md +256 -0
- package/templates/.cursor/docs/engineer/pre-pr-acceptance-validation.md +256 -0
- package/templates/.cursor/docs/onion/ESPERANTO.md +278 -0
- package/templates/.cursor/docs/onion/agents-reference.md +832 -0
- package/templates/.cursor/docs/onion/clickup-integration.md +738 -0
- package/templates/.cursor/docs/onion/commands-guide.md +807 -0
- package/templates/.cursor/docs/onion/engineering-flows.md +865 -0
- package/templates/.cursor/docs/onion/getting-started.md +741 -0
- package/templates/.cursor/docs/onion/maintenance-checklist.md +388 -0
- package/templates/.cursor/docs/onion/naming-conventions.md +268 -0
- package/templates/.cursor/docs/onion/practical-examples.md +782 -0
- package/templates/.cursor/docs/product/story-points-integration.md +254 -0
- package/templates/.cursor/docs/product/story-points-validation.md +224 -0
- package/templates/.cursor/docs/reviews/task-manager-docs-review-2025-11-24.md +167 -0
- package/templates/.cursor/docs/strategies/clickup-comment-patterns.md +766 -0
- package/templates/.cursor/docs/strategies/clickup-integration-tests.md +599 -0
- package/templates/.cursor/docs/strategies/clickup-mcp-wrappers-tests.md +854 -0
- package/templates/.cursor/docs/strategies/clickup-regression-tests.md +589 -0
- package/templates/.cursor/docs/strategies/visual-patterns.md +308 -0
- package/templates/.cursor/docs/templates/README.md +624 -0
- package/templates/.cursor/docs/templates/adr-template.md +226 -0
- package/templates/.cursor/docs/templates/analysis-template.md +280 -0
- package/templates/.cursor/docs/templates/execution-plan-template.md +430 -0
- package/templates/.cursor/docs/templates/guide-template.md +367 -0
- package/templates/.cursor/docs/templates/phase-execution-prompt-template.md +504 -0
- package/templates/.cursor/docs/templates/reference-template.md +522 -0
- package/templates/.cursor/docs/templates/solution-template.md +390 -0
- package/templates/.cursor/docs/tools/README.md +325 -0
- package/templates/.cursor/docs/tools/agents.md +330 -0
- package/templates/.cursor/docs/tools/commands.md +606 -0
- package/templates/.cursor/docs/tools/cursor.md +498 -0
- package/templates/.cursor/docs/tools/mcps.md +858 -0
- package/templates/.cursor/docs/tools/rules.md +423 -0
- package/templates/.cursor/rules/language-and-documentation.mdc +371 -0
- package/templates/.cursor/rules/onion-patterns.mdc +197 -0
- package/templates/.cursor/rules/validation-rules.mdc +194 -0
- package/templates/.cursor/utils/clickup-mcp-wrappers.md +671 -0
- package/templates/.cursor/utils/date-time-standards.md +182 -0
- package/templates/.cursor/utils/task-manager/README.md +94 -0
- package/templates/.cursor/utils/task-manager/adapters/asana.md +377 -0
- package/templates/.cursor/utils/task-manager/adapters/clickup.md +467 -0
- package/templates/.cursor/utils/task-manager/adapters/linear.md +421 -0
- package/templates/.cursor/utils/task-manager/detector.md +290 -0
- package/templates/.cursor/utils/task-manager/factory.md +363 -0
- package/templates/.cursor/utils/task-manager/interface.md +248 -0
- package/templates/.cursor/utils/task-manager/types.md +409 -0
- package/templates/.cursor/validation/product-task-validation.md +344 -0
- package/templates/.onion/contexts/business/.context-config.yml +52 -0
- package/templates/.onion/contexts/business/README.md +222 -0
- package/templates/.onion/contexts/business/agents/branding-specialist.md +1030 -0
- package/templates/.onion/contexts/business/agents/clickup-specialist.md +397 -0
- package/templates/.onion/contexts/business/agents/extract-meeting-specialist.md +395 -0
- package/templates/.onion/contexts/business/agents/gamma-specialist.md +1169 -0
- package/templates/.onion/contexts/business/agents/meeting-consolidator.md +483 -0
- package/templates/.onion/contexts/business/agents/pain-price-specialist.md +509 -0
- package/templates/.onion/contexts/business/agents/presentation-orchestrator.md +1191 -0
- package/templates/.onion/contexts/business/agents/product-agent.md +202 -0
- package/templates/.onion/contexts/business/agents/story-points-specialist.md +539 -0
- package/templates/.onion/contexts/business/agents/storytelling-specialist.md +891 -0
- package/templates/.onion/contexts/business/agents/task-specialist.md +618 -0
- package/templates/.onion/contexts/business/agents/whisper-specialist.md +373 -0
- package/templates/.onion/contexts/business/commands/advanced/analyze-pain-price.md +709 -0
- package/templates/.onion/contexts/business/commands/advanced/branding.md +460 -0
- package/templates/.onion/contexts/business/commands/advanced/checklist-sync.md +241 -0
- package/templates/.onion/contexts/business/commands/advanced/presentation.md +189 -0
- package/templates/.onion/contexts/business/commands/advanced/transform-consolidated.md +592 -0
- package/templates/.onion/contexts/business/commands/help.md +212 -0
- package/templates/.onion/contexts/business/commands/intermediate/check.md +48 -0
- package/templates/.onion/contexts/business/commands/intermediate/collect.md +96 -0
- package/templates/.onion/contexts/business/commands/intermediate/consolidate-meetings.md +306 -0
- package/templates/.onion/contexts/business/commands/intermediate/convert-to-tasks.md +220 -0
- package/templates/.onion/contexts/business/commands/intermediate/extract-meeting.md +241 -0
- package/templates/.onion/contexts/business/commands/intermediate/feature.md +431 -0
- package/templates/.onion/contexts/business/commands/intermediate/light-arch.md +97 -0
- package/templates/.onion/contexts/business/commands/intermediate/task-check.md +340 -0
- package/templates/.onion/contexts/business/commands/intermediate/validate-task.md +294 -0
- package/templates/.onion/contexts/business/commands/intermediate/whisper.md +325 -0
- package/templates/.onion/contexts/business/commands/starter/estimate.md +519 -0
- package/templates/.onion/contexts/business/commands/starter/refine.md +186 -0
- package/templates/.onion/contexts/business/commands/starter/spec.md +107 -0
- package/templates/.onion/contexts/business/commands/starter/task.md +585 -0
- package/templates/.onion/contexts/business/commands/starter/warm-up.md +187 -0
- package/templates/.onion/contexts/technical/.context-config.yml +64 -0
- package/templates/.onion/contexts/technical/README.md +238 -0
- package/templates/.onion/contexts/technical/agents/branch-code-reviewer.md +200 -0
- package/templates/.onion/contexts/technical/agents/branch-doc-writer.md +162 -0
- package/templates/.onion/contexts/technical/agents/branch-metaspec-checker.md +68 -0
- package/templates/.onion/contexts/technical/agents/branch-test-planner.md +177 -0
- package/templates/.onion/contexts/technical/agents/c4-architecture-specialist.md +712 -0
- package/templates/.onion/contexts/technical/agents/c4-documentation-specialist.md +658 -0
- package/templates/.onion/contexts/technical/agents/code-reviewer.md +155 -0
- package/templates/.onion/contexts/technical/agents/cursor-specialist.md +249 -0
- package/templates/.onion/contexts/technical/agents/docs-reverse-engineer.md +418 -0
- package/templates/.onion/contexts/technical/agents/gitflow-specialist.md +1207 -0
- package/templates/.onion/contexts/technical/agents/linux-security-specialist.md +676 -0
- package/templates/.onion/contexts/technical/agents/mermaid-specialist.md +516 -0
- package/templates/.onion/contexts/technical/agents/nodejs-specialist.md +673 -0
- package/templates/.onion/contexts/technical/agents/nx-migration-specialist.md +867 -0
- package/templates/.onion/contexts/technical/agents/nx-monorepo-specialist.md +619 -0
- package/templates/.onion/contexts/technical/agents/postgres-specialist.md +1124 -0
- package/templates/.onion/contexts/technical/agents/react-developer.md +132 -0
- package/templates/.onion/contexts/technical/agents/runflow-specialist.md +278 -0
- package/templates/.onion/contexts/technical/agents/system-doc-orchestrator.md +1388 -0
- package/templates/.onion/contexts/technical/agents/test-agent.md +425 -0
- package/templates/.onion/contexts/technical/agents/test-engineer.md +295 -0
- package/templates/.onion/contexts/technical/agents/test-planner.md +118 -0
- package/templates/.onion/contexts/technical/agents/zen-engine-specialist.md +421 -0
- package/templates/.onion/contexts/technical/commands/advanced/bump.md +43 -0
- package/templates/.onion/contexts/technical/commands/advanced/consolidate-documents.md +424 -0
- package/templates/.onion/contexts/technical/commands/advanced/e2e.md +392 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-finish.md +90 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-publish.md +91 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-start.md +158 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix-finish.md +98 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix-start.md +94 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix.md +186 -0
- package/templates/.onion/contexts/technical/commands/advanced/refine-vision.md +27 -0
- package/templates/.onion/contexts/technical/commands/advanced/release-finish.md +98 -0
- package/templates/.onion/contexts/technical/commands/advanced/release-start.md +95 -0
- package/templates/.onion/contexts/technical/commands/advanced/reverse-consolidate.md +160 -0
- package/templates/.onion/contexts/technical/commands/advanced/validate-phase-sync.md +118 -0
- package/templates/.onion/contexts/technical/commands/help.md +329 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-business-docs.md +276 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-index.md +128 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-tech-docs.md +204 -0
- package/templates/.onion/contexts/technical/commands/intermediate/code-review.md +215 -0
- package/templates/.onion/contexts/technical/commands/intermediate/docs-health.md +142 -0
- package/templates/.onion/contexts/technical/commands/intermediate/fast-commit.md +45 -0
- package/templates/.onion/contexts/technical/commands/intermediate/integration.md +523 -0
- package/templates/.onion/contexts/technical/commands/intermediate/pr-update.md +198 -0
- package/templates/.onion/contexts/technical/commands/intermediate/pre-pr.md +91 -0
- package/templates/.onion/contexts/technical/commands/intermediate/start.md +266 -0
- package/templates/.onion/contexts/technical/commands/intermediate/sync-sessions.md +320 -0
- package/templates/.onion/contexts/technical/commands/intermediate/unit.md +378 -0
- package/templates/.onion/contexts/technical/commands/intermediate/validate-docs.md +159 -0
- package/templates/.onion/contexts/technical/commands/starter/docs.md +39 -0
- package/templates/.onion/contexts/technical/commands/starter/help.md +306 -0
- package/templates/.onion/contexts/technical/commands/starter/init.md +139 -0
- package/templates/.onion/contexts/technical/commands/starter/plan.md +111 -0
- package/templates/.onion/contexts/technical/commands/starter/pr.md +136 -0
- package/templates/.onion/contexts/technical/commands/starter/sync.md +228 -0
- package/templates/.onion/contexts/technical/commands/starter/warm-up.md +173 -0
- package/templates/.onion/contexts/technical/commands/starter/work.md +169 -0
- package/templates/.onion/core/commands/help.md +388 -0
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Language and Documentation Standards
|
|
3
|
+
description: Regras de idioma, documentação e fluxo de trabalho para o projeto
|
|
4
|
+
tags: [language, documentation, workflow, standards]
|
|
5
|
+
priority: high
|
|
6
|
+
version: 3.0.0
|
|
7
|
+
globs: ["**/*"]
|
|
8
|
+
alwaysApply: true
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Language and Documentation Standards
|
|
12
|
+
|
|
13
|
+
## 🎯 Objetivo
|
|
14
|
+
|
|
15
|
+
Estabelecer padrões consistentes de idioma e documentação em todo o projeto, garantindo que código seja universal (inglês) enquanto comunicação e explicações sejam localizadas (pt-BR).
|
|
16
|
+
|
|
17
|
+
## 📋 Regras Fundamentais
|
|
18
|
+
|
|
19
|
+
### 1. Idiomas no Código
|
|
20
|
+
|
|
21
|
+
#### ✅ SEMPRE em Inglês (en-US)
|
|
22
|
+
- **Nomes de variáveis, funções, classes e interfaces**
|
|
23
|
+
```typescript
|
|
24
|
+
// ✅ CORRETO
|
|
25
|
+
interface UserProfile {
|
|
26
|
+
userName: string;
|
|
27
|
+
createdAt: Date;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// ❌ INCORRETO
|
|
31
|
+
interface PerfilUsuario {
|
|
32
|
+
nomeUsuario: string;
|
|
33
|
+
criadoEm: Date;
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
- **Nomes de arquivos e diretórios**
|
|
38
|
+
```
|
|
39
|
+
✅ user-profile.component.tsx
|
|
40
|
+
✅ authentication-service.ts
|
|
41
|
+
❌ perfil-usuario.component.tsx
|
|
42
|
+
❌ servico-autenticacao.ts
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
- **Commits no Git**
|
|
46
|
+
```bash
|
|
47
|
+
# ✅ CORRETO
|
|
48
|
+
git commit -m "feat: add user authentication flow"
|
|
49
|
+
|
|
50
|
+
# ❌ INCORRETO
|
|
51
|
+
git commit -m "feat: adicionar fluxo de autenticação"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- **Nomes de branches**
|
|
55
|
+
```bash
|
|
56
|
+
✅ feature/user-dashboard
|
|
57
|
+
✅ fix/authentication-bug
|
|
58
|
+
❌ feature/painel-usuario
|
|
59
|
+
❌ fix/erro-autenticacao
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
- **Documentação técnica de API (schemas, endpoints, responses)**
|
|
63
|
+
|
|
64
|
+
#### ✅ SEMPRE em Português (pt-BR)
|
|
65
|
+
- **Comentários no código**
|
|
66
|
+
```typescript
|
|
67
|
+
// ✅ CORRETO
|
|
68
|
+
/**
|
|
69
|
+
* Busca o perfil do usuário no banco de dados
|
|
70
|
+
* @param userId - ID único do usuário
|
|
71
|
+
* @returns Perfil completo ou null se não encontrado
|
|
72
|
+
*/
|
|
73
|
+
async function getUserProfile(userId: string): Promise<UserProfile | null> {
|
|
74
|
+
// Valida se o ID é válido antes de fazer a consulta
|
|
75
|
+
if (!isValidUUID(userId)) {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
// ... resto da implementação
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// ❌ INCORRETO
|
|
82
|
+
/**
|
|
83
|
+
* Fetch user profile from database
|
|
84
|
+
* @param userId - Unique user ID
|
|
85
|
+
* @returns Full profile or null if not found
|
|
86
|
+
*/
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
- **Respostas e explicações do assistente IA**
|
|
90
|
+
- **Documentação de processos e workflows**
|
|
91
|
+
- **READMEs e guias de uso** (exceto código e comandos)
|
|
92
|
+
- **Mensagens de erro personalizadas para usuários finais**
|
|
93
|
+
- **Logs de aplicação voltados para debugging**
|
|
94
|
+
|
|
95
|
+
### 2. Documentação do Projeto
|
|
96
|
+
|
|
97
|
+
#### ✅ Manter Sincronizado com a Documentação
|
|
98
|
+
- **Antes de implementar qualquer mudança estrutural:**
|
|
99
|
+
1. Consultar documentação existente em `/docs/`
|
|
100
|
+
2. Verificar padrões estabelecidos em `.cursor/commands/`
|
|
101
|
+
3. Revisar agentes especializados em `.cursor/agents/`
|
|
102
|
+
4. Ler regras de projeto em `.cursor/rules/`
|
|
103
|
+
|
|
104
|
+
- **Ao introduzir novos padrões:**
|
|
105
|
+
1. Documentar em `.cursor/docs/` ou `/docs/` conforme apropriado
|
|
106
|
+
2. Atualizar comandos relacionados em `.cursor/commands/`
|
|
107
|
+
3. Notificar sobre mudanças em padrões estabelecidos
|
|
108
|
+
|
|
109
|
+
#### ✅ Hierarquia de Documentação
|
|
110
|
+
```
|
|
111
|
+
/docs/ # Documentação de negócio e produto
|
|
112
|
+
├── meta-specs/ # Especificações meta do projeto
|
|
113
|
+
├── technical-context/ # Contexto técnico e arquitetura
|
|
114
|
+
└── business-context/ # Contexto de negócio
|
|
115
|
+
|
|
116
|
+
.cursor/ # Documentação de desenvolvimento
|
|
117
|
+
├── docs/ # Documentação de processo e workflow
|
|
118
|
+
│ ├── templates/ # Templates reutilizáveis
|
|
119
|
+
│ └── guides/ # Guias específicos
|
|
120
|
+
├── commands/ # Comandos Cursor
|
|
121
|
+
│ ├── meta/ # Comandos meta (criar comandos, etc)
|
|
122
|
+
│ ├── development/ # Comandos de desenvolvimento
|
|
123
|
+
│ └── docs/ # Comandos de documentação
|
|
124
|
+
├── agents/ # Agentes especializados
|
|
125
|
+
│ ├── meta/ # Agentes meta (Onion, etc)
|
|
126
|
+
│ └── development/ # Agentes de desenvolvimento
|
|
127
|
+
└── rules/ # Regras do projeto (este arquivo)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### 3. Sintaxes e Estratégias Oficiais
|
|
131
|
+
|
|
132
|
+
#### ✅ SEMPRE Consultar Documentação Oficial
|
|
133
|
+
- **ZenStack**: Usar sempre a sintaxe da versão oficial no projeto
|
|
134
|
+
- **NX**: Seguir padrões de workspace da versão instalada
|
|
135
|
+
- **Tamagui**: Aderir às convenções de componentes universais
|
|
136
|
+
- **Expo**: Respeitar limitações e features do SDK atual
|
|
137
|
+
- **React Native**: Seguir patterns recomendados pela versão em uso
|
|
138
|
+
|
|
139
|
+
#### ⚠️ NUNCA Inventar Sintaxe
|
|
140
|
+
- Verificar documentação oficial antes de implementar
|
|
141
|
+
- Testar em sandbox se houver dúvida
|
|
142
|
+
- Documentar desvios necessários com justificativa
|
|
143
|
+
|
|
144
|
+
### 4. Workflow de Execução
|
|
145
|
+
|
|
146
|
+
#### ✅ SEMPRE Antes de Finalizar
|
|
147
|
+
1. **Propor próximo passo lógico:**
|
|
148
|
+
```markdown
|
|
149
|
+
## 🚀 Próximo Passo Sugerido
|
|
150
|
+
|
|
151
|
+
Agora que criamos [X], o próximo passo recomendado é:
|
|
152
|
+
|
|
153
|
+
**Opção 1 (Recomendada):** [Ação + Justificativa]
|
|
154
|
+
**Opção 2:** [Ação Alternativa + Justificativa]
|
|
155
|
+
|
|
156
|
+
Deseja prosseguir com alguma dessas opções ou tem outra prioridade?
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
2. **Validar conformidade:**
|
|
160
|
+
- ✅ Código em inglês?
|
|
161
|
+
- ✅ Comentários em pt-BR?
|
|
162
|
+
- ✅ Documentação atualizada?
|
|
163
|
+
- ✅ Padrões do projeto respeitados?
|
|
164
|
+
|
|
165
|
+
3. **Oferecer comando para continuar:**
|
|
166
|
+
```markdown
|
|
167
|
+
**Comando sugerido:**
|
|
168
|
+
`/development/test-integration --component=UserProfile`
|
|
169
|
+
|
|
170
|
+
ou
|
|
171
|
+
|
|
172
|
+
`@onion "implementar testes unitários para UserProfile"`
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## 🔄 Fluxo de Trabalho Completo
|
|
176
|
+
|
|
177
|
+
```mermaid
|
|
178
|
+
graph TD
|
|
179
|
+
A[Receber Tarefa] --> B{Consultar Documentação}
|
|
180
|
+
B --> C[Verificar Padrões Existentes]
|
|
181
|
+
C --> D[Implementar em Inglês]
|
|
182
|
+
D --> E[Comentar em pt-BR]
|
|
183
|
+
E --> F[Validar Conformidade]
|
|
184
|
+
F --> G{Tudo OK?}
|
|
185
|
+
G -->|Não| H[Corrigir]
|
|
186
|
+
H --> F
|
|
187
|
+
G -->|Sim| I[Propor Próximo Passo]
|
|
188
|
+
I --> J[Aguardar Decisão]
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## 📚 Exemplos Práticos
|
|
192
|
+
|
|
193
|
+
### Exemplo 1: Criação de Componente
|
|
194
|
+
|
|
195
|
+
```typescript
|
|
196
|
+
// ✅ CORRETO: Código em inglês, comentários em pt-BR
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Componente de perfil de usuário com informações básicas
|
|
200
|
+
*
|
|
201
|
+
* @component
|
|
202
|
+
* @example
|
|
203
|
+
* ```tsx
|
|
204
|
+
* <UserProfileCard userId="123" showActions={true} />
|
|
205
|
+
* ```
|
|
206
|
+
*/
|
|
207
|
+
export const UserProfileCard: React.FC<UserProfileCardProps> = ({
|
|
208
|
+
userId,
|
|
209
|
+
showActions = false
|
|
210
|
+
}) => {
|
|
211
|
+
// Busca os dados do usuário usando o hook do ZenStack
|
|
212
|
+
const { data: user, isLoading } = useFindUniqueUser({
|
|
213
|
+
where: { id: userId }
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
// Exibe skeleton enquanto carrega
|
|
217
|
+
if (isLoading) {
|
|
218
|
+
return <ProfileSkeleton />;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// Se não encontrou, exibe mensagem
|
|
222
|
+
if (!user) {
|
|
223
|
+
return <EmptyState message="Usuário não encontrado" />;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return (
|
|
227
|
+
<Card>
|
|
228
|
+
<CardHeader>
|
|
229
|
+
<Avatar src={user.avatarUrl} alt={user.name} />
|
|
230
|
+
<Title>{user.name}</Title>
|
|
231
|
+
</CardHeader>
|
|
232
|
+
{showActions && (
|
|
233
|
+
<CardActions>
|
|
234
|
+
{/* Botões de ação do perfil */}
|
|
235
|
+
<Button variant="primary">Editar</Button>
|
|
236
|
+
<Button variant="secondary">Mensagem</Button>
|
|
237
|
+
</CardActions>
|
|
238
|
+
)}
|
|
239
|
+
</Card>
|
|
240
|
+
);
|
|
241
|
+
};
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Exemplo 2: Documentação de Feature
|
|
245
|
+
|
|
246
|
+
```markdown
|
|
247
|
+
# User Authentication Flow
|
|
248
|
+
|
|
249
|
+
## Descrição
|
|
250
|
+
|
|
251
|
+
Sistema de autenticação multi-fator implementado com ZenStack e NextAuth.
|
|
252
|
+
|
|
253
|
+
## Componentes Principais
|
|
254
|
+
|
|
255
|
+
### `AuthProvider`
|
|
256
|
+
Provedor de contexto que gerencia o estado de autenticação em toda a aplicação.
|
|
257
|
+
|
|
258
|
+
**Uso:**
|
|
259
|
+
\`\`\`tsx
|
|
260
|
+
import { AuthProvider } from '@company/auth';
|
|
261
|
+
|
|
262
|
+
function App() {
|
|
263
|
+
return (
|
|
264
|
+
<AuthProvider>
|
|
265
|
+
<YourApp />
|
|
266
|
+
</AuthProvider>
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
\`\`\`
|
|
270
|
+
|
|
271
|
+
## Fluxo de Autenticação
|
|
272
|
+
|
|
273
|
+
1. Usuário acessa página de login
|
|
274
|
+
2. Insere credenciais (email + senha)
|
|
275
|
+
3. Sistema valida no banco de dados
|
|
276
|
+
4. Se MFA habilitado, solicita código
|
|
277
|
+
5. Gera token JWT e armazena no cookie seguro
|
|
278
|
+
6. Redireciona para dashboard
|
|
279
|
+
|
|
280
|
+
## Próximos Passos
|
|
281
|
+
|
|
282
|
+
- [ ] Implementar autenticação biométrica
|
|
283
|
+
- [ ] Adicionar login social (Google, Facebook)
|
|
284
|
+
- [ ] Melhorar UX do fluxo de MFA
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
## ⚡ Quick Reference
|
|
288
|
+
|
|
289
|
+
| Contexto | Idioma | Exemplo |
|
|
290
|
+
|----------|--------|---------|
|
|
291
|
+
| Código (vars, funcs, classes) | 🇺🇸 Inglês | `getUserProfile()` |
|
|
292
|
+
| Comentários no código | 🇧🇷 Português | `// Busca perfil do usuário` |
|
|
293
|
+
| Commits | 🇺🇸 Inglês | `fix: resolve auth bug` |
|
|
294
|
+
| Documentação técnica | 🇧🇷 Português | `## Instalação` |
|
|
295
|
+
| Respostas do assistente | 🇧🇷 Português | `Vou criar o componente...` |
|
|
296
|
+
| Nomes de arquivos | 🇺🇸 Inglês | `user-profile.tsx` |
|
|
297
|
+
| Logs de debug | 🇧🇷 Português | `console.log('Usuário autenticado')` |
|
|
298
|
+
| Mensagens de erro | 🇧🇷 Português | `throw new Error('Usuário não encontrado')` |
|
|
299
|
+
|
|
300
|
+
## 🎯 Checklist de Conformidade
|
|
301
|
+
|
|
302
|
+
Antes de finalizar qualquer tarefa, verificar:
|
|
303
|
+
|
|
304
|
+
- [ ] Todo código (variáveis, funções, classes) está em inglês
|
|
305
|
+
- [ ] Todos os comentários estão em português (pt-BR)
|
|
306
|
+
- [ ] Commits seguem padrão conventional em inglês
|
|
307
|
+
- [ ] Documentação foi atualizada quando necessário
|
|
308
|
+
- [ ] Sintaxe oficial das bibliotecas foi respeitada
|
|
309
|
+
- [ ] Próximo passo foi proposto ao usuário
|
|
310
|
+
- [ ] Comando de continuação foi sugerido
|
|
311
|
+
|
|
312
|
+
## 🚨 Exceções
|
|
313
|
+
|
|
314
|
+
### Quando usar inglês em comentários:
|
|
315
|
+
- Referências diretas a código: "O método `getUserById()` retorna..."
|
|
316
|
+
- Links para documentação oficial em inglês
|
|
317
|
+
- Termos técnicos sem tradução estabelecida
|
|
318
|
+
|
|
319
|
+
### Quando usar português no código:
|
|
320
|
+
- **NUNCA** (exceto em strings de UI para usuário final)
|
|
321
|
+
- Mensagens de erro para usuário final
|
|
322
|
+
- Labels de formulário
|
|
323
|
+
- Textos de interface
|
|
324
|
+
|
|
325
|
+
## 📖 Referências
|
|
326
|
+
|
|
327
|
+
- [Conventional Commits](https://www.conventionalcommits.org/)
|
|
328
|
+
- [JSDoc em Português](https://jsdoc.app/)
|
|
329
|
+
- [NX Workspace Patterns](https://nx.dev/concepts)
|
|
330
|
+
- [ZenStack Documentation](https://zenstack.dev/)
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## 🔐 Gestão de Configurações
|
|
335
|
+
|
|
336
|
+
### Variáveis de Ambiente (.env)
|
|
337
|
+
- **NUNCA** commitar `.env` com valores sensíveis
|
|
338
|
+
- **SEMPRE** manter `.env.example` atualizado com placeholders
|
|
339
|
+
- Usar prefixos para organização: `CLICKUP_`, `GITHUB_`, `DB_`
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
# ✅ CORRETO - .env.example
|
|
343
|
+
CLICKUP_API_TOKEN=your_token_here
|
|
344
|
+
GITHUB_TOKEN=ghp_xxxxxxxxxxxx
|
|
345
|
+
|
|
346
|
+
# ❌ INCORRETO - Nunca no repositório
|
|
347
|
+
CLICKUP_API_TOKEN=pk_12345_secret
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### Integrações Opcionais
|
|
351
|
+
- Comandos e agentes devem funcionar sem integrações quando possível
|
|
352
|
+
- Se integração não configurada: perguntar ao usuário ou abortar com mensagem clara
|
|
353
|
+
- Documentar variáveis necessárias no header do comando/agente
|
|
354
|
+
|
|
355
|
+
## 📚 Knowledge Bases
|
|
356
|
+
|
|
357
|
+
As Knowledge Bases do projeto estão em `docs/knowbase/`:
|
|
358
|
+
|
|
359
|
+
| KB | Propósito |
|
|
360
|
+
|----|-----------|
|
|
361
|
+
| `cursor-commands-best-practices-2025.md` | Padrões de comandos Cursor |
|
|
362
|
+
| `spec-as-code-strategy.md` | Estratégia de especificações |
|
|
363
|
+
| `ai-agent-design-patterns.md` | Padrões de design de agentes |
|
|
364
|
+
| `context-window-optimization.md` | Otimização de contexto |
|
|
365
|
+
| `configuration-management.md` | Gestão de configurações |
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
369
|
+
**Última atualização:** 2025-11-24
|
|
370
|
+
**Versão:** 3.0.0
|
|
371
|
+
**Mantido por:** Sistema Onion
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Padrões de nomenclatura, estrutura e convenções do Sistema Onion
|
|
3
|
+
globs: .cursor/**
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
# 🧅 Padrões do Sistema Onion
|
|
7
|
+
|
|
8
|
+
## 🎯 Objetivo
|
|
9
|
+
|
|
10
|
+
Definir padrões consistentes para nomenclatura, estrutura e convenções do Sistema Onion v3.0.
|
|
11
|
+
|
|
12
|
+
## 📁 Estrutura de Diretórios
|
|
13
|
+
|
|
14
|
+
### Comandos (.cursor/commands/)
|
|
15
|
+
```
|
|
16
|
+
.cursor/commands/
|
|
17
|
+
├── engineer/ # Fluxos de desenvolvimento
|
|
18
|
+
├── product/ # Gestão de produto
|
|
19
|
+
├── git/ # Operações Git
|
|
20
|
+
│ ├── feature/ # Git flow - features
|
|
21
|
+
│ ├── hotfix/ # Git flow - hotfixes
|
|
22
|
+
│ └── release/ # Git flow - releases
|
|
23
|
+
├── docs/ # Documentação
|
|
24
|
+
├── meta/ # Meta-comandos (criadores)
|
|
25
|
+
├── validate/ # Validações
|
|
26
|
+
├── quick/ # Ações rápidas
|
|
27
|
+
└── common/ # Recursos compartilhados
|
|
28
|
+
├── templates/ # Templates base
|
|
29
|
+
└── prompts/ # Prompts modulares
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Agentes (.cursor/agents/)
|
|
33
|
+
```
|
|
34
|
+
.cursor/agents/
|
|
35
|
+
├── development/ # Dev: python, react, postgres
|
|
36
|
+
├── product/ # Produto: product-agent, task-specialist
|
|
37
|
+
├── compliance/ # Compliance: regulatory, security
|
|
38
|
+
├── meta/ # Meta: onion, metaspec-gate-keeper
|
|
39
|
+
├── review/ # Review: code-reviewer
|
|
40
|
+
├── testing/ # Testes: test-engineer, test-planner
|
|
41
|
+
├── research/ # Pesquisa: research-agent
|
|
42
|
+
├── git/ # Git: branch-*, code-review
|
|
43
|
+
└── common/ # Templates compartilhados
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Sessions (.cursor/sessions/)
|
|
47
|
+
```
|
|
48
|
+
.cursor/sessions/<feature-slug>/
|
|
49
|
+
├── context.md # Contexto e IDs ClickUp
|
|
50
|
+
├── architecture.md # Decisões arquiteturais
|
|
51
|
+
├── plan.md # Plano de fases
|
|
52
|
+
└── notes.md # Notas de desenvolvimento
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## 📝 Nomenclatura
|
|
56
|
+
|
|
57
|
+
### Feature Slugs
|
|
58
|
+
```bash
|
|
59
|
+
# Padrão: kebab-case descritivo
|
|
60
|
+
✅ user-authentication
|
|
61
|
+
✅ payment-integration
|
|
62
|
+
✅ onion-v3-refactoring
|
|
63
|
+
|
|
64
|
+
❌ UserAuth
|
|
65
|
+
❌ payment_integration
|
|
66
|
+
❌ feature123
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Task IDs (ClickUp)
|
|
70
|
+
```bash
|
|
71
|
+
# Formato: alfanumérico ClickUp
|
|
72
|
+
✅ 86adf8jj6
|
|
73
|
+
✅ 86adf8kr3
|
|
74
|
+
|
|
75
|
+
# Referência em documentos:
|
|
76
|
+
**Task ID**: 86adf8jj6
|
|
77
|
+
**Subtask ID**: `86adf8kr3`
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Comandos
|
|
81
|
+
```bash
|
|
82
|
+
# Nome: kebab-case
|
|
83
|
+
✅ create-agent
|
|
84
|
+
✅ code-review
|
|
85
|
+
✅ warm-up
|
|
86
|
+
|
|
87
|
+
# Caminho: /categoria/nome
|
|
88
|
+
✅ /engineer/start
|
|
89
|
+
✅ /product/task
|
|
90
|
+
✅ /git/feature/start
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Agentes
|
|
94
|
+
```bash
|
|
95
|
+
# Nome: kebab-case + sufixo descritivo
|
|
96
|
+
✅ python-developer.md
|
|
97
|
+
✅ task-specialist.md
|
|
98
|
+
✅ code-reviewer.md
|
|
99
|
+
|
|
100
|
+
# Referência: @nome (sem extensão)
|
|
101
|
+
✅ @python-developer
|
|
102
|
+
✅ @onion
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## 📋 Estrutura de Arquivos
|
|
106
|
+
|
|
107
|
+
### Comando (YAML Header Obrigatório)
|
|
108
|
+
```yaml
|
|
109
|
+
---
|
|
110
|
+
name: nome-comando
|
|
111
|
+
description: Descrição curta (1-2 linhas)
|
|
112
|
+
model: sonnet
|
|
113
|
+
category: engineer|product|git|docs|meta|validate|quick
|
|
114
|
+
tags: [tag1, tag2]
|
|
115
|
+
version: "3.0.0"
|
|
116
|
+
updated: "YYYY-MM-DD"
|
|
117
|
+
---
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Agente (YAML Header Obrigatório)
|
|
121
|
+
```yaml
|
|
122
|
+
---
|
|
123
|
+
name: nome-agente
|
|
124
|
+
description: Descrição da especialização
|
|
125
|
+
model: sonnet
|
|
126
|
+
category: development|product|meta|compliance|review|testing|research|git
|
|
127
|
+
tags: [tag1, tag2]
|
|
128
|
+
expertise: [area1, area2, area3]
|
|
129
|
+
version: "3.0.0"
|
|
130
|
+
updated: "YYYY-MM-DD"
|
|
131
|
+
---
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## 🔗 Integração ClickUp MCP
|
|
135
|
+
|
|
136
|
+
### Identificação de Workspace
|
|
137
|
+
```typescript
|
|
138
|
+
// Sempre usar workspace_id explícito
|
|
139
|
+
workspace_id: "90131664218" // Workspace padrão
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Padrões de Comentários
|
|
143
|
+
- **Subtask**: Comentário DETALHADO (métricas, arquivos, decisões)
|
|
144
|
+
- **Task Principal**: Comentário RESUMIDO (fase, status, próximo)
|
|
145
|
+
|
|
146
|
+
### Formatação de Comentários
|
|
147
|
+
```
|
|
148
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
149
|
+
✅ FASE N CONCLUÍDA - Nome da Fase
|
|
150
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
151
|
+
📅 YYYY-MM-DD | Status: DONE
|
|
152
|
+
|
|
153
|
+
📊 **Resultados:**
|
|
154
|
+
∟ Item 1: valor
|
|
155
|
+
∟ Item 2: valor
|
|
156
|
+
|
|
157
|
+
🚀 Próxima: Fase N+1 - Nome
|
|
158
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## ⚡ Limites e Métricas
|
|
162
|
+
|
|
163
|
+
| Métrica | Limite | Razão |
|
|
164
|
+
|---------|--------|-------|
|
|
165
|
+
| Linhas por comando | < 400 | Otimização de tokens |
|
|
166
|
+
| Linhas por agente | < 300 | Foco e clareza |
|
|
167
|
+
| Expertise por agente | 3-5 | Especialização |
|
|
168
|
+
| Tags por arquivo | 3-7 | Organização |
|
|
169
|
+
|
|
170
|
+
## 🔄 Fluxos Principais
|
|
171
|
+
|
|
172
|
+
### Feature Development
|
|
173
|
+
```bash
|
|
174
|
+
/product/task "descrição" # Criar task ClickUp
|
|
175
|
+
/engineer/start <slug> # Iniciar sessão
|
|
176
|
+
/engineer/work # Continuar trabalho
|
|
177
|
+
/engineer/pre-pr # Preparar PR
|
|
178
|
+
/engineer/pr # Criar PR
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Criação de Componentes
|
|
182
|
+
```bash
|
|
183
|
+
/meta/create-agent <nome> # Criar agente
|
|
184
|
+
/meta/create-command <nome> # Criar comando
|
|
185
|
+
/docs/build-tech-docs # Documentar
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## 📚 Referências
|
|
189
|
+
|
|
190
|
+
- Knowledge Bases: `docs/knowbase/`
|
|
191
|
+
- Templates: `.cursor/commands/common/templates/`
|
|
192
|
+
- Prompts: `.cursor/commands/common/prompts/`
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
**Última atualização:** 2025-11-24
|
|
197
|
+
**Versão:** 3.0.0
|