@onion-ai/cli 1.0.0-beta.1

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 (220) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +529 -0
  3. package/bin/onion.js +6 -0
  4. package/framework/CLAUDE.md +45 -0
  5. package/framework/VERSION +1 -0
  6. package/framework/agents/compliance/iso-22301-specialist.md +985 -0
  7. package/framework/agents/compliance/iso-27001-specialist.md +713 -0
  8. package/framework/agents/compliance/pmbok-specialist.md +739 -0
  9. package/framework/agents/compliance/security-information-master.md +907 -0
  10. package/framework/agents/compliance/soc2-specialist.md +889 -0
  11. package/framework/agents/deployment/docker-specialist.md +1192 -0
  12. package/framework/agents/development/c4-architecture-specialist.md +745 -0
  13. package/framework/agents/development/c4-documentation-specialist.md +695 -0
  14. package/framework/agents/development/clickup-specialist.md +396 -0
  15. package/framework/agents/development/cursor-specialist.md +277 -0
  16. package/framework/agents/development/docs-reverse-engineer.md +417 -0
  17. package/framework/agents/development/gamma-api-specialist.md +1168 -0
  18. package/framework/agents/development/gitflow-specialist.md +1206 -0
  19. package/framework/agents/development/linux-security-specialist.md +675 -0
  20. package/framework/agents/development/mermaid-specialist.md +515 -0
  21. package/framework/agents/development/nodejs-specialist.md +672 -0
  22. package/framework/agents/development/nx-migration-specialist.md +866 -0
  23. package/framework/agents/development/nx-monorepo-specialist.md +618 -0
  24. package/framework/agents/development/postgres-specialist.md +1123 -0
  25. package/framework/agents/development/react-developer.md +131 -0
  26. package/framework/agents/development/runflow-specialist.md +277 -0
  27. package/framework/agents/development/system-documentation-orchestrator.md +1387 -0
  28. package/framework/agents/development/task-specialist.md +677 -0
  29. package/framework/agents/git/branch-code-reviewer.md +225 -0
  30. package/framework/agents/git/branch-documentation-writer.md +161 -0
  31. package/framework/agents/git/branch-metaspec-checker.md +67 -0
  32. package/framework/agents/git/branch-test-planner.md +176 -0
  33. package/framework/agents/meta/agent-creator-specialist.md +1266 -0
  34. package/framework/agents/meta/command-creator-specialist.md +1676 -0
  35. package/framework/agents/meta/metaspec-gate-keeper.md +240 -0
  36. package/framework/agents/meta/onion.md +824 -0
  37. package/framework/agents/product/branding-positioning-specialist.md +1029 -0
  38. package/framework/agents/product/extract-meeting-specialist.md +394 -0
  39. package/framework/agents/product/meeting-consolidator.md +482 -0
  40. package/framework/agents/product/pain-price-specialist.md +508 -0
  41. package/framework/agents/product/presentation-orchestrator.md +1190 -0
  42. package/framework/agents/product/product-agent.md +201 -0
  43. package/framework/agents/product/story-points-framework-specialist.md +538 -0
  44. package/framework/agents/product/storytelling-business-specialist.md +890 -0
  45. package/framework/agents/research/research-agent.md +292 -0
  46. package/framework/agents/review/code-reviewer.md +154 -0
  47. package/framework/agents/review/corporate-compliance-specialist.md +370 -0
  48. package/framework/agents/testing/test-agent.md +424 -0
  49. package/framework/agents/testing/test-engineer.md +294 -0
  50. package/framework/agents/testing/test-planner.md +117 -0
  51. package/framework/commands/common/prompts/README.md +208 -0
  52. package/framework/commands/common/prompts/clickup-patterns.md +144 -0
  53. package/framework/commands/common/prompts/code-review-checklist.md +168 -0
  54. package/framework/commands/common/prompts/git-workflow-patterns.md +235 -0
  55. package/framework/commands/common/prompts/output-formats.md +240 -0
  56. package/framework/commands/common/prompts/technical.md +194 -0
  57. package/framework/commands/common/templates/abstraction-template.md +399 -0
  58. package/framework/commands/common/templates/agent-template.md +353 -0
  59. package/framework/commands/common/templates/business_context_template.md +748 -0
  60. package/framework/commands/common/templates/command-template.md +273 -0
  61. package/framework/commands/common/templates/technical_context_template.md +526 -0
  62. package/framework/commands/design/screen-spec.md +505 -0
  63. package/framework/commands/development/runflow-dev.md +465 -0
  64. package/framework/commands/docs/build-business-docs.md +299 -0
  65. package/framework/commands/docs/build-compliance-docs.md +143 -0
  66. package/framework/commands/docs/build-index.md +119 -0
  67. package/framework/commands/docs/build-tech-docs.md +221 -0
  68. package/framework/commands/docs/docs-health.md +141 -0
  69. package/framework/commands/docs/help.md +278 -0
  70. package/framework/commands/docs/refine-vision.md +25 -0
  71. package/framework/commands/docs/reverse-consolidate.md +158 -0
  72. package/framework/commands/docs/sync-sessions.md +354 -0
  73. package/framework/commands/docs/validate-docs.md +157 -0
  74. package/framework/commands/engineer/bump.md +29 -0
  75. package/framework/commands/engineer/docs.md +11 -0
  76. package/framework/commands/engineer/hotfix.md +183 -0
  77. package/framework/commands/engineer/plan.md +85 -0
  78. package/framework/commands/engineer/pr-update.md +219 -0
  79. package/framework/commands/engineer/pr.md +117 -0
  80. package/framework/commands/engineer/pre-pr.md +81 -0
  81. package/framework/commands/engineer/start.md +254 -0
  82. package/framework/commands/engineer/validate-phase-sync.md +134 -0
  83. package/framework/commands/engineer/warm-up.md +20 -0
  84. package/framework/commands/engineer/work.md +155 -0
  85. package/framework/commands/f/company-context-extractor.md +93 -0
  86. package/framework/commands/f/process-meetings.md +103 -0
  87. package/framework/commands/git/README.md +682 -0
  88. package/framework/commands/git/code-review.md +213 -0
  89. package/framework/commands/git/fast-commit.md +43 -0
  90. package/framework/commands/git/feature/finish.md +88 -0
  91. package/framework/commands/git/feature/publish.md +89 -0
  92. package/framework/commands/git/feature/start.md +172 -0
  93. package/framework/commands/git/help.md +100 -0
  94. package/framework/commands/git/hotfix/finish.md +96 -0
  95. package/framework/commands/git/hotfix/start.md +92 -0
  96. package/framework/commands/git/init.md +111 -0
  97. package/framework/commands/git/release/finish.md +96 -0
  98. package/framework/commands/git/release/start.md +93 -0
  99. package/framework/commands/git/sync.md +199 -0
  100. package/framework/commands/meta/all-tools.md +58 -0
  101. package/framework/commands/meta/analyze-complex-problem.md +186 -0
  102. package/framework/commands/meta/create-abstraction.md +882 -0
  103. package/framework/commands/meta/create-agent-express.md +98 -0
  104. package/framework/commands/meta/create-agent.md +210 -0
  105. package/framework/commands/meta/create-command.md +203 -0
  106. package/framework/commands/meta/create-knowledge-base.md +143 -0
  107. package/framework/commands/meta/create-task-structure.md +150 -0
  108. package/framework/commands/meta/setup-integration.md +274 -0
  109. package/framework/commands/onion.md +169 -0
  110. package/framework/commands/product/README.md +249 -0
  111. package/framework/commands/product/analyze-pain-price.md +694 -0
  112. package/framework/commands/product/branding.md +458 -0
  113. package/framework/commands/product/check.md +46 -0
  114. package/framework/commands/product/checklist-sync.md +239 -0
  115. package/framework/commands/product/collect.md +95 -0
  116. package/framework/commands/product/consolidate-meetings.md +291 -0
  117. package/framework/commands/product/estimate.md +511 -0
  118. package/framework/commands/product/extract-meeting.md +226 -0
  119. package/framework/commands/product/feature.md +416 -0
  120. package/framework/commands/product/light-arch.md +82 -0
  121. package/framework/commands/product/presentation.md +174 -0
  122. package/framework/commands/product/refine.md +161 -0
  123. package/framework/commands/product/spec.md +79 -0
  124. package/framework/commands/product/task-check.md +378 -0
  125. package/framework/commands/product/task.md +603 -0
  126. package/framework/commands/product/validate-task.md +325 -0
  127. package/framework/commands/product/warm-up.md +24 -0
  128. package/framework/commands/quick/analisys.md +17 -0
  129. package/framework/commands/test/e2e.md +377 -0
  130. package/framework/commands/test/integration.md +508 -0
  131. package/framework/commands/test/unit.md +381 -0
  132. package/framework/commands/validate/collab/pair-testing.md +657 -0
  133. package/framework/commands/validate/collab/three-amigos.md +534 -0
  134. package/framework/commands/validate/qa-points/estimate.md +660 -0
  135. package/framework/commands/validate/test-strategy/analyze.md +1201 -0
  136. package/framework/commands/validate/test-strategy/create.md +411 -0
  137. package/framework/commands/validate/workflow.md +370 -0
  138. package/framework/commands/warm-up.md +20 -0
  139. package/framework/docs/architecture/acoplamento-clickup-problema-analise.md +468 -0
  140. package/framework/docs/architecture/desacoplamento-roadmap.md +364 -0
  141. package/framework/docs/architecture/validacao-fase-1.md +235 -0
  142. package/framework/docs/c4/c4-detection-rules.md +395 -0
  143. package/framework/docs/c4/c4-documentation-templates.md +579 -0
  144. package/framework/docs/c4/c4-mermaid-patterns.md +331 -0
  145. package/framework/docs/c4/c4-templates.md +256 -0
  146. package/framework/docs/clickup/clickup-acceptance-criteria-strategy.md +329 -0
  147. package/framework/docs/clickup/clickup-auto-update-strategy.md +340 -0
  148. package/framework/docs/clickup/clickup-comment-formatter.md +239 -0
  149. package/framework/docs/clickup/clickup-description-fix.md +384 -0
  150. package/framework/docs/clickup/clickup-dual-comment-strategy.md +528 -0
  151. package/framework/docs/clickup/clickup-formatting.md +302 -0
  152. package/framework/docs/clickup/separador-tamanho-otimizado.md +258 -0
  153. package/framework/docs/engineer/pre-pr-acceptance-validation.md +256 -0
  154. package/framework/docs/onion/ESPERANTO.md +293 -0
  155. package/framework/docs/onion/agents-reference.md +832 -0
  156. package/framework/docs/onion/clickup-integration.md +780 -0
  157. package/framework/docs/onion/commands-guide.md +924 -0
  158. package/framework/docs/onion/engineering-flows.md +900 -0
  159. package/framework/docs/onion/getting-started.md +803 -0
  160. package/framework/docs/onion/maintenance-checklist.md +421 -0
  161. package/framework/docs/onion/naming-conventions.md +286 -0
  162. package/framework/docs/onion/practical-examples.md +854 -0
  163. package/framework/docs/product/story-points-integration.md +269 -0
  164. package/framework/docs/product/story-points-validation.md +237 -0
  165. package/framework/docs/reviews/task-manager-docs-review-2025-11-24.md +184 -0
  166. package/framework/docs/strategies/clickup-comment-patterns.md +766 -0
  167. package/framework/docs/strategies/clickup-integration-tests.md +602 -0
  168. package/framework/docs/strategies/clickup-mcp-wrappers-tests.md +888 -0
  169. package/framework/docs/strategies/clickup-regression-tests.md +587 -0
  170. package/framework/docs/strategies/visual-patterns.md +315 -0
  171. package/framework/docs/templates/README.md +649 -0
  172. package/framework/docs/templates/adr-template.md +226 -0
  173. package/framework/docs/templates/analysis-template.md +280 -0
  174. package/framework/docs/templates/execution-plan-template.md +430 -0
  175. package/framework/docs/templates/guide-template.md +367 -0
  176. package/framework/docs/templates/phase-execution-prompt-template.md +504 -0
  177. package/framework/docs/templates/reference-template.md +522 -0
  178. package/framework/docs/templates/solution-template.md +390 -0
  179. package/framework/docs/tools/README.md +356 -0
  180. package/framework/docs/tools/agents.md +365 -0
  181. package/framework/docs/tools/commands.md +669 -0
  182. package/framework/docs/tools/cursor.md +539 -0
  183. package/framework/docs/tools/mcps.md +937 -0
  184. package/framework/docs/tools/rules.md +461 -0
  185. package/framework/rules/language-and-documentation.mdc +371 -0
  186. package/framework/rules/nestjs-controllers.md +83 -0
  187. package/framework/rules/nestjs-dtos.md +255 -0
  188. package/framework/rules/nestjs-modules.md +141 -0
  189. package/framework/rules/nestjs-services.md +230 -0
  190. package/framework/rules/nx-rules.mdc +41 -0
  191. package/framework/rules/onion-patterns.mdc +197 -0
  192. package/framework/skills/codebase-visualizer/SKILL.md +26 -0
  193. package/framework/skills/codebase-visualizer/scripts/visualize.py +131 -0
  194. package/framework/skills/collect/SKILL.md +84 -0
  195. package/framework/skills/create-rule/SKILL.md +152 -0
  196. package/framework/skills/db-schema-visualizer/SKILL.md +49 -0
  197. package/framework/skills/db-schema-visualizer/scripts/visualize.py +1191 -0
  198. package/framework/skills/sync-meetings/SKILL.md +239 -0
  199. package/framework/utils/clickup-mcp-wrappers.md +744 -0
  200. package/framework/utils/date-time-standards.md +200 -0
  201. package/framework/utils/task-manager/README.md +94 -0
  202. package/framework/utils/task-manager/adapters/asana.md +377 -0
  203. package/framework/utils/task-manager/adapters/clickup.md +467 -0
  204. package/framework/utils/task-manager/adapters/linear.md +421 -0
  205. package/framework/utils/task-manager/detector.md +299 -0
  206. package/framework/utils/task-manager/factory.md +363 -0
  207. package/framework/utils/task-manager/interface.md +248 -0
  208. package/framework/utils/task-manager/types.md +409 -0
  209. package/package.json +41 -0
  210. package/src/cli.js +73 -0
  211. package/src/commands/doctor.js +191 -0
  212. package/src/commands/init.js +287 -0
  213. package/src/commands/install.js +261 -0
  214. package/src/commands/list.js +152 -0
  215. package/src/commands/uninstall.js +90 -0
  216. package/src/commands/update.js +26 -0
  217. package/src/utils/fs.js +89 -0
  218. package/src/utils/log.js +35 -0
  219. package/src/utils/paths.js +32 -0
  220. package/src/utils/prompt.js +76 -0
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: finish
3
+ description: Finalizar hotfix com merge para main e develop, tag e deploy.
4
+ model: sonnet
5
+ category: git
6
+ tags: [hotfix, gitflow, deploy]
7
+ version: "3.0.0"
8
+ updated: "2025-11-24"
9
+ ---
10
+
11
+ # ✅ Git Flow - Finalizar Hotfix
12
+
13
+ Finalizar correção emergencial realizando deploy para produção com merge em main/master e develop, criação de tags emergenciais e cleanup. Workflow crítico para release de emergency fixes.
14
+
15
+ ## 🎯 Funcionalidades
16
+
17
+ ### Emergency Release e Deployment
18
+ - Merge emergencial de hotfix branch para main/master
19
+ - Back-merge imediato para develop branch
20
+ - Criação automática de emergency patch tags
21
+ - Deploy preparation para production environment
22
+ - Cleanup automático pós-deployment
23
+
24
+ ### Production Safety e Validation
25
+ - Validações críticas pré-merge para produção
26
+ - Emergency conflict detection e resolution guidance
27
+ - Production readiness verification
28
+ - Rollback preparation automática
29
+ - Emergency testing validation
30
+
31
+ ### Critical Operations Management
32
+ - ClickUp task completion com emergency status
33
+ - Team notification de emergency deployment
34
+ - Emergency documentation automática
35
+ - Production deployment tracking
36
+ - Integration com CI/CD emergency pipelines
37
+
38
+ ## 🚀 Como Usar
39
+
40
+ ```bash
41
+ /git/hotfix/finish # Auto-detecta hotfix atual
42
+ /git/hotfix/finish fix-payment-gateway # Finaliza hotfix específica
43
+ ```
44
+
45
+ **Pré-requisitos**: Em hotfix branch ou especificar nome da correção
46
+
47
+ ### Processo Executado
48
+ 1. **Emergency Detection**: Detecta hotfix branch atual ou busca específica
49
+ 2. **Critical Validation**: Verifica hotfix state, conflicts, production readiness
50
+ 3. **Production Preview**: Exibe impacto do emergency deployment
51
+ 4. **Emergency Confirmation**: Solicita confirmação para production release
52
+ 5. **Production Merge**: Executa merge para main + back-merge para develop
53
+ 6. **Emergency Tagging**: Cria patch tag com emergency release notes
54
+ 7. **Production Deploy**: Prepara deployment e atualiza ClickUp status
55
+ 8. **Emergency Cleanup**: Remove hotfix branch e finaliza emergency workflow
56
+
57
+ ### Emergency Deployment Strategy
58
+ Durante finalização emergencial:
59
+ - Production merge: Emergency-optimized merge strategy
60
+ - Conflict handling: Priority resolution guidance
61
+ - Tag creation: Emergency patch version increment
62
+ - Team communication: Immediate notification de production changes
63
+
64
+ ## 🤝 Integração @gitflow-specialist
65
+
66
+ *Este comando sempre consulta @gitflow-specialist para emergency merge validation, critical conflict resolution, production deployment strategy e troubleshooting de emergency release complexos.*
67
+
68
+ ## ⚠️ Resolução de Problemas
69
+
70
+ ### Hotfix Branch Not Found
71
+ - **Sintoma**: Não consegue detectar hotfix branch ativa
72
+ - **Solução**: `git checkout hotfix/name` ou especificar nome no comando
73
+
74
+ ### Emergency Merge Conflicts
75
+ - **Causa**: Conflicts críticos entre hotfix e production branches
76
+ - **Fix**: Emergency resolution guidance via @gitflow-specialist
77
+
78
+ ### Production Branch Protection
79
+ - **Sintoma**: Branch protection impede emergency merge
80
+ - **Solução**: Emergency override procedures ou Pull Request workflow
81
+
82
+ ### Critical Tests Failing
83
+ - **Causa**: Emergency tests falham durante validation
84
+ - **Fix**: Emergency test strategy ou production override (com approval)
85
+
86
+ ### Emergency Tag Creation Failed
87
+ - **Sintoma**: Problemas na criação de emergency patch tags
88
+ - **Solução**: @gitflow-specialist orienta sobre tag strategy e conflicts
89
+
90
+ ### Production Deployment Issues
91
+ - **Causa**: Problemas durante emergency deployment preparation
92
+ - **Fix**: Emergency deployment guidance e rollback preparation
93
+
94
+ ### Team Notification Failed
95
+ - **Sintoma**: ClickUp ou team notifications não funcionando
96
+ - **Solução**: Manual emergency communication + @gitflow-specialist guidance
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: start
3
+ description: Iniciar hotfix branch para correção emergencial em produção.
4
+ model: sonnet
5
+ category: git
6
+ tags: [hotfix, gitflow, emergency]
7
+ version: "3.0.0"
8
+ updated: "2025-11-24"
9
+ ---
10
+
11
+ # 🚨 Git Flow - Iniciar Hotfix
12
+
13
+ Iniciar correção emergencial criando hotfix branch a partir de main/master para resolver problemas críticos em produção. Workflow otimizado para máxima velocidade com validações de segurança essenciais.
14
+
15
+ ## 🎯 Funcionalidades
16
+
17
+ ### Emergency Hotfix Workflow
18
+ - Criação imediata de hotfix branch a partir de main/master (produção)
19
+ - Auto-versioning para patch releases emergenciais
20
+ - ClickUp task urgente com prioridade máxima automática
21
+ - Validações críticas de estado de produção
22
+ - Setup otimizado para correção imediata
23
+
24
+ ### Safety-First Emergency Operations
25
+ - Detecção automática de primary branch (main/master)
26
+ - Validações essenciais de working directory
27
+ - Emergency override para uncommitted changes
28
+ - Rollback preparation automática
29
+ - Emergency documentation e tracking setup
30
+
31
+ ### Criticidade e Tracking Urgente
32
+ - Tags de urgência automáticas no ClickUp
33
+ - Notificações escaladas para team awareness
34
+ - Emergency workflow prioritization
35
+ - Integration com @gitflow-specialist para emergency guidance
36
+ - Automated emergency documentation
37
+
38
+ ## 🚀 Como Usar
39
+
40
+ ```bash
41
+ /git/hotfix/start "fix-payment-gateway" # Emergency payment fix
42
+ /git/hotfix/start "security-patch-auth" # Security hotfix
43
+ /git/hotfix/start "critical-memory-leak" # Performance emergency
44
+ /git/hotfix/start "api-timeout-fix" # API emergency
45
+ ```
46
+
47
+ **Pré-requisitos**: Nome da correção obrigatório, repositório Git válido
48
+
49
+ ### Processo Executado
50
+ 1. **Emergency Validation**: Verifica nome hotfix, repository state, critical validations
51
+ 2. **Primary Branch Detection**: Detecta main/master automaticamente
52
+ 3. **Emergency Override**: Handles uncommitted changes com emergency stashing
53
+ 4. **Hotfix Branch Creation**: Cria hotfix/name branch a partir de produção
54
+ 5. **ClickUp Emergency Setup**: Cria task urgente com máxima prioridade
55
+ 6. **Team Notification**: Alerta equipe sobre emergency fix em andamento
56
+
57
+ ### Emergency Features
58
+ Durante execução emergencial:
59
+ - Working directory: Emergency stash se necessário
60
+ - Branch detection: Main/master identification automática
61
+ - Priority escalation: ClickUp task com urgência máxima
62
+ - Team alerts: Notification automática de emergency workflow
63
+
64
+ ## 🤝 Integração @gitflow-specialist
65
+
66
+ *Este comando sempre consulta @gitflow-specialist para emergency workflow guidance, critical branch validation, hotfix strategy optimization e troubleshooting de situações emergenciais complexas.*
67
+
68
+ ## ⚠️ Resolução de Problemas
69
+
70
+ ### Hotfix Name Required
71
+ - **Sintoma**: Comando executado sem nome da correção
72
+ - **Solução**: Fornecer nome descritivo da correção emergencial
73
+
74
+ ### Uncommitted Changes Emergency
75
+ - **Causa**: Working directory não limpo durante emergency
76
+ - **Fix**: Comando oferece emergency stash automático ou manual commit
77
+
78
+ ### Primary Branch Detection Failed
79
+ - **Sintoma**: Não consegue detectar main/master branch
80
+ - **Solução**: @gitflow-specialist fornece detection strategy para repository
81
+
82
+ ### Not Git Repository
83
+ - **Causa**: Executado fora de repositório Git válido
84
+ - **Fix**: `git init && /git/init` para emergency setup
85
+
86
+ ### Emergency Override Issues
87
+ - **Sintoma**: Problemas durante emergency workflow execution
88
+ - **Solução**: @gitflow-specialist fornece emergency guidance específica
89
+
90
+ ### Critical State Validation Failed
91
+ - **Causa**: Repository em estado inconsistente para hotfix
92
+ - **Fix**: Emergency validation guidance via @gitflow-specialist consultation
@@ -0,0 +1,111 @@
1
+ ---
2
+ name: init
3
+ description: Inicializar repositório com GitFlow e convenções padrão.
4
+ model: sonnet
5
+ category: git
6
+ tags: [init, gitflow, setup]
7
+ version: "3.0.0"
8
+ updated: "2025-11-24"
9
+ ---
10
+
11
+ # 🔧 Git Flow - Inicialização
12
+
13
+ Configurar repositório Git com GitFlow seguindo as melhores práticas. Detectar automaticamente se deve usar `main` ou `master` como branch principal e configurar todas as branches e convenções necessárias.
14
+
15
+ ## 🎯 Funcionalidades
16
+
17
+ ### Detecção Automática Inteligente
18
+ - Verificar se Git Flow já está inicializado
19
+ - Detectar branch principal existente (main/master) automaticamente
20
+ - Configurar develop branch baseado na convenção detectada
21
+ - Validar se repositório está em estado adequado para inicialização
22
+
23
+ ### Setup Seguro e Educativo
24
+ - Configuração automática de prefixos GitFlow padrão (feature/, release/, hotfix/)
25
+ - Verificações de integridade do repositório antes da inicialização
26
+ - Criação da branch develop se não existir
27
+ - Integração com @gitflow-specialist para guidance personalizada
28
+
29
+ ## 🚀 Como Usar
30
+
31
+ ```bash
32
+ /git/init # Inicialização completa automática
33
+ ```
34
+
35
+ ## 🤖 Integração com @gitflow-specialist
36
+
37
+ Para cada inicialização:
38
+
39
+ 1. **Consultar @gitflow-specialist** para análise do repositório atual
40
+ 2. **Receber estratégia** de inicialização baseada no contexto
41
+ 3. **Executar setup** seguindo as recomendações do especialista
42
+ 4. **Validar configuração** final e fornecer próximos passos
43
+
44
+ ## 📋 Processo de Inicialização
45
+
46
+ ### Verificações Pré-Inicialização
47
+ - **Repository check**: Verificar se estamos em um repositório Git válido
48
+ - **Status check**: Garantir que não há mudanças não commitadas
49
+ - **Remote check**: Verificar configuração de repositório remoto
50
+ - **GitFlow check**: Detectar se já está inicializado
51
+
52
+ ### Configuração Automática
53
+ - **Branch detection**: Identificar main/master existente
54
+ - **Develop setup**: Criar develop branch baseada na principal
55
+ - **Prefix configuration**: Configurar prefixos padrão GitFlow
56
+ - **Validation**: Verificar configuração final
57
+
58
+ ## ⚙️ Configurações Aplicadas
59
+
60
+ ### Branches Principais
61
+ ```
62
+ main/master (produção) ← detectado automaticamente
63
+ develop (desenvolvimento) ← criado se não existir
64
+ ```
65
+
66
+ ### Prefixos de Branch
67
+ ```
68
+ feature/ (novas funcionalidades)
69
+ release/ (preparação de releases)
70
+ hotfix/ (correções urgentes)
71
+ ```
72
+
73
+ ## ✅ Resultado da Inicialização
74
+
75
+ Após execução bem-sucedida:
76
+
77
+ - ✅ **Git Flow configurado** com branches apropriadas
78
+ - ✅ **Branch develop criada** e configurada como development branch
79
+ - ✅ **Prefixos definidos** para todos os tipos de branch
80
+ - ✅ **Configuração validada** e testada
81
+ - ✅ **Próximos passos** fornecidos baseados no contexto
82
+
83
+ ## 🔄 Próximos Passos Sugeridos
84
+
85
+ Após inicialização, o sistema recomendará:
86
+
87
+ - **Primeira feature**: `/git/feature/start "nome-da-funcionalidade"`
88
+ - **Sincronização**: `/git/sync` se houver repositório remoto
89
+ - **Ajuda contextual**: `/git/help` para entender os workflows disponíveis
90
+
91
+ ## ⚠️ Tratamento de Problemas
92
+
93
+ ### Repository não é Git
94
+ **Problema**: Pasta atual não é um repositório Git
95
+ **Solução**: Execute `git init` primeiro, depois `/git/init`
96
+
97
+ ### GitFlow já inicializado
98
+ **Problema**: GitFlow já está configurado
99
+ **Resultado**: Mostra configuração atual e próximos passos sugeridos
100
+
101
+ ### Branch develop conflitante
102
+ **Problema**: Já existe branch develop com conteúdo divergente
103
+ **Solução**: @gitflow-specialist fornecerá estratégia de resolução
104
+
105
+ ### Repositório remoto não configurado
106
+ **Problema**: Não há origin configurado
107
+ **Resultado**: Configuração local apenas, com sugestão de setup remoto
108
+
109
+ ---
110
+
111
+ *Este comando sempre consulta @gitflow-specialist para garantir inicialização otimizada para seu contexto específico.*
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: finish
3
+ description: Finalizar release com merge, tag e publicação.
4
+ model: sonnet
5
+ category: git
6
+ tags: [release, gitflow, deploy]
7
+ version: "3.0.0"
8
+ updated: "2025-11-24"
9
+ ---
10
+
11
+ # ✅ Git Flow - Finalizar Release
12
+
13
+ Finalizar processo de release realizando merge seguro para main/master e develop, criação de tags, publicação e cleanup. Workflow completo de release deployment com validações automáticas e ClickUp integration.
14
+
15
+ ## 🎯 Funcionalidades
16
+
17
+ ### Release Completion e Merge Strategy
18
+ - Merge seguro de release branch para main/master branch
19
+ - Back-merge para develop branch mantendo sincronização
20
+ - Criação automática de tags anotadas com release notes
21
+ - Validações pré-merge (conflicts, tests, working directory)
22
+ - Cleanup automático de release branch após finalização
23
+
24
+ ### Publishing e Deployment Integration
25
+ - Tag publishing para remote repository
26
+ - Release notes generation baseada em changelog
27
+ - ClickUp task completion e status updates
28
+ - Team notification via release completion workflow
29
+ - Integration com CI/CD pipelines através de tags
30
+
31
+ ### Safety-First e Validações
32
+ - Confirmação obrigatória antes de merge para main
33
+ - Análise de impacto completa (commits, files, changes)
34
+ - Validação de release branch state e readiness
35
+ - Preview detalhado das mudanças que serão mergeadas
36
+ - Rollback guidance caso problemas sejam detectados
37
+
38
+ ## 🚀 Como Usar
39
+
40
+ ```bash
41
+ /git/release/finish # Auto-detecta release branch atual
42
+ /git/release/finish v2.1.0 # Finaliza release específica
43
+ ```
44
+
45
+ **Pré-requisitos**: Em release branch ou especificar versão da release
46
+
47
+ ### Processo Executado
48
+ 1. **Detection**: Detecta release branch atual ou busca por versão específica
49
+ 2. **Validations**: Verifica release branch state, conflicts, working directory
50
+ 3. **Preview**: Exibe impacto do merge (commits, files, deployment implications)
51
+ 4. **Confirmation**: Solicita confirmação explícita para merge em main
52
+ 5. **Merge Strategy**: Executa merge para main + back-merge para develop
53
+ 6. **Tag Creation**: Cria tag anotada com release notes automáticas
54
+ 7. **Publishing**: Publica tags e atualiza remote branches
55
+ 8. **Cleanup**: Remove release branch e atualiza ClickUp completion
56
+
57
+ ### Merge Strategy Intelligence
58
+ Durante execução, aplica strategy inteligente:
59
+ - Main merge: Fast-forward quando possível, merge commit quando necessário
60
+ - Develop back-merge: Garante sincronização sem perder desenvolvimento
61
+ - Conflict detection: Identifica e orienta resolução antes do merge
62
+ - Tag management: Cria tags consistentes com convention estabelecida
63
+
64
+ ## 🤝 Integração @gitflow-specialist
65
+
66
+ *Este comando sempre consulta @gitflow-specialist para merge strategy validation, conflict resolution guidance, tag creation best practices e troubleshooting de release deployment complexo.*
67
+
68
+ ## ⚠️ Resolução de Problemas
69
+
70
+ ### Release Branch Not Found
71
+ - **Sintoma**: Não consegue detectar release branch ativa
72
+ - **Solução**: `git checkout release/version` ou especificar versão no comando
73
+
74
+ ### Merge Conflicts Detected
75
+ - **Causa**: Conflicts entre release branch e main/develop
76
+ - **Fix**: Resolver conflicts manualmente antes de finalizar release
77
+
78
+ ### Uncommitted Changes in Release
79
+ - **Sintoma**: Release branch tem changes não commitadas
80
+ - **Solução**: `git add . && git commit -m "final release changes"`
81
+
82
+ ### Tag Already Exists
83
+ - **Causa**: Tag da versão já existe no repository
84
+ - **Fix**: Usar `git tag -d tagname` para remover ou escolher versão diferente
85
+
86
+ ### Main Branch Protection
87
+ - **Sintoma**: Branch protection impede merge direto
88
+ - **Solução**: Usar Pull Request workflow ou ajustar branch protection
89
+
90
+ ### Tests Failing in Release
91
+ - **Causa**: Release branch não passa nos testes automatizados
92
+ - **Fix**: Corrigir testes ou usar override com approval (não recomendado)
93
+
94
+ ### Remote Publishing Issues
95
+ - **Sintoma**: Problemas ao publicar tags ou branches
96
+ - **Solução**: @gitflow-specialist orienta sobre remote configuration e permissions
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: start
3
+ description: Iniciar release branch com versionamento e changelog.
4
+ model: sonnet
5
+ category: git
6
+ tags: [release, gitflow, version]
7
+ version: "3.0.0"
8
+ updated: "2025-11-24"
9
+ ---
10
+
11
+ # 🚀 Git Flow - Iniciar Release
12
+
13
+ Iniciar processo de release criando branch de release com versionamento automático, preparação de changelog e validações pré-release. Workflow completo para gestão segura de releases seguindo padrões GitFlow.
14
+
15
+ ## 🎯 Funcionalidades
16
+
17
+ ### Release Workflow e Versionamento
18
+ - Criação de release branch a partir de develop branch
19
+ - Auto-detecção e bump inteligente de versionamento (semver)
20
+ - Preparação automática de changelog baseada em commits
21
+ - Validações de estado pré-release (working directory, conflicts)
22
+ - Setup de ClickUp task para release tracking completo
23
+
24
+ ### Versionamento Inteligente e Automação
25
+ - Detecção automática de package.json e version files
26
+ - Bump semântico (major.minor.patch) com validation
27
+ - Support para diferentes tipos de projeto e convenções
28
+ - Validações de tag conflicts e branch state
29
+ - Integration com @gitflow-specialist para release strategy
30
+
31
+ ### Validações e Safety-First
32
+ - Verificações de repository state e uncommitted changes
33
+ - Primary branch detection (main/master) automática
34
+ - Develop branch sync validation antes da release
35
+ - Release branch creation com error handling robusto
36
+ - Educational guidance durante processo de release
37
+
38
+ ## 🚀 Como Usar
39
+
40
+ ```bash
41
+ /git/release/start "v2.1.0" # Release com versão específica
42
+ /git/release/start "2.1.0" # Versão sem prefixo v
43
+ /git/release/start "patch" # Auto-bump patch (2.0.1 → 2.0.2)
44
+ /git/release/start "minor" # Auto-bump minor (2.0.1 → 2.1.0)
45
+ /git/release/start "major" # Auto-bump major (2.0.1 → 3.0.0)
46
+ ```
47
+
48
+ **Pré-requisitos**: Working directory limpo, develop branch disponível
49
+
50
+ ### Processo Executado
51
+ 1. **Validações**: Verifica repository state, versão fornecida, working directory
52
+ 2. **Branch Detection**: Detecta primary branch (main/master) e develop
53
+ 3. **Version Processing**: Processa versioning (específica ou auto-bump)
54
+ 4. **Release Branch**: Cria release/version branch a partir de develop
55
+ 5. **ClickUp Setup**: Cria task de release tracking e atualiza status
56
+ 6. **Changelog Prep**: Prepara changelog baseado em commits desde última release
57
+
58
+ ### Version Bump Intelligence
59
+ Durante execução, processa diferentes tipos de versionamento:
60
+ - Versões explícitas: Valida formato semver e disponibilidade
61
+ - Auto-bump: Detecta última tag e incrementa conforme tipo
62
+ - Project detection: Identifica package.json, version files, etc.
63
+ - Conflict prevention: Verifica tags existentes antes de proceder
64
+
65
+ ## 🤝 Integração @gitflow-specialist
66
+
67
+ *Este comando sempre consulta @gitflow-specialist para release strategy validation, version bump analysis, branch creation guidance e troubleshooting de release workflows complexos.*
68
+
69
+ ## ⚠️ Resolução de Problemas
70
+
71
+ ### Version Required Error
72
+ - **Sintoma**: Comando executado sem especificar versão
73
+ - **Solução**: Fornecer versão específica ou tipo de bump (patch/minor/major)
74
+
75
+ ### Uncommitted Changes
76
+ - **Causa**: Working directory não está limpo antes da release
77
+ - **Fix**: `git add . && git commit -m "prepare for release"` antes de iniciar
78
+
79
+ ### Develop Branch Not Found
80
+ - **Sintoma**: Develop branch não existe ou não está disponível
81
+ - **Solução**: `git checkout -b develop` ou `git fetch origin develop`
82
+
83
+ ### Version Already Exists
84
+ - **Causa**: Tag ou branch de release já existe para versão especificada
85
+ - **Fix**: Usar versão diferente ou limpar tags/branches conflitantes
86
+
87
+ ### Primary Branch Detection Issues
88
+ - **Sintoma**: Não consegue detectar main/master branch
89
+ - **Solução**: Comando detecta automaticamente via @gitflow-specialist guidance
90
+
91
+ ### Release Branch Creation Failed
92
+ - **Causa**: Problemas durante criação da branch de release
93
+ - **Fix**: @gitflow-specialist fornece strategy específica para resolução
@@ -0,0 +1,199 @@
1
+ ---
2
+ name: sync
3
+ description: |
4
+ Sincronização automática de branches com GitFlow e proteção de branches críticas.
5
+ Use após merge de PRs para manter branches atualizadas.
6
+ model: sonnet
7
+
8
+ parameters:
9
+ - name: branch
10
+ description: Branch alvo para sincronização (default: develop)
11
+ required: false
12
+ default: develop
13
+
14
+ category: git
15
+ tags:
16
+ - sync
17
+ - gitflow
18
+ - branch-protection
19
+
20
+ version: "3.0.0"
21
+ updated: "2025-11-24"
22
+
23
+ related_commands:
24
+ - /engineer/pr
25
+ - /git/feature/finish
26
+
27
+ related_agents:
28
+ - gitflow-specialist
29
+ ---
30
+
31
+ # 🔄 Git Sync - Sincronização com GitFlow
32
+
33
+ Sincronização pós-merge de branches com proteção automática.
34
+
35
+ ## 🎯 Objetivo
36
+
37
+ Automatizar sincronização após merge de PRs seguindo GitFlow.
38
+
39
+ ## 🛡️ Branches Protegidas
40
+
41
+ | Branch | Push Direto | Fast-Forward |
42
+ |--------|-------------|--------------|
43
+ | `main` | ❌ Bloqueado | ✅ Permitido |
44
+ | `master` | ❌ Bloqueado | ✅ Permitido |
45
+ | `develop` | ❌ Bloqueado | ✅ Permitido |
46
+
47
+ ## ⚡ Fluxo de Execução
48
+
49
+ ### Passo 1: Detectar Contexto
50
+
51
+ ```bash
52
+ # Branch atual
53
+ CURRENT=$(git branch --show-current)
54
+
55
+ # Target branch
56
+ TARGET="${{branch:-develop}}"
57
+
58
+ # Verificar se target é protegida
59
+ if [[ "$TARGET" =~ ^(main|master|develop)$ ]]; then
60
+ PROTECTED=true
61
+ fi
62
+ ```
63
+
64
+ ### Passo 2: Validar Estado
65
+
66
+ ```bash
67
+ # Verificar alterações não commitadas
68
+ if [[ -n $(git status --porcelain) ]]; then
69
+ echo "⚠️ Alterações não commitadas"
70
+ echo "Commit ou stash antes de continuar"
71
+ exit 1
72
+ fi
73
+
74
+ # Fetch remoto
75
+ git fetch origin --prune
76
+ ```
77
+
78
+ ### Passo 3: Análise GitFlow
79
+
80
+ Consultar @gitflow-specialist para estratégia:
81
+
82
+ | Branch Atual | Target | Estratégia |
83
+ |--------------|--------|------------|
84
+ | `feature/*` | `develop` | `feature-cleanup` |
85
+ | `release/*` | `main` | `release-sync` |
86
+ | `hotfix/*` | `main` | `hotfix-sync` |
87
+ | `develop` | `main` | `protected-sync` |
88
+
89
+ Referência: `common/prompts/git-workflow-patterns.md`
90
+
91
+ ### Passo 4: Executar Sync
92
+
93
+ #### Para Branches Normais
94
+
95
+ ```bash
96
+ git checkout $TARGET
97
+ git pull origin $TARGET
98
+ git checkout $CURRENT
99
+ git merge $TARGET --no-edit
100
+ ```
101
+
102
+ #### Para Branches Protegidas
103
+
104
+ ```bash
105
+ # Apenas fast-forward permitido
106
+ git checkout $TARGET
107
+ git merge origin/$TARGET --ff-only
108
+
109
+ # Se falhar, instruir PR workflow
110
+ if [[ $? -ne 0 ]]; then
111
+ echo "❌ Fast-forward não possível"
112
+ echo "Use PR workflow: /engineer/pr"
113
+ fi
114
+ ```
115
+
116
+ ### Passo 5: Cleanup (se feature finalizada)
117
+
118
+ ```bash
119
+ # Se branch feature foi merged
120
+ if git branch -r | grep -q "origin/$CURRENT"; then
121
+ echo "Branch $CURRENT ainda existe no remote"
122
+ else
123
+ echo "✅ Branch $CURRENT deletada no remote"
124
+ # Perguntar se quer deletar local
125
+ fi
126
+ ```
127
+
128
+ ### Passo 6: Atualizar ClickUp
129
+
130
+ SE sessão ativa com task_id:
131
+ - Comentário de sync realizado
132
+ - Atualizar status se necessário
133
+
134
+ ## 📤 Output Esperado
135
+
136
+ ### Sync Sucesso
137
+
138
+ ```
139
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
140
+ ✅ SYNC CONCLUÍDO
141
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
142
+
143
+ 📊 Resumo:
144
+ ∟ Branch atual: feature/user-auth
145
+ ∟ Sincronizado com: develop
146
+ ∟ Commits atualizados: 5
147
+ ∟ Conflitos: 0
148
+
149
+ 🚀 Próximo: /engineer/work
150
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
151
+ ```
152
+
153
+ ### Branch Protegida - Bloqueio
154
+
155
+ ```
156
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
157
+ 🛡️ BRANCH PROTEGIDA
158
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
159
+
160
+ ❌ Push direto em 'develop' bloqueado
161
+
162
+ 📋 Workflow Correto:
163
+ 1. git checkout -b feature/my-changes
164
+ 2. [fazer alterações]
165
+ 3. /engineer/pr
166
+ 4. [merge via GitHub/GitLab]
167
+ 5. /git/sync develop
168
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
169
+ ```
170
+
171
+ ### Conflito Detectado
172
+
173
+ ```
174
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
175
+ ⚠️ CONFLITOS DETECTADOS
176
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
177
+
178
+ 📁 Arquivos em conflito:
179
+ ∟ src/components/Button.tsx
180
+ ∟ src/utils/helpers.ts
181
+
182
+ 💡 Resolução:
183
+ 1. Editar arquivos manualmente
184
+ 2. git add [arquivos]
185
+ 3. git commit
186
+ 4. /git/sync (novamente)
187
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
188
+ ```
189
+
190
+ ## 🔗 Referências
191
+
192
+ - Padrões: `common/prompts/git-workflow-patterns.md`
193
+ - Agente: @gitflow-specialist
194
+
195
+ ## ⚠️ Notas
196
+
197
+ - Sempre fazer `git fetch` antes
198
+ - Branches protegidas só aceitam fast-forward
199
+ - Em caso de conflito, resolver manualmente