@maestro-ai/cli 1.1.0 → 1.2.0

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 (32) hide show
  1. package/README.md +84 -54
  2. package/content/guides/fases-mapeamento.md +35 -0
  3. package/content/guides/multi-ide.md +32 -0
  4. package/content/guides/playbook-orquestrador.md +45 -0
  5. package/content/rules/quality-gates.md +43 -0
  6. package/content/rules/validation-rules.md +97 -0
  7. package/content/templates/estado-template.json +73 -0
  8. package/content/workflows/avancar-fase.md +84 -0
  9. package/content/workflows/brainstorm.md +22 -8
  10. package/content/workflows/continuar-fase.md +64 -0
  11. package/content/workflows/{mcp-debug.md → corrigir-bug.md} +30 -6
  12. package/content/workflows/iniciar-projeto.md +59 -0
  13. package/content/workflows/maestro.md +77 -0
  14. package/content/workflows/{mcp-feature.md → nova-feature.md} +81 -28
  15. package/content/workflows/{mcp-refactor.md → refatorar-codigo.md} +33 -10
  16. package/content/workflows/status-projeto.md +54 -0
  17. package/dist/commands/init.d.ts +2 -2
  18. package/dist/commands/init.js +86 -74
  19. package/dist/index.js +94 -5
  20. package/package.json +10 -4
  21. package/content/workflows/README-MCP.md +0 -363
  22. package/content/workflows/debug.md +0 -103
  23. package/content/workflows/mcp-next.md +0 -388
  24. package/content/workflows/mcp-start.md +0 -304
  25. package/content/workflows/mcp-status.md +0 -400
  26. package/content/workflows/preview.md +0 -81
  27. package/content/workflows/status.md +0 -86
  28. /package/content/workflows/{create.md → create-app.md} +0 -0
  29. /package/content/workflows/{enhance.md → melhorar-feature.md} +0 -0
  30. /package/content/workflows/{test.md → testar.md} +0 -0
  31. /package/content/workflows/{ui-ux-pro-max.md → ux-avancado.md} +0 -0
  32. /package/content/workflows/{mcp-gate.md → validar-gate.md} +0 -0
@@ -1,363 +0,0 @@
1
- # Workflows MCP Maestro
2
-
3
- Workflows integrados para desenvolvimento com MCP Maestro.
4
-
5
- ---
6
-
7
- ## 🎯 Workflows Disponíveis
8
-
9
- ### Gerenciamento de Projeto
10
-
11
- | Comando | Descrição | Quando Usar |
12
- |---------|-----------|-------------|
13
- | **[/mcp-start](mcp-start.md)** | Iniciar projeto MCP | Criar novo projeto do zero |
14
- | **[/mcp-next](mcp-next.md)** | Avançar fase | Após completar entregável |
15
- | **[/mcp-status](mcp-status.md)** | Ver status | Verificar progresso e métricas |
16
- | **[/mcp-gate](mcp-gate.md)** | Validar gate | Checar qualidade antes de avançar |
17
-
18
- ### Desenvolvimento
19
-
20
- | Comando | Descrição | Quando Usar |
21
- |---------|-----------|-------------|
22
- | **[/mcp-feature](mcp-feature.md)** | Nova feature | Adicionar funcionalidade |
23
- | **[/mcp-debug](mcp-debug.md)** | Corrigir bug | Debugging estruturado |
24
- | **[/mcp-refactor](mcp-refactor.md)** | Refatorar código | Melhorar qualidade sem mudar comportamento |
25
-
26
- ---
27
-
28
- ## 🚀 Quick Start
29
-
30
- ### 1. Criar Novo Projeto
31
-
32
- ```bash
33
- /mcp-start
34
- ```
35
-
36
- **O workflow irá:**
37
- - Perguntar nome e descrição do projeto
38
- - Classificar automaticamente (POC/Script/Internal/Product + Simples/Médio/Complexo)
39
- - Apresentar classificação sugerida
40
- - Aguardar confirmação
41
- - Iniciar Fase 1 (Produto)
42
-
43
- ### 2. Trabalhar nas Fases
44
-
45
- ```bash
46
- # Após completar entregável da fase
47
- /mcp-next docs/01-produto/PRD.md
48
- ```
49
-
50
- **O workflow irá:**
51
- - Validar gate da fase (score 0-100)
52
- - Se score >= 70: Avança automaticamente ✅
53
- - Se score < 70: Mostra pendências e bloqueia 🔴
54
- - Apresenta próxima fase + especialista
55
-
56
- ### 3. Verificar Progresso
57
-
58
- ```bash
59
- /mcp-status
60
- ```
61
-
62
- **Mostra:**
63
- - Fase atual (X/Y)
64
- - Progresso percentual
65
- - Score do último gate
66
- - Próximos passos
67
-
68
- ---
69
-
70
- ## 📊 Fluxo Completo
71
-
72
- ```
73
- /mcp-start
74
-
75
- [Trabalhar em Fase 1]
76
-
77
- /mcp-next [entregavel]
78
-
79
- [Trabalhar em Fase 2]
80
-
81
- /mcp-next [entregavel]
82
-
83
- ...
84
-
85
- [Projeto Concluído] ✅
86
- ```
87
-
88
- ---
89
-
90
- ## 🔄 Fluxos Alternativos
91
-
92
- ### Adicionar Feature em Projeto Existente
93
-
94
- ```bash
95
- /mcp-feature Sistema de notificações push
96
- ```
97
-
98
- **Fluxo de 6 fases:**
99
- 1. Análise de Impacto
100
- 2. Refinamento de Requisitos
101
- 3. Design/Arquitetura
102
- 4. Implementação (Contrato → FE/BE → Integração)
103
- 5. Testes
104
- 6. Deploy
105
-
106
- ### Corrigir Bug
107
-
108
- ```bash
109
- /mcp-debug Pedido duplicado ao clicar rapidamente
110
- ```
111
-
112
- **Fluxo de 4 fases:**
113
- 1. Reprodução do Bug
114
- 2. Análise de Causa Raiz
115
- 3. Fix + Testes de Regressão
116
- 4. Deploy
117
-
118
- ### Refatorar Código
119
-
120
- ```bash
121
- /mcp-refactor Serviço de autenticação
122
- ```
123
-
124
- **Fluxo de 5 fases:**
125
- 1. Análise de Código Atual
126
- 2. Testes de Caracterização
127
- 3. Refatoração Incremental
128
- 4. Validação
129
- 5. Deploy
130
-
131
- ---
132
-
133
- ## 🎚️ Sistema de Gates Adaptativos
134
-
135
- ### Tier Essencial (POC, Script)
136
- **Foco:** Funciona?
137
- - Código executa sem erros
138
- - Funcionalidade principal OK
139
-
140
- ### Tier Base (Internal, Product Simples)
141
- **Foco:** Padrão indústria
142
- - Tier Essencial +
143
- - Testes unitários (>60%)
144
- - Lint sem erros
145
- - Segurança básica (OWASP)
146
-
147
- ### Tier Avançado (Product Complexo)
148
- **Foco:** Estado da arte
149
- - Tier Base +
150
- - Testes E2E
151
- - Observabilidade
152
- - Performance otimizada
153
- - Compliance (LGPD, SOC2)
154
-
155
- ---
156
-
157
- ## 🔐 Gate Protection Protocol
158
-
159
- > [!CAUTION]
160
- > **Regras de Proteção:**
161
- >
162
- > - ✅ Score >= 70: Avança automaticamente
163
- > - 🔴 Score < 70: **BLOQUEIA** avanço
164
- > - ⚠️ IA **NUNCA** aprova gates automaticamente
165
- > - 📝 Usuário pode forçar com `/mcp-gate approve [motivo]`
166
-
167
- ---
168
-
169
- ## 📐 Protocolo Frontend-First
170
-
171
- Para features com Frontend + Backend:
172
-
173
- ```
174
- 1. CONT (Contrato API)
175
- ├── Gera: openapi.yaml
176
- ├── Gera: types (FE + BE)
177
- └── Gera: Mock Server
178
-
179
- 2. Paralelo ⚡
180
- ├── FE (desenvolve contra mock)
181
- └── BE (implementa contrato)
182
-
183
- 3. INT (Integração)
184
- ├── Remove mocks
185
- ├── Conecta FE ↔ BE real
186
- └── Testes E2E
187
- ```
188
-
189
- ---
190
-
191
- ## 🧠 Especialistas MCP
192
-
193
- Os workflows carregam especialistas automaticamente via:
194
-
195
- ```
196
- maestro://especialista/{nome}
197
- ```
198
-
199
- **24 especialistas disponíveis:**
200
- - Gestão de Produto
201
- - Engenharia de Requisitos
202
- - UX Design
203
- - Prototipagem com Stitch (opcional)
204
- - Modelagem de Domínio
205
- - Banco de Dados
206
- - Arquitetura de Software
207
- - Segurança
208
- - Testes
209
- - Performance
210
- - Observabilidade
211
- - Plano de Execução
212
- - Contrato de API
213
- - Frontend
214
- - Backend
215
- - DevOps
216
- - E mais...
217
-
218
- ---
219
-
220
- ## 📁 Estrutura de Arquivos
221
-
222
- Workflows MCP criam automaticamente:
223
-
224
- ```
225
- [projeto]/
226
- ├── .maestro/
227
- │ ├── estado.json # ⭐ Fonte da verdade
228
- │ ├── resumo.json # Cache de contexto
229
- │ └── gates-forcados.log # Histórico de aprovações manuais
230
- └── docs/
231
- ├── 01-produto/
232
- │ └── PRD.md
233
- ├── 02-requisitos/
234
- │ └── requisitos.md
235
- ├── 03-ux/
236
- │ └── design-doc.md
237
- └── ...
238
- ```
239
-
240
- ---
241
-
242
- ## 🔧 Protocolo Stateless (CRÍTICO)
243
-
244
- > [!IMPORTANT]
245
- > **SEMPRE antes de chamar qualquer tool MCP:**
246
- >
247
- > ```typescript
248
- > const estadoJson = await fs.readFile('.maestro/estado.json', 'utf-8');
249
- >
250
- > await mcp_maestro_[tool]({
251
- > estado_json: estadoJson, // OBRIGATÓRIO
252
- > diretorio: process.cwd(),
253
- > // ... outros parâmetros
254
- > });
255
- > ```
256
-
257
- ---
258
-
259
- ## 🆚 Comparação com Workflows Padrão
260
-
261
- | Workflow Padrão | Workflow MCP | Diferença |
262
- |----------------|--------------|-----------|
263
- | `/create` | `/mcp-start` | Classificação adaptativa + gates |
264
- | `/plan` | `/mcp-start` | Fluxo de fases estruturado |
265
- | `/enhance` | `/mcp-feature` | Frontend-First + validação |
266
- | `/debug` | `/mcp-debug` | Análise de causa raiz |
267
- | `/status` | `/mcp-status` | Métricas MCP + progresso |
268
- | - | `/mcp-gate` | Validação de qualidade |
269
- | - | `/mcp-refactor` | Testes de caracterização |
270
-
271
- ---
272
-
273
- ## 📖 Documentação Completa
274
-
275
- Cada workflow tem documentação detalhada:
276
-
277
- - **[/mcp-start](mcp-start.md)** - Wizard de inicialização
278
- - **[/mcp-next](mcp-next.md)** - Sistema de gates
279
- - **[/mcp-feature](mcp-feature.md)** - Fluxo de features
280
- - **[/mcp-debug](mcp-debug.md)** - Debugging sistêmico
281
- - **[/mcp-status](mcp-status.md)** - Dashboard de status
282
- - **[/mcp-gate](mcp-gate.md)** - Validação de qualidade
283
- - **[/mcp-refactor](mcp-refactor.md)** - Refatoração segura
284
-
285
- ---
286
-
287
- ## 🎓 Exemplos Práticos
288
-
289
- ### SaaS Simples (7 fases)
290
-
291
- ```bash
292
- # Iniciar
293
- /mcp-start TaskFlow
294
-
295
- > Tipo: Internal
296
- > Complexidade: Simples
297
- > Fases: 7
298
-
299
- # Trabalhar em cada fase
300
- /mcp-next docs/01-produto/PRD.md
301
- /mcp-next docs/02-requisitos/requisitos.md
302
- ...
303
- ```
304
-
305
- ### Fintech Complexo (17 fases)
306
-
307
- ```bash
308
- # Iniciar
309
- /mcp-start PaySecure
310
-
311
- > Tipo: Product
312
- > Complexidade: Complexo
313
- > Fases: 17
314
- > Tier: Avançado (compliance, observabilidade, etc)
315
-
316
- # Trabalhar em cada fase
317
- /mcp-next [entregavel]
318
- ...
319
- ```
320
-
321
- ### Adicionar Feature
322
-
323
- ```bash
324
- # No projeto existente
325
- /mcp-feature Integração com WhatsApp
326
-
327
- > Impacto: médio
328
- > Fases: 6 (Análise → Deploy)
329
-
330
- # Avançar
331
- /mcp-next [entregavel]
332
- ...
333
- ```
334
-
335
- ---
336
-
337
- ## ❓ FAQ
338
-
339
- **P: Posso pular fases?**
340
- R: Não com `/mcp-next`. Gates bloqueiam avanço se qualidade < 70%.
341
-
342
- **P: Posso forçar aprovação de gate?**
343
- R: Sim, usuário (não IA) pode usar `/mcp-gate approve [motivo]`.
344
-
345
- **P: Como ajustar complexidade depois?**
346
- R: Use `/mcp-start reclassificar`
347
-
348
- **P: Workflows MCP funcionam sem MCP server?**
349
- R: Não, eles chamam tools MCP. Use workflows padrão se não tiver MCP.
350
-
351
- ---
352
-
353
- ## 🔗 Links Úteis
354
-
355
- - [Plano de Implementação](../../../.gemini/antigravity/brain/[conversation-id]/implementation_plan.md)
356
- - [MCP Maestro README](../../README.md)
357
- - [Documentação MCP](../../docs/)
358
-
359
- ---
360
-
361
- **Versão:** 1.0.0
362
- **Data:** 2026-01-23
363
- **Autor:** Sistema MCP Maestro
@@ -1,103 +0,0 @@
1
- ---
2
- description: Debugging command. Activates DEBUG mode for systematic problem investigation.
3
- ---
4
-
5
- # /debug - Systematic Problem Investigation
6
-
7
- $ARGUMENTS
8
-
9
- ---
10
-
11
- ## Purpose
12
-
13
- This command activates DEBUG mode for systematic investigation of issues, errors, or unexpected behavior.
14
-
15
- ---
16
-
17
- ## Behavior
18
-
19
- When `/debug` is triggered:
20
-
21
- 1. **Gather information**
22
- - Error message
23
- - Reproduction steps
24
- - Expected vs actual behavior
25
- - Recent changes
26
-
27
- 2. **Form hypotheses**
28
- - List possible causes
29
- - Order by likelihood
30
-
31
- 3. **Investigate systematically**
32
- - Test each hypothesis
33
- - Check logs, data flow
34
- - Use elimination method
35
-
36
- 4. **Fix and prevent**
37
- - Apply fix
38
- - Explain root cause
39
- - Add prevention measures
40
-
41
- ---
42
-
43
- ## Output Format
44
-
45
- ```markdown
46
- ## 🔍 Debug: [Issue]
47
-
48
- ### 1. Symptom
49
- [What's happening]
50
-
51
- ### 2. Information Gathered
52
- - Error: `[error message]`
53
- - File: `[filepath]`
54
- - Line: [line number]
55
-
56
- ### 3. Hypotheses
57
- 1. ❓ [Most likely cause]
58
- 2. ❓ [Second possibility]
59
- 3. ❓ [Less likely cause]
60
-
61
- ### 4. Investigation
62
-
63
- **Testing hypothesis 1:**
64
- [What I checked] → [Result]
65
-
66
- **Testing hypothesis 2:**
67
- [What I checked] → [Result]
68
-
69
- ### 5. Root Cause
70
- 🎯 **[Explanation of why this happened]**
71
-
72
- ### 6. Fix
73
- ```[language]
74
- // Before
75
- [broken code]
76
-
77
- // After
78
- [fixed code]
79
- ```
80
-
81
- ### 7. Prevention
82
- 🛡️ [How to prevent this in the future]
83
- ```
84
-
85
- ---
86
-
87
- ## Examples
88
-
89
- ```
90
- /debug login not working
91
- /debug API returns 500
92
- /debug form doesn't submit
93
- /debug data not saving
94
- ```
95
-
96
- ---
97
-
98
- ## Key Principles
99
-
100
- - **Ask before assuming** - get full error context
101
- - **Test hypotheses** - don't guess randomly
102
- - **Explain why** - not just what to fix
103
- - **Prevent recurrence** - add tests, validation