kakaroto-config 1.0.5 → 1.0.6
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/config/ARCHITECTURE.md +5 -7
- package/config/CLAUDE.md +11 -0
- package/config/agents/code-reviewer.md +66 -230
- package/config/agents/code-simplifier.md +70 -116
- package/config/agents/{visual-validator.md → functional-validator.md} +118 -92
- package/config/agents/memory-sync.md +193 -134
- package/config/commands/debug/02-investigate.md +3 -3
- package/config/commands/debug/03-fix.md +28 -6
- package/config/commands/debug/05-commit.md +1 -1
- package/config/commands/debug/validators/fix-permanence.md +1 -1
- package/config/commands/feature/01-understand.md +217 -0
- package/config/commands/feature/02-analyze.md +168 -0
- package/config/commands/feature/03-strategy.md +300 -0
- package/config/commands/feature/04-red.md +160 -0
- package/config/commands/feature/05-green.md +179 -0
- package/config/commands/feature/06-quality.md +109 -0
- package/config/commands/feature/07-validation.md +168 -0
- package/config/commands/feature/08-delivery.md +86 -0
- package/config/commands/feature/09-evaluate.md +140 -0
- package/config/commands/feature/playbooks/_e2e-base.md +39 -0
- package/config/commands/feature/playbooks/api/analyze.md +20 -0
- package/config/commands/feature/playbooks/api/e2e.md +29 -0
- package/config/commands/feature/playbooks/api/red.md +66 -0
- package/config/commands/feature/playbooks/job/analyze.md +29 -0
- package/config/commands/feature/playbooks/job/e2e.md +30 -0
- package/config/commands/feature/playbooks/job/red.md +77 -0
- package/config/commands/feature/playbooks/service/analyze.md +28 -0
- package/config/commands/feature/playbooks/service/e2e.md +25 -0
- package/config/commands/feature/playbooks/service/red.md +75 -0
- package/config/commands/feature/playbooks/ui/analyze.md +26 -0
- package/config/commands/feature/playbooks/ui/e2e.md +61 -0
- package/config/commands/feature/playbooks/ui/red.md +71 -0
- package/config/commands/feature.md +37 -4
- package/config/commands/gate.md +11 -23
- package/config/templates/spec-template.md +82 -68
- package/package.json +1 -1
- package/config/agents/dry-enforcer.md +0 -227
- package/config/commands/debug/techniques/flow-tracing.md +0 -75
- package/config/commands/debug/techniques/hypothesis-generation.md +0 -30
- package/config/commands/debug/techniques/sequential-thinking-config.md +0 -79
- package/config/commands/feature/01-interview.md +0 -143
- package/config/commands/feature/02-spec.md +0 -98
- package/config/commands/feature/03-planner.md +0 -200
- package/config/commands/feature/04-implement.md +0 -81
- package/config/commands/feature/05-quality.md +0 -140
- package/config/commands/feature/06-commit.md +0 -91
- package/config/commands/feature/07-evaluate.md +0 -129
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
# Fase 5: Quality
|
|
2
|
-
|
|
3
|
-
## Contexto
|
|
4
|
-
Implementação completa. Executar quality gates de forma AUTÔNOMA.
|
|
5
|
-
|
|
6
|
-
**Regra:** Não prosseguir com testes/build falhando.
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## Passo 1: Agents de Qualidade
|
|
11
|
-
|
|
12
|
-
Executar em ordem (SE falhar, corrigir e continuar):
|
|
13
|
-
|
|
14
|
-
### 1.0 Test Fixer (BASELINE)
|
|
15
|
-
Garantir que codigo implementado passa nos testes ANTES de refatorar.
|
|
16
|
-
```javascript
|
|
17
|
-
Task({
|
|
18
|
-
subagent_type: "test-fixer",
|
|
19
|
-
prompt: "Rodar npm test. Se falhar, corrigir. NAO criar testes novos ainda - apenas garantir baseline funciona.",
|
|
20
|
-
description: "Baseline test check"
|
|
21
|
-
})
|
|
22
|
-
```
|
|
23
|
-
SE FAIL: Corrigir antes de prosseguir.
|
|
24
|
-
|
|
25
|
-
### 1.1 Code Simplifier
|
|
26
|
-
```javascript
|
|
27
|
-
Task({
|
|
28
|
-
subagent_type: "code-simplifier",
|
|
29
|
-
prompt: "Simplificar codigo implementado. Reduzir complexidade. Melhorar legibilidade.",
|
|
30
|
-
description: "Simplify new code"
|
|
31
|
-
})
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### 1.2 DRY Enforcer
|
|
35
|
-
```javascript
|
|
36
|
-
Task({
|
|
37
|
-
subagent_type: "dry-enforcer",
|
|
38
|
-
prompt: "Detectar duplicacoes no codigo novo. Sugerir abstracoes. Reutilizar codigo existente.",
|
|
39
|
-
description: "Remove duplications"
|
|
40
|
-
})
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### 1.3 Test Fixer (VERIFICACAO)
|
|
44
|
-
Garantir que refatoracoes nao quebraram nada.
|
|
45
|
-
```javascript
|
|
46
|
-
Task({
|
|
47
|
-
subagent_type: "test-fixer",
|
|
48
|
-
prompt: "Rodar npm test apos refatoracoes. Corrigir testes que falharem. Criar testes faltantes para funcoes novas.",
|
|
49
|
-
description: "Post-refactor test fix"
|
|
50
|
-
})
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### 1.4 Code Reviewer
|
|
54
|
-
```javascript
|
|
55
|
-
Task({
|
|
56
|
-
subagent_type: "code-reviewer",
|
|
57
|
-
prompt: "Review final do codigo. Verificar qualidade, seguranca, patterns do projeto.",
|
|
58
|
-
description: "Final code review"
|
|
59
|
-
})
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### 1.5 Visual Validator (SE modificou UI)
|
|
63
|
-
Apenas se modificou: `components/`, `pages/`, `app/`, `*.css`, `*.tsx`
|
|
64
|
-
```javascript
|
|
65
|
-
Task({
|
|
66
|
-
subagent_type: "visual-validator",
|
|
67
|
-
prompt: "Validar UI. Iniciar dev server. Verificar erros de console. Testar fluxos modificados.",
|
|
68
|
-
description: "Validate UI changes"
|
|
69
|
-
})
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### 1.6 Terraform Validator (SE modificou env/terraform)
|
|
73
|
-
Apenas se modificou: `.env*`, `terraform/**/*.tf`, `terraform/**/*.tfvars*`, `variables.tf`
|
|
74
|
-
```javascript
|
|
75
|
-
Task({
|
|
76
|
-
subagent_type: "terraform-validator",
|
|
77
|
-
prompt: "Validar consistência Terraform. Verificar variáveis em .env.example, variables.tf, main.tf, tfvars.example. Corrigir inconsistências.",
|
|
78
|
-
description: "Validate Terraform config"
|
|
79
|
-
})
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
### 1.7 CRUD Validation (SE nova entidade)
|
|
83
|
-
Apenas se criou novo endpoint CRUD em `api/handlers/`:
|
|
84
|
-
```javascript
|
|
85
|
-
Task({
|
|
86
|
-
subagent_type: "test-fixer",
|
|
87
|
-
prompt: "Executar CRUD smoke test. Para novos endpoints POST/PUT, testar criação e verificar response 200/201.",
|
|
88
|
-
description: "CRUD smoke test"
|
|
89
|
-
})
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
## Passo 2: Quality Gates Finais
|
|
95
|
-
|
|
96
|
-
Rodar em sequência:
|
|
97
|
-
```bash
|
|
98
|
-
npm test
|
|
99
|
-
npx tsc --noEmit
|
|
100
|
-
npm run build
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
**Se falhar:** Corrigir e rodar novamente. Não prosseguir até passar.
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## Passo 3: Memory Sync
|
|
108
|
-
|
|
109
|
-
```javascript
|
|
110
|
-
Task({
|
|
111
|
-
subagent_type: "memory-sync",
|
|
112
|
-
prompt: "Sincronizar knowledge graph. Atualizar entidades obsoletas. Criar novas para patterns/conhecimento adquirido.",
|
|
113
|
-
description: "Sync memory graph"
|
|
114
|
-
})
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## Passo 4: Relatório Final
|
|
120
|
-
|
|
121
|
-
Reportar ao user:
|
|
122
|
-
- Feature implementada
|
|
123
|
-
- Testes criados/passando
|
|
124
|
-
- Build sucesso
|
|
125
|
-
- Arquivos criados/modificados
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
## Passo 5: Checkpoint
|
|
130
|
-
|
|
131
|
-
Usar TodoWrite para marcar quality gates como "completed".
|
|
132
|
-
Adicionar "Commit: commitar e fazer push" como "pending".
|
|
133
|
-
|
|
134
|
-
**Gate:** Todos quality gates devem passar (test, tsc, build).
|
|
135
|
-
|
|
136
|
-
---
|
|
137
|
-
|
|
138
|
-
## PRÓXIMA FASE
|
|
139
|
-
AÇÃO OBRIGATÓRIA: Read ~/.claude/commands/feature/06-commit.md
|
|
140
|
-
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
# Fase 6: Commit & Push
|
|
2
|
-
|
|
3
|
-
## Contexto
|
|
4
|
-
Quality passou. Commitar e fazer push de forma AUTÔNOMA.
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Passo 1: Verificar Mudanças
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
git status
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
**Se não houver mudanças:** Reportar "Nada a commitar" → FIM
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Passo 2: Analisar Diff
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
git diff --stat
|
|
22
|
-
git log --oneline -3
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Usar diff para gerar mensagem descritiva.
|
|
26
|
-
Usar log para seguir padrão de commits existentes.
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## Passo 3: Commit
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
git add -A
|
|
34
|
-
git commit -m "$(cat <<'EOF'
|
|
35
|
-
{type}: {descrição concisa em inglês}
|
|
36
|
-
|
|
37
|
-
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
38
|
-
EOF
|
|
39
|
-
)"
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
**Tipos:**
|
|
43
|
-
- `feat:` nova funcionalidade
|
|
44
|
-
- `fix:` correção de bug
|
|
45
|
-
- `refactor:` reestruturação sem mudar comportamento
|
|
46
|
-
- `docs:` documentação
|
|
47
|
-
- `test:` testes
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## Passo 4: Push
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
git push
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
**Se falhar:** Reportar erro ao user.
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
## Passo 5: Confirmar
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
git status
|
|
65
|
-
git log --oneline -1
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Reportar ao user: commit criado e pushed.
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
## Passo 6: Checkpoint
|
|
73
|
-
|
|
74
|
-
Usar TodoWrite para marcar commit como "completed".
|
|
75
|
-
Adicionar "Evaluate: auto-avaliação do workflow" como "pending".
|
|
76
|
-
|
|
77
|
-
**Gate:** Commit deve estar pushed com sucesso.
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## Regras
|
|
82
|
-
|
|
83
|
-
1. **1 feature = 1 commit atômico**
|
|
84
|
-
2. **Mensagem em inglês**
|
|
85
|
-
3. **NUNCA** --force push
|
|
86
|
-
4. **NUNCA** commitar se quality falhou
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## PROXIMA FASE
|
|
91
|
-
ACAO OBRIGATORIA: Read ~/.claude/commands/feature/07-evaluate.md
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
# Fase 7: Auto-Avaliacao
|
|
2
|
-
|
|
3
|
-
## Contexto
|
|
4
|
-
Commit feito. Avaliar workflow e propor melhorias ao config.
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Passo 1: Coletar Metricas
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
git diff --stat HEAD~1
|
|
12
|
-
git log -1 --format="%s"
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Ler:
|
|
16
|
-
- .claude/specs/current.md (spec implementada)
|
|
17
|
-
- .claude/plans/current.md (plano seguido)
|
|
18
|
-
|
|
19
|
-
Coletar:
|
|
20
|
-
- Arquivos modificados
|
|
21
|
-
- Linhas adicionadas/removidas
|
|
22
|
-
- Testes criados
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Passo 2: Sequential Thinking #1 - DIAGNOSTICO
|
|
27
|
-
|
|
28
|
-
Usar mcp__sequential-thinking__sequentialthinking para:
|
|
29
|
-
|
|
30
|
-
**Objetivo:** Identificar problemas e causas raiz
|
|
31
|
-
|
|
32
|
-
### 2.1 Avaliar Criterios (0-100%)
|
|
33
|
-
|
|
34
|
-
| Criterio | Peso | Como Medir |
|
|
35
|
-
|----------|------|------------|
|
|
36
|
-
| Completude | 40% | Todos itens do spec implementados? |
|
|
37
|
-
| Qualidade | 20% | Code review passou limpo? Issues criticas? |
|
|
38
|
-
| Testes | 15% | Funcoes novas tem cobertura? |
|
|
39
|
-
| Build | 10% | Passou na primeira tentativa? |
|
|
40
|
-
| Autonomia | 10% | Quantas perguntas ao user? (ideal: <=2) |
|
|
41
|
-
| Docs | 5% | Spec/plan refletem implementacao final? |
|
|
42
|
-
|
|
43
|
-
### 2.2 Para Criterios < 80%: Aplicar 5 Whys
|
|
44
|
-
|
|
45
|
-
1. Por que o score foi baixo?
|
|
46
|
-
2. Qual foi a causa raiz?
|
|
47
|
-
3. O que poderia ter prevenido?
|
|
48
|
-
4. Que informacao/regra faltou?
|
|
49
|
-
5. Onde essa informacao deveria estar?
|
|
50
|
-
|
|
51
|
-
**Output esperado:** Lista de {problema, causa_raiz, local_ideal}
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
## Passo 3: Sequential Thinking #2 - SINTESE
|
|
56
|
-
|
|
57
|
-
Usar mcp__sequential-thinking__sequentialthinking novamente:
|
|
58
|
-
|
|
59
|
-
**Objetivo:** Transformar diagnosticos em mudancas acionaveis
|
|
60
|
-
|
|
61
|
-
Para cada problema identificado no Passo 2:
|
|
62
|
-
|
|
63
|
-
1. **Tipo de mudanca?**
|
|
64
|
-
- Config: Regra no CLAUDE.md
|
|
65
|
-
- Skill: Gate/validacao em fase
|
|
66
|
-
- Pattern: Conhecimento para memoria
|
|
67
|
-
|
|
68
|
-
2. **Qual arquivo editar?**
|
|
69
|
-
- ~/.claude/CLAUDE.md
|
|
70
|
-
- ~/.claude/commands/feature/*.md
|
|
71
|
-
- ~/.claude/commands/debug/*.md
|
|
72
|
-
|
|
73
|
-
3. **Diff exato da mudanca?**
|
|
74
|
-
- Escrever o texto exato a adicionar
|
|
75
|
-
|
|
76
|
-
4. **Efeitos colaterais?**
|
|
77
|
-
- Vai afetar outros workflows?
|
|
78
|
-
- Pode causar falsos positivos?
|
|
79
|
-
|
|
80
|
-
5. **Prioridade?**
|
|
81
|
-
- Alta: Problema recorrente ou critico
|
|
82
|
-
- Media: Melhoria de qualidade
|
|
83
|
-
- Baixa: Nice-to-have
|
|
84
|
-
|
|
85
|
-
**Output esperado:** Lista de {tipo, arquivo, diff_sugerido, prioridade}
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## Passo 4: Propor Melhorias ao Usuario
|
|
90
|
-
|
|
91
|
-
Para cada melhoria identificada (MAXIMO 3 por execucao):
|
|
92
|
-
|
|
93
|
-
```javascript
|
|
94
|
-
AskUserQuestion({
|
|
95
|
-
questions: [{
|
|
96
|
-
question: "Detectei: {problema}. Causa: {causa_raiz}. Sugiro adicionar em {arquivo}: '{diff}'. Aplicar?",
|
|
97
|
-
header: "Melhoria",
|
|
98
|
-
options: [
|
|
99
|
-
{ label: "Aplicar", description: "Editar {arquivo} com a mudanca sugerida" },
|
|
100
|
-
{ label: "Ignorar", description: "Pular desta vez, pode sugerir novamente" },
|
|
101
|
-
{ label: "Nunca sugerir", description: "Adicionar excecao permanente" }
|
|
102
|
-
],
|
|
103
|
-
multiSelect: false
|
|
104
|
-
}]
|
|
105
|
-
})
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Acoes por Resposta:
|
|
109
|
-
- **Aplicar:** Usar Edit tool para modificar arquivo
|
|
110
|
-
- **Ignorar:** Prosseguir sem acao
|
|
111
|
-
- **Nunca sugerir:** Adicionar em ~/.claude/evaluation-exceptions.json
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
## Passo 5: Finalizar
|
|
116
|
-
|
|
117
|
-
Reportar ao user:
|
|
118
|
-
|
|
119
|
-
```
|
|
120
|
-
## Avaliacao do Workflow
|
|
121
|
-
|
|
122
|
-
**Score Final:** X% (Completude: X%, Qualidade: X%, Testes: X%, Build: X%, Autonomia: X%, Docs: X%)
|
|
123
|
-
|
|
124
|
-
**Melhorias Aplicadas:** N
|
|
125
|
-
- [lista de mudancas aplicadas]
|
|
126
|
-
|
|
127
|
-
**Workflow /feature concluido.**
|
|
128
|
-
```
|
|
129
|
-
|