@luanpdd/kit-mcp 1.9.0 → 1.11.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.
- package/CHANGELOG.md +86 -0
- package/README.md +58 -0
- package/gates/ai-prompt-stability.md +120 -0
- package/gates/golden-signals-coverage.md +133 -0
- package/gates/legacy-refactor-safety.md +178 -0
- package/gates/observability-coverage.md +151 -0
- package/gates/postmortem-template-required.md +127 -0
- package/gates/prr-checklist-coverage.md +128 -0
- package/gates/release-pipeline-policy.md +132 -0
- package/kit/COMANDOS.md +15 -0
- package/kit/agents/ai-mutation-tester.md +298 -0
- package/kit/agents/cascading-failures-auditor.md +306 -0
- package/kit/agents/executor.md +13 -0
- package/kit/agents/golden-signals-instrumenter.md +241 -0
- package/kit/agents/legacy-characterizer.md +378 -0
- package/kit/agents/load-shedding-instrumenter.md +297 -0
- package/kit/agents/observability-coverage-auditor.md +325 -0
- package/kit/agents/omm-auditor.md +99 -0
- package/kit/agents/payload-capture-instrumenter.md +283 -0
- package/kit/agents/planner.md +29 -0
- package/kit/agents/postmortem-writer.md +282 -0
- package/kit/agents/prr-conductor.md +296 -0
- package/kit/agents/refactor-safety-auditor.md +414 -0
- package/kit/agents/release-pipeline-auditor.md +360 -0
- package/kit/agents/seam-finder.md +367 -0
- package/kit/agents/shotgun-surgery-detector.md +359 -0
- package/kit/agents/storytelling-analyst.md +309 -0
- package/kit/agents/supabase-architect.md +49 -0
- package/kit/agents/supabase-edge-fn-writer.md +114 -0
- package/kit/agents/supabase-migration-writer.md +80 -0
- package/kit/agents/supabase-storage-implementer.md +156 -0
- package/kit/agents/toil-auditor.md +277 -0
- package/kit/agents/verifier.md +30 -0
- package/kit/commands/auditar-cascading.md +111 -0
- package/kit/commands/auditar-marco.md +124 -1
- package/kit/commands/auditar-observabilidade-cobertura.md +183 -0
- package/kit/commands/auditar-refactor.md +219 -0
- package/kit/commands/auditar-release.md +109 -0
- package/kit/commands/auditar-toil.md +129 -0
- package/kit/commands/capturar-payloads.md +193 -0
- package/kit/commands/caracterizar-prompt.md +195 -0
- package/kit/commands/caracterizar.md +212 -0
- package/kit/commands/concluir-marco.md +95 -1
- package/kit/commands/detectar-duplicacao.md +197 -0
- package/kit/commands/discutir-fase.md +41 -0
- package/kit/commands/encontrar-seams.md +136 -0
- package/kit/commands/forense.md +103 -1
- package/kit/commands/golden-signals.md +142 -0
- package/kit/commands/legacy.md +263 -0
- package/kit/commands/load-shedding.md +117 -0
- package/kit/commands/observabilidade.md +2 -0
- package/kit/commands/postmortem.md +179 -0
- package/kit/commands/prr.md +205 -0
- package/kit/commands/refactor-seguro.md +321 -0
- package/kit/commands/risk-budget.md +220 -0
- package/kit/commands/sre.md +230 -0
- package/kit/commands/storytelling.md +179 -0
- package/kit/skills/_shared-legacy/glossary.md +389 -0
- package/kit/skills/_shared-sre/glossary.md +712 -0
- package/kit/skills/ai-prompt-characterization/SKILL.md +335 -0
- package/kit/skills/blameless-postmortems/SKILL.md +340 -0
- package/kit/skills/cascading-failures/SKILL.md +307 -0
- package/kit/skills/eliminating-toil/SKILL.md +243 -0
- package/kit/skills/event-based-slos/SKILL.md +22 -0
- package/kit/skills/four-golden-signals/SKILL.md +314 -0
- package/kit/skills/hermetic-builds/SKILL.md +323 -0
- package/kit/skills/legacy-api-only-applications/SKILL.md +358 -0
- package/kit/skills/legacy-characterization-tests/SKILL.md +330 -0
- package/kit/skills/legacy-effect-analysis/SKILL.md +331 -0
- package/kit/skills/legacy-extract-class/SKILL.md +203 -0
- package/kit/skills/legacy-monster-methods/SKILL.md +444 -0
- package/kit/skills/legacy-programming-by-difference/SKILL.md +252 -0
- package/kit/skills/legacy-seams-and-test-harness/SKILL.md +460 -0
- package/kit/skills/legacy-shotgun-surgery/SKILL.md +286 -0
- package/kit/skills/legacy-sprout-wrap-techniques/SKILL.md +434 -0
- package/kit/skills/legacy-storytelling-naked-crc/SKILL.md +270 -0
- package/kit/skills/llm-as-dependency/SKILL.md +436 -0
- package/kit/skills/load-shedding-graceful-degradation/SKILL.md +396 -0
- package/kit/skills/pre-refactor-characterization/SKILL.md +421 -0
- package/kit/skills/production-readiness-review/SKILL.md +305 -0
- package/kit/skills/release-engineering/SKILL.md +367 -0
- package/kit/skills/retry-strategies/SKILL.md +372 -0
- package/kit/skills/sre-risk-management/SKILL.md +221 -0
- package/package.json +2 -2
|
@@ -151,4 +151,98 @@ Gate executável: `gates/omm-no-regression.md`.
|
|
|
151
151
|
Skill consultada: [`observability-maturity-model`](../skills/observability-maturity-model/SKILL.md).
|
|
152
152
|
|
|
153
153
|
**REQ:** INT-FW-05.
|
|
154
|
-
</observability_integration>
|
|
154
|
+
</observability_integration>
|
|
155
|
+
|
|
156
|
+
<sre_integration>
|
|
157
|
+
**PRR gate opcional para features production-bound (v1.10 — INT-FW-V2-02):**
|
|
158
|
+
|
|
159
|
+
Quando `workflow.complete_milestone_prr_gate = true` (default `false` — opt-in até maturidade SRE Engagement do projeto), o workflow inclui passo PRR coverage check **antes de arquivar** o milestone:
|
|
160
|
+
|
|
161
|
+
1. Listar features production-bound do milestone (heurística: features com Edge Functions deployed, features com SLO definido em `.planning/slos/`, features marcadas explicitamente `production: true` em ROADMAP.md ou em `.planning/phases/<N>-CONTEXT.md`)
|
|
162
|
+
2. Para cada feature production-bound, procurar `.planning/prr/<feature-id>-PRR-REPORT.md` (cross-ref [prr-conductor](../agents/prr-conductor.md) — agent que produz o relatório scored em 6 axes do cap 32)
|
|
163
|
+
3. Verificar status do PRR-REPORT.md:
|
|
164
|
+
- Se ausente: BLOQUEAR conclusion — sugerir `/prr --feature "<descrição>"` ou `/sre prr --feature "..."` antes de re-rodar `/concluir-marco`
|
|
165
|
+
- Se presente mas status `failed` (≥ 1 axe P0 reprovado): BLOQUEAR conclusion — listar axes P0 reprovados e exigir remediation
|
|
166
|
+
- Se presente com status `passed`: incluir `PRR-REPORT.md` como anexo no `.planning/milestones/v<version>-MILESTONE.md` (audit trail)
|
|
167
|
+
4. Quando todos os PRRs de features production-bound forem `passed`: prosseguir para passo 7 (commit + tag) do workflow `complete-milestone.md`
|
|
168
|
+
|
|
169
|
+
**Distinção `passed` vs `failed`:**
|
|
170
|
+
|
|
171
|
+
| Status | Definição | Resultado em /concluir-marco |
|
|
172
|
+
|---|---|---|
|
|
173
|
+
| `passed` | Todos os 6 axes scored ≥ 3/5 (cap 32 — System Architecture / Instrumentation / Emergency Response / Capacity Planning / Change Management / Performance) | Milestone arquivável (gate aprova) |
|
|
174
|
+
| `passed-with-warnings` | 6/6 axes ≥ 3/5 mas ≥ 1 axe com action items P1 não resolvidos | Milestone arquivável; warnings explícitos no archive |
|
|
175
|
+
| `failed` | ≥ 1 axe < 3/5 OU ≥ 1 action item P0 não resolvido | Gate BLOQUEIA — exige remediation antes de arquivar |
|
|
176
|
+
|
|
177
|
+
**Default `false` por design:**
|
|
178
|
+
|
|
179
|
+
`workflow.complete_milestone_prr_gate` default `false` (≠ `complete_milestone_omm_gate` que é `true`) — PRR Engagement Model do livro Google SRE assume **maturidade organizacional** (SRE team, on-call rotation, incident response). Para projetos em early stage / dogfooding, gate `false` é o correto. Quando o projeto atinge tier-1 (production-user-facing, paid tier, SLA contratual), user explicitamente liga setando `workflow.complete_milestone_prr_gate=true` no config.
|
|
180
|
+
|
|
181
|
+
**Quando ligar gate:**
|
|
182
|
+
|
|
183
|
+
- Projeto tem feature user-facing pagante (≥ 1 jornada crítica monetizada)
|
|
184
|
+
- Projeto tem SLO definido em `.planning/slos/` com error budget tracking
|
|
185
|
+
- Projeto tem on-call rotation documentada em runbook
|
|
186
|
+
- Projeto tem postmortem culture estabelecida (≥ 1 postmortem blameless escrito em `.planning/postmortems/`)
|
|
187
|
+
- **Pelo menos 2 dos 4 acima** = liga gate (sinal de production maturity)
|
|
188
|
+
|
|
189
|
+
**Quando manter gate desligado:**
|
|
190
|
+
|
|
191
|
+
- Projeto early stage / dogfooding interno (sem usuário pagante)
|
|
192
|
+
- Solo developer side project sem on-call
|
|
193
|
+
- Pesquisa / POC / experimento (não production-bound por design)
|
|
194
|
+
- Equipe ainda construindo SRE muscle (PRR vira teatro se não há cultura de remediation)
|
|
195
|
+
|
|
196
|
+
**Skill consultada:** [production-readiness-review](../skills/production-readiness-review/SKILL.md) (cap 32 livro Google SRE — *Evolving SRE Engagement Model* — define os 6 axes + 3 engagement models: Simple, Early Engagement, Frameworks/SRE Platform).
|
|
197
|
+
|
|
198
|
+
**Gate executável:** `gates/prr-checklist-coverage.md` (criado em Phase 41 — QA-SRE-03). Workflow `.claude/framework/workflows/complete-milestone.md` consulta esse gate quando flag `true`.
|
|
199
|
+
|
|
200
|
+
**Anti-patterns prevenidos:**
|
|
201
|
+
|
|
202
|
+
- "Marcar feature como production-bound mas pular PRR" → gate exige PRR-REPORT.md presente
|
|
203
|
+
- "PRR-REPORT.md gerado mas status `failed`" → gate exige `passed` (não basta existir)
|
|
204
|
+
- "Auto-PRR pelo time dev" → cross-ref [prr-conductor](../agents/prr-conductor.md) reforça que `prr-conductor` agent é par externo (não o mesmo agent que escreveu a feature)
|
|
205
|
+
- "Gate ligado em projeto early stage" → bloco "Quando ligar gate" exige ≥ 2 sinais de production maturity
|
|
206
|
+
|
|
207
|
+
**REQ:** INT-FW-V2-02.
|
|
208
|
+
</sre_integration>
|
|
209
|
+
|
|
210
|
+
<sre_resilience_integration>
|
|
211
|
+
**Release pipeline policy gate (v1.11 — INT-FW-V3-01):**
|
|
212
|
+
|
|
213
|
+
Quando `workflow.complete_milestone_release_pipeline_gate = true` (default `false` — opt-in), o workflow inclui passo de validação de release pipeline **paralelo ao PRR gate**:
|
|
214
|
+
|
|
215
|
+
1. Invocar `Task(subagent_type=release-pipeline-auditor, prompt="...")` para gerar `.planning/RELEASE-AUDIT.md` fresco
|
|
216
|
+
2. Verificar score agregado:
|
|
217
|
+
- **ROBUST (≥ 25/30):** gate aprova — milestone arquivável
|
|
218
|
+
- **ADEQUATE (20-24):** warnings explícitos no archive; arquivável
|
|
219
|
+
- **FRAGILE (15-19):** BLOQUEIA — listar top 5 fixes; user resolve antes de re-tentar
|
|
220
|
+
- **BROKEN (< 15):** BLOQUEIA forte — escalation; pipeline não pode ser fonte de verdade
|
|
221
|
+
3. Resultado salvo como anexo no `.planning/milestones/v<version>-MILESTONE.md` (audit trail)
|
|
222
|
+
|
|
223
|
+
**Quando ligar gate (paralelo ao PRR):**
|
|
224
|
+
|
|
225
|
+
- Projeto tem release frequency ≥ 1×/semana
|
|
226
|
+
- Projeto tem deploys que afetam usuários externos (não só dogfooding)
|
|
227
|
+
- Equipe quer disciplina release engineering (cap 8 livro Google SRE)
|
|
228
|
+
- Projeto já tem PRR gate ligado (sinal de production maturity)
|
|
229
|
+
|
|
230
|
+
**Quando manter desligado:**
|
|
231
|
+
|
|
232
|
+
- Projeto < 6 meses (pipeline ainda imatura)
|
|
233
|
+
- Solo dev sem CI/CD complexo
|
|
234
|
+
- Releases mensais ou raros (overhead > valor)
|
|
235
|
+
|
|
236
|
+
**Skills consultadas:** [hermetic-builds](../skills/hermetic-builds/SKILL.md), [release-engineering](../skills/release-engineering/SKILL.md) (cap 8 livro Google SRE).
|
|
237
|
+
|
|
238
|
+
**Gate executável:** `gates/release-pipeline-policy.md` (criado em Phase 47 — QA-SRE2-04). Workflow `.claude/framework/workflows/complete-milestone.md` consulta esse gate quando flag `true`.
|
|
239
|
+
|
|
240
|
+
**Anti-patterns prevenidos:**
|
|
241
|
+
|
|
242
|
+
- "Release pipeline frágil porque historicamente funcionou" → gate força quantificação objetiva
|
|
243
|
+
- "Build não-hermético com `npm install`" → gate Hermeticidade dimension catches
|
|
244
|
+
- "Branch protection desligada para velocidade" → gate Policy Enforcement dimension catches
|
|
245
|
+
- "Gate ligado em projeto early stage" → bloco "Quando ligar gate" exige sinais de maturity
|
|
246
|
+
|
|
247
|
+
**REQ:** INT-FW-V3-01.
|
|
248
|
+
</sre_resilience_integration>
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: detectar-duplicacao
|
|
3
|
+
description: Invoca shotgun-surgery-detector — detecta duplicação sintática (jscpd/regex) + semântica (embeddings) cross-codebase, prioriza por size × frequency × extract feasibility. Modernização cap 21 Feathers.
|
|
4
|
+
argument-hint: "<root_dir> [--threshold 0.85] [--min-cluster-size 3] [--mode syntactic|semantic|both] [--provider openai|pgvector|auto]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Bash
|
|
8
|
+
- Grep
|
|
9
|
+
- Glob
|
|
10
|
+
- Task
|
|
11
|
+
- Write
|
|
12
|
+
- mcp__supabase__execute_sql
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<objective>
|
|
16
|
+
Detectar **shotgun surgery** (mesma mudança/lógica espalhada em N lugares) cross-codebase via:
|
|
17
|
+
1. **Detecção sintática** — Feathers cap 21 original; jscpd/regex/AST
|
|
18
|
+
2. **Detecção semântica** — modernização 2026; embeddings + cosine similarity
|
|
19
|
+
|
|
20
|
+
Invoca o agente [`shotgun-surgery-detector`](../agents/shotgun-surgery-detector.md) que aplica a skill [`legacy-shotgun-surgery`](../skills/legacy-shotgun-surgery/SKILL.md). Output: clusters priorizados por (size × frequency × extract feasibility).
|
|
21
|
+
|
|
22
|
+
**Cria/Atualiza:**
|
|
23
|
+
- `.planning/SHOTGUN-SURGERY.md` — clusters detectados, top 10 priorizados, sugestões extract
|
|
24
|
+
|
|
25
|
+
**Após:** o user tem lista acionável de candidates a extract method/class para reduzir change points. PR sequence canônica: extract first → modify second.
|
|
26
|
+
</objective>
|
|
27
|
+
|
|
28
|
+
<context>
|
|
29
|
+
**Argumentos:**
|
|
30
|
+
- `<root_dir>` — diretório raiz a analisar (default: `.`)
|
|
31
|
+
- `--threshold 0.85` — cosine similarity mínima para semantic cluster (default: 0.85)
|
|
32
|
+
- `--min-cluster-size 3` — Rule of 3 (default: 3)
|
|
33
|
+
- `--min-block-lines 10` — tamanho mínimo de bloco para análise (default: 10)
|
|
34
|
+
- `--mode syntactic|semantic|both` — modo (default: `both`)
|
|
35
|
+
- `--provider openai|pgvector|auto` — embedding provider (default: auto-detect)
|
|
36
|
+
- `--output PATH` — caminho do output (default: `.planning/SHOTGUN-SURGERY.md`)
|
|
37
|
+
|
|
38
|
+
**Exemplos:**
|
|
39
|
+
```
|
|
40
|
+
/detectar-duplicacao src/ # both modes, defaults
|
|
41
|
+
/detectar-duplicacao . --mode=syntactic # só Feathers original (sem custo IA)
|
|
42
|
+
/detectar-duplicacao src/ --threshold 0.90 # mais conservador
|
|
43
|
+
/detectar-duplicacao src/ --min-cluster-size 5 # só clusters grandes
|
|
44
|
+
/detectar-duplicacao src/ --provider=pgvector # forçar self-hosted
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Pré-requisitos:**
|
|
48
|
+
- jscpd disponível para sintática (`npm install -g jscpd` se não)
|
|
49
|
+
- OPENAI_API_KEY OR pgvector setup para semântica (auto-detect)
|
|
50
|
+
- Node.js 20+ no path para chamadas embeddings
|
|
51
|
+
|
|
52
|
+
**Quando este comando é o caminho:**
|
|
53
|
+
- Você sente "estou mudando isso em N lugares" — use detector pra confirmar/quantificar
|
|
54
|
+
- Refactor proposto inclui extract method/class — detector confirma 3+ ocorrências
|
|
55
|
+
- Code review onde reviewer suspeita de DRY violations
|
|
56
|
+
- Pré-requisito para `/legacy refactor` quando shotgun é a real causa raiz
|
|
57
|
+
</context>
|
|
58
|
+
|
|
59
|
+
<process>
|
|
60
|
+
|
|
61
|
+
## 1. Parsear argumentos
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
ROOT_DIR=$(echo "$ARGUMENTS" | awk '{print $1}')
|
|
65
|
+
THRESHOLD=$(echo "$ARGUMENTS" | grep -oE -- '--threshold [0-9.]+' | awk '{print $2}')
|
|
66
|
+
MIN_CLUSTER=$(echo "$ARGUMENTS" | grep -oE -- '--min-cluster-size [0-9]+' | awk '{print $2}')
|
|
67
|
+
MIN_BLOCK=$(echo "$ARGUMENTS" | grep -oE -- '--min-block-lines [0-9]+' | awk '{print $2}')
|
|
68
|
+
MODE=$(echo "$ARGUMENTS" | grep -oE -- '--mode[= ][^ ]+' | sed 's/--mode[= ]//')
|
|
69
|
+
PROVIDER=$(echo "$ARGUMENTS" | grep -oE -- '--provider[= ][^ ]+' | sed 's/--provider[= ]//')
|
|
70
|
+
OUTPUT_PATH=$(echo "$ARGUMENTS" | grep -oE -- '--output [^ ]+' | awk '{print $2}')
|
|
71
|
+
|
|
72
|
+
[ -z "$ROOT_DIR" ] && ROOT_DIR="."
|
|
73
|
+
[ -z "$THRESHOLD" ] && THRESHOLD="0.85"
|
|
74
|
+
[ -z "$MIN_CLUSTER" ] && MIN_CLUSTER=3
|
|
75
|
+
[ -z "$MIN_BLOCK" ] && MIN_BLOCK=10
|
|
76
|
+
[ -z "$MODE" ] && MODE="both"
|
|
77
|
+
[ -z "$PROVIDER" ] && PROVIDER="auto"
|
|
78
|
+
[ -z "$OUTPUT_PATH" ] && OUTPUT_PATH=".planning/SHOTGUN-SURGERY.md"
|
|
79
|
+
|
|
80
|
+
if [ ! -d "$ROOT_DIR" ]; then
|
|
81
|
+
echo "ERROR: root_dir não encontrado: $ROOT_DIR"
|
|
82
|
+
exit 1
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
mkdir -p "$(dirname "$OUTPUT_PATH")"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## 2. Detectar capabilities
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
HAS_JSCPD=false
|
|
92
|
+
command -v npx >/dev/null && npx jscpd --version >/dev/null 2>&1 && HAS_JSCPD=true
|
|
93
|
+
|
|
94
|
+
HAS_OPENAI=false
|
|
95
|
+
[ -n "$OPENAI_API_KEY" ] && HAS_OPENAI=true
|
|
96
|
+
|
|
97
|
+
HAS_PGVECTOR=false
|
|
98
|
+
if command -v psql >/dev/null && psql -tc "select 1 from pg_extension where extname='vector'" 2>/dev/null | grep -q 1; then
|
|
99
|
+
HAS_PGVECTOR=true
|
|
100
|
+
fi
|
|
101
|
+
|
|
102
|
+
# adjust mode if needed
|
|
103
|
+
if [ "$MODE" = "both" ] || [ "$MODE" = "semantic" ]; then
|
|
104
|
+
if [ "$HAS_OPENAI" = false ] && [ "$HAS_PGVECTOR" = false ]; then
|
|
105
|
+
echo "WARN: nenhum embedding provider disponível. Mode forçado para 'syntactic'."
|
|
106
|
+
MODE="syntactic"
|
|
107
|
+
fi
|
|
108
|
+
fi
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## 3. Dispatch para `shotgun-surgery-detector`
|
|
112
|
+
|
|
113
|
+
```text
|
|
114
|
+
Task(
|
|
115
|
+
subagent_type="shotgun-surgery-detector",
|
|
116
|
+
prompt="
|
|
117
|
+
root_dir: ${ROOT_DIR}
|
|
118
|
+
threshold: ${THRESHOLD}
|
|
119
|
+
min_cluster_size: ${MIN_CLUSTER}
|
|
120
|
+
min_block_lines: ${MIN_BLOCK}
|
|
121
|
+
mode: ${MODE}
|
|
122
|
+
embedding_provider: ${PROVIDER}
|
|
123
|
+
output_path: ${OUTPUT_PATH}
|
|
124
|
+
|
|
125
|
+
Aplicar skill legacy-shotgun-surgery. Etapas:
|
|
126
|
+
1. Detecção sintática (sempre roda) — jscpd com min-lines + min-tokens
|
|
127
|
+
2. Detecção semântica (se mode=semantic|both) — embeddings + cosine similarity
|
|
128
|
+
3. Merge clusters (sintático + semântico); marker [SYNTACTIC] / [SEMANTIC] / [BOTH]
|
|
129
|
+
4. Priorização canônica — score = (cluster_size × avg_block_lines × frequency_factor) / extract_feasibility
|
|
130
|
+
5. Filter: cross-cutting noise (test files etc)
|
|
131
|
+
6. Escrever .planning/SHOTGUN-SURGERY.md com:
|
|
132
|
+
- Resumo (X clusters totais)
|
|
133
|
+
- Top 10 priorizados com diff visual
|
|
134
|
+
- Sugestões de extract com nome canônico
|
|
135
|
+
- Esforço estimado por cluster
|
|
136
|
+
"
|
|
137
|
+
)
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## 4. Pós-output
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
═══════════════════════════════════════════════════════════
|
|
144
|
+
framework ► DETECTAR-DUPLICACAO ▸ ${OUTPUT_PATH}
|
|
145
|
+
═══════════════════════════════════════════════════════════
|
|
146
|
+
|
|
147
|
+
[output do shotgun-surgery-detector]
|
|
148
|
+
|
|
149
|
+
## ⚠ Validação obrigatória
|
|
150
|
+
|
|
151
|
+
Cada cluster — especialmente semantic — precisa de **revisão humana**:
|
|
152
|
+
- Falsos positivos comuns: 2 funções com nomes/comments similares mas implementações diferentes
|
|
153
|
+
- Variations entre ocorrências podem ser INTENCIONAIS (rounding diferente, encoding diferente)
|
|
154
|
+
- Extract uniformiza → mudança comportamental possível
|
|
155
|
+
|
|
156
|
+
NÃO auto-extract. Cluster aprovado por humano vira PR.
|
|
157
|
+
|
|
158
|
+
## Próximos passos por cluster aprovado
|
|
159
|
+
|
|
160
|
+
1. **Caracterizar cada ocorrência** (capturar comportamento atual):
|
|
161
|
+
```bash
|
|
162
|
+
/caracterizar <file-da-ocorrencia-1>
|
|
163
|
+
/caracterizar <file-da-ocorrencia-2>
|
|
164
|
+
...
|
|
165
|
+
```
|
|
166
|
+
2. **Validar outputs idênticos** OU documentar diferenças intencionais
|
|
167
|
+
3. **Escolher nome canônico** (resonates com TODAS as N localizações)
|
|
168
|
+
4. **Extract para 1 lugar** (criar utility/módulo compartilhado)
|
|
169
|
+
5. **Substituir cada ocorrência** (1 commit por substituição, revertível)
|
|
170
|
+
6. **Re-rodar detector** após PRs para verificar redução de clusters
|
|
171
|
+
|
|
172
|
+
## Custo (modo semantic)
|
|
173
|
+
|
|
174
|
+
- ~$<cost>/run com OpenAI text-embedding-3-small
|
|
175
|
+
- $0 com pgvector self-hosted
|
|
176
|
+
- 0 com mode=syntactic only
|
|
177
|
+
|
|
178
|
+
## Cross-suite
|
|
179
|
+
|
|
180
|
+
- **/storytelling** (v1.12) — story dos módulos identifica clusters mais provável
|
|
181
|
+
- **/caracterizar** (v1.12) — characterize cada ocorrência ANTES de extract
|
|
182
|
+
- **/legacy refactor** (v1.12) — chain canônico para extract
|
|
183
|
+
- **/auditar-marco** — rerodar shotgun detector trimestral revela acumulação de débito
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
</process>
|
|
187
|
+
|
|
188
|
+
<success_criteria>
|
|
189
|
+
- [ ] $ARGUMENTS parseados (root_dir opcional, defaults sensíveis)
|
|
190
|
+
- [ ] Capabilities detectadas (jscpd, OpenAI, pgvector)
|
|
191
|
+
- [ ] Mode degraded se provider de embedding indisponível
|
|
192
|
+
- [ ] `shotgun-surgery-detector` invocado via Task
|
|
193
|
+
- [ ] Output forwarded transparentemente
|
|
194
|
+
- [ ] Warning de validação manual obrigatória
|
|
195
|
+
- [ ] Próximos passos: characterize → validate → extract → substituir → re-detect
|
|
196
|
+
- [ ] Cross-references com /storytelling, /caracterizar, /legacy refactor
|
|
197
|
+
</success_criteria>
|
|
@@ -88,3 +88,44 @@ O `plan-checker` invocado pelo `/planejar-fase` (Phase 33 — INT-FW-02) lê est
|
|
|
88
88
|
|
|
89
89
|
**REQ:** INT-FW-01.
|
|
90
90
|
</observability_integration>
|
|
91
|
+
|
|
92
|
+
<legacy_refactor_integration>
|
|
93
|
+
**Integração com Suíte Legacy Code (Feathers):**
|
|
94
|
+
|
|
95
|
+
Quando o workflow detecta intent de **refactor** (palavras-chave em descrição da fase: "refator", "refactor", "extrair", "limpar", "reorganizar", "split", "quebrar classe/módulo"), inclui pergunta canônica:
|
|
96
|
+
|
|
97
|
+
> "Esta fase envolve refactor de arquivo existente? Se sim, qual é o arquivo alvo?"
|
|
98
|
+
|
|
99
|
+
Para cada arquivo identificado:
|
|
100
|
+
1. Coleta line count + checa se path matches contrato externo (supabase/functions, src/api, webhooks, pages/api)
|
|
101
|
+
2. Invoca [`refactor-safety-auditor`](../agents/refactor-safety-auditor.md) **em modo dry-run** para coletar evidências sem bloquear
|
|
102
|
+
3. Resultado registrado em CONTEXT.md em seção `<refactor_safety>`:
|
|
103
|
+
|
|
104
|
+
```markdown
|
|
105
|
+
<refactor_safety>
|
|
106
|
+
## Arquivos alvo de refactor
|
|
107
|
+
|
|
108
|
+
| Arquivo | Linhas | Contrato externo | Cobertura | Char tests | Veredito do gate |
|
|
109
|
+
|---|---|---|---|---|---|
|
|
110
|
+
| src/orders/handler.ts | 724 | true | 12% | absent | BLOCK |
|
|
111
|
+
| src/orders/utils.ts | 89 | false | 78% | absent | GO |
|
|
112
|
+
|
|
113
|
+
## Recomendação
|
|
114
|
+
|
|
115
|
+
Para `src/orders/handler.ts`:
|
|
116
|
+
- Caminho preferido: /caracterizar antes de refactor (custo: 8-16h)
|
|
117
|
+
- Alternativa: /refactor-seguro --mode=sprout (se mudança ADICIONA, não modifica)
|
|
118
|
+
- Para safe-extract: assinar checklist canônico de safe extraction
|
|
119
|
+
- Override possível com ticket + reason
|
|
120
|
+
|
|
121
|
+
Para `src/orders/utils.ts`:
|
|
122
|
+
- Refactor pode prosseguir; cobertura adequada existe.
|
|
123
|
+
</refactor_safety>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
`plan-checker` consume essa seção. Se gate retorna BLOCK e mode=blocking, plano não é aprovado até user escolher caminho explícito.
|
|
127
|
+
|
|
128
|
+
**Skill canônica:** [`pre-refactor-characterization`](../skills/pre-refactor-characterization/SKILL.md)
|
|
129
|
+
|
|
130
|
+
**Quando skip:** fase puramente de infraestrutura (markdown, config, tooling), fase greenfield (sem arquivos existentes a modificar), OR `workflow.legacy_refactor_questions=false` em config.
|
|
131
|
+
</legacy_refactor_integration>
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: encontrar-seams
|
|
3
|
+
description: Invoca seam-finder — analisa código para identificar seams (object/link/preprocessing) e recomenda técnica do cap 25 Feathers para quebrar dependências bloqueantes. Pré-requisito quando deps externas impedem characterization.
|
|
4
|
+
argument-hint: "<target_file> [--symbol <name>] [--prefer object|link|preprocessing] [--output PATH]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
- Grep
|
|
10
|
+
- Glob
|
|
11
|
+
- Task
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<objective>
|
|
15
|
+
Analisar código alvo para identificar **seams** (lugares onde se pode alterar comportamento sem editar lá) e recomendar **técnica do catálogo cap 25 Feathers** para quebrar dependências bloqueantes (DB real, HTTP, framework objects, singletons, clocks). Invoca o agente [`seam-finder`](../agents/seam-finder.md) que aplica a skill [`legacy-seams-and-test-harness`](../skills/legacy-seams-and-test-harness/SKILL.md) — decision tree por linguagem, prioridade pelo MENOR custo + MAIOR reversibilidade.
|
|
16
|
+
|
|
17
|
+
**Cria/Atualiza:**
|
|
18
|
+
- `.planning/SEAM-ANALYSIS.md` — relatório com deps bloqueantes, técnicas recomendadas, sequência canônica de commits
|
|
19
|
+
|
|
20
|
+
**Após:** o user tem plano mecânico para tornar código testável antes de invocar `/caracterizar`. Tipicamente 5-30 minutos por dep bloqueante; sequência de pequenos commits revertíveis.
|
|
21
|
+
</objective>
|
|
22
|
+
|
|
23
|
+
<context>
|
|
24
|
+
**Argumentos:**
|
|
25
|
+
- `<target_file>` — caminho do arquivo a analisar (relativo ao project root) — OBRIGATÓRIO
|
|
26
|
+
- `--symbol <name>` — analisar apenas símbolo específico (default: arquivo inteiro)
|
|
27
|
+
- `--prefer object|link|preprocessing` — preferência de tipo de seam (default: object)
|
|
28
|
+
- `--output PATH` — caminho do output (default: `.planning/SEAM-ANALYSIS.md`)
|
|
29
|
+
|
|
30
|
+
**Exemplos:**
|
|
31
|
+
```
|
|
32
|
+
/encontrar-seams src/orders/OrderService.ts # análise completa
|
|
33
|
+
/encontrar-seams src/orders/OrderService.ts --symbol charge # método específico
|
|
34
|
+
/encontrar-seams src/legacy/Client.cpp --prefer link # forçar link seam (C++ legado)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Quando este comando é o caminho certo:**
|
|
38
|
+
- `/caracterizar` falhou porque deps externas impedem isolamento
|
|
39
|
+
- Construtor faz I/O direto (cria conexão DB no constructor)
|
|
40
|
+
- Usar singleton/global hardcoded no método a testar
|
|
41
|
+
- Framework type complexo (HttpServletRequest, Express.Request) bloqueando teste
|
|
42
|
+
- Código procedural (C, COBOL, Go) onde polimorfismo não está disponível
|
|
43
|
+
|
|
44
|
+
**Quando NÃO é o caminho:**
|
|
45
|
+
- Código já é testável (deps injetadas via DI) → usar `/caracterizar` direto
|
|
46
|
+
- Código é puro (sem I/O) → não precisa break-dep
|
|
47
|
+
- Mudança é safe-extraction (rename, IDE-extract) → usar `/refactor-seguro --mode=safe-extract`
|
|
48
|
+
</context>
|
|
49
|
+
|
|
50
|
+
<process>
|
|
51
|
+
|
|
52
|
+
## 1. Parsear argumentos
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
TARGET_FILE=$(echo "$ARGUMENTS" | awk '{print $1}')
|
|
56
|
+
SYMBOL=$(echo "$ARGUMENTS" | grep -oE -- '--symbol [^ ]+' | awk '{print $2}')
|
|
57
|
+
PREFER=$(echo "$ARGUMENTS" | grep -oE -- '--prefer [^ ]+' | awk '{print $2}')
|
|
58
|
+
OUTPUT_PATH=$(echo "$ARGUMENTS" | grep -oE -- '--output [^ ]+' | awk '{print $2}')
|
|
59
|
+
|
|
60
|
+
[ -z "$OUTPUT_PATH" ] && OUTPUT_PATH=".planning/SEAM-ANALYSIS.md"
|
|
61
|
+
[ -z "$PREFER" ] && PREFER="object"
|
|
62
|
+
|
|
63
|
+
if [ -z "$TARGET_FILE" ]; then
|
|
64
|
+
echo "ERROR: target_file é obrigatório."
|
|
65
|
+
echo "Uso: /encontrar-seams <target_file> [opções]"
|
|
66
|
+
exit 1
|
|
67
|
+
fi
|
|
68
|
+
|
|
69
|
+
if [ ! -f "$TARGET_FILE" ]; then
|
|
70
|
+
echo "ERROR: arquivo não encontrado: $TARGET_FILE"
|
|
71
|
+
exit 1
|
|
72
|
+
fi
|
|
73
|
+
|
|
74
|
+
mkdir -p "$(dirname "$OUTPUT_PATH")"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## 2. Dispatch para `seam-finder`
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
Task(
|
|
81
|
+
subagent_type="seam-finder",
|
|
82
|
+
prompt="
|
|
83
|
+
target_file: ${TARGET_FILE}
|
|
84
|
+
${SYMBOL:+target_symbol: ${SYMBOL}}
|
|
85
|
+
output_path: ${OUTPUT_PATH}
|
|
86
|
+
prefer_technique: ${PREFER}
|
|
87
|
+
|
|
88
|
+
Aplicar skill legacy-seams-and-test-harness. Etapas:
|
|
89
|
+
1. Detectar linguagem + paradigma (OO vs procedural)
|
|
90
|
+
2. Mapear deps externas (network/DB/FS/clock/random/UUID/global/framework-type/construtor-caro)
|
|
91
|
+
3. Identificar tipos de seam disponíveis (object/link/preprocessing)
|
|
92
|
+
4. Aplicar decision tree do cap 25 escolhendo técnica de menor custo + maior reversibilidade
|
|
93
|
+
5. Gerar SEAM-ANALYSIS.md com:
|
|
94
|
+
- tabela de deps bloqueantes
|
|
95
|
+
- técnica recomendada por dep com custo + reversibilidade
|
|
96
|
+
- exemplo ANTES/DEPOIS por técnica
|
|
97
|
+
- sequência canônica de commits (mais seguro → mais arriscado)
|
|
98
|
+
6. Output curto para caller: lista de N deps + custo total estimado
|
|
99
|
+
"
|
|
100
|
+
)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## 3. Pós-output: integração com fluxo
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
═══════════════════════════════════════════════════════════
|
|
107
|
+
framework ► ENCONTRAR-SEAMS ▸ ${OUTPUT_PATH}
|
|
108
|
+
═══════════════════════════════════════════════════════════
|
|
109
|
+
|
|
110
|
+
[output do seam-finder]
|
|
111
|
+
|
|
112
|
+
## Próximos passos
|
|
113
|
+
|
|
114
|
+
1. **Aplicar técnicas** — seguir sequência canônica em ${OUTPUT_PATH}
|
|
115
|
+
Cada commit é single-goal, mecânico, revertível
|
|
116
|
+
2. **Rodar suite após cada commit** — compilação verde + tests verdes
|
|
117
|
+
3. **/caracterizar <file>** — após break-deps complete, characterization fica viável
|
|
118
|
+
4. **/auditar-refactor <file>** — gate deve retornar GO ou WARN agora (não mais BLOCK)
|
|
119
|
+
|
|
120
|
+
## Cross-suite
|
|
121
|
+
|
|
122
|
+
- Em projetos Supabase com Edge Functions: `supabase-edge-fn-writer` (v1.8) já segue patterns testáveis
|
|
123
|
+
- Para skills de SOLID/DI: ver também `supabase-architect` (v1.8) — schema design considera testabilidade similarmente
|
|
124
|
+
- Para mudança em código que afeta SLOs: `/instrumentar-fase` (v1.9) durante refactor preserva visibility
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
</process>
|
|
128
|
+
|
|
129
|
+
<success_criteria>
|
|
130
|
+
- [ ] $ARGUMENTS parseados (target_file obrigatório)
|
|
131
|
+
- [ ] `seam-finder` invocado via `Task(subagent_type=...)` com prompt completo (6 etapas)
|
|
132
|
+
- [ ] `.planning/SEAM-ANALYSIS.md` criado pelo agent com deps + técnicas + sequência de commits
|
|
133
|
+
- [ ] Output forwarded transparentemente do agent
|
|
134
|
+
- [ ] Próximos passos sugeridos: aplicar técnicas, rodar suite, /caracterizar, /auditar-refactor
|
|
135
|
+
- [ ] Cross-references com Suíte Supabase (v1.8) e Observabilidade (v1.9) onde aplicável
|
|
136
|
+
</success_criteria>
|
package/kit/commands/forense.md
CHANGED
|
@@ -72,4 +72,106 @@ Cada anomalia detectada vira hipótese com query de validação:
|
|
|
72
72
|
**Skill consultada explicitamente:** abrir o arquivo `kit/skills/core-analysis-loop/SKILL.md` para padrão "documentação da trilha (formato canônico)" — o relatório forense em `.planning/forensics/report-<ts>.md` segue esse formato com cada hipótese tendo "Query / Resultado / Status (VALIDATED / REFUTED / INCONCLUSIVE)".
|
|
73
73
|
|
|
74
74
|
**REQ:** INT-FW-06.
|
|
75
|
-
</observability_integration>
|
|
75
|
+
</observability_integration>
|
|
76
|
+
|
|
77
|
+
<sre_integration>
|
|
78
|
+
**Chain `/postmortem` após Core Analysis Loop (v1.10 — INT-FW-V2-01):**
|
|
79
|
+
|
|
80
|
+
Forense é diagnóstico evidence-based read-only — identifica o **o que** e o **como** via método científico (sintoma → hipótese → query → status `VALIDATED | REFUTED | INCONCLUSIVE`). Quando o Core Analysis Loop fecha com pelo menos uma hipótese `VALIDATED` apontando para root cause, o próximo passo canônico é **postmortem blameless** (cap 15 livro Google SRE — *Postmortem Culture: Learning from Failure*).
|
|
81
|
+
|
|
82
|
+
Distinção fundamental:
|
|
83
|
+
|
|
84
|
+
| Etapa | Pergunta respondida | Output | Audiência |
|
|
85
|
+
|---|---|---|---|
|
|
86
|
+
| Forense | "O que aconteceu? Onde está a evidência?" | `.planning/forensics/report-<ts>.md` | Investigador (você) |
|
|
87
|
+
| Postmortem | "O que aprendemos? O que mudaremos?" | `.planning/postmortems/<id>.md` | Organização inteira (no postmortem left unreviewed) |
|
|
88
|
+
|
|
89
|
+
Forense **diagnostica**; postmortem **transforma diagnóstico em aprendizado durável**. Pular postmortem = perder aprendizado organizacional (anti-pattern hero culture: "fixei o bug, vamos seguir").
|
|
90
|
+
|
|
91
|
+
**Trigger automático sugerido (não-bloqueante):**
|
|
92
|
+
|
|
93
|
+
Quando o relatório forense conclui com:
|
|
94
|
+
- ≥ 1 hipótese `VALIDATED` apontando root cause acionável, OU
|
|
95
|
+
- Incident impactou usuário (não apenas dev experience), OU
|
|
96
|
+
- Workflow framework crashou em produção (não dogfooding)
|
|
97
|
+
|
|
98
|
+
O comando `/forense` **sugere ao usuário** ao final do relatório:
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
Próximo passo recomendado:
|
|
102
|
+
/postmortem --incident "<one-liner derivado do relatório forense>"
|
|
103
|
+
Continua o blameless write-up com Summary + Impact + Root Causes + Action Items.
|
|
104
|
+
Cross-ref canônico: [blameless-postmortems](../skills/blameless-postmortems/SKILL.md) skill + [postmortem-writer](../agents/postmortem-writer.md) agent.
|
|
105
|
+
|
|
106
|
+
Nota: para incidents de produção SRE com investigação completa via /investigar-producao
|
|
107
|
+
(que produz .planning/investigations/<id>.md), use `/postmortem --from-investigation <id>`.
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Chain de fluxo canônico:**
|
|
111
|
+
|
|
112
|
+
```text
|
|
113
|
+
Falha detectada
|
|
114
|
+
↓
|
|
115
|
+
/forense "<descrição>" ← diagnóstico evidence-based (este comando, output: .planning/forensics/report-<ts>.md)
|
|
116
|
+
↓ (Core Analysis Loop fecha com VALIDATED)
|
|
117
|
+
/postmortem --incident "<one-liner>" ← blameless write-up (chain sugerido — modo standalone)
|
|
118
|
+
↓
|
|
119
|
+
Action Items P0/P1 viram tarefas em milestone atual ou próximo
|
|
120
|
+
↓
|
|
121
|
+
Wheel of Misfortune: postmortem vira treino de novos engineers (cap 15)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Distinção `/forense` vs `/investigar-producao`:**
|
|
125
|
+
|
|
126
|
+
- `/forense` — diagnóstico de workflows framework com falha (post-mortem de processo). Output: `.planning/forensics/report-<ts>.md`. Chain: `--incident "<one-liner>"`.
|
|
127
|
+
- `/investigar-producao` (v1.9) — Core Analysis Loop em incident produção SRE com MCP Supabase. Output: `.planning/investigations/<id>.md`. Chain: `--from-investigation <id>`.
|
|
128
|
+
|
|
129
|
+
**Quando NÃO sugerir chain `/postmortem`:**
|
|
130
|
+
|
|
131
|
+
- Forense `INCONCLUSIVE` em todas as hipóteses (root cause não identificada — sugerir nova investigação ao invés)
|
|
132
|
+
- Falha trivial documentada (typo em `.gitignore`) sem impacto a usuário
|
|
133
|
+
- Investigação cancelada pelo user antes do Core Analysis Loop fechar
|
|
134
|
+
|
|
135
|
+
**Cultura blameless é não-negociável:** o postmortem foca em **sistema** (controles ausentes, signals não monitorados, escalation paths frágeis), nunca em **pessoas** ("dev X esqueceu de testar"). Anti-pattern blame culture é explicitamente prevenido pelo template de `postmortem-writer` (cap 15 — *No postmortem left unreviewed*).
|
|
136
|
+
|
|
137
|
+
**REQ:** INT-FW-V2-01.
|
|
138
|
+
</sre_integration>
|
|
139
|
+
|
|
140
|
+
<legacy_refactor_integration>
|
|
141
|
+
**Forensics em failure de refactor (Suíte Legacy):**
|
|
142
|
+
|
|
143
|
+
Se o forense identifica root cause como "regressão silenciosa pós-refactor", consulta automaticamente artefatos da Suíte Legacy:
|
|
144
|
+
|
|
145
|
+
```text
|
|
146
|
+
Falha pós-refactor detectada
|
|
147
|
+
↓
|
|
148
|
+
/forense "<descrição>" ← diagnóstico
|
|
149
|
+
↓ se root cause = refactor regression
|
|
150
|
+
forensics agent lê:
|
|
151
|
+
- .planning/REFACTOR-SAFETY.md (qual veredito do gate? GO? GO-OVERRIDE?)
|
|
152
|
+
- tests/characterization/<file_stem>/ (existia? rodou verde antes do refactor?)
|
|
153
|
+
- REFACTOR-SAFETY-<file_stem>.md (audit retroativo)
|
|
154
|
+
↓
|
|
155
|
+
/postmortem --incident "<one-liner>" --legacy-refactor ← consulta extra
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Lessons learned canônicas para regression em refactor (cap 23 Feathers):**
|
|
159
|
+
|
|
160
|
+
| Cause root | Lesson learned canônica |
|
|
161
|
+
|---|---|
|
|
162
|
+
| Refactor sem characterization tests | Aplicar gate `legacy-refactor-safety` em modo blocking; sem char = "edit and pray" |
|
|
163
|
+
| Char tests existiam mas line cov apenas (não behavioral) | Habilitar mutation testing no gate; line cov 80% pode mascarar 30% mutation kill |
|
|
164
|
+
| Override usado sem ticket válido | Validar tickets em `/auditar-marco` opt-in; tickets > 90 dias = bloquear novos overrides |
|
|
165
|
+
| Snapshots não-revisados, congelaram bugs | `/caracterizar` deve emitir warning de revisão obrigatória; PR review verifica leitura |
|
|
166
|
+
| Mudança comportamental misturada com refactor | Single-goal editing (cap 22 Feathers); separar PRs |
|
|
167
|
+
|
|
168
|
+
Action items P0 sugeridos em postmortem de regression refactor:
|
|
169
|
+
1. Habilitar `workflow.legacy_refactor_gate_blocking = true`
|
|
170
|
+
2. Adicionar mutation testing à CI para arquivos legacy
|
|
171
|
+
3. Auditar overrides ainda abertos via `/auditar-marco`
|
|
172
|
+
4. Treinar equipe via Wheel of Misfortune com este caso
|
|
173
|
+
|
|
174
|
+
**Skill canônica:** [`pre-refactor-characterization`](../skills/pre-refactor-characterization/SKILL.md), [`legacy-characterization-tests`](../skills/legacy-characterization-tests/SKILL.md)
|
|
175
|
+
|
|
176
|
+
**REQ:** INT-LEGACY-FW-02.
|
|
177
|
+
</legacy_refactor_integration>
|