@onion-architect-ai/cli 4.1.0-beta.1 → 4.1.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +8 -19
- package/dist/cli.js.map +1 -1
- package/package.json +4 -3
- package/templates/.cursor/agents/compliance/iso-22301-specialist.md +917 -0
- package/templates/.cursor/agents/compliance/iso-27001-specialist.md +641 -0
- package/templates/.cursor/agents/compliance/pmbok-specialist.md +669 -0
- package/templates/.cursor/agents/compliance/security-information-master.md +824 -0
- package/templates/.cursor/agents/compliance/soc2-specialist.md +818 -0
- package/templates/.cursor/agents/deployment/docker-specialist.md +1192 -0
- package/templates/.cursor/agents/meta/agent-creator-specialist.md +1135 -0
- package/templates/.cursor/agents/meta/command-creator-specialist.md +1519 -0
- package/templates/.cursor/agents/meta/metaspec-gate-keeper.md +240 -0
- package/templates/.cursor/agents/meta/onion.md +753 -0
- package/templates/.cursor/agents/research/research-agent.md +292 -0
- package/templates/.cursor/agents/review/corporate-compliance-specialist.md +370 -0
- package/templates/.cursor/commands/common/prompts/README.md +187 -0
- package/templates/.cursor/commands/common/prompts/clickup-patterns.md +144 -0
- package/templates/.cursor/commands/common/prompts/code-review-checklist.md +168 -0
- package/templates/.cursor/commands/common/prompts/git-workflow-patterns.md +235 -0
- package/templates/.cursor/commands/common/prompts/output-formats.md +240 -0
- package/templates/.cursor/commands/common/prompts/technical.md +172 -0
- package/templates/.cursor/commands/common/prompts/validation-rules.md +173 -0
- package/templates/.cursor/commands/common/templates/abstraction-template.md +400 -0
- package/templates/.cursor/commands/common/templates/agent-template.md +353 -0
- package/templates/.cursor/commands/common/templates/business_context_template.md +748 -0
- package/templates/.cursor/commands/common/templates/command-template.md +273 -0
- package/templates/.cursor/commands/common/templates/technical_context_template.md +526 -0
- package/templates/.cursor/commands/development/runflow-dev.md +465 -0
- package/templates/.cursor/commands/docs/build-compliance-docs.md +143 -0
- package/templates/.cursor/commands/git/README.md +606 -0
- package/templates/.cursor/commands/meta/all-tools.md +50 -0
- package/templates/.cursor/commands/meta/analyze-complex-problem.md +186 -0
- package/templates/.cursor/commands/meta/create-abstraction.md +859 -0
- package/templates/.cursor/commands/meta/create-agent-express.md +83 -0
- package/templates/.cursor/commands/meta/create-agent.md +210 -0
- package/templates/.cursor/commands/meta/create-command.md +203 -0
- package/templates/.cursor/commands/meta/create-knowledge-base.md +143 -0
- package/templates/.cursor/commands/meta/create-task-structure.md +150 -0
- package/templates/.cursor/commands/meta/setup-integration.md +257 -0
- package/templates/.cursor/commands/onion/setup.md +843 -0
- package/templates/.cursor/commands/onion.md +168 -0
- package/templates/.cursor/commands/product/README.md +230 -0
- package/templates/.cursor/commands/quick/analisys.md +17 -0
- package/templates/.cursor/commands/validate/collab/pair-testing.md +633 -0
- package/templates/.cursor/commands/validate/collab/three-amigos.md +505 -0
- package/templates/.cursor/commands/validate/qa-points/estimate.md +660 -0
- package/templates/.cursor/commands/validate/test-strategy/analyze.md +1134 -0
- package/templates/.cursor/commands/validate/test-strategy/create.md +392 -0
- package/templates/.cursor/commands/validate/workflow.md +360 -0
- package/templates/.cursor/commands/warm-up.md +91 -0
- package/templates/.cursor/docs/architecture/acoplamento-clickup-problema-analise.md +446 -0
- package/templates/.cursor/docs/architecture/desacoplamento-roadmap.md +360 -0
- package/templates/.cursor/docs/architecture/validacao-fase-1.md +219 -0
- package/templates/.cursor/docs/c4/c4-detection-rules.md +395 -0
- package/templates/.cursor/docs/c4/c4-documentation-templates.md +579 -0
- package/templates/.cursor/docs/c4/c4-mermaid-patterns.md +331 -0
- package/templates/.cursor/docs/c4/c4-templates.md +256 -0
- package/templates/.cursor/docs/clickup/clickup-acceptance-criteria-strategy.md +329 -0
- package/templates/.cursor/docs/clickup/clickup-auto-update-strategy.md +318 -0
- package/templates/.cursor/docs/clickup/clickup-comment-formatter.md +239 -0
- package/templates/.cursor/docs/clickup/clickup-description-fix.md +355 -0
- package/templates/.cursor/docs/clickup/clickup-dual-comment-strategy.md +505 -0
- package/templates/.cursor/docs/clickup/clickup-formatting.md +302 -0
- package/templates/.cursor/docs/clickup/separador-tamanho-otimizado.md +256 -0
- package/templates/.cursor/docs/engineer/pre-pr-acceptance-validation.md +256 -0
- package/templates/.cursor/docs/onion/ESPERANTO.md +278 -0
- package/templates/.cursor/docs/onion/agents-reference.md +832 -0
- package/templates/.cursor/docs/onion/clickup-integration.md +738 -0
- package/templates/.cursor/docs/onion/commands-guide.md +807 -0
- package/templates/.cursor/docs/onion/engineering-flows.md +865 -0
- package/templates/.cursor/docs/onion/getting-started.md +741 -0
- package/templates/.cursor/docs/onion/maintenance-checklist.md +388 -0
- package/templates/.cursor/docs/onion/naming-conventions.md +268 -0
- package/templates/.cursor/docs/onion/practical-examples.md +782 -0
- package/templates/.cursor/docs/product/story-points-integration.md +254 -0
- package/templates/.cursor/docs/product/story-points-validation.md +224 -0
- package/templates/.cursor/docs/reviews/task-manager-docs-review-2025-11-24.md +167 -0
- package/templates/.cursor/docs/strategies/clickup-comment-patterns.md +766 -0
- package/templates/.cursor/docs/strategies/clickup-integration-tests.md +599 -0
- package/templates/.cursor/docs/strategies/clickup-mcp-wrappers-tests.md +854 -0
- package/templates/.cursor/docs/strategies/clickup-regression-tests.md +589 -0
- package/templates/.cursor/docs/strategies/visual-patterns.md +308 -0
- package/templates/.cursor/docs/templates/README.md +624 -0
- package/templates/.cursor/docs/templates/adr-template.md +226 -0
- package/templates/.cursor/docs/templates/analysis-template.md +280 -0
- package/templates/.cursor/docs/templates/execution-plan-template.md +430 -0
- package/templates/.cursor/docs/templates/guide-template.md +367 -0
- package/templates/.cursor/docs/templates/phase-execution-prompt-template.md +504 -0
- package/templates/.cursor/docs/templates/reference-template.md +522 -0
- package/templates/.cursor/docs/templates/solution-template.md +390 -0
- package/templates/.cursor/docs/tools/README.md +325 -0
- package/templates/.cursor/docs/tools/agents.md +330 -0
- package/templates/.cursor/docs/tools/commands.md +606 -0
- package/templates/.cursor/docs/tools/cursor.md +498 -0
- package/templates/.cursor/docs/tools/mcps.md +858 -0
- package/templates/.cursor/docs/tools/rules.md +423 -0
- package/templates/.cursor/rules/language-and-documentation.mdc +371 -0
- package/templates/.cursor/rules/onion-patterns.mdc +197 -0
- package/templates/.cursor/rules/validation-rules.mdc +194 -0
- package/templates/.cursor/utils/clickup-mcp-wrappers.md +671 -0
- package/templates/.cursor/utils/date-time-standards.md +182 -0
- package/templates/.cursor/utils/task-manager/README.md +94 -0
- package/templates/.cursor/utils/task-manager/adapters/asana.md +377 -0
- package/templates/.cursor/utils/task-manager/adapters/clickup.md +467 -0
- package/templates/.cursor/utils/task-manager/adapters/linear.md +421 -0
- package/templates/.cursor/utils/task-manager/detector.md +290 -0
- package/templates/.cursor/utils/task-manager/factory.md +363 -0
- package/templates/.cursor/utils/task-manager/interface.md +248 -0
- package/templates/.cursor/utils/task-manager/types.md +409 -0
- package/templates/.cursor/validation/product-task-validation.md +344 -0
- package/templates/.onion/contexts/business/.context-config.yml +52 -0
- package/templates/.onion/contexts/business/README.md +222 -0
- package/templates/.onion/contexts/business/agents/branding-specialist.md +1030 -0
- package/templates/.onion/contexts/business/agents/clickup-specialist.md +397 -0
- package/templates/.onion/contexts/business/agents/extract-meeting-specialist.md +395 -0
- package/templates/.onion/contexts/business/agents/gamma-specialist.md +1169 -0
- package/templates/.onion/contexts/business/agents/meeting-consolidator.md +483 -0
- package/templates/.onion/contexts/business/agents/pain-price-specialist.md +509 -0
- package/templates/.onion/contexts/business/agents/presentation-orchestrator.md +1191 -0
- package/templates/.onion/contexts/business/agents/product-agent.md +202 -0
- package/templates/.onion/contexts/business/agents/story-points-specialist.md +539 -0
- package/templates/.onion/contexts/business/agents/storytelling-specialist.md +891 -0
- package/templates/.onion/contexts/business/agents/task-specialist.md +618 -0
- package/templates/.onion/contexts/business/agents/whisper-specialist.md +373 -0
- package/templates/.onion/contexts/business/commands/advanced/analyze-pain-price.md +709 -0
- package/templates/.onion/contexts/business/commands/advanced/branding.md +460 -0
- package/templates/.onion/contexts/business/commands/advanced/checklist-sync.md +241 -0
- package/templates/.onion/contexts/business/commands/advanced/presentation.md +189 -0
- package/templates/.onion/contexts/business/commands/advanced/transform-consolidated.md +592 -0
- package/templates/.onion/contexts/business/commands/help.md +212 -0
- package/templates/.onion/contexts/business/commands/intermediate/check.md +48 -0
- package/templates/.onion/contexts/business/commands/intermediate/collect.md +96 -0
- package/templates/.onion/contexts/business/commands/intermediate/consolidate-meetings.md +306 -0
- package/templates/.onion/contexts/business/commands/intermediate/convert-to-tasks.md +220 -0
- package/templates/.onion/contexts/business/commands/intermediate/extract-meeting.md +241 -0
- package/templates/.onion/contexts/business/commands/intermediate/feature.md +431 -0
- package/templates/.onion/contexts/business/commands/intermediate/light-arch.md +97 -0
- package/templates/.onion/contexts/business/commands/intermediate/task-check.md +340 -0
- package/templates/.onion/contexts/business/commands/intermediate/validate-task.md +294 -0
- package/templates/.onion/contexts/business/commands/intermediate/whisper.md +325 -0
- package/templates/.onion/contexts/business/commands/starter/estimate.md +519 -0
- package/templates/.onion/contexts/business/commands/starter/refine.md +186 -0
- package/templates/.onion/contexts/business/commands/starter/spec.md +107 -0
- package/templates/.onion/contexts/business/commands/starter/task.md +585 -0
- package/templates/.onion/contexts/business/commands/starter/warm-up.md +187 -0
- package/templates/.onion/contexts/technical/.context-config.yml +64 -0
- package/templates/.onion/contexts/technical/README.md +238 -0
- package/templates/.onion/contexts/technical/agents/branch-code-reviewer.md +200 -0
- package/templates/.onion/contexts/technical/agents/branch-doc-writer.md +162 -0
- package/templates/.onion/contexts/technical/agents/branch-metaspec-checker.md +68 -0
- package/templates/.onion/contexts/technical/agents/branch-test-planner.md +177 -0
- package/templates/.onion/contexts/technical/agents/c4-architecture-specialist.md +712 -0
- package/templates/.onion/contexts/technical/agents/c4-documentation-specialist.md +658 -0
- package/templates/.onion/contexts/technical/agents/code-reviewer.md +155 -0
- package/templates/.onion/contexts/technical/agents/cursor-specialist.md +249 -0
- package/templates/.onion/contexts/technical/agents/docs-reverse-engineer.md +418 -0
- package/templates/.onion/contexts/technical/agents/gitflow-specialist.md +1207 -0
- package/templates/.onion/contexts/technical/agents/linux-security-specialist.md +676 -0
- package/templates/.onion/contexts/technical/agents/mermaid-specialist.md +516 -0
- package/templates/.onion/contexts/technical/agents/nodejs-specialist.md +673 -0
- package/templates/.onion/contexts/technical/agents/nx-migration-specialist.md +867 -0
- package/templates/.onion/contexts/technical/agents/nx-monorepo-specialist.md +619 -0
- package/templates/.onion/contexts/technical/agents/postgres-specialist.md +1124 -0
- package/templates/.onion/contexts/technical/agents/react-developer.md +132 -0
- package/templates/.onion/contexts/technical/agents/runflow-specialist.md +278 -0
- package/templates/.onion/contexts/technical/agents/system-doc-orchestrator.md +1388 -0
- package/templates/.onion/contexts/technical/agents/test-agent.md +425 -0
- package/templates/.onion/contexts/technical/agents/test-engineer.md +295 -0
- package/templates/.onion/contexts/technical/agents/test-planner.md +118 -0
- package/templates/.onion/contexts/technical/agents/zen-engine-specialist.md +421 -0
- package/templates/.onion/contexts/technical/commands/advanced/bump.md +43 -0
- package/templates/.onion/contexts/technical/commands/advanced/consolidate-documents.md +424 -0
- package/templates/.onion/contexts/technical/commands/advanced/e2e.md +392 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-finish.md +90 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-publish.md +91 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-start.md +158 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix-finish.md +98 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix-start.md +94 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix.md +186 -0
- package/templates/.onion/contexts/technical/commands/advanced/refine-vision.md +27 -0
- package/templates/.onion/contexts/technical/commands/advanced/release-finish.md +98 -0
- package/templates/.onion/contexts/technical/commands/advanced/release-start.md +95 -0
- package/templates/.onion/contexts/technical/commands/advanced/reverse-consolidate.md +160 -0
- package/templates/.onion/contexts/technical/commands/advanced/validate-phase-sync.md +118 -0
- package/templates/.onion/contexts/technical/commands/help.md +329 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-business-docs.md +276 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-index.md +128 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-tech-docs.md +204 -0
- package/templates/.onion/contexts/technical/commands/intermediate/code-review.md +215 -0
- package/templates/.onion/contexts/technical/commands/intermediate/docs-health.md +142 -0
- package/templates/.onion/contexts/technical/commands/intermediate/fast-commit.md +45 -0
- package/templates/.onion/contexts/technical/commands/intermediate/integration.md +523 -0
- package/templates/.onion/contexts/technical/commands/intermediate/pr-update.md +198 -0
- package/templates/.onion/contexts/technical/commands/intermediate/pre-pr.md +91 -0
- package/templates/.onion/contexts/technical/commands/intermediate/start.md +266 -0
- package/templates/.onion/contexts/technical/commands/intermediate/sync-sessions.md +320 -0
- package/templates/.onion/contexts/technical/commands/intermediate/unit.md +378 -0
- package/templates/.onion/contexts/technical/commands/intermediate/validate-docs.md +159 -0
- package/templates/.onion/contexts/technical/commands/starter/docs.md +39 -0
- package/templates/.onion/contexts/technical/commands/starter/help.md +306 -0
- package/templates/.onion/contexts/technical/commands/starter/init.md +139 -0
- package/templates/.onion/contexts/technical/commands/starter/plan.md +111 -0
- package/templates/.onion/contexts/technical/commands/starter/pr.md +136 -0
- package/templates/.onion/contexts/technical/commands/starter/sync.md +228 -0
- package/templates/.onion/contexts/technical/commands/starter/warm-up.md +173 -0
- package/templates/.onion/contexts/technical/commands/starter/work.md +169 -0
- package/templates/.onion/core/commands/help.md +388 -0
|
@@ -0,0 +1,843 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup
|
|
3
|
+
description: |
|
|
4
|
+
Wizard inteligente de configuração e validação do Onion v4.
|
|
5
|
+
Use após onion init para configurar, validar e ativar automaticamente.
|
|
6
|
+
model: sonnet
|
|
7
|
+
|
|
8
|
+
parameters:
|
|
9
|
+
- name: mode
|
|
10
|
+
description: Modo de operação (wizard|validate|reconfigure|force)
|
|
11
|
+
required: false
|
|
12
|
+
default: wizard
|
|
13
|
+
|
|
14
|
+
category: onion
|
|
15
|
+
tags:
|
|
16
|
+
- setup
|
|
17
|
+
- configuration
|
|
18
|
+
- validation
|
|
19
|
+
- wizard
|
|
20
|
+
- intelligent
|
|
21
|
+
|
|
22
|
+
version: "4.0.0"
|
|
23
|
+
updated: "2026-01-01"
|
|
24
|
+
|
|
25
|
+
related_commands:
|
|
26
|
+
- /onion/init
|
|
27
|
+
- /onion/validate
|
|
28
|
+
- /engineer/warm-up
|
|
29
|
+
|
|
30
|
+
related_agents:
|
|
31
|
+
- onion
|
|
32
|
+
- cursor-specialist
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
# 🧅 Setup do Onion - Wizard Inteligente
|
|
36
|
+
|
|
37
|
+
Wizard de configuração pós-inicialização com detecção automática, sugestões inteligentes e ativação completa.
|
|
38
|
+
|
|
39
|
+
## 🎯 Objetivo
|
|
40
|
+
|
|
41
|
+
Guiar o usuário através de configuração, validação e ativação completa do Onion v4, **sem depender de conhecimento prévio**, detectando automaticamente ambiente, projeto e sugerindo configurações apropriadas.
|
|
42
|
+
|
|
43
|
+
## 📚 Contexto Necessário
|
|
44
|
+
|
|
45
|
+
**SEMPRE carregar antes de começar:**
|
|
46
|
+
|
|
47
|
+
### Documentação Onion
|
|
48
|
+
- `docs/onion/getting-started.md` - Guia inicial
|
|
49
|
+
- `docs/onion/commands-guide.md` - Referência de comandos
|
|
50
|
+
- `docs/onion/agents-reference.md` - Referência de agentes
|
|
51
|
+
- `docs/onion/ide-integration-complete.md` - Integração IDEs
|
|
52
|
+
|
|
53
|
+
### Knowledge Bases Relevantes
|
|
54
|
+
- `docs/knowbase/concepts/ai-agent-design-patterns.md`
|
|
55
|
+
- `docs/knowbase/concepts/context-window-optimization.md`
|
|
56
|
+
- `docs/knowbase/concepts/configuration-management.md`
|
|
57
|
+
- `docs/knowbase/frameworks/onion-multi-context-orchestrator-vision.md`
|
|
58
|
+
- `docs/knowbase/frameworks/onion-ide-integration-strategy.md`
|
|
59
|
+
|
|
60
|
+
**IMPORTANTE:** Ler estes arquivos ANTES de executar qualquer passo do wizard.
|
|
61
|
+
|
|
62
|
+
## ⚡ Fluxo de Execução
|
|
63
|
+
|
|
64
|
+
### Modo de Operação
|
|
65
|
+
|
|
66
|
+
Determinar modo baseado em `{{mode}}`:
|
|
67
|
+
|
|
68
|
+
- **wizard** (padrão): Wizard completo com detecção e configuração
|
|
69
|
+
- **validate**: Apenas validação sem alterações
|
|
70
|
+
- **reconfigure**: Reconfiguração de projeto existente
|
|
71
|
+
- **force**: Forçar wizard mesmo se já configurado
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 📋 MODO WIZARD (Padrão)
|
|
76
|
+
|
|
77
|
+
### Passo 1: Verificar Configuração Existente
|
|
78
|
+
|
|
79
|
+
**1.1 Buscar arquivo de configuração**
|
|
80
|
+
```bash
|
|
81
|
+
# Verificar se existe .onion-config.yml no projeto
|
|
82
|
+
ls -la .onion-config.yml 2>/dev/null
|
|
83
|
+
|
|
84
|
+
# Se não existir na raiz, pode estar em subdiretório
|
|
85
|
+
find . -maxdepth 2 -name ".onion-config.yml" -o -name "onion-config.yml"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**1.2 Se encontrado, ler configuração atual**
|
|
89
|
+
```bash
|
|
90
|
+
cat .onion-config.yml
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**1.3 Extrair informações da configuração existente:**
|
|
94
|
+
- `project.type` - Tipo de projeto (startup, enterprise, open-source, agency)
|
|
95
|
+
- `project.name` - Nome do projeto
|
|
96
|
+
- `contexts` - Lista de contextos ativos
|
|
97
|
+
- `ides` - Lista de IDEs configuradas
|
|
98
|
+
- `integrations` - Integrações configuradas
|
|
99
|
+
|
|
100
|
+
**CRÍTICO:** NÃO assumir valores! Se o arquivo existir, SEMPRE ler e usar os valores reais.
|
|
101
|
+
|
|
102
|
+
**Se já configurado:**
|
|
103
|
+
- Mostrar configuração atual (valores REAIS do arquivo)
|
|
104
|
+
- Oferecer opções: Validar | Reconfigurar | Ativar Loaders | Sair
|
|
105
|
+
- Se escolher validar → ir para MODO VALIDATE
|
|
106
|
+
- Se escolher reconfigurar → continuar wizard
|
|
107
|
+
- Se escolher ativar → ir para Passo 9
|
|
108
|
+
- Se escolher sair → finalizar
|
|
109
|
+
|
|
110
|
+
**Se não configurado:**
|
|
111
|
+
- Continuar para Passo 2
|
|
112
|
+
|
|
113
|
+
### Passo 2: Análise de Ambiente
|
|
114
|
+
|
|
115
|
+
**2.1 Detectar Node.js**
|
|
116
|
+
```bash
|
|
117
|
+
node --version # Verificar v18+
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**2.2 Detectar Package Manager**
|
|
121
|
+
```bash
|
|
122
|
+
npm --version 2>/dev/null || pnpm --version 2>/dev/null || yarn --version 2>/dev/null
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**2.3 Detectar Git**
|
|
126
|
+
```bash
|
|
127
|
+
git --version
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**2.4 Detectar IDEs Instaladas**
|
|
131
|
+
|
|
132
|
+
Verificar existência de:
|
|
133
|
+
- `~/.cursor/` → Cursor IDE
|
|
134
|
+
- `~/.windsurf/` → Windsurf IDE
|
|
135
|
+
- `~/.claude/` ou `~/.config/claude/` → Claude Code
|
|
136
|
+
|
|
137
|
+
**Output:**
|
|
138
|
+
```
|
|
139
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
140
|
+
📊 Análise de Ambiente
|
|
141
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
142
|
+
|
|
143
|
+
Ambiente de Desenvolvimento:
|
|
144
|
+
✅ Node.js v22.14.0
|
|
145
|
+
✅ npm 11.1.0
|
|
146
|
+
✅ Git 2.43.0
|
|
147
|
+
|
|
148
|
+
IDEs Detectadas:
|
|
149
|
+
✅ Cursor (/home/user/.cursor)
|
|
150
|
+
✅ Windsurf (/home/user/.windsurf)
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Passo 3: Análise de Projeto
|
|
154
|
+
|
|
155
|
+
**3.1 Detectar Framework**
|
|
156
|
+
|
|
157
|
+
Verificar `package.json` para:
|
|
158
|
+
- `next` → Next.js
|
|
159
|
+
- `react` → React
|
|
160
|
+
- `vue` → Vue.js
|
|
161
|
+
- `@angular/core` → Angular
|
|
162
|
+
- `svelte` → Svelte
|
|
163
|
+
- `express` → Express
|
|
164
|
+
- `fastify` → Fastify
|
|
165
|
+
- `nestjs` → NestJS
|
|
166
|
+
|
|
167
|
+
**3.2 Detectar Stack**
|
|
168
|
+
|
|
169
|
+
- Se existe `package.json` → JavaScript/TypeScript
|
|
170
|
+
- Se existe `requirements.txt` ou `pyproject.toml` → Python
|
|
171
|
+
- Se existe `Gemfile` → Ruby
|
|
172
|
+
|
|
173
|
+
**3.3 Detectar Monorepo**
|
|
174
|
+
|
|
175
|
+
- `nx.json` → NX
|
|
176
|
+
- `lerna.json` → Lerna
|
|
177
|
+
- `pnpm-workspace.yaml` → pnpm workspaces
|
|
178
|
+
|
|
179
|
+
**3.4 Detectar CI/CD**
|
|
180
|
+
|
|
181
|
+
- `.github/workflows/` → GitHub Actions
|
|
182
|
+
- `.gitlab-ci.yml` → GitLab CI
|
|
183
|
+
- `azure-pipelines.yml` → Azure Pipelines
|
|
184
|
+
- `.circleci/config.yml` → Circle CI
|
|
185
|
+
|
|
186
|
+
**3.5 Detectar Docker**
|
|
187
|
+
|
|
188
|
+
- `Dockerfile` existe
|
|
189
|
+
- `docker-compose.yml` existe
|
|
190
|
+
|
|
191
|
+
**3.6 Inferir Tipo de Projeto**
|
|
192
|
+
|
|
193
|
+
**IMPORTANTE:** Se `.onion-config.yml` já existe, usar o valor de `project.type` dele!
|
|
194
|
+
|
|
195
|
+
**Lógica de inferência (apenas se NÃO houver config):**
|
|
196
|
+
- Se monorepo detectado (nx.json, lerna.json, pnpm-workspace.yaml) → **enterprise**
|
|
197
|
+
- Se LICENSE com MIT/Apache/GPL → **open-source**
|
|
198
|
+
- Se múltiplas referências a "cliente" ou "projeto" → **agency**
|
|
199
|
+
- Senão → **startup** (default)
|
|
200
|
+
|
|
201
|
+
**Output:**
|
|
202
|
+
```
|
|
203
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
204
|
+
🔍 Análise de Projeto
|
|
205
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
206
|
+
|
|
207
|
+
Projeto Detectado:
|
|
208
|
+
Nome: onion-v4
|
|
209
|
+
Tipo: enterprise (inferido: monorepo NX detectado)
|
|
210
|
+
Framework: React, Node.js
|
|
211
|
+
Stack: JavaScript/TypeScript
|
|
212
|
+
|
|
213
|
+
Características:
|
|
214
|
+
✅ Monorepo (NX)
|
|
215
|
+
✅ CI/CD configurado (GitHub Actions)
|
|
216
|
+
❌ Docker
|
|
217
|
+
✅ Múltiplos pacotes
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Passo 4: Sugestões Inteligentes de Contextos
|
|
221
|
+
|
|
222
|
+
**Regras de Sugestão:**
|
|
223
|
+
|
|
224
|
+
**Sempre Recomendar:**
|
|
225
|
+
- `business` - Gestão de produto, estratégia e roadmap
|
|
226
|
+
- `technical` - Desenvolvimento, arquitetura e documentação técnica
|
|
227
|
+
|
|
228
|
+
**Baseado em Tipo:**
|
|
229
|
+
|
|
230
|
+
| Tipo | Contextos Sugeridos |
|
|
231
|
+
|------|---------------------|
|
|
232
|
+
| **startup** | customer-success (foco em crescimento) |
|
|
233
|
+
| **enterprise** | team (workflows colaborativos) |
|
|
234
|
+
| **open-source** | community (gestão de comunidade) |
|
|
235
|
+
| **agency** | team (múltiplos projetos/clientes) |
|
|
236
|
+
|
|
237
|
+
**Baseado em Características:**
|
|
238
|
+
|
|
239
|
+
| Característica | Contexto Sugerido | Motivo |
|
|
240
|
+
|----------------|-------------------|--------|
|
|
241
|
+
| Monorepo | architecture | Documentação arquitetural crucial |
|
|
242
|
+
| CI/CD ou Docker | devops | Infraestrutura detectada |
|
|
243
|
+
| Múltiplas equipes | team | Colaboração necessária |
|
|
244
|
+
|
|
245
|
+
**Output:**
|
|
246
|
+
```
|
|
247
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
248
|
+
💡 Contextos Sugeridos para seu Projeto
|
|
249
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
250
|
+
|
|
251
|
+
✅ Business Context (recomendado)
|
|
252
|
+
Gestão de produto, estratégia e roadmap
|
|
253
|
+
|
|
254
|
+
✅ Technical Context (recomendado)
|
|
255
|
+
Desenvolvimento, arquitetura e documentação técnica
|
|
256
|
+
|
|
257
|
+
✅ Team Collaboration Context (recomendado)
|
|
258
|
+
Projetos enterprise precisam de workflows colaborativos
|
|
259
|
+
|
|
260
|
+
✅ DevOps Context (recomendado)
|
|
261
|
+
Detectamos CI/CD (GitHub Actions) e Docker
|
|
262
|
+
|
|
263
|
+
✅ Architecture Context (recomendado)
|
|
264
|
+
Monorepos requerem documentação arquitetural detalhada
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### Passo 5: Wizard Interativo
|
|
268
|
+
|
|
269
|
+
**5.1 Confirmar Tipo de Projeto**
|
|
270
|
+
|
|
271
|
+
**Se existe configuração:**
|
|
272
|
+
```
|
|
273
|
+
📋 Configuração Atual:
|
|
274
|
+
Tipo: [VALOR REAL DO .onion-config.yml]
|
|
275
|
+
|
|
276
|
+
? O tipo está correto? (Y/n)
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
**Se NÃO existe configuração:**
|
|
280
|
+
```
|
|
281
|
+
? Detectamos um projeto [TIPO INFERIDO]. Está correto? (Y/n)
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
Se não:
|
|
285
|
+
```
|
|
286
|
+
? Selecione o tipo de projeto:
|
|
287
|
+
🚀 Startup - Produto em desenvolvimento rápido
|
|
288
|
+
🏢 Enterprise - Empresa com múltiplas equipes
|
|
289
|
+
📖 Open Source - Projeto de código aberto
|
|
290
|
+
🎨 Agency - Agência desenvolvendo para clientes
|
|
291
|
+
⚙️ Custom - Configuração personalizada
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
**5.2 Selecionar Contextos**
|
|
295
|
+
|
|
296
|
+
```
|
|
297
|
+
? Selecione os contextos a ativar: (Use setas e espaço)
|
|
298
|
+
◉ Business Context (recomendado)
|
|
299
|
+
◉ Technical Context (recomendado)
|
|
300
|
+
◉ Team Collaboration Context (recomendado)
|
|
301
|
+
◉ DevOps Context (recomendado)
|
|
302
|
+
◉ Architecture Context (recomendado)
|
|
303
|
+
◯ Customer Success Context
|
|
304
|
+
◯ Community Context
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
**VALIDAÇÃO:** Mínimo 1 contexto deve ser selecionado.
|
|
308
|
+
|
|
309
|
+
**5.3 Selecionar IDEs**
|
|
310
|
+
|
|
311
|
+
```
|
|
312
|
+
🖥️ IDEs detectadas no sistema:
|
|
313
|
+
✅ Cursor (/home/user/.cursor)
|
|
314
|
+
✅ Windsurf (/home/user/.windsurf)
|
|
315
|
+
|
|
316
|
+
? Selecione as IDEs a configurar:
|
|
317
|
+
◉ Cursor (detectada)
|
|
318
|
+
◉ Windsurf (detectada)
|
|
319
|
+
◯ Claude Code
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
**VALIDAÇÃO:** Mínimo 1 IDE deve ser selecionada.
|
|
323
|
+
|
|
324
|
+
**5.4 Integrações (Opcional)**
|
|
325
|
+
|
|
326
|
+
```
|
|
327
|
+
? Deseja configurar integrações externas (ClickUp, GitHub, etc)? (y/N)
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Se sim:
|
|
331
|
+
```
|
|
332
|
+
? Selecione as integrações:
|
|
333
|
+
◯ ClickUp - Task Management
|
|
334
|
+
◯ GitHub - Version Control
|
|
335
|
+
◯ Slack - Notifications
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
**5.5 Resumo e Confirmação**
|
|
339
|
+
|
|
340
|
+
```
|
|
341
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
342
|
+
📋 Resumo da Configuração
|
|
343
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
344
|
+
|
|
345
|
+
Tipo: enterprise
|
|
346
|
+
Contextos: business, technical, team, devops, architecture
|
|
347
|
+
IDEs: cursor, windsurf
|
|
348
|
+
Integrações: clickup, github
|
|
349
|
+
|
|
350
|
+
? Confirma a configuração? (Y/n)
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
### Passo 6: Aplicar Configurações
|
|
354
|
+
|
|
355
|
+
**6.1 Criar/Atualizar `.onion-config.yml`**
|
|
356
|
+
|
|
357
|
+
```yaml
|
|
358
|
+
version: '4.0'
|
|
359
|
+
project:
|
|
360
|
+
name: meu-projeto
|
|
361
|
+
type: enterprise
|
|
362
|
+
contexts:
|
|
363
|
+
- business
|
|
364
|
+
- technical
|
|
365
|
+
- team
|
|
366
|
+
- devops
|
|
367
|
+
- architecture
|
|
368
|
+
ides:
|
|
369
|
+
- cursor
|
|
370
|
+
- windsurf
|
|
371
|
+
integrations:
|
|
372
|
+
clickup:
|
|
373
|
+
enabled: true
|
|
374
|
+
github:
|
|
375
|
+
enabled: true
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
**6.2 Criar Estrutura de Diretórios**
|
|
379
|
+
|
|
380
|
+
```bash
|
|
381
|
+
mkdir -p .onion/contexts
|
|
382
|
+
mkdir -p .onion/ide
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
**Output:**
|
|
386
|
+
```
|
|
387
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
388
|
+
🔧 Aplicando Configurações
|
|
389
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
390
|
+
|
|
391
|
+
✅ .onion-config.yml atualizado
|
|
392
|
+
✅ Diretórios criados
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
### Passo 7: Gerar IDE Loaders
|
|
396
|
+
|
|
397
|
+
Para cada IDE selecionada, gerar loader apropriado:
|
|
398
|
+
|
|
399
|
+
**7.1 Cursor Loader**
|
|
400
|
+
|
|
401
|
+
Criar `.onion/ide/cursor/onion-loader.js` com funcionalidades:
|
|
402
|
+
- Discovery de recursos (.onion/)
|
|
403
|
+
- Sincronização para .cursor/
|
|
404
|
+
- Geração de .cursorrules
|
|
405
|
+
- File watcher
|
|
406
|
+
|
|
407
|
+
**7.2 Windsurf Loader**
|
|
408
|
+
|
|
409
|
+
Criar `.onion/ide/windsurf/onion-bridge.ts` e `windsurf.config.yml`
|
|
410
|
+
|
|
411
|
+
**7.3 Claude Code Loader**
|
|
412
|
+
|
|
413
|
+
Criar `.onion/ide/claude-code/onion-adapter.py` e `claude.config.json`
|
|
414
|
+
|
|
415
|
+
**Output:**
|
|
416
|
+
```
|
|
417
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
418
|
+
🚀 Gerando IDE Loaders
|
|
419
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
420
|
+
|
|
421
|
+
✔ Created cursor loader
|
|
422
|
+
✔ Created windsurf loader
|
|
423
|
+
✔ Loaders gerados com sucesso!
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
### Passo 8: Validação Final
|
|
427
|
+
|
|
428
|
+
Executar validação completa (ver MODO VALIDATE).
|
|
429
|
+
|
|
430
|
+
Se houver problemas não críticos:
|
|
431
|
+
- Listar problemas
|
|
432
|
+
- Oferecer correções automáticas
|
|
433
|
+
- Aplicar se usuário aceitar
|
|
434
|
+
|
|
435
|
+
### Passo 9: Ativação de Loaders
|
|
436
|
+
|
|
437
|
+
**IMPORTANTE:** Verificar dependências ANTES de executar!
|
|
438
|
+
|
|
439
|
+
**9.1 Verificar dependências do loader**
|
|
440
|
+
```bash
|
|
441
|
+
# Verificar se package.json existe em .onion/ ou raiz
|
|
442
|
+
ls -la .onion/package.json package.json
|
|
443
|
+
|
|
444
|
+
# Se .onion/package.json não existir, criar
|
|
445
|
+
if [ ! -f .onion/package.json ]; then
|
|
446
|
+
cat > .onion/package.json << 'EOF'
|
|
447
|
+
{
|
|
448
|
+
"name": "@onion/loaders",
|
|
449
|
+
"version": "4.0.0",
|
|
450
|
+
"private": true,
|
|
451
|
+
"description": "Onion System IDE Loaders",
|
|
452
|
+
"dependencies": {
|
|
453
|
+
"yaml": "^2.3.4"
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
EOF
|
|
457
|
+
|
|
458
|
+
# Instalar dependências
|
|
459
|
+
cd .onion && npm install && cd ..
|
|
460
|
+
fi
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
**9.2 Ativar Cursor Loader**
|
|
464
|
+
```bash
|
|
465
|
+
# Executar loader
|
|
466
|
+
node .onion/ide/cursor/onion-loader.js
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
Verificar:
|
|
470
|
+
- `.cursorrules` gerado (pode estar em `.cursor/.cursorrules` ou raiz)
|
|
471
|
+
- Symlinks criados em `.cursor/`
|
|
472
|
+
|
|
473
|
+
**TRATAMENTO DE ERROS:**
|
|
474
|
+
- Se erro "Cannot find module 'yaml'" → instalar dependências (ver 9.1)
|
|
475
|
+
- Se erro de path → verificar se `.onion-config.yml` existe
|
|
476
|
+
- Se erro de permissão → verificar permissões de escrita
|
|
477
|
+
|
|
478
|
+
**9.3 Ativar Windsurf Loader**
|
|
479
|
+
|
|
480
|
+
Verificar se existe TypeScript/ts-node antes de compilar.
|
|
481
|
+
|
|
482
|
+
**9.4 Ativar Claude Loader**
|
|
483
|
+
|
|
484
|
+
Verificar se existe Python antes de executar adapter.
|
|
485
|
+
|
|
486
|
+
**Output:**
|
|
487
|
+
```
|
|
488
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
489
|
+
🎉 Ativação
|
|
490
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
491
|
+
|
|
492
|
+
🚀 Ativando IDE loaders...
|
|
493
|
+
|
|
494
|
+
✅ cursor ativado
|
|
495
|
+
✅ windsurf ativado
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
### Passo 10: Testes Finais
|
|
499
|
+
|
|
500
|
+
Testar se loaders estão funcionando:
|
|
501
|
+
|
|
502
|
+
**Cursor:**
|
|
503
|
+
- ✅ `.cursorrules` existe
|
|
504
|
+
- ✅ Symlinks em `.cursor/` existem
|
|
505
|
+
|
|
506
|
+
**Windsurf:**
|
|
507
|
+
- ✅ `windsurf.config.yml` existe
|
|
508
|
+
|
|
509
|
+
**Claude:**
|
|
510
|
+
- ✅ `claude.config.json` existe
|
|
511
|
+
|
|
512
|
+
**Output:**
|
|
513
|
+
```
|
|
514
|
+
✅ cursor: .cursorrules gerado
|
|
515
|
+
✅ windsurf: windsurf.config.yml gerado
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
### Passo 11: Sugestões de Melhoria
|
|
519
|
+
|
|
520
|
+
Analisar projeto e sugerir melhorias:
|
|
521
|
+
|
|
522
|
+
**Sugestões por Característica:**
|
|
523
|
+
|
|
524
|
+
- Monorepo detectado → "Considere adicionar contexto Architecture"
|
|
525
|
+
- CI/CD + Docker → "Adicione contexto DevOps para workflows de infra"
|
|
526
|
+
- Múltiplas equipes → "Contexto Team ajuda em colaboração"
|
|
527
|
+
|
|
528
|
+
**Output (se houver sugestões):**
|
|
529
|
+
```
|
|
530
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
531
|
+
💡 Sugestões de Melhoria
|
|
532
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
533
|
+
|
|
534
|
+
1. Contexto Architecture
|
|
535
|
+
Monorepos se beneficiam de documentação arquitetural
|
|
536
|
+
|
|
537
|
+
? Aplicar sugestões? (y/N)
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
### Passo 12: Próximos Passos
|
|
541
|
+
|
|
542
|
+
**Output:**
|
|
543
|
+
```
|
|
544
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
545
|
+
✅ Setup Concluído com Sucesso!
|
|
546
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
547
|
+
|
|
548
|
+
📋 Próximos Passos:
|
|
549
|
+
|
|
550
|
+
Cursor:
|
|
551
|
+
1. Recarregue o Cursor (Ctrl+Shift+P → "Reload Window")
|
|
552
|
+
2. Digite @ para ver agentes disponíveis
|
|
553
|
+
3. Digite / para ver comandos disponíveis
|
|
554
|
+
|
|
555
|
+
Windsurf:
|
|
556
|
+
1. Reabra o Windsurf para carregar configurações
|
|
557
|
+
2. Confira o arquivo windsurf.config.yml
|
|
558
|
+
|
|
559
|
+
🔧 Comandos Úteis:
|
|
560
|
+
|
|
561
|
+
/onion/validate Validar configuração
|
|
562
|
+
/onion/setup reconfigure Ajustar configurações
|
|
563
|
+
/onion/add-context Adicionar novo contexto
|
|
564
|
+
/onion/add-ide Adicionar nova IDE
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
---
|
|
568
|
+
|
|
569
|
+
## 📋 MODO VALIDATE
|
|
570
|
+
|
|
571
|
+
Executar apenas validação sem alterações.
|
|
572
|
+
|
|
573
|
+
### Passo 1: Validação de Ambiente
|
|
574
|
+
|
|
575
|
+
**Verificar:**
|
|
576
|
+
- ✅ Node.js v18+ instalado
|
|
577
|
+
- ✅ Package manager disponível
|
|
578
|
+
- ✅ Git instalado
|
|
579
|
+
|
|
580
|
+
**Output:**
|
|
581
|
+
```
|
|
582
|
+
Ambiente de Desenvolvimento:
|
|
583
|
+
✅ Ambiente válido
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
### Passo 2: Validação de Projeto
|
|
587
|
+
|
|
588
|
+
**Verificar:**
|
|
589
|
+
- ✅ `.onion-config.yml` existe e é válido (YAML válido)
|
|
590
|
+
- ✅ Campos obrigatórios: version, project, contexts, ides
|
|
591
|
+
- ✅ Diretórios `.onion/` existem
|
|
592
|
+
|
|
593
|
+
**Output:**
|
|
594
|
+
```
|
|
595
|
+
Configuração do Projeto:
|
|
596
|
+
✅ Configuração válida
|
|
597
|
+
⚠️ 2 avisos
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
### Passo 3: Validação de IDEs
|
|
601
|
+
|
|
602
|
+
Para cada IDE em `.onion-config.yml`:
|
|
603
|
+
|
|
604
|
+
**Cursor:**
|
|
605
|
+
- ✅ Loader `.onion/ide/cursor/onion-loader.js` existe
|
|
606
|
+
- ⚠️ `.cursorrules` não encontrado (será gerado na ativação)
|
|
607
|
+
- ⚠️ `.cursor/` não encontrado (symlinks serão criados na ativação)
|
|
608
|
+
|
|
609
|
+
**Windsurf:**
|
|
610
|
+
- ✅ Bridge `.onion/ide/windsurf/onion-bridge.ts` existe
|
|
611
|
+
- ⚠️ `windsurf.config.yml` não encontrado
|
|
612
|
+
|
|
613
|
+
**Claude:**
|
|
614
|
+
- ✅ Adapter `.onion/ide/claude-code/onion-adapter.py` existe
|
|
615
|
+
- ⚠️ `claude.config.json` não encontrado
|
|
616
|
+
|
|
617
|
+
**Output:**
|
|
618
|
+
```
|
|
619
|
+
Integração com IDEs:
|
|
620
|
+
❌ Problemas nas IDEs (1)
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
### Passo 4: Relatório de Validação
|
|
624
|
+
|
|
625
|
+
**Output:**
|
|
626
|
+
```
|
|
627
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
628
|
+
📊 Relatório de Validação
|
|
629
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
630
|
+
|
|
631
|
+
Ambiente de Desenvolvimento:
|
|
632
|
+
✅ Ambiente válido
|
|
633
|
+
|
|
634
|
+
Configuração do Projeto:
|
|
635
|
+
✅ Configuração válida
|
|
636
|
+
⚠️ 2 avisos
|
|
637
|
+
|
|
638
|
+
Integração com IDEs:
|
|
639
|
+
❌ Problemas nas IDEs (1 erro)
|
|
640
|
+
|
|
641
|
+
⚠️ Projeto com problemas. Veja detalhes abaixo.
|
|
642
|
+
```
|
|
643
|
+
|
|
644
|
+
### Passo 5: Listar Problemas
|
|
645
|
+
|
|
646
|
+
**Erros Críticos:**
|
|
647
|
+
```
|
|
648
|
+
❌ Erros de IDE:
|
|
649
|
+
|
|
650
|
+
1. Loader para cursor não encontrado em .onion/ide/cursor
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
**Avisos:**
|
|
654
|
+
```
|
|
655
|
+
⚠️ Avisos de Configuração:
|
|
656
|
+
|
|
657
|
+
1. Campo "project.name" não definido
|
|
658
|
+
2. Diretório .onion/contexts/ não encontrado
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
### Passo 6: Oferecer Correções
|
|
662
|
+
|
|
663
|
+
Se houver erros que podem ser corrigidos automaticamente:
|
|
664
|
+
|
|
665
|
+
```
|
|
666
|
+
🔧 Correções Disponíveis:
|
|
667
|
+
|
|
668
|
+
1. Gerar loader para cursor
|
|
669
|
+
Será gerado loader em .onion/ide/cursor/
|
|
670
|
+
|
|
671
|
+
2. Criar diretórios faltantes
|
|
672
|
+
Serão criados: .onion/contexts/, .onion/ide/
|
|
673
|
+
|
|
674
|
+
? Deseja aplicar as correções automáticas? (Y/n)
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
Se aceitar:
|
|
678
|
+
- Aplicar correções
|
|
679
|
+
- Re-validar
|
|
680
|
+
- Mostrar novo resultado
|
|
681
|
+
|
|
682
|
+
---
|
|
683
|
+
|
|
684
|
+
## 📋 MODO RECONFIGURE
|
|
685
|
+
|
|
686
|
+
Reconfiguração guiada de projeto existente.
|
|
687
|
+
|
|
688
|
+
### Passo 1: Carregar Configuração Atual
|
|
689
|
+
|
|
690
|
+
```bash
|
|
691
|
+
cat .onion-config.yml
|
|
692
|
+
```
|
|
693
|
+
|
|
694
|
+
**Output:**
|
|
695
|
+
```
|
|
696
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
697
|
+
⚙️ Reconfiguração do Onion System
|
|
698
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
699
|
+
|
|
700
|
+
Configuração atual:
|
|
701
|
+
version: '4.0'
|
|
702
|
+
project:
|
|
703
|
+
type: startup
|
|
704
|
+
name: meu-projeto
|
|
705
|
+
contexts:
|
|
706
|
+
- business
|
|
707
|
+
- technical
|
|
708
|
+
ides:
|
|
709
|
+
- cursor
|
|
710
|
+
integrations: {}
|
|
711
|
+
```
|
|
712
|
+
|
|
713
|
+
### Passo 2: Selecionar o que Reconfigurar
|
|
714
|
+
|
|
715
|
+
```
|
|
716
|
+
? O que deseja reconfigurar:
|
|
717
|
+
◯ Tipo de projeto
|
|
718
|
+
◉ Contextos
|
|
719
|
+
◉ IDEs
|
|
720
|
+
◯ Integrações
|
|
721
|
+
```
|
|
722
|
+
|
|
723
|
+
### Passo 3: Executar Wizard Parcial
|
|
724
|
+
|
|
725
|
+
Para cada item selecionado:
|
|
726
|
+
- Executar seção correspondente do wizard completo
|
|
727
|
+
- Manter valores não selecionados
|
|
728
|
+
|
|
729
|
+
### Passo 4: Aplicar Nova Configuração
|
|
730
|
+
|
|
731
|
+
Salvar `.onion-config.yml` atualizado e regenerar loaders se necessário.
|
|
732
|
+
|
|
733
|
+
---
|
|
734
|
+
|
|
735
|
+
## 📤 Output Esperado
|
|
736
|
+
|
|
737
|
+
**Wizard Completo:**
|
|
738
|
+
```
|
|
739
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
740
|
+
✅ Setup Concluído com Sucesso!
|
|
741
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
742
|
+
|
|
743
|
+
Configurado:
|
|
744
|
+
• Tipo: enterprise
|
|
745
|
+
• Contextos: 5 (business, technical, team, devops, architecture)
|
|
746
|
+
• IDEs: 2 (cursor, windsurf)
|
|
747
|
+
• Loaders: ativados e testados
|
|
748
|
+
|
|
749
|
+
📋 Próximos Passos:
|
|
750
|
+
1. Recarregue sua IDE
|
|
751
|
+
2. Digite @ para ver agentes
|
|
752
|
+
3. Digite / para ver comandos
|
|
753
|
+
|
|
754
|
+
🔧 Comandos úteis:
|
|
755
|
+
/onion/validate
|
|
756
|
+
/onion/setup reconfigure
|
|
757
|
+
```
|
|
758
|
+
|
|
759
|
+
**Validação:**
|
|
760
|
+
```
|
|
761
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
762
|
+
📊 Relatório de Validação
|
|
763
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
764
|
+
|
|
765
|
+
✅ Ambiente: Válido
|
|
766
|
+
✅ Projeto: Válido
|
|
767
|
+
❌ IDEs: 1 erro, 2 avisos
|
|
768
|
+
|
|
769
|
+
Problemas encontrados e correções oferecidas.
|
|
770
|
+
```
|
|
771
|
+
|
|
772
|
+
## 🔗 Referências
|
|
773
|
+
|
|
774
|
+
**SEMPRE consultar ANTES de executar:**
|
|
775
|
+
|
|
776
|
+
### Documentação Principal
|
|
777
|
+
- `docs/onion/getting-started.md` - Como começar
|
|
778
|
+
- `docs/onion/commands-guide.md` - Guia de comandos
|
|
779
|
+
- `docs/onion/agents-reference.md` - Guia de agentes
|
|
780
|
+
- `docs/onion/ide-integration-complete.md` - Integração IDEs completa
|
|
781
|
+
- `docs/onion/comando-onion-setup.md` - Este comando (guia de usuário)
|
|
782
|
+
|
|
783
|
+
### Knowledge Bases
|
|
784
|
+
**Conceitos:**
|
|
785
|
+
- `docs/knowbase/concepts/ai-agent-design-patterns.md`
|
|
786
|
+
- `docs/knowbase/concepts/context-window-optimization.md`
|
|
787
|
+
- `docs/knowbase/concepts/configuration-management.md`
|
|
788
|
+
- `docs/knowbase/concepts/spec-as-code-strategy.md`
|
|
789
|
+
|
|
790
|
+
**Frameworks:**
|
|
791
|
+
- `docs/knowbase/frameworks/onion-multi-context-orchestrator-vision.md`
|
|
792
|
+
- `docs/knowbase/frameworks/onion-ide-integration-strategy.md`
|
|
793
|
+
- `docs/knowbase/frameworks/onion-complete-cycle-understanding.md`
|
|
794
|
+
|
|
795
|
+
### Especificações Técnicas
|
|
796
|
+
- `docs/plans/onion-v4-epic.md` - Epic completo
|
|
797
|
+
- `docs/plans/tasks/fase-05-ide-loaders.md` - IDE Loaders (Fase 5)
|
|
798
|
+
- `packages/onion-cli/README.md` - CLI Reference
|
|
799
|
+
|
|
800
|
+
## ⚠️ Notas Importantes
|
|
801
|
+
|
|
802
|
+
**Contexto e Documentação:**
|
|
803
|
+
- **SEMPRE ler os arquivos de referência** listados na seção 📚 Contexto Necessário ANTES de iniciar
|
|
804
|
+
- Carregar knowledge bases relevantes para decisões informadas
|
|
805
|
+
- Consultar documentação Onion para entender padrões e convenções
|
|
806
|
+
|
|
807
|
+
**Detecção Automática:**
|
|
808
|
+
- Sempre executar análise de ambiente e projeto primeiro
|
|
809
|
+
- **NÃO assumir valores** - sempre detectar ou ler da configuração existente
|
|
810
|
+
- Se `.onion-config.yml` existe, **USAR os valores reais** do arquivo
|
|
811
|
+
- Nunca fixar tipo de projeto - sempre inferir ou perguntar
|
|
812
|
+
|
|
813
|
+
**Sugestões Inteligentes:**
|
|
814
|
+
- Baseadas em tipo de projeto + características detectadas
|
|
815
|
+
- Sempre explicar o motivo de cada sugestão
|
|
816
|
+
- Pré-selecionar recomendações mas permitir mudanças
|
|
817
|
+
|
|
818
|
+
**Validação:**
|
|
819
|
+
- 3 camadas: Ambiente, Projeto, IDEs
|
|
820
|
+
- Distinguir erros críticos de avisos
|
|
821
|
+
- Sempre oferecer correções automáticas quando possível
|
|
822
|
+
|
|
823
|
+
**Experiência Zero-Config:**
|
|
824
|
+
- Usuário nunca deve ficar travado
|
|
825
|
+
- Sempre mostrar próximos passos claros
|
|
826
|
+
- Feedback visual constante (✅ ❌ ⚠️ 💡)
|
|
827
|
+
|
|
828
|
+
**Integração com IDE Loaders:**
|
|
829
|
+
- **Verificar dependências** antes de executar loaders
|
|
830
|
+
- Se `yaml` não estiver instalado, criar `.onion/package.json` e instalar
|
|
831
|
+
- Gerar loaders para IDEs selecionadas
|
|
832
|
+
- Ativar e testar funcionamento
|
|
833
|
+
- Garantir que tudo está operacional antes de finalizar
|
|
834
|
+
|
|
835
|
+
**Tratamento de Erros Comuns:**
|
|
836
|
+
|
|
837
|
+
| Erro | Causa | Solução |
|
|
838
|
+
|------|-------|---------|
|
|
839
|
+
| `Cannot find module 'yaml'` | Dependência faltando | Criar `.onion/package.json` e `npm install` |
|
|
840
|
+
| `.onion-config.yml not found` | Config não existe | Executar `onion init` primeiro |
|
|
841
|
+
| Path relativos incorretos | CWD errado | Sempre usar paths absolutos ou relativos à raiz |
|
|
842
|
+
| Tipo fixo em "monorepo" | Não leu config | Ler `.onion-config.yml` e usar valor real |
|
|
843
|
+
| Symlink errors (Windows) | Permissões | Avisar usuário, continuar sem symlinks |
|