@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,226 @@
1
+ ---
2
+ name: extract-meeting
3
+ description: |
4
+ Extração estruturada de conhecimento de transcrições de reuniões usando Framework EXTRACT.
5
+ Use para transformar arquivos de contexto bruto em artefatos de alto valor para humanos, sistemas e IA.
6
+ model: sonnet
7
+
8
+ parameters:
9
+ - name: source
10
+ description: Caminho do arquivo ou pasta com transcrição(ões)
11
+ required: true
12
+ - name: level
13
+ description: Nível de output (compact, executive, complete, graph)
14
+ required: false
15
+ - name: focus
16
+ description: Foco específico (decisions, tasks, gaps, all)
17
+ required: false
18
+
19
+ category: product
20
+ tags:
21
+ - meeting
22
+ - extraction
23
+ - knowledge-base
24
+ - documentation
25
+
26
+ version: "3.0.0"
27
+ updated: "2025-12-01"
28
+
29
+ related_commands:
30
+ - /product/task
31
+ - /docs/build-tech-docs
32
+ - /meta/create-knowledge-base
33
+
34
+ related_agents:
35
+ - extract-meeting-specialist
36
+ - product-agent
37
+ - task-specialist
38
+
39
+ knowledge_bases:
40
+ - docs/knowbase/concepts/meeting-transcription-to-knowledge-base.md
41
+ ---
42
+
43
+ # 📋 Extrair Conhecimento de Reunião
44
+
45
+ Transformação de transcrições brutas em conhecimento estruturado usando o Framework EXTRACT.
46
+
47
+ ## 🎯 Objetivo
48
+
49
+ Processar transcrições de reuniões e gerar outputs estruturados consumíveis por humanos, sistemas e IA, seguindo as 7 dimensões do Framework EXTRACT.
50
+
51
+ ## ⚡ Fluxo de Execução
52
+
53
+ ### Passo 1: Validar Input
54
+
55
+ ```bash
56
+ # Verificar se source existe
57
+ test -e "{{source}}" || echo "❌ Arquivo/pasta não encontrado"
58
+
59
+ # Identificar tipo (arquivo ou pasta)
60
+ if [ -d "{{source}}" ]; then
61
+ echo "📁 Processando pasta com múltiplos arquivos"
62
+ FILES=$(find "{{source}}" -type f \( -name "*.txt" -o -name "*.md" \))
63
+ else
64
+ echo "📄 Processando arquivo único"
65
+ FILES="{{source}}"
66
+ fi
67
+ ```
68
+
69
+ ### Passo 2: Ler Conteúdo
70
+
71
+ ```bash
72
+ # Ler transcrição(ões)
73
+ read_file "{{source}}"
74
+ ```
75
+
76
+ ### Passo 3: Aplicar Framework EXTRACT
77
+
78
+ Invocar `@extract-meeting-specialist` com instruções:
79
+
80
+ ```markdown
81
+ ## Tarefa
82
+ Processar a transcrição abaixo aplicando o Framework EXTRACT completo.
83
+
84
+ ## Framework EXTRACT (7 Dimensões)
85
+ - **E**ssência: Resumo executivo em 3 linhas
86
+ - **X**pectativas: Objetivos da reunião e status (atingido/parcial/não)
87
+ - **T**arefas: Ações definidas (quem, o quê, quando)
88
+ - **R**esoluções: Decisões tomadas com justificativa
89
+ - **A**mbiguidades: Gaps, contradições, pontos não resolvidos
90
+ - **C**onexões: Dependências, stakeholders, documentos relacionados
91
+ - **T**imeline: Datas e marcos mencionados
92
+
93
+ ## Nível de Output
94
+ {{level}} (default: executive)
95
+
96
+ ## Foco
97
+ {{focus}} (default: all)
98
+
99
+ ## Regras
100
+ 1. NUNCA inventar informações — usar [INFERIDO] ou [NÃO ESPECIFICADO]
101
+ 2. Indicar confidence level em decisões (high/medium/low)
102
+ 3. Capturar TODOS os gaps — o que NÃO foi decidido é crítico
103
+ 4. Tasks devem ter owner + deadline sempre que possível
104
+ 5. Preservar citações importantes entre aspas
105
+
106
+ ## Transcrição
107
+ [CONTEÚDO DO ARQUIVO]
108
+ ```
109
+
110
+ ### Passo 4: Gerar Output
111
+
112
+ **Nível `compact`:**
113
+ ```markdown
114
+ ## Reunião: [Título] | [Data]
115
+ **Decisão**: [Principal decisão]
116
+ **Ações**: [Nome] faz [quê] até [quando]
117
+ **Pendente**: [Principal gap]
118
+ ```
119
+
120
+ **Nível `executive`:**
121
+ ```markdown
122
+ ## [Título] - [Data]
123
+
124
+ ### Resumo
125
+ [3-5 linhas]
126
+
127
+ ### Decisões
128
+ - ✅ [Decisão 1]
129
+ - ✅ [Decisão 2]
130
+
131
+ ### Ações
132
+ | Responsável | Ação | Prazo |
133
+ |-------------|------|-------|
134
+ | [Nome] | [Descrição] | [Data] |
135
+
136
+ ### Pendências
137
+ - ⚠️ [Gap 1]
138
+ - ⚠️ [Gap 2]
139
+
140
+ ### Timeline
141
+ - 📅 [Data]: [Marco]
142
+ ```
143
+
144
+ **Nível `complete`:**
145
+ Output YAML completo seguindo schema do knowledge base.
146
+
147
+ **Nível `graph`:**
148
+ JSON com entidades e relacionamentos para sistemas.
149
+
150
+ ### Passo 5: Salvar Resultado
151
+
152
+ ```bash
153
+ # Determinar nome do output
154
+ OUTPUT_NAME=$(basename "{{source}}" | sed 's/\.[^.]*$//')
155
+ OUTPUT_FILE="docs/meetings/${OUTPUT_NAME}-extract.md"
156
+
157
+ # Criar diretório se não existir
158
+ mkdir -p docs/meetings/
159
+
160
+ # Salvar
161
+ write "${OUTPUT_FILE}"
162
+ ```
163
+
164
+ ## 📤 Output Esperado
165
+
166
+ ```
167
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
168
+ ✅ EXTRAÇÃO CONCLUÍDA
169
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
170
+
171
+ 📁 Arquivo: docs/meetings/[nome]-extract.md
172
+
173
+ 📊 Extração EXTRACT:
174
+ ∟ Essência: ✅
175
+ ∟ Expectativas: ✅
176
+ ∟ Tarefas: [N] itens
177
+ ∟ Resoluções: [N] decisões
178
+ ∟ Ambiguidades: [N] gaps
179
+ ∟ Conexões: [N] links
180
+ ∟ Timeline: [N] datas
181
+
182
+ 📈 Qualidade:
183
+ ∟ Confidence Score: [0.X]
184
+ ∟ Tasks com Owner: [X]%
185
+ ∟ Tasks com Deadline: [X]%
186
+ ∟ Gaps com Owner Sugerido: [X]%
187
+
188
+ 🚀 Próximos Passos:
189
+ 1. Revisar gaps críticos
190
+ 2. Validar decisões com participantes
191
+ 3. Criar tasks no gerenciador (@task-specialist)
192
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
193
+ ```
194
+
195
+ ## 🎯 Exemplos de Uso
196
+
197
+ ```bash
198
+ # Extrair reunião específica (nível executivo default)
199
+ /product/extract-meeting source=rhilo-reuniao-28-nov.txt
200
+
201
+ # Nível completo com YAML
202
+ /product/extract-meeting source=reuniao.txt level=complete
203
+
204
+ # Foco apenas em decisões
205
+ /product/extract-meeting source=reuniao.txt focus=decisions
206
+
207
+ # Processar pasta de contexto
208
+ /product/extract-meeting source=contextos/projeto-x/
209
+
210
+ # Gerar grafo para sistemas
211
+ /product/extract-meeting source=reuniao.txt level=graph
212
+ ```
213
+
214
+ ## 🔗 Referências
215
+
216
+ - **Agente**: `@extract-meeting-specialist`
217
+ - **Knowledge Base**: `docs/knowbase/concepts/meeting-transcription-to-knowledge-base.md`
218
+ - **Framework**: EXTRACT (7 dimensões)
219
+
220
+ ## ⚠️ Notas
221
+
222
+ - Processar em até 24h após reunião (contexto fresco)
223
+ - Validar decisões críticas com participantes
224
+ - Gaps são tão importantes quanto decisões
225
+ - Para criar tasks automaticamente, usar `@task-specialist` após extração
226
+
@@ -0,0 +1,416 @@
1
+ ---
2
+ name: feature
3
+ description: Criar task de feature no gerenciador configurado para planejamento e backlog.
4
+ model: sonnet
5
+ category: product
6
+ tags: [feature, task-manager, backlog]
7
+ version: "3.0.0"
8
+ updated: "2025-11-24"
9
+
10
+ related_commands:
11
+ - /product/estimate
12
+ - /product/task
13
+
14
+ related_agents:
15
+ - story-points-framework-specialist
16
+ - product-agent
17
+ ---
18
+
19
+ # 🎯 Criar Feature - Task para Planejamento
20
+
21
+ Você é um assistente de IA especializado em **criar tasks de feature no gerenciador configurado (via Task Manager abstraction) para planejamento e backlog** seguindo o padrão do Sistema Onion. Seu papel é criar tasks de backlog para organização e priorização sem iniciar desenvolvimento.
22
+
23
+ ## 🎯 **Funcionalidades**
24
+
25
+ ### **📋 Criar Task Backlog:**
26
+ - Criar task no gerenciador configurado com tag "backlog"
27
+ - Status: "Backlog" (aguardando planejamento e priorização)
28
+ - Projeto/Lista: Mesmo projeto da sessão atual ou projeto padrão
29
+ - Auto-detecção de contexto e projeto via Task Manager
30
+
31
+ ### **🔗 Integração Inteligente:**
32
+ - Auto-detecção do projeto/lista atual via Task Manager
33
+ - Herda contexto da sessão ativa (se houver)
34
+ - Links com tasks relacionadas
35
+ - Tags apropriadas para categorização
36
+ - Suporta múltiplos provedores (ClickUp, Asana, Linear)
37
+
38
+ ---
39
+
40
+ ## 🚀 **Uso do Comando**
41
+
42
+ ### **Sintaxe:**
43
+ ```bash
44
+ /product/feature "nome-ou-descrição-da-feature"
45
+ ```
46
+
47
+ ### **Examples:**
48
+ ```bash
49
+ /product/feature "implementar-autenticacao-oauth"
50
+ /product/feature "adicionar-filtros-avancados-dashboard"
51
+ /product/feature "integrar-payment-gateway-stripe"
52
+ ```
53
+
54
+ ---
55
+
56
+ ## ⚙️ **Workflow Automático**
57
+
58
+ ### **1. Validação de Parâmetros**
59
+ ```bash
60
+ # Verificar se nome da feature foi fornecido
61
+ if [ "$#" -eq 0 ]; then
62
+ echo "❌ ERROR: Feature name required"
63
+ echo "📖 USAGE: /product/feature \"feature-name-or-description\""
64
+ echo ""
65
+ echo "💡 EXAMPLES:"
66
+ echo " /product/feature \"implement-oauth-authentication\""
67
+ echo " /product/feature \"add-advanced-dashboard-filters\""
68
+ exit 1
69
+ fi
70
+
71
+ FEATURE_NAME="$1"
72
+ # Sanitizar nome da feature (remover caracteres especiais)
73
+ FEATURE_SLUG=$(echo "$FEATURE_NAME" | sed 's/[^a-zA-Z0-9]/-/g' | tr '[:upper:]' '[:lower:]' | sed 's/--*/-/g' | sed 's/^-\\|-$//g')
74
+
75
+ echo "🎯 Creating feature planning task: $FEATURE_NAME"
76
+ echo "📝 Feature slug: $FEATURE_SLUG"
77
+ ```
78
+
79
+ ### **2. Detecção de Contexto via Task Manager**
80
+
81
+ **IMPORTANTE:** Use Task Manager abstraction para detectar contexto independente do provedor:
82
+
83
+ ```typescript
84
+ // Via abstração - funciona para qualquer provedor (ClickUp, Asana, Linear)
85
+ const taskManager = getTaskManager();
86
+
87
+ // Detectar projeto/lista da sessão atual
88
+ function getCurrentProjectId() {
89
+ // Tentar obter de sessão ativa
90
+ const sessionContext = readSessionContext();
91
+ if (sessionContext?.taskId) {
92
+ const currentTask = await taskManager.getTask(sessionContext.taskId);
93
+ if (currentTask?.projectId) {
94
+ return currentTask.projectId;
95
+ }
96
+ }
97
+
98
+ // Fallback: usar projeto padrão configurado
99
+ return taskManager.defaultProjectId;
100
+ }
101
+
102
+ const projectId = getCurrentProjectId();
103
+ console.log(`📋 Target project/list ID: ${projectId}`);
104
+ ```
105
+
106
+ **Nota:** Se o comando ainda usar código bash direto, atualizar para usar Task Manager abstraction quando possível.
107
+
108
+ ### **3. Criação da Task via Task Manager**
109
+ ```bash
110
+ # Preparar dados da task
111
+ TASK_TITLE="🚀 $FEATURE_NAME"
112
+
113
+ # Descrição da task com contexto
114
+ TASK_DESCRIPTION="## 🎯 **Feature para Planejamento**
115
+
116
+ **Tipo**: Feature Development
117
+ **Status**: Backlog - Aguardando planejamento e priorização
118
+ **Criada via**: /product/feature
119
+
120
+ ---
121
+
122
+ ## 📋 **Descrição**
123
+ $FEATURE_NAME
124
+
125
+ ---
126
+
127
+ ## 🔄 **Workflow de Desenvolvimento**
128
+
129
+ ### **Para Iniciar Desenvolvimento:**
130
+ \`\`\`bash
131
+ # Após planejamento, iniciar desenvolvimento GitFlow:
132
+ /git/feature/start \"$FEATURE_SLUG\"
133
+
134
+ # Ou usar sessão de desenvolvimento:
135
+ /engineer/start $FEATURE_SLUG
136
+ \`\`\`
137
+
138
+ ### **Workflow Sequencial Recomendado:**
139
+ 1. **🎯 Planejamento**: Task criada (atual) + detalhamento
140
+ 2. **🌿 Desenvolvimento**: /git/feature/start $FEATURE_SLUG
141
+ 3. **🛠️ Iteração**: /engineer/work
142
+ 4. **🔄 Finalização**: /git/sync
143
+ 5. **🚀 Deploy**: /engineer/pr
144
+
145
+ ---
146
+
147
+ ## 📊 **Critérios de Aceitação**
148
+ - [ ] Requisitos funcionais detalhados
149
+ - [ ] Mockups ou wireframes definidos
150
+ - [ ] Critérios de aceitação específicos
151
+ - [ ] Estimativas de esforço
152
+ - [ ] Dependências identificadas
153
+ - [ ] Prioridade definida no roadmap
154
+
155
+ ### **Para Desenvolvimento:**
156
+ - [ ] Funcionalidade implementada conforme especificação
157
+ - [ ] Testes unitários criados
158
+ - [ ] Documentação atualizada
159
+ - [ ] Code review aprovado
160
+ - [ ] Deploy em ambiente de teste
161
+
162
+ ---
163
+
164
+ ## 🏷️ **Tags e Categorização**
165
+ - **Type**: feature
166
+ - **Status**: backlog
167
+ - **Priority**: medium (ajustar conforme roadmap)
168
+ - **Phase**: planning
169
+
170
+ **Criada automaticamente pelo Sistema Onion** 🧅"
171
+
172
+ # Criar task via Task Manager abstraction
173
+ console.log("🚀 Creating feature planning task via Task Manager...");
174
+
175
+ const taskManager = getTaskManager();
176
+ const task = await taskManager.createTask({
177
+ name: TASK_TITLE,
178
+ projectId: projectId,
179
+ markdownDescription: TASK_DESCRIPTION,
180
+ status: 'backlog',
181
+ priority: 'medium',
182
+ tags: ['feature', 'backlog', 'planning']
183
+ });
184
+
185
+ const TASK_ID = task.id;
186
+ console.log(`✅ Task created: ${TASK_ID}`);
187
+ ```
188
+
189
+ ### **4. Estimar Story Points (Automático)**
190
+
191
+ **CRÍTICO:** Após criar task, SEMPRE estimar story points automaticamente.
192
+
193
+ ```markdown
194
+ @story-points-framework-specialist
195
+
196
+ Por favor, analise e estime a seguinte feature de backlog:
197
+
198
+ **Feature:** $FEATURE_NAME
199
+ **Descrição:** [descrição da feature]
200
+ **Status:** Backlog (planejamento inicial)
201
+
202
+ Forneça estimativa inicial de story points para planejamento.
203
+ ```
204
+
205
+ **Atualizar Task com Estimativa:**
206
+
207
+ ```bash
208
+ # Obter estimativa via agente
209
+ ESTIMATE_RESPONSE=$(invoke_agent_story_points "$FEATURE_NAME")
210
+
211
+ # Extrair story points
212
+ STORY_POINTS=$(echo "$ESTIMATE_RESPONSE" | extract_story_points)
213
+
214
+ # Atualizar task com custom field Story Points
215
+ if [ "$STORY_POINTS" != "" ]; then
216
+ echo "📊 Updating task with story points: $STORY_POINTS"
217
+
218
+ // Atualizar custom field via Task Manager
219
+ await taskManager.updateTask(TASK_ID, {
220
+ customFields: {
221
+ 'Story Points': STORY_POINTS
222
+ }
223
+ });
224
+
225
+ // Adicionar comentário com análise via Task Manager
226
+ const ESTIMATE_ANALYSIS = extractAnalysis(ESTIMATE_RESPONSE);
227
+
228
+ await taskManager.addComment(TASK_ID,
229
+ '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n' +
230
+ '📊 ESTIMATIVA INICIAL DE STORY POINTS\n' +
231
+ '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n' +
232
+ `🎲 Story Points: ${STORY_POINTS} pontos\n\n` +
233
+ `⚡ ANÁLISE:\n${ESTIMATE_ANALYSIS}\n\n` +
234
+ '💡 NOTA: Esta é uma estimativa inicial para planejamento. Pode ser refinada durante o refinement.\n' +
235
+ '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'
236
+ );
237
+ fi
238
+ ```
239
+
240
+ ### **5. Resultado e Links**
241
+ ```bash
242
+ if [ "$TASK_ID" != "" ] && [ "$TASK_ID" != "null" ]; then
243
+ TASK_URL = task.url; // Via Task Manager abstraction
244
+
245
+ echo ""
246
+ echo "✅ FEATURE PLANNING TASK CREATED SUCCESSFULLY!"
247
+ echo ""
248
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
249
+ echo ""
250
+ echo "📋 TASK DETAILS:"
251
+ echo " ▶ Title: $TASK_TITLE"
252
+ echo " ▶ ID: $TASK_ID"
253
+ echo " ▶ Status: Backlog"
254
+ echo " ▶ URL: $TASK_URL"
255
+ echo ""
256
+ echo "🏷️ TAGS: feature, backlog, planning"
257
+ echo "📝 DESCRIPTION: Auto-generated with development workflow"
258
+ echo ""
259
+ if [ "$STORY_POINTS" != "" ]; then
260
+ echo "🎲 STORY POINTS: $STORY_POINTS pontos (estimativa inicial)"
261
+ echo ""
262
+ fi
263
+ echo ""
264
+ echo "🎯 NEXT STEPS:"
265
+ echo " ∟ Add details: Open $TASK_URL"
266
+ echo " ∟ Set priority: Adjust based on roadmap"
267
+ echo " ∟ Start development: /git/feature/start \"$FEATURE_SLUG\""
268
+ echo ""
269
+ echo "💡 WORKFLOW SEQUENCIAL:"
270
+ echo " 1. 🎯 Planning (current) → 2. 🌿 GitFlow Start → 3. 🛠️ Development → 4. ✅ Done"
271
+ echo ""
272
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
273
+ echo ""
274
+ echo "🌟 Feature '$FEATURE_NAME' ready for planning!"
275
+
276
+ # Adicionar comentário inicial na task
277
+ INITIAL_COMMENT="🎯 FEATURE BACKLOG PARA PLANEJAMENTO
278
+
279
+ ━━━━━━━━━━━━━━━━━━━━━━━━
280
+
281
+ ✅ TASK SETUP:
282
+ ▶ Feature: $FEATURE_NAME
283
+ ▶ Slug: $FEATURE_SLUG
284
+ ▶ Status: Backlog (Planning)
285
+ ▶ Criada via: /product/feature
286
+
287
+ 🎯 PLANEJAMENTO:
288
+ ▶ Detalhar requisitos funcionais
289
+ ▶ Definir critérios de aceitação
290
+ ▶ Estimar esforço e cronograma
291
+ ▶ Priorizar no roadmap
292
+
293
+ 🚀 PARA DESENVOLVIMENTO:
294
+ ▶ Após planejamento: /git/feature/start \"$FEATURE_SLUG\"
295
+ ▶ Para sessão: /engineer/start $FEATURE_SLUG
296
+
297
+ 📋 WORKFLOW:
298
+ ∟ Planning → GitFlow Start → Development → Done
299
+
300
+ ━━━━━━━━━━━━━━━━━━━━━━━━
301
+
302
+ ⏰ Criada: $(date +'%Y-%m-%d %H:%M:%S') | 🧅 Sistema Onion"
303
+
304
+ # Adicionar comentário via Task Manager (graceful degradation)
305
+ // Via Task Manager abstraction
306
+ await taskManager.addComment(TASK_ID, INITIAL_COMMENT).catch(() => {
307
+ console.warn("⚠️ Comment creation failed - task created successfully anyway");
308
+ });
309
+
310
+ else
311
+ console.error("❌ FAILED TO CREATE TASK");
312
+ console.error("");
313
+ console.error("💡 POSSIBLE CAUSES:");
314
+ console.error(" ∟ Task Manager provider not configured");
315
+ console.error(" ∟ Invalid project/list ID or permissions");
316
+ console.error(" ∟ Network connectivity issues");
317
+ console.error("");
318
+ console.error("🔧 TROUBLESHOOTING:");
319
+ console.error(" ∟ Check TASK_MANAGER_PROVIDER environment variable");
320
+ console.error(" ∟ Verify project/list permissions and ID");
321
+ console.error(" ∟ Execute /meta/setup-integration to configure");
322
+ console.error(" ∟ Try manual task creation as fallback");
323
+ echo ""
324
+ echo "📖 MANUAL FALLBACK:"
325
+ echo " ∟ Create task manually: '$TASK_TITLE'"
326
+ echo " ∟ Add tags: feature, backlog, planning"
327
+ echo " ∟ Set status: Backlog"
328
+ exit 1
329
+ fi
330
+ ```
331
+
332
+ ---
333
+
334
+ ## 🔗 **Integração com Sistema Onion**
335
+
336
+ ### **Separação Clara de Responsabilidades:**
337
+ - **`/product/feature`**: Cria task backlog para **planejamento**
338
+ - **`/git/feature/start`**: Inicia desenvolvimento **GitFlow** (branch + session)
339
+ - **`/git/sync`**: Finaliza desenvolvimento (pós-merge + cleanup)
340
+
341
+ ### **Workflow Sequencial Integrado:**
342
+ ```bash
343
+ 1. /product/feature "nova-funcionalidade" # ← PLANEJAMENTO
344
+ # ... tempo de planejamento, detalhamento, priorização ...
345
+
346
+ 2. /git/feature/start "nova-funcionalidade" # ← DESENVOLVIMENTO GitFlow
347
+ # ... desenvolvimento usando sessões ...
348
+
349
+ 3. /git/sync # ← FINALIZAÇÃO
350
+ ```
351
+
352
+ ### **Quando Usar:**
353
+ - ✅ **Criar features para backlog** e roadmap planning
354
+ - ✅ **Organizar product backlog** e priorização
355
+ - ✅ **Capturar ideias** de features rapidamente
356
+ - ✅ **Setup inicial** de projetos com múltiplas features
357
+
358
+ ### **Quando NÃO usar:**
359
+ - ❌ Desenvolvimento imediato (use `/git/feature/start`)
360
+ - ❌ Hotfixes urgentes (use `/engineer/hotfix`)
361
+ - ❌ Tasks já existem (use `/engineer/start <feature-slug>`)
362
+
363
+ ---
364
+
365
+ ## ⚠️ **Tratamento de Erros**
366
+
367
+ ### **Erro: Nome da feature não fornecido**
368
+ ```
369
+ ❌ ERROR: Feature name required
370
+ 📖 USAGE: /product/feature "feature-name-or-description"
371
+ ```
372
+
373
+ ### **Erro: Task Manager falhou**
374
+ ```
375
+ ❌ FAILED TO CREATE TASK
376
+ 🔧 Check TASK_MANAGER_PROVIDER configuration and permissions
377
+ 📖 Create task manually as fallback
378
+ ```
379
+
380
+ ### **Erro: Lista não encontrada**
381
+ ```
382
+ ❌ ERROR: Unable to detect project/list via Task Manager
383
+ 💡 Run from active session or configure default list
384
+ ```
385
+
386
+ ---
387
+
388
+ ## 💡 **Dicas de Uso**
389
+
390
+ ### **✅ Boas Práticas:**
391
+ ```bash
392
+ # Nomes descritivos e específicos
393
+ /product/feature "implement-oauth2-authentication-flow"
394
+
395
+ # Features modulares e focadas
396
+ /product/feature "add-user-profile-avatar-upload"
397
+
398
+ # Include context quando útil
399
+ /product/feature "integrate-stripe-payment-gateway-checkout"
400
+ ```
401
+
402
+ ### **❌ Evitar:**
403
+ ```bash
404
+ # Muito genérico
405
+ /product/feature "melhorias"
406
+
407
+ # Muito técnico/interno
408
+ /product/feature "refactor-class-x"
409
+
410
+ # Tasks que não são features
411
+ /product/feature "fix-bug-payment" # Use /engineer/hotfix
412
+ ```
413
+
414
+ ---
415
+
416
+ **🎯 Criação rápida de features para backlog e planejamento! Para iniciar desenvolvimento GitFlow, use `/git/feature/start [feature-name]`.**