@onion-ai/cli 1.0.0-beta.1

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 (220) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +529 -0
  3. package/bin/onion.js +6 -0
  4. package/framework/CLAUDE.md +45 -0
  5. package/framework/VERSION +1 -0
  6. package/framework/agents/compliance/iso-22301-specialist.md +985 -0
  7. package/framework/agents/compliance/iso-27001-specialist.md +713 -0
  8. package/framework/agents/compliance/pmbok-specialist.md +739 -0
  9. package/framework/agents/compliance/security-information-master.md +907 -0
  10. package/framework/agents/compliance/soc2-specialist.md +889 -0
  11. package/framework/agents/deployment/docker-specialist.md +1192 -0
  12. package/framework/agents/development/c4-architecture-specialist.md +745 -0
  13. package/framework/agents/development/c4-documentation-specialist.md +695 -0
  14. package/framework/agents/development/clickup-specialist.md +396 -0
  15. package/framework/agents/development/cursor-specialist.md +277 -0
  16. package/framework/agents/development/docs-reverse-engineer.md +417 -0
  17. package/framework/agents/development/gamma-api-specialist.md +1168 -0
  18. package/framework/agents/development/gitflow-specialist.md +1206 -0
  19. package/framework/agents/development/linux-security-specialist.md +675 -0
  20. package/framework/agents/development/mermaid-specialist.md +515 -0
  21. package/framework/agents/development/nodejs-specialist.md +672 -0
  22. package/framework/agents/development/nx-migration-specialist.md +866 -0
  23. package/framework/agents/development/nx-monorepo-specialist.md +618 -0
  24. package/framework/agents/development/postgres-specialist.md +1123 -0
  25. package/framework/agents/development/react-developer.md +131 -0
  26. package/framework/agents/development/runflow-specialist.md +277 -0
  27. package/framework/agents/development/system-documentation-orchestrator.md +1387 -0
  28. package/framework/agents/development/task-specialist.md +677 -0
  29. package/framework/agents/git/branch-code-reviewer.md +225 -0
  30. package/framework/agents/git/branch-documentation-writer.md +161 -0
  31. package/framework/agents/git/branch-metaspec-checker.md +67 -0
  32. package/framework/agents/git/branch-test-planner.md +176 -0
  33. package/framework/agents/meta/agent-creator-specialist.md +1266 -0
  34. package/framework/agents/meta/command-creator-specialist.md +1676 -0
  35. package/framework/agents/meta/metaspec-gate-keeper.md +240 -0
  36. package/framework/agents/meta/onion.md +824 -0
  37. package/framework/agents/product/branding-positioning-specialist.md +1029 -0
  38. package/framework/agents/product/extract-meeting-specialist.md +394 -0
  39. package/framework/agents/product/meeting-consolidator.md +482 -0
  40. package/framework/agents/product/pain-price-specialist.md +508 -0
  41. package/framework/agents/product/presentation-orchestrator.md +1190 -0
  42. package/framework/agents/product/product-agent.md +201 -0
  43. package/framework/agents/product/story-points-framework-specialist.md +538 -0
  44. package/framework/agents/product/storytelling-business-specialist.md +890 -0
  45. package/framework/agents/research/research-agent.md +292 -0
  46. package/framework/agents/review/code-reviewer.md +154 -0
  47. package/framework/agents/review/corporate-compliance-specialist.md +370 -0
  48. package/framework/agents/testing/test-agent.md +424 -0
  49. package/framework/agents/testing/test-engineer.md +294 -0
  50. package/framework/agents/testing/test-planner.md +117 -0
  51. package/framework/commands/common/prompts/README.md +208 -0
  52. package/framework/commands/common/prompts/clickup-patterns.md +144 -0
  53. package/framework/commands/common/prompts/code-review-checklist.md +168 -0
  54. package/framework/commands/common/prompts/git-workflow-patterns.md +235 -0
  55. package/framework/commands/common/prompts/output-formats.md +240 -0
  56. package/framework/commands/common/prompts/technical.md +194 -0
  57. package/framework/commands/common/templates/abstraction-template.md +399 -0
  58. package/framework/commands/common/templates/agent-template.md +353 -0
  59. package/framework/commands/common/templates/business_context_template.md +748 -0
  60. package/framework/commands/common/templates/command-template.md +273 -0
  61. package/framework/commands/common/templates/technical_context_template.md +526 -0
  62. package/framework/commands/design/screen-spec.md +505 -0
  63. package/framework/commands/development/runflow-dev.md +465 -0
  64. package/framework/commands/docs/build-business-docs.md +299 -0
  65. package/framework/commands/docs/build-compliance-docs.md +143 -0
  66. package/framework/commands/docs/build-index.md +119 -0
  67. package/framework/commands/docs/build-tech-docs.md +221 -0
  68. package/framework/commands/docs/docs-health.md +141 -0
  69. package/framework/commands/docs/help.md +278 -0
  70. package/framework/commands/docs/refine-vision.md +25 -0
  71. package/framework/commands/docs/reverse-consolidate.md +158 -0
  72. package/framework/commands/docs/sync-sessions.md +354 -0
  73. package/framework/commands/docs/validate-docs.md +157 -0
  74. package/framework/commands/engineer/bump.md +29 -0
  75. package/framework/commands/engineer/docs.md +11 -0
  76. package/framework/commands/engineer/hotfix.md +183 -0
  77. package/framework/commands/engineer/plan.md +85 -0
  78. package/framework/commands/engineer/pr-update.md +219 -0
  79. package/framework/commands/engineer/pr.md +117 -0
  80. package/framework/commands/engineer/pre-pr.md +81 -0
  81. package/framework/commands/engineer/start.md +254 -0
  82. package/framework/commands/engineer/validate-phase-sync.md +134 -0
  83. package/framework/commands/engineer/warm-up.md +20 -0
  84. package/framework/commands/engineer/work.md +155 -0
  85. package/framework/commands/f/company-context-extractor.md +93 -0
  86. package/framework/commands/f/process-meetings.md +103 -0
  87. package/framework/commands/git/README.md +682 -0
  88. package/framework/commands/git/code-review.md +213 -0
  89. package/framework/commands/git/fast-commit.md +43 -0
  90. package/framework/commands/git/feature/finish.md +88 -0
  91. package/framework/commands/git/feature/publish.md +89 -0
  92. package/framework/commands/git/feature/start.md +172 -0
  93. package/framework/commands/git/help.md +100 -0
  94. package/framework/commands/git/hotfix/finish.md +96 -0
  95. package/framework/commands/git/hotfix/start.md +92 -0
  96. package/framework/commands/git/init.md +111 -0
  97. package/framework/commands/git/release/finish.md +96 -0
  98. package/framework/commands/git/release/start.md +93 -0
  99. package/framework/commands/git/sync.md +199 -0
  100. package/framework/commands/meta/all-tools.md +58 -0
  101. package/framework/commands/meta/analyze-complex-problem.md +186 -0
  102. package/framework/commands/meta/create-abstraction.md +882 -0
  103. package/framework/commands/meta/create-agent-express.md +98 -0
  104. package/framework/commands/meta/create-agent.md +210 -0
  105. package/framework/commands/meta/create-command.md +203 -0
  106. package/framework/commands/meta/create-knowledge-base.md +143 -0
  107. package/framework/commands/meta/create-task-structure.md +150 -0
  108. package/framework/commands/meta/setup-integration.md +274 -0
  109. package/framework/commands/onion.md +169 -0
  110. package/framework/commands/product/README.md +249 -0
  111. package/framework/commands/product/analyze-pain-price.md +694 -0
  112. package/framework/commands/product/branding.md +458 -0
  113. package/framework/commands/product/check.md +46 -0
  114. package/framework/commands/product/checklist-sync.md +239 -0
  115. package/framework/commands/product/collect.md +95 -0
  116. package/framework/commands/product/consolidate-meetings.md +291 -0
  117. package/framework/commands/product/estimate.md +511 -0
  118. package/framework/commands/product/extract-meeting.md +226 -0
  119. package/framework/commands/product/feature.md +416 -0
  120. package/framework/commands/product/light-arch.md +82 -0
  121. package/framework/commands/product/presentation.md +174 -0
  122. package/framework/commands/product/refine.md +161 -0
  123. package/framework/commands/product/spec.md +79 -0
  124. package/framework/commands/product/task-check.md +378 -0
  125. package/framework/commands/product/task.md +603 -0
  126. package/framework/commands/product/validate-task.md +325 -0
  127. package/framework/commands/product/warm-up.md +24 -0
  128. package/framework/commands/quick/analisys.md +17 -0
  129. package/framework/commands/test/e2e.md +377 -0
  130. package/framework/commands/test/integration.md +508 -0
  131. package/framework/commands/test/unit.md +381 -0
  132. package/framework/commands/validate/collab/pair-testing.md +657 -0
  133. package/framework/commands/validate/collab/three-amigos.md +534 -0
  134. package/framework/commands/validate/qa-points/estimate.md +660 -0
  135. package/framework/commands/validate/test-strategy/analyze.md +1201 -0
  136. package/framework/commands/validate/test-strategy/create.md +411 -0
  137. package/framework/commands/validate/workflow.md +370 -0
  138. package/framework/commands/warm-up.md +20 -0
  139. package/framework/docs/architecture/acoplamento-clickup-problema-analise.md +468 -0
  140. package/framework/docs/architecture/desacoplamento-roadmap.md +364 -0
  141. package/framework/docs/architecture/validacao-fase-1.md +235 -0
  142. package/framework/docs/c4/c4-detection-rules.md +395 -0
  143. package/framework/docs/c4/c4-documentation-templates.md +579 -0
  144. package/framework/docs/c4/c4-mermaid-patterns.md +331 -0
  145. package/framework/docs/c4/c4-templates.md +256 -0
  146. package/framework/docs/clickup/clickup-acceptance-criteria-strategy.md +329 -0
  147. package/framework/docs/clickup/clickup-auto-update-strategy.md +340 -0
  148. package/framework/docs/clickup/clickup-comment-formatter.md +239 -0
  149. package/framework/docs/clickup/clickup-description-fix.md +384 -0
  150. package/framework/docs/clickup/clickup-dual-comment-strategy.md +528 -0
  151. package/framework/docs/clickup/clickup-formatting.md +302 -0
  152. package/framework/docs/clickup/separador-tamanho-otimizado.md +258 -0
  153. package/framework/docs/engineer/pre-pr-acceptance-validation.md +256 -0
  154. package/framework/docs/onion/ESPERANTO.md +293 -0
  155. package/framework/docs/onion/agents-reference.md +832 -0
  156. package/framework/docs/onion/clickup-integration.md +780 -0
  157. package/framework/docs/onion/commands-guide.md +924 -0
  158. package/framework/docs/onion/engineering-flows.md +900 -0
  159. package/framework/docs/onion/getting-started.md +803 -0
  160. package/framework/docs/onion/maintenance-checklist.md +421 -0
  161. package/framework/docs/onion/naming-conventions.md +286 -0
  162. package/framework/docs/onion/practical-examples.md +854 -0
  163. package/framework/docs/product/story-points-integration.md +269 -0
  164. package/framework/docs/product/story-points-validation.md +237 -0
  165. package/framework/docs/reviews/task-manager-docs-review-2025-11-24.md +184 -0
  166. package/framework/docs/strategies/clickup-comment-patterns.md +766 -0
  167. package/framework/docs/strategies/clickup-integration-tests.md +602 -0
  168. package/framework/docs/strategies/clickup-mcp-wrappers-tests.md +888 -0
  169. package/framework/docs/strategies/clickup-regression-tests.md +587 -0
  170. package/framework/docs/strategies/visual-patterns.md +315 -0
  171. package/framework/docs/templates/README.md +649 -0
  172. package/framework/docs/templates/adr-template.md +226 -0
  173. package/framework/docs/templates/analysis-template.md +280 -0
  174. package/framework/docs/templates/execution-plan-template.md +430 -0
  175. package/framework/docs/templates/guide-template.md +367 -0
  176. package/framework/docs/templates/phase-execution-prompt-template.md +504 -0
  177. package/framework/docs/templates/reference-template.md +522 -0
  178. package/framework/docs/templates/solution-template.md +390 -0
  179. package/framework/docs/tools/README.md +356 -0
  180. package/framework/docs/tools/agents.md +365 -0
  181. package/framework/docs/tools/commands.md +669 -0
  182. package/framework/docs/tools/cursor.md +539 -0
  183. package/framework/docs/tools/mcps.md +937 -0
  184. package/framework/docs/tools/rules.md +461 -0
  185. package/framework/rules/language-and-documentation.mdc +371 -0
  186. package/framework/rules/nestjs-controllers.md +83 -0
  187. package/framework/rules/nestjs-dtos.md +255 -0
  188. package/framework/rules/nestjs-modules.md +141 -0
  189. package/framework/rules/nestjs-services.md +230 -0
  190. package/framework/rules/nx-rules.mdc +41 -0
  191. package/framework/rules/onion-patterns.mdc +197 -0
  192. package/framework/skills/codebase-visualizer/SKILL.md +26 -0
  193. package/framework/skills/codebase-visualizer/scripts/visualize.py +131 -0
  194. package/framework/skills/collect/SKILL.md +84 -0
  195. package/framework/skills/create-rule/SKILL.md +152 -0
  196. package/framework/skills/db-schema-visualizer/SKILL.md +49 -0
  197. package/framework/skills/db-schema-visualizer/scripts/visualize.py +1191 -0
  198. package/framework/skills/sync-meetings/SKILL.md +239 -0
  199. package/framework/utils/clickup-mcp-wrappers.md +744 -0
  200. package/framework/utils/date-time-standards.md +200 -0
  201. package/framework/utils/task-manager/README.md +94 -0
  202. package/framework/utils/task-manager/adapters/asana.md +377 -0
  203. package/framework/utils/task-manager/adapters/clickup.md +467 -0
  204. package/framework/utils/task-manager/adapters/linear.md +421 -0
  205. package/framework/utils/task-manager/detector.md +299 -0
  206. package/framework/utils/task-manager/factory.md +363 -0
  207. package/framework/utils/task-manager/interface.md +248 -0
  208. package/framework/utils/task-manager/types.md +409 -0
  209. package/package.json +41 -0
  210. package/src/cli.js +73 -0
  211. package/src/commands/doctor.js +191 -0
  212. package/src/commands/init.js +287 -0
  213. package/src/commands/install.js +261 -0
  214. package/src/commands/list.js +152 -0
  215. package/src/commands/uninstall.js +90 -0
  216. package/src/commands/update.js +26 -0
  217. package/src/utils/fs.js +89 -0
  218. package/src/utils/log.js +35 -0
  219. package/src/utils/paths.js +32 -0
  220. package/src/utils/prompt.js +76 -0
@@ -0,0 +1,803 @@
1
+ # 🚀 Configuração Inicial - Sistema Onion
2
+
3
+ ## 📋 Índice
4
+
5
+ - [Pré-requisitos](#-pré-requisitos)
6
+ - [Instalação](#-instalação)
7
+ - [Configuração do ClickUp MCP](#-configuração-do-clickup-mcp)
8
+ - [Configuração do Workspace](#-configuração-do-workspace)
9
+ - [Padrões de Nomenclatura](#-padrões-de-nomenclatura)
10
+ - [Primeiro Uso](#-primeiro-uso)
11
+ - [Verificação de Instalação](#-verificação-de-instalação)
12
+ - [Próximos Passos](#-próximos-passos)
13
+ - [Troubleshooting](#-troubleshooting)
14
+
15
+ ---
16
+
17
+ ## 📦 Pré-requisitos
18
+
19
+ ### Software Necessário
20
+
21
+ #### 1. Cursor IDE
22
+
23
+ - **Versão:** v0.43+ (Cursor v2)
24
+ - **Download:** [cursor.sh](https://cursor.sh)
25
+ - **Licença:** Pro recomendada para features completas
26
+
27
+ #### 2. Node.js
28
+
29
+ - **Versão:** v18+ ou v20+ (LTS recomendado)
30
+ - **Download:** [nodejs.org](https://nodejs.org)
31
+ - **Verificar:**
32
+
33
+ ```bash
34
+ node --version # v18.x.x ou v20.x.x
35
+ npm --version # 9.x.x ou 10.x.x
36
+ ```
37
+
38
+ #### 3. Git
39
+
40
+ - **Versão:** v2.30+
41
+ - **Download:** [git-scm.com](https://git-scm.com)
42
+ - **Verificar:**
43
+
44
+ ```bash
45
+ git --version # git version 2.30.x ou superior
46
+ ```
47
+
48
+ #### 4. ClickUp Account
49
+
50
+ - **Plano:** Free, Unlimited, Business ou Enterprise
51
+ - **Acesso:** Workspace com permissões de criação de tasks
52
+ - **API Key:** Necessária para integração MCP
53
+
54
+ ---
55
+
56
+ ## 🔧 Instalação
57
+
58
+ ### Passo 1: Clonar/Inicializar Projeto
59
+
60
+ #### Opção A: Projeto Novo
61
+
62
+ ```bash
63
+ # Criar diretório do projeto
64
+ mkdir meu-projeto
65
+ cd meu-projeto
66
+
67
+ # Inicializar Git
68
+ git init
69
+
70
+ # Inicializar Node.js (se aplicável)
71
+ npm init -y
72
+ ```
73
+
74
+ #### Opção B: Projeto Existente
75
+
76
+ ```bash
77
+ # Clonar repositório
78
+ git clone https://github.com/seu-usuario/seu-projeto.git
79
+ cd seu-projeto
80
+
81
+ # Instalar dependências
82
+ npm install
83
+ ```
84
+
85
+ ---
86
+
87
+ ### Passo 2: Instalar Sistema Onion
88
+
89
+ #### Opção A: Via Git Submodule (Recomendado)
90
+
91
+ ```bash
92
+ # Adicionar Sistema Onion como submodule
93
+ git submodule add https://github.com/seu-usuario/sistema-onion.git .cursor
94
+
95
+ # Inicializar submodule
96
+ git submodule update --init --recursive
97
+ ```
98
+
99
+ #### Opção B: Copiar Manualmente
100
+
101
+ ```bash
102
+ # Baixar Sistema Onion
103
+ git clone https://github.com/seu-usuario/sistema-onion.git temp-onion
104
+
105
+ # Copiar para .claude/
106
+ cp -r temp-onion/.claude .
107
+
108
+ # Limpar
109
+ rm -rf temp-onion
110
+ ```
111
+
112
+ ---
113
+
114
+ ### Passo 3: Estrutura de Diretórios
115
+
116
+ Após instalação, você deve ter:
117
+
118
+ ```
119
+ seu-projeto/
120
+ ├── .claude/
121
+ │ ├── commands/ # 56 comandos
122
+ │ ├── agents/ # 37 agentes
123
+ │ ├── docs/ # Documentação
124
+ │ │ ├── onion/ # Docs do Sistema Onion
125
+ │ │ ├── tools/ # Docs de ferramentas
126
+ │ │ └── templates/ # Templates v2
127
+ │ ├── sessions/ # Sessões de desenvolvimento
128
+ │ └── rules/ # Regras do workspace
129
+ ├── docs/ # Documentação do projeto
130
+ ├── src/ # Código fonte
131
+ └── README.md
132
+ ```
133
+
134
+ ---
135
+
136
+ ## 🔗 Configuração do ClickUp MCP
137
+
138
+ ### Passo 1: Obter API Key
139
+
140
+ 1. Acesse [ClickUp Settings](https://app.clickup.com/settings/apps)
141
+ 2. Navegue para **Apps** → **API Token**
142
+ 3. Clique em **Generate** ou **Regenerate**
143
+ 4. Copie o token (formato: `pk_XXXXXXXX...`)
144
+
145
+ ⚠️ **Importante:** Guarde o token em local seguro!
146
+
147
+ ---
148
+
149
+ ### Passo 2: Configurar MCP no Cursor
150
+
151
+ #### Arquivo de Configuração
152
+
153
+ Criar/editar `.claude/mcp.json`:
154
+
155
+ ```json
156
+ {
157
+ "mcpServers": {
158
+ "clickup": {
159
+ "command": "npx",
160
+ "args": ["-y", "@clickup/mcp-server"],
161
+ "env": {
162
+ "CLICKUP_API_KEY": "pk_XXXXXXXX..."
163
+ }
164
+ }
165
+ }
166
+ }
167
+ ```
168
+
169
+ #### Variáveis de Ambiente (Alternativa Segura)
170
+
171
+ ```bash
172
+ # .env (não commitar!)
173
+ CLICKUP_API_KEY=pk_XXXXXXXX...
174
+ CLICKUP_WORKSPACE_ID=90131412
175
+ ```
176
+
177
+ ---
178
+
179
+ ### Passo 3: Obter Workspace ID
180
+
181
+ #### Método 1: Via URL
182
+
183
+ ```
184
+ https://app.clickup.com/XXXXXXXX/home
185
+ ^^^^^^^^
186
+ Workspace ID
187
+ ```
188
+
189
+ #### Método 2: Via API
190
+
191
+ ```bash
192
+ curl -H "Authorization: pk_XXXXXXXX..." \
193
+ https://api.clickup.com/api/v2/team
194
+ ```
195
+
196
+ ---
197
+
198
+ ### Passo 4: Obter List ID
199
+
200
+ 1. Acesse seu workspace no ClickUp
201
+ 2. Navegue para a **List** onde deseja criar tasks
202
+ 3. Copie o ID da URL:
203
+
204
+ ```
205
+ https://app.clickup.com/XXXXXXXX/v/li/YYYYYYYY
206
+ ^^^^^^^^
207
+ List ID
208
+ ```
209
+
210
+ ---
211
+
212
+ ### Passo 5: Testar Conexão
213
+
214
+ ```bash
215
+ # No Cursor, executar:
216
+ # (usar ferramenta de teste do MCP)
217
+
218
+ # Ou via curl:
219
+ curl -H "Authorization: pk_XXXXXXXX..." \
220
+ https://api.clickup.com/api/v2/list/YYYYYYYY
221
+ ```
222
+
223
+ **Resposta esperada:**
224
+
225
+ ```json
226
+ {
227
+ "id": "YYYYYYYY",
228
+ "name": "Tarefas",
229
+ "status": {...}
230
+ }
231
+ ```
232
+
233
+ ---
234
+
235
+ ## ⚙️ Configuração do Workspace
236
+
237
+ ### Passo 1: Configurar `.cursorrules`
238
+
239
+ Criar/editar `.cursorrules`:
240
+
241
+ ```markdown
242
+ # Regras do Projeto
243
+
244
+ ## Linguagem e Documentação
245
+
246
+ - Comentários e documentação: Português brasileiro (pt-BR)
247
+ - Código, variáveis, funções: Inglês
248
+ - Commits: Português brasileiro
249
+ - Logs e debugging: Inglês
250
+
251
+ ## Padrões de Nomenclatura
252
+
253
+ - Sessões: `<feature-slug>` (kebab-case)
254
+ - Branches: `feature/<feature-slug>`
255
+ - Commits: Conventional Commits (feat:, fix:, docs:, etc)
256
+
257
+ ## Integração ClickUp
258
+
259
+ - Workspace ID: 90131412
260
+ - List ID (Tarefas): 901314121395
261
+ - Auto-update: Habilitado
262
+ - Formatação: Dual (Markdown + Unicode)
263
+ ```
264
+
265
+ ---
266
+
267
+ ### Passo 2: Configurar `.cursorignore`
268
+
269
+ Criar `.cursorignore` para otimizar performance:
270
+
271
+ ```
272
+ # Dependencies
273
+ node_modules/
274
+ .pnpm-store/
275
+ .yarn/
276
+
277
+ # Build outputs
278
+ dist/
279
+ build/
280
+ .next/
281
+ .nuxt/
282
+
283
+ # Logs
284
+ *.log
285
+ logs/
286
+
287
+ # OS
288
+ .DS_Store
289
+ Thumbs.db
290
+
291
+ # IDE
292
+ .vscode/
293
+ .idea/
294
+
295
+ # Temporários
296
+ *.tmp
297
+ *.temp
298
+ .cache/
299
+
300
+ # Grandes arquivos
301
+ *.mp4
302
+ *.mov
303
+ *.zip
304
+ *.tar.gz
305
+ ```
306
+
307
+ ---
308
+
309
+ ### Passo 3: Configurar GitFlow
310
+
311
+ ```bash
312
+ # Inicializar GitFlow
313
+ /git/init
314
+
315
+ # Ou manualmente:
316
+ git flow init -d # -d para defaults
317
+ ```
318
+
319
+ **Configuração padrão:**
320
+
321
+ - Branch de produção: `main`
322
+ - Branch de desenvolvimento: `develop`
323
+ - Prefixo de feature: `feature/`
324
+ - Prefixo de release: `release/`
325
+ - Prefixo de hotfix: `hotfix/`
326
+
327
+ ---
328
+
329
+ ## 📐 Padrões de Nomenclatura
330
+
331
+ ### 🎯 Padrão Único: `<feature-slug>`
332
+
333
+ O Sistema Onion usa **kebab-case** para todos os nomes de features, branches e sessões.
334
+
335
+ #### **Formato**
336
+
337
+ ```
338
+ <feature-slug>
339
+ ```
340
+
341
+ **Características:**
342
+
343
+ - Minúsculas apenas
344
+ - Palavras separadas por hífen (`-`)
345
+ - Sem caracteres especiais, espaços ou underscores
346
+ - Descritivo e conciso (2-5 palavras)
347
+
348
+ #### **Exemplos Corretos** ✅
349
+
350
+ ```bash
351
+ user-authentication
352
+ payment-integration
353
+ api-v2-migration
354
+ dashboard-filters-advanced
355
+ oauth-google-integration
356
+ fix-payment-timeout
357
+ ```
358
+
359
+ #### **Exemplos Incorretos** ❌
360
+
361
+ ```bash
362
+ user_authentication # ❌ underscore (snake_case)
363
+ userAuthentication # ❌ camelCase
364
+ USER-AUTH # ❌ maiúsculas
365
+ user auth # ❌ espaços
366
+ user@auth # ❌ caracteres especiais
367
+ ```
368
+
369
+ ### 🔑 Diferença Importante
370
+
371
+ #### `<feature-slug>` (Slug)
372
+
373
+ **O que é:** Nome kebab-case da feature
374
+ **Onde usar:**
375
+
376
+ - Branches Git: `feature/<feature-slug>`
377
+ - Sessões: `.claude/sessions/<feature-slug>/`
378
+ - Comandos: `/engineer/start <feature-slug>`
379
+
380
+ **Exemplo:** `user-authentication`
381
+
382
+ #### `<task-id>` (ID ClickUp)
383
+
384
+ **O que é:** ID alfanumérico único do ClickUp
385
+ **Onde usar:**
386
+
387
+ - API calls do ClickUp MCP
388
+ - Arquivo `context.md` (Task ID: xxx)
389
+ - Referências diretas a tasks
390
+
391
+ **Exemplo:** `86acu8pdk`
392
+
393
+ ### 📝 Conversão Automática
394
+
395
+ O sistema converte automaticamente nomes para kebab-case:
396
+
397
+ | Input (Nome da Task) | Output (feature-slug) |
398
+ | ------------------------------ | ------------------------------ |
399
+ | "Implementar Autenticação JWT" | `implementar-autenticacao-jwt` |
400
+ | "Adicionar Filtros Avançados" | `adicionar-filtros-avancados` |
401
+ | "Fix: Bug no Login" | `fix-bug-no-login` |
402
+
403
+ ### 🌿 Uso em Comandos
404
+
405
+ ```bash
406
+ # Criar task estruturada
407
+ /product/task "Implementar Autenticação JWT"
408
+ # → Gera: feature-slug = implementar-autenticacao-jwt
409
+
410
+ # Iniciar desenvolvimento
411
+ /engineer/start implementar-autenticacao-jwt
412
+
413
+ # Branch criada automaticamente
414
+ # → feature/implementar-autenticacao-jwt
415
+
416
+ # Sessão criada automaticamente
417
+ # → .claude/sessions/implementar-autenticacao-jwt/
418
+ ```
419
+
420
+ ### 📚 Documentação Completa
421
+
422
+ Para mais detalhes:
423
+
424
+ - [Naming Conventions](.claude/docs/onion/naming-conventions.md) - Padrões de nomenclatura
425
+ - [Maintenance Checklist](.claude/docs/onion/maintenance-checklist.md) - Guia de manutenção
426
+
427
+ ---
428
+
429
+ ## 🎯 Primeiro Uso
430
+
431
+ ### Tutorial Passo a Passo
432
+
433
+ #### 1. Criar Primeira Task
434
+
435
+ ```bash
436
+ /product/task "Configurar ambiente de desenvolvimento"
437
+ ```
438
+
439
+ **Resultado esperado:**
440
+
441
+ ```
442
+ ✅ TASK CRIADA
443
+
444
+ 📋 ClickUp: https://app.clickup.com/t/86xyz123
445
+ 🌿 Branch: feature/configurar-ambiente
446
+ 📁 Sessão: .claude/sessions/configurar-ambiente/
447
+ ```
448
+
449
+ ---
450
+
451
+ #### 2. Iniciar Desenvolvimento
452
+
453
+ ```bash
454
+ /engineer/start configurar-ambiente
455
+ ```
456
+
457
+ **O que acontece:**
458
+
459
+ 1. Análise da task
460
+ 2. Questões de clarificação
461
+ 3. Criação de arquitetura
462
+ 4. Geração de plano
463
+ 5. Atualização do ClickUp
464
+
465
+ ---
466
+
467
+ #### 3. Implementar
468
+
469
+ ```bash
470
+ /engineer/work configurar-ambiente
471
+ ```
472
+
473
+ **Ciclo:**
474
+
475
+ 1. Lê plano
476
+ 2. Implementa fase atual
477
+ 3. Pede validação
478
+ 4. Atualiza ClickUp
479
+ 5. Próxima fase
480
+
481
+ ---
482
+
483
+ #### 4. Criar PR
484
+
485
+ ```bash
486
+ /engineer/pr
487
+ ```
488
+
489
+ **Resultado:**
490
+
491
+ - ✅ PR criado
492
+ - ✅ ClickUp atualizado
493
+ - ✅ Code review solicitado
494
+
495
+ ---
496
+
497
+ #### 5. Finalizar
498
+
499
+ ```bash
500
+ # Após merge
501
+ /git/sync
502
+ ```
503
+
504
+ **Resultado:**
505
+
506
+ - ✅ Branches sincronizadas
507
+ - ✅ Sessão arquivada
508
+ - ✅ ClickUp → "Done"
509
+
510
+ ---
511
+
512
+ ## ✅ Verificação de Instalação
513
+
514
+ ### Checklist de Validação
515
+
516
+ #### 1. Estrutura de Diretórios
517
+
518
+ ```bash
519
+ # Verificar estrutura
520
+ ls -la .claude/
521
+
522
+ # Deve mostrar:
523
+ # commands/
524
+ # agents/
525
+ # docs/
526
+ # sessions/
527
+ # rules/
528
+ ```
529
+
530
+ #### 2. Comandos Disponíveis
531
+
532
+ ```bash
533
+ # Testar comando simples
534
+ /docs/help
535
+
536
+ # Deve mostrar ajuda de comandos de documentação
537
+ ```
538
+
539
+ #### 3. Agentes Disponíveis
540
+
541
+ ```bash
542
+ # Testar agente
543
+ @cursor-specialist "Olá, está funcionando?"
544
+
545
+ # Deve responder com informações sobre o Cursor
546
+ ```
547
+
548
+ #### 4. ClickUp MCP
549
+
550
+ ```bash
551
+ # Criar task de teste
552
+ /product/task "Task de teste do sistema"
553
+
554
+ # Deve criar task no ClickUp
555
+ ```
556
+
557
+ #### 5. GitFlow
558
+
559
+ ```bash
560
+ # Verificar branches
561
+ git branch -a
562
+
563
+ # Deve mostrar:
564
+ # * main
565
+ # develop
566
+ ```
567
+
568
+ ---
569
+
570
+ ### Script de Validação Automática
571
+
572
+ ```bash
573
+ #!/bin/bash
574
+ # validate-onion.sh
575
+
576
+ echo "🔍 Validando Sistema Onion..."
577
+
578
+ # 1. Estrutura
579
+ if [ -d ".claude/commands" ] && [ -d ".claude/agents" ]; then
580
+ echo "✅ Estrutura de diretórios OK"
581
+ else
582
+ echo "❌ Estrutura de diretórios incompleta"
583
+ exit 1
584
+ fi
585
+
586
+ # 2. Comandos
587
+ COMMANDS=$(find .claude/commands -name "*.md" | wc -l)
588
+ echo "✅ Comandos encontrados: $COMMANDS"
589
+
590
+ # 3. Agentes
591
+ AGENTS=$(find .claude/agents -name "*.md" | wc -l)
592
+ echo "✅ Agentes encontrados: $AGENTS"
593
+
594
+ # 4. Git
595
+ if git rev-parse --git-dir > /dev/null 2>&1; then
596
+ echo "✅ Git inicializado"
597
+ else
598
+ echo "❌ Git não inicializado"
599
+ exit 1
600
+ fi
601
+
602
+ # 5. Node.js
603
+ if command -v node > /dev/null 2>&1; then
604
+ echo "✅ Node.js $(node --version)"
605
+ else
606
+ echo "⚠️ Node.js não encontrado (opcional)"
607
+ fi
608
+
609
+ echo "🎉 Validação completa!"
610
+ ```
611
+
612
+ **Executar:**
613
+
614
+ ```bash
615
+ chmod +x validate-onion.sh
616
+ ./validate-onion.sh
617
+ ```
618
+
619
+ ---
620
+
621
+ ## 🚀 Próximos Passos
622
+
623
+ ### 1. Explorar Documentação
624
+
625
+ ```bash
626
+ # Ler guias
627
+ cat .claude/docs/onion/commands-guide.md
628
+ cat .claude/docs/onion/engineering-flows.md
629
+ cat .claude/docs/onion/clickup-integration.md
630
+ ```
631
+
632
+ ### 2. Experimentar Comandos
633
+
634
+ ```bash
635
+ # Comandos básicos
636
+ /docs/build-business-docs
637
+ /docs/build-tech-docs
638
+ /docs/build-index
639
+ ```
640
+
641
+ ### 3. Criar Primeira Feature Real
642
+
643
+ ```bash
644
+ # Workflow completo
645
+ /product/task "Sua primeira feature"
646
+ /engineer/start sua-primeira-feature
647
+ /engineer/work sua-primeira-feature
648
+ /engineer/pr
649
+ ```
650
+
651
+ ### 4. Personalizar Sistema
652
+
653
+ - Adicionar comandos customizados (`/meta/create-command`)
654
+ - Criar agentes especializados (`/meta/create-agent`)
655
+ - Ajustar regras no `.cursorrules`
656
+
657
+ ### 5. Integrar com CI/CD
658
+
659
+ - Configurar GitHub Actions / GitLab CI
660
+ - Automatizar testes
661
+ - Deploy automático
662
+
663
+ ---
664
+
665
+ ## 🔧 Troubleshooting
666
+
667
+ ### Problema 1: ClickUp MCP não conecta
668
+
669
+ **Sintomas:**
670
+
671
+ - Comandos `/product/task` falham
672
+ - Erro de autenticação
673
+
674
+ **Soluções:**
675
+
676
+ ```bash
677
+ # 1. Verificar API key
678
+ echo $CLICKUP_API_KEY
679
+
680
+ # 2. Testar manualmente
681
+ curl -H "Authorization: $CLICKUP_API_KEY" \
682
+ https://api.clickup.com/api/v2/team
683
+
684
+ # 3. Regenerar API key no ClickUp
685
+ # 4. Atualizar .claude/mcp.json
686
+ ```
687
+
688
+ ---
689
+
690
+ ### Problema 2: Comandos não funcionam
691
+
692
+ **Sintomas:**
693
+
694
+ - Comandos não são reconhecidos
695
+ - Erro "Command not found"
696
+
697
+ **Soluções:**
698
+
699
+ ```bash
700
+ # 1. Verificar estrutura
701
+ ls .claude/commands/
702
+
703
+ # 2. Recarregar Cursor
704
+ # Cmd/Ctrl + Shift + P → "Reload Window"
705
+
706
+ # 3. Verificar .cursorrules
707
+ cat .cursorrules
708
+ ```
709
+
710
+ ---
711
+
712
+ ### Problema 3: GitFlow não inicializado
713
+
714
+ **Sintomas:**
715
+
716
+ - Erro ao criar feature branches
717
+ - Branch develop não existe
718
+
719
+ **Solução:**
720
+
721
+ ```bash
722
+ # Inicializar GitFlow
723
+ /git/init
724
+
725
+ # Ou manualmente
726
+ git flow init -d
727
+ ```
728
+
729
+ ---
730
+
731
+ ### Problema 4: Performance lenta
732
+
733
+ **Sintomas:**
734
+
735
+ - Cursor lento
736
+ - Indexação demora muito
737
+
738
+ **Soluções:**
739
+
740
+ ```bash
741
+ # 1. Otimizar .cursorignore
742
+ # Adicionar node_modules/, dist/, etc
743
+
744
+ # 2. Limpar cache
745
+ # Cmd/Ctrl + Shift + P → "Clear Cache"
746
+
747
+ # 3. Reduzir context window
748
+ # Settings → Context → Reduce size
749
+ ```
750
+
751
+ ---
752
+
753
+ ### Problema 5: Sessões não criadas
754
+
755
+ **Sintomas:**
756
+
757
+ - Diretório `.claude/sessions/` vazio
758
+ - Erro ao executar `/engineer/work`
759
+
760
+ **Solução:**
761
+
762
+ ```bash
763
+ # Criar sessão manualmente
764
+ mkdir -p .claude/sessions/<feature-slug>
765
+
766
+ # Ou executar /engineer/start
767
+ /engineer/start <feature-slug>
768
+ ```
769
+
770
+ ---
771
+
772
+ ## 📞 Suporte e Recursos
773
+
774
+ ### Documentação
775
+
776
+ - [Guia de Comandos](./commands-guide.md)
777
+ - [Fluxos de Engenharia](./engineering-flows.md)
778
+ - [Integração ClickUp](./clickup-integration.md)
779
+ - [Referência de Agentes](./agents-reference.md)
780
+ - [Exemplos Práticos](./practical-examples.md)
781
+
782
+ ### Comunidade
783
+
784
+ - GitHub Issues: [link]
785
+ - Discord: [link]
786
+ - Documentação Online: [link]
787
+
788
+ ### Atualizações
789
+
790
+ ```bash
791
+ # Atualizar Sistema Onion (se submodule)
792
+ git submodule update --remote .cursor
793
+
794
+ # Ou pull manual
795
+ cd .cursor
796
+ git pull origin main
797
+ ```
798
+
799
+ ---
800
+
801
+ **Última atualização:** 2025-01-27
802
+ **Versão:** 2.0
803
+ **Status:** Pronto para uso! 🎉