@luanpdd/kit-mcp 1.34.0 → 1.36.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/README.md +1 -1
- package/bin/cli.js +2 -2
- package/bin/mcp.js +6 -6
- package/bin/ui.js +74 -74
- package/gates/ai-prompt-stability.md +120 -120
- package/gates/budget-description.md +68 -68
- package/gates/confidence.md +29 -29
- package/gates/dependency-check.md +33 -33
- package/gates/dept-cycle-prevention.md +179 -179
- package/gates/golden-signals-coverage.md +133 -133
- package/gates/legacy-refactor-safety.md +178 -178
- package/gates/multi-tenant-rls-coverage.md +102 -102
- package/gates/no-personal-uuid.md +72 -72
- package/gates/obs-agents-mcp-supabase.md +86 -86
- package/gates/obs-skills-frontmatter.md +76 -76
- package/gates/observability-coverage.md +151 -151
- package/gates/omm-no-regression.md +83 -83
- package/gates/postmortem-template-required.md +127 -127
- package/gates/prr-checklist-coverage.md +128 -128
- package/gates/regression.md +32 -32
- package/gates/release-pipeline-policy.md +132 -132
- package/gates/secrets-scan.md +33 -33
- package/gates/service-role-not-in-user-facing.md +113 -113
- package/gates/skill-must-include.md +71 -71
- package/gates/sync-idempotent.md +62 -62
- package/gates/verify-phase-goal.md +34 -34
- package/kit/agents/designer-ui.md +216 -216
- package/kit/agents/workflow-generator.md +537 -0
- package/kit/commands/adicionar-backlog.md +1 -1
- package/kit/commands/adicionar-fase.md +1 -1
- package/kit/commands/adicionar-tarefa.md +1 -1
- package/kit/commands/auditar-observabilidade.md +103 -103
- package/kit/commands/auditar-toil.md +129 -129
- package/kit/commands/caracterizar-prompt.md +195 -195
- package/kit/commands/criar-workflow.md +158 -0
- package/kit/commands/definir-perfil.md +1 -1
- package/kit/commands/definir-slo.md +108 -108
- package/kit/commands/fio.md +1 -1
- package/kit/commands/golden-signals.md +142 -142
- package/kit/commands/instrumentar-fase.md +200 -200
- package/kit/commands/investigar-producao.md +162 -162
- package/kit/commands/observabilidade.md +118 -118
- package/kit/commands/postmortem.md +179 -179
- package/kit/commands/prr.md +205 -205
- package/kit/commands/publicar-rapido.md +207 -207
- package/kit/commands/risk-budget.md +220 -220
- package/kit/commands/sre.md +230 -230
- package/kit/file-manifest.json +5 -2
- package/kit/framework/references/output-style.md +22 -22
- package/kit/hooks/post-apply-migration.js +199 -199
- package/kit/hooks/sidecar-tool-publisher.js +210 -210
- package/kit/skills/_shared-dados-distribuidos/glossary.md +224 -224
- package/kit/skills/_shared-legacy/glossary.md +389 -389
- package/kit/skills/_shared-multi-tenant/glossary.md +186 -186
- package/kit/skills/_shared-observability/glossary.md +396 -396
- package/kit/skills/_shared-sre/glossary.md +712 -712
- package/kit/skills/_shared-supabase/glossary.md +234 -234
- package/kit/skills/blameless-postmortems/SKILL.md +340 -340
- package/kit/skills/burn-rate-alerting/SKILL.md +258 -258
- package/kit/skills/cascading-failures/SKILL.md +311 -311
- package/kit/skills/core-analysis-loop/SKILL.md +352 -352
- package/kit/skills/distributed-tracing/SKILL.md +362 -362
- package/kit/skills/dynamic-workflow-authoring/SKILL.md +327 -0
- package/kit/skills/eliminating-toil/SKILL.md +243 -243
- package/kit/skills/event-based-slos/SKILL.md +296 -296
- package/kit/skills/four-golden-signals/SKILL.md +314 -314
- package/kit/skills/hermetic-builds/SKILL.md +323 -323
- package/kit/skills/legacy-monster-methods/SKILL.md +444 -444
- package/kit/skills/llm-as-dependency/SKILL.md +436 -436
- package/kit/skills/load-shedding-graceful-degradation/SKILL.md +396 -396
- package/kit/skills/observability-driven-development/SKILL.md +315 -315
- package/kit/skills/observability-maturity-model/SKILL.md +222 -222
- package/kit/skills/opentelemetry-standard/SKILL.md +351 -351
- package/kit/skills/production-readiness-review/SKILL.md +305 -305
- package/kit/skills/release-engineering/SKILL.md +367 -367
- package/kit/skills/retry-strategies/SKILL.md +372 -372
- package/kit/skills/sre-risk-management/SKILL.md +221 -221
- package/kit/skills/structured-events/SKILL.md +265 -265
- package/kit/skills/supabase-cron-queues/SKILL.md +275 -275
- package/kit/skills/supabase-database-functions/SKILL.md +332 -332
- package/kit/skills/supabase-declarative-schema/SKILL.md +183 -183
- package/kit/skills/supabase-pgvector-rag/SKILL.md +253 -253
- package/kit/skills/supabase-postgres-style/SKILL.md +138 -138
- package/kit/skills/supabase-storage/SKILL.md +234 -234
- package/kit/skills/telemetry-pipelines/SKILL.md +259 -259
- package/kit/skills/telemetry-sampling/SKILL.md +256 -256
- package/kit/skills/ui-anti-padroes-ia/SKILL.md +261 -261
- package/kit/skills/ui-contexto-produto/SKILL.md +248 -248
- package/kit/skills/ui-cor-estrategia/SKILL.md +213 -213
- package/kit/skills/ui-critica-auditoria/SKILL.md +260 -260
- package/kit/skills/ui-motion-funcional/SKILL.md +264 -264
- package/kit/skills/ui-ritmo-espacial/SKILL.md +259 -259
- package/kit/skills/ui-tipografia/SKILL.md +211 -211
- package/package.json +1 -1
- package/src/cli/index.js +1114 -1114
- package/src/cli/render.js +194 -194
- package/src/cli/upgrade-check.js +135 -135
- package/src/core/error-redaction.js +76 -76
- package/src/core/failures.js +153 -153
- package/src/core/gate-runner.js +205 -205
- package/src/core/gates.js +82 -82
- package/src/core/logger.js +170 -170
- package/src/core/manifest-verify.js +174 -174
- package/src/core/metrics.js +268 -268
- package/src/core/notify.js +60 -60
- package/src/core/path-safety.js +141 -141
- package/src/core/replays.js +120 -120
- package/src/core/ui.js +185 -185
- package/src/mcp-server/install.js +149 -149
- package/src/mcp-server/roots.js +124 -124
- package/src/ui/auto-spawn.js +113 -113
- package/src/ui/browser.js +78 -78
- package/src/ui/client.js +130 -130
- package/src/ui/events.js +65 -65
- package/src/ui/lockfile.js +191 -191
- package/src/ui/port.js +67 -67
- package/src/ui/server.js +547 -547
- package/src/ui/wrapper.js +129 -129
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: postmortem-template-required
|
|
3
|
-
stage: pre-conclude
|
|
4
|
-
blocking: true
|
|
5
|
-
description: Bloqueia /concluir-marco se há investigação em .planning/investigations/ sem postmortem correspondente em .planning/postmortems/. "No postmortem left unreviewed" (cap 15).
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Postmortem template required gate
|
|
9
|
-
|
|
10
|
-
**When to run:** pre-conclude (blocking — milestone NÃO arquiva até cada incident ter postmortem blameless).
|
|
11
|
-
|
|
12
|
-
## Check
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
#!/usr/bin/env bash
|
|
16
|
-
# PT-BR: validar que cada investigação em .planning/investigations/ tem postmortem em .planning/postmortems/.
|
|
17
|
-
# Match por basename (sem extensão .md). Investigations com Status: INCONCLUSIVE são exceção.
|
|
18
|
-
# Bash 3.2-portable (macOS default).
|
|
19
|
-
set -e
|
|
20
|
-
|
|
21
|
-
INV_DIR=".planning/investigations"
|
|
22
|
-
PM_DIR=".planning/postmortems"
|
|
23
|
-
|
|
24
|
-
# PT-BR: se não há investigations, gate passa com INFO
|
|
25
|
-
if [ ! -d "$INV_DIR" ]; then
|
|
26
|
-
echo "INFO: $INV_DIR não existe — projeto sem incidents registrados. Gate skipped."
|
|
27
|
-
exit 0
|
|
28
|
-
fi
|
|
29
|
-
|
|
30
|
-
# PT-BR: listar investigations (single-file *.md OR subdir com STATE.md)
|
|
31
|
-
INVESTIGATIONS=""
|
|
32
|
-
|
|
33
|
-
# PT-BR: pattern A — .planning/investigations/<id>.md (single file)
|
|
34
|
-
SINGLE_FILES=$(find "$INV_DIR" -maxdepth 1 -type f -name "*.md" 2>/dev/null || true)
|
|
35
|
-
if [ -n "$SINGLE_FILES" ]; then
|
|
36
|
-
INVESTIGATIONS="$INVESTIGATIONS
|
|
37
|
-
$SINGLE_FILES"
|
|
38
|
-
fi
|
|
39
|
-
|
|
40
|
-
# PT-BR: pattern B — .planning/investigations/<id>/STATE.md (subdir state)
|
|
41
|
-
SUBDIR_STATES=$(find "$INV_DIR" -mindepth 2 -maxdepth 2 -type f -name "STATE.md" 2>/dev/null || true)
|
|
42
|
-
if [ -n "$SUBDIR_STATES" ]; then
|
|
43
|
-
INVESTIGATIONS="$INVESTIGATIONS
|
|
44
|
-
$SUBDIR_STATES"
|
|
45
|
-
fi
|
|
46
|
-
|
|
47
|
-
# PT-BR: filtrar linhas vazias
|
|
48
|
-
INVESTIGATIONS=$(echo "$INVESTIGATIONS" | grep -v "^$" || true)
|
|
49
|
-
|
|
50
|
-
if [ -z "$INVESTIGATIONS" ]; then
|
|
51
|
-
echo "INFO: $INV_DIR vazio — sem incidents registrados. Gate skipped."
|
|
52
|
-
exit 0
|
|
53
|
-
fi
|
|
54
|
-
|
|
55
|
-
# PT-BR: para cada investigation, extrair <id> e checar postmortem correspondente
|
|
56
|
-
MISSING=0
|
|
57
|
-
MISSING_LIST=""
|
|
58
|
-
OLDIFS="$IFS"
|
|
59
|
-
IFS='
|
|
60
|
-
'
|
|
61
|
-
for inv_path in $INVESTIGATIONS; do
|
|
62
|
-
[ -z "$inv_path" ] && continue
|
|
63
|
-
[ ! -f "$inv_path" ] && continue
|
|
64
|
-
|
|
65
|
-
# PT-BR: extrair <id> — basename sem .md OU dirname se for STATE.md em subdir
|
|
66
|
-
base=$(basename "$inv_path")
|
|
67
|
-
if [ "$base" = "STATE.md" ]; then
|
|
68
|
-
# pattern B — id é o nome do subdir parent
|
|
69
|
-
id=$(basename "$(dirname "$inv_path")")
|
|
70
|
-
else
|
|
71
|
-
# pattern A — id é basename sem .md
|
|
72
|
-
id="${base%.md}"
|
|
73
|
-
fi
|
|
74
|
-
|
|
75
|
-
# PT-BR: se investigation tem Status: INCONCLUSIVE (sem root cause), pular
|
|
76
|
-
if grep -qiE "^Status:.*INCONCLUSIVE|^.*Status.*INCONCLUSIVE" "$inv_path" 2>/dev/null; then
|
|
77
|
-
echo "INFO: investigation '$id' marcada INCONCLUSIVE — sem root cause, postmortem não exigido."
|
|
78
|
-
continue
|
|
79
|
-
fi
|
|
80
|
-
|
|
81
|
-
# PT-BR: postmortem esperado em .planning/postmortems/<id>.md
|
|
82
|
-
pm_path="$PM_DIR/$id.md"
|
|
83
|
-
if [ ! -f "$pm_path" ]; then
|
|
84
|
-
MISSING=$((MISSING + 1))
|
|
85
|
-
MISSING_LIST="$MISSING_LIST $id"
|
|
86
|
-
fi
|
|
87
|
-
done
|
|
88
|
-
IFS="$OLDIFS"
|
|
89
|
-
|
|
90
|
-
if [ "$MISSING" -eq 0 ]; then
|
|
91
|
-
echo "PASS: todas as investigações têm postmortem correspondente em $PM_DIR/"
|
|
92
|
-
exit 0
|
|
93
|
-
else
|
|
94
|
-
echo "FAIL: $MISSING investigação(ões) sem postmortem em $PM_DIR/:$MISSING_LIST"
|
|
95
|
-
echo "Sugestão: rodar /postmortem --from-investigation <id> para cada item ausente."
|
|
96
|
-
echo "Cross-ref: kit/skills/blameless-postmortems/SKILL.md + kit/agents/postmortem-writer.md"
|
|
97
|
-
echo "Princípio canônico: 'No postmortem left unreviewed' (cap 15 livro Google SRE)."
|
|
98
|
-
exit 1
|
|
99
|
-
fi
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Verdict
|
|
103
|
-
|
|
104
|
-
- **passed** — todas investigations têm postmortem correspondente OR investigations marcadas INCONCLUSIVE OR diretório `.planning/investigations/` ausente
|
|
105
|
-
- **block** — pelo menos 1 investigation sem postmortem em `.planning/postmortems/`
|
|
106
|
-
|
|
107
|
-
## Why
|
|
108
|
-
|
|
109
|
-
O livro Google SRE (cap 15 — *Postmortem Culture: Learning from Failure*) define como princípio canônico **"no postmortem left unreviewed"**: cada incident significativo (registrado como investigação via `/forense` + `incident-investigator` v1.9) deve gerar postmortem blameless documentando *o que aprendemos* e *o que mudaremos*.
|
|
110
|
-
|
|
111
|
-
Sem este gate, milestones arquivam com investigations órfãs — root cause foi diagnosticado mas aprendizado organizacional perdeu-se (anti-pattern hero culture: "fixei o bug, vamos seguir"). Gate força a chain canônica entre v1.9 (Core Analysis Loop diagnostica) e v1.10 (postmortem documenta).
|
|
112
|
-
|
|
113
|
-
Cross-ref agent canônico: [`postmortem-writer`](../kit/agents/postmortem-writer.md) (Phase 37 / AGCORE-SRE-03). Skill: [`blameless-postmortems`](../kit/skills/blameless-postmortems/SKILL.md) (Phase 36 / SKFD-SRE-04). Comando: `/postmortem --from-investigation <id>` (Phase 38 / CMD-SRE-03). Chain documentado em `kit/commands/forense.md` bloco `<sre_integration>` (Plan 40-01 / INT-FW-V2-01).
|
|
114
|
-
|
|
115
|
-
## REQ
|
|
116
|
-
|
|
117
|
-
QA-SRE-02.
|
|
118
|
-
|
|
119
|
-
## Configuração
|
|
120
|
-
|
|
121
|
-
Gate é **blocking** por default (cultura SRE blameless é não-negociável uma vez instituída). Para tornar warn-only durante adoption inicial:
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
node ./.claude/framework/bin/tools.cjs config-set workflow.postmortem_required_warn true
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
(Nota: implementação do toggle warn-only é deferida — gate atual lê apenas presença/ausência de pares investigation↔postmortem, não consulta config.)
|
|
1
|
+
---
|
|
2
|
+
id: postmortem-template-required
|
|
3
|
+
stage: pre-conclude
|
|
4
|
+
blocking: true
|
|
5
|
+
description: Bloqueia /concluir-marco se há investigação em .planning/investigations/ sem postmortem correspondente em .planning/postmortems/. "No postmortem left unreviewed" (cap 15).
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Postmortem template required gate
|
|
9
|
+
|
|
10
|
+
**When to run:** pre-conclude (blocking — milestone NÃO arquiva até cada incident ter postmortem blameless).
|
|
11
|
+
|
|
12
|
+
## Check
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
#!/usr/bin/env bash
|
|
16
|
+
# PT-BR: validar que cada investigação em .planning/investigations/ tem postmortem em .planning/postmortems/.
|
|
17
|
+
# Match por basename (sem extensão .md). Investigations com Status: INCONCLUSIVE são exceção.
|
|
18
|
+
# Bash 3.2-portable (macOS default).
|
|
19
|
+
set -e
|
|
20
|
+
|
|
21
|
+
INV_DIR=".planning/investigations"
|
|
22
|
+
PM_DIR=".planning/postmortems"
|
|
23
|
+
|
|
24
|
+
# PT-BR: se não há investigations, gate passa com INFO
|
|
25
|
+
if [ ! -d "$INV_DIR" ]; then
|
|
26
|
+
echo "INFO: $INV_DIR não existe — projeto sem incidents registrados. Gate skipped."
|
|
27
|
+
exit 0
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
# PT-BR: listar investigations (single-file *.md OR subdir com STATE.md)
|
|
31
|
+
INVESTIGATIONS=""
|
|
32
|
+
|
|
33
|
+
# PT-BR: pattern A — .planning/investigations/<id>.md (single file)
|
|
34
|
+
SINGLE_FILES=$(find "$INV_DIR" -maxdepth 1 -type f -name "*.md" 2>/dev/null || true)
|
|
35
|
+
if [ -n "$SINGLE_FILES" ]; then
|
|
36
|
+
INVESTIGATIONS="$INVESTIGATIONS
|
|
37
|
+
$SINGLE_FILES"
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
# PT-BR: pattern B — .planning/investigations/<id>/STATE.md (subdir state)
|
|
41
|
+
SUBDIR_STATES=$(find "$INV_DIR" -mindepth 2 -maxdepth 2 -type f -name "STATE.md" 2>/dev/null || true)
|
|
42
|
+
if [ -n "$SUBDIR_STATES" ]; then
|
|
43
|
+
INVESTIGATIONS="$INVESTIGATIONS
|
|
44
|
+
$SUBDIR_STATES"
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
# PT-BR: filtrar linhas vazias
|
|
48
|
+
INVESTIGATIONS=$(echo "$INVESTIGATIONS" | grep -v "^$" || true)
|
|
49
|
+
|
|
50
|
+
if [ -z "$INVESTIGATIONS" ]; then
|
|
51
|
+
echo "INFO: $INV_DIR vazio — sem incidents registrados. Gate skipped."
|
|
52
|
+
exit 0
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
# PT-BR: para cada investigation, extrair <id> e checar postmortem correspondente
|
|
56
|
+
MISSING=0
|
|
57
|
+
MISSING_LIST=""
|
|
58
|
+
OLDIFS="$IFS"
|
|
59
|
+
IFS='
|
|
60
|
+
'
|
|
61
|
+
for inv_path in $INVESTIGATIONS; do
|
|
62
|
+
[ -z "$inv_path" ] && continue
|
|
63
|
+
[ ! -f "$inv_path" ] && continue
|
|
64
|
+
|
|
65
|
+
# PT-BR: extrair <id> — basename sem .md OU dirname se for STATE.md em subdir
|
|
66
|
+
base=$(basename "$inv_path")
|
|
67
|
+
if [ "$base" = "STATE.md" ]; then
|
|
68
|
+
# pattern B — id é o nome do subdir parent
|
|
69
|
+
id=$(basename "$(dirname "$inv_path")")
|
|
70
|
+
else
|
|
71
|
+
# pattern A — id é basename sem .md
|
|
72
|
+
id="${base%.md}"
|
|
73
|
+
fi
|
|
74
|
+
|
|
75
|
+
# PT-BR: se investigation tem Status: INCONCLUSIVE (sem root cause), pular
|
|
76
|
+
if grep -qiE "^Status:.*INCONCLUSIVE|^.*Status.*INCONCLUSIVE" "$inv_path" 2>/dev/null; then
|
|
77
|
+
echo "INFO: investigation '$id' marcada INCONCLUSIVE — sem root cause, postmortem não exigido."
|
|
78
|
+
continue
|
|
79
|
+
fi
|
|
80
|
+
|
|
81
|
+
# PT-BR: postmortem esperado em .planning/postmortems/<id>.md
|
|
82
|
+
pm_path="$PM_DIR/$id.md"
|
|
83
|
+
if [ ! -f "$pm_path" ]; then
|
|
84
|
+
MISSING=$((MISSING + 1))
|
|
85
|
+
MISSING_LIST="$MISSING_LIST $id"
|
|
86
|
+
fi
|
|
87
|
+
done
|
|
88
|
+
IFS="$OLDIFS"
|
|
89
|
+
|
|
90
|
+
if [ "$MISSING" -eq 0 ]; then
|
|
91
|
+
echo "PASS: todas as investigações têm postmortem correspondente em $PM_DIR/"
|
|
92
|
+
exit 0
|
|
93
|
+
else
|
|
94
|
+
echo "FAIL: $MISSING investigação(ões) sem postmortem em $PM_DIR/:$MISSING_LIST"
|
|
95
|
+
echo "Sugestão: rodar /postmortem --from-investigation <id> para cada item ausente."
|
|
96
|
+
echo "Cross-ref: kit/skills/blameless-postmortems/SKILL.md + kit/agents/postmortem-writer.md"
|
|
97
|
+
echo "Princípio canônico: 'No postmortem left unreviewed' (cap 15 livro Google SRE)."
|
|
98
|
+
exit 1
|
|
99
|
+
fi
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Verdict
|
|
103
|
+
|
|
104
|
+
- **passed** — todas investigations têm postmortem correspondente OR investigations marcadas INCONCLUSIVE OR diretório `.planning/investigations/` ausente
|
|
105
|
+
- **block** — pelo menos 1 investigation sem postmortem em `.planning/postmortems/`
|
|
106
|
+
|
|
107
|
+
## Why
|
|
108
|
+
|
|
109
|
+
O livro Google SRE (cap 15 — *Postmortem Culture: Learning from Failure*) define como princípio canônico **"no postmortem left unreviewed"**: cada incident significativo (registrado como investigação via `/forense` + `incident-investigator` v1.9) deve gerar postmortem blameless documentando *o que aprendemos* e *o que mudaremos*.
|
|
110
|
+
|
|
111
|
+
Sem este gate, milestones arquivam com investigations órfãs — root cause foi diagnosticado mas aprendizado organizacional perdeu-se (anti-pattern hero culture: "fixei o bug, vamos seguir"). Gate força a chain canônica entre v1.9 (Core Analysis Loop diagnostica) e v1.10 (postmortem documenta).
|
|
112
|
+
|
|
113
|
+
Cross-ref agent canônico: [`postmortem-writer`](../kit/agents/postmortem-writer.md) (Phase 37 / AGCORE-SRE-03). Skill: [`blameless-postmortems`](../kit/skills/blameless-postmortems/SKILL.md) (Phase 36 / SKFD-SRE-04). Comando: `/postmortem --from-investigation <id>` (Phase 38 / CMD-SRE-03). Chain documentado em `kit/commands/forense.md` bloco `<sre_integration>` (Plan 40-01 / INT-FW-V2-01).
|
|
114
|
+
|
|
115
|
+
## REQ
|
|
116
|
+
|
|
117
|
+
QA-SRE-02.
|
|
118
|
+
|
|
119
|
+
## Configuração
|
|
120
|
+
|
|
121
|
+
Gate é **blocking** por default (cultura SRE blameless é não-negociável uma vez instituída). Para tornar warn-only durante adoption inicial:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
node ./.claude/framework/bin/tools.cjs config-set workflow.postmortem_required_warn true
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
(Nota: implementação do toggle warn-only é deferida — gate atual lê apenas presença/ausência de pares investigation↔postmortem, não consulta config.)
|
|
@@ -1,128 +1,128 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: prr-checklist-coverage
|
|
3
|
-
stage: pre-verify
|
|
4
|
-
blocking: true
|
|
5
|
-
description: Valida que cada PRR-REPORT.md em .planning/prr/ cobre os 6 axes canonicos (System Architecture/Instrumentation/Emergency/Capacity/Change/Performance — cap 32 livro Google SRE).
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# PRR checklist coverage gate
|
|
9
|
-
|
|
10
|
-
**When to run:** pre-verify (blocking — PRR sem 6 axes = aprovação inválida).
|
|
11
|
-
|
|
12
|
-
## Check
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
#!/usr/bin/env bash
|
|
16
|
-
# PT-BR: validar que cada PRR-REPORT.md em .planning/prr/**/*.md cobre os 6 axes do PRR.
|
|
17
|
-
# Match por palavra-chave em heading H2 (case-insensitive). Pular um axe = aprovação inválida.
|
|
18
|
-
# Bash 3.2-portable (macOS default).
|
|
19
|
-
set -e
|
|
20
|
-
|
|
21
|
-
PRR_DIR=".planning/prr"
|
|
22
|
-
|
|
23
|
-
# PT-BR: se não há PRR reports, gate passa com INFO
|
|
24
|
-
if [ ! -d "$PRR_DIR" ]; then
|
|
25
|
-
echo "INFO: $PRR_DIR não existe — projeto sem PRR reports. Gate skipped."
|
|
26
|
-
exit 0
|
|
27
|
-
fi
|
|
28
|
-
|
|
29
|
-
# PT-BR: listar todos os *.md em .planning/prr/ recursivamente
|
|
30
|
-
PRR_FILES=$(find "$PRR_DIR" -type f -name "*.md" 2>/dev/null || true)
|
|
31
|
-
PRR_FILES=$(echo "$PRR_FILES" | grep -v "^$" || true)
|
|
32
|
-
|
|
33
|
-
if [ -z "$PRR_FILES" ]; then
|
|
34
|
-
echo "INFO: $PRR_DIR vazio — sem PRR reports. Gate skipped."
|
|
35
|
-
exit 0
|
|
36
|
-
fi
|
|
37
|
-
|
|
38
|
-
# PT-BR: para cada PRR report, validar que cobre os 6 axes
|
|
39
|
-
VIOLATIONS=0
|
|
40
|
-
OLDIFS="$IFS"
|
|
41
|
-
IFS='
|
|
42
|
-
'
|
|
43
|
-
for prr_file in $PRR_FILES; do
|
|
44
|
-
[ -z "$prr_file" ] && continue
|
|
45
|
-
[ ! -f "$prr_file" ] && continue
|
|
46
|
-
|
|
47
|
-
# PT-BR: extrair headings H2 (case-insensitive)
|
|
48
|
-
H2=$(grep -E "^## " "$prr_file" 2>/dev/null || true)
|
|
49
|
-
|
|
50
|
-
# PT-BR: 6 axes — match em palavras-chave (qualquer variante aceitável)
|
|
51
|
-
AXE_MISSING=""
|
|
52
|
-
|
|
53
|
-
# Axe 1: System Architecture
|
|
54
|
-
if ! echo "$H2" | grep -qiE "system.*architecture|architecture"; then
|
|
55
|
-
AXE_MISSING="$AXE_MISSING Axe1(SystemArchitecture)"
|
|
56
|
-
fi
|
|
57
|
-
|
|
58
|
-
# Axe 2: Instrumentation / Metrics / Monitoring
|
|
59
|
-
if ! echo "$H2" | grep -qiE "instrumentation|metrics|monitoring"; then
|
|
60
|
-
AXE_MISSING="$AXE_MISSING Axe2(Instrumentation)"
|
|
61
|
-
fi
|
|
62
|
-
|
|
63
|
-
# Axe 3: Emergency Response
|
|
64
|
-
if ! echo "$H2" | grep -qiE "emergency.*response|emergency"; then
|
|
65
|
-
AXE_MISSING="$AXE_MISSING Axe3(EmergencyResponse)"
|
|
66
|
-
fi
|
|
67
|
-
|
|
68
|
-
# Axe 4: Capacity Planning
|
|
69
|
-
if ! echo "$H2" | grep -qiE "capacity.*planning|capacity"; then
|
|
70
|
-
AXE_MISSING="$AXE_MISSING Axe4(CapacityPlanning)"
|
|
71
|
-
fi
|
|
72
|
-
|
|
73
|
-
# Axe 5: Change Management
|
|
74
|
-
if ! echo "$H2" | grep -qiE "change.*management|change"; then
|
|
75
|
-
AXE_MISSING="$AXE_MISSING Axe5(ChangeManagement)"
|
|
76
|
-
fi
|
|
77
|
-
|
|
78
|
-
# Axe 6: Performance
|
|
79
|
-
if ! echo "$H2" | grep -qiE "performance"; then
|
|
80
|
-
AXE_MISSING="$AXE_MISSING Axe6(Performance)"
|
|
81
|
-
fi
|
|
82
|
-
|
|
83
|
-
if [ -n "$AXE_MISSING" ]; then
|
|
84
|
-
echo "FAIL: $prr_file — axes ausentes:$AXE_MISSING"
|
|
85
|
-
VIOLATIONS=$((VIOLATIONS + 1))
|
|
86
|
-
fi
|
|
87
|
-
done
|
|
88
|
-
IFS="$OLDIFS"
|
|
89
|
-
|
|
90
|
-
if [ "$VIOLATIONS" -eq 0 ]; then
|
|
91
|
-
total=$(echo "$PRR_FILES" | wc -l | tr -d ' ')
|
|
92
|
-
echo "PASS: $total PRR-REPORT(s) cobrem os 6 axes canônicos"
|
|
93
|
-
exit 0
|
|
94
|
-
else
|
|
95
|
-
echo "FAIL: $VIOLATIONS PRR-REPORT(s) com axes ausentes"
|
|
96
|
-
echo "Sugestão: rodar /sre prr <service> ou /prr para regenerar com template canônico (6 axes obrigatórios)."
|
|
97
|
-
echo "Cross-ref: kit/skills/production-readiness-review/SKILL.md + kit/agents/prr-conductor.md"
|
|
98
|
-
echo "Princípio canônico: 'Pular um axe = aprovação inválida' (cap 32 livro Google SRE)."
|
|
99
|
-
exit 1
|
|
100
|
-
fi
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## Verdict
|
|
104
|
-
|
|
105
|
-
- **passed** — cada PRR-REPORT.md em `.planning/prr/**/*.md` tem H2 cobrindo os 6 axes (System Architecture / Instrumentation / Emergency Response / Capacity Planning / Change Management / Performance) OR diretório `.planning/prr/` ausente
|
|
106
|
-
- **block** — pelo menos 1 PRR-REPORT.md com axe(s) ausente(s)
|
|
107
|
-
|
|
108
|
-
## Why
|
|
109
|
-
|
|
110
|
-
O livro Google SRE (cap 32 — *Evolving SRE Engagement Model*) define **6 axes canônicos** do Production Readiness Review. A skill `production-readiness-review` (Phase 36 / SKFD-SRE-05) declara como regra absoluta: *"Pular um axe = aprovação inválida (lacuna oculta vira incident em 6 meses)"*.
|
|
111
|
-
|
|
112
|
-
Sem este gate, PRRs apressados podem omitir axes "menos relevantes" (anti-pattern documentado na skill); gaps em Change Management ou Capacity Planning não detectados em PRR viram incidents em produção meses depois. Gate força padrão canônico — cada `PRR-REPORT.md` cobrindo os 6 axes integralmente, mesmo que items dentro de um axe sejam N/A para o serviço (justificativa explícita no item, não no axe).
|
|
113
|
-
|
|
114
|
-
Cross-ref agent canônico: [`prr-conductor`](../kit/agents/prr-conductor.md) (Phase 37 / AGCORE-SRE-04). Skill: [`production-readiness-review`](../kit/skills/production-readiness-review/SKILL.md) (Phase 36 / SKFD-SRE-05). Comando: `/prr --service <name>` ou `/prr --feature <description>` (Phase 38 / CMD-SRE-04).
|
|
115
|
-
|
|
116
|
-
## REQ
|
|
117
|
-
|
|
118
|
-
QA-SRE-03.
|
|
119
|
-
|
|
120
|
-
## Configuração
|
|
121
|
-
|
|
122
|
-
Gate é **blocking** por default. Para tornar warn-only durante adoption inicial:
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
node ./.claude/framework/bin/tools.cjs config-set workflow.prr_checklist_coverage_warn true
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
(Nota: implementação do toggle warn-only é deferida — gate atual não consulta config.)
|
|
1
|
+
---
|
|
2
|
+
id: prr-checklist-coverage
|
|
3
|
+
stage: pre-verify
|
|
4
|
+
blocking: true
|
|
5
|
+
description: Valida que cada PRR-REPORT.md em .planning/prr/ cobre os 6 axes canonicos (System Architecture/Instrumentation/Emergency/Capacity/Change/Performance — cap 32 livro Google SRE).
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# PRR checklist coverage gate
|
|
9
|
+
|
|
10
|
+
**When to run:** pre-verify (blocking — PRR sem 6 axes = aprovação inválida).
|
|
11
|
+
|
|
12
|
+
## Check
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
#!/usr/bin/env bash
|
|
16
|
+
# PT-BR: validar que cada PRR-REPORT.md em .planning/prr/**/*.md cobre os 6 axes do PRR.
|
|
17
|
+
# Match por palavra-chave em heading H2 (case-insensitive). Pular um axe = aprovação inválida.
|
|
18
|
+
# Bash 3.2-portable (macOS default).
|
|
19
|
+
set -e
|
|
20
|
+
|
|
21
|
+
PRR_DIR=".planning/prr"
|
|
22
|
+
|
|
23
|
+
# PT-BR: se não há PRR reports, gate passa com INFO
|
|
24
|
+
if [ ! -d "$PRR_DIR" ]; then
|
|
25
|
+
echo "INFO: $PRR_DIR não existe — projeto sem PRR reports. Gate skipped."
|
|
26
|
+
exit 0
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
# PT-BR: listar todos os *.md em .planning/prr/ recursivamente
|
|
30
|
+
PRR_FILES=$(find "$PRR_DIR" -type f -name "*.md" 2>/dev/null || true)
|
|
31
|
+
PRR_FILES=$(echo "$PRR_FILES" | grep -v "^$" || true)
|
|
32
|
+
|
|
33
|
+
if [ -z "$PRR_FILES" ]; then
|
|
34
|
+
echo "INFO: $PRR_DIR vazio — sem PRR reports. Gate skipped."
|
|
35
|
+
exit 0
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
# PT-BR: para cada PRR report, validar que cobre os 6 axes
|
|
39
|
+
VIOLATIONS=0
|
|
40
|
+
OLDIFS="$IFS"
|
|
41
|
+
IFS='
|
|
42
|
+
'
|
|
43
|
+
for prr_file in $PRR_FILES; do
|
|
44
|
+
[ -z "$prr_file" ] && continue
|
|
45
|
+
[ ! -f "$prr_file" ] && continue
|
|
46
|
+
|
|
47
|
+
# PT-BR: extrair headings H2 (case-insensitive)
|
|
48
|
+
H2=$(grep -E "^## " "$prr_file" 2>/dev/null || true)
|
|
49
|
+
|
|
50
|
+
# PT-BR: 6 axes — match em palavras-chave (qualquer variante aceitável)
|
|
51
|
+
AXE_MISSING=""
|
|
52
|
+
|
|
53
|
+
# Axe 1: System Architecture
|
|
54
|
+
if ! echo "$H2" | grep -qiE "system.*architecture|architecture"; then
|
|
55
|
+
AXE_MISSING="$AXE_MISSING Axe1(SystemArchitecture)"
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
# Axe 2: Instrumentation / Metrics / Monitoring
|
|
59
|
+
if ! echo "$H2" | grep -qiE "instrumentation|metrics|monitoring"; then
|
|
60
|
+
AXE_MISSING="$AXE_MISSING Axe2(Instrumentation)"
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
# Axe 3: Emergency Response
|
|
64
|
+
if ! echo "$H2" | grep -qiE "emergency.*response|emergency"; then
|
|
65
|
+
AXE_MISSING="$AXE_MISSING Axe3(EmergencyResponse)"
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
# Axe 4: Capacity Planning
|
|
69
|
+
if ! echo "$H2" | grep -qiE "capacity.*planning|capacity"; then
|
|
70
|
+
AXE_MISSING="$AXE_MISSING Axe4(CapacityPlanning)"
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
# Axe 5: Change Management
|
|
74
|
+
if ! echo "$H2" | grep -qiE "change.*management|change"; then
|
|
75
|
+
AXE_MISSING="$AXE_MISSING Axe5(ChangeManagement)"
|
|
76
|
+
fi
|
|
77
|
+
|
|
78
|
+
# Axe 6: Performance
|
|
79
|
+
if ! echo "$H2" | grep -qiE "performance"; then
|
|
80
|
+
AXE_MISSING="$AXE_MISSING Axe6(Performance)"
|
|
81
|
+
fi
|
|
82
|
+
|
|
83
|
+
if [ -n "$AXE_MISSING" ]; then
|
|
84
|
+
echo "FAIL: $prr_file — axes ausentes:$AXE_MISSING"
|
|
85
|
+
VIOLATIONS=$((VIOLATIONS + 1))
|
|
86
|
+
fi
|
|
87
|
+
done
|
|
88
|
+
IFS="$OLDIFS"
|
|
89
|
+
|
|
90
|
+
if [ "$VIOLATIONS" -eq 0 ]; then
|
|
91
|
+
total=$(echo "$PRR_FILES" | wc -l | tr -d ' ')
|
|
92
|
+
echo "PASS: $total PRR-REPORT(s) cobrem os 6 axes canônicos"
|
|
93
|
+
exit 0
|
|
94
|
+
else
|
|
95
|
+
echo "FAIL: $VIOLATIONS PRR-REPORT(s) com axes ausentes"
|
|
96
|
+
echo "Sugestão: rodar /sre prr <service> ou /prr para regenerar com template canônico (6 axes obrigatórios)."
|
|
97
|
+
echo "Cross-ref: kit/skills/production-readiness-review/SKILL.md + kit/agents/prr-conductor.md"
|
|
98
|
+
echo "Princípio canônico: 'Pular um axe = aprovação inválida' (cap 32 livro Google SRE)."
|
|
99
|
+
exit 1
|
|
100
|
+
fi
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Verdict
|
|
104
|
+
|
|
105
|
+
- **passed** — cada PRR-REPORT.md em `.planning/prr/**/*.md` tem H2 cobrindo os 6 axes (System Architecture / Instrumentation / Emergency Response / Capacity Planning / Change Management / Performance) OR diretório `.planning/prr/` ausente
|
|
106
|
+
- **block** — pelo menos 1 PRR-REPORT.md com axe(s) ausente(s)
|
|
107
|
+
|
|
108
|
+
## Why
|
|
109
|
+
|
|
110
|
+
O livro Google SRE (cap 32 — *Evolving SRE Engagement Model*) define **6 axes canônicos** do Production Readiness Review. A skill `production-readiness-review` (Phase 36 / SKFD-SRE-05) declara como regra absoluta: *"Pular um axe = aprovação inválida (lacuna oculta vira incident em 6 meses)"*.
|
|
111
|
+
|
|
112
|
+
Sem este gate, PRRs apressados podem omitir axes "menos relevantes" (anti-pattern documentado na skill); gaps em Change Management ou Capacity Planning não detectados em PRR viram incidents em produção meses depois. Gate força padrão canônico — cada `PRR-REPORT.md` cobrindo os 6 axes integralmente, mesmo que items dentro de um axe sejam N/A para o serviço (justificativa explícita no item, não no axe).
|
|
113
|
+
|
|
114
|
+
Cross-ref agent canônico: [`prr-conductor`](../kit/agents/prr-conductor.md) (Phase 37 / AGCORE-SRE-04). Skill: [`production-readiness-review`](../kit/skills/production-readiness-review/SKILL.md) (Phase 36 / SKFD-SRE-05). Comando: `/prr --service <name>` ou `/prr --feature <description>` (Phase 38 / CMD-SRE-04).
|
|
115
|
+
|
|
116
|
+
## REQ
|
|
117
|
+
|
|
118
|
+
QA-SRE-03.
|
|
119
|
+
|
|
120
|
+
## Configuração
|
|
121
|
+
|
|
122
|
+
Gate é **blocking** por default. Para tornar warn-only durante adoption inicial:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
node ./.claude/framework/bin/tools.cjs config-set workflow.prr_checklist_coverage_warn true
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
(Nota: implementação do toggle warn-only é deferida — gate atual não consulta config.)
|
package/gates/regression.md
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: regression
|
|
3
|
-
stage: pre-verify
|
|
4
|
-
blocking: true
|
|
5
|
-
description: Run prior-phase test suites to detect cross-phase regressions before verifying the current phase.
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Regression gate
|
|
9
|
-
|
|
10
|
-
**When to run:** before `verify_phase_goal` of any phase that is not the first.
|
|
11
|
-
|
|
12
|
-
## Inputs
|
|
13
|
-
|
|
14
|
-
- `PHASE_NUMBER` — current phase
|
|
15
|
-
- All `*-VERIFICATION.md` files of prior phases in the current milestone
|
|
16
|
-
|
|
17
|
-
## Check
|
|
18
|
-
|
|
19
|
-
1. Discover prior verification files: `find .planning/phases/ -name "*-VERIFICATION.md" ! -path "*${PHASE_NUMBER}*"`
|
|
20
|
-
2. Extract test file paths from each (paths under `test/`, `spec/`, `__tests__/`, or files matching `*.test.*` / `*.spec.*` referenced in `key-files.created`)
|
|
21
|
-
3. Detect runner from project root (`package.json` → jest/vitest, `Cargo.toml` → cargo, `pyproject.toml` → pytest)
|
|
22
|
-
4. Run only the prior-phase test files
|
|
23
|
-
|
|
24
|
-
## Verdict
|
|
25
|
-
|
|
26
|
-
- **passed** — every test green → proceed to verify
|
|
27
|
-
- **block** — any failure → present diff and ask `fix | continue | abort`
|
|
28
|
-
|
|
29
|
-
## Notes
|
|
30
|
-
|
|
31
|
-
This is a **cross-phase** regression check. It is intentionally narrower than a full
|
|
32
|
-
test run — it answers "did this phase break what previous phases shipped?".
|
|
1
|
+
---
|
|
2
|
+
id: regression
|
|
3
|
+
stage: pre-verify
|
|
4
|
+
blocking: true
|
|
5
|
+
description: Run prior-phase test suites to detect cross-phase regressions before verifying the current phase.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Regression gate
|
|
9
|
+
|
|
10
|
+
**When to run:** before `verify_phase_goal` of any phase that is not the first.
|
|
11
|
+
|
|
12
|
+
## Inputs
|
|
13
|
+
|
|
14
|
+
- `PHASE_NUMBER` — current phase
|
|
15
|
+
- All `*-VERIFICATION.md` files of prior phases in the current milestone
|
|
16
|
+
|
|
17
|
+
## Check
|
|
18
|
+
|
|
19
|
+
1. Discover prior verification files: `find .planning/phases/ -name "*-VERIFICATION.md" ! -path "*${PHASE_NUMBER}*"`
|
|
20
|
+
2. Extract test file paths from each (paths under `test/`, `spec/`, `__tests__/`, or files matching `*.test.*` / `*.spec.*` referenced in `key-files.created`)
|
|
21
|
+
3. Detect runner from project root (`package.json` → jest/vitest, `Cargo.toml` → cargo, `pyproject.toml` → pytest)
|
|
22
|
+
4. Run only the prior-phase test files
|
|
23
|
+
|
|
24
|
+
## Verdict
|
|
25
|
+
|
|
26
|
+
- **passed** — every test green → proceed to verify
|
|
27
|
+
- **block** — any failure → present diff and ask `fix | continue | abort`
|
|
28
|
+
|
|
29
|
+
## Notes
|
|
30
|
+
|
|
31
|
+
This is a **cross-phase** regression check. It is intentionally narrower than a full
|
|
32
|
+
test run — it answers "did this phase break what previous phases shipped?".
|