kakaroto-config 1.0.0 → 1.0.2

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 (46) hide show
  1. package/README.md +122 -16
  2. package/bin/install.js +27 -5
  3. package/bin/release.js +255 -0
  4. package/config/ARCHITECTURE.md +3 -1
  5. package/config/CLAUDE.md +4 -0
  6. package/config/agents/memory-sync.md +87 -19
  7. package/config/agents/test-fixer.md +24 -0
  8. package/config/agents/visual-validator.md +17 -0
  9. package/config/commands/debug/01-reproduce.md +120 -0
  10. package/config/commands/debug/02-investigate.md +93 -0
  11. package/config/commands/debug/03-fix.md +110 -0
  12. package/config/commands/debug/04-verify.md +155 -0
  13. package/config/commands/debug/05-commit.md +106 -0
  14. package/config/commands/debug/06-evaluate.md +137 -0
  15. package/config/commands/debug/playbooks/api.md +21 -0
  16. package/config/commands/debug/playbooks/backend.md +19 -0
  17. package/config/commands/debug/playbooks/infra.md +130 -0
  18. package/config/commands/debug/playbooks/integration.md +16 -0
  19. package/config/commands/debug/playbooks/job.md +19 -0
  20. package/config/commands/debug/playbooks/test.md +14 -0
  21. package/config/commands/debug/playbooks/ui.md +24 -0
  22. package/config/commands/debug/self-healing.md +99 -0
  23. package/config/commands/debug/techniques/flow-tracing.md +75 -0
  24. package/config/commands/debug/techniques/hypothesis-generation.md +30 -0
  25. package/config/commands/debug/techniques/sequential-thinking-config.md +79 -0
  26. package/config/commands/debug/templates/diagnosis-script.md +72 -0
  27. package/config/commands/debug/templates/reproduction-doc.md +60 -0
  28. package/config/commands/debug/templates/root-cause-doc.md +46 -0
  29. package/config/commands/debug/validators/criticality-gate.md +40 -0
  30. package/config/commands/debug/validators/evidence-requirements.md +48 -0
  31. package/config/commands/debug/validators/fix-permanence.md +56 -0
  32. package/config/commands/debug/validators/root-cause-validation.md +50 -0
  33. package/config/commands/debug.md +3 -3
  34. package/config/commands/feature/01-interview.md +82 -90
  35. package/config/commands/feature/02-spec.md +22 -98
  36. package/config/commands/feature/03-planner.md +81 -4
  37. package/config/commands/feature/04-implement.md +15 -8
  38. package/config/commands/feature/05-quality.md +23 -5
  39. package/config/commands/feature/06-commit.md +91 -0
  40. package/config/commands/feature/07-evaluate.md +129 -0
  41. package/config/commands/feature.md +1 -7
  42. package/config/templates/spec-template.md +92 -0
  43. package/package.json +4 -1
  44. package/config/commands/debug/01-investigate.md +0 -119
  45. package/config/commands/debug/02-fix.md +0 -108
  46. package/config/commands/debug/03-verify.md +0 -66
@@ -1,119 +0,0 @@
1
- # Fase 1: Investigate
2
-
3
- ## Passo 1: Carregar Contexto
4
-
5
- ```
6
- mcp__memory__search_nodes({ query: "config" })
7
- mcp__memory__search_nodes({ query: "<termos-do-bug>" })
8
- ```
9
-
10
- Extrair termos relevantes de $ARGUMENTS e buscar bugs similares já resolvidos.
11
-
12
- ---
13
-
14
- ## Passo 2: Reproduzir Bug
15
-
16
- ### 2.1 Executar Passos
17
- Tentar reproduzir com informações fornecidas.
18
-
19
- ### 2.2 Documentar
20
- ```
21
- REPRODUÇÃO:
22
- - Passos: [...]
23
- - Input: [...]
24
- - Output esperado: [...]
25
- - Output real: [...]
26
- - Reproduzido: SIM/NAO
27
- ```
28
-
29
- ### 2.3 Gate
30
- Se NÃO reproduziu: usar AskUserQuestion para mais detalhes.
31
- Se reproduziu: continuar.
32
-
33
- ---
34
-
35
- ## Passo 3: Verificar Estado Externo (OBRIGATÓRIO para scraping/browser)
36
-
37
- **SE o bug envolve:** web scraping, Playwright, Puppeteer, seletores, ou qualquer interação com páginas web externas:
38
-
39
- ### 3.1 VERIFICAR ANTES DE ASSUMIR
40
-
41
- ```
42
- 1. mcp__playwright__browser_navigate({ url: "[URL do bug]" })
43
- 2. mcp__playwright__browser_wait_for({ time: 3 })
44
- 3. mcp__playwright__browser_snapshot({})
45
- ```
46
-
47
- ### 3.2 Comparar Estado Atual vs Esperado
48
-
49
- - O que o código espera encontrar?
50
- - O que realmente existe na página?
51
- - Quais seletores existem/mudaram?
52
-
53
- ### 3.3 Gate
54
-
55
- - [ ] Estado atual da página VERIFICADO com Playwright?
56
- - [ ] Diferenças entre esperado e real DOCUMENTADAS?
57
-
58
- **PROIBIDO:** Assumir que "a página mudou" sem verificar. SEMPRE abrir a URL e constatar.
59
-
60
- ---
61
-
62
- ## Passo 4: Explorar Código Relacionado
63
-
64
- ### 4.1 Buscar no Codebase
65
- ```
66
- Grep: termos do bug
67
- Glob: arquivos com nomes relacionados
68
- git log --oneline --grep="fix" -- [arquivos suspeitos]
69
- ```
70
-
71
- ### 4.2 Identificar
72
- - Arquivos/funções envolvidos
73
- - Como erros são tratados nesta área
74
- - Há validação que deveria existir?
75
- - Há helper existente que resolve?
76
-
77
- ---
78
-
79
- ## Passo 5: 5 Whys (Causa Raiz)
80
-
81
- Para cada "Por que?", fornecer EVIDÊNCIA de código:
82
-
83
- ```
84
- ANÁLISE DE CAUSA RAIZ:
85
-
86
- Sintoma: [o que está acontecendo]
87
-
88
- Por que #1: [resposta]
89
- Evidência: [arquivo:linha] - [código]
90
-
91
- Por que #2: [resposta]
92
- Evidência: [arquivo:linha] - [código]
93
-
94
- Por que #3: [resposta]
95
- Evidência: [arquivo:linha] - [código]
96
-
97
- CAUSA RAIZ: [declaração clara]
98
- ```
99
-
100
- ---
101
-
102
- ## Passo 6: Validar Causa Raiz
103
-
104
- A causa raiz deve ser:
105
- - [ ] Algo que você pode MUDAR
106
- - [ ] Suportada por evidência de código
107
- - [ ] Explica TODOS os sintomas
108
-
109
- Se não validar: voltar ao Passo 5.
110
-
111
- ---
112
-
113
- ## Output
114
-
115
- Causa raiz documentada com evidência.
116
-
117
- ---
118
- ## PRÓXIMA FASE
119
- AÇÃO OBRIGATÓRIA: Read ~/.claude/commands/debug/02-fix.md
@@ -1,108 +0,0 @@
1
- # Fase 2: Fix
2
-
3
- ## Contexto
4
- Causa raiz identificada. Implementar fix de forma AUTÔNOMA.
5
-
6
- ---
7
-
8
- ## Passo 0: Gate de Criticidade
9
-
10
- ### 0.1 Identificar Paths Afetados
11
-
12
- Extrair arquivos da causa raiz documentada na investigacao (fase 01-investigate).
13
-
14
- ### 0.2 Lista de Paths Criticos
15
-
16
- ```
17
- PATHS_CRITICOS:
18
- - **/auth/**
19
- - **/payment/**
20
- - **/migration*/**
21
- - **/oauth*
22
- - **/credential*
23
- - **/secret*
24
- - api/middleware.ts
25
- - services/*Service.ts (core services)
26
- ```
27
-
28
- ### 0.3 Decision Gate
29
-
30
- **SE** arquivos afetados ∩ PATHS_CRITICOS **nao vazio**:
31
-
32
- 1. Documentar fix planejado:
33
- - Causa raiz (com evidencia)
34
- - Arquivos a modificar
35
- - Mudancas propostas
36
- - Riscos identificados
37
-
38
- 2. Chamar `EnterPlanMode`
39
- - Escrever plano de fix em `.claude/plans/debug-fix-{timestamp}.md`
40
- - User aprova ou rejeita via ExitPlanMode
41
-
42
- 3. Apos aprovacao: Prosseguir para Passo 1
43
-
44
- **SENAO** (nao critico):
45
- Prosseguir direto para Passo 1 (autonomia total)
46
-
47
- ---
48
-
49
- ## Passo 1: Teste de Regressao
50
-
51
- ### 1.1 Criar Teste que Reproduz o Bug
52
- ```typescript
53
- describe('[contexto do bug]', () => {
54
- it('should [comportamento esperado]', () => {
55
- // Arrange: setup que causa o bug
56
- // Act: ação que dispara o bug
57
- // Assert: verificar comportamento correto
58
- })
59
- })
60
- ```
61
-
62
- ### 1.2 Verificar que Teste FALHA
63
- ```bash
64
- npm test -- --testPathPattern="[arquivo]"
65
- ```
66
-
67
- O teste DEVE falhar antes do fix. Se passar, o teste não reproduz o bug.
68
-
69
- ---
70
-
71
- ## Passo 2: Implementar Fix
72
-
73
- ### 2.1 Fix Mínimo
74
- ```
75
- FIX:
76
- Arquivo: [arquivo:linha]
77
- Antes: [código atual]
78
- Depois: [código novo]
79
- Justificativa: [por que resolve a causa raiz]
80
- ```
81
-
82
- ### 2.2 Regras
83
- - APENAS o necessário para resolver a causa raiz
84
- - NÃO refatorar código não relacionado
85
- - NÃO adicionar features
86
- - Seguir patterns existentes do projeto
87
-
88
- ---
89
-
90
- ## Passo 3: Verificar Fix
91
-
92
- ### 3.1 Teste Deve Passar
93
- ```bash
94
- npm test -- --testPathPattern="[arquivo]"
95
- ```
96
-
97
- ### 3.2 Bug Não Reproduz
98
- Executar passos originais. Bug não deve ocorrer.
99
-
100
- ---
101
-
102
- ## Output
103
-
104
- Fix implementado. Teste de regressão passando.
105
-
106
- ---
107
- ## PRÓXIMA FASE
108
- AÇÃO OBRIGATÓRIA: Read ~/.claude/commands/debug/03-verify.md
@@ -1,66 +0,0 @@
1
- # Fase 3: Verify
2
-
3
- ## Contexto
4
- Fix implementado. Verificar e finalizar de forma AUTÔNOMA.
5
-
6
- ---
7
-
8
- ## Passo 1: Quality Gates
9
-
10
- Rodar em sequência:
11
- ```bash
12
- npm test
13
- npx tsc --noEmit
14
- npm run build
15
- ```
16
-
17
- **Se falhar:** Corrigir e rodar novamente. Não prosseguir até passar.
18
-
19
- ---
20
-
21
- ## Passo 2: Verificação Final
22
-
23
- - [ ] Testes passam
24
- - [ ] TypeScript sem erros
25
- - [ ] Build bem-sucedido
26
- - [ ] Bug não reproduz mais
27
-
28
- ---
29
-
30
- ## Passo 3: Memory Sync (se bug não-óbvio)
31
-
32
- Se o bug foi difícil de encontrar, salvar na memory:
33
-
34
- ```javascript
35
- mcp__memory__create_entities({
36
- entities: [{
37
- name: "{prefix}:bug:{nome-descritivo}",
38
- entityType: "bug",
39
- observations: [
40
- "Sintoma: [...]",
41
- "Causa raiz: [...]",
42
- "Solução: [...]",
43
- "Arquivos: [...]"
44
- ]
45
- }]
46
- })
47
- ```
48
-
49
- ---
50
-
51
- ## Passo 4: Relatório Final
52
-
53
- Reportar ao user:
54
- - Bug resolvido
55
- - Causa raiz identificada
56
- - Fix implementado
57
- - Teste de regressão criado
58
- - Quality gates passando
59
-
60
- ---
61
-
62
- ## Regras Invioláveis
63
-
64
- 1. **PROIBIDO** prosseguir com testes falhando
65
- 2. **PROIBIDO** prosseguir com build falhando
66
- 3. **PROIBIDO** perguntar ao user (só reportar no final)