@maestro-ai/cli 1.1.0 → 1.3.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 (54) hide show
  1. package/README.md +84 -54
  2. package/content/guides/fases-mapeamento.md +34 -0
  3. package/content/guides/guide-brainstorm.md +38 -0
  4. package/content/guides/guide-orquestracao.md +45 -0
  5. package/content/guides/guide-testes.md +51 -0
  6. package/content/guides/guide-troubleshooting.md +43 -0
  7. package/content/guides/guide-validacao.md +50 -0
  8. package/content/guides/internal/automated-events.md +27 -0
  9. package/content/guides/internal/automated-map.md +56 -0
  10. package/content/guides/internal/automated-stitch.md +51 -0
  11. package/content/guides/internal/automated-system.md +46 -0
  12. package/content/guides/mapa-sistema.md +86 -0
  13. package/content/guides/multi-ide.md +32 -0
  14. package/content/guides/playbook-orquestrador.md +45 -0
  15. package/content/guides/workflows-avancados.md +62 -0
  16. package/content/rules/GEMINI.md +70 -762
  17. package/content/rules/RULES.md +71 -761
  18. package/content/rules/complexity-rules.md +43 -0
  19. package/content/rules/quality-gates.md +55 -0
  20. package/content/rules/security-rules.md +40 -0
  21. package/content/rules/structure-rules.md +63 -0
  22. package/content/rules/validation-rules.md +56 -0
  23. package/content/templates/estado-template.json +73 -0
  24. package/content/workflows/00-maestro.md +78 -0
  25. package/content/workflows/01-iniciar-projeto.md +59 -0
  26. package/content/workflows/02-avancar-fase.md +72 -0
  27. package/content/workflows/03-continuar-fase.md +64 -0
  28. package/content/workflows/04-implementar-historia.md +64 -0
  29. package/content/workflows/05-nova-feature.md +39 -0
  30. package/content/workflows/06-corrigir-bug.md +34 -0
  31. package/content/workflows/07-refatorar-codigo.md +34 -0
  32. package/dist/commands/init.d.ts +2 -2
  33. package/dist/commands/init.js +89 -76
  34. package/dist/index.js +94 -5
  35. package/package.json +10 -4
  36. package/content/workflows/README-MCP.md +0 -363
  37. package/content/workflows/brainstorm.md +0 -113
  38. package/content/workflows/create.md +0 -59
  39. package/content/workflows/debug.md +0 -103
  40. package/content/workflows/enhance.md +0 -63
  41. package/content/workflows/mcp-debug.md +0 -506
  42. package/content/workflows/mcp-feature.md +0 -385
  43. package/content/workflows/mcp-gate.md +0 -413
  44. package/content/workflows/mcp-next.md +0 -388
  45. package/content/workflows/mcp-refactor.md +0 -600
  46. package/content/workflows/mcp-start.md +0 -304
  47. package/content/workflows/mcp-status.md +0 -400
  48. package/content/workflows/orchestrate.md +0 -237
  49. package/content/workflows/plan.md +0 -89
  50. package/content/workflows/preview.md +0 -81
  51. package/content/workflows/status.md +0 -86
  52. package/content/workflows/test.md +0 -144
  53. package/content/workflows/ui-ux-pro-max.md +0 -296
  54. /package/content/workflows/{deploy.md → 08-deploy-projeto.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,113 +0,0 @@
1
- ---
2
- description: Structured brainstorming for projects and features. Explores multiple options before implementation.
3
- ---
4
-
5
- # /brainstorm - Structured Idea Exploration
6
-
7
- $ARGUMENTS
8
-
9
- ---
10
-
11
- ## Purpose
12
-
13
- This command activates BRAINSTORM mode for structured idea exploration. Use when you need to explore options before committing to an implementation.
14
-
15
- ---
16
-
17
- ## Behavior
18
-
19
- When `/brainstorm` is triggered:
20
-
21
- 1. **Understand the goal**
22
- - What problem are we solving?
23
- - Who is the user?
24
- - What constraints exist?
25
-
26
- 2. **Generate options**
27
- - Provide at least 3 different approaches
28
- - Each with pros and cons
29
- - Consider unconventional solutions
30
-
31
- 3. **Compare and recommend**
32
- - Summarize tradeoffs
33
- - Give a recommendation with reasoning
34
-
35
- ---
36
-
37
- ## Output Format
38
-
39
- ```markdown
40
- ## 🧠 Brainstorm: [Topic]
41
-
42
- ### Context
43
- [Brief problem statement]
44
-
45
- ---
46
-
47
- ### Option A: [Name]
48
- [Description]
49
-
50
- ✅ **Pros:**
51
- - [benefit 1]
52
- - [benefit 2]
53
-
54
- ❌ **Cons:**
55
- - [drawback 1]
56
-
57
- 📊 **Effort:** Low | Medium | High
58
-
59
- ---
60
-
61
- ### Option B: [Name]
62
- [Description]
63
-
64
- ✅ **Pros:**
65
- - [benefit 1]
66
-
67
- ❌ **Cons:**
68
- - [drawback 1]
69
- - [drawback 2]
70
-
71
- 📊 **Effort:** Low | Medium | High
72
-
73
- ---
74
-
75
- ### Option C: [Name]
76
- [Description]
77
-
78
- ✅ **Pros:**
79
- - [benefit 1]
80
-
81
- ❌ **Cons:**
82
- - [drawback 1]
83
-
84
- 📊 **Effort:** Low | Medium | High
85
-
86
- ---
87
-
88
- ## 💡 Recommendation
89
-
90
- **Option [X]** because [reasoning].
91
-
92
- What direction would you like to explore?
93
- ```
94
-
95
- ---
96
-
97
- ## Examples
98
-
99
- ```
100
- /brainstorm authentication system
101
- /brainstorm state management for complex form
102
- /brainstorm database schema for social app
103
- /brainstorm caching strategy
104
- ```
105
-
106
- ---
107
-
108
- ## Key Principles
109
-
110
- - **No code** - this is about ideas, not implementation
111
- - **Visual when helpful** - use diagrams for architecture
112
- - **Honest tradeoffs** - don't hide complexity
113
- - **Defer to user** - present options, let them decide
@@ -1,59 +0,0 @@
1
- ---
2
- description: Create new application command. Triggers App Builder skill and starts interactive dialogue with user.
3
- ---
4
-
5
- # /create - Create Application
6
-
7
- $ARGUMENTS
8
-
9
- ---
10
-
11
- ## Task
12
-
13
- This command starts a new application creation process.
14
-
15
- ### Steps:
16
-
17
- 1. **Request Analysis**
18
- - Understand what the user wants
19
- - If information is missing, use `conversation-manager` skill to ask
20
-
21
- 2. **Project Planning**
22
- - Use `project-planner` agent for task breakdown
23
- - Determine tech stack
24
- - Plan file structure
25
- - Create plan file and proceed to building
26
-
27
- 3. **Application Building (After Approval)**
28
- - Orchestrate with `app-builder` skill
29
- - Coordinate expert agents:
30
- - `database-architect` → Schema
31
- - `backend-specialist` → API
32
- - `frontend-specialist` → UI
33
-
34
- 4. **Preview**
35
- - Start with `auto_preview.py` when complete
36
- - Present URL to user
37
-
38
- ---
39
-
40
- ## Usage Examples
41
-
42
- ```
43
- /create blog site
44
- /create e-commerce app with product listing and cart
45
- /create todo app
46
- /create Instagram clone
47
- /create crm system with customer management
48
- ```
49
-
50
- ---
51
-
52
- ## Before Starting
53
-
54
- If request is unclear, ask these questions:
55
- - What type of application?
56
- - What are the basic features?
57
- - Who will use it?
58
-
59
- Use defaults, add details later.
@@ -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
@@ -1,63 +0,0 @@
1
- ---
2
- description: Add or update features in existing application. Used for iterative development.
3
- ---
4
-
5
- # /enhance - Update Application
6
-
7
- $ARGUMENTS
8
-
9
- ---
10
-
11
- ## Task
12
-
13
- This command adds features or makes updates to existing application.
14
-
15
- ### Steps:
16
-
17
- 1. **Understand Current State**
18
- - Load project state with `python .agent/scripts/session_manager.py info`
19
- - Understand existing features, tech stack
20
-
21
- 2. **Plan Changes**
22
- - Determine what will be added/changed
23
- - Detect affected files
24
- - Check dependencies
25
-
26
- 3. **Present Plan to User** (for major changes)
27
- ```
28
- "To add admin panel:
29
- - I'll create 15 new files
30
- - Update 8 files
31
- - Takes ~10 minutes
32
-
33
- Should I start?"
34
- ```
35
-
36
- 4. **Apply**
37
- - Call relevant agents
38
- - Make changes
39
- - Test
40
-
41
- 5. **Update Preview**
42
- - Hot reload or restart
43
-
44
- ---
45
-
46
- ## Usage Examples
47
-
48
- ```
49
- /enhance add dark mode
50
- /enhance build admin panel
51
- /enhance integrate payment system
52
- /enhance add search feature
53
- /enhance edit profile page
54
- /enhance make responsive
55
- ```
56
-
57
- ---
58
-
59
- ## Caution
60
-
61
- - Get approval for major changes
62
- - Warn on conflicting requests (e.g., "use Firebase" when project uses PostgreSQL)
63
- - Commit each change with git