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