@onion-architect-ai/cli 4.1.0-beta.1 → 4.1.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +8 -19
- package/dist/cli.js.map +1 -1
- package/package.json +4 -3
- package/templates/.cursor/agents/compliance/iso-22301-specialist.md +917 -0
- package/templates/.cursor/agents/compliance/iso-27001-specialist.md +641 -0
- package/templates/.cursor/agents/compliance/pmbok-specialist.md +669 -0
- package/templates/.cursor/agents/compliance/security-information-master.md +824 -0
- package/templates/.cursor/agents/compliance/soc2-specialist.md +818 -0
- package/templates/.cursor/agents/deployment/docker-specialist.md +1192 -0
- package/templates/.cursor/agents/meta/agent-creator-specialist.md +1135 -0
- package/templates/.cursor/agents/meta/command-creator-specialist.md +1519 -0
- package/templates/.cursor/agents/meta/metaspec-gate-keeper.md +240 -0
- package/templates/.cursor/agents/meta/onion.md +753 -0
- package/templates/.cursor/agents/research/research-agent.md +292 -0
- package/templates/.cursor/agents/review/corporate-compliance-specialist.md +370 -0
- package/templates/.cursor/commands/common/prompts/README.md +187 -0
- package/templates/.cursor/commands/common/prompts/clickup-patterns.md +144 -0
- package/templates/.cursor/commands/common/prompts/code-review-checklist.md +168 -0
- package/templates/.cursor/commands/common/prompts/git-workflow-patterns.md +235 -0
- package/templates/.cursor/commands/common/prompts/output-formats.md +240 -0
- package/templates/.cursor/commands/common/prompts/technical.md +172 -0
- package/templates/.cursor/commands/common/prompts/validation-rules.md +173 -0
- package/templates/.cursor/commands/common/templates/abstraction-template.md +400 -0
- package/templates/.cursor/commands/common/templates/agent-template.md +353 -0
- package/templates/.cursor/commands/common/templates/business_context_template.md +748 -0
- package/templates/.cursor/commands/common/templates/command-template.md +273 -0
- package/templates/.cursor/commands/common/templates/technical_context_template.md +526 -0
- package/templates/.cursor/commands/development/runflow-dev.md +465 -0
- package/templates/.cursor/commands/docs/build-compliance-docs.md +143 -0
- package/templates/.cursor/commands/git/README.md +606 -0
- package/templates/.cursor/commands/meta/all-tools.md +50 -0
- package/templates/.cursor/commands/meta/analyze-complex-problem.md +186 -0
- package/templates/.cursor/commands/meta/create-abstraction.md +859 -0
- package/templates/.cursor/commands/meta/create-agent-express.md +83 -0
- package/templates/.cursor/commands/meta/create-agent.md +210 -0
- package/templates/.cursor/commands/meta/create-command.md +203 -0
- package/templates/.cursor/commands/meta/create-knowledge-base.md +143 -0
- package/templates/.cursor/commands/meta/create-task-structure.md +150 -0
- package/templates/.cursor/commands/meta/setup-integration.md +257 -0
- package/templates/.cursor/commands/onion/setup.md +843 -0
- package/templates/.cursor/commands/onion.md +168 -0
- package/templates/.cursor/commands/product/README.md +230 -0
- package/templates/.cursor/commands/quick/analisys.md +17 -0
- package/templates/.cursor/commands/validate/collab/pair-testing.md +633 -0
- package/templates/.cursor/commands/validate/collab/three-amigos.md +505 -0
- package/templates/.cursor/commands/validate/qa-points/estimate.md +660 -0
- package/templates/.cursor/commands/validate/test-strategy/analyze.md +1134 -0
- package/templates/.cursor/commands/validate/test-strategy/create.md +392 -0
- package/templates/.cursor/commands/validate/workflow.md +360 -0
- package/templates/.cursor/commands/warm-up.md +91 -0
- package/templates/.cursor/docs/architecture/acoplamento-clickup-problema-analise.md +446 -0
- package/templates/.cursor/docs/architecture/desacoplamento-roadmap.md +360 -0
- package/templates/.cursor/docs/architecture/validacao-fase-1.md +219 -0
- package/templates/.cursor/docs/c4/c4-detection-rules.md +395 -0
- package/templates/.cursor/docs/c4/c4-documentation-templates.md +579 -0
- package/templates/.cursor/docs/c4/c4-mermaid-patterns.md +331 -0
- package/templates/.cursor/docs/c4/c4-templates.md +256 -0
- package/templates/.cursor/docs/clickup/clickup-acceptance-criteria-strategy.md +329 -0
- package/templates/.cursor/docs/clickup/clickup-auto-update-strategy.md +318 -0
- package/templates/.cursor/docs/clickup/clickup-comment-formatter.md +239 -0
- package/templates/.cursor/docs/clickup/clickup-description-fix.md +355 -0
- package/templates/.cursor/docs/clickup/clickup-dual-comment-strategy.md +505 -0
- package/templates/.cursor/docs/clickup/clickup-formatting.md +302 -0
- package/templates/.cursor/docs/clickup/separador-tamanho-otimizado.md +256 -0
- package/templates/.cursor/docs/engineer/pre-pr-acceptance-validation.md +256 -0
- package/templates/.cursor/docs/onion/ESPERANTO.md +278 -0
- package/templates/.cursor/docs/onion/agents-reference.md +832 -0
- package/templates/.cursor/docs/onion/clickup-integration.md +738 -0
- package/templates/.cursor/docs/onion/commands-guide.md +807 -0
- package/templates/.cursor/docs/onion/engineering-flows.md +865 -0
- package/templates/.cursor/docs/onion/getting-started.md +741 -0
- package/templates/.cursor/docs/onion/maintenance-checklist.md +388 -0
- package/templates/.cursor/docs/onion/naming-conventions.md +268 -0
- package/templates/.cursor/docs/onion/practical-examples.md +782 -0
- package/templates/.cursor/docs/product/story-points-integration.md +254 -0
- package/templates/.cursor/docs/product/story-points-validation.md +224 -0
- package/templates/.cursor/docs/reviews/task-manager-docs-review-2025-11-24.md +167 -0
- package/templates/.cursor/docs/strategies/clickup-comment-patterns.md +766 -0
- package/templates/.cursor/docs/strategies/clickup-integration-tests.md +599 -0
- package/templates/.cursor/docs/strategies/clickup-mcp-wrappers-tests.md +854 -0
- package/templates/.cursor/docs/strategies/clickup-regression-tests.md +589 -0
- package/templates/.cursor/docs/strategies/visual-patterns.md +308 -0
- package/templates/.cursor/docs/templates/README.md +624 -0
- package/templates/.cursor/docs/templates/adr-template.md +226 -0
- package/templates/.cursor/docs/templates/analysis-template.md +280 -0
- package/templates/.cursor/docs/templates/execution-plan-template.md +430 -0
- package/templates/.cursor/docs/templates/guide-template.md +367 -0
- package/templates/.cursor/docs/templates/phase-execution-prompt-template.md +504 -0
- package/templates/.cursor/docs/templates/reference-template.md +522 -0
- package/templates/.cursor/docs/templates/solution-template.md +390 -0
- package/templates/.cursor/docs/tools/README.md +325 -0
- package/templates/.cursor/docs/tools/agents.md +330 -0
- package/templates/.cursor/docs/tools/commands.md +606 -0
- package/templates/.cursor/docs/tools/cursor.md +498 -0
- package/templates/.cursor/docs/tools/mcps.md +858 -0
- package/templates/.cursor/docs/tools/rules.md +423 -0
- package/templates/.cursor/rules/language-and-documentation.mdc +371 -0
- package/templates/.cursor/rules/onion-patterns.mdc +197 -0
- package/templates/.cursor/rules/validation-rules.mdc +194 -0
- package/templates/.cursor/utils/clickup-mcp-wrappers.md +671 -0
- package/templates/.cursor/utils/date-time-standards.md +182 -0
- package/templates/.cursor/utils/task-manager/README.md +94 -0
- package/templates/.cursor/utils/task-manager/adapters/asana.md +377 -0
- package/templates/.cursor/utils/task-manager/adapters/clickup.md +467 -0
- package/templates/.cursor/utils/task-manager/adapters/linear.md +421 -0
- package/templates/.cursor/utils/task-manager/detector.md +290 -0
- package/templates/.cursor/utils/task-manager/factory.md +363 -0
- package/templates/.cursor/utils/task-manager/interface.md +248 -0
- package/templates/.cursor/utils/task-manager/types.md +409 -0
- package/templates/.cursor/validation/product-task-validation.md +344 -0
- package/templates/.onion/contexts/business/.context-config.yml +52 -0
- package/templates/.onion/contexts/business/README.md +222 -0
- package/templates/.onion/contexts/business/agents/branding-specialist.md +1030 -0
- package/templates/.onion/contexts/business/agents/clickup-specialist.md +397 -0
- package/templates/.onion/contexts/business/agents/extract-meeting-specialist.md +395 -0
- package/templates/.onion/contexts/business/agents/gamma-specialist.md +1169 -0
- package/templates/.onion/contexts/business/agents/meeting-consolidator.md +483 -0
- package/templates/.onion/contexts/business/agents/pain-price-specialist.md +509 -0
- package/templates/.onion/contexts/business/agents/presentation-orchestrator.md +1191 -0
- package/templates/.onion/contexts/business/agents/product-agent.md +202 -0
- package/templates/.onion/contexts/business/agents/story-points-specialist.md +539 -0
- package/templates/.onion/contexts/business/agents/storytelling-specialist.md +891 -0
- package/templates/.onion/contexts/business/agents/task-specialist.md +618 -0
- package/templates/.onion/contexts/business/agents/whisper-specialist.md +373 -0
- package/templates/.onion/contexts/business/commands/advanced/analyze-pain-price.md +709 -0
- package/templates/.onion/contexts/business/commands/advanced/branding.md +460 -0
- package/templates/.onion/contexts/business/commands/advanced/checklist-sync.md +241 -0
- package/templates/.onion/contexts/business/commands/advanced/presentation.md +189 -0
- package/templates/.onion/contexts/business/commands/advanced/transform-consolidated.md +592 -0
- package/templates/.onion/contexts/business/commands/help.md +212 -0
- package/templates/.onion/contexts/business/commands/intermediate/check.md +48 -0
- package/templates/.onion/contexts/business/commands/intermediate/collect.md +96 -0
- package/templates/.onion/contexts/business/commands/intermediate/consolidate-meetings.md +306 -0
- package/templates/.onion/contexts/business/commands/intermediate/convert-to-tasks.md +220 -0
- package/templates/.onion/contexts/business/commands/intermediate/extract-meeting.md +241 -0
- package/templates/.onion/contexts/business/commands/intermediate/feature.md +431 -0
- package/templates/.onion/contexts/business/commands/intermediate/light-arch.md +97 -0
- package/templates/.onion/contexts/business/commands/intermediate/task-check.md +340 -0
- package/templates/.onion/contexts/business/commands/intermediate/validate-task.md +294 -0
- package/templates/.onion/contexts/business/commands/intermediate/whisper.md +325 -0
- package/templates/.onion/contexts/business/commands/starter/estimate.md +519 -0
- package/templates/.onion/contexts/business/commands/starter/refine.md +186 -0
- package/templates/.onion/contexts/business/commands/starter/spec.md +107 -0
- package/templates/.onion/contexts/business/commands/starter/task.md +585 -0
- package/templates/.onion/contexts/business/commands/starter/warm-up.md +187 -0
- package/templates/.onion/contexts/technical/.context-config.yml +64 -0
- package/templates/.onion/contexts/technical/README.md +238 -0
- package/templates/.onion/contexts/technical/agents/branch-code-reviewer.md +200 -0
- package/templates/.onion/contexts/technical/agents/branch-doc-writer.md +162 -0
- package/templates/.onion/contexts/technical/agents/branch-metaspec-checker.md +68 -0
- package/templates/.onion/contexts/technical/agents/branch-test-planner.md +177 -0
- package/templates/.onion/contexts/technical/agents/c4-architecture-specialist.md +712 -0
- package/templates/.onion/contexts/technical/agents/c4-documentation-specialist.md +658 -0
- package/templates/.onion/contexts/technical/agents/code-reviewer.md +155 -0
- package/templates/.onion/contexts/technical/agents/cursor-specialist.md +249 -0
- package/templates/.onion/contexts/technical/agents/docs-reverse-engineer.md +418 -0
- package/templates/.onion/contexts/technical/agents/gitflow-specialist.md +1207 -0
- package/templates/.onion/contexts/technical/agents/linux-security-specialist.md +676 -0
- package/templates/.onion/contexts/technical/agents/mermaid-specialist.md +516 -0
- package/templates/.onion/contexts/technical/agents/nodejs-specialist.md +673 -0
- package/templates/.onion/contexts/technical/agents/nx-migration-specialist.md +867 -0
- package/templates/.onion/contexts/technical/agents/nx-monorepo-specialist.md +619 -0
- package/templates/.onion/contexts/technical/agents/postgres-specialist.md +1124 -0
- package/templates/.onion/contexts/technical/agents/react-developer.md +132 -0
- package/templates/.onion/contexts/technical/agents/runflow-specialist.md +278 -0
- package/templates/.onion/contexts/technical/agents/system-doc-orchestrator.md +1388 -0
- package/templates/.onion/contexts/technical/agents/test-agent.md +425 -0
- package/templates/.onion/contexts/technical/agents/test-engineer.md +295 -0
- package/templates/.onion/contexts/technical/agents/test-planner.md +118 -0
- package/templates/.onion/contexts/technical/agents/zen-engine-specialist.md +421 -0
- package/templates/.onion/contexts/technical/commands/advanced/bump.md +43 -0
- package/templates/.onion/contexts/technical/commands/advanced/consolidate-documents.md +424 -0
- package/templates/.onion/contexts/technical/commands/advanced/e2e.md +392 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-finish.md +90 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-publish.md +91 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-start.md +158 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix-finish.md +98 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix-start.md +94 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix.md +186 -0
- package/templates/.onion/contexts/technical/commands/advanced/refine-vision.md +27 -0
- package/templates/.onion/contexts/technical/commands/advanced/release-finish.md +98 -0
- package/templates/.onion/contexts/technical/commands/advanced/release-start.md +95 -0
- package/templates/.onion/contexts/technical/commands/advanced/reverse-consolidate.md +160 -0
- package/templates/.onion/contexts/technical/commands/advanced/validate-phase-sync.md +118 -0
- package/templates/.onion/contexts/technical/commands/help.md +329 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-business-docs.md +276 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-index.md +128 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-tech-docs.md +204 -0
- package/templates/.onion/contexts/technical/commands/intermediate/code-review.md +215 -0
- package/templates/.onion/contexts/technical/commands/intermediate/docs-health.md +142 -0
- package/templates/.onion/contexts/technical/commands/intermediate/fast-commit.md +45 -0
- package/templates/.onion/contexts/technical/commands/intermediate/integration.md +523 -0
- package/templates/.onion/contexts/technical/commands/intermediate/pr-update.md +198 -0
- package/templates/.onion/contexts/technical/commands/intermediate/pre-pr.md +91 -0
- package/templates/.onion/contexts/technical/commands/intermediate/start.md +266 -0
- package/templates/.onion/contexts/technical/commands/intermediate/sync-sessions.md +320 -0
- package/templates/.onion/contexts/technical/commands/intermediate/unit.md +378 -0
- package/templates/.onion/contexts/technical/commands/intermediate/validate-docs.md +159 -0
- package/templates/.onion/contexts/technical/commands/starter/docs.md +39 -0
- package/templates/.onion/contexts/technical/commands/starter/help.md +306 -0
- package/templates/.onion/contexts/technical/commands/starter/init.md +139 -0
- package/templates/.onion/contexts/technical/commands/starter/plan.md +111 -0
- package/templates/.onion/contexts/technical/commands/starter/pr.md +136 -0
- package/templates/.onion/contexts/technical/commands/starter/sync.md +228 -0
- package/templates/.onion/contexts/technical/commands/starter/warm-up.md +173 -0
- package/templates/.onion/contexts/technical/commands/starter/work.md +169 -0
- package/templates/.onion/core/commands/help.md +388 -0
|
@@ -0,0 +1,865 @@
|
|
|
1
|
+
# 🔄 Fluxos de Engenharia - Sistema Onion
|
|
2
|
+
|
|
3
|
+
## 📋 Índice
|
|
4
|
+
|
|
5
|
+
- [Visão Geral](#-visão-geral)
|
|
6
|
+
- [Fluxo Completo de Feature](#-fluxo-completo-de-feature)
|
|
7
|
+
- [Fluxo de Hotfix](#-fluxo-de-hotfix)
|
|
8
|
+
- [Fluxo de Release](#-fluxo-de-release)
|
|
9
|
+
- [Fluxo de Documentação](#-fluxo-de-documentação)
|
|
10
|
+
- [Fluxo de Validação](#-fluxo-de-validação)
|
|
11
|
+
- [Integração entre Comandos](#-integração-entre-comandos)
|
|
12
|
+
- [Decision Trees](#-decision-trees)
|
|
13
|
+
- [Troubleshooting](#-troubleshooting)
|
|
14
|
+
- [Fluxos Git (Avançado)](#-fluxos-git-avançado)
|
|
15
|
+
- [Documentos Relacionados](#-documentos-relacionados)
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 🎯 Visão Geral
|
|
20
|
+
|
|
21
|
+
O Sistema Onion oferece workflows automatizados centrados em **comandos de engenharia** (`/engineer/*`) e **produto** (`/product/*`), com integração automática ao ClickUp e Git. Todos os fluxos seguem o padrão de nomenclatura `<feature-slug>` (kebab-case).
|
|
22
|
+
|
|
23
|
+
### Princípios dos Fluxos
|
|
24
|
+
1. **Engineering-First**: Comandos `/engineer/*` são o core do desenvolvimento
|
|
25
|
+
2. **Product-Driven**: `/product/*` gerencia tasks e planejamento estratégico
|
|
26
|
+
3. **Automação Inteligente**: Git e ClickUp são gerenciados automaticamente
|
|
27
|
+
4. **Session Management**: Contexto preservado em `.cursor/sessions/`
|
|
28
|
+
5. **Documentação Automática**: Geração de docs durante desenvolvimento
|
|
29
|
+
|
|
30
|
+
### Hierarquia de Comandos
|
|
31
|
+
```
|
|
32
|
+
🎯 CORE (Prioridade Máxima)
|
|
33
|
+
├── /product/* # Gestão de produto e tasks
|
|
34
|
+
└── /engineer/* # Desenvolvimento e implementação
|
|
35
|
+
|
|
36
|
+
⚙️ SUPORTE (Automáticos)
|
|
37
|
+
├── /docs/* # Documentação e sessões
|
|
38
|
+
└── /git/* # Git (usado internamente pelos comandos core)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 🚀 Fluxo Completo de Feature
|
|
44
|
+
|
|
45
|
+
### Visão Geral
|
|
46
|
+
Fluxo end-to-end para desenvolvimento de uma nova funcionalidade, desde a criação da task até o merge final.
|
|
47
|
+
|
|
48
|
+
### Diagrama do Fluxo
|
|
49
|
+
|
|
50
|
+
```mermaid
|
|
51
|
+
flowchart TD
|
|
52
|
+
A[Inicio] --> B["/product/task"]
|
|
53
|
+
B --> C{Task Criada?}
|
|
54
|
+
C -->|Sim| D["/engineer/start"]
|
|
55
|
+
C -->|Nao| B
|
|
56
|
+
|
|
57
|
+
D --> E{Analise OK?}
|
|
58
|
+
E -->|Nao| F[Clarificacoes]
|
|
59
|
+
F --> D
|
|
60
|
+
E -->|Sim| G[Arquitetura]
|
|
61
|
+
|
|
62
|
+
G --> H{Arquitetura OK?}
|
|
63
|
+
H -->|Nao| I[Ajustes]
|
|
64
|
+
I --> G
|
|
65
|
+
H -->|Sim| J["/engineer/work"]
|
|
66
|
+
|
|
67
|
+
J --> K[Implementar Fase]
|
|
68
|
+
K --> L{Fase Completa?}
|
|
69
|
+
L -->|Nao| K
|
|
70
|
+
L -->|Sim| M[Auto-Update ClickUp]
|
|
71
|
+
|
|
72
|
+
M --> N{Mais Fases?}
|
|
73
|
+
N -->|Sim| J
|
|
74
|
+
N -->|Nao| O["/engineer/pr"]
|
|
75
|
+
|
|
76
|
+
O --> P["/engineer/pre-pr"]
|
|
77
|
+
P --> Q[Code Review]
|
|
78
|
+
Q --> R{Aprovado?}
|
|
79
|
+
R -->|Nao| S[Correcoes]
|
|
80
|
+
S --> O
|
|
81
|
+
R -->|Sim| T[Merge]
|
|
82
|
+
|
|
83
|
+
T --> U["/docs/sync-sessions"]
|
|
84
|
+
U --> V[Concluido]
|
|
85
|
+
|
|
86
|
+
style A fill:#e1f5e1
|
|
87
|
+
style V fill:#e1f5e1
|
|
88
|
+
style B fill:#fff3cd
|
|
89
|
+
style D fill:#fff3cd
|
|
90
|
+
style J fill:#fff3cd
|
|
91
|
+
style O fill:#fff3cd
|
|
92
|
+
style P fill:#fff3cd
|
|
93
|
+
style U fill:#fff3cd
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Passo a Passo Detalhado
|
|
97
|
+
|
|
98
|
+
#### 1. Criação da Task (`/product/task`)
|
|
99
|
+
```bash
|
|
100
|
+
/product/task "Implementar autenticação JWT com refresh tokens"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**O que acontece:**
|
|
104
|
+
1. ✅ Análise de documentação (README.md, docs/)
|
|
105
|
+
2. ✅ Identificação de complexidade e pattern
|
|
106
|
+
3. ✅ Apresentação do plano para confirmação
|
|
107
|
+
4. ✅ Criação no ClickUp (Task + Subtasks + Action Items)
|
|
108
|
+
5. ✅ Integração Git automática (`/git/feature/start` ou branch direta)
|
|
109
|
+
6. ✅ Setup de sessão (`.cursor/sessions/<feature-slug>/`)
|
|
110
|
+
7. ✅ Criação de context files
|
|
111
|
+
|
|
112
|
+
**Saída:**
|
|
113
|
+
```
|
|
114
|
+
📋 Task: 86acu8pdk
|
|
115
|
+
🌿 Branch: feature/jwt-authentication
|
|
116
|
+
📁 Sessão: .cursor/sessions/jwt-authentication/
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
#### 2. Início do Desenvolvimento (`/engineer/start`)
|
|
122
|
+
```bash
|
|
123
|
+
/engineer/start jwt-authentication
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**O que acontece:**
|
|
127
|
+
1. ✅ Valida/cria feature branch
|
|
128
|
+
2. ✅ Lê task do ClickUp (com subtasks e checklists)
|
|
129
|
+
3. ✅ Análise profunda (5-7 questões de clarificação)
|
|
130
|
+
4. ✅ Cria `context.md` com entendimento
|
|
131
|
+
5. ✅ Desenvolve `architecture.md` detalhada
|
|
132
|
+
6. ✅ Gera `plan.md` com fases de implementação
|
|
133
|
+
7. ✅ Atualiza ClickUp (status → "In Progress")
|
|
134
|
+
8. ✅ Cria mapeamento fase→subtask
|
|
135
|
+
|
|
136
|
+
**Arquivos Criados:**
|
|
137
|
+
```
|
|
138
|
+
.cursor/sessions/jwt-authentication/
|
|
139
|
+
├── context.md # Contexto completo
|
|
140
|
+
├── architecture.md # Arquitetura técnica
|
|
141
|
+
└── plan.md # Plano de implementação
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
#### 3. Implementação (`/engineer/work`)
|
|
147
|
+
```bash
|
|
148
|
+
/engineer/work jwt-authentication
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**O que acontece:**
|
|
152
|
+
1. ✅ Lê arquivos da sessão
|
|
153
|
+
2. ✅ Identifica fase atual no `plan.md`
|
|
154
|
+
3. ✅ Implementa código da fase
|
|
155
|
+
4. ✅ Ao completar fase:
|
|
156
|
+
- Adiciona comentário no ClickUp
|
|
157
|
+
- Atualiza status da subtask para "done"
|
|
158
|
+
- Atualiza `plan.md` com decisões
|
|
159
|
+
5. ✅ Repete para próximas fases
|
|
160
|
+
|
|
161
|
+
**Ciclo de Implementação:**
|
|
162
|
+
```mermaid
|
|
163
|
+
flowchart LR
|
|
164
|
+
A[Ler plan.md] --> B[Identificar Fase]
|
|
165
|
+
B --> C[Implementar]
|
|
166
|
+
C --> D[Validar com Usuario]
|
|
167
|
+
D --> E{Aprovado?}
|
|
168
|
+
E -->|Nao| C
|
|
169
|
+
E -->|Sim| F[Auto-Update ClickUp]
|
|
170
|
+
F --> G[Atualizar plan.md]
|
|
171
|
+
G --> H{Mais Fases?}
|
|
172
|
+
H -->|Sim| A
|
|
173
|
+
H -->|Nao| I[Concluido]
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
#### 4. Preparação para PR (`/engineer/pre-pr`)
|
|
179
|
+
```bash
|
|
180
|
+
/engineer/pre-pr
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
**O que acontece:**
|
|
184
|
+
1. ✅ Valida testes
|
|
185
|
+
2. ✅ Verifica linting
|
|
186
|
+
3. ✅ Valida cobertura de testes
|
|
187
|
+
4. ✅ Revisa mudanças
|
|
188
|
+
5. ✅ Prepara descrição do PR
|
|
189
|
+
6. ✅ Valida commits
|
|
190
|
+
7. ✅ Checklist de qualidade
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
#### 5. Pull Request (`/engineer/pr`)
|
|
195
|
+
```bash
|
|
196
|
+
/engineer/pr
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**O que acontece:**
|
|
200
|
+
1. ✅ Cria feature branch (se necessário)
|
|
201
|
+
2. ✅ Commit e push das mudanças
|
|
202
|
+
3. ✅ Atualiza ClickUp:
|
|
203
|
+
- Status → "in progress"
|
|
204
|
+
- Tag → "under-review"
|
|
205
|
+
- Comentário com link do PR
|
|
206
|
+
4. ✅ Abre Pull Request
|
|
207
|
+
5. ✅ Aguarda code review
|
|
208
|
+
6. ✅ Aplica correções (se necessário)
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
#### 6. Sincronização de Sessão (`/docs/sync-sessions`)
|
|
213
|
+
```bash
|
|
214
|
+
/docs/sync-sessions
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
**O que acontece (após merge):**
|
|
218
|
+
1. ✅ Analisa trabalho realizado na sessão
|
|
219
|
+
2. ✅ Organiza documentação gerada
|
|
220
|
+
3. ✅ Preserva contexto e decisões
|
|
221
|
+
4. ✅ Gera estrutura de sessão:
|
|
222
|
+
- README.md (resumo)
|
|
223
|
+
- context.md (contexto inicial)
|
|
224
|
+
- decisions.md (decisões tomadas)
|
|
225
|
+
- changes.md (mudanças realizadas)
|
|
226
|
+
5. ✅ Atualiza índice de sessões
|
|
227
|
+
6. ✅ Atualiza ClickUp para "Done"
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
### Responsabilidades dos Comandos
|
|
232
|
+
|
|
233
|
+
#### 🎯 **Comandos CORE (Prioridade Máxima)**
|
|
234
|
+
|
|
235
|
+
| Comando | Responsabilidade | Cria Branch? | Cria Sessão? | Atualiza ClickUp? |
|
|
236
|
+
|---------|------------------|--------------|--------------|-------------------|
|
|
237
|
+
| `/product/task` | Criar task estruturada | ✅ Opcional* | ✅ Sim | ✅ Sim |
|
|
238
|
+
| `/engineer/start` | Análise + Arquitetura | ✅ Valida/Cria* | ✅ Valida | ✅ Sim |
|
|
239
|
+
| `/engineer/work` | Implementação | ❌ Não | ❌ Não | ✅ Sim (por fase) |
|
|
240
|
+
| `/engineer/pre-pr` | Validação pré-PR | ❌ Não | ❌ Não | ❌ Não |
|
|
241
|
+
| `/engineer/pr` | Pull Request | ✅ Se necessário* | ❌ Não | ✅ Sim |
|
|
242
|
+
| `/engineer/hotfix` | Correção emergencial | ❌ Não | ✅ Sim | ✅ Sim |
|
|
243
|
+
|
|
244
|
+
**\* Nota sobre Branches:** Os comandos `/product/task` e `/engineer/start` **gerenciam Git internamente**. Eles chamam comandos `/git/*` automaticamente quando necessário. O usuário **não precisa** executar comandos Git manualmente.
|
|
245
|
+
|
|
246
|
+
#### ⚙️ **Comandos de Suporte (Automáticos)**
|
|
247
|
+
|
|
248
|
+
| Comando | Responsabilidade | Quando Usar |
|
|
249
|
+
|---------|------------------|-------------|
|
|
250
|
+
| `/docs/sync-sessions` | Sincronização de Sessão | Após merge (manual ou automático) |
|
|
251
|
+
| `/git/feature/start` | Criar feature branch | **Chamado internamente** por `/product/task` |
|
|
252
|
+
| `/git/hotfix/start` | Criar hotfix branch | **Chamado internamente** por `/engineer/hotfix` |
|
|
253
|
+
| `/git/hotfix/finish` | Finalizar hotfix | Após merge do PR de hotfix |
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## 🔥 Fluxo de Hotfix
|
|
258
|
+
|
|
259
|
+
### Visão Geral
|
|
260
|
+
Fluxo rápido para correções urgentes em produção usando comandos de engenharia.
|
|
261
|
+
|
|
262
|
+
### Diagrama do Fluxo
|
|
263
|
+
|
|
264
|
+
```mermaid
|
|
265
|
+
flowchart TD
|
|
266
|
+
A[Bug Critico] --> B["/engineer/hotfix"]
|
|
267
|
+
B --> C["Branch hotfix/fix-name"]
|
|
268
|
+
|
|
269
|
+
C --> D[Analise Rapida]
|
|
270
|
+
D --> E[Implementar Fix]
|
|
271
|
+
|
|
272
|
+
E --> F[Testes]
|
|
273
|
+
F --> G{Testes OK?}
|
|
274
|
+
G -->|Nao| E
|
|
275
|
+
G -->|Sim| H["/engineer/pr"]
|
|
276
|
+
|
|
277
|
+
H --> I[Code Review Urgente]
|
|
278
|
+
I --> J{Aprovado?}
|
|
279
|
+
J -->|Nao| E
|
|
280
|
+
J -->|Sim| K[Merge]
|
|
281
|
+
|
|
282
|
+
K --> L["/git/hotfix/finish"]
|
|
283
|
+
L --> M[Deploy Producao]
|
|
284
|
+
|
|
285
|
+
style A fill:#ffebee
|
|
286
|
+
style M fill:#e1f5e1
|
|
287
|
+
style B fill:#fff3cd
|
|
288
|
+
style H fill:#fff3cd
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### Passo a Passo
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
# 1. Iniciar hotfix (cria branch + análise)
|
|
295
|
+
/engineer/hotfix "fix-payment-timeout"
|
|
296
|
+
|
|
297
|
+
# 2. Criar PR após implementação
|
|
298
|
+
/engineer/pr
|
|
299
|
+
|
|
300
|
+
# 3. Finalizar hotfix após merge (merge + deploy)
|
|
301
|
+
/git/hotfix/finish
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
**💡 Nota:** `/engineer/hotfix` **cria automaticamente** a branch `hotfix/fix-name` a partir de `main`. Não é necessário executar `/git/hotfix/start` manualmente.
|
|
305
|
+
|
|
306
|
+
**O que `/git/hotfix/finish` faz:**
|
|
307
|
+
- ✅ Merge emergencial para main/master
|
|
308
|
+
- ✅ Back-merge automático para develop
|
|
309
|
+
- ✅ Criação de tag de patch
|
|
310
|
+
- ✅ Preparação para deploy de produção
|
|
311
|
+
- ✅ Cleanup de branches
|
|
312
|
+
- ✅ Atualização do ClickUp
|
|
313
|
+
|
|
314
|
+
**Diferenças do Fluxo de Feature:**
|
|
315
|
+
- ⚡ **Análise mais rápida** (foco no problema)
|
|
316
|
+
- ⚡ **Menos fases** no plan.md
|
|
317
|
+
- ⚡ **Branch de main** (não develop)
|
|
318
|
+
- ⚡ **Merge duplo automático** (main + develop)
|
|
319
|
+
- ⚡ **Deploy imediato** após merge
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
## 📦 Fluxo de Release
|
|
324
|
+
|
|
325
|
+
### Visão Geral
|
|
326
|
+
Fluxo para preparação e publicação de versões.
|
|
327
|
+
|
|
328
|
+
### Diagrama do Fluxo
|
|
329
|
+
|
|
330
|
+
```mermaid
|
|
331
|
+
flowchart TD
|
|
332
|
+
A[Preparar Release] --> B["/git/release/start"]
|
|
333
|
+
B --> C["Branch release/v1.2.0"]
|
|
334
|
+
|
|
335
|
+
C --> D[Ajustes Finais]
|
|
336
|
+
D --> E[Atualizar CHANGELOG]
|
|
337
|
+
E --> F["/engineer/bump"]
|
|
338
|
+
|
|
339
|
+
F --> G[Testes Finais]
|
|
340
|
+
G --> H{Testes OK?}
|
|
341
|
+
H -->|Nao| D
|
|
342
|
+
H -->|Sim| I["/engineer/pr"]
|
|
343
|
+
|
|
344
|
+
I --> J[Code Review]
|
|
345
|
+
J --> K{Aprovado?}
|
|
346
|
+
K -->|Nao| D
|
|
347
|
+
K -->|Sim| L[Merge]
|
|
348
|
+
|
|
349
|
+
L --> M["/git/release/finish"]
|
|
350
|
+
M --> N["Merge main + develop"]
|
|
351
|
+
N --> O[Tag v1.2.0]
|
|
352
|
+
O --> P[Deploy Producao]
|
|
353
|
+
|
|
354
|
+
style A fill:#e3f2fd
|
|
355
|
+
style P fill:#e1f5e1
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### Passo a Passo
|
|
359
|
+
|
|
360
|
+
```bash
|
|
361
|
+
# 1. Criar release branch
|
|
362
|
+
/git/release/start "v1.2.0"
|
|
363
|
+
|
|
364
|
+
# 2. Fazer ajustes finais
|
|
365
|
+
# (correções de bugs, atualização de docs)
|
|
366
|
+
|
|
367
|
+
# 3. Atualizar versão
|
|
368
|
+
/engineer/bump minor
|
|
369
|
+
|
|
370
|
+
# 4. Criar PR
|
|
371
|
+
/engineer/pr
|
|
372
|
+
|
|
373
|
+
# 5. Após merge, finalizar release
|
|
374
|
+
/git/release/finish
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
---
|
|
378
|
+
|
|
379
|
+
## 📚 Fluxo de Documentação
|
|
380
|
+
|
|
381
|
+
### Visão Geral
|
|
382
|
+
Fluxo para geração e manutenção de documentação.
|
|
383
|
+
|
|
384
|
+
### Diagrama do Fluxo
|
|
385
|
+
|
|
386
|
+
```mermaid
|
|
387
|
+
flowchart TD
|
|
388
|
+
A[Documentar Projeto] --> B{Tipo de Docs?}
|
|
389
|
+
|
|
390
|
+
B -->|Negocio| C["/docs/build-business-docs"]
|
|
391
|
+
B -->|Tecnico| D["/docs/build-tech-docs"]
|
|
392
|
+
B -->|Compliance| E["/docs/build-compliance-docs"]
|
|
393
|
+
|
|
394
|
+
C --> F["docs/business-context/"]
|
|
395
|
+
D --> G["docs/technical-context/"]
|
|
396
|
+
E --> H["docs/compliance/"]
|
|
397
|
+
|
|
398
|
+
F --> I["/docs/build-index"]
|
|
399
|
+
G --> I
|
|
400
|
+
H --> I
|
|
401
|
+
|
|
402
|
+
I --> J[docs/index.md]
|
|
403
|
+
J --> K["/docs/validate-docs"]
|
|
404
|
+
|
|
405
|
+
K --> L{Docs OK?}
|
|
406
|
+
L -->|Nao| M["/docs/docs-health"]
|
|
407
|
+
M --> N[Corrigir Problemas]
|
|
408
|
+
N --> K
|
|
409
|
+
L -->|Sim| O[Docs Completos]
|
|
410
|
+
|
|
411
|
+
style A fill:#fff3cd
|
|
412
|
+
style O fill:#e1f5e1
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
### Passo a Passo
|
|
416
|
+
|
|
417
|
+
```bash
|
|
418
|
+
# 1. Gerar docs de negócio
|
|
419
|
+
/docs/build-business-docs
|
|
420
|
+
|
|
421
|
+
# 2. Gerar docs técnicos
|
|
422
|
+
/docs/build-tech-docs
|
|
423
|
+
|
|
424
|
+
# 3. Gerar docs de compliance (se necessário)
|
|
425
|
+
/docs/build-compliance-docs
|
|
426
|
+
|
|
427
|
+
# 4. Gerar índice navegável
|
|
428
|
+
/docs/build-index
|
|
429
|
+
|
|
430
|
+
# 5. Validar documentação
|
|
431
|
+
/docs/validate-docs
|
|
432
|
+
|
|
433
|
+
# 6. Verificar saúde (links quebrados, etc)
|
|
434
|
+
/docs/docs-health
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
## ✅ Fluxo de Validação
|
|
440
|
+
|
|
441
|
+
### Visão Geral
|
|
442
|
+
Fluxo para validação completa do projeto.
|
|
443
|
+
|
|
444
|
+
### Diagrama do Fluxo
|
|
445
|
+
|
|
446
|
+
```mermaid
|
|
447
|
+
flowchart TD
|
|
448
|
+
A[Validar Projeto] --> B["/validate/workflow"]
|
|
449
|
+
|
|
450
|
+
B --> C[Validar Estrutura]
|
|
451
|
+
C --> D[Validar Documentacao]
|
|
452
|
+
D --> E[Validar Git]
|
|
453
|
+
E --> F[Validar ClickUp]
|
|
454
|
+
|
|
455
|
+
F --> G{Tudo OK?}
|
|
456
|
+
G -->|Nao| H[Listar Problemas]
|
|
457
|
+
H --> I[Corrigir]
|
|
458
|
+
I --> B
|
|
459
|
+
G -->|Sim| J[Projeto Valido]
|
|
460
|
+
|
|
461
|
+
style A fill:#e3f2fd
|
|
462
|
+
style J fill:#e1f5e1
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
---
|
|
466
|
+
|
|
467
|
+
## 🔗 Integração entre Comandos
|
|
468
|
+
|
|
469
|
+
### Fluxo de Integração ClickUp
|
|
470
|
+
|
|
471
|
+
```mermaid
|
|
472
|
+
sequenceDiagram
|
|
473
|
+
participant U as Usuário
|
|
474
|
+
participant PT as /product/task
|
|
475
|
+
participant CU as ClickUp
|
|
476
|
+
participant ES as /engineer/start
|
|
477
|
+
participant EW as /engineer/work
|
|
478
|
+
participant EP as /engineer/pr
|
|
479
|
+
participant GS as /git/sync
|
|
480
|
+
|
|
481
|
+
U->>PT: Criar task
|
|
482
|
+
PT->>CU: Create task + subtasks
|
|
483
|
+
CU-->>PT: Task ID
|
|
484
|
+
PT->>U: Task criada
|
|
485
|
+
|
|
486
|
+
U->>ES: Iniciar dev
|
|
487
|
+
ES->>CU: Get task details
|
|
488
|
+
ES->>CU: Update status → In Progress
|
|
489
|
+
ES->>U: Análise + Arquitetura
|
|
490
|
+
|
|
491
|
+
U->>EW: Implementar fase
|
|
492
|
+
EW->>EW: Código
|
|
493
|
+
EW->>CU: Update subtask → Done
|
|
494
|
+
EW->>CU: Add progress comment
|
|
495
|
+
EW->>U: Fase completa
|
|
496
|
+
|
|
497
|
+
U->>EP: Criar PR
|
|
498
|
+
EP->>CU: Update status → In Progress
|
|
499
|
+
EP->>CU: Add tag "under-review"
|
|
500
|
+
EP->>U: PR criado
|
|
501
|
+
|
|
502
|
+
U->>GS: Pós-merge
|
|
503
|
+
GS->>CU: Update status → Done
|
|
504
|
+
GS->>U: Sincronizado
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
---
|
|
508
|
+
|
|
509
|
+
## 🤔 Decision Trees
|
|
510
|
+
|
|
511
|
+
### Qual comando usar para iniciar?
|
|
512
|
+
|
|
513
|
+
```mermaid
|
|
514
|
+
flowchart TD
|
|
515
|
+
A[Preciso iniciar algo] --> B{O que?}
|
|
516
|
+
|
|
517
|
+
B -->|Nova Feature| C{Task existe?}
|
|
518
|
+
C -->|Nao| D["/product/task"]
|
|
519
|
+
C -->|Sim| E["/engineer/start"]
|
|
520
|
+
|
|
521
|
+
B -->|Bug Critico| F["/engineer/hotfix"]
|
|
522
|
+
|
|
523
|
+
B -->|Release| G["/git/release/start"]
|
|
524
|
+
|
|
525
|
+
B -->|Documentacao| H{Tipo?}
|
|
526
|
+
H -->|Negocio| I["/docs/build-business-docs"]
|
|
527
|
+
H -->|Tecnico| J["/docs/build-tech-docs"]
|
|
528
|
+
|
|
529
|
+
B -->|Validacao| K["/validate/workflow"]
|
|
530
|
+
|
|
531
|
+
style D fill:#fff3cd
|
|
532
|
+
style E fill:#fff3cd
|
|
533
|
+
style F fill:#ffebee
|
|
534
|
+
style G fill:#e3f2fd
|
|
535
|
+
style I fill:#f3e5f5
|
|
536
|
+
style J fill:#f3e5f5
|
|
537
|
+
style K fill:#e8f5e9
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
### Quando usar cada comando?
|
|
541
|
+
|
|
542
|
+
#### 🎯 **Comandos de Produto**
|
|
543
|
+
|
|
544
|
+
| Cenário | Comando | Razão |
|
|
545
|
+
|---------|---------|-------|
|
|
546
|
+
| **Criar nova feature** | `/product/task` | Cria task estruturada no ClickUp + branch + sessão |
|
|
547
|
+
| **Planejar épico** | `/product/epic` | Decompõe épico em tasks menores |
|
|
548
|
+
| **Revisar backlog** | `/product/backlog` | Organiza e prioriza tasks pendentes |
|
|
549
|
+
|
|
550
|
+
#### 🔧 **Comandos de Engenharia**
|
|
551
|
+
|
|
552
|
+
| Cenário | Comando | Razão |
|
|
553
|
+
|---------|---------|-------|
|
|
554
|
+
| **Iniciar desenvolvimento** | `/engineer/start` | Análise + arquitetura + setup de sessão |
|
|
555
|
+
| **Implementar fase** | `/engineer/work` | Implementa código seguindo plan.md |
|
|
556
|
+
| **Validar antes de PR** | `/engineer/pre-pr` | Checklist de qualidade completo |
|
|
557
|
+
| **Criar Pull Request** | `/engineer/pr` | Abre PR e atualiza ClickUp |
|
|
558
|
+
| **Atualizar PR** | `/engineer/pr-update` | Atualiza PR existente com novas mudanças |
|
|
559
|
+
| **Bug crítico em produção** | `/engineer/hotfix` | Análise rápida + implementação urgente |
|
|
560
|
+
| **Validar fase** | `/engineer/validate-phase-sync` | Valida sincronização fase ↔ subtask |
|
|
561
|
+
|
|
562
|
+
#### 📚 **Comandos de Documentação**
|
|
563
|
+
|
|
564
|
+
| Cenário | Comando | Razão |
|
|
565
|
+
|---------|---------|-------|
|
|
566
|
+
| **Após merge concluído** | `/docs/sync-sessions` | Arquiva sessão e atualiza ClickUp |
|
|
567
|
+
| **Gerar docs de negócio** | `/docs/build-business-docs` | Documentação de contexto de negócio |
|
|
568
|
+
| **Gerar docs técnicos** | `/docs/build-tech-docs` | Documentação de arquitetura e stack |
|
|
569
|
+
| **Criar índice** | `/docs/build-index` | Índice navegável de toda documentação |
|
|
570
|
+
| **Validar documentação** | `/docs/validate-docs` | Verifica completude e consistência |
|
|
571
|
+
|
|
572
|
+
**💡 Regra de Ouro:** Use sempre comandos `/product/*` e `/engineer/*` para desenvolvimento. Comandos Git são gerenciados automaticamente.
|
|
573
|
+
|
|
574
|
+
---
|
|
575
|
+
|
|
576
|
+
## 🔧 Troubleshooting
|
|
577
|
+
|
|
578
|
+
### Problema: Branch já existe
|
|
579
|
+
|
|
580
|
+
**Sintoma:** Erro ao criar branch com `/git/feature/start`
|
|
581
|
+
|
|
582
|
+
**Solução:**
|
|
583
|
+
```bash
|
|
584
|
+
# Opção 1: Usar branch existente
|
|
585
|
+
git checkout feature/nome-existente
|
|
586
|
+
|
|
587
|
+
# Opção 2: Deletar e recriar
|
|
588
|
+
git branch -D feature/nome-existente
|
|
589
|
+
/git/feature/start "nome-existente"
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
---
|
|
593
|
+
|
|
594
|
+
### Problema: Sessão não encontrada
|
|
595
|
+
|
|
596
|
+
**Sintoma:** `/engineer/work` não encontra arquivos da sessão
|
|
597
|
+
|
|
598
|
+
**Solução:**
|
|
599
|
+
```bash
|
|
600
|
+
# Verificar se sessão existe
|
|
601
|
+
ls .cursor/sessions/
|
|
602
|
+
|
|
603
|
+
# Se não existe, criar com /engineer/start
|
|
604
|
+
/engineer/start <feature-slug>
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
---
|
|
608
|
+
|
|
609
|
+
### Problema: ClickUp não atualiza
|
|
610
|
+
|
|
611
|
+
**Sintoma:** Comandos não atualizam status no ClickUp
|
|
612
|
+
|
|
613
|
+
**Solução:**
|
|
614
|
+
1. Verificar se `context.md` tem task-id correto
|
|
615
|
+
2. Verificar conexão com ClickUp MCP
|
|
616
|
+
3. Verificar permissões da API key
|
|
617
|
+
|
|
618
|
+
```bash
|
|
619
|
+
# Verificar task-id no context.md
|
|
620
|
+
cat .cursor/sessions/<feature-slug>/context.md | grep "Task ID"
|
|
621
|
+
|
|
622
|
+
# Testar conexão ClickUp
|
|
623
|
+
# (usar ferramenta de teste do MCP)
|
|
624
|
+
```
|
|
625
|
+
|
|
626
|
+
---
|
|
627
|
+
|
|
628
|
+
### Problema: Mapeamento fase→subtask incorreto
|
|
629
|
+
|
|
630
|
+
**Sintoma:** Subtask errada é atualizada ao completar fase
|
|
631
|
+
|
|
632
|
+
**Solução:**
|
|
633
|
+
```bash
|
|
634
|
+
# Validar mapeamento
|
|
635
|
+
/engineer/validate-phase-sync
|
|
636
|
+
|
|
637
|
+
# Corrigir manualmente no context.md se necessário
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
---
|
|
641
|
+
|
|
642
|
+
### Problema: Sessão não sincroniza
|
|
643
|
+
|
|
644
|
+
**Sintoma:** `/docs/sync-sessions` não detecta arquivos
|
|
645
|
+
|
|
646
|
+
**Solução:**
|
|
647
|
+
1. Verificar se está no diretório correto
|
|
648
|
+
2. Verificar se há arquivos modificados
|
|
649
|
+
3. Verificar `.gitignore` para exclusões
|
|
650
|
+
|
|
651
|
+
```bash
|
|
652
|
+
# Verificar arquivos modificados
|
|
653
|
+
git status
|
|
654
|
+
|
|
655
|
+
# Forçar sincronização
|
|
656
|
+
/docs/sync-sessions --force
|
|
657
|
+
|
|
658
|
+
# Validar estrutura
|
|
659
|
+
/docs/sync-sessions --validate-only
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
---
|
|
663
|
+
|
|
664
|
+
## 🌿 Fluxos Git (Avançado)
|
|
665
|
+
|
|
666
|
+
> **⚠️ IMPORTANTE:** Esta seção é para **uso avançado** ou **troubleshooting**. Os comandos Git são **chamados automaticamente** pelos comandos de engenharia e produto. Na maioria dos casos, você **não precisa** executá-los manualmente.
|
|
667
|
+
|
|
668
|
+
### Quando Usar Comandos Git Diretamente
|
|
669
|
+
|
|
670
|
+
Use comandos Git **apenas** nestas situações:
|
|
671
|
+
|
|
672
|
+
1. **Troubleshooting**: Corrigir problemas de branch ou merge
|
|
673
|
+
2. **Operações Manuais**: Quando comandos de engenharia não cobrem o caso
|
|
674
|
+
3. **Releases**: Gerenciar releases e tags
|
|
675
|
+
4. **Hotfix Finalização**: Após merge do PR de hotfix
|
|
676
|
+
|
|
677
|
+
---
|
|
678
|
+
|
|
679
|
+
### 🔀 Comandos Git Disponíveis
|
|
680
|
+
|
|
681
|
+
#### **Feature Branches**
|
|
682
|
+
|
|
683
|
+
| Comando | Uso | Quando Usar |
|
|
684
|
+
|---------|-----|-------------|
|
|
685
|
+
| `/git/feature/start` | Criar feature branch | **Automático** via `/product/task` |
|
|
686
|
+
| `/git/feature/finish` | Finalizar feature | Após merge do PR |
|
|
687
|
+
|
|
688
|
+
**💡 Nota:** `/product/task` e `/engineer/start` gerenciam feature branches automaticamente.
|
|
689
|
+
|
|
690
|
+
---
|
|
691
|
+
|
|
692
|
+
#### **Hotfix Branches**
|
|
693
|
+
|
|
694
|
+
| Comando | Uso | Quando Usar |
|
|
695
|
+
|---------|-----|-------------|
|
|
696
|
+
| `/git/hotfix/start` | Criar hotfix branch | **Automático** via `/engineer/hotfix` |
|
|
697
|
+
| `/git/hotfix/finish` | Finalizar hotfix | Após merge do PR de hotfix |
|
|
698
|
+
|
|
699
|
+
**Fluxo Completo de Hotfix:**
|
|
700
|
+
```bash
|
|
701
|
+
# 1. Iniciar (cria branch automaticamente)
|
|
702
|
+
/engineer/hotfix "fix-critical-bug"
|
|
703
|
+
|
|
704
|
+
# 2. Criar PR
|
|
705
|
+
/engineer/pr
|
|
706
|
+
|
|
707
|
+
# 3. Após merge, finalizar
|
|
708
|
+
/git/hotfix/finish
|
|
709
|
+
```
|
|
710
|
+
|
|
711
|
+
**O que `/git/hotfix/finish` faz:**
|
|
712
|
+
- ✅ Merge para main/master
|
|
713
|
+
- ✅ Back-merge para develop
|
|
714
|
+
- ✅ Criação de tag de patch
|
|
715
|
+
- ✅ Preparação para deploy
|
|
716
|
+
- ✅ Cleanup de branches
|
|
717
|
+
- ✅ Atualização do ClickUp
|
|
718
|
+
|
|
719
|
+
---
|
|
720
|
+
|
|
721
|
+
#### **Release Management**
|
|
722
|
+
|
|
723
|
+
| Comando | Uso | Quando Usar |
|
|
724
|
+
|---------|-----|-------------|
|
|
725
|
+
| `/git/release/start` | Criar release | Preparar nova versão |
|
|
726
|
+
| `/git/release/finish` | Finalizar release | Deploy para produção |
|
|
727
|
+
|
|
728
|
+
**Fluxo de Release:**
|
|
729
|
+
```bash
|
|
730
|
+
# 1. Criar release com versionamento
|
|
731
|
+
/git/release/start "v2.1.0"
|
|
732
|
+
# ou auto-bump:
|
|
733
|
+
/git/release/start "patch" # 2.0.1 → 2.0.2
|
|
734
|
+
/git/release/start "minor" # 2.0.1 → 2.1.0
|
|
735
|
+
/git/release/start "major" # 2.0.1 → 3.0.0
|
|
736
|
+
|
|
737
|
+
# 2. Testar release
|
|
738
|
+
|
|
739
|
+
# 3. Finalizar (merge + tag + deploy)
|
|
740
|
+
/git/release/finish
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
**O que `/git/release/finish` faz:**
|
|
744
|
+
- ✅ Merge para main
|
|
745
|
+
- ✅ Back-merge para develop
|
|
746
|
+
- ✅ Tag anotada com metadata
|
|
747
|
+
- ✅ Preparação para deploy
|
|
748
|
+
- ✅ Cleanup de branches
|
|
749
|
+
- ✅ Atualização do ClickUp
|
|
750
|
+
|
|
751
|
+
---
|
|
752
|
+
|
|
753
|
+
#### **Operações Gerais**
|
|
754
|
+
|
|
755
|
+
| Comando | Uso | Quando Usar |
|
|
756
|
+
|---------|-----|-------------|
|
|
757
|
+
| `/git/init` | Inicializar Git | Novo projeto |
|
|
758
|
+
| `/git/status` | Status do repositório | Verificar estado |
|
|
759
|
+
| `/git/help` | Ajuda Git | Consultar comandos |
|
|
760
|
+
|
|
761
|
+
---
|
|
762
|
+
|
|
763
|
+
### 🔄 Integração Git ↔ Engenharia
|
|
764
|
+
|
|
765
|
+
```mermaid
|
|
766
|
+
flowchart LR
|
|
767
|
+
A["/product/task"] -->|chama| B["/git/feature/start"]
|
|
768
|
+
B -->|cria| C["Branch feature/name"]
|
|
769
|
+
|
|
770
|
+
D["/engineer/hotfix"] -->|chama| E["/git/hotfix/start"]
|
|
771
|
+
E -->|cria| F["Branch hotfix/name"]
|
|
772
|
+
|
|
773
|
+
G["/engineer/pr"] -->|usa| C
|
|
774
|
+
G -->|usa| F
|
|
775
|
+
|
|
776
|
+
H["Merge PR"] --> I{Tipo?}
|
|
777
|
+
I -->|Feature| J["/git/feature/finish"]
|
|
778
|
+
I -->|Hotfix| K["/git/hotfix/finish"]
|
|
779
|
+
|
|
780
|
+
style A fill:#fff3cd
|
|
781
|
+
style D fill:#fff3cd
|
|
782
|
+
style G fill:#fff3cd
|
|
783
|
+
style B fill:#e3f2fd
|
|
784
|
+
style E fill:#e3f2fd
|
|
785
|
+
style J fill:#e3f2fd
|
|
786
|
+
style K fill:#e3f2fd
|
|
787
|
+
```
|
|
788
|
+
|
|
789
|
+
---
|
|
790
|
+
|
|
791
|
+
### ⚠️ Troubleshooting Git
|
|
792
|
+
|
|
793
|
+
#### **Problema: Branch já existe**
|
|
794
|
+
```bash
|
|
795
|
+
# Verificar branches
|
|
796
|
+
git branch -a
|
|
797
|
+
|
|
798
|
+
# Deletar branch local
|
|
799
|
+
git branch -D feature/nome
|
|
800
|
+
|
|
801
|
+
# Deletar branch remota
|
|
802
|
+
git push origin --delete feature/nome
|
|
803
|
+
|
|
804
|
+
# Recriar
|
|
805
|
+
/git/feature/start "nome"
|
|
806
|
+
```
|
|
807
|
+
|
|
808
|
+
#### **Problema: Conflitos de merge**
|
|
809
|
+
```bash
|
|
810
|
+
# Verificar conflitos
|
|
811
|
+
git status
|
|
812
|
+
|
|
813
|
+
# Resolver manualmente
|
|
814
|
+
# (editar arquivos com conflitos)
|
|
815
|
+
|
|
816
|
+
# Marcar como resolvido
|
|
817
|
+
git add .
|
|
818
|
+
git commit -m "Resolve merge conflicts"
|
|
819
|
+
```
|
|
820
|
+
|
|
821
|
+
#### **Problema: Tag já existe**
|
|
822
|
+
```bash
|
|
823
|
+
# Listar tags
|
|
824
|
+
git tag
|
|
825
|
+
|
|
826
|
+
# Deletar tag local
|
|
827
|
+
git tag -d v1.0.0
|
|
828
|
+
|
|
829
|
+
# Deletar tag remota
|
|
830
|
+
git push origin --delete v1.0.0
|
|
831
|
+
|
|
832
|
+
# Recriar release
|
|
833
|
+
/git/release/start "v1.0.0"
|
|
834
|
+
```
|
|
835
|
+
|
|
836
|
+
---
|
|
837
|
+
|
|
838
|
+
### 📋 Checklist de Operações Git Manuais
|
|
839
|
+
|
|
840
|
+
Antes de usar comandos Git diretamente, verifique:
|
|
841
|
+
|
|
842
|
+
- [ ] O comando de engenharia equivalente não resolve?
|
|
843
|
+
- [ ] É realmente necessário fazer manualmente?
|
|
844
|
+
- [ ] Entendo o impacto da operação?
|
|
845
|
+
- [ ] Fiz backup/commit das mudanças?
|
|
846
|
+
- [ ] Estou na branch correta?
|
|
847
|
+
|
|
848
|
+
**💡 Dica:** Na dúvida, use comandos de engenharia. Eles são mais seguros e integrados.
|
|
849
|
+
|
|
850
|
+
---
|
|
851
|
+
|
|
852
|
+
## 🔗 Documentos Relacionados
|
|
853
|
+
|
|
854
|
+
- [Guia de Comandos](./commands-guide.md) - Referência completa de comandos
|
|
855
|
+
- [Integração ClickUp](./clickup-integration.md) - Detalhes do ClickUp MCP
|
|
856
|
+
- [Referência de Agentes](./agents-reference.md) - Agentes especializados
|
|
857
|
+
- [Exemplos Práticos](./practical-examples.md) - Casos de uso reais
|
|
858
|
+
- [Configuração Inicial](./getting-started.md) - Setup do sistema
|
|
859
|
+
|
|
860
|
+
---
|
|
861
|
+
|
|
862
|
+
**Última atualização:** 2025-01-27
|
|
863
|
+
**Versão:** 2.0
|
|
864
|
+
**Padrão de Nomenclatura:** `<feature-slug>` (kebab-case)
|
|
865
|
+
|