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.
- package/README.md +122 -16
- package/bin/install.js +27 -5
- package/bin/release.js +255 -0
- package/config/ARCHITECTURE.md +3 -1
- package/config/CLAUDE.md +4 -0
- package/config/agents/memory-sync.md +87 -19
- package/config/agents/test-fixer.md +24 -0
- package/config/agents/visual-validator.md +17 -0
- package/config/commands/debug/01-reproduce.md +120 -0
- package/config/commands/debug/02-investigate.md +93 -0
- package/config/commands/debug/03-fix.md +110 -0
- package/config/commands/debug/04-verify.md +155 -0
- package/config/commands/debug/05-commit.md +106 -0
- package/config/commands/debug/06-evaluate.md +137 -0
- package/config/commands/debug/playbooks/api.md +21 -0
- package/config/commands/debug/playbooks/backend.md +19 -0
- package/config/commands/debug/playbooks/infra.md +130 -0
- package/config/commands/debug/playbooks/integration.md +16 -0
- package/config/commands/debug/playbooks/job.md +19 -0
- package/config/commands/debug/playbooks/test.md +14 -0
- package/config/commands/debug/playbooks/ui.md +24 -0
- package/config/commands/debug/self-healing.md +99 -0
- package/config/commands/debug/techniques/flow-tracing.md +75 -0
- package/config/commands/debug/techniques/hypothesis-generation.md +30 -0
- package/config/commands/debug/techniques/sequential-thinking-config.md +79 -0
- package/config/commands/debug/templates/diagnosis-script.md +72 -0
- package/config/commands/debug/templates/reproduction-doc.md +60 -0
- package/config/commands/debug/templates/root-cause-doc.md +46 -0
- package/config/commands/debug/validators/criticality-gate.md +40 -0
- package/config/commands/debug/validators/evidence-requirements.md +48 -0
- package/config/commands/debug/validators/fix-permanence.md +56 -0
- package/config/commands/debug/validators/root-cause-validation.md +50 -0
- package/config/commands/debug.md +3 -3
- package/config/commands/feature/01-interview.md +82 -90
- package/config/commands/feature/02-spec.md +22 -98
- package/config/commands/feature/03-planner.md +81 -4
- package/config/commands/feature/04-implement.md +15 -8
- package/config/commands/feature/05-quality.md +23 -5
- package/config/commands/feature/06-commit.md +91 -0
- package/config/commands/feature/07-evaluate.md +129 -0
- package/config/commands/feature.md +1 -7
- package/config/templates/spec-template.md +92 -0
- package/package.json +4 -1
- package/config/commands/debug/01-investigate.md +0 -119
- package/config/commands/debug/02-fix.md +0 -108
- package/config/commands/debug/03-verify.md +0 -66
|
@@ -3,15 +3,23 @@
|
|
|
3
3
|
## Passo 0: Context
|
|
4
4
|
|
|
5
5
|
Contexto de projeto ja carregado em 01-interview (mesma sessao).
|
|
6
|
-
Buscar apenas patterns para reutilizacao:
|
|
7
6
|
|
|
7
|
+
### 0.1 Carregar Respostas da Interview
|
|
8
|
+
```
|
|
9
|
+
Read .claude/interviews/current.md
|
|
10
|
+
```
|
|
11
|
+
Este arquivo contém: perguntas respondidas, decisões implícitas, termos-chave.
|
|
12
|
+
**Usar como referência** para manter consistência com o que foi acordado.
|
|
13
|
+
|
|
14
|
+
### 0.2 Buscar Patterns (se necessário)
|
|
8
15
|
```
|
|
9
16
|
mcp__memory__search_nodes({ query: "pattern" })
|
|
10
17
|
```
|
|
11
18
|
|
|
12
|
-
SE retomando
|
|
19
|
+
### 0.3 SE retomando sessão interrompida
|
|
13
20
|
```
|
|
14
|
-
Read .claude/
|
|
21
|
+
Read .claude/interviews/current.md (contexto original)
|
|
22
|
+
Read .claude/specs/current.md (spec parcial, se existir)
|
|
15
23
|
```
|
|
16
24
|
|
|
17
25
|
---
|
|
@@ -38,7 +46,7 @@ Grep: termos da feature em services/, utils/, lib/
|
|
|
38
46
|
Glob: arquivos com nomes similares
|
|
39
47
|
```
|
|
40
48
|
|
|
41
|
-
###
|
|
49
|
+
### 2.2 Mapear Reutilização
|
|
42
50
|
| Necessidade | Código Existente | Ação |
|
|
43
51
|
|-------------|------------------|------|
|
|
44
52
|
| [o que precisa] | [arquivo:linha] | Reutilizar/Estender/Criar |
|
|
@@ -47,88 +55,15 @@ Glob: arquivos com nomes similares
|
|
|
47
55
|
|
|
48
56
|
---
|
|
49
57
|
|
|
50
|
-
## Passo
|
|
51
|
-
|
|
52
|
-
```markdown
|
|
53
|
-
# Spec: [Nome da Feature]
|
|
54
|
-
|
|
55
|
-
**Status:** Draft
|
|
56
|
-
|
|
57
|
-
## Problema
|
|
58
|
-
[1-2 frases - o problema, não a solução]
|
|
59
|
-
|
|
60
|
-
## Solução
|
|
61
|
-
[Descrição de alto nível]
|
|
62
|
-
|
|
63
|
-
## Escopo
|
|
64
|
-
|
|
65
|
-
### Inclui
|
|
66
|
-
- [Deliverable 1]
|
|
67
|
-
- [Deliverable 2]
|
|
68
|
-
|
|
69
|
-
### Não Inclui
|
|
70
|
-
- [O que não será feito]
|
|
71
|
-
|
|
72
|
-
## Design Técnico
|
|
73
|
-
|
|
74
|
-
### Dados
|
|
75
|
-
[Estruturas, campos novos, tabelas]
|
|
76
|
-
|
|
77
|
-
### Services
|
|
78
|
-
| Service | Mudanças |
|
|
79
|
-
|---------|----------|
|
|
80
|
-
| [nome] | [o que muda] |
|
|
81
|
-
|
|
82
|
-
### API (se aplicável)
|
|
83
|
-
[Endpoints, signatures]
|
|
58
|
+
## Passo 3: Gerar Spec
|
|
84
59
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
| [erro] | [o que acontece] |
|
|
89
|
-
|
|
90
|
-
### Reutilização Obrigatória
|
|
91
|
-
| Existente | Uso |
|
|
92
|
-
|-----------|-----|
|
|
93
|
-
| [código] | [como usar] |
|
|
94
|
-
|
|
95
|
-
### Justificativa para Código Novo
|
|
96
|
-
| Novo Código | Por que não reutilizar existente? |
|
|
97
|
-
|-------------|-----------------------------------|
|
|
98
|
-
| [arquivo/função] | [justificativa] |
|
|
99
|
-
|
|
100
|
-
## UI/UX (se aplicável)
|
|
101
|
-
|
|
102
|
-
### Fluxo
|
|
103
|
-
1. User faz X
|
|
104
|
-
2. Sistema responde Y
|
|
105
|
-
|
|
106
|
-
### Estados
|
|
107
|
-
| Estado | Display |
|
|
108
|
-
|--------|---------|
|
|
109
|
-
| Loading | [desc] |
|
|
110
|
-
| Empty | [desc] |
|
|
111
|
-
| Error | [desc] |
|
|
112
|
-
| Success | [desc] |
|
|
113
|
-
|
|
114
|
-
## Edge Cases
|
|
115
|
-
| Caso | Tratamento |
|
|
116
|
-
|------|------------|
|
|
117
|
-
| [edge] | [como tratar] |
|
|
118
|
-
|
|
119
|
-
## Testes
|
|
120
|
-
|
|
121
|
-
### Unitários (OBRIGATÓRIO)
|
|
122
|
-
| Função | Arquivo Teste | Casos |
|
|
123
|
-
|--------|---------------|-------|
|
|
124
|
-
| [func] | [file.test.ts] | [casos] |
|
|
125
|
-
|
|
126
|
-
## Decisões
|
|
127
|
-
| Decisão | Justificativa |
|
|
128
|
-
|---------|---------------|
|
|
129
|
-
| [escolha] | [por quê] |
|
|
60
|
+
Carregar template:
|
|
61
|
+
```
|
|
62
|
+
Read ~/.claude/templates/spec-template.md
|
|
130
63
|
```
|
|
131
64
|
|
|
65
|
+
Preencher template com informações coletadas na interview.
|
|
66
|
+
|
|
132
67
|
---
|
|
133
68
|
|
|
134
69
|
## Output
|
|
@@ -138,7 +73,7 @@ Glob: arquivos com nomes similares
|
|
|
138
73
|
|
|
139
74
|
---
|
|
140
75
|
|
|
141
|
-
## Passo
|
|
76
|
+
## Passo 4: Persistir Spec
|
|
142
77
|
|
|
143
78
|
1. Gerar slug: primeira palavra do problema + data
|
|
144
79
|
Exemplo: `filtro-2026-01-10.md`
|
|
@@ -153,21 +88,10 @@ Glob: arquivos com nomes similares
|
|
|
153
88
|
|
|
154
89
|
---
|
|
155
90
|
|
|
156
|
-
## Passo
|
|
157
|
-
|
|
158
|
-
Atualizar TodoWrite com conclusao da spec:
|
|
91
|
+
## Passo 5: Checkpoint
|
|
159
92
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
todos: [
|
|
163
|
-
// items anteriores como completed
|
|
164
|
-
{ content: "Spec: especificacao gerada", status: "completed", activeForm: "Generating spec" },
|
|
165
|
-
{ content: "Spec: reutilizacao mapeada", status: "completed", activeForm: "Mapping reuse" },
|
|
166
|
-
{ content: "Spec: spec persistida em arquivo", status: "completed", activeForm: "Persisting spec" },
|
|
167
|
-
{ content: "Planner: criar plano de tarefas", status: "pending", activeForm: "Creating plan" }
|
|
168
|
-
]
|
|
169
|
-
})
|
|
170
|
-
```
|
|
93
|
+
Usar TodoWrite para registrar items da fase Spec como "completed".
|
|
94
|
+
Adicionar "Planner: criar plano de tarefas" como "pending".
|
|
171
95
|
|
|
172
96
|
---
|
|
173
97
|
## PROXIMA FASE
|
|
@@ -5,9 +5,18 @@
|
|
|
5
5
|
SE continuacao direta de 02-spec (mesma sessao):
|
|
6
6
|
Contexto ja disponivel, prosseguir
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
### 0.1 Carregar Contexto da Interview (SE necessário)
|
|
9
9
|
```
|
|
10
|
-
Read .claude/
|
|
10
|
+
Read .claude/interviews/current.md
|
|
11
|
+
```
|
|
12
|
+
Consultar SE surgir dúvida sobre decisões já tomadas na Interview.
|
|
13
|
+
Evita re-perguntar o que já foi respondido.
|
|
14
|
+
|
|
15
|
+
### 0.2 SE retomando sessão interrompida
|
|
16
|
+
```
|
|
17
|
+
Read .claude/interviews/current.md (decisões originais)
|
|
18
|
+
Read .claude/specs/current.md (spec aprovada)
|
|
19
|
+
Read .claude/plans/current.md (plano parcial, se existir)
|
|
11
20
|
```
|
|
12
21
|
|
|
13
22
|
---
|
|
@@ -95,7 +104,62 @@ Apos implementacao:
|
|
|
95
104
|
|
|
96
105
|
---
|
|
97
106
|
|
|
98
|
-
## Passo 7:
|
|
107
|
+
## Passo 7: Registro de Decisões
|
|
108
|
+
|
|
109
|
+
### 7.1 Decisões Tomadas
|
|
110
|
+
Documentar decisões feitas autonomamente durante o planejamento:
|
|
111
|
+
|
|
112
|
+
| Decisão | Opções Consideradas | Escolha | Justificativa |
|
|
113
|
+
|---------|---------------------|---------|---------------|
|
|
114
|
+
| [ex: estrutura de dados] | Array / Map | Map | Lookup O(1) necessário |
|
|
115
|
+
| [ex: local do código] | services/ / utils/ | services/ | Segue pattern existente |
|
|
116
|
+
|
|
117
|
+
### 7.2 Decisões Pendentes
|
|
118
|
+
Listar decisões que APENAS o user pode tomar:
|
|
119
|
+
|
|
120
|
+
| Decisão | Opções | Impacto na Feature |
|
|
121
|
+
|---------|--------|-------------------|
|
|
122
|
+
| [ex: formato export] | CSV / JSON / Excel | Afeta UX de download |
|
|
123
|
+
|
|
124
|
+
**Critérios para classificar como "Pendente":**
|
|
125
|
+
1. Impacta comportamento/UX visível ao user final
|
|
126
|
+
2. Não existe default claro no projeto
|
|
127
|
+
3. Não foi respondida na Interview (verificar interviews/current.md)
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Passo 8: Clarificações (CONDICIONAL)
|
|
132
|
+
|
|
133
|
+
**SE "Decisões Pendentes" NÃO estiver vazio:**
|
|
134
|
+
|
|
135
|
+
Usar AskUserQuestion para resolver cada decisão pendente.
|
|
136
|
+
**Limite:** Máximo 5 perguntas por execução.
|
|
137
|
+
|
|
138
|
+
```javascript
|
|
139
|
+
AskUserQuestion({
|
|
140
|
+
questions: [{
|
|
141
|
+
question: "[Decisão pendente como pergunta]",
|
|
142
|
+
header: "[2-3 palavras]",
|
|
143
|
+
options: [
|
|
144
|
+
{ label: "[Opção A]", description: "[trade-off/impacto]" },
|
|
145
|
+
{ label: "[Opção B]", description: "[trade-off/impacto]" }
|
|
146
|
+
],
|
|
147
|
+
multiSelect: false
|
|
148
|
+
}]
|
|
149
|
+
})
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Após respostas:
|
|
153
|
+
1. Mover decisões de "Pendentes" para "Tomadas"
|
|
154
|
+
2. Adicionar resposta do user na coluna "Escolha"
|
|
155
|
+
3. Atualizar plano se necessário
|
|
156
|
+
|
|
157
|
+
**SE "Decisões Pendentes" estiver vazio:**
|
|
158
|
+
Prosseguir direto para Passo 9.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Passo 9: Persistir Plano
|
|
99
163
|
|
|
100
164
|
1. Usar mesmo slug da spec (gerado em 02-spec)
|
|
101
165
|
|
|
@@ -107,12 +171,25 @@ Apos implementacao:
|
|
|
107
171
|
|
|
108
172
|
---
|
|
109
173
|
|
|
174
|
+
## Passo 10: Checkpoint
|
|
175
|
+
|
|
176
|
+
Usar TodoWrite para registrar items da fase Planner como "completed".
|
|
177
|
+
Adicionar "Implement: executar plano aprovado" como "pending".
|
|
178
|
+
|
|
179
|
+
**Gates:**
|
|
180
|
+
- Plano deve estar salvo
|
|
181
|
+
- "Decisões Pendentes" deve estar vazio (todas resolvidas)
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
110
185
|
## Output
|
|
111
186
|
|
|
112
187
|
1. Salvar plano (usar TodoWrite para tracking)
|
|
113
|
-
2. Chamar `EnterPlanMode`
|
|
188
|
+
2. Chamar `EnterPlanMode` (não AskUserQuestion para aprovação)
|
|
114
189
|
3. **AGUARDAR aprovacao do user**
|
|
115
190
|
|
|
191
|
+
**Nota:** EnterPlanMode é para aprovar o PLANO. Decisões pendentes devem ser resolvidas ANTES via AskUserQuestion (Passo 8).
|
|
192
|
+
|
|
116
193
|
---
|
|
117
194
|
|
|
118
195
|
## Pos-Aprovacao
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
## Contexto
|
|
4
4
|
Plano foi aprovado. Executar de forma AUTÔNOMA até o fim.
|
|
5
5
|
|
|
6
|
+
**Regras desta fase:**
|
|
7
|
+
- Executar sem pedir confirmação ao user
|
|
8
|
+
- Erros devem ser corrigidos, não abandonados
|
|
9
|
+
- Seguir spec aprovada, não modificar escopo
|
|
10
|
+
- Toda função nova precisa de teste
|
|
11
|
+
|
|
6
12
|
---
|
|
7
13
|
|
|
8
14
|
## Passo 1: Setup
|
|
@@ -56,6 +62,15 @@ Se falhar: corrigir e continuar (não parar).
|
|
|
56
62
|
|
|
57
63
|
---
|
|
58
64
|
|
|
65
|
+
## Passo 4: Checkpoint
|
|
66
|
+
|
|
67
|
+
Usar TodoWrite para marcar todas tarefas de implementação como "completed".
|
|
68
|
+
Adicionar "Quality: executar quality gates" como "pending".
|
|
69
|
+
|
|
70
|
+
**Gate:** Todas tarefas do plano devem estar "completed".
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
59
74
|
## Output
|
|
60
75
|
|
|
61
76
|
Implementação completa.
|
|
@@ -64,11 +79,3 @@ Implementação completa.
|
|
|
64
79
|
## PRÓXIMA FASE
|
|
65
80
|
AÇÃO OBRIGATÓRIA: Read ~/.claude/commands/feature/05-quality.md
|
|
66
81
|
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Regras Invioláveis
|
|
70
|
-
|
|
71
|
-
1. **PROIBIDO** pedir confirmação ao user
|
|
72
|
-
2. **PROIBIDO** abandonar por erro (corrigir e continuar)
|
|
73
|
-
3. **PROIBIDO** modificar escopo (seguir spec aprovada)
|
|
74
|
-
4. **PROIBIDO** pular testes
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
## Contexto
|
|
4
4
|
Implementação completa. Executar quality gates de forma AUTÔNOMA.
|
|
5
5
|
|
|
6
|
+
**Regra:** Não prosseguir com testes/build falhando.
|
|
7
|
+
|
|
6
8
|
---
|
|
7
9
|
|
|
8
10
|
## Passo 1: Agents de Qualidade
|
|
@@ -77,6 +79,16 @@ Task({
|
|
|
77
79
|
})
|
|
78
80
|
```
|
|
79
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
|
+
|
|
80
92
|
---
|
|
81
93
|
|
|
82
94
|
## Passo 2: Quality Gates Finais
|
|
@@ -114,9 +126,15 @@ Reportar ao user:
|
|
|
114
126
|
|
|
115
127
|
---
|
|
116
128
|
|
|
117
|
-
##
|
|
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
|
|
118
140
|
|
|
119
|
-
1. **PROIBIDO** pular agents de qualidade
|
|
120
|
-
2. **PROIBIDO** prosseguir com testes falhando
|
|
121
|
-
3. **PROIBIDO** prosseguir com build falhando
|
|
122
|
-
4. **PROIBIDO** perguntar ao user (só reportar no final)
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
|
@@ -0,0 +1,129 @@
|
|
|
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
|
+
|
|
@@ -10,10 +10,4 @@ AÇÃO OBRIGATÓRIA: Read ~/.claude/commands/feature/01-interview.md
|
|
|
10
10
|
Seguir instruções. Cada fase aponta para a próxima.
|
|
11
11
|
|
|
12
12
|
## Fluxo
|
|
13
|
-
Interview → Spec → Planner → [APROVAÇÃO] → Implement → Quality →
|
|
14
|
-
|
|
15
|
-
## Regras
|
|
16
|
-
1. PROIBIDO parar entre fases (exceto EnterPlanMode)
|
|
17
|
-
2. PROIBIDO AskUserQuestion para aprovar spec/planner
|
|
18
|
-
3. PROIBIDO pedir confirmação após aprovação do plano
|
|
19
|
-
4. Erros: corrigir e continuar, não abandonar
|
|
13
|
+
Interview → Spec → Planner → [APROVAÇÃO] → Implement → Quality → Commit → Evaluate
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Spec: [Nome da Feature]
|
|
2
|
+
|
|
3
|
+
**Status:** Draft
|
|
4
|
+
|
|
5
|
+
## Problema
|
|
6
|
+
[1-2 frases - o problema, não a solução]
|
|
7
|
+
|
|
8
|
+
## Solução
|
|
9
|
+
[Descrição de alto nível]
|
|
10
|
+
|
|
11
|
+
## Escopo
|
|
12
|
+
|
|
13
|
+
### Inclui
|
|
14
|
+
- [Deliverable 1]
|
|
15
|
+
- [Deliverable 2]
|
|
16
|
+
|
|
17
|
+
### Não Inclui
|
|
18
|
+
- [O que não será feito]
|
|
19
|
+
|
|
20
|
+
## Design Técnico
|
|
21
|
+
|
|
22
|
+
### Dados
|
|
23
|
+
[Estruturas, campos novos, tabelas]
|
|
24
|
+
|
|
25
|
+
### Services
|
|
26
|
+
| Service | Mudanças |
|
|
27
|
+
|---------|----------|
|
|
28
|
+
| [nome] | [o que muda] |
|
|
29
|
+
|
|
30
|
+
### API (se aplicável)
|
|
31
|
+
[Endpoints, signatures]
|
|
32
|
+
|
|
33
|
+
### Tratamento de Erros
|
|
34
|
+
| Cenário | Comportamento |
|
|
35
|
+
|---------|---------------|
|
|
36
|
+
| [erro] | [o que acontece] |
|
|
37
|
+
|
|
38
|
+
### Reutilização Obrigatória
|
|
39
|
+
| Existente | Uso |
|
|
40
|
+
|-----------|-----|
|
|
41
|
+
| [código] | [como usar] |
|
|
42
|
+
|
|
43
|
+
### Justificativa para Código Novo
|
|
44
|
+
| Novo Código | Por que não reutilizar existente? |
|
|
45
|
+
|-------------|-----------------------------------|
|
|
46
|
+
| [arquivo/função] | [justificativa] |
|
|
47
|
+
|
|
48
|
+
## UI/UX (se aplicável)
|
|
49
|
+
|
|
50
|
+
### Fluxo
|
|
51
|
+
1. User faz X
|
|
52
|
+
2. Sistema responde Y
|
|
53
|
+
|
|
54
|
+
### Estados
|
|
55
|
+
| Estado | Display |
|
|
56
|
+
|--------|---------|
|
|
57
|
+
| Loading | [desc] |
|
|
58
|
+
| Empty | [desc] |
|
|
59
|
+
| Error | [desc] |
|
|
60
|
+
| Success | [desc] |
|
|
61
|
+
|
|
62
|
+
## Edge Cases
|
|
63
|
+
| Caso | Tratamento |
|
|
64
|
+
|------|------------|
|
|
65
|
+
| [edge] | [como tratar] |
|
|
66
|
+
|
|
67
|
+
## Testes
|
|
68
|
+
|
|
69
|
+
### Unitários (OBRIGATÓRIO)
|
|
70
|
+
| Função | Arquivo Teste | Casos |
|
|
71
|
+
|--------|---------------|-------|
|
|
72
|
+
| [func] | [file.test.ts] | [casos] |
|
|
73
|
+
|
|
74
|
+
### API/Integração (SE CRUD)
|
|
75
|
+
| Endpoint | Método | Casos |
|
|
76
|
+
|----------|--------|-------|
|
|
77
|
+
| [/api/X] | [POST] | [criar, validação 400, erro 500] |
|
|
78
|
+
|
|
79
|
+
### E2E/Smoke (SE UI)
|
|
80
|
+
| Fluxo | Verificação |
|
|
81
|
+
|-------|-------------|
|
|
82
|
+
| [Criar via form] | [Entidade aparece na lista] |
|
|
83
|
+
|
|
84
|
+
### Infraestrutura (SE Banco)
|
|
85
|
+
| Recurso | Configuração |
|
|
86
|
+
|---------|--------------|
|
|
87
|
+
| [Collection X] | [Índice: accountId + createdAt DESC] |
|
|
88
|
+
|
|
89
|
+
## Decisões
|
|
90
|
+
| Decisão | Justificativa |
|
|
91
|
+
|---------|---------------|
|
|
92
|
+
| [escolha] | [por quê] |
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kakaroto-config",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Claude Code configuration by Pedro Jahara - autonomous workflows for /feature, /debug, /gate",
|
|
5
5
|
"bin": {
|
|
6
6
|
"kakaroto-config": "./bin/install.js"
|
|
7
7
|
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"release": "node bin/release.js"
|
|
10
|
+
},
|
|
8
11
|
"files": [
|
|
9
12
|
"bin",
|
|
10
13
|
"config"
|