@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.
- package/LICENSE +21 -0
- package/README.md +529 -0
- package/bin/onion.js +6 -0
- package/framework/CLAUDE.md +45 -0
- package/framework/VERSION +1 -0
- package/framework/agents/compliance/iso-22301-specialist.md +985 -0
- package/framework/agents/compliance/iso-27001-specialist.md +713 -0
- package/framework/agents/compliance/pmbok-specialist.md +739 -0
- package/framework/agents/compliance/security-information-master.md +907 -0
- package/framework/agents/compliance/soc2-specialist.md +889 -0
- package/framework/agents/deployment/docker-specialist.md +1192 -0
- package/framework/agents/development/c4-architecture-specialist.md +745 -0
- package/framework/agents/development/c4-documentation-specialist.md +695 -0
- package/framework/agents/development/clickup-specialist.md +396 -0
- package/framework/agents/development/cursor-specialist.md +277 -0
- package/framework/agents/development/docs-reverse-engineer.md +417 -0
- package/framework/agents/development/gamma-api-specialist.md +1168 -0
- package/framework/agents/development/gitflow-specialist.md +1206 -0
- package/framework/agents/development/linux-security-specialist.md +675 -0
- package/framework/agents/development/mermaid-specialist.md +515 -0
- package/framework/agents/development/nodejs-specialist.md +672 -0
- package/framework/agents/development/nx-migration-specialist.md +866 -0
- package/framework/agents/development/nx-monorepo-specialist.md +618 -0
- package/framework/agents/development/postgres-specialist.md +1123 -0
- package/framework/agents/development/react-developer.md +131 -0
- package/framework/agents/development/runflow-specialist.md +277 -0
- package/framework/agents/development/system-documentation-orchestrator.md +1387 -0
- package/framework/agents/development/task-specialist.md +677 -0
- package/framework/agents/git/branch-code-reviewer.md +225 -0
- package/framework/agents/git/branch-documentation-writer.md +161 -0
- package/framework/agents/git/branch-metaspec-checker.md +67 -0
- package/framework/agents/git/branch-test-planner.md +176 -0
- package/framework/agents/meta/agent-creator-specialist.md +1266 -0
- package/framework/agents/meta/command-creator-specialist.md +1676 -0
- package/framework/agents/meta/metaspec-gate-keeper.md +240 -0
- package/framework/agents/meta/onion.md +824 -0
- package/framework/agents/product/branding-positioning-specialist.md +1029 -0
- package/framework/agents/product/extract-meeting-specialist.md +394 -0
- package/framework/agents/product/meeting-consolidator.md +482 -0
- package/framework/agents/product/pain-price-specialist.md +508 -0
- package/framework/agents/product/presentation-orchestrator.md +1190 -0
- package/framework/agents/product/product-agent.md +201 -0
- package/framework/agents/product/story-points-framework-specialist.md +538 -0
- package/framework/agents/product/storytelling-business-specialist.md +890 -0
- package/framework/agents/research/research-agent.md +292 -0
- package/framework/agents/review/code-reviewer.md +154 -0
- package/framework/agents/review/corporate-compliance-specialist.md +370 -0
- package/framework/agents/testing/test-agent.md +424 -0
- package/framework/agents/testing/test-engineer.md +294 -0
- package/framework/agents/testing/test-planner.md +117 -0
- package/framework/commands/common/prompts/README.md +208 -0
- package/framework/commands/common/prompts/clickup-patterns.md +144 -0
- package/framework/commands/common/prompts/code-review-checklist.md +168 -0
- package/framework/commands/common/prompts/git-workflow-patterns.md +235 -0
- package/framework/commands/common/prompts/output-formats.md +240 -0
- package/framework/commands/common/prompts/technical.md +194 -0
- package/framework/commands/common/templates/abstraction-template.md +399 -0
- package/framework/commands/common/templates/agent-template.md +353 -0
- package/framework/commands/common/templates/business_context_template.md +748 -0
- package/framework/commands/common/templates/command-template.md +273 -0
- package/framework/commands/common/templates/technical_context_template.md +526 -0
- package/framework/commands/design/screen-spec.md +505 -0
- package/framework/commands/development/runflow-dev.md +465 -0
- package/framework/commands/docs/build-business-docs.md +299 -0
- package/framework/commands/docs/build-compliance-docs.md +143 -0
- package/framework/commands/docs/build-index.md +119 -0
- package/framework/commands/docs/build-tech-docs.md +221 -0
- package/framework/commands/docs/docs-health.md +141 -0
- package/framework/commands/docs/help.md +278 -0
- package/framework/commands/docs/refine-vision.md +25 -0
- package/framework/commands/docs/reverse-consolidate.md +158 -0
- package/framework/commands/docs/sync-sessions.md +354 -0
- package/framework/commands/docs/validate-docs.md +157 -0
- package/framework/commands/engineer/bump.md +29 -0
- package/framework/commands/engineer/docs.md +11 -0
- package/framework/commands/engineer/hotfix.md +183 -0
- package/framework/commands/engineer/plan.md +85 -0
- package/framework/commands/engineer/pr-update.md +219 -0
- package/framework/commands/engineer/pr.md +117 -0
- package/framework/commands/engineer/pre-pr.md +81 -0
- package/framework/commands/engineer/start.md +254 -0
- package/framework/commands/engineer/validate-phase-sync.md +134 -0
- package/framework/commands/engineer/warm-up.md +20 -0
- package/framework/commands/engineer/work.md +155 -0
- package/framework/commands/f/company-context-extractor.md +93 -0
- package/framework/commands/f/process-meetings.md +103 -0
- package/framework/commands/git/README.md +682 -0
- package/framework/commands/git/code-review.md +213 -0
- package/framework/commands/git/fast-commit.md +43 -0
- package/framework/commands/git/feature/finish.md +88 -0
- package/framework/commands/git/feature/publish.md +89 -0
- package/framework/commands/git/feature/start.md +172 -0
- package/framework/commands/git/help.md +100 -0
- package/framework/commands/git/hotfix/finish.md +96 -0
- package/framework/commands/git/hotfix/start.md +92 -0
- package/framework/commands/git/init.md +111 -0
- package/framework/commands/git/release/finish.md +96 -0
- package/framework/commands/git/release/start.md +93 -0
- package/framework/commands/git/sync.md +199 -0
- package/framework/commands/meta/all-tools.md +58 -0
- package/framework/commands/meta/analyze-complex-problem.md +186 -0
- package/framework/commands/meta/create-abstraction.md +882 -0
- package/framework/commands/meta/create-agent-express.md +98 -0
- package/framework/commands/meta/create-agent.md +210 -0
- package/framework/commands/meta/create-command.md +203 -0
- package/framework/commands/meta/create-knowledge-base.md +143 -0
- package/framework/commands/meta/create-task-structure.md +150 -0
- package/framework/commands/meta/setup-integration.md +274 -0
- package/framework/commands/onion.md +169 -0
- package/framework/commands/product/README.md +249 -0
- package/framework/commands/product/analyze-pain-price.md +694 -0
- package/framework/commands/product/branding.md +458 -0
- package/framework/commands/product/check.md +46 -0
- package/framework/commands/product/checklist-sync.md +239 -0
- package/framework/commands/product/collect.md +95 -0
- package/framework/commands/product/consolidate-meetings.md +291 -0
- package/framework/commands/product/estimate.md +511 -0
- package/framework/commands/product/extract-meeting.md +226 -0
- package/framework/commands/product/feature.md +416 -0
- package/framework/commands/product/light-arch.md +82 -0
- package/framework/commands/product/presentation.md +174 -0
- package/framework/commands/product/refine.md +161 -0
- package/framework/commands/product/spec.md +79 -0
- package/framework/commands/product/task-check.md +378 -0
- package/framework/commands/product/task.md +603 -0
- package/framework/commands/product/validate-task.md +325 -0
- package/framework/commands/product/warm-up.md +24 -0
- package/framework/commands/quick/analisys.md +17 -0
- package/framework/commands/test/e2e.md +377 -0
- package/framework/commands/test/integration.md +508 -0
- package/framework/commands/test/unit.md +381 -0
- package/framework/commands/validate/collab/pair-testing.md +657 -0
- package/framework/commands/validate/collab/three-amigos.md +534 -0
- package/framework/commands/validate/qa-points/estimate.md +660 -0
- package/framework/commands/validate/test-strategy/analyze.md +1201 -0
- package/framework/commands/validate/test-strategy/create.md +411 -0
- package/framework/commands/validate/workflow.md +370 -0
- package/framework/commands/warm-up.md +20 -0
- package/framework/docs/architecture/acoplamento-clickup-problema-analise.md +468 -0
- package/framework/docs/architecture/desacoplamento-roadmap.md +364 -0
- package/framework/docs/architecture/validacao-fase-1.md +235 -0
- package/framework/docs/c4/c4-detection-rules.md +395 -0
- package/framework/docs/c4/c4-documentation-templates.md +579 -0
- package/framework/docs/c4/c4-mermaid-patterns.md +331 -0
- package/framework/docs/c4/c4-templates.md +256 -0
- package/framework/docs/clickup/clickup-acceptance-criteria-strategy.md +329 -0
- package/framework/docs/clickup/clickup-auto-update-strategy.md +340 -0
- package/framework/docs/clickup/clickup-comment-formatter.md +239 -0
- package/framework/docs/clickup/clickup-description-fix.md +384 -0
- package/framework/docs/clickup/clickup-dual-comment-strategy.md +528 -0
- package/framework/docs/clickup/clickup-formatting.md +302 -0
- package/framework/docs/clickup/separador-tamanho-otimizado.md +258 -0
- package/framework/docs/engineer/pre-pr-acceptance-validation.md +256 -0
- package/framework/docs/onion/ESPERANTO.md +293 -0
- package/framework/docs/onion/agents-reference.md +832 -0
- package/framework/docs/onion/clickup-integration.md +780 -0
- package/framework/docs/onion/commands-guide.md +924 -0
- package/framework/docs/onion/engineering-flows.md +900 -0
- package/framework/docs/onion/getting-started.md +803 -0
- package/framework/docs/onion/maintenance-checklist.md +421 -0
- package/framework/docs/onion/naming-conventions.md +286 -0
- package/framework/docs/onion/practical-examples.md +854 -0
- package/framework/docs/product/story-points-integration.md +269 -0
- package/framework/docs/product/story-points-validation.md +237 -0
- package/framework/docs/reviews/task-manager-docs-review-2025-11-24.md +184 -0
- package/framework/docs/strategies/clickup-comment-patterns.md +766 -0
- package/framework/docs/strategies/clickup-integration-tests.md +602 -0
- package/framework/docs/strategies/clickup-mcp-wrappers-tests.md +888 -0
- package/framework/docs/strategies/clickup-regression-tests.md +587 -0
- package/framework/docs/strategies/visual-patterns.md +315 -0
- package/framework/docs/templates/README.md +649 -0
- package/framework/docs/templates/adr-template.md +226 -0
- package/framework/docs/templates/analysis-template.md +280 -0
- package/framework/docs/templates/execution-plan-template.md +430 -0
- package/framework/docs/templates/guide-template.md +367 -0
- package/framework/docs/templates/phase-execution-prompt-template.md +504 -0
- package/framework/docs/templates/reference-template.md +522 -0
- package/framework/docs/templates/solution-template.md +390 -0
- package/framework/docs/tools/README.md +356 -0
- package/framework/docs/tools/agents.md +365 -0
- package/framework/docs/tools/commands.md +669 -0
- package/framework/docs/tools/cursor.md +539 -0
- package/framework/docs/tools/mcps.md +937 -0
- package/framework/docs/tools/rules.md +461 -0
- package/framework/rules/language-and-documentation.mdc +371 -0
- package/framework/rules/nestjs-controllers.md +83 -0
- package/framework/rules/nestjs-dtos.md +255 -0
- package/framework/rules/nestjs-modules.md +141 -0
- package/framework/rules/nestjs-services.md +230 -0
- package/framework/rules/nx-rules.mdc +41 -0
- package/framework/rules/onion-patterns.mdc +197 -0
- package/framework/skills/codebase-visualizer/SKILL.md +26 -0
- package/framework/skills/codebase-visualizer/scripts/visualize.py +131 -0
- package/framework/skills/collect/SKILL.md +84 -0
- package/framework/skills/create-rule/SKILL.md +152 -0
- package/framework/skills/db-schema-visualizer/SKILL.md +49 -0
- package/framework/skills/db-schema-visualizer/scripts/visualize.py +1191 -0
- package/framework/skills/sync-meetings/SKILL.md +239 -0
- package/framework/utils/clickup-mcp-wrappers.md +744 -0
- package/framework/utils/date-time-standards.md +200 -0
- package/framework/utils/task-manager/README.md +94 -0
- package/framework/utils/task-manager/adapters/asana.md +377 -0
- package/framework/utils/task-manager/adapters/clickup.md +467 -0
- package/framework/utils/task-manager/adapters/linear.md +421 -0
- package/framework/utils/task-manager/detector.md +299 -0
- package/framework/utils/task-manager/factory.md +363 -0
- package/framework/utils/task-manager/interface.md +248 -0
- package/framework/utils/task-manager/types.md +409 -0
- package/package.json +41 -0
- package/src/cli.js +73 -0
- package/src/commands/doctor.js +191 -0
- package/src/commands/init.js +287 -0
- package/src/commands/install.js +261 -0
- package/src/commands/list.js +152 -0
- package/src/commands/uninstall.js +90 -0
- package/src/commands/update.js +26 -0
- package/src/utils/fs.js +89 -0
- package/src/utils/log.js +35 -0
- package/src/utils/paths.js +32 -0
- package/src/utils/prompt.js +76 -0
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
# 📐 Interface ITaskManager
|
|
2
|
+
|
|
3
|
+
## 🎯 Propósito
|
|
4
|
+
|
|
5
|
+
Define o contrato que todos os adapters de gerenciadores de tarefas devem implementar, garantindo consistência e permitindo troca transparente de provedores.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 📋 Interface Completa
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
/**
|
|
13
|
+
* Interface abstrata para gerenciadores de tarefas.
|
|
14
|
+
* Todos os adapters (ClickUp, Asana, Linear) devem implementar esta interface.
|
|
15
|
+
*/
|
|
16
|
+
interface ITaskManager {
|
|
17
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
18
|
+
// IDENTIFICAÇÃO
|
|
19
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Nome do provedor: 'clickup' | 'asana' | 'linear' | 'none'
|
|
23
|
+
*/
|
|
24
|
+
readonly provider: TaskManagerProvider;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Indica se o provedor está configurado corretamente
|
|
28
|
+
*/
|
|
29
|
+
readonly isConfigured: boolean;
|
|
30
|
+
|
|
31
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
32
|
+
// CRUD DE TASKS
|
|
33
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Cria uma nova task no gerenciador.
|
|
37
|
+
* @param input - Dados da task a criar
|
|
38
|
+
* @returns Task criada com ID e URL
|
|
39
|
+
*/
|
|
40
|
+
createTask(input: CreateTaskInput): Promise<TaskOutput>;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Obtém detalhes de uma task existente.
|
|
44
|
+
* @param taskId - ID da task no provedor
|
|
45
|
+
* @returns Task completa com todos os detalhes
|
|
46
|
+
*/
|
|
47
|
+
getTask(taskId: string): Promise<TaskOutput>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Atualiza uma task existente.
|
|
51
|
+
* @param taskId - ID da task
|
|
52
|
+
* @param updates - Campos a atualizar (parcial)
|
|
53
|
+
* @returns Task atualizada
|
|
54
|
+
*/
|
|
55
|
+
updateTask(taskId: string, updates: UpdateTaskInput): Promise<TaskOutput>;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Remove uma task.
|
|
59
|
+
* @param taskId - ID da task
|
|
60
|
+
* @returns true se removida com sucesso
|
|
61
|
+
*/
|
|
62
|
+
deleteTask(taskId: string): Promise<boolean>;
|
|
63
|
+
|
|
64
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
65
|
+
// SUBTASKS
|
|
66
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Cria uma subtask vinculada a uma task pai.
|
|
70
|
+
* @param parentId - ID da task pai
|
|
71
|
+
* @param input - Dados da subtask
|
|
72
|
+
* @returns Subtask criada
|
|
73
|
+
*/
|
|
74
|
+
createSubtask(parentId: string, input: CreateTaskInput): Promise<TaskOutput>;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Lista todas as subtasks de uma task.
|
|
78
|
+
* @param parentId - ID da task pai
|
|
79
|
+
* @returns Array de subtasks
|
|
80
|
+
*/
|
|
81
|
+
getSubtasks(parentId: string): Promise<TaskOutput[]>;
|
|
82
|
+
|
|
83
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
84
|
+
// COMENTÁRIOS
|
|
85
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Adiciona um comentário a uma task.
|
|
89
|
+
* @param taskId - ID da task
|
|
90
|
+
* @param comment - Texto do comentário
|
|
91
|
+
* @returns Comentário criado
|
|
92
|
+
*/
|
|
93
|
+
addComment(taskId: string, comment: string): Promise<CommentOutput>;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Lista comentários de uma task.
|
|
97
|
+
* @param taskId - ID da task
|
|
98
|
+
* @returns Array de comentários
|
|
99
|
+
*/
|
|
100
|
+
getComments(taskId: string): Promise<CommentOutput[]>;
|
|
101
|
+
|
|
102
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
103
|
+
// STATUS
|
|
104
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Atualiza o status de uma task.
|
|
108
|
+
* @param taskId - ID da task
|
|
109
|
+
* @param status - Novo status (mapeado internamente pelo adapter)
|
|
110
|
+
* @returns Task atualizada
|
|
111
|
+
*/
|
|
112
|
+
updateStatus(taskId: string, status: TaskStatus): Promise<TaskOutput>;
|
|
113
|
+
|
|
114
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
115
|
+
// BUSCA
|
|
116
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Busca tasks com filtros.
|
|
120
|
+
* @param query - Critérios de busca
|
|
121
|
+
* @returns Array de tasks que correspondem aos critérios
|
|
122
|
+
*/
|
|
123
|
+
searchTasks(query: SearchQuery): Promise<TaskOutput[]>;
|
|
124
|
+
|
|
125
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
126
|
+
// PROJETOS/LISTAS
|
|
127
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Lista projetos/listas disponíveis.
|
|
131
|
+
* @returns Array de projetos
|
|
132
|
+
*/
|
|
133
|
+
getProjectList(): Promise<ProjectOutput[]>;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Obtém detalhes de um projeto.
|
|
137
|
+
* @param projectId - ID do projeto
|
|
138
|
+
* @returns Projeto com detalhes
|
|
139
|
+
*/
|
|
140
|
+
getProject(projectId: string): Promise<ProjectOutput>;
|
|
141
|
+
|
|
142
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
143
|
+
// VALIDAÇÃO
|
|
144
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Valida se um ID de task é válido para este provedor.
|
|
148
|
+
* @param taskId - ID a validar
|
|
149
|
+
* @returns true se o formato é válido
|
|
150
|
+
*/
|
|
151
|
+
validateTaskId(taskId: string): boolean;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Detecta o provedor de origem de um ID de task.
|
|
155
|
+
* @param taskId - ID da task
|
|
156
|
+
* @returns Nome do provedor ou null se desconhecido
|
|
157
|
+
*/
|
|
158
|
+
getProviderFromTaskId(taskId: string): TaskManagerProvider | null;
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## 📊 Métodos por Categoria
|
|
165
|
+
|
|
166
|
+
| Categoria | Métodos | Descrição |
|
|
167
|
+
|-----------|---------|-----------|
|
|
168
|
+
| **Identificação** | `provider`, `isConfigured` | Informações do adapter |
|
|
169
|
+
| **CRUD Tasks** | `createTask`, `getTask`, `updateTask`, `deleteTask` | Operações básicas |
|
|
170
|
+
| **Subtasks** | `createSubtask`, `getSubtasks` | Hierarquia de tasks |
|
|
171
|
+
| **Comentários** | `addComment`, `getComments` | Documentação e discussão |
|
|
172
|
+
| **Status** | `updateStatus` | Workflow |
|
|
173
|
+
| **Busca** | `searchTasks` | Localização de tasks |
|
|
174
|
+
| **Projetos** | `getProjectList`, `getProject` | Navegação |
|
|
175
|
+
| **Validação** | `validateTaskId`, `getProviderFromTaskId` | Compatibilidade |
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## 🔄 Mapeamento por Provedor
|
|
180
|
+
|
|
181
|
+
### Status
|
|
182
|
+
|
|
183
|
+
| Interface | ClickUp | Asana | Linear |
|
|
184
|
+
|-----------|---------|-------|--------|
|
|
185
|
+
| `backlog` | "backlog" | - | "backlog" |
|
|
186
|
+
| `todo` | "to do" | - | "todo" |
|
|
187
|
+
| `in_progress` | "in progress" | - | "in_progress" |
|
|
188
|
+
| `done` | "done" | completed: true | "done" |
|
|
189
|
+
| `closed` | "closed" | completed: true | "canceled" |
|
|
190
|
+
|
|
191
|
+
### Prioridade
|
|
192
|
+
|
|
193
|
+
| Interface | ClickUp | Asana | Linear |
|
|
194
|
+
|-----------|---------|-------|--------|
|
|
195
|
+
| `urgent` | 1 | - | 1 |
|
|
196
|
+
| `high` | 2 | - | 2 |
|
|
197
|
+
| `normal` | 3 | - | 3 |
|
|
198
|
+
| `low` | 4 | - | 4 |
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## 🧪 Exemplo de Uso
|
|
203
|
+
|
|
204
|
+
```typescript
|
|
205
|
+
// Obter adapter
|
|
206
|
+
const taskManager = getTaskManager();
|
|
207
|
+
|
|
208
|
+
// Verificar configuração
|
|
209
|
+
if (!taskManager.isConfigured) {
|
|
210
|
+
console.warn('⚠️ Provedor não configurado. Execute /meta/setup-integration');
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Criar task
|
|
215
|
+
const task = await taskManager.createTask({
|
|
216
|
+
name: 'Implementar feature X',
|
|
217
|
+
description: 'Descrição detalhada...',
|
|
218
|
+
priority: 'high',
|
|
219
|
+
tags: ['feature', 'v2']
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
console.log(`✅ Task criada: ${task.url}`);
|
|
223
|
+
|
|
224
|
+
// Criar subtask
|
|
225
|
+
const subtask = await taskManager.createSubtask(task.id, {
|
|
226
|
+
name: 'Fase 1: Setup'
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
// Adicionar comentário
|
|
230
|
+
await taskManager.addComment(task.id, '🚀 Desenvolvimento iniciado!');
|
|
231
|
+
|
|
232
|
+
// Atualizar status
|
|
233
|
+
await taskManager.updateStatus(subtask.id, 'in_progress');
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## 📚 Referências
|
|
239
|
+
|
|
240
|
+
- [Tipos Compartilhados](./types.md)
|
|
241
|
+
- [Factory](./factory.md)
|
|
242
|
+
- [Adapters](./adapters/)
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
**Versão**: 1.0.0
|
|
247
|
+
**Criado em**: 2025-11-24
|
|
248
|
+
|
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
# 📦 Tipos Compartilhados - Task Manager
|
|
2
|
+
|
|
3
|
+
## 🎯 Propósito
|
|
4
|
+
|
|
5
|
+
Define os tipos TypeScript compartilhados entre todos os adapters, garantindo consistência nas operações de entrada e saída.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 🔧 Enums e Constantes
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
/**
|
|
13
|
+
* Provedores de gerenciamento de tarefas suportados.
|
|
14
|
+
*/
|
|
15
|
+
type TaskManagerProvider = 'clickup' | 'asana' | 'linear' | 'none';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Status genéricos (mapeados internamente por cada adapter).
|
|
19
|
+
*/
|
|
20
|
+
type TaskStatus =
|
|
21
|
+
| 'backlog'
|
|
22
|
+
| 'todo'
|
|
23
|
+
| 'in_progress'
|
|
24
|
+
| 'review'
|
|
25
|
+
| 'done'
|
|
26
|
+
| 'closed'
|
|
27
|
+
| 'canceled';
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Níveis de prioridade.
|
|
31
|
+
*/
|
|
32
|
+
type TaskPriority = 'urgent' | 'high' | 'normal' | 'low';
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 📥 Tipos de Entrada (Input)
|
|
38
|
+
|
|
39
|
+
### CreateTaskInput
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
/**
|
|
43
|
+
* Dados para criação de uma nova task.
|
|
44
|
+
*/
|
|
45
|
+
interface CreateTaskInput {
|
|
46
|
+
/** Nome/título da task (obrigatório) */
|
|
47
|
+
name: string;
|
|
48
|
+
|
|
49
|
+
/** Descrição em texto plano */
|
|
50
|
+
description?: string;
|
|
51
|
+
|
|
52
|
+
/** Descrição em Markdown */
|
|
53
|
+
markdownDescription?: string;
|
|
54
|
+
|
|
55
|
+
/** ID do projeto/lista onde criar */
|
|
56
|
+
projectId?: string;
|
|
57
|
+
|
|
58
|
+
/** Prioridade da task */
|
|
59
|
+
priority?: TaskPriority;
|
|
60
|
+
|
|
61
|
+
/** Data de vencimento (ISO 8601: YYYY-MM-DD) */
|
|
62
|
+
dueDate?: string;
|
|
63
|
+
|
|
64
|
+
/** Data de início (ISO 8601: YYYY-MM-DD) */
|
|
65
|
+
startDate?: string;
|
|
66
|
+
|
|
67
|
+
/** IDs de usuários assignees */
|
|
68
|
+
assignees?: string[];
|
|
69
|
+
|
|
70
|
+
/** Tags/labels */
|
|
71
|
+
tags?: string[];
|
|
72
|
+
|
|
73
|
+
/** Estimativa de tempo (minutos) */
|
|
74
|
+
timeEstimate?: number;
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### UpdateTaskInput
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
/**
|
|
82
|
+
* Dados para atualização de task (todos opcionais).
|
|
83
|
+
*/
|
|
84
|
+
interface UpdateTaskInput {
|
|
85
|
+
/** Novo nome */
|
|
86
|
+
name?: string;
|
|
87
|
+
|
|
88
|
+
/** Nova descrição */
|
|
89
|
+
description?: string;
|
|
90
|
+
|
|
91
|
+
/** Nova descrição markdown */
|
|
92
|
+
markdownDescription?: string;
|
|
93
|
+
|
|
94
|
+
/** Novo status */
|
|
95
|
+
status?: TaskStatus;
|
|
96
|
+
|
|
97
|
+
/** Nova prioridade */
|
|
98
|
+
priority?: TaskPriority;
|
|
99
|
+
|
|
100
|
+
/** Nova data de vencimento */
|
|
101
|
+
dueDate?: string | null;
|
|
102
|
+
|
|
103
|
+
/** Nova data de início */
|
|
104
|
+
startDate?: string | null;
|
|
105
|
+
|
|
106
|
+
/** Novos assignees (substitui existentes) */
|
|
107
|
+
assignees?: string[];
|
|
108
|
+
|
|
109
|
+
/** Novas tags (substitui existentes) */
|
|
110
|
+
tags?: string[];
|
|
111
|
+
|
|
112
|
+
/** Nova estimativa */
|
|
113
|
+
timeEstimate?: number;
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### SearchQuery
|
|
118
|
+
|
|
119
|
+
```typescript
|
|
120
|
+
/**
|
|
121
|
+
* Critérios de busca de tasks.
|
|
122
|
+
*/
|
|
123
|
+
interface SearchQuery {
|
|
124
|
+
/** Texto para buscar no nome/descrição */
|
|
125
|
+
text?: string;
|
|
126
|
+
|
|
127
|
+
/** Filtrar por projeto */
|
|
128
|
+
projectId?: string;
|
|
129
|
+
|
|
130
|
+
/** Filtrar por status (múltiplos) */
|
|
131
|
+
status?: TaskStatus[];
|
|
132
|
+
|
|
133
|
+
/** Filtrar por assignee */
|
|
134
|
+
assignee?: string;
|
|
135
|
+
|
|
136
|
+
/** Filtrar por tags */
|
|
137
|
+
tags?: string[];
|
|
138
|
+
|
|
139
|
+
/** Filtrar por prioridade */
|
|
140
|
+
priority?: TaskPriority[];
|
|
141
|
+
|
|
142
|
+
/** Limite de resultados */
|
|
143
|
+
limit?: number;
|
|
144
|
+
|
|
145
|
+
/** Offset para paginação */
|
|
146
|
+
offset?: number;
|
|
147
|
+
|
|
148
|
+
/** Ordenação */
|
|
149
|
+
orderBy?: 'created' | 'updated' | 'due_date' | 'priority';
|
|
150
|
+
|
|
151
|
+
/** Direção da ordenação */
|
|
152
|
+
orderDirection?: 'asc' | 'desc';
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## 📤 Tipos de Saída (Output)
|
|
159
|
+
|
|
160
|
+
### TaskOutput
|
|
161
|
+
|
|
162
|
+
```typescript
|
|
163
|
+
/**
|
|
164
|
+
* Task retornada pelo adapter (normalizada).
|
|
165
|
+
*/
|
|
166
|
+
interface TaskOutput {
|
|
167
|
+
/** ID único no provedor */
|
|
168
|
+
id: string;
|
|
169
|
+
|
|
170
|
+
/** Provedor de origem */
|
|
171
|
+
provider: TaskManagerProvider;
|
|
172
|
+
|
|
173
|
+
/** Nome/título */
|
|
174
|
+
name: string;
|
|
175
|
+
|
|
176
|
+
/** Descrição (texto plano) */
|
|
177
|
+
description: string;
|
|
178
|
+
|
|
179
|
+
/** Status normalizado */
|
|
180
|
+
status: TaskStatus;
|
|
181
|
+
|
|
182
|
+
/** Status original do provedor */
|
|
183
|
+
statusRaw?: string;
|
|
184
|
+
|
|
185
|
+
/** Cor do status (hex) */
|
|
186
|
+
statusColor?: string;
|
|
187
|
+
|
|
188
|
+
/** Prioridade */
|
|
189
|
+
priority?: TaskPriority;
|
|
190
|
+
|
|
191
|
+
/** URL para abrir no provedor */
|
|
192
|
+
url: string;
|
|
193
|
+
|
|
194
|
+
/** Data de criação (ISO 8601) */
|
|
195
|
+
createdAt: string;
|
|
196
|
+
|
|
197
|
+
/** Data de última atualização (ISO 8601) */
|
|
198
|
+
updatedAt: string;
|
|
199
|
+
|
|
200
|
+
/** Data de vencimento (ISO 8601) */
|
|
201
|
+
dueDate?: string;
|
|
202
|
+
|
|
203
|
+
/** Data de início (ISO 8601) */
|
|
204
|
+
startDate?: string;
|
|
205
|
+
|
|
206
|
+
/** Usuários assignees */
|
|
207
|
+
assignees: UserOutput[];
|
|
208
|
+
|
|
209
|
+
/** Tags/labels */
|
|
210
|
+
tags: string[];
|
|
211
|
+
|
|
212
|
+
/** Subtasks (se solicitadas) */
|
|
213
|
+
subtasks?: TaskOutput[];
|
|
214
|
+
|
|
215
|
+
/** ID da task pai (se for subtask) */
|
|
216
|
+
parent?: string;
|
|
217
|
+
|
|
218
|
+
/** ID do projeto/lista */
|
|
219
|
+
projectId?: string;
|
|
220
|
+
|
|
221
|
+
/** Nome do projeto/lista */
|
|
222
|
+
projectName?: string;
|
|
223
|
+
|
|
224
|
+
/** Tempo estimado (minutos) */
|
|
225
|
+
timeEstimate?: number;
|
|
226
|
+
|
|
227
|
+
/** Tempo gasto (minutos) */
|
|
228
|
+
timeSpent?: number;
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### CommentOutput
|
|
233
|
+
|
|
234
|
+
```typescript
|
|
235
|
+
/**
|
|
236
|
+
* Comentário retornado pelo adapter.
|
|
237
|
+
*/
|
|
238
|
+
interface CommentOutput {
|
|
239
|
+
/** ID único do comentário */
|
|
240
|
+
id: string;
|
|
241
|
+
|
|
242
|
+
/** Texto do comentário */
|
|
243
|
+
text: string;
|
|
244
|
+
|
|
245
|
+
/** Autor do comentário */
|
|
246
|
+
author: UserOutput;
|
|
247
|
+
|
|
248
|
+
/** Data de criação (ISO 8601) */
|
|
249
|
+
createdAt: string;
|
|
250
|
+
|
|
251
|
+
/** Se foi resolvido (threads) */
|
|
252
|
+
resolved?: boolean;
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### UserOutput
|
|
257
|
+
|
|
258
|
+
```typescript
|
|
259
|
+
/**
|
|
260
|
+
* Usuário normalizado.
|
|
261
|
+
*/
|
|
262
|
+
interface UserOutput {
|
|
263
|
+
/** ID único no provedor */
|
|
264
|
+
id: string;
|
|
265
|
+
|
|
266
|
+
/** Nome de exibição */
|
|
267
|
+
name: string;
|
|
268
|
+
|
|
269
|
+
/** Email (se disponível) */
|
|
270
|
+
email?: string;
|
|
271
|
+
|
|
272
|
+
/** URL do avatar */
|
|
273
|
+
avatarUrl?: string;
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### ProjectOutput
|
|
278
|
+
|
|
279
|
+
```typescript
|
|
280
|
+
/**
|
|
281
|
+
* Projeto/Lista normalizado.
|
|
282
|
+
*/
|
|
283
|
+
interface ProjectOutput {
|
|
284
|
+
/** ID único */
|
|
285
|
+
id: string;
|
|
286
|
+
|
|
287
|
+
/** Nome do projeto */
|
|
288
|
+
name: string;
|
|
289
|
+
|
|
290
|
+
/** URL no provedor */
|
|
291
|
+
url?: string;
|
|
292
|
+
|
|
293
|
+
/** Descrição */
|
|
294
|
+
description?: string;
|
|
295
|
+
|
|
296
|
+
/** Se está arquivado */
|
|
297
|
+
archived?: boolean;
|
|
298
|
+
|
|
299
|
+
/** ID do workspace/space pai */
|
|
300
|
+
workspaceId?: string;
|
|
301
|
+
}
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## ⚙️ Tipos de Configuração
|
|
307
|
+
|
|
308
|
+
### ProviderConfig
|
|
309
|
+
|
|
310
|
+
```typescript
|
|
311
|
+
/**
|
|
312
|
+
* Configuração de um provedor.
|
|
313
|
+
*/
|
|
314
|
+
interface ProviderConfig {
|
|
315
|
+
/** Nome do provedor */
|
|
316
|
+
provider: TaskManagerProvider;
|
|
317
|
+
|
|
318
|
+
/** Se está configurado corretamente */
|
|
319
|
+
isConfigured: boolean;
|
|
320
|
+
|
|
321
|
+
/** Variáveis de ambiente obrigatórias */
|
|
322
|
+
requiredEnvVars: string[];
|
|
323
|
+
|
|
324
|
+
/** Variáveis de ambiente opcionais */
|
|
325
|
+
optionalEnvVars: string[];
|
|
326
|
+
|
|
327
|
+
/** Mensagem de erro se não configurado */
|
|
328
|
+
errorMessage?: string;
|
|
329
|
+
}
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### ValidationResult
|
|
333
|
+
|
|
334
|
+
```typescript
|
|
335
|
+
/**
|
|
336
|
+
* Resultado de validação de ID.
|
|
337
|
+
*/
|
|
338
|
+
interface ValidationResult {
|
|
339
|
+
/** Se o ID é válido */
|
|
340
|
+
valid: boolean;
|
|
341
|
+
|
|
342
|
+
/** Mensagem de aviso (se houver) */
|
|
343
|
+
warning?: string;
|
|
344
|
+
|
|
345
|
+
/** Provedor detectado */
|
|
346
|
+
detectedProvider?: TaskManagerProvider;
|
|
347
|
+
}
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
---
|
|
351
|
+
|
|
352
|
+
## 🔄 Mapeamento de Status por Provedor
|
|
353
|
+
|
|
354
|
+
```typescript
|
|
355
|
+
/**
|
|
356
|
+
* Mapeamento de status normalizado → provedor.
|
|
357
|
+
*/
|
|
358
|
+
const STATUS_MAPPING: Record<TaskManagerProvider, Record<TaskStatus, string>> = {
|
|
359
|
+
clickup: {
|
|
360
|
+
backlog: 'backlog',
|
|
361
|
+
todo: 'to do',
|
|
362
|
+
in_progress: 'in progress',
|
|
363
|
+
review: 'review',
|
|
364
|
+
done: 'done',
|
|
365
|
+
closed: 'closed',
|
|
366
|
+
canceled: 'closed'
|
|
367
|
+
},
|
|
368
|
+
asana: {
|
|
369
|
+
backlog: 'To Do', // Mapeado para seção
|
|
370
|
+
todo: 'To Do',
|
|
371
|
+
in_progress: 'In Progress',
|
|
372
|
+
review: 'Review',
|
|
373
|
+
done: 'Done', // completed: true
|
|
374
|
+
closed: 'Done',
|
|
375
|
+
canceled: 'Done'
|
|
376
|
+
},
|
|
377
|
+
linear: {
|
|
378
|
+
backlog: 'Backlog',
|
|
379
|
+
todo: 'Todo',
|
|
380
|
+
in_progress: 'In Progress',
|
|
381
|
+
review: 'In Review',
|
|
382
|
+
done: 'Done',
|
|
383
|
+
closed: 'Canceled',
|
|
384
|
+
canceled: 'Canceled'
|
|
385
|
+
},
|
|
386
|
+
none: {
|
|
387
|
+
backlog: 'backlog',
|
|
388
|
+
todo: 'todo',
|
|
389
|
+
in_progress: 'in_progress',
|
|
390
|
+
review: 'review',
|
|
391
|
+
done: 'done',
|
|
392
|
+
closed: 'closed',
|
|
393
|
+
canceled: 'canceled'
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
---
|
|
399
|
+
|
|
400
|
+
## 📚 Referências
|
|
401
|
+
|
|
402
|
+
- [Interface ITaskManager](./interface.md)
|
|
403
|
+
- [Detector de Provedor](./detector.md)
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
**Versão**: 1.0.0
|
|
408
|
+
**Criado em**: 2025-11-24
|
|
409
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@onion-ai/cli",
|
|
3
|
+
"version": "1.0.0-beta.1",
|
|
4
|
+
"description": "The Onion Framework - AI-powered development workflow system for Claude Code",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"onion": "./bin/onion.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/",
|
|
11
|
+
"src/",
|
|
12
|
+
"framework/",
|
|
13
|
+
"LICENSE",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"sync": "node scripts/sync-framework.js",
|
|
18
|
+
"prepublishOnly": "npm run sync"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"claude-code",
|
|
22
|
+
"ai-framework",
|
|
23
|
+
"development-workflow",
|
|
24
|
+
"onion-framework",
|
|
25
|
+
"agents",
|
|
26
|
+
"commands",
|
|
27
|
+
"skills"
|
|
28
|
+
],
|
|
29
|
+
"author": "David <david@onion.ai>",
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=18.0.0"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"commander": "^12.1.0"
|
|
36
|
+
},
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "https://github.com/onion-ai/cli.git"
|
|
40
|
+
}
|
|
41
|
+
}
|