@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.
Files changed (207) hide show
  1. package/dist/cli.js +8 -7
  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,606 @@
1
+ # 🌿 Git Commands - Sistema Onion
2
+
3
+ **Framework completo de comandos Git com workflows Gitflow integrados ao Sistema Onion.**
4
+
5
+ Este módulo oferece automação completa para desenvolvimento com Git, desde planejamento até deploy, com integração nativa ClickUp MCP.
6
+
7
+ ## ⚡ **CRÍTICO: Cursor Commands vs Terminal**
8
+
9
+ ### 🎮 **Como Usar os Comandos Git**
10
+ Todos os comandos deste módulo são **[Cursor Commands](https://cursor.com/pt-BR/docs/agent/chat/commands)** executados no **chat da Cursor**:
11
+
12
+ ```markdown
13
+ # ✅ CORRETO - No chat da Cursor IDE:
14
+ /git/init
15
+ /git/feature/start "user-authentication"
16
+ /git/feature/publish
17
+ /git/release/finish
18
+
19
+ # ❌ INCORRETO - NÃO são comandos bash/shell:
20
+ $ /git/init # Não funciona no terminal
21
+ $ ./git/feature/start # Não é script executável
22
+ ```
23
+
24
+ ### 🧠 **Arquitetura dos Comandos**
25
+ - **Interface**: Cursor Commands (digitados no chat)
26
+ - **Definição**: Arquivos `.md` nesta pasta definem workflows
27
+ - **Execução**: Cursor AI interpreta e executa bash scripts internos
28
+ - **UX**: Modern CLI via `.cursor/utils/modern-cli-ux.sh`
29
+
30
+ ---
31
+
32
+ ## 📋 **Comandos Disponíveis**
33
+
34
+ ### **🆘 Setup e Ajuda**
35
+
36
+ #### **`/git/help`** - Sistema de Ajuda Completo
37
+ **Finalidade**: Cartão de referência e troubleshooting para todos workflows Gitflow
38
+ **Uso**: `/git/help`
39
+ - ✅ Quick reference de todos os comandos
40
+ - ✅ Troubleshooting automático com soluções
41
+ - ✅ Examples práticos por workflow
42
+ - ✅ Guidance vs execution (comandos vs @gitflow-specialist)
43
+
44
+ #### **`/git/init`** - Setup Gitflow Automático
45
+ **Finalidade**: Inicializar repositório com Gitflow e ClickUp integration
46
+ **Uso**: `/git/init`
47
+ - ✅ Master/main detection automática
48
+ - ✅ Setup develop branch + configurações
49
+ - ✅ ClickUp integration se sessão ativa
50
+ - ✅ Validações de segurança completas
51
+
52
+ ---
53
+
54
+ ### **🌿 Feature Development**
55
+
56
+ #### **`/git/feature/start "nome"`** - Criar Feature Backlog
57
+ **Finalidade**: Criar task ClickUp para feature (planejamento, sem desenvolvimento)
58
+ **Uso**: `/git/feature/start "implementar-oauth-authentication"`
59
+ - ✅ Task ClickUp com tag "backlog" criada
60
+ - ✅ Descrição estruturada + próximos passos
61
+ - ✅ Integração com `/engineer/start` para desenvolvimento
62
+ - ✅ Auto-detecção de lista ClickUp atual
63
+
64
+ #### **`/git/feature/finish`** - Finalizar Feature Development
65
+ **Finalidade**: Merge feature → develop + cleanup automático
66
+ **Uso**: `/git/feature/finish` (na feature branch)
67
+ - ✅ Merge feature → develop com validações
68
+ - ✅ Cleanup branches locais/remotos com confirmação
69
+ - ✅ Update ClickUp task → "Done" + comentário
70
+ - ✅ Archive automático da sessão de trabalho
71
+
72
+ ---
73
+
74
+ ### **🚀 Release Management**
75
+
76
+ #### **`/git/release/start "version"`** - Iniciar Release
77
+ **Finalidade**: Preparar release com versionamento semântico automático
78
+ **Uso**:
79
+ ```bash
80
+ /git/release/start "v2.1.0" # Versão específica
81
+ /git/release/start "patch" # Auto-bump patch (2.0.1 → 2.0.2)
82
+ /git/release/start "minor" # Auto-bump minor (2.0.1 → 2.1.0)
83
+ /git/release/start "major" # Auto-bump major (2.0.1 → 3.0.0)
84
+ ```
85
+ - ✅ Release branch criada a partir de develop
86
+ - ✅ Auto-versioning (package.json, version.txt, VERSION)
87
+ - ✅ Changelog preparation automática
88
+ - ✅ ClickUp release task com checklist
89
+ - ✅ Validações de conflito (branches e tags)
90
+
91
+ #### **`/git/release/finish`** - Finalizar Release
92
+ **Finalidade**: Deploy production com duplo merge + tags
93
+ **Uso**: `/git/release/finish` (na release branch)
94
+ - ✅ Duplo merge: release → main + develop
95
+ - ✅ Tag anotada com metadata completa
96
+ - ✅ Deploy preparation hooks
97
+ - ✅ ClickUp completion + release notes
98
+ - ✅ Branch cleanup com confirmações
99
+
100
+ ---
101
+
102
+ ### **🔥 Emergency Hotfix**
103
+
104
+ #### **`/git/hotfix/start "nome"`** - Emergency Hotfix Setup
105
+ **Finalidade**: Hotfix emergencial a partir de produção (main/master)
106
+ **Uso**: `/git/hotfix/start "fix-payment-gateway-timeout"`
107
+ - ✅ Hotfix branch a partir de main/master
108
+ - ✅ Auto-versioning patch emergencial
109
+ - ✅ ClickUp emergency task (prioridade 1)
110
+ - ✅ Emergency auto-save de mudanças
111
+ - ✅ Rollback preparation desde início
112
+
113
+ #### **`/git/hotfix/finish`** - Deploy Crítico Emergency
114
+ **Finalidade**: Deploy emergencial com duplo merge acelerado
115
+ **Uso**: `/git/hotfix/finish` (na hotfix branch)
116
+ - ✅ Duplo merge emergencial (main + develop)
117
+ - ✅ Production-first strategy com overrides
118
+ - ✅ Emergency tag + monitoring requirements
119
+ - ✅ SLA < 2 horas + production health verification
120
+ - ✅ ClickUp emergency completion
121
+
122
+ ---
123
+
124
+ ### **💥 Workflow Híbrido**
125
+
126
+ #### **`/engineer/hotfix "desc" [params]`** - Emergency Workflow Completo
127
+ **Finalidade**: Task ClickUp + Git hotfix + Session management em 1 comando
128
+ **Uso**:
129
+ ```bash
130
+ /engineer/hotfix "Fix critical payment timeout"
131
+ /engineer/hotfix "Security auth patch" --related-tasks="123,456" --tags="security"
132
+ ```
133
+ **Parâmetros**:
134
+ - `--related-tasks="id1,id2"` - Link tasks relacionadas
135
+ - `--tags="urgent,security"` - Tags adicionais
136
+ - `--status="In Progress"` - Status inicial
137
+ - `--priority=1` - Prioridade (1=urgent)
138
+
139
+ - ✅ Executa `/product/task` + `/git/hotfix/start` internamente
140
+ - ✅ Session management completo (context, plan, notes)
141
+ - ✅ Emergency automation: task + session + git
142
+ - ✅ Parameter parsing + ClickUp linking
143
+
144
+ ---
145
+
146
+ ### **🔄 Pós-Merge**
147
+
148
+ #### **`/git/sync [branch]`** - Sincronização Automática
149
+ **Finalidade**: Sincronização pós-merge com cleanup de branches
150
+ **Uso**:
151
+ ```bash
152
+ /git/sync # Sincroniza com develop (padrão)
153
+ /git/sync main # Sincroniza com main
154
+ /git/sync staging # Sincroniza com staging
155
+ ```
156
+ - ✅ Checkout automático + pull das mudanças
157
+ - ✅ Limpeza segura de branch anterior
158
+ - ✅ Atualização automática task ClickUp
159
+ - ✅ Gestão inteligente de sessões (3000+ linhas)
160
+
161
+ ---
162
+
163
+ ## 🎯 **Workflows Completos**
164
+
165
+ ### **🌟 Feature Development (Método 1 - Planejado):**
166
+ ```mermaid
167
+ flowchart LR
168
+ A["/git/feature/start 'nome'"] --> B["Task Backlog Created"]
169
+ B --> C["/engineer/start"]
170
+ C --> D["/engineer/work"]
171
+ D --> E["/git/feature/finish"]
172
+ E --> F["/git/sync develop"]
173
+ ```
174
+
175
+ ### **⚡ Feature Development (Método 2 - Direto):**
176
+ ```mermaid
177
+ flowchart LR
178
+ A["/product/task"] --> B["/engineer/start"]
179
+ B --> C["/engineer/work"]
180
+ C --> D["/git/feature/finish"]
181
+ D --> E["/git/sync develop"]
182
+ ```
183
+
184
+ ### **🚀 Release Workflow:**
185
+ ```mermaid
186
+ flowchart LR
187
+ A["/git/release/start 'v2.1.0'"] --> B["Testing & Validation"]
188
+ B --> C["/git/release/finish"]
189
+ C --> D["Production Deploy"]
190
+ D --> E["/git/sync main"]
191
+ ```
192
+
193
+ ### **🔥 Emergency Hotfix (Método 1 - Separado):**
194
+ ```mermaid
195
+ flowchart LR
196
+ A["/git/hotfix/start 'critical-bug'"] --> B["Emergency Fix"]
197
+ B --> C["/git/hotfix/finish"]
198
+ C --> D["Production Deploy"]
199
+ ```
200
+
201
+ ### **💥 Emergency Hotfix (Método 2 - Híbrido):**
202
+ ```mermaid
203
+ flowchart LR
204
+ A["/engineer/hotfix 'desc' --params"] --> B["Auto: Task + Session + Git"]
205
+ B --> C["Emergency Fix"]
206
+ C --> D["/git/hotfix/finish"]
207
+ ```
208
+
209
+ ---
210
+
211
+ ## 🔗 **Integração Sistema Onion**
212
+
213
+ ### **Comandos por Categoria:**
214
+ | Categoria | Comandos | Finalidade |
215
+ |-----------|----------|-----------|
216
+ | **Setup** | `/git/help`, `/git/init` | Help system + Gitflow setup |
217
+ | **Feature** | `/git/feature/start`, `/git/feature/finish` | Development workflow |
218
+ | **Release** | `/git/release/start`, `/git/release/finish` | Production deployment |
219
+ | **Hotfix** | `/git/hotfix/start`, `/git/hotfix/finish` | Emergency fixes |
220
+ | **Híbrido** | `/engineer/hotfix` | All-in-one emergency workflow |
221
+ | **Sync** | `/git/sync` | Post-merge synchronization |
222
+
223
+ ### **Integração com Outros Comandos:**
224
+ | Comando Anterior | Comando Git | Resultado Final |
225
+ |------------------|-------------|-----------------|
226
+ | `/product/task` | `/engineer/start` + `/git/feature/finish` | Feature completa |
227
+ | `/git/feature/start` | `/engineer/start` + `/git/feature/finish` | Backlog → Production |
228
+ | `/engineer/work` | `/git/feature/finish` | Development → Merge |
229
+ | `/engineer/pr` | `/git/sync` | PR merge → Clean state |
230
+ | `/git/release/start` | `/git/release/finish` | Version → Production |
231
+ | Emergency issue | `/engineer/hotfix` | Issue → Fixed in production |
232
+
233
+ ---
234
+
235
+ ## 🛠️ **Características Técnicas**
236
+
237
+ ### **🔍 Auto-Detecção:**
238
+ - **Master/Main**: Detecta automaticamente convenção do repositório
239
+ - **ClickUp Lists**: Auto-detecção via sessão ativa ou API
240
+ - **Version Files**: package.json, version.txt, VERSION
241
+ - **Current Context**: Task IDs, session state, branch status
242
+
243
+ ### **🔗 ClickUp Integration:**
244
+ - **20+ API calls** implementadas com graceful degradation
245
+ - **Task creation**: Automática com templates estruturados
246
+ - **Status updates**: Automático baseado em workflow phase
247
+ - **Comments**: Formatados com progresso e metadata técnica
248
+ - **Linking**: Tasks relacionadas e parent-child relationships
249
+
250
+ ### **⚙️ Versionamento Semântico:**
251
+ ```bash
252
+ # Auto-bump types:
253
+ patch: 2.0.1 → 2.0.2 # Bug fixes
254
+ minor: 2.0.1 → 2.1.0 # New features
255
+ major: 2.0.1 → 3.0.0 # Breaking changes
256
+
257
+ # Specific versions:
258
+ /git/release/start "v2.1.0" # Exact version
259
+ /git/release/start "2.1.0" # Without v prefix
260
+ ```
261
+
262
+ ### **🚨 Emergency Features:**
263
+ - **SLA < 2 horas**: Workflows acelerados para emergências
264
+ - **Auto-save**: Mudanças não commitadas salvas automaticamente
265
+ - **Production-first**: Merge strategy priorizando produção
266
+ - **Override capabilities**: Emergency confirmations para ações críticas
267
+ - **Rollback ready**: Preparation automática desde início
268
+
269
+ ### **🛡️ Validações de Segurança:**
270
+ - Estado git limpo antes de operações críticas
271
+ - Confirmações inteligentes apenas para ações irreversíveis
272
+ - Conflict detection antes de merges
273
+ - Tag e branch validation
274
+ - Remote connectivity checks
275
+
276
+ ---
277
+
278
+ ## 📊 **Métricas de Performance**
279
+
280
+ ### **🎯 Objetivos de Eficiência:**
281
+ - **70% redução** no tempo de gestão de branches
282
+ - **Erro humano reduzido** através de automação
283
+ - **Zero downtime** em deploys quando possível
284
+ - **Tracking completo** de decisões técnicas
285
+
286
+ ### **📈 Benefícios Mensuráveis:**
287
+ - **Feature workflow**: 5 mins vs 15+ mins manual
288
+ - **Release process**: 10 mins vs 30+ mins manual
289
+ - **Emergency hotfix**: < 2 horas vs 4+ horas manual
290
+ - **ClickUp sync**: Automático vs manual updates
291
+
292
+ ---
293
+
294
+ ## 🎓 **Guias de Uso**
295
+
296
+ ### **🌟 Para Iniciantes:**
297
+ 1. **Setup inicial**: `/git/init`
298
+ 2. **Criar feature**: `/git/feature/start "nome"`
299
+ 3. **Desenvolver**: `/engineer/start nome-feature`
300
+ 4. **Finalizar**: `/git/feature/finish`
301
+ 5. **Limpar**: `/git/sync develop`
302
+
303
+ ### **⚡ Para Experts:**
304
+ - **Release rápida**: `/git/release/start "minor"` → testing → `/git/release/finish`
305
+ - **Emergency hotfix**: `/engineer/hotfix "Critical bug" --related-tasks="123"`
306
+ - **Batch operations**: Use parameters para efficiency
307
+
308
+ ### **🆘 Para Emergências:**
309
+ 1. **Hotfix simples**: `/git/hotfix/start` → fix → `/git/hotfix/finish`
310
+ 2. **Hotfix completo**: `/engineer/hotfix "desc" --tags="urgent"`
311
+ 3. **Rollback**: Guidance automático se deploy falhar
312
+
313
+ ---
314
+
315
+ ## 🔧 **Troubleshooting**
316
+
317
+ ### **❌ Problemas Comuns:**
318
+
319
+ #### **"Branch não encontrada"**
320
+ ```bash
321
+ # Verificar branches disponíveis
322
+ git branch -a
323
+
324
+ # Inicializar Gitflow se necessário
325
+ /git/init
326
+ ```
327
+
328
+ #### **"Mudanças não commitadas"**
329
+ ```bash
330
+ # Quick commit
331
+ git add .
332
+ git commit -m "save progress"
333
+
334
+ # Então executar comando desejado
335
+ ```
336
+
337
+ #### **"ClickUp task não atualiza"**
338
+ ```bash
339
+ # Verificar sessão ativa
340
+ ls .cursor/sessions/
341
+
342
+ # Criar sessão se necessário
343
+ /engineer/start [feature-name]
344
+ ```
345
+
346
+ ### **🆘 Help Sempre Disponível:**
347
+ - **Quick reference**: `/git/help`
348
+ - **Detailed guidance**: `@gitflow-specialist "sua pergunta"`
349
+ - **Troubleshooting**: Automático em cada comando
350
+ - **Examples**: Incluídos em every command
351
+
352
+ ---
353
+
354
+ ## 📚 **Documentação Adicional**
355
+
356
+ ### **🎯 Para Desenvolvimento:**
357
+ - **Architecture**: `.cursor/sessions/gitflow-commands/architecture.md`
358
+ - **Implementation**: Source code em cada comando
359
+ - **ClickUp Integration**: `.cursor/docs/clickup/clickup-formatting.md`
360
+
361
+ ### **🔗 Comandos Relacionados:**
362
+ - **Product Management**: `/product/task`, `/product/task-check`
363
+ - **Engineering**: `/engineer/start`, `/engineer/work`, `/engineer/pr`
364
+ - **Meta Operations**: `/meta/all-tools`
365
+ - **Specialized Agents**: `@gitflow-specialist`, `@clickup-specialist`
366
+
367
+ ### **📊 Sistema Completo:**
368
+ Este módulo faz parte do **Sistema Onion** com:
369
+ - **28+ comandos especializados** organizados por categoria
370
+ - **17 agentes de IA especializados**
371
+ - **Integração ClickUp MCP** completa
372
+ - **Workflows automatizados** do planejamento ao deploy
373
+
374
+ ---
375
+
376
+ **🌟 Framework completo de Git workflows com automação inteligente e integração ClickUp nativa!**
377
+
378
+ **Para começar**: `/git/help` ou `/git/init`
379
+ | `/engineer/pr` | `/git/sync` | Workflow completo finalizado |
380
+ | Manual merge | `/git/sync main` | Sincronização com main |
381
+ | Hotfix merge | `/git/sync develop` | Volta para develop |
382
+
383
+ ---
384
+
385
+ ## 🛠️ **Funcionalidades Técnicas**
386
+
387
+ ### **Branch Strategy**
388
+ - **Padrão**: `develop` (GitFlow)
389
+ - **Auto-criação**: Cria `develop` a partir de `main` se não existir
390
+ - **Flexibilidade**: Aceita qualquer branch válida
391
+ - **Validação**: Verifica existência remota antes de sincronizar
392
+
393
+ ### **Detecção Inteligente**
394
+ - **Contexto Automático**: Detecta task ativa via sessões
395
+ - **Branch Atual**: Identifica branch para limpeza
396
+ - **Estado Repositório**: Valida git status antes de proceder
397
+ - **Múltiplas Sessões**: Usa sessão mais recente automaticamente
398
+
399
+ ### **Operações Git Seguras**
400
+ - **Fetch First**: Sempre busca mudanças remotas primeiro
401
+ - **Validação**: Verifica estado antes de cada operação
402
+ - **Rollback**: Possível reverter operações em caso de erro
403
+ - **Logs**: Detalhamento completo para debugging
404
+
405
+ ### **ClickUp Integration**
406
+ - **Auto-Status**: Move task para "Done" automaticamente
407
+ - **Tag Management**: Remove "in-progress", adiciona "completed"
408
+ - **Comentários**: Formatação Unicode consistente
409
+ - **Fallback**: Continue git ops mesmo se ClickUp falhar
410
+
411
+ ### **Session Management**
412
+ - **Detecção**: Identifica sessões ativas automaticamente
413
+ - **Arquivamento**: Opcional, controlado pelo usuário
414
+ - **Preservação**: Mantém arquivos importantes (context, plan, notes)
415
+ - **Organização**: Estrutura temporal para histórico
416
+
417
+ ---
418
+
419
+ ## ⚠️ **Segurança e Validações**
420
+
421
+ ### **Verificações Automáticas:**
422
+ - ✅ **Repositório válido**: Deve ser git repo com remote origin
423
+ - ✅ **Mudanças não commitadas**: Avisa e orienta usuário
424
+ - ✅ **Branch remota**: Verifica existência antes de checkout
425
+ - ✅ **Permissões**: Valida direitos para operações git
426
+
427
+ ### **Proteções Implementadas:**
428
+ - 🛡️ **Nunca force push**: Operações sempre seguras
429
+ - 🛡️ **Backup implícito**: Git mantém reflog para recovery
430
+ - 🛡️ **Confirmações**: Pede confirmação para operações críticas
431
+ - 🛡️ **Graceful failure**: Falha de forma controlada
432
+
433
+ ### **Edge Cases Tratados:**
434
+ - **Conflitos de merge**: Orientação para resolução manual
435
+ - **Network issues**: Retry logic e fallback gracioso
436
+ - **Branch inexistente**: Auto-criação ou erro informativo
437
+ - **Múltiplas sessões**: Usa mais recente, avisa usuário
438
+
439
+ ---
440
+
441
+ ## 📊 **Formatos de Saída**
442
+
443
+ ### **Saída de Sucesso:**
444
+ ```
445
+ 🔄 SINCRONIZAÇÃO COMPLETA
446
+
447
+ ━━━━━━━━━━━━━━━━━━━━━━━━
448
+
449
+ ✅ GIT OPERATIONS:
450
+ ▶ Switched to: develop
451
+ ▶ Pulled latest: 3 new commits
452
+ ▶ Cleaned branch: feature/my-feature
453
+
454
+ 🔗 CLICKUP UPDATED:
455
+ ▶ Task 86abc123: Moved to "Done"
456
+ ▶ Tags updated: +completed, -in-progress
457
+ ▶ Comment added: Sync completed
458
+
459
+ 📁 SESSION STATUS:
460
+ ▶ Session archived: .cursor/sessions/archived/[YYYY-MM-DD_HHMM_session-name]/
461
+
462
+ ━━━━━━━━━━━━━━━━━━━━━━━━
463
+
464
+ ⏰ Completed: $(date +'%d/%m/%Y %H:%M') | 🎯 Ready for next task
465
+ ```
466
+
467
+ ### **Tratamento de Erros:**
468
+ ```
469
+ ⚠️ SYNC ISSUE DETECTED
470
+
471
+ Issue: Uncommitted changes in working directory
472
+ Files: src/app.ts, package.json
473
+
474
+ Solution: Commit or stash changes before sync
475
+ Commands:
476
+ git add .
477
+ git commit -m "WIP: save before sync"
478
+ /git/sync
479
+
480
+ Alternative: Use git stash to temporarily save changes
481
+ ```
482
+
483
+ ### **Orientações Contextuais:**
484
+ ```
485
+ 💡 SYNC TIPS
486
+
487
+ Current situation: First time using /git/sync
488
+ Recommendation: develop branch will be created from main
489
+
490
+ This follows GitFlow best practices:
491
+ - main: Production-ready code
492
+ - develop: Integration branch for features
493
+ - feature/*: Individual feature branches
494
+
495
+ Next time: /git/sync will use existing develop branch
496
+ ```
497
+
498
+ ---
499
+
500
+ ## 🎨 **Padrões e Convenções**
501
+
502
+ ### **Nomenclatura de Branches:**
503
+ ```
504
+ feature/<feature-slug> # Features normais
505
+ hotfix/critical-fix # Correções urgentes
506
+ release/v1.2.0 # Preparação de releases
507
+ bugfix/issue-123 # Correções de bugs
508
+ ```
509
+
510
+ ### **Estratégia de Tags ClickUp:**
511
+ ```
512
+ Adicionadas: completed, synced
513
+ Removidas: in-progress, under-review, needs-fix
514
+ Preservadas: feature, bug, improvement, research
515
+ ```
516
+
517
+ ### **Formato de Comentários:**
518
+ - **Header**: `✅ TASK CONCLUÍDA - SYNC COMPLETED`
519
+ - **Separador**: `━━━━━━━━━━━━━━━━━━━━━━━━`
520
+ - **Seções**: Git Operations, Development Status, Final Status
521
+ - **Footer**: `⏰ Timestamp | 🤖 Sistema Onion Sync`
522
+
523
+ ### **Estrutura de Arquivamento:**
524
+ ```
525
+ .cursor/sessions/archived/
526
+ ├── [YYYY-MM-DD_HHMM_session-name]/
527
+ │ ├── context.md # Contexto preservado
528
+ │ ├── plan.md # Plano de implementação
529
+ │ ├── notes.md # Notas de desenvolvimento
530
+ │ └── task-86ac06261.md # Link para task ClickUp
531
+ ```
532
+
533
+ ---
534
+
535
+ ## 🚀 **Roadmap Futuro**
536
+
537
+ ### **Versão Atual (1.0)**
538
+ - ✅ Sync básico com develop/main
539
+ - ✅ ClickUp integration completa
540
+ - ✅ Session management
541
+ - ✅ Error handling robusto
542
+
543
+ ### **Versões Futuras**
544
+ - **1.1**: Integração com CI/CD pipelines
545
+ - **1.2**: Sync com múltiplas branches simultaneamente
546
+ - **1.3**: Configuração personalizada via `.onion-config`
547
+ - **1.4**: Hooks git para automação adicional
548
+ - **2.0**: Integração com outros sistemas de task (Jira, Linear, etc.)
549
+
550
+ ### **Melhorias Planejadas**
551
+ - 📈 **Performance**: Cache de operações git para speed up
552
+ - 🔧 **Configurabilidade**: Arquivo de config para branches padrão
553
+ - 🌐 **Multi-repo**: Sync em monorepos com múltiplos projetos
554
+ - 📱 **Notifications**: Integração com Slack/Teams para notificações
555
+
556
+ ---
557
+
558
+ ## 🆘 **Troubleshooting**
559
+
560
+ ### **Problemas Comuns:**
561
+
562
+ #### **"Branch develop não existe"**
563
+ ```bash
564
+ # Solução automática (comando faz isso)
565
+ git checkout main
566
+ git checkout -b develop
567
+ git push origin develop
568
+ /git/sync
569
+ ```
570
+
571
+ #### **"Mudanças não commitadas"**
572
+ ```bash
573
+ # Commit temporário
574
+ git add .
575
+ git commit -m "WIP: save before sync"
576
+ /git/sync
577
+
578
+ # Ou usar stash
579
+ git stash push -m "WIP before sync"
580
+ /git/sync
581
+ git stash pop # Para recuperar depois
582
+ ```
583
+
584
+ #### **"ClickUp não atualizou"**
585
+ - Verifique credenciais ClickUp MCP
586
+ - Operações git continuam normalmente
587
+ - ClickUp pode ser atualizado manualmente depois
588
+
589
+ #### **"Sessão não foi detectada"**
590
+ - Comando funciona sem sessão
591
+ - ClickUp integration fica limitada
592
+ - Crie sessão com `/product/task` para próximas tasks
593
+
594
+ ### **Logs de Debug:**
595
+ ```bash
596
+ # Ver logs detalhados
597
+ git reflog --oneline -10 # Últimas 10 operações git
598
+ git log --oneline -5 # Últimos 5 commits
599
+ git status # Estado atual do repo
600
+ ```
601
+
602
+ ---
603
+
604
+ **Sistema Onion Git Commands v1.0**
605
+ **Documentação atualizada**: 22/09/2025 19:18
606
+ **Próxima revisão**: Após implementação completa
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: all-tools
3
+ description: Documentação de todas as ferramentas disponíveis no Cursor.
4
+ model: sonnet
5
+ category: meta
6
+ tags: [tools, documentation, reference]
7
+ version: "3.0.0"
8
+ updated: "2025-11-24"
9
+ ---
10
+
11
+ # Listagem de Todas as Ferramentas
12
+
13
+ ## 🎯 Objetivo
14
+ Documentar todas as ferramentas disponíveis no contexto do Cursor organizadas por categoria.
15
+
16
+ ## 📋 Instruções
17
+
18
+ ### 1. Estrutura de Arquivos
19
+ Crie arquivos separados por categoria em `.cursor/docs/tools/`:
20
+ - `mcps.md` - Ferramentas MCP (ClickUp, Postman, etc)
21
+ - `agents.md` - Agentes especializados (@product-agent, @clickup-specialist, etc)
22
+ - `commands.md` - Comandos `.cursor/` disponíveis
23
+ - `rules.md` - Regras e configurações do workspace
24
+ - `[categoria].md` - Outras categorias relevantes
25
+
26
+ ### 2. Formato de Cada Item
27
+ ```typescript
28
+ // Assinatura TypeScript
29
+ function nome_ferramenta(parametros): ReturnType
30
+ // Propósito: Descrição clara e concisa da ferramenta
31
+ ```
32
+
33
+ ### 3. Estrutura de Cada Arquivo
34
+ - **Índice** no início (links internos)
35
+ - **Hierarquia** quando aplicável (sub-categorias, grupos)
36
+ - **Lista de marcadores** para cada ferramenta
37
+ - **Exemplos práticos** quando relevante
38
+
39
+ ### 4. README Principal
40
+ Crie `docs/tools/README.md` com:
41
+ - Visão geral da documentação de ferramentas
42
+ - Índice de todos os arquivos de categoria
43
+ - Guia rápido de uso
44
+
45
+ ## ⚙️ Execução
46
+ 1. Se `docs/tools/README.md` existir, pergunte: **Substituir** ou **Atualizar**?
47
+ 2. Analise todas as ferramentas disponíveis no contexto
48
+ 3. Organize por categoria
49
+ 4. Gere os arquivos markdown
50
+ 5. Confirme a criação/atualização