@onion-architect-ai/cli 4.1.0-beta.1 → 4.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +8 -7
- package/dist/cli.js.map +1 -1
- package/package.json +4 -3
- package/templates/.cursor/agents/compliance/iso-22301-specialist.md +917 -0
- package/templates/.cursor/agents/compliance/iso-27001-specialist.md +641 -0
- package/templates/.cursor/agents/compliance/pmbok-specialist.md +669 -0
- package/templates/.cursor/agents/compliance/security-information-master.md +824 -0
- package/templates/.cursor/agents/compliance/soc2-specialist.md +818 -0
- package/templates/.cursor/agents/deployment/docker-specialist.md +1192 -0
- package/templates/.cursor/agents/meta/agent-creator-specialist.md +1135 -0
- package/templates/.cursor/agents/meta/command-creator-specialist.md +1519 -0
- package/templates/.cursor/agents/meta/metaspec-gate-keeper.md +240 -0
- package/templates/.cursor/agents/meta/onion.md +753 -0
- package/templates/.cursor/agents/research/research-agent.md +292 -0
- package/templates/.cursor/agents/review/corporate-compliance-specialist.md +370 -0
- package/templates/.cursor/commands/common/prompts/README.md +187 -0
- package/templates/.cursor/commands/common/prompts/clickup-patterns.md +144 -0
- package/templates/.cursor/commands/common/prompts/code-review-checklist.md +168 -0
- package/templates/.cursor/commands/common/prompts/git-workflow-patterns.md +235 -0
- package/templates/.cursor/commands/common/prompts/output-formats.md +240 -0
- package/templates/.cursor/commands/common/prompts/technical.md +172 -0
- package/templates/.cursor/commands/common/prompts/validation-rules.md +173 -0
- package/templates/.cursor/commands/common/templates/abstraction-template.md +400 -0
- package/templates/.cursor/commands/common/templates/agent-template.md +353 -0
- package/templates/.cursor/commands/common/templates/business_context_template.md +748 -0
- package/templates/.cursor/commands/common/templates/command-template.md +273 -0
- package/templates/.cursor/commands/common/templates/technical_context_template.md +526 -0
- package/templates/.cursor/commands/development/runflow-dev.md +465 -0
- package/templates/.cursor/commands/docs/build-compliance-docs.md +143 -0
- package/templates/.cursor/commands/git/README.md +606 -0
- package/templates/.cursor/commands/meta/all-tools.md +50 -0
- package/templates/.cursor/commands/meta/analyze-complex-problem.md +186 -0
- package/templates/.cursor/commands/meta/create-abstraction.md +859 -0
- package/templates/.cursor/commands/meta/create-agent-express.md +83 -0
- package/templates/.cursor/commands/meta/create-agent.md +210 -0
- package/templates/.cursor/commands/meta/create-command.md +203 -0
- package/templates/.cursor/commands/meta/create-knowledge-base.md +143 -0
- package/templates/.cursor/commands/meta/create-task-structure.md +150 -0
- package/templates/.cursor/commands/meta/setup-integration.md +257 -0
- package/templates/.cursor/commands/onion/setup.md +843 -0
- package/templates/.cursor/commands/onion.md +168 -0
- package/templates/.cursor/commands/product/README.md +230 -0
- package/templates/.cursor/commands/quick/analisys.md +17 -0
- package/templates/.cursor/commands/validate/collab/pair-testing.md +633 -0
- package/templates/.cursor/commands/validate/collab/three-amigos.md +505 -0
- package/templates/.cursor/commands/validate/qa-points/estimate.md +660 -0
- package/templates/.cursor/commands/validate/test-strategy/analyze.md +1134 -0
- package/templates/.cursor/commands/validate/test-strategy/create.md +392 -0
- package/templates/.cursor/commands/validate/workflow.md +360 -0
- package/templates/.cursor/commands/warm-up.md +91 -0
- package/templates/.cursor/docs/architecture/acoplamento-clickup-problema-analise.md +446 -0
- package/templates/.cursor/docs/architecture/desacoplamento-roadmap.md +360 -0
- package/templates/.cursor/docs/architecture/validacao-fase-1.md +219 -0
- package/templates/.cursor/docs/c4/c4-detection-rules.md +395 -0
- package/templates/.cursor/docs/c4/c4-documentation-templates.md +579 -0
- package/templates/.cursor/docs/c4/c4-mermaid-patterns.md +331 -0
- package/templates/.cursor/docs/c4/c4-templates.md +256 -0
- package/templates/.cursor/docs/clickup/clickup-acceptance-criteria-strategy.md +329 -0
- package/templates/.cursor/docs/clickup/clickup-auto-update-strategy.md +318 -0
- package/templates/.cursor/docs/clickup/clickup-comment-formatter.md +239 -0
- package/templates/.cursor/docs/clickup/clickup-description-fix.md +355 -0
- package/templates/.cursor/docs/clickup/clickup-dual-comment-strategy.md +505 -0
- package/templates/.cursor/docs/clickup/clickup-formatting.md +302 -0
- package/templates/.cursor/docs/clickup/separador-tamanho-otimizado.md +256 -0
- package/templates/.cursor/docs/engineer/pre-pr-acceptance-validation.md +256 -0
- package/templates/.cursor/docs/onion/ESPERANTO.md +278 -0
- package/templates/.cursor/docs/onion/agents-reference.md +832 -0
- package/templates/.cursor/docs/onion/clickup-integration.md +738 -0
- package/templates/.cursor/docs/onion/commands-guide.md +807 -0
- package/templates/.cursor/docs/onion/engineering-flows.md +865 -0
- package/templates/.cursor/docs/onion/getting-started.md +741 -0
- package/templates/.cursor/docs/onion/maintenance-checklist.md +388 -0
- package/templates/.cursor/docs/onion/naming-conventions.md +268 -0
- package/templates/.cursor/docs/onion/practical-examples.md +782 -0
- package/templates/.cursor/docs/product/story-points-integration.md +254 -0
- package/templates/.cursor/docs/product/story-points-validation.md +224 -0
- package/templates/.cursor/docs/reviews/task-manager-docs-review-2025-11-24.md +167 -0
- package/templates/.cursor/docs/strategies/clickup-comment-patterns.md +766 -0
- package/templates/.cursor/docs/strategies/clickup-integration-tests.md +599 -0
- package/templates/.cursor/docs/strategies/clickup-mcp-wrappers-tests.md +854 -0
- package/templates/.cursor/docs/strategies/clickup-regression-tests.md +589 -0
- package/templates/.cursor/docs/strategies/visual-patterns.md +308 -0
- package/templates/.cursor/docs/templates/README.md +624 -0
- package/templates/.cursor/docs/templates/adr-template.md +226 -0
- package/templates/.cursor/docs/templates/analysis-template.md +280 -0
- package/templates/.cursor/docs/templates/execution-plan-template.md +430 -0
- package/templates/.cursor/docs/templates/guide-template.md +367 -0
- package/templates/.cursor/docs/templates/phase-execution-prompt-template.md +504 -0
- package/templates/.cursor/docs/templates/reference-template.md +522 -0
- package/templates/.cursor/docs/templates/solution-template.md +390 -0
- package/templates/.cursor/docs/tools/README.md +325 -0
- package/templates/.cursor/docs/tools/agents.md +330 -0
- package/templates/.cursor/docs/tools/commands.md +606 -0
- package/templates/.cursor/docs/tools/cursor.md +498 -0
- package/templates/.cursor/docs/tools/mcps.md +858 -0
- package/templates/.cursor/docs/tools/rules.md +423 -0
- package/templates/.cursor/rules/language-and-documentation.mdc +371 -0
- package/templates/.cursor/rules/onion-patterns.mdc +197 -0
- package/templates/.cursor/rules/validation-rules.mdc +194 -0
- package/templates/.cursor/utils/clickup-mcp-wrappers.md +671 -0
- package/templates/.cursor/utils/date-time-standards.md +182 -0
- package/templates/.cursor/utils/task-manager/README.md +94 -0
- package/templates/.cursor/utils/task-manager/adapters/asana.md +377 -0
- package/templates/.cursor/utils/task-manager/adapters/clickup.md +467 -0
- package/templates/.cursor/utils/task-manager/adapters/linear.md +421 -0
- package/templates/.cursor/utils/task-manager/detector.md +290 -0
- package/templates/.cursor/utils/task-manager/factory.md +363 -0
- package/templates/.cursor/utils/task-manager/interface.md +248 -0
- package/templates/.cursor/utils/task-manager/types.md +409 -0
- package/templates/.cursor/validation/product-task-validation.md +344 -0
- package/templates/.onion/contexts/business/.context-config.yml +52 -0
- package/templates/.onion/contexts/business/README.md +222 -0
- package/templates/.onion/contexts/business/agents/branding-specialist.md +1030 -0
- package/templates/.onion/contexts/business/agents/clickup-specialist.md +397 -0
- package/templates/.onion/contexts/business/agents/extract-meeting-specialist.md +395 -0
- package/templates/.onion/contexts/business/agents/gamma-specialist.md +1169 -0
- package/templates/.onion/contexts/business/agents/meeting-consolidator.md +483 -0
- package/templates/.onion/contexts/business/agents/pain-price-specialist.md +509 -0
- package/templates/.onion/contexts/business/agents/presentation-orchestrator.md +1191 -0
- package/templates/.onion/contexts/business/agents/product-agent.md +202 -0
- package/templates/.onion/contexts/business/agents/story-points-specialist.md +539 -0
- package/templates/.onion/contexts/business/agents/storytelling-specialist.md +891 -0
- package/templates/.onion/contexts/business/agents/task-specialist.md +618 -0
- package/templates/.onion/contexts/business/agents/whisper-specialist.md +373 -0
- package/templates/.onion/contexts/business/commands/advanced/analyze-pain-price.md +709 -0
- package/templates/.onion/contexts/business/commands/advanced/branding.md +460 -0
- package/templates/.onion/contexts/business/commands/advanced/checklist-sync.md +241 -0
- package/templates/.onion/contexts/business/commands/advanced/presentation.md +189 -0
- package/templates/.onion/contexts/business/commands/advanced/transform-consolidated.md +592 -0
- package/templates/.onion/contexts/business/commands/help.md +212 -0
- package/templates/.onion/contexts/business/commands/intermediate/check.md +48 -0
- package/templates/.onion/contexts/business/commands/intermediate/collect.md +96 -0
- package/templates/.onion/contexts/business/commands/intermediate/consolidate-meetings.md +306 -0
- package/templates/.onion/contexts/business/commands/intermediate/convert-to-tasks.md +220 -0
- package/templates/.onion/contexts/business/commands/intermediate/extract-meeting.md +241 -0
- package/templates/.onion/contexts/business/commands/intermediate/feature.md +431 -0
- package/templates/.onion/contexts/business/commands/intermediate/light-arch.md +97 -0
- package/templates/.onion/contexts/business/commands/intermediate/task-check.md +340 -0
- package/templates/.onion/contexts/business/commands/intermediate/validate-task.md +294 -0
- package/templates/.onion/contexts/business/commands/intermediate/whisper.md +325 -0
- package/templates/.onion/contexts/business/commands/starter/estimate.md +519 -0
- package/templates/.onion/contexts/business/commands/starter/refine.md +186 -0
- package/templates/.onion/contexts/business/commands/starter/spec.md +107 -0
- package/templates/.onion/contexts/business/commands/starter/task.md +585 -0
- package/templates/.onion/contexts/business/commands/starter/warm-up.md +187 -0
- package/templates/.onion/contexts/technical/.context-config.yml +64 -0
- package/templates/.onion/contexts/technical/README.md +238 -0
- package/templates/.onion/contexts/technical/agents/branch-code-reviewer.md +200 -0
- package/templates/.onion/contexts/technical/agents/branch-doc-writer.md +162 -0
- package/templates/.onion/contexts/technical/agents/branch-metaspec-checker.md +68 -0
- package/templates/.onion/contexts/technical/agents/branch-test-planner.md +177 -0
- package/templates/.onion/contexts/technical/agents/c4-architecture-specialist.md +712 -0
- package/templates/.onion/contexts/technical/agents/c4-documentation-specialist.md +658 -0
- package/templates/.onion/contexts/technical/agents/code-reviewer.md +155 -0
- package/templates/.onion/contexts/technical/agents/cursor-specialist.md +249 -0
- package/templates/.onion/contexts/technical/agents/docs-reverse-engineer.md +418 -0
- package/templates/.onion/contexts/technical/agents/gitflow-specialist.md +1207 -0
- package/templates/.onion/contexts/technical/agents/linux-security-specialist.md +676 -0
- package/templates/.onion/contexts/technical/agents/mermaid-specialist.md +516 -0
- package/templates/.onion/contexts/technical/agents/nodejs-specialist.md +673 -0
- package/templates/.onion/contexts/technical/agents/nx-migration-specialist.md +867 -0
- package/templates/.onion/contexts/technical/agents/nx-monorepo-specialist.md +619 -0
- package/templates/.onion/contexts/technical/agents/postgres-specialist.md +1124 -0
- package/templates/.onion/contexts/technical/agents/react-developer.md +132 -0
- package/templates/.onion/contexts/technical/agents/runflow-specialist.md +278 -0
- package/templates/.onion/contexts/technical/agents/system-doc-orchestrator.md +1388 -0
- package/templates/.onion/contexts/technical/agents/test-agent.md +425 -0
- package/templates/.onion/contexts/technical/agents/test-engineer.md +295 -0
- package/templates/.onion/contexts/technical/agents/test-planner.md +118 -0
- package/templates/.onion/contexts/technical/agents/zen-engine-specialist.md +421 -0
- package/templates/.onion/contexts/technical/commands/advanced/bump.md +43 -0
- package/templates/.onion/contexts/technical/commands/advanced/consolidate-documents.md +424 -0
- package/templates/.onion/contexts/technical/commands/advanced/e2e.md +392 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-finish.md +90 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-publish.md +91 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-start.md +158 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix-finish.md +98 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix-start.md +94 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix.md +186 -0
- package/templates/.onion/contexts/technical/commands/advanced/refine-vision.md +27 -0
- package/templates/.onion/contexts/technical/commands/advanced/release-finish.md +98 -0
- package/templates/.onion/contexts/technical/commands/advanced/release-start.md +95 -0
- package/templates/.onion/contexts/technical/commands/advanced/reverse-consolidate.md +160 -0
- package/templates/.onion/contexts/technical/commands/advanced/validate-phase-sync.md +118 -0
- package/templates/.onion/contexts/technical/commands/help.md +329 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-business-docs.md +276 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-index.md +128 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-tech-docs.md +204 -0
- package/templates/.onion/contexts/technical/commands/intermediate/code-review.md +215 -0
- package/templates/.onion/contexts/technical/commands/intermediate/docs-health.md +142 -0
- package/templates/.onion/contexts/technical/commands/intermediate/fast-commit.md +45 -0
- package/templates/.onion/contexts/technical/commands/intermediate/integration.md +523 -0
- package/templates/.onion/contexts/technical/commands/intermediate/pr-update.md +198 -0
- package/templates/.onion/contexts/technical/commands/intermediate/pre-pr.md +91 -0
- package/templates/.onion/contexts/technical/commands/intermediate/start.md +266 -0
- package/templates/.onion/contexts/technical/commands/intermediate/sync-sessions.md +320 -0
- package/templates/.onion/contexts/technical/commands/intermediate/unit.md +378 -0
- package/templates/.onion/contexts/technical/commands/intermediate/validate-docs.md +159 -0
- package/templates/.onion/contexts/technical/commands/starter/docs.md +39 -0
- package/templates/.onion/contexts/technical/commands/starter/help.md +306 -0
- package/templates/.onion/contexts/technical/commands/starter/init.md +139 -0
- package/templates/.onion/contexts/technical/commands/starter/plan.md +111 -0
- package/templates/.onion/contexts/technical/commands/starter/pr.md +136 -0
- package/templates/.onion/contexts/technical/commands/starter/sync.md +228 -0
- package/templates/.onion/contexts/technical/commands/starter/warm-up.md +173 -0
- package/templates/.onion/contexts/technical/commands/starter/work.md +169 -0
- package/templates/.onion/core/commands/help.md +388 -0
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
# 🔄 Estratégia Dual de Comentários - Task vs Subtask
|
|
2
|
+
|
|
3
|
+
## 🎯 Objetivo
|
|
4
|
+
|
|
5
|
+
Manter **contexto técnico detalhado nas subtasks** e **resumo executivo na task principal**, garantindo rastreabilidade completa e comunicação eficiente para diferentes audiências.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 📋 Problema Identificado
|
|
10
|
+
|
|
11
|
+
### Comportamento Anterior (❌ Incorreto):
|
|
12
|
+
```
|
|
13
|
+
📋 Task Principal (ID: 123)
|
|
14
|
+
└── 💬 Comentário detalhado aqui (na task principal)
|
|
15
|
+
- Arquivos modificados
|
|
16
|
+
- Decisões técnicas
|
|
17
|
+
- Testes implementados
|
|
18
|
+
|
|
19
|
+
├── 🔧 Subtask 1: Backend Implementation (ID: 456)
|
|
20
|
+
│ └── (Sem comentário) ❌
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Problemas:**
|
|
24
|
+
- ❌ Contexto técnico perdido na task principal
|
|
25
|
+
- ❌ Subtask não tem histórico de implementação
|
|
26
|
+
- ❌ Difícil rastrear decisões específicas por componente
|
|
27
|
+
- ❌ Product Owners veem detalhes técnicos desnecessários
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## ✅ Solução Implementada
|
|
32
|
+
|
|
33
|
+
### Comportamento Correto:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
📋 Task Principal (ID: 123)
|
|
37
|
+
└── 💬 Comentário RESUMIDO (nota executiva)
|
|
38
|
+
"✅ Fase 1/4 completada - Backend Implementation
|
|
39
|
+
🎯 Próximo: Fase 2 - Frontend Integration"
|
|
40
|
+
|
|
41
|
+
├── 🔧 Subtask 1: Backend Implementation (ID: 456)
|
|
42
|
+
│ └── 💬 Comentário DETALHADO (técnico completo)
|
|
43
|
+
│ - Arquivos modificados: 15 arquivos
|
|
44
|
+
│ - Decisões técnicas: JWT, bcrypt, etc
|
|
45
|
+
│ - Testes: 20 testes, 95% cobertura
|
|
46
|
+
│ - Status: Done ✅
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Benefícios:**
|
|
50
|
+
- ✅ Contexto técnico preservado na subtask
|
|
51
|
+
- ✅ Visão executiva clara na task principal
|
|
52
|
+
- ✅ Rastreabilidade completa por componente
|
|
53
|
+
- ✅ Comunicação eficiente para diferentes audiências
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 📚 Quando Usar Cada Tipo
|
|
58
|
+
|
|
59
|
+
### 💬 Comentário DETALHADO (Subtask)
|
|
60
|
+
|
|
61
|
+
**Quando:**
|
|
62
|
+
- Fase/componente específico completado
|
|
63
|
+
- Implementação técnica realizada
|
|
64
|
+
- Decisões de arquitetura tomadas
|
|
65
|
+
- Testes adicionados
|
|
66
|
+
- Refatoração executada
|
|
67
|
+
|
|
68
|
+
**Audiência:**
|
|
69
|
+
- Desenvolvedores
|
|
70
|
+
- Tech Leads
|
|
71
|
+
- Code Reviewers
|
|
72
|
+
|
|
73
|
+
**Conteúdo:**
|
|
74
|
+
- Arquivos modificados (lista completa)
|
|
75
|
+
- Implementações realizadas (detalhes técnicos)
|
|
76
|
+
- Testes adicionados (cobertura, arquivos)
|
|
77
|
+
- Decisões técnicas (justificativas)
|
|
78
|
+
- Próximos passos (ações específicas)
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
### 📝 Comentário RESUMIDO (Task Principal)
|
|
83
|
+
|
|
84
|
+
**Quando:**
|
|
85
|
+
- Progresso geral da feature
|
|
86
|
+
- Milestone alcançado
|
|
87
|
+
- Status update executivo
|
|
88
|
+
- Mudança de fase
|
|
89
|
+
|
|
90
|
+
**Audiência:**
|
|
91
|
+
- Product Owners
|
|
92
|
+
- Stakeholders
|
|
93
|
+
- Project Managers
|
|
94
|
+
|
|
95
|
+
**Conteúdo:**
|
|
96
|
+
- Fase completada (número e nome)
|
|
97
|
+
- Link para subtask (onde estão os detalhes)
|
|
98
|
+
- Próxima fase (o que vem a seguir)
|
|
99
|
+
- Timestamp
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## 🔧 Templates de Implementação
|
|
104
|
+
|
|
105
|
+
### Template 1: Comentário DETALHADO (Subtask)
|
|
106
|
+
|
|
107
|
+
```typescript
|
|
108
|
+
const detailedComment = `🔧 FASE COMPLETADA: ${phaseName}
|
|
109
|
+
|
|
110
|
+
━━━━━━━━━━━━━━━━
|
|
111
|
+
|
|
112
|
+
📁 ARQUIVOS MODIFICADOS:
|
|
113
|
+
∟ ${file1}
|
|
114
|
+
∟ ${file2}
|
|
115
|
+
∟ ${file3}
|
|
116
|
+
${moreFiles ? `∟ ... e mais ${moreFiles.length} arquivos` : ''}
|
|
117
|
+
|
|
118
|
+
🔧 IMPLEMENTAÇÕES:
|
|
119
|
+
▶ ${implementation1}
|
|
120
|
+
▶ ${implementation2}
|
|
121
|
+
▶ ${implementation3}
|
|
122
|
+
|
|
123
|
+
✅ TESTES ADICIONADOS:
|
|
124
|
+
∟ ${testFile1} (${testCount1} testes)
|
|
125
|
+
∟ ${testFile2} (${testCount2} testes)
|
|
126
|
+
∟ Cobertura: ${coverage}%
|
|
127
|
+
|
|
128
|
+
💡 DECISÕES TÉCNICAS:
|
|
129
|
+
∟ ${decision1}
|
|
130
|
+
∟ ${decision2}
|
|
131
|
+
∟ ${decision3}
|
|
132
|
+
|
|
133
|
+
🚀 PRÓXIMOS PASSOS:
|
|
134
|
+
∟ ${nextPhase}
|
|
135
|
+
∟ ${nextAction1}
|
|
136
|
+
∟ ${nextAction2}
|
|
137
|
+
|
|
138
|
+
━━━━━━━━━━━━━━━━
|
|
139
|
+
|
|
140
|
+
⏰ Completado: ${timestamp} | 🎯 Status: Done`;
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Template 2: Comentário RESUMIDO (Task Principal)
|
|
144
|
+
|
|
145
|
+
```typescript
|
|
146
|
+
const summaryComment = `📝 PROGRESSO: Fase ${phaseNum}/${totalPhases} Completada
|
|
147
|
+
|
|
148
|
+
✅ ${phaseName} - Concluída
|
|
149
|
+
∟ Subtask: #${subtaskId}
|
|
150
|
+
∟ Detalhes: Ver comentário na subtask
|
|
151
|
+
|
|
152
|
+
🎯 Próximo: Fase ${nextPhaseNum} - ${nextPhaseName}
|
|
153
|
+
|
|
154
|
+
⏰ ${timestamp}`;
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## 📊 Fluxo de Atualização
|
|
160
|
+
|
|
161
|
+
### Sequência Correta:
|
|
162
|
+
|
|
163
|
+
```typescript
|
|
164
|
+
// 1. Comentário DETALHADO na SUBTASK
|
|
165
|
+
await mcp_clickup_create_task_comment({
|
|
166
|
+
task_id: subtaskId,
|
|
167
|
+
workspace_id: workspaceId,
|
|
168
|
+
comment_text: generateDetailedComment({
|
|
169
|
+
phaseName,
|
|
170
|
+
filesModified,
|
|
171
|
+
implementations,
|
|
172
|
+
tests,
|
|
173
|
+
decisions,
|
|
174
|
+
nextSteps
|
|
175
|
+
})
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
// 2. Atualizar STATUS da SUBTASK
|
|
179
|
+
await mcp_clickup_update_task({
|
|
180
|
+
task_id: subtaskId,
|
|
181
|
+
workspace_id: workspaceId,
|
|
182
|
+
status: 'Done'
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
// 3. Comentário RESUMIDO na TASK PRINCIPAL
|
|
186
|
+
await mcp_clickup_create_task_comment({
|
|
187
|
+
task_id: mainTaskId,
|
|
188
|
+
workspace_id: workspaceId,
|
|
189
|
+
comment_text: generateSummaryComment({
|
|
190
|
+
phaseNum,
|
|
191
|
+
totalPhases,
|
|
192
|
+
phaseName,
|
|
193
|
+
subtaskId,
|
|
194
|
+
nextPhaseNum,
|
|
195
|
+
nextPhaseName
|
|
196
|
+
})
|
|
197
|
+
});
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## 🗺️ Mapeamento Fase → Subtask
|
|
203
|
+
|
|
204
|
+
### Estrutura Necessária no `context.md`:
|
|
205
|
+
|
|
206
|
+
```markdown
|
|
207
|
+
## 🗺️ Phase → Subtask Mapping
|
|
208
|
+
|
|
209
|
+
**Main Task ID**: 86abc000
|
|
210
|
+
|
|
211
|
+
| Fase | Subtask ID | Subtask Name | Status |
|
|
212
|
+
|------|------------|--------------|--------|
|
|
213
|
+
| 1 | 86abc123 | Backend Implementation | done |
|
|
214
|
+
| 2 | 86abc124 | Frontend Integration | in progress |
|
|
215
|
+
| 3 | 86abc125 | Testing & QA | to do |
|
|
216
|
+
| 4 | 86abc126 | Documentation | to do |
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Como Usar no Código:
|
|
220
|
+
|
|
221
|
+
```typescript
|
|
222
|
+
// Ler mapeamento do context.md
|
|
223
|
+
const mapping = parsePhaseSubtaskMapping(contextMd);
|
|
224
|
+
|
|
225
|
+
// Obter subtask da fase atual
|
|
226
|
+
const currentPhase = identifyCurrentPhase(planMd);
|
|
227
|
+
const subtaskInfo = mapping[currentPhase];
|
|
228
|
+
|
|
229
|
+
// Usar IDs corretos
|
|
230
|
+
const subtaskId = subtaskInfo.subtaskId;
|
|
231
|
+
const mainTaskId = mapping.mainTaskId;
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## 📝 Comandos Afetados
|
|
237
|
+
|
|
238
|
+
### 1. `/engineer/work` (CRÍTICO)
|
|
239
|
+
|
|
240
|
+
**Mudança:**
|
|
241
|
+
- ❌ Antes: Comentário na task principal
|
|
242
|
+
- ✅ Depois: Comentário detalhado na subtask + resumo na task principal
|
|
243
|
+
|
|
244
|
+
**Implementação:**
|
|
245
|
+
```typescript
|
|
246
|
+
// Ao completar fase
|
|
247
|
+
await updateSubtaskWithDetails(subtaskId, phaseDetails);
|
|
248
|
+
await updateMainTaskWithSummary(mainTaskId, phaseSummary);
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
### 2. `/engineer/start` (Opcional)
|
|
254
|
+
|
|
255
|
+
**Mudança:**
|
|
256
|
+
- Comentário inicial pode ir na task principal (é setup, não implementação)
|
|
257
|
+
- Se houver subtasks pré-criadas, adicionar comentário de início em cada uma
|
|
258
|
+
|
|
259
|
+
**Implementação:**
|
|
260
|
+
```typescript
|
|
261
|
+
// Comentário de início na task principal
|
|
262
|
+
await create_task_comment({
|
|
263
|
+
task_id: mainTaskId,
|
|
264
|
+
comment_text: `🚀 DESENVOLVIMENTO INICIADO
|
|
265
|
+
|
|
266
|
+
━━━━━━━━━━━━━━━━━━━━━━━━
|
|
267
|
+
|
|
268
|
+
🏗️ SESSÃO ATIVADA:
|
|
269
|
+
▶ Branch: ${branch}
|
|
270
|
+
▶ Sessão: ${sessionPath}
|
|
271
|
+
▶ Arquitetura: Definida
|
|
272
|
+
|
|
273
|
+
📋 PLANO: ${totalPhases} fases
|
|
274
|
+
|
|
275
|
+
━━━━━━━━━━━━━━━━━━━━━━━━
|
|
276
|
+
|
|
277
|
+
⏰ ${timestamp}`
|
|
278
|
+
});
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
### 3. `/engineer/pr` (Manter Atual)
|
|
284
|
+
|
|
285
|
+
**Comportamento:**
|
|
286
|
+
- Comentário vai na task principal (é ação global da feature)
|
|
287
|
+
- Não precisa mudar
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
### 4. `/product/task-check` (Novo Comportamento)
|
|
292
|
+
|
|
293
|
+
**Mudança:**
|
|
294
|
+
- Verificação de subtask → comentário na subtask
|
|
295
|
+
- Resumo geral → comentário na task principal
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
## 🎨 Exemplos Práticos
|
|
300
|
+
|
|
301
|
+
### Exemplo 1: Completar Fase de Backend
|
|
302
|
+
|
|
303
|
+
**Subtask (86abc123) - Comentário Detalhado:**
|
|
304
|
+
```
|
|
305
|
+
🔧 FASE COMPLETADA: Backend Implementation
|
|
306
|
+
|
|
307
|
+
━━━━━━━━━━━━━━━━
|
|
308
|
+
|
|
309
|
+
📁 ARQUIVOS MODIFICADOS:
|
|
310
|
+
∟ src/services/auth.service.ts
|
|
311
|
+
∟ src/controllers/auth.controller.ts
|
|
312
|
+
∟ src/middleware/jwt.middleware.ts
|
|
313
|
+
∟ src/models/user.model.ts
|
|
314
|
+
∟ src/routes/auth.routes.ts
|
|
315
|
+
|
|
316
|
+
🔧 IMPLEMENTAÇÕES:
|
|
317
|
+
▶ JWT generation e validation
|
|
318
|
+
▶ Refresh token mechanism
|
|
319
|
+
▶ Password hashing com bcrypt
|
|
320
|
+
▶ Error handling e logging
|
|
321
|
+
▶ Rate limiting para endpoints
|
|
322
|
+
|
|
323
|
+
✅ TESTES ADICIONADOS:
|
|
324
|
+
∟ auth.service.spec.ts (12 testes)
|
|
325
|
+
∟ auth.controller.spec.ts (8 testes)
|
|
326
|
+
∟ jwt.middleware.spec.ts (6 testes)
|
|
327
|
+
∟ Cobertura: 95%
|
|
328
|
+
|
|
329
|
+
💡 DECISÕES TÉCNICAS:
|
|
330
|
+
∟ Usamos jsonwebtoken v9.0.0 (mais recente)
|
|
331
|
+
∟ Access token: 15min, Refresh: 7 dias
|
|
332
|
+
∟ Bcrypt rounds: 10 (balanceamento perf/segurança)
|
|
333
|
+
∟ Rate limit: 5 tentativas/15min por IP
|
|
334
|
+
|
|
335
|
+
🚀 PRÓXIMOS PASSOS:
|
|
336
|
+
∟ Fase 2: Frontend Integration
|
|
337
|
+
∟ Criar AuthContext no React
|
|
338
|
+
∟ Implementar token storage seguro
|
|
339
|
+
|
|
340
|
+
━━━━━━━━━━━━━━━━
|
|
341
|
+
|
|
342
|
+
⏰ Completado: 2025-11-05 16:45 | 🎯 Status: Done
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
**Task Principal (86abc000) - Comentário Resumido:**
|
|
346
|
+
```
|
|
347
|
+
📝 PROGRESSO: Fase 1/4 Completada
|
|
348
|
+
|
|
349
|
+
✅ Backend Implementation - Concluída
|
|
350
|
+
∟ Subtask: #86abc123
|
|
351
|
+
∟ Detalhes: Ver comentário na subtask
|
|
352
|
+
|
|
353
|
+
🎯 Próximo: Fase 2 - Frontend Integration
|
|
354
|
+
|
|
355
|
+
⏰ 2025-11-05 16:45
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
### Exemplo 2: Completar Fase de Frontend
|
|
361
|
+
|
|
362
|
+
**Subtask (86abc124) - Comentário Detalhado:**
|
|
363
|
+
```
|
|
364
|
+
🔧 FASE COMPLETADA: Frontend Integration
|
|
365
|
+
|
|
366
|
+
━━━━━━━━━━━━━━━━
|
|
367
|
+
|
|
368
|
+
📁 ARQUIVOS MODIFICADOS:
|
|
369
|
+
∟ src/contexts/AuthContext.tsx
|
|
370
|
+
∟ src/hooks/useAuth.ts
|
|
371
|
+
∟ src/pages/Login.tsx
|
|
372
|
+
∟ src/components/ProtectedRoute.tsx
|
|
373
|
+
∟ src/services/api.service.ts
|
|
374
|
+
|
|
375
|
+
🔧 IMPLEMENTAÇÕES:
|
|
376
|
+
▶ AuthContext com React Context API
|
|
377
|
+
▶ useAuth hook customizado
|
|
378
|
+
▶ Login page com validação
|
|
379
|
+
▶ ProtectedRoute component
|
|
380
|
+
▶ Interceptor axios para token refresh
|
|
381
|
+
|
|
382
|
+
✅ TESTES ADICIONADOS:
|
|
383
|
+
∟ AuthContext.test.tsx (10 testes)
|
|
384
|
+
∟ useAuth.test.ts (8 testes)
|
|
385
|
+
∟ Login.test.tsx (12 testes)
|
|
386
|
+
∟ Cobertura: 92%
|
|
387
|
+
|
|
388
|
+
💡 DECISÕES TÉCNICAS:
|
|
389
|
+
∟ Token storage: localStorage (com encryption)
|
|
390
|
+
∟ Auto-refresh: 1min antes de expirar
|
|
391
|
+
∟ Redirect após login: dashboard
|
|
392
|
+
∟ Error handling: toast notifications
|
|
393
|
+
|
|
394
|
+
🚀 PRÓXIMOS PASSOS:
|
|
395
|
+
∟ Fase 3: Testing & QA
|
|
396
|
+
∟ E2E tests com Cypress
|
|
397
|
+
∟ Security audit
|
|
398
|
+
|
|
399
|
+
━━━━━━━━━━━━━━━━
|
|
400
|
+
|
|
401
|
+
⏰ Completado: 2025-11-06 10:30 | 🎯 Status: Done
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
**Task Principal (86abc000) - Comentário Resumido:**
|
|
405
|
+
```
|
|
406
|
+
📝 PROGRESSO: Fase 2/4 Completada
|
|
407
|
+
|
|
408
|
+
✅ Frontend Integration - Concluída
|
|
409
|
+
∟ Subtask: #86abc124
|
|
410
|
+
∟ Detalhes: Ver comentário na subtask
|
|
411
|
+
|
|
412
|
+
🎯 Próximo: Fase 3 - Testing & QA
|
|
413
|
+
|
|
414
|
+
⏰ 2025-11-06 10:30
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
## ✅ Benefícios por Audiência
|
|
420
|
+
|
|
421
|
+
### Para Desenvolvedores:
|
|
422
|
+
- ✅ Contexto técnico completo na subtask
|
|
423
|
+
- ✅ Histórico de decisões preservado
|
|
424
|
+
- ✅ Fácil code review (tudo documentado)
|
|
425
|
+
- ✅ Rastreabilidade de mudanças
|
|
426
|
+
|
|
427
|
+
### Para Product Owners:
|
|
428
|
+
- ✅ Visão executiva clara na task principal
|
|
429
|
+
- ✅ Progresso objetivo e mensurável
|
|
430
|
+
- ✅ Sem sobrecarga de detalhes técnicos
|
|
431
|
+
- ✅ Fácil comunicação com stakeholders
|
|
432
|
+
|
|
433
|
+
### Para Tech Leads:
|
|
434
|
+
- ✅ Visão completa em ambos os níveis
|
|
435
|
+
- ✅ Pode revisar detalhes técnicos quando necessário
|
|
436
|
+
- ✅ Pode reportar progresso executivo facilmente
|
|
437
|
+
- ✅ Melhor gestão de conhecimento
|
|
438
|
+
|
|
439
|
+
---
|
|
440
|
+
|
|
441
|
+
## 🔍 Troubleshooting
|
|
442
|
+
|
|
443
|
+
### Problema: Subtask ID não encontrado
|
|
444
|
+
|
|
445
|
+
**Causa:** Mapeamento fase→subtask não existe no context.md
|
|
446
|
+
|
|
447
|
+
**Solução:**
|
|
448
|
+
```typescript
|
|
449
|
+
// Verificar se mapeamento existe
|
|
450
|
+
if (!mapping[currentPhase]) {
|
|
451
|
+
console.warn(`Mapeamento não encontrado para fase ${currentPhase}`);
|
|
452
|
+
// Fallback: comentar apenas na task principal
|
|
453
|
+
await create_task_comment({
|
|
454
|
+
task_id: mainTaskId,
|
|
455
|
+
comment_text: detailedComment
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
---
|
|
461
|
+
|
|
462
|
+
### Problema: Task principal não tem ID
|
|
463
|
+
|
|
464
|
+
**Causa:** Context.md não tem mainTaskId
|
|
465
|
+
|
|
466
|
+
**Solução:**
|
|
467
|
+
```typescript
|
|
468
|
+
// Extrair do context.md
|
|
469
|
+
const mainTaskId = extractMainTaskId(contextMd);
|
|
470
|
+
if (!mainTaskId) {
|
|
471
|
+
throw new Error('Main task ID not found in context.md');
|
|
472
|
+
}
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
---
|
|
476
|
+
|
|
477
|
+
## 📊 Métricas de Sucesso
|
|
478
|
+
|
|
479
|
+
### Indicadores de que está funcionando:
|
|
480
|
+
|
|
481
|
+
- ✅ Subtasks têm comentários detalhados
|
|
482
|
+
- ✅ Task principal tem comentários resumidos
|
|
483
|
+
- ✅ Desenvolvedores encontram contexto técnico facilmente
|
|
484
|
+
- ✅ POs conseguem reportar progresso sem detalhes técnicos
|
|
485
|
+
- ✅ Histórico completo de implementação preservado
|
|
486
|
+
|
|
487
|
+
---
|
|
488
|
+
|
|
489
|
+
## 🚀 Implementação
|
|
490
|
+
|
|
491
|
+
### Checklist de Comandos:
|
|
492
|
+
|
|
493
|
+
- [ ] `/engineer/work` - Implementar estratégia dual
|
|
494
|
+
- [ ] `/engineer/start` - Ajustar comentário inicial
|
|
495
|
+
- [ ] `/product/task-check` - Implementar estratégia dual
|
|
496
|
+
- [ ] Documentar em `.cursor/docs/clickup/clickup-auto-update-strategy.md`
|
|
497
|
+
- [ ] Testar com task real
|
|
498
|
+
- [ ] Validar comentários em ambos os níveis
|
|
499
|
+
|
|
500
|
+
---
|
|
501
|
+
|
|
502
|
+
**Última atualização**: 2025-11-05
|
|
503
|
+
**Status**: Documentado e pronto para implementação
|
|
504
|
+
**Prioridade**: ALTA - Melhora significativa de UX
|
|
505
|
+
|