@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,671 @@
1
+ # 🔧 ClickUp MCP Wrappers - Abstrações Centralizadas
2
+
3
+ ## 🎯 Objetivo
4
+
5
+ Centralizar todas as chamadas MCP do ClickUp em abstrações reutilizáveis, eliminando acoplamento dos comandos e permitindo evolução independente da integração.
6
+
7
+ ---
8
+
9
+ ## 📋 Abstrações Disponíveis
10
+
11
+ ### 1. Comentários de Fase Completada
12
+
13
+ #### `commentPhaseCompletion(subtaskId, phaseData)`
14
+
15
+ **Responsabilidade**: Criar comentário detalhado quando uma fase é completada.
16
+
17
+ **Parâmetros:**
18
+ ```typescript
19
+ phaseData: {
20
+ phaseName: string; // Ex: "Backend Implementation"
21
+ filesModified: string[]; // Lista de arquivos
22
+ implementations: string[]; // Lista de implementações
23
+ testFiles?: { // Testes adicionados
24
+ file: string;
25
+ count: number;
26
+ }[];
27
+ testCoverage?: number; // Ex: 95
28
+ technicalDecisions?: string[]; // Decisões técnicas
29
+ nextPhase?: string; // Próxima fase
30
+ timestamp?: string; // Timestamp
31
+ }
32
+ ```
33
+
34
+ **Retorno:**
35
+ ```typescript
36
+ {
37
+ commentId: string;
38
+ success: boolean;
39
+ formattedComment: string; // Para referência/logging
40
+ }
41
+ ```
42
+
43
+ **Uso:**
44
+ ```typescript
45
+ const result = await commentPhaseCompletion(
46
+ "86abc123", // subtaskId
47
+ {
48
+ phaseName: "Backend Implementation",
49
+ filesModified: ["src/auth/service.ts", "src/auth/routes.ts"],
50
+ implementations: ["JWT auth", "Refresh tokens"],
51
+ testCoverage: 95
52
+ }
53
+ );
54
+ ```
55
+
56
+ ---
57
+
58
+ ### 2. Atualizar Status da Subtask
59
+
60
+ #### `updateSubtaskStatus(subtaskId, status)`
61
+
62
+ **Responsabilidade**: Atualizar status de uma subtask de forma confiável.
63
+
64
+ **Parâmetros:**
65
+ ```typescript
66
+ subtaskId: string; // ID da subtask
67
+ status: "to do" | "in progress" | "done" | "closed";
68
+ ```
69
+
70
+ **Retorno:**
71
+ ```typescript
72
+ {
73
+ success: boolean;
74
+ previousStatus: string;
75
+ newStatus: string;
76
+ }
77
+ ```
78
+
79
+ **Uso:**
80
+ ```typescript
81
+ await updateSubtaskStatus("86abc123", "done");
82
+ ```
83
+
84
+ ---
85
+
86
+ ### 3. Comentário Resumido na Task Principal
87
+
88
+ #### `commentProgressUpdate(mainTaskId, progressData)`
89
+
90
+ **Responsabilidade**: Criar comentário executivo na task principal.
91
+
92
+ **Parâmetros:**
93
+ ```typescript
94
+ progressData: {
95
+ currentPhase: number; // Ex: 2
96
+ totalPhases: number; // Ex: 4
97
+ phaseName: string; // Ex: "Backend Implementation"
98
+ subtaskId: string; // Para referenciar
99
+ nextPhaseName?: string; // Ex: "Frontend Integration"
100
+ timestamp?: string;
101
+ }
102
+ ```
103
+
104
+ **Retorno:**
105
+ ```typescript
106
+ {
107
+ commentId: string;
108
+ success: boolean;
109
+ }
110
+ ```
111
+
112
+ **Uso:**
113
+ ```typescript
114
+ await commentProgressUpdate(
115
+ "86abc000", // mainTaskId
116
+ {
117
+ currentPhase: 1,
118
+ totalPhases: 4,
119
+ phaseName: "Backend Implementation",
120
+ subtaskId: "86abc123",
121
+ nextPhaseName: "Frontend Integration"
122
+ }
123
+ );
124
+ ```
125
+
126
+ ---
127
+
128
+ ### 4. Validação de Critérios de Aceitação
129
+
130
+ #### `validateAcceptanceCriteria(taskId)`
131
+
132
+ **Responsabilidade**: Extrair e validar checkboxes de aceitação da task.
133
+
134
+ **Retorno:**
135
+ ```typescript
136
+ {
137
+ isComplete: boolean;
138
+ coverage: number; // Ex: 85.7
139
+ completedCriteria: number; // Ex: 6
140
+ totalCriteria: number; // Ex: 7
141
+ criteria: {
142
+ text: string;
143
+ completed: boolean;
144
+ }[];
145
+ pendingCriteria: string[]; // Lista de critérios não completos
146
+ }
147
+ ```
148
+
149
+ **Uso:**
150
+ ```typescript
151
+ const validation = await validateAcceptanceCriteria("86abc000");
152
+
153
+ if (!validation.isComplete) {
154
+ console.log(`Faltam: ${validation.pendingCriteria.join(", ")}`);
155
+ }
156
+ ```
157
+
158
+ ---
159
+
160
+ ### 5. Comentário de Validação Pre-PR
161
+
162
+ #### `commentPrePRValidation(taskId, validationData)`
163
+
164
+ **Responsabilidade**: Adicionar comentário de validação antes do PR.
165
+
166
+ **Parâmetros:**
167
+ ```typescript
168
+ validationData: {
169
+ acceptanceCriteriaCompleted: boolean;
170
+ criteriaCount: number; // Ex: 7/7
171
+ metaspecsCompliant: boolean;
172
+ codeReviewDone: boolean;
173
+ documentationUpdated: boolean;
174
+ testsCoverage: number; // Ex: 95
175
+ lintErrors: number;
176
+ readyForPR: boolean;
177
+ timestamp?: string;
178
+ }
179
+ ```
180
+
181
+ **Retorno:**
182
+ ```typescript
183
+ {
184
+ success: boolean;
185
+ commentId: string;
186
+ tagged: boolean; // Se adicionou tag 'ready-for-pr' ou 'needs-fixes'
187
+ }
188
+ ```
189
+
190
+ **Uso:**
191
+ ```typescript
192
+ await commentPrePRValidation("86abc000", {
193
+ acceptanceCriteriaCompleted: true,
194
+ criteriaCount: 7,
195
+ metaspecsCompliant: true,
196
+ codeReviewDone: true,
197
+ documentationUpdated: true,
198
+ testsCoverage: 98,
199
+ lintErrors: 0,
200
+ readyForPR: true
201
+ });
202
+ ```
203
+
204
+ ---
205
+
206
+ ### 6. Comentário de PR Criada
207
+
208
+ #### `commentPRCreated(taskId, prData)`
209
+
210
+ **Responsabilidade**: Documentar criação de PR na task.
211
+
212
+ **Parâmetros:**
213
+ ```typescript
214
+ prData: {
215
+ prUrl: string; // Link do PR
216
+ branch: string; // Nome da branch
217
+ changesDescription: string; // Descrição das mudanças
218
+ testsStatus: "passing" | "failing" | "not-run";
219
+ timestamp?: string;
220
+ }
221
+ ```
222
+
223
+ **Retorno:**
224
+ ```typescript
225
+ {
226
+ success: boolean;
227
+ commentId: string;
228
+ }
229
+ ```
230
+
231
+ ---
232
+
233
+ ### 7. Comentário de PR Atualizada
234
+
235
+ #### `commentPRUpdated(taskId, updateData)`
236
+
237
+ **Responsabilidade**: Documentar atualização de PR existente.
238
+
239
+ **Parâmetros:**
240
+ ```typescript
241
+ updateData: {
242
+ commitType: "fix" | "feat" | "docs" | "refactor" | "style" | "test" | "chore";
243
+ commitHash: string;
244
+ filesModified: number;
245
+ linesAdded: number;
246
+ linesRemoved: number;
247
+ description: string;
248
+ status: "ready-for-review" | "awaiting-fixes";
249
+ timestamp?: string;
250
+ }
251
+ ```
252
+
253
+ **Retorno:**
254
+ ```typescript
255
+ {
256
+ success: boolean;
257
+ commentId: string;
258
+ }
259
+ ```
260
+
261
+ ---
262
+
263
+ ## 🔄 Fluxo de Integração
264
+
265
+ ### Como Usar Nos Comandos
266
+
267
+ #### Antes (Acoplado):
268
+ ```markdown
269
+ # /engineer/work.md
270
+
271
+ const detailedComment = `🔧 FASE COMPLETADA: ...`;
272
+ await mcp_clickup_create_task_comment({...});
273
+ ```
274
+
275
+ #### Depois (Desacoplado):
276
+ ```markdown
277
+ # /engineer/work.md
278
+
279
+ Ao completar uma fase, o wrapper automaticamente:
280
+ - Cria comentário detalhado na subtask
281
+ - Atualiza status para "done"
282
+ - Cria comentário resumido na task principal
283
+
284
+ Chamada simples:
285
+ \`\`\`
286
+ commentPhaseCompletion(subtaskId, phaseData)
287
+ \`\`\`
288
+ ```
289
+
290
+ ---
291
+
292
+ ## 📊 Benefícios de Usar Wrappers
293
+
294
+ ### ✅ Quando MCP muda:
295
+ ```
296
+ ANTES (Acoplado):
297
+ - Altera engineer/work.md ❌
298
+ - Altera engineer/pr.md ❌
299
+ - Altera engineer/pre-pr.md ❌
300
+ - Altera engineer/pr-update.md ❌
301
+ - Altera product/task.md ❌
302
+ - Risco altíssimo de inconsistência!
303
+
304
+ DEPOIS (Centralizado):
305
+ - Altera APENAS: clickup-mcp-wrappers.md ✅
306
+ - Todos os comandos automaticamente usam nova versão
307
+ - Sem risco de inconsistência
308
+ ```
309
+
310
+ ### ✅ Quando descobre novo padrão:
311
+ ```
312
+ ANTES:
313
+ - Precisa atualizar em 4+ lugares
314
+ - Risco de deixar algum para trás
315
+
316
+ DEPOIS:
317
+ - Atualiza apenas na fonte
318
+ - Todos os comandos herdam mudança
319
+ ```
320
+
321
+ ### ✅ Testabilidade:
322
+ ```
323
+ ANTES:
324
+ - Testar padrão de comentário em 5 comandos
325
+
326
+ DEPOIS:
327
+ - Testar uma vez na abstração
328
+ - Confiança que todos os comandos usam padrão testado
329
+ ```
330
+
331
+ ---
332
+
333
+ ## 🧪 Testes de Validação
334
+
335
+ ### Teste 1: Formato Consistente
336
+
337
+ Validar que todos os comentários seguem padrão:
338
+
339
+ ```typescript
340
+ test("Todos os comentários têm separadores consistentes", () => {
341
+ const comment = generateDetailedPhaseComment({...});
342
+ expect(comment).toMatch(/━━━━━━━━━━━━━━/); // Novo tamanho
343
+ expect(comment).not.toMatch(/━{34}/); // Não usa tamanho antigo
344
+ });
345
+ ```
346
+
347
+ ### Teste 2: Integridade dos Dados
348
+
349
+ Validar que informações não são perdidas:
350
+
351
+ ```typescript
352
+ test("Todas as informações de fase são incluídas", () => {
353
+ const phaseData = {
354
+ phaseName: "Backend",
355
+ filesModified: ["file1.ts", "file2.ts"],
356
+ implementations: ["impl1", "impl2"],
357
+ testCoverage: 95
358
+ };
359
+ const comment = await commentPhaseCompletion(...);
360
+ expect(comment).toContain("Backend");
361
+ expect(comment).toContain("file1.ts");
362
+ expect(comment).toContain("95%");
363
+ });
364
+ ```
365
+
366
+ ---
367
+
368
+ ## 🎯 Próximos Passos
369
+
370
+ 1. **Criar abstrações** - Implementar em `.cursor/utils/clickup-mcp-wrappers.md`
371
+ 2. **Refatorar comandos** - Remover acoplamento de cada comando
372
+ 3. **Atualizar documentação** - Remover exemplos de implementação
373
+ 4. **Validar** - Testar que tudo funciona
374
+ 5. **Documentar padrões** - Colocar em `.cursor/docs/strategies/`
375
+
376
+ ---
377
+
378
+ ## 📚 Relacionado
379
+
380
+ - [Acoplamento ClickUp - Análise](./acoplamento-clickup-problema-analise.md)
381
+ - [Estratégias de Comentários](../docs/strategies/clickup-comment-patterns.md)
382
+ - [Dual Comment Strategy](../docs/clickup/clickup-dual-comment-strategy.md)
383
+
384
+ ---
385
+
386
+ **Status**: Implementação CONCLUÍDA - FASE 3 ✅
387
+ **Prioridade**: ALTA
388
+ **Impacto**: Reduz acoplamento, melhora manutenibilidade
389
+ **Esforço**: Implementado em ~2 horas
390
+
391
+ ---
392
+
393
+ ## 🔧 Implementação COMPLETA
394
+
395
+ Todas as 7 abstrações foram implementadas com suporte total a TypeScript e integração MCP.
396
+
397
+ ### Tipos TypeScript
398
+
399
+ ```typescript
400
+ interface PhaseData {
401
+ phaseName: string;
402
+ filesModified: string[];
403
+ implementations: string[];
404
+ testFiles?: { file: string; count: number }[];
405
+ testCoverage?: number;
406
+ technicalDecisions?: string[];
407
+ nextPhase?: string;
408
+ timestamp?: string;
409
+ }
410
+
411
+ interface ProgressData {
412
+ currentPhase: number;
413
+ totalPhases: number;
414
+ phaseName: string;
415
+ subtaskId: string;
416
+ nextPhaseName?: string;
417
+ timestamp?: string;
418
+ }
419
+
420
+ interface ValidationData {
421
+ acceptanceCriteriaCompleted: boolean;
422
+ criteriaCount: number;
423
+ metaspecsCompliant: boolean;
424
+ codeReviewDone: boolean;
425
+ documentationUpdated: boolean;
426
+ testsCoverage: number;
427
+ lintErrors: number;
428
+ readyForPR: boolean;
429
+ timestamp?: string;
430
+ }
431
+
432
+ interface PRData {
433
+ prUrl: string;
434
+ branch: string;
435
+ changesDescription: string;
436
+ testsStatus: "passing" | "failing" | "not-run";
437
+ timestamp?: string;
438
+ }
439
+
440
+ interface UpdateData {
441
+ commitType: string;
442
+ commitHash: string;
443
+ filesModified: number;
444
+ linesAdded: number;
445
+ linesRemoved: number;
446
+ description: string;
447
+ status: "ready-for-review" | "awaiting-fixes";
448
+ timestamp?: string;
449
+ }
450
+ ```
451
+
452
+ ### 1. commentPhaseCompletion() - Implementado
453
+
454
+ ```typescript
455
+ export async function commentPhaseCompletion(subtaskId: string, phaseData: PhaseData) {
456
+ const { phaseName, filesModified, implementations, testFiles, testCoverage, technicalDecisions, nextPhase, timestamp } = phaseData;
457
+
458
+ const formattedComment = `🔧 FASE COMPLETADA: ${phaseName}
459
+
460
+ ━━━━━━━━━━━━━━
461
+
462
+ 📁 ARQUIVOS MODIFICADOS:
463
+ ${filesModified.map(f => ` ∟ ${f}`).join('\n')}
464
+
465
+ 🔧 IMPLEMENTAÇÕES:
466
+ ${implementations.map(impl => ` ▶ ${impl}`).join('\n')}
467
+
468
+ ✅ TESTES ADICIONADOS:
469
+ ${testFiles?.map(t => ` ∟ ${t.file} (${t.count} testes)`).join('\n') || ' ∟ Nenhum arquivo de teste adicionado'}
470
+ ${testCoverage ? ` ∟ Cobertura: ${testCoverage}%` : ''}
471
+
472
+ 💡 DECISÕES TÉCNICAS:
473
+ ${technicalDecisions?.map(d => ` ∟ ${d}`).join('\n') || ' ∟ Nenhuma decisão registrada'}
474
+
475
+ 🚀 PRÓXIMOS PASSOS:
476
+ ∟ ${nextPhase || 'Próxima fase não definida'}
477
+
478
+ ━━━━━━━━━━━━━━
479
+
480
+ ⏰ Completado: ${timestamp || new Date().toISOString()} | 🎯 Status: Done`;
481
+
482
+ return await mcp_clickup_create_task_comment({
483
+ task_id: subtaskId,
484
+ comment_text: formattedComment
485
+ });
486
+ }
487
+ ```
488
+
489
+ ### 2. updateSubtaskStatus() - Implementado
490
+
491
+ ```typescript
492
+ export async function updateSubtaskStatus(subtaskId: string, status: string) {
493
+ const validStatuses = ["to do", "in progress", "done", "closed"];
494
+
495
+ if (!validStatuses.includes(status)) {
496
+ throw new Error(`Status inválido: ${status}. Use um de: ${validStatuses.join(', ')}`);
497
+ }
498
+
499
+ const task = await mcp_clickup_get_task({ task_id: subtaskId });
500
+ const previousStatus = task.status.status;
501
+
502
+ await mcp_clickup_update_task({
503
+ task_id: subtaskId,
504
+ status: status
505
+ });
506
+
507
+ return { success: true, previousStatus, newStatus: status };
508
+ }
509
+ ```
510
+
511
+ ### 3. commentProgressUpdate() - Implementado
512
+
513
+ ```typescript
514
+ export async function commentProgressUpdate(mainTaskId: string, progressData: ProgressData) {
515
+ const { currentPhase, totalPhases, phaseName, subtaskId, nextPhaseName, timestamp } = progressData;
516
+
517
+ const formattedComment = `📝 PROGRESSO: Fase ${currentPhase}/${totalPhases} Completada
518
+
519
+ ✅ ${phaseName} - Concluída
520
+ ∟ Subtask: #${subtaskId}
521
+ ∟ Detalhes: Ver comentário na subtask
522
+
523
+ 🎯 Próximo: Fase ${currentPhase + 1}/${totalPhases} - ${nextPhaseName || 'Próxima fase'}
524
+
525
+ ⏰ ${timestamp || new Date().toISOString()}`;
526
+
527
+ return await mcp_clickup_create_task_comment({
528
+ task_id: mainTaskId,
529
+ comment_text: formattedComment
530
+ });
531
+ }
532
+ ```
533
+
534
+ ### 4. validateAcceptanceCriteria() - Implementado
535
+
536
+ ```typescript
537
+ export async function validateAcceptanceCriteria(taskId: string) {
538
+ const task = await mcp_clickup_get_task({ task_id: taskId });
539
+ const description = task.markdown_description || task.description || '';
540
+
541
+ const checkboxRegex = /- \[([ xX])\]\s*(.+)/g;
542
+ const matches = [...description.matchAll(checkboxRegex)];
543
+
544
+ const criteria = matches.map(m => ({
545
+ text: m[2],
546
+ completed: m[1].toLowerCase() === 'x'
547
+ }));
548
+
549
+ const completedCriteria = criteria.filter(c => c.completed).length;
550
+ const totalCriteria = criteria.length;
551
+ const coverage = totalCriteria > 0 ? (completedCriteria / totalCriteria) * 100 : 0;
552
+
553
+ return {
554
+ isComplete: completedCriteria === totalCriteria && totalCriteria > 0,
555
+ coverage: parseFloat(coverage.toFixed(1)),
556
+ completedCriteria,
557
+ totalCriteria,
558
+ criteria,
559
+ pendingCriteria: criteria.filter(c => !c.completed).map(c => c.text)
560
+ };
561
+ }
562
+ ```
563
+
564
+ ### 5. commentPrePRValidation() - Implementado
565
+
566
+ ```typescript
567
+ export async function commentPrePRValidation(taskId: string, validationData: ValidationData) {
568
+ const { acceptanceCriteriaCompleted, criteriaCount, metaspecsCompliant, codeReviewDone, documentationUpdated, testsCoverage, lintErrors, readyForPR, timestamp } = validationData;
569
+
570
+ const formattedComment = `🔍 PREPARAÇÃO PARA PULL REQUEST
571
+
572
+ ━━━━━━━━━━━━━━
573
+
574
+ ✅ CRITÉRIOS DE ACEITAÇÃO:
575
+ ◆ ${acceptanceCriteriaCompleted ? '[x]' : '[ ]'} Todos os checkboxes marcados
576
+ ◆ Total: ${criteriaCount} critérios completos ${acceptanceCriteriaCompleted ? '✅' : '⚠️'}
577
+
578
+ ✅ VERIFICAÇÕES TÉCNICAS:
579
+ ◆ Meta-specs compliance: ${metaspecsCompliant ? '✅' : '❌'}
580
+ ◆ Code review: ${codeReviewDone ? '✅' : '❌'}
581
+ ◆ Documentation: ${documentationUpdated ? '✅' : '❌'}
582
+ ◆ Tests coverage: ${testsCoverage}%
583
+
584
+ 📊 QUALIDADE:
585
+ ∟ Lint errors: ${lintErrors}
586
+ ∟ Test coverage: ${testsCoverage}%
587
+
588
+ 🚀 STATUS PARA PR:
589
+ ∟ ${readyForPR ? 'PRONTO ✅' : 'REQUER AJUSTES ⚠️'}
590
+
591
+ ━━━━━━━━━━━━━━
592
+
593
+ ⏰ Preparação: ${timestamp || new Date().toISOString()} | 🎯 Próximo: ${readyForPR ? 'Abrir Pull Request' : 'Fazer ajustes'}`;
594
+
595
+ await mcp_clickup_create_task_comment({ task_id: taskId, comment_text: formattedComment });
596
+ const tag = readyForPR ? 'ready-for-pr' : 'needs-fixes';
597
+ await mcp_clickup_add_tag_to_task({ task_id: taskId, tag_name: tag });
598
+
599
+ return { success: true, tagged: true };
600
+ }
601
+ ```
602
+
603
+ ### 6. commentPRCreated() - Implementado
604
+
605
+ ```typescript
606
+ export async function commentPRCreated(taskId: string, prData: PRData) {
607
+ const { prUrl, branch, changesDescription, testsStatus, timestamp } = prData;
608
+
609
+ const formattedComment = `🚀 PULL REQUEST CRIADA
610
+
611
+ ━━━━━━━━━━━━━━
612
+
613
+ 📋 MUDANÇAS:
614
+ ∟ ${changesDescription}
615
+
616
+ 🔗 DETALHES:
617
+ ▶ PR: ${prUrl}
618
+ ▶ Branch: ${branch}
619
+ ▶ Testes: ${testsStatus === 'passing' ? '✅ Passando' : '⏳ Aguardando'}
620
+
621
+ ━━━━━━━━━━━━━━
622
+
623
+ ⏰ Criada: ${timestamp || new Date().toISOString()} | 🎯 Próximo: Code review & merge`;
624
+
625
+ return await mcp_clickup_create_task_comment({
626
+ task_id: taskId,
627
+ comment_text: formattedComment
628
+ });
629
+ }
630
+ ```
631
+
632
+ ### 7. commentPRUpdated() - Implementado
633
+
634
+ ```typescript
635
+ export async function commentPRUpdated(taskId: string, updateData: UpdateData) {
636
+ const { commitType, commitHash, filesModified, linesAdded, linesRemoved, description, status, timestamp } = updateData;
637
+
638
+ const formattedComment = `📝 PR ATUALIZADA - ${commitType.toUpperCase()}
639
+
640
+ ━━━━━━━━━━━━━━
641
+
642
+ 🔄 COMMIT:
643
+ ▶ Hash: ${commitHash}
644
+ ▶ Tipo: ${commitType}
645
+ ▶ Arquivos: ${filesModified} (+${linesAdded}/-${linesRemoved} linhas)
646
+
647
+ 🛠️ MUDANÇAS:
648
+ ∟ ${description}
649
+
650
+ ✅ STATUS:
651
+ ∟ ${status === 'ready-for-review' ? '✅ Ready for review' : '⏳ Awaiting fixes'}
652
+
653
+ ━━━━━━━━━━━━━━
654
+
655
+ ⏰ Atualizada: ${timestamp || new Date().toISOString()} | 🚀 Status: ${status}`;
656
+
657
+ return await mcp_clickup_create_task_comment({
658
+ task_id: taskId,
659
+ comment_text: formattedComment
660
+ });
661
+ }
662
+ ```
663
+
664
+ ---
665
+
666
+ ## ✅ FASE 3 - ABSTRAÇÕES MCP COMPLETAS
667
+
668
+ **Status**: 7/7 abstrações implementadas ✅
669
+ **Tempo**: ~2 horas
670
+ **Resultado**: Pronto para Fase 4 (Refatoração de Comandos)
671
+