@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
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: auditar-observabilidade-cobertura
|
|
3
|
+
description: Audita projeto Supabase mostrando X/N Edge Functions com 4 golden signals + Y/N com SLO + Z/N com burn alert + W/N com characterization tests. Top 5 críticas (por traffic 30d) sem cobertura. User-request explícito.
|
|
4
|
+
argument-hint: "[--traffic-window 30d] [--top-n 5] [--dimensions signals,slo,burn-alert,characterization] [--output PATH]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Bash
|
|
8
|
+
- Grep
|
|
9
|
+
- Glob
|
|
10
|
+
- Task
|
|
11
|
+
- Write
|
|
12
|
+
- mcp__supabase__list_edge_functions
|
|
13
|
+
- mcp__supabase__get_logs
|
|
14
|
+
- mcp__supabase__execute_sql
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
<objective>
|
|
18
|
+
**O comando que você roda hoje pra ver o tamanho do buraco e priorizar.** Audit horizontal de cobertura cross-suite (Observabilidade v1.9 + SRE v1.10 + Legacy v1.12). Roda contra projeto Supabase, gera relatório:
|
|
19
|
+
|
|
20
|
+
- Edge functions emitindo 4 golden signals: **X / N**
|
|
21
|
+
- Edge functions com SLO definido: **Y / N**
|
|
22
|
+
- Edge functions com burn rate alert: **Z / N**
|
|
23
|
+
- Edge functions com characterization tests: **W / N**
|
|
24
|
+
- **Top 5 funções mais críticas (por chamadas 30d) sem cobertura completa**
|
|
25
|
+
|
|
26
|
+
Invoca o agente [`observability-coverage-auditor`](../agents/observability-coverage-auditor.md) que cross-references skills v1.9 + v1.10 + v1.12.
|
|
27
|
+
|
|
28
|
+
**Cria/Atualiza:**
|
|
29
|
+
- `.planning/OBSERVABILITY-COVERAGE.md` — relatório scored com tabela X/N por dimensão + top críticas + recomendações priorizadas
|
|
30
|
+
|
|
31
|
+
**Após:** o user vê tamanho do buraco quantitativamente e tem fila ordenada por (traffic × missing dimensions). As 2 que ele instrumentou às pressas viram baseline; as outras N entram na fila ordenada.
|
|
32
|
+
</objective>
|
|
33
|
+
|
|
34
|
+
<context>
|
|
35
|
+
**Argumentos:**
|
|
36
|
+
- `--traffic-window 30d` — janela para criticidade (default: 30d)
|
|
37
|
+
- `--top-n 5` — quantas críticas listar (default: 5)
|
|
38
|
+
- `--dimensions <list>` — quais dimensões auditar (default: `signals,slo,burn-alert,characterization`)
|
|
39
|
+
- `--output PATH` — caminho do output (default: `.planning/OBSERVABILITY-COVERAGE.md`)
|
|
40
|
+
|
|
41
|
+
**Exemplos:**
|
|
42
|
+
```
|
|
43
|
+
/auditar-observabilidade-cobertura # defaults
|
|
44
|
+
/auditar-observabilidade-cobertura --top-n 10 # listar top 10
|
|
45
|
+
/auditar-observabilidade-cobertura --dimensions signals,slo # só 2 dimensões
|
|
46
|
+
/auditar-observabilidade-cobertura --traffic-window 7d # janela menor
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Pré-requisitos:**
|
|
50
|
+
- Projeto Supabase (`supabase/config.toml` presente)
|
|
51
|
+
- MCP Supabase conectado para traffic data + Edge Functions list (recomendado)
|
|
52
|
+
- Sem MCP: agent reverte para enumerate via filesystem (sem traffic data → top-N por filesystem only)
|
|
53
|
+
|
|
54
|
+
**Quando este comando é o caminho:**
|
|
55
|
+
- Você quer "ver o buraco" antes de priorizar instrumentação
|
|
56
|
+
- Você instrumentou algumas Edge Functions ad-hoc; agora quer audit estruturado das outras
|
|
57
|
+
- Audit trimestral cross-suite
|
|
58
|
+
- Pré-requisito de `/concluir-marco` quando `workflow.observability_coverage_threshold` opt-in
|
|
59
|
+
- `/auditar-marco` chain (audit milestone consume este)
|
|
60
|
+
</context>
|
|
61
|
+
|
|
62
|
+
<process>
|
|
63
|
+
|
|
64
|
+
## 1. Parsear argumentos
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
TRAFFIC_WINDOW=$(echo "$ARGUMENTS" | grep -oE -- '--traffic-window [^ ]+' | awk '{print $2}')
|
|
68
|
+
TOP_N=$(echo "$ARGUMENTS" | grep -oE -- '--top-n [0-9]+' | awk '{print $2}')
|
|
69
|
+
DIMENSIONS=$(echo "$ARGUMENTS" | grep -oE -- '--dimensions [^ ]+' | awk '{print $2}')
|
|
70
|
+
OUTPUT_PATH=$(echo "$ARGUMENTS" | grep -oE -- '--output [^ ]+' | awk '{print $2}')
|
|
71
|
+
|
|
72
|
+
[ -z "$TRAFFIC_WINDOW" ] && TRAFFIC_WINDOW="30d"
|
|
73
|
+
[ -z "$TOP_N" ] && TOP_N=5
|
|
74
|
+
[ -z "$DIMENSIONS" ] && DIMENSIONS="signals,slo,burn-alert,characterization"
|
|
75
|
+
[ -z "$OUTPUT_PATH" ] && OUTPUT_PATH=".planning/OBSERVABILITY-COVERAGE.md"
|
|
76
|
+
|
|
77
|
+
mkdir -p "$(dirname "$OUTPUT_PATH")"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## 2. Validar pré-requisitos
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
PROJECT_ID=""
|
|
84
|
+
if [ -f "supabase/config.toml" ]; then
|
|
85
|
+
PROJECT_ID=$(grep -E '^project_id\s*=' supabase/config.toml | sed 's/.*= *"\(.*\)".*/\1/' | head -1)
|
|
86
|
+
fi
|
|
87
|
+
|
|
88
|
+
# Detectar tier (Full vs Partial)
|
|
89
|
+
TIER="full"
|
|
90
|
+
if [ -z "$PROJECT_ID" ]; then
|
|
91
|
+
TIER="partial"
|
|
92
|
+
echo "ℹ project_id não detectado em supabase/config.toml — degradando para tier partial (sem traffic data)"
|
|
93
|
+
fi
|
|
94
|
+
|
|
95
|
+
# Detectar Edge Functions via filesystem
|
|
96
|
+
NUM_EDGE_FNS=$(find supabase/functions -mindepth 1 -maxdepth 1 -type d 2>/dev/null | wc -l)
|
|
97
|
+
if [ "$NUM_EDGE_FNS" -eq 0 ]; then
|
|
98
|
+
echo "ERROR: nenhuma Edge Function detectada em supabase/functions/. Audit cancelado."
|
|
99
|
+
exit 1
|
|
100
|
+
fi
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## 3. Dispatch para `observability-coverage-auditor`
|
|
104
|
+
|
|
105
|
+
```text
|
|
106
|
+
Task(
|
|
107
|
+
subagent_type="observability-coverage-auditor",
|
|
108
|
+
prompt="
|
|
109
|
+
project_root: .
|
|
110
|
+
output_path: ${OUTPUT_PATH}
|
|
111
|
+
traffic_window: ${TRAFFIC_WINDOW}
|
|
112
|
+
top_n_critical: ${TOP_N}
|
|
113
|
+
dimensions: ${DIMENSIONS}
|
|
114
|
+
${PROJECT_ID:+project_id: ${PROJECT_ID}}
|
|
115
|
+
tier: ${TIER}
|
|
116
|
+
|
|
117
|
+
Aplicar skills (cross-suite v1.9+v1.10+v1.12). Etapas:
|
|
118
|
+
1. Enumerar Edge Functions (via mcp__supabase__list_edge_functions ou filesystem fallback)
|
|
119
|
+
2. Para cada Edge Function, auditar:
|
|
120
|
+
- 4 Golden Signals (grep por createHistogram/createCounter/createObservableGauge)
|
|
121
|
+
- SLO definido (.planning/slos/<name>.md ou .planning/SLO.md menção)
|
|
122
|
+
- Burn rate alert (config presente)
|
|
123
|
+
- Characterization tests (tests/characterization/<name>/ presente)
|
|
124
|
+
3. Coletar traffic 30d via mcp__supabase__get_logs (Tier Full) ou skip (Tier Partial)
|
|
125
|
+
4. Calcular criticality_score = traffic × missing_count
|
|
126
|
+
5. Compilar matriz + top ${TOP_N} críticas + recomendações priorizadas
|
|
127
|
+
6. Output: .planning/OBSERVABILITY-COVERAGE.md
|
|
128
|
+
"
|
|
129
|
+
)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## 4. Pós-output
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
═══════════════════════════════════════════════════════════
|
|
136
|
+
framework ► AUDITAR-OBSERVABILIDADE-COBERTURA ▸ ${OUTPUT_PATH}
|
|
137
|
+
═══════════════════════════════════════════════════════════
|
|
138
|
+
|
|
139
|
+
[output do observability-coverage-auditor]
|
|
140
|
+
|
|
141
|
+
## Próximos passos priorizados
|
|
142
|
+
|
|
143
|
+
1. **Atacar top 1 crítica primeiro** — comando direto:
|
|
144
|
+
- Se signals missing: `/golden-signals <function-path>`
|
|
145
|
+
- Se SLO missing: `/definir-slo <function-name>`
|
|
146
|
+
- Se char missing: `/caracterizar <function-path>`
|
|
147
|
+
- Se burn alert missing: configurar via `/burn-rate-status` + alert manager
|
|
148
|
+
|
|
149
|
+
2. **Continuar pela ordem de criticality** (top 2, 3, ...)
|
|
150
|
+
|
|
151
|
+
3. **Bulk approach** se há > 10 funções missing:
|
|
152
|
+
- Priorize SIGNALS primeiro (visibility é fundação)
|
|
153
|
+
- Depois SLO (define o que importa)
|
|
154
|
+
- Depois BURN ALERT (early warning)
|
|
155
|
+
- Depois CHARACTERIZATION (refactor safety)
|
|
156
|
+
|
|
157
|
+
4. **Auto-completion** via:
|
|
158
|
+
- `/observabilidade audit-coverage` — sinônimo deste comando
|
|
159
|
+
- `/observabilidade omm` — OMM scoring v1.9 que consume este audit
|
|
160
|
+
- `/auditar-marco` — milestone audit que opt-in invoca este
|
|
161
|
+
|
|
162
|
+
## Cross-suite
|
|
163
|
+
|
|
164
|
+
Este audit é o **HUB** que conecta as 3 suítes:
|
|
165
|
+
- v1.9 Observabilidade (golden signals + SLO + burn alert)
|
|
166
|
+
- v1.10 SRE (PRR Axe 2 Instrumentation + Axe 4 Capacity)
|
|
167
|
+
- v1.12 Legacy (characterization safety net)
|
|
168
|
+
|
|
169
|
+
Re-rodar trimestralmente OR após cada milestone com novas Edge Functions.
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
</process>
|
|
173
|
+
|
|
174
|
+
<success_criteria>
|
|
175
|
+
- [ ] $ARGUMENTS parseados (todos opcionais, defaults razoáveis)
|
|
176
|
+
- [ ] Project_id resolvido OU degradado para tier partial sem warning
|
|
177
|
+
- [ ] Edge Functions enumeradas (≥ 1 detectada)
|
|
178
|
+
- [ ] `observability-coverage-auditor` invocado via Task
|
|
179
|
+
- [ ] Output forwarded transparentemente
|
|
180
|
+
- [ ] Próximos passos PRIORIZADOS com comandos prontos para copy-paste
|
|
181
|
+
- [ ] Cross-references com /observabilidade, /auditar-marco, /golden-signals, /caracterizar
|
|
182
|
+
- [ ] Atende explicitamente ao user-request "comando que você roda hoje pra ver o tamanho do buraco"
|
|
183
|
+
</success_criteria>
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: auditar-refactor
|
|
3
|
+
description: Invoca refactor-safety-auditor — gate canônico antes de qualquer refactor. Coleta evidências (linhas, contrato externo, coverage, mutation) e retorna veredito GO/BLOCK/WARN/GO-OVERRIDE. Bloqueia refactor de risco sem characterization.
|
|
4
|
+
argument-hint: "<target_file> [--change-kind refactor|sprout|safe-extract|override] [--mode blocking|consultive] [--ticket REQ-N] [--reason \"...\"]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
- Grep
|
|
10
|
+
- Glob
|
|
11
|
+
- Task
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<objective>
|
|
15
|
+
Auditar arquivo alvo de refactor ANTES da execução para decidir se safety net (characterization tests) é adequado. Invoca o agente [`refactor-safety-auditor`](../agents/refactor-safety-auditor.md) que aplica a skill [`pre-refactor-characterization`](../skills/pre-refactor-characterization/SKILL.md) — 3 critérios de risco canônicos (tamanho > 500 linhas, contrato externo, cobertura < 60%) + matriz de decisão.
|
|
16
|
+
|
|
17
|
+
**Cria/Atualiza:**
|
|
18
|
+
- `.planning/REFACTOR-SAFETY.md` — relatório com evidências, veredito, caminhos recomendados, audit trail
|
|
19
|
+
|
|
20
|
+
**Após:** o user tem decisão **objetiva** (não gut-feeling) sobre se refactor pode prosseguir. Se BLOCK, oferece 4 caminhos concretos. Se GO-OVERRIDE, registra ticket + reason para débito técnico.
|
|
21
|
+
</objective>
|
|
22
|
+
|
|
23
|
+
<context>
|
|
24
|
+
**Argumentos:**
|
|
25
|
+
- `<target_file>` — caminho do arquivo a auditar — OBRIGATÓRIO
|
|
26
|
+
- `--change-kind <kind>` — tipo da mudança (default: `refactor`):
|
|
27
|
+
- `refactor` — mudança comportamental (gate roda completo)
|
|
28
|
+
- `sprout` — adiciona via sprout method/class (legado intocado, gate libera com 100% no novo)
|
|
29
|
+
- `safe-extract` — refactor mecânico (rename, IDE-extract bloco contíguo, sem mudar control flow)
|
|
30
|
+
- `override` — bypass com justificativa (requer --ticket + --reason)
|
|
31
|
+
- `--mode blocking|consultive` — força modo do gate (default: lido de `.planning/config.json`)
|
|
32
|
+
- `--ticket REQ-N` — ticket linkado (obrigatório com --change-kind=override)
|
|
33
|
+
- `--reason "<texto>"` — justificativa (obrigatória com --change-kind=override)
|
|
34
|
+
- `--output PATH` — caminho do output (default: `.planning/REFACTOR-SAFETY.md`)
|
|
35
|
+
|
|
36
|
+
**Exemplos:**
|
|
37
|
+
```
|
|
38
|
+
/auditar-refactor src/orders/handler.ts # default refactor
|
|
39
|
+
/auditar-refactor src/orders/handler.ts --change-kind sprout # libera (sprout)
|
|
40
|
+
/auditar-refactor src/orders/handler.ts --change-kind safe-extract # libera (mecânico)
|
|
41
|
+
/auditar-refactor src/orders/handler.ts \
|
|
42
|
+
--change-kind override --ticket REQ-2026-Q2-1234 \
|
|
43
|
+
--reason "hot fix de SEV1, char será adicionado em REQ-2026-Q2-1235" # bypass com audit trail
|
|
44
|
+
/auditar-refactor src/orders/handler.ts --mode consultive # warning em vez de block
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Fluxo típico:**
|
|
48
|
+
1. `/discutir-fase` detecta refactor intent → automaticamente invoca este comando
|
|
49
|
+
2. Veredito BLOCK → user escolhe um dos 4 caminhos (caracterizar, sprout, safe-extract, override)
|
|
50
|
+
3. Aplicar caminho + re-rodar este comando até veredito GO
|
|
51
|
+
4. Refactor executado com confiança
|
|
52
|
+
|
|
53
|
+
**Quando invocar manualmente:**
|
|
54
|
+
- Antes de planejar fase de refactor
|
|
55
|
+
- Antes de PR de refactor de arquivo grande
|
|
56
|
+
- Periodicamente em milestones para identificar gaps de coverage
|
|
57
|
+
- Como parte de `/auditar-marco` quando `workflow.audit_milestone_legacy_refactor=true`
|
|
58
|
+
</context>
|
|
59
|
+
|
|
60
|
+
<process>
|
|
61
|
+
|
|
62
|
+
## 1. Parsear argumentos
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
TARGET_FILE=$(echo "$ARGUMENTS" | awk '{print $1}')
|
|
66
|
+
CHANGE_KIND=$(echo "$ARGUMENTS" | grep -oE -- '--change-kind [^ ]+' | awk '{print $2}')
|
|
67
|
+
MODE=$(echo "$ARGUMENTS" | grep -oE -- '--mode [^ ]+' | awk '{print $2}')
|
|
68
|
+
TICKET=$(echo "$ARGUMENTS" | grep -oE -- '--ticket [^ ]+' | awk '{print $2}')
|
|
69
|
+
REASON=$(echo "$ARGUMENTS" | grep -oE -- '--reason "[^"]+"' | sed 's/--reason "\(.*\)"/\1/')
|
|
70
|
+
OUTPUT_PATH=$(echo "$ARGUMENTS" | grep -oE -- '--output [^ ]+' | awk '{print $2}')
|
|
71
|
+
|
|
72
|
+
[ -z "$CHANGE_KIND" ] && CHANGE_KIND="refactor"
|
|
73
|
+
[ -z "$OUTPUT_PATH" ] && OUTPUT_PATH=".planning/REFACTOR-SAFETY.md"
|
|
74
|
+
|
|
75
|
+
if [ -z "$TARGET_FILE" ]; then
|
|
76
|
+
echo "ERROR: target_file é obrigatório."
|
|
77
|
+
echo "Uso: /auditar-refactor <target_file> [opções]"
|
|
78
|
+
exit 1
|
|
79
|
+
fi
|
|
80
|
+
|
|
81
|
+
if [ ! -f "$TARGET_FILE" ]; then
|
|
82
|
+
echo "ERROR: arquivo não encontrado: $TARGET_FILE"
|
|
83
|
+
exit 1
|
|
84
|
+
fi
|
|
85
|
+
|
|
86
|
+
# PT-BR: validar override → exige ticket + reason
|
|
87
|
+
if [ "$CHANGE_KIND" = "override" ]; then
|
|
88
|
+
if [ -z "$TICKET" ] || [ -z "$REASON" ]; then
|
|
89
|
+
echo "ERROR: --change-kind=override requer --ticket REQ-N E --reason \"<texto>\"."
|
|
90
|
+
echo "Sem audit trail, override é proibido."
|
|
91
|
+
exit 1
|
|
92
|
+
fi
|
|
93
|
+
fi
|
|
94
|
+
|
|
95
|
+
mkdir -p "$(dirname "$OUTPUT_PATH")"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## 2. Detectar mode default via config + omm
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# PT-BR: ler config para mode default
|
|
102
|
+
CONFIG_MODE=""
|
|
103
|
+
if [ -f ".planning/config.json" ] && command -v jq >/dev/null; then
|
|
104
|
+
GATE_BLOCKING=$(jq -r '.workflow.legacy_refactor_gate_blocking // empty' .planning/config.json)
|
|
105
|
+
if [ "$GATE_BLOCKING" = "true" ]; then
|
|
106
|
+
CONFIG_MODE="blocking"
|
|
107
|
+
elif [ "$GATE_BLOCKING" = "false" ]; then
|
|
108
|
+
CONFIG_MODE="consultive"
|
|
109
|
+
fi
|
|
110
|
+
fi
|
|
111
|
+
|
|
112
|
+
# PT-BR: integração com omm-auditor — Capacidade 1 (Resilience) calibra mode
|
|
113
|
+
if [ -z "$MODE" ] && [ -z "$CONFIG_MODE" ]; then
|
|
114
|
+
if [ -f ".planning/OMM-REPORT.md" ]; then
|
|
115
|
+
OMM_RESILIENCE=$(grep -oE 'Capacidade 1.*Resilience.*[0-9]/5' .planning/OMM-REPORT.md | grep -oE '[0-9]/5' | head -1 | sed 's|/5||')
|
|
116
|
+
if [ -n "$OMM_RESILIENCE" ] && [ "$OMM_RESILIENCE" -ge 3 ]; then
|
|
117
|
+
MODE="blocking"
|
|
118
|
+
else
|
|
119
|
+
MODE="consultive"
|
|
120
|
+
fi
|
|
121
|
+
fi
|
|
122
|
+
fi
|
|
123
|
+
|
|
124
|
+
[ -z "$MODE" ] && MODE="${CONFIG_MODE:-blocking}"
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## 3. Dispatch para `refactor-safety-auditor`
|
|
128
|
+
|
|
129
|
+
```text
|
|
130
|
+
Task(
|
|
131
|
+
subagent_type="refactor-safety-auditor",
|
|
132
|
+
prompt="
|
|
133
|
+
target_file: ${TARGET_FILE}
|
|
134
|
+
change_kind: ${CHANGE_KIND}
|
|
135
|
+
output_path: ${OUTPUT_PATH}
|
|
136
|
+
mode: ${MODE}
|
|
137
|
+
${TICKET:+ticket: ${TICKET}}
|
|
138
|
+
${REASON:+reason: ${REASON}}
|
|
139
|
+
|
|
140
|
+
Aplicar skill pre-refactor-characterization. Etapas:
|
|
141
|
+
1. Preflight: detectar linguagem, validar input
|
|
142
|
+
2. Coletar evidências:
|
|
143
|
+
- line count + heurística de aninhamento
|
|
144
|
+
- external contract (path patterns, content markers, cross-package refs)
|
|
145
|
+
- coverage atual (line coverage como proxy)
|
|
146
|
+
- characterization tests existentes
|
|
147
|
+
- mutation kill score (se disponível)
|
|
148
|
+
3. Aplicar matriz de decisão (3 critérios canônicos)
|
|
149
|
+
4. Determinar caminho recomendado (caracterizar/sprout/safe-extract/override)
|
|
150
|
+
5. Escrever REFACTOR-SAFETY.md com evidências, veredito, paths, audit trail
|
|
151
|
+
6. Output curto para caller (veredito + custo + próximos passos)
|
|
152
|
+
"
|
|
153
|
+
)
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## 4. Pós-output
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
═══════════════════════════════════════════════════════════
|
|
160
|
+
framework ► AUDITAR-REFACTOR ▸ ${OUTPUT_PATH}
|
|
161
|
+
═══════════════════════════════════════════════════════════
|
|
162
|
+
|
|
163
|
+
[output do refactor-safety-auditor]
|
|
164
|
+
|
|
165
|
+
## Decision matrix referência
|
|
166
|
+
|
|
167
|
+
| Veredito | Significado | Próxima ação |
|
|
168
|
+
|---|---|---|
|
|
169
|
+
| **GO** | Safety net adequado | Refactor pode prosseguir |
|
|
170
|
+
| **GO-OVERRIDE** | Bypass com audit trail | Refactor pode prosseguir, débito documentado em ticket |
|
|
171
|
+
| **WARN** | Risco médio | Considere `/caracterizar --gap-fill` antes; ou prosseguir + monitor |
|
|
172
|
+
| **BLOCK** | Risco alto sem safety net | Escolha um dos 4 caminhos abaixo |
|
|
173
|
+
|
|
174
|
+
## Caminhos quando BLOCK (em ordem de preferência)
|
|
175
|
+
|
|
176
|
+
1. **Caracterizar primeiro** (recomendado para refactor real)
|
|
177
|
+
```
|
|
178
|
+
/caracterizar <file>
|
|
179
|
+
```
|
|
180
|
+
Custo: 8-16h. Cobertura behavioral ≥ 70%. Gate retorna GO após.
|
|
181
|
+
|
|
182
|
+
2. **Sprout/Wrap** (não toca legado, ADICIONA comportamento)
|
|
183
|
+
```
|
|
184
|
+
/refactor-seguro --mode=sprout <file>
|
|
185
|
+
```
|
|
186
|
+
Custo: 0.5-4h. Legado intocado, novo testado isolado.
|
|
187
|
+
|
|
188
|
+
3. **Safe extraction** (mecânico — rename, IDE-extract)
|
|
189
|
+
```
|
|
190
|
+
/refactor-seguro --mode=safe-extract <file>
|
|
191
|
+
```
|
|
192
|
+
Custo: 1-2h. Apenas refactor sem mudança comportamental.
|
|
193
|
+
|
|
194
|
+
4. **Override** (último recurso, audit trail)
|
|
195
|
+
```
|
|
196
|
+
/refactor-seguro --mode=override --ticket REQ-N --reason "<texto>" <file>
|
|
197
|
+
```
|
|
198
|
+
Custo: 0h refactor + custo do débito. Aprovação humana obrigatória.
|
|
199
|
+
|
|
200
|
+
## Cross-suite
|
|
201
|
+
|
|
202
|
+
- **/instrumentar-fase** (v1.9) — durante refactor com BLOCK→GO via override, instrumentar para detecção precoce de regressão via golden signals
|
|
203
|
+
- **/burn-rate-status** (v1.9) — refactor pode regredir SLO; monitor budget pós-deploy
|
|
204
|
+
- **/prr** (v1.10) — Production Readiness Review Axe 5 (Change Management) consume veredito deste gate
|
|
205
|
+
- **/postmortem** (v1.10) — postmortems de regression em refactor sem char referenciam essa auditoria como lesson learned
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
</process>
|
|
209
|
+
|
|
210
|
+
<success_criteria>
|
|
211
|
+
- [ ] $ARGUMENTS parseados (target_file obrigatório, --change-kind=override exige ticket + reason)
|
|
212
|
+
- [ ] Mode resolvido: argument explícito > config.json > omm-auditor (Capacidade 1) > default blocking
|
|
213
|
+
- [ ] `refactor-safety-auditor` invocado via `Task(subagent_type=...)` com prompt completo (6 etapas)
|
|
214
|
+
- [ ] `.planning/REFACTOR-SAFETY.md` criado pelo agent
|
|
215
|
+
- [ ] Output forwarded transparentemente
|
|
216
|
+
- [ ] Decision matrix exibida para referência
|
|
217
|
+
- [ ] 4 caminhos oferecidos quando BLOCK (com comandos prontos para copy-paste)
|
|
218
|
+
- [ ] Cross-references com Suíte Observabilidade + SRE
|
|
219
|
+
</success_criteria>
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: auditar-release
|
|
3
|
+
description: Invoca release-pipeline-auditor — audita CI/CD para hermeticidade (lockfile + frozen-install + image SHA + sem network), reprodutibilidade (versions pinned), policy enforcement (branch protection, signed commits, CODEOWNERS). Cap 8 livro Google SRE.
|
|
4
|
+
argument-hint: "[--dimensions hermeticidade,reprodutibilidade,policy-enforcement] [--gh-repo OWNER/REPO]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Bash
|
|
8
|
+
- Grep
|
|
9
|
+
- Glob
|
|
10
|
+
- Task
|
|
11
|
+
- Write
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<objective>
|
|
15
|
+
Auditar **release pipeline** (CI/CD + Dockerfile + branch protection) em 3 dimensões: hermeticidade, reprodutibilidade, policy enforcement. Invoca o agente [`release-pipeline-auditor`](../agents/release-pipeline-auditor.md) que aplica skills [`hermetic-builds`](../skills/hermetic-builds/SKILL.md) + [`release-engineering`](../skills/release-engineering/SKILL.md).
|
|
16
|
+
|
|
17
|
+
**Cria/Atualiza:**
|
|
18
|
+
- `.planning/RELEASE-AUDIT.md` — relatório scored 30 pontos com top 5 fixes priorizados
|
|
19
|
+
|
|
20
|
+
**Após:** o user vê fragility quantificada (não opinião). Resultado feeds PRR Axe 5 (Change Management) v1.10 e gate `release-pipeline-policy` opt-in.
|
|
21
|
+
</objective>
|
|
22
|
+
|
|
23
|
+
<context>
|
|
24
|
+
**Argumentos:**
|
|
25
|
+
- `--dimensions <list>` — subset de `[hermeticidade, reprodutibilidade, policy-enforcement]` (default: todas)
|
|
26
|
+
- `--gh-repo OWNER/REPO` — override de repo detection (default: `gh repo view`)
|
|
27
|
+
- `--output PATH` — caminho do output (default: `.planning/RELEASE-AUDIT.md`)
|
|
28
|
+
|
|
29
|
+
**Exemplos:**
|
|
30
|
+
```
|
|
31
|
+
/auditar-release # full audit (3 dims)
|
|
32
|
+
/auditar-release --dimensions hermeticidade # só hermeticidade
|
|
33
|
+
/auditar-release --gh-repo myorg/myrepo # override repo
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Pré-requisitos opcionais:**
|
|
37
|
+
- `gh` CLI autenticado (`gh auth status`) — para checks de branch protection via API
|
|
38
|
+
- Sem `gh`: agent skip dimension policy-enforcement parcialmente (filesystem only)
|
|
39
|
+
</context>
|
|
40
|
+
|
|
41
|
+
<process>
|
|
42
|
+
|
|
43
|
+
## 1. Parsear argumentos
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
DIMENSIONS=$(echo "$ARGUMENTS" | grep -oE -- '--dimensions [^ ]+' | awk '{print $2}')
|
|
47
|
+
GH_REPO=$(echo "$ARGUMENTS" | grep -oE -- '--gh-repo [^ ]+' | awk '{print $2}')
|
|
48
|
+
OUTPUT_PATH=$(echo "$ARGUMENTS" | grep -oE -- '--output [^ ]+' | awk '{print $2}')
|
|
49
|
+
|
|
50
|
+
[ -z "$OUTPUT_PATH" ] && OUTPUT_PATH=".planning/RELEASE-AUDIT.md"
|
|
51
|
+
mkdir -p "$(dirname "$OUTPUT_PATH")"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## 2. Dispatch para `release-pipeline-auditor`
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
Task(
|
|
58
|
+
subagent_type="release-pipeline-auditor",
|
|
59
|
+
prompt="
|
|
60
|
+
project_root: .
|
|
61
|
+
output_path: ${OUTPUT_PATH}
|
|
62
|
+
${DIMENSIONS:+dimensions: ${DIMENSIONS}}
|
|
63
|
+
${GH_REPO:+gh_repo: ${GH_REPO}}
|
|
64
|
+
|
|
65
|
+
Aplicar skills hermetic-builds + release-engineering. Etapas:
|
|
66
|
+
1. Detectar lockfile, CI files, Dockerfile
|
|
67
|
+
2. Auditar Hermeticidade (10pts): lockfile commitado, frozen-install, image SHA, sem network, SLSA provenance
|
|
68
|
+
3. Auditar Reprodutibilidade (10pts): actions pinned, node version pinned, package manager pinned, sem timestamps, build cache
|
|
69
|
+
4. Auditar Policy Enforcement (10pts): branch protection, required PR + reviewers + status checks, CODEOWNERS, signed commits, workflow permissions, release via tag
|
|
70
|
+
5. Score agregado (0-30) com veredito ROBUST/ADEQUATE/FRAGILE/BROKEN
|
|
71
|
+
6. Top 5 fixes priorizados com esforço estimado
|
|
72
|
+
"
|
|
73
|
+
)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## 3. Pós-output
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
═══════════════════════════════════════════════════════════
|
|
80
|
+
framework ► AUDITAR-RELEASE ▸ ${OUTPUT_PATH}
|
|
81
|
+
═══════════════════════════════════════════════════════════
|
|
82
|
+
|
|
83
|
+
[output do agent]
|
|
84
|
+
|
|
85
|
+
## Próximos passos
|
|
86
|
+
|
|
87
|
+
1. **Aplicar top 5 fixes** do RELEASE-AUDIT.md (esforço total ~1-2h)
|
|
88
|
+
2. **/prr <service>** (v1.10) — Axe 5 (Change Management) consume este audit
|
|
89
|
+
3. **Re-audit em 30d** — verificar progresso
|
|
90
|
+
4. **/concluir-marco** (framework + patch v1.11) — opt-in gate `release-pipeline-policy`
|
|
91
|
+
|
|
92
|
+
## Cross-suite
|
|
93
|
+
|
|
94
|
+
- v1.10 SRE — PRR Axe 5 (Change Management)
|
|
95
|
+
- v1.11 SRE Resilience — esse audit
|
|
96
|
+
- v1.12 Legacy — overrides de refactor têm audit trail aqui
|
|
97
|
+
- Framework flow — /concluir-marco gate opt-in
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
</process>
|
|
101
|
+
|
|
102
|
+
<success_criteria>
|
|
103
|
+
- [ ] $ARGUMENTS parseados (todos opcionais)
|
|
104
|
+
- [ ] `release-pipeline-auditor` invocado via Task
|
|
105
|
+
- [ ] RELEASE-AUDIT.md scored 30 pts criado
|
|
106
|
+
- [ ] Veredito ROBUST/ADEQUATE/FRAGILE/BROKEN
|
|
107
|
+
- [ ] Top 5 fixes priorizados com esforço
|
|
108
|
+
- [ ] Cross-references com /prr e /concluir-marco
|
|
109
|
+
</success_criteria>
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: auditar-toil
|
|
3
|
+
description: Invoca toil-auditor — analisa repo + git log + scripts + runbooks; gera .planning/TOIL-AUDIT.md priorizado P0/P1/P2 com esforço de automação.
|
|
4
|
+
argument-hint: "[--time-window 3m] [--team-size N] [--output PATH]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
- Grep
|
|
10
|
+
- Glob
|
|
11
|
+
- Task
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<objective>
|
|
15
|
+
Auditar o repositório atual em busca de **toil** (cap 5 do livro Google SRE) — trabalho manual, repetitivo, automatizável, tático, sem valor durável que escala linear com tráfego/usuários. Invoca o agente [`toil-auditor`](../agents/toil-auditor.md) que aplica a skill [`eliminating-toil`](../skills/eliminating-toil/SKILL.md) — 6 critérios canônicos, regra ≤ 50%, distinção toil vs overhead vs grungy work.
|
|
16
|
+
|
|
17
|
+
**Cria/Atualiza:**
|
|
18
|
+
- `.planning/TOIL-AUDIT.md` — lista priorizada P0/P1/P2 com 6 critérios scored + esforço de automação estimado
|
|
19
|
+
|
|
20
|
+
**Após:** o user tem audit acionável para reduzir toil pelo time. Phase 39 INT-OBS-02 integra ao `omm-auditor` (v1.9) — Capacidade 3 do OMM scoring usa este audit.
|
|
21
|
+
</objective>
|
|
22
|
+
|
|
23
|
+
<context>
|
|
24
|
+
**Argumentos:** `$ARGUMENTS` — todas as flags são opcionais; comando funciona com defaults.
|
|
25
|
+
|
|
26
|
+
**Flags:**
|
|
27
|
+
- `--time-window <Nm|Nd>` — janela de git history a analisar (default: `3m` = 3 meses)
|
|
28
|
+
- `--team-size <N>` — número de pessoas no time (default: inferido via `git shortlog -sn`)
|
|
29
|
+
- `--output <path>` — caminho do output (default: `.planning/TOIL-AUDIT.md`)
|
|
30
|
+
- `--runbooks-paths <p1,p2,...>` — paths customizados de runbooks (default: `runbooks/, docs/runbooks/, ops/, scripts/, .github/workflows/`)
|
|
31
|
+
|
|
32
|
+
**Exemplos:**
|
|
33
|
+
```
|
|
34
|
+
/auditar-toil # defaults — 3m de git, team auto-detect
|
|
35
|
+
/auditar-toil --time-window 6m --team-size 5 # janela maior + team explícito
|
|
36
|
+
/auditar-toil --output .planning/audit/toil-2026-Q2.md # path customizado
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Pré-requisito:** repositório git inicializado (sem isso, agent skip git log analysis e usa apenas scripts/runbooks).
|
|
40
|
+
</context>
|
|
41
|
+
|
|
42
|
+
<process>
|
|
43
|
+
|
|
44
|
+
## 1. Parsear argumentos
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
TIME_WINDOW=$(echo "$ARGUMENTS" | grep -oE -- '--time-window [^ ]+' | awk '{print $2}')
|
|
48
|
+
TEAM_SIZE=$(echo "$ARGUMENTS" | grep -oE -- '--team-size [^ ]+' | awk '{print $2}')
|
|
49
|
+
OUTPUT_PATH=$(echo "$ARGUMENTS" | grep -oE -- '--output [^ ]+' | awk '{print $2}')
|
|
50
|
+
RUNBOOKS=$(echo "$ARGUMENTS" | grep -oE -- '--runbooks-paths [^ ]+' | awk '{print $2}')
|
|
51
|
+
|
|
52
|
+
[ -z "$TIME_WINDOW" ] && TIME_WINDOW="3m"
|
|
53
|
+
[ -z "$OUTPUT_PATH" ] && OUTPUT_PATH=".planning/TOIL-AUDIT.md"
|
|
54
|
+
|
|
55
|
+
# PT-BR: criar destination dir
|
|
56
|
+
mkdir -p "$(dirname "$OUTPUT_PATH")"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## 2. Validar pré-requisitos
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# PT-BR: detectar git repo (não-bloqueante — agent funciona sem git, só com scripts/runbooks)
|
|
63
|
+
GIT_OK=true
|
|
64
|
+
git rev-parse --git-dir >/dev/null 2>&1 || GIT_OK=false
|
|
65
|
+
|
|
66
|
+
if [ "$GIT_OK" = false ]; then
|
|
67
|
+
echo "⚠ Nenhum repositório git detectado — agent vai pular git log analysis."
|
|
68
|
+
echo " (toil-auditor continuará com scripts/runbooks apenas)"
|
|
69
|
+
fi
|
|
70
|
+
|
|
71
|
+
# PT-BR: verificar se TOIL-AUDIT.md anterior existe (idempotência)
|
|
72
|
+
if [ -f "$OUTPUT_PATH" ]; then
|
|
73
|
+
LAST_DATE=$(grep -m1 '**Audit date:**' "$OUTPUT_PATH" 2>/dev/null | sed 's/.*Audit date:\*\* //' || echo "?")
|
|
74
|
+
echo "ℹ TOIL-AUDIT.md anterior detectado (Audit date: $LAST_DATE)."
|
|
75
|
+
echo " Novo audit vai sobrescrever — agent compara com anterior se preservou histórico."
|
|
76
|
+
fi
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## 3. Dispatch para `toil-auditor`
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
Task(
|
|
83
|
+
subagent_type="toil-auditor",
|
|
84
|
+
prompt="
|
|
85
|
+
project_root: .
|
|
86
|
+
output_path: ${OUTPUT_PATH}
|
|
87
|
+
time_window: ${TIME_WINDOW}
|
|
88
|
+
${TEAM_SIZE:+team_size: ${TEAM_SIZE}}
|
|
89
|
+
${RUNBOOKS:+runbooks_paths: ${RUNBOOKS}}
|
|
90
|
+
|
|
91
|
+
Aplicar skill eliminating-toil. Etapas:
|
|
92
|
+
1. Scan: git log normalizado (commits repetitivos), scripts shell em paths canônicos, runbooks (manual ops descritas), README/CONTRIBUTING (manual setup).
|
|
93
|
+
2. Aplicar 6 critérios canônicos (manual, repetitivo, automatizável, tático, sem valor durável, escala linear) em cada candidato.
|
|
94
|
+
3. Distinguir toil vs overhead (reuniões/RH — não-elimináveis) vs grungy work (refactor — projeto engineering).
|
|
95
|
+
4. Priorizar P0/P1/P2 por (frequency × pain) / automation_effort.
|
|
96
|
+
5. Estimar esforço de automação por candidato (hours/days) + estágio L0-L4 do automation continuum.
|
|
97
|
+
6. Computar % do tempo do time gasto em toil (regra ≤ 50%).
|
|
98
|
+
|
|
99
|
+
Output: ${OUTPUT_PATH} com tabela priorizada + sumário executivo + recomendações.
|
|
100
|
+
"
|
|
101
|
+
)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## 4. Pós-output + integração OMM
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
═══════════════════════════════════════════════════════════
|
|
108
|
+
framework ► AUDITAR-TOIL ▸ ${OUTPUT_PATH}
|
|
109
|
+
═══════════════════════════════════════════════════════════
|
|
110
|
+
|
|
111
|
+
[output do toil-auditor — ver Step 5 do agent]
|
|
112
|
+
|
|
113
|
+
## Próximos passos
|
|
114
|
+
1. Revisar P0 (alto impacto, baixo esforço) — alvos imediatos para automação
|
|
115
|
+
2. Se `workflow.audit_milestone_toil=true`, este audit alimenta `/auditar-marco` (Phase 40 INT-FW-V2-03)
|
|
116
|
+
3. Cross-ref OMM (v1.9 — Capacidade 3 Tech Debt): `/observabilidade omm` consome este audit
|
|
117
|
+
4. Re-audit recomendado a cada milestone (toil cresce silencioso)
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
</process>
|
|
121
|
+
|
|
122
|
+
<success_criteria>
|
|
123
|
+
- [ ] $ARGUMENTS parseados (4 flags opcionais com defaults sensatos)
|
|
124
|
+
- [ ] Pré-requisitos validados de forma não-bloqueante (git ausente OK; falta runbooks OK)
|
|
125
|
+
- [ ] `toil-auditor` invocado via `Task(subagent_type=...)` com prompt completo (6 etapas)
|
|
126
|
+
- [ ] `.planning/TOIL-AUDIT.md` (ou `--output` custom) criado pelo agent
|
|
127
|
+
- [ ] Output forwarded transparentemente do agent (sem post-processing)
|
|
128
|
+
- [ ] Próximos passos sugerem cross-ref para `/auditar-marco`, `/observabilidade omm`
|
|
129
|
+
</success_criteria>
|