@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,207 +1,207 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: publicar-rapido
|
|
3
|
-
description: Variante leve de /publicar para hotfix/quick-task — sem dependência de ROADMAP/MILESTONE-AUDIT. Infere tipo do commit, gera Notion + cofre + PR cross-linkados.
|
|
4
|
-
argument-hint: "[branch destino opcional, padrão: detectado/sugerido]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Bash
|
|
8
|
-
- Grep
|
|
9
|
-
- Glob
|
|
10
|
-
- Write
|
|
11
|
-
- AskUserQuestion
|
|
12
|
-
- mcp__claude_ai_Notion__notion-create-pages
|
|
13
|
-
- mcp__claude_ai_Notion__notion-search
|
|
14
|
-
- mcp__claude_ai_Notion__notion-fetch
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
# /publicar-rapido — Pipeline Notion + PR + Cofre, sem cerimônia de milestone
|
|
18
|
-
|
|
19
|
-
Variante de `/publicar` para mudanças que **não passaram pelo fluxo completo de milestone**: hotfix em produção, fix expresso (1 migration / 1 PR), refatoração curta, mudança trivial que precisa cross-link Notion + Obsidian + PR mesmo sem ROADMAP arquivado.
|
|
20
|
-
|
|
21
|
-
## Quando usar
|
|
22
|
-
|
|
23
|
-
- Hotfix em produção: 1-3 commits, branch curta, sem milestone aberto.
|
|
24
|
-
- Pequena feature isolada que não justificou abrir milestone.
|
|
25
|
-
- Correção de bug urgente que precisa ir documentada mas o overhead do `/publicar` não compensa.
|
|
26
|
-
|
|
27
|
-
**Não use** quando o trabalho foi um milestone de várias fases — use `/publicar` (que valida MILESTONE-AUDIT.md, ROADMAP arquivado, etc).
|
|
28
|
-
|
|
29
|
-
## Diferenças vs /publicar
|
|
30
|
-
|
|
31
|
-
| Aspecto | `/publicar` | `/publicar-rapido` |
|
|
32
|
-
|---|---|---|
|
|
33
|
-
| Pré-requisitos de planejamento | ROADMAP + MILESTONE-AUDIT obrigatórios | Apenas commit(s) na branch |
|
|
34
|
-
| Detecção de versão | De `STATE.md` | De `package.json` ou git tag mais recente |
|
|
35
|
-
| Detecção de tipo | Inferido do milestone | **Inferido do commit message** (`fix:`/`feat:`/`refactor:`/`chore:` prefix) |
|
|
36
|
-
| Notion | Página de changelog do milestone | Entrada curta na página de **changelog** com 1 parágrafo |
|
|
37
|
-
| Cofre Obsidian | Nota de PR + Changelog completo + componentes afetados | Apenas nota de PR + entrada no Changelog |
|
|
38
|
-
| Pre-flight sync com `main` | Sim (Passo 0) | **Sim — herdado** |
|
|
39
|
-
| Tempo médio | 60-90s | **~30s** |
|
|
40
|
-
|
|
41
|
-
## Processo
|
|
42
|
-
|
|
43
|
-
### Passo 0 — Pre-flight: sincronizar com main (obrigatório, herdado de /publicar)
|
|
44
|
-
|
|
45
|
-
Igual ao Passo 0 do `/publicar`: `git fetch origin main`, lista commits novos, oferece rebase/merge/ignorar/cancelar via `AskUserQuestion`. **Não pule** — esse é exatamente o cenário onde dev paralelo causa conflito tardio em hotfix.
|
|
46
|
-
|
|
47
|
-
### Passo 1 — Detectar contexto
|
|
48
|
-
|
|
49
|
-
#### 1.1 — Tipo do commit
|
|
50
|
-
|
|
51
|
-
Leia o commit mais recente (`git log -1 --format=%B`). Se houver múltiplos commits desde `origin/main`, leia todos (`git log origin/main..HEAD --format=%B`).
|
|
52
|
-
|
|
53
|
-
Inferir `TIPO_MUDANCA` por prefix do **primeiro commit** ou pelo padrão majoritário se múltiplos:
|
|
54
|
-
|
|
55
|
-
| Prefix | TIPO_MUDANCA | Notion section |
|
|
56
|
-
|---|---|---|
|
|
57
|
-
| `fix:` / `bugfix:` | `Corrigido` | Bug fix |
|
|
58
|
-
| `feat:` / `feature:` | `Adicionado` | Feature |
|
|
59
|
-
| `perf:` | `Melhorado` | Performance |
|
|
60
|
-
| `refactor:` | `Alterado` | Refactor |
|
|
61
|
-
| `chore:` / `docs:` / `style:` | `Alterado` | Manutenção |
|
|
62
|
-
| `revert:` | `Removido` | Revert |
|
|
63
|
-
| Sem prefix | `Alterado` | (perguntar via AskUserQuestion) |
|
|
64
|
-
|
|
65
|
-
Se não conseguir inferir (nenhum prefix), use `AskUserQuestion`:
|
|
66
|
-
- **header:** "Tipo"
|
|
67
|
-
- **question:** "Tipo da mudança?"
|
|
68
|
-
- **options:** "Correção (fix)", "Feature (feat)", "Refator (refactor)", "Outro"
|
|
69
|
-
|
|
70
|
-
#### 1.2 — Título resumido
|
|
71
|
-
|
|
72
|
-
Extraia o **primeiro commit message** sem o prefix. Se múltiplos commits, use o **mais descritivo** (mais longo). Limite a 60 chars.
|
|
73
|
-
|
|
74
|
-
Exemplos:
|
|
75
|
-
- `fix: corrige FK em contact_prefs migration` → `Corrige FK em contact_prefs migration`
|
|
76
|
-
- `feat: adiciona índice em contacts.phone` → `Adiciona índice em contacts.phone`
|
|
77
|
-
|
|
78
|
-
Apresente ao user via `AskUserQuestion`:
|
|
79
|
-
- **question:** "Título sugerido: \"{TITULO}\". Confirma?"
|
|
80
|
-
- **options:** Confirmar, Editar (text input)
|
|
81
|
-
|
|
82
|
-
#### 1.3 — Versão
|
|
83
|
-
|
|
84
|
-
Detecte `VERSION` (ordem de prioridade):
|
|
85
|
-
1. `package.json` campo `version` (incremente o patch — ex: `1.2.3` → `1.2.4`)
|
|
86
|
-
2. Tag git mais recente: `git describe --tags --abbrev=0` (incremente patch)
|
|
87
|
-
3. Sem fonte: use timestamp `YYYY-MM-DD-HHMMSS`
|
|
88
|
-
|
|
89
|
-
Apresente via `AskUserQuestion`:
|
|
90
|
-
- **question:** "Próxima versão: {VERSION}. Confirma ou pula bump de package.json?"
|
|
91
|
-
- **options:** Bump+commit, Sem bump (só Notion+PR)
|
|
92
|
-
|
|
93
|
-
Se "Bump+commit", execute:
|
|
94
|
-
```bash
|
|
95
|
-
npm version patch --no-git-tag-version
|
|
96
|
-
git add package.json package-lock.json
|
|
97
|
-
git commit -m "chore: bump {VERSION}"
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### Passo 2 — Decidir branch
|
|
101
|
-
|
|
102
|
-
Igual ao `/publicar` Passo 2 — usar branch atual ou criar nova baseada no `TIPO_MUDANCA`. Sugestão de nome:
|
|
103
|
-
|
|
104
|
-
- `fix:` → `fix-{slug-do-titulo}`
|
|
105
|
-
- `feat:` → `feat-{slug-do-titulo}`
|
|
106
|
-
- `refactor:` → `refactor-{slug-do-titulo}`
|
|
107
|
-
|
|
108
|
-
### Passo 3 — Criar página Notion (curta)
|
|
109
|
-
|
|
110
|
-
Carregue `.claude/notion-config.json` (com fallback do auto-detect — Passo 0.5 do `/publicar`).
|
|
111
|
-
|
|
112
|
-
Use `notion-create-pages` com `parent.page_id = NOTION_CHANGELOG_PAGE_ID`.
|
|
113
|
-
|
|
114
|
-
**Template enxuto (não confundir com o template completo do /publicar):**
|
|
115
|
-
|
|
116
|
-
```
|
|
117
|
-
Título: {VERSION} — {TITULO}
|
|
118
|
-
Ícone: 🩹 (fix) | ✨ (feat) | 🔧 (refactor) | 🧹 (chore)
|
|
119
|
-
|
|
120
|
-
[Callout cinza] Quick fix · {DATA} · Branch: `{BRANCH}` · Tipo: {TIPO_MUDANCA}
|
|
121
|
-
|
|
122
|
-
## O que mudou
|
|
123
|
-
|
|
124
|
-
{1 parágrafo descrevendo a mudança em linguagem direta — extraia do commit body se houver, senão use o título expandido.}
|
|
125
|
-
|
|
126
|
-
## Arquivos tocados
|
|
127
|
-
|
|
128
|
-
[Tabela: Arquivo | O que mudou]
|
|
129
|
-
{lista de `git diff origin/main..HEAD --stat` resumida — primeiros 10 arquivos}
|
|
130
|
-
|
|
131
|
-
## Como verificar
|
|
132
|
-
|
|
133
|
-
{Se TIPO_MUDANCA = fix: instrução curta de smoke test do bug. Se feat: passo a passo de uso. Se refactor: nota dizendo "sem mudança de comportamento esperada".}
|
|
134
|
-
|
|
135
|
-
## Referências
|
|
136
|
-
|
|
137
|
-
- Commit(s): `{lista de hashes curtos}`
|
|
138
|
-
- Branch: `{BRANCH}`
|
|
139
|
-
- PR: (será preenchido pelo dev após o passo 4)
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
Armazene `NOTION_URL`.
|
|
143
|
-
|
|
144
|
-
Se houver `PENDENTE_COMMIT = true` (Passo 2), execute o commit agora com o link incluído:
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
git commit -m "{TIPO_MUDANCA_PREFIX}: {TITULO}
|
|
148
|
-
|
|
149
|
-
Notion: {NOTION_URL}"
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
### Passo 4 — Push + PR
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
git push origin {BRANCH}
|
|
156
|
-
|
|
157
|
-
gh pr create \
|
|
158
|
-
--title "{TIPO_MUDANCA_PREFIX}: {TITULO}" \
|
|
159
|
-
--body "..."
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
**Body do PR (template enxuto):**
|
|
163
|
-
|
|
164
|
-
```markdown
|
|
165
|
-
## {TITULO}
|
|
166
|
-
|
|
167
|
-
{1 parágrafo do que mudou}
|
|
168
|
-
|
|
169
|
-
### Arquivos
|
|
170
|
-
{lista de até 5 paths}
|
|
171
|
-
|
|
172
|
-
### Documentação
|
|
173
|
-
📄 Notion: {NOTION_URL}
|
|
174
|
-
{Se OBSIDIAN_URL definido: 📚 Cofre: {OBSIDIAN_URL}}
|
|
175
|
-
|
|
176
|
-
### Sync com main
|
|
177
|
-
{Se SYNC_SKIPPED = true: ⚠️ PR aberto sem rebase com origin/main — possível conflito ao revisar.}
|
|
178
|
-
{Senão: ✓ Sincronizado com main em {timestamp}.}
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
Sem rodapé de IA. Sem assinatura de tooling.
|
|
182
|
-
|
|
183
|
-
### Passo 5 — Cofre Obsidian (curto)
|
|
184
|
-
|
|
185
|
-
Igual ao Passo 0.7 + 5 do `/publicar`, mas com escrita reduzida:
|
|
186
|
-
|
|
187
|
-
- **Nota de PR** (obrigatória): `01 - PRs/YYYY/YYYY-MM-DD-pr-{PR_NUMBER}-{slug}.md` com frontmatter `notion: {NOTION_URL}`.
|
|
188
|
-
- **Changelog**: adicionar 1 linha em `03 - Changelog/YYYY.md` na seção apropriada (`### Corrigido` / `### Adicionado` / etc baseado em `TIPO_MUDANCA`), referenciando PR.
|
|
189
|
-
- **Componentes afetados**: PULAR. /publicar-rapido não atualiza notas de componente — usar `/publicar` quando o escopo justificar.
|
|
190
|
-
|
|
191
|
-
Mesma cerimônia de commit + push do cofre.
|
|
192
|
-
|
|
193
|
-
### Passo 6 — Reportar
|
|
194
|
-
|
|
195
|
-
```
|
|
196
|
-
🩹 Quick publish concluída em ~{TEMPO_TOTAL}s
|
|
197
|
-
|
|
198
|
-
📄 Notion: {NOTION_URL}
|
|
199
|
-
🔗 PR: {PR_URL}
|
|
200
|
-
📚 Obsidian: {OBSIDIAN_URL} ← ou ⚠️ pulado: {motivo}
|
|
201
|
-
🌿 Branch: {BRANCH}
|
|
202
|
-
🏷 Tipo: {TIPO_MUDANCA}
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
## Para projetos novos
|
|
206
|
-
|
|
207
|
-
Mesmo `notion-config.json` do `/publicar`. Auto-detect (Passo 0.5 herdado) cobre o caso de config ausente — basta a página existir no Notion.
|
|
1
|
+
---
|
|
2
|
+
name: publicar-rapido
|
|
3
|
+
description: Variante leve de /publicar para hotfix/quick-task — sem dependência de ROADMAP/MILESTONE-AUDIT. Infere tipo do commit, gera Notion + cofre + PR cross-linkados.
|
|
4
|
+
argument-hint: "[branch destino opcional, padrão: detectado/sugerido]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Bash
|
|
8
|
+
- Grep
|
|
9
|
+
- Glob
|
|
10
|
+
- Write
|
|
11
|
+
- AskUserQuestion
|
|
12
|
+
- mcp__claude_ai_Notion__notion-create-pages
|
|
13
|
+
- mcp__claude_ai_Notion__notion-search
|
|
14
|
+
- mcp__claude_ai_Notion__notion-fetch
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# /publicar-rapido — Pipeline Notion + PR + Cofre, sem cerimônia de milestone
|
|
18
|
+
|
|
19
|
+
Variante de `/publicar` para mudanças que **não passaram pelo fluxo completo de milestone**: hotfix em produção, fix expresso (1 migration / 1 PR), refatoração curta, mudança trivial que precisa cross-link Notion + Obsidian + PR mesmo sem ROADMAP arquivado.
|
|
20
|
+
|
|
21
|
+
## Quando usar
|
|
22
|
+
|
|
23
|
+
- Hotfix em produção: 1-3 commits, branch curta, sem milestone aberto.
|
|
24
|
+
- Pequena feature isolada que não justificou abrir milestone.
|
|
25
|
+
- Correção de bug urgente que precisa ir documentada mas o overhead do `/publicar` não compensa.
|
|
26
|
+
|
|
27
|
+
**Não use** quando o trabalho foi um milestone de várias fases — use `/publicar` (que valida MILESTONE-AUDIT.md, ROADMAP arquivado, etc).
|
|
28
|
+
|
|
29
|
+
## Diferenças vs /publicar
|
|
30
|
+
|
|
31
|
+
| Aspecto | `/publicar` | `/publicar-rapido` |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| Pré-requisitos de planejamento | ROADMAP + MILESTONE-AUDIT obrigatórios | Apenas commit(s) na branch |
|
|
34
|
+
| Detecção de versão | De `STATE.md` | De `package.json` ou git tag mais recente |
|
|
35
|
+
| Detecção de tipo | Inferido do milestone | **Inferido do commit message** (`fix:`/`feat:`/`refactor:`/`chore:` prefix) |
|
|
36
|
+
| Notion | Página de changelog do milestone | Entrada curta na página de **changelog** com 1 parágrafo |
|
|
37
|
+
| Cofre Obsidian | Nota de PR + Changelog completo + componentes afetados | Apenas nota de PR + entrada no Changelog |
|
|
38
|
+
| Pre-flight sync com `main` | Sim (Passo 0) | **Sim — herdado** |
|
|
39
|
+
| Tempo médio | 60-90s | **~30s** |
|
|
40
|
+
|
|
41
|
+
## Processo
|
|
42
|
+
|
|
43
|
+
### Passo 0 — Pre-flight: sincronizar com main (obrigatório, herdado de /publicar)
|
|
44
|
+
|
|
45
|
+
Igual ao Passo 0 do `/publicar`: `git fetch origin main`, lista commits novos, oferece rebase/merge/ignorar/cancelar via `AskUserQuestion`. **Não pule** — esse é exatamente o cenário onde dev paralelo causa conflito tardio em hotfix.
|
|
46
|
+
|
|
47
|
+
### Passo 1 — Detectar contexto
|
|
48
|
+
|
|
49
|
+
#### 1.1 — Tipo do commit
|
|
50
|
+
|
|
51
|
+
Leia o commit mais recente (`git log -1 --format=%B`). Se houver múltiplos commits desde `origin/main`, leia todos (`git log origin/main..HEAD --format=%B`).
|
|
52
|
+
|
|
53
|
+
Inferir `TIPO_MUDANCA` por prefix do **primeiro commit** ou pelo padrão majoritário se múltiplos:
|
|
54
|
+
|
|
55
|
+
| Prefix | TIPO_MUDANCA | Notion section |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| `fix:` / `bugfix:` | `Corrigido` | Bug fix |
|
|
58
|
+
| `feat:` / `feature:` | `Adicionado` | Feature |
|
|
59
|
+
| `perf:` | `Melhorado` | Performance |
|
|
60
|
+
| `refactor:` | `Alterado` | Refactor |
|
|
61
|
+
| `chore:` / `docs:` / `style:` | `Alterado` | Manutenção |
|
|
62
|
+
| `revert:` | `Removido` | Revert |
|
|
63
|
+
| Sem prefix | `Alterado` | (perguntar via AskUserQuestion) |
|
|
64
|
+
|
|
65
|
+
Se não conseguir inferir (nenhum prefix), use `AskUserQuestion`:
|
|
66
|
+
- **header:** "Tipo"
|
|
67
|
+
- **question:** "Tipo da mudança?"
|
|
68
|
+
- **options:** "Correção (fix)", "Feature (feat)", "Refator (refactor)", "Outro"
|
|
69
|
+
|
|
70
|
+
#### 1.2 — Título resumido
|
|
71
|
+
|
|
72
|
+
Extraia o **primeiro commit message** sem o prefix. Se múltiplos commits, use o **mais descritivo** (mais longo). Limite a 60 chars.
|
|
73
|
+
|
|
74
|
+
Exemplos:
|
|
75
|
+
- `fix: corrige FK em contact_prefs migration` → `Corrige FK em contact_prefs migration`
|
|
76
|
+
- `feat: adiciona índice em contacts.phone` → `Adiciona índice em contacts.phone`
|
|
77
|
+
|
|
78
|
+
Apresente ao user via `AskUserQuestion`:
|
|
79
|
+
- **question:** "Título sugerido: \"{TITULO}\". Confirma?"
|
|
80
|
+
- **options:** Confirmar, Editar (text input)
|
|
81
|
+
|
|
82
|
+
#### 1.3 — Versão
|
|
83
|
+
|
|
84
|
+
Detecte `VERSION` (ordem de prioridade):
|
|
85
|
+
1. `package.json` campo `version` (incremente o patch — ex: `1.2.3` → `1.2.4`)
|
|
86
|
+
2. Tag git mais recente: `git describe --tags --abbrev=0` (incremente patch)
|
|
87
|
+
3. Sem fonte: use timestamp `YYYY-MM-DD-HHMMSS`
|
|
88
|
+
|
|
89
|
+
Apresente via `AskUserQuestion`:
|
|
90
|
+
- **question:** "Próxima versão: {VERSION}. Confirma ou pula bump de package.json?"
|
|
91
|
+
- **options:** Bump+commit, Sem bump (só Notion+PR)
|
|
92
|
+
|
|
93
|
+
Se "Bump+commit", execute:
|
|
94
|
+
```bash
|
|
95
|
+
npm version patch --no-git-tag-version
|
|
96
|
+
git add package.json package-lock.json
|
|
97
|
+
git commit -m "chore: bump {VERSION}"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Passo 2 — Decidir branch
|
|
101
|
+
|
|
102
|
+
Igual ao `/publicar` Passo 2 — usar branch atual ou criar nova baseada no `TIPO_MUDANCA`. Sugestão de nome:
|
|
103
|
+
|
|
104
|
+
- `fix:` → `fix-{slug-do-titulo}`
|
|
105
|
+
- `feat:` → `feat-{slug-do-titulo}`
|
|
106
|
+
- `refactor:` → `refactor-{slug-do-titulo}`
|
|
107
|
+
|
|
108
|
+
### Passo 3 — Criar página Notion (curta)
|
|
109
|
+
|
|
110
|
+
Carregue `.claude/notion-config.json` (com fallback do auto-detect — Passo 0.5 do `/publicar`).
|
|
111
|
+
|
|
112
|
+
Use `notion-create-pages` com `parent.page_id = NOTION_CHANGELOG_PAGE_ID`.
|
|
113
|
+
|
|
114
|
+
**Template enxuto (não confundir com o template completo do /publicar):**
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
Título: {VERSION} — {TITULO}
|
|
118
|
+
Ícone: 🩹 (fix) | ✨ (feat) | 🔧 (refactor) | 🧹 (chore)
|
|
119
|
+
|
|
120
|
+
[Callout cinza] Quick fix · {DATA} · Branch: `{BRANCH}` · Tipo: {TIPO_MUDANCA}
|
|
121
|
+
|
|
122
|
+
## O que mudou
|
|
123
|
+
|
|
124
|
+
{1 parágrafo descrevendo a mudança em linguagem direta — extraia do commit body se houver, senão use o título expandido.}
|
|
125
|
+
|
|
126
|
+
## Arquivos tocados
|
|
127
|
+
|
|
128
|
+
[Tabela: Arquivo | O que mudou]
|
|
129
|
+
{lista de `git diff origin/main..HEAD --stat` resumida — primeiros 10 arquivos}
|
|
130
|
+
|
|
131
|
+
## Como verificar
|
|
132
|
+
|
|
133
|
+
{Se TIPO_MUDANCA = fix: instrução curta de smoke test do bug. Se feat: passo a passo de uso. Se refactor: nota dizendo "sem mudança de comportamento esperada".}
|
|
134
|
+
|
|
135
|
+
## Referências
|
|
136
|
+
|
|
137
|
+
- Commit(s): `{lista de hashes curtos}`
|
|
138
|
+
- Branch: `{BRANCH}`
|
|
139
|
+
- PR: (será preenchido pelo dev após o passo 4)
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Armazene `NOTION_URL`.
|
|
143
|
+
|
|
144
|
+
Se houver `PENDENTE_COMMIT = true` (Passo 2), execute o commit agora com o link incluído:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
git commit -m "{TIPO_MUDANCA_PREFIX}: {TITULO}
|
|
148
|
+
|
|
149
|
+
Notion: {NOTION_URL}"
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Passo 4 — Push + PR
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
git push origin {BRANCH}
|
|
156
|
+
|
|
157
|
+
gh pr create \
|
|
158
|
+
--title "{TIPO_MUDANCA_PREFIX}: {TITULO}" \
|
|
159
|
+
--body "..."
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Body do PR (template enxuto):**
|
|
163
|
+
|
|
164
|
+
```markdown
|
|
165
|
+
## {TITULO}
|
|
166
|
+
|
|
167
|
+
{1 parágrafo do que mudou}
|
|
168
|
+
|
|
169
|
+
### Arquivos
|
|
170
|
+
{lista de até 5 paths}
|
|
171
|
+
|
|
172
|
+
### Documentação
|
|
173
|
+
📄 Notion: {NOTION_URL}
|
|
174
|
+
{Se OBSIDIAN_URL definido: 📚 Cofre: {OBSIDIAN_URL}}
|
|
175
|
+
|
|
176
|
+
### Sync com main
|
|
177
|
+
{Se SYNC_SKIPPED = true: ⚠️ PR aberto sem rebase com origin/main — possível conflito ao revisar.}
|
|
178
|
+
{Senão: ✓ Sincronizado com main em {timestamp}.}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Sem rodapé de IA. Sem assinatura de tooling.
|
|
182
|
+
|
|
183
|
+
### Passo 5 — Cofre Obsidian (curto)
|
|
184
|
+
|
|
185
|
+
Igual ao Passo 0.7 + 5 do `/publicar`, mas com escrita reduzida:
|
|
186
|
+
|
|
187
|
+
- **Nota de PR** (obrigatória): `01 - PRs/YYYY/YYYY-MM-DD-pr-{PR_NUMBER}-{slug}.md` com frontmatter `notion: {NOTION_URL}`.
|
|
188
|
+
- **Changelog**: adicionar 1 linha em `03 - Changelog/YYYY.md` na seção apropriada (`### Corrigido` / `### Adicionado` / etc baseado em `TIPO_MUDANCA`), referenciando PR.
|
|
189
|
+
- **Componentes afetados**: PULAR. /publicar-rapido não atualiza notas de componente — usar `/publicar` quando o escopo justificar.
|
|
190
|
+
|
|
191
|
+
Mesma cerimônia de commit + push do cofre.
|
|
192
|
+
|
|
193
|
+
### Passo 6 — Reportar
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
🩹 Quick publish concluída em ~{TEMPO_TOTAL}s
|
|
197
|
+
|
|
198
|
+
📄 Notion: {NOTION_URL}
|
|
199
|
+
🔗 PR: {PR_URL}
|
|
200
|
+
📚 Obsidian: {OBSIDIAN_URL} ← ou ⚠️ pulado: {motivo}
|
|
201
|
+
🌿 Branch: {BRANCH}
|
|
202
|
+
🏷 Tipo: {TIPO_MUDANCA}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## Para projetos novos
|
|
206
|
+
|
|
207
|
+
Mesmo `notion-config.json` do `/publicar`. Auto-detect (Passo 0.5 herdado) cobre o caso de config ausente — basta a página existir no Notion.
|