@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,138 +1,138 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: supabase-postgres-style
|
|
3
|
-
description: Use ao escrever SQL para Postgres/Supabase — snake_case, lowercase reserved, plurais para tabelas e singular para colunas, ISO 8601, CTEs lineares.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Supabase — Postgres Style Guide
|
|
7
|
-
|
|
8
|
-
## Quando usar
|
|
9
|
-
|
|
10
|
-
LLM carrega esta skill quando trabalhar com SQL em projeto Supabase/Postgres — definir schemas, escrever queries, criar tabelas/colunas, padronizar dates, decidir nomes. Trigger phrases:
|
|
11
|
-
|
|
12
|
-
- "criar tabela em postgres", "create table"
|
|
13
|
-
- "escrever query SQL para Supabase"
|
|
14
|
-
- "estilo de schema", "convenção de nomes em SQL"
|
|
15
|
-
- "estrutura de query complexa" (CTE vs subquery)
|
|
16
|
-
|
|
17
|
-
## Regras absolutas
|
|
18
|
-
|
|
19
|
-
- **Sempre** use **`lowercase reserved`** words: `select`, `from`, `where`, `join`, `with`, `as`. **Nunca** `SELECT`, `FROM`, `WHERE` em maiúscula.
|
|
20
|
-
- **Sempre** use **`snake_case`** para tabelas, colunas, funções, índices. **Nunca** `camelCase` ou `PascalCase`.
|
|
21
|
-
- **Tabelas em plural** (`books`, `authors`, `users`); **colunas em singular** (`title`, `author_id`, `created_at`).
|
|
22
|
-
- **Datas em `ISO 8601`** com timezone: `timestamptz` (não `timestamp` sem tz). String literal: `'2026-05-06T12:00:00Z'`.
|
|
23
|
-
- Aliases descritivos com `as` **explícito**: `select b.title as book_title from books as b`. Nunca alias implícito.
|
|
24
|
-
- Evite `id` ambíguo. Em FKs use `<entity>_id` (`author_id`, `user_id`). Em PKs use `id` apenas se a tabela já é singular contextualmente.
|
|
25
|
-
- Para queries complexas: prefira **múltiplas CTEs lineares** sobre subqueries aninhadas. Cada CTE com 1 propósito + comentário.
|
|
26
|
-
- JOINs sempre com nomes completos da tabela qualificadora: `books.author_id = authors.id` (não aliases curtos como `b.x = a.y` sem `as`).
|
|
27
|
-
|
|
28
|
-
## Patterns canônicos
|
|
29
|
-
|
|
30
|
-
### Tabela típica
|
|
31
|
-
|
|
32
|
-
```sql
|
|
33
|
-
-- estilo: lowercase reserved + snake_case + tabela em plural + colunas em singular
|
|
34
|
-
create table public.books (
|
|
35
|
-
id uuid primary key default gen_random_uuid(),
|
|
36
|
-
title text not null,
|
|
37
|
-
author_id uuid references public.authors (id) on delete cascade,
|
|
38
|
-
published_at timestamptz, -- ISO 8601 com timezone
|
|
39
|
-
created_at timestamptz not null default now(),
|
|
40
|
-
updated_at timestamptz not null default now()
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
-- comentário descritivo na tabela (até 1024 chars)
|
|
44
|
-
comment on table public.books is 'Catálogo de livros disponíveis na biblioteca.';
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Query simples (uma linha por cláusula)
|
|
48
|
-
|
|
49
|
-
```sql
|
|
50
|
-
-- query curta: pode ficar em poucas linhas
|
|
51
|
-
select id, title, author_id
|
|
52
|
-
from public.books
|
|
53
|
-
where published_at is not null
|
|
54
|
-
order by published_at desc
|
|
55
|
-
limit 50;
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### Query complexa com CTEs lineares
|
|
59
|
-
|
|
60
|
-
```sql
|
|
61
|
-
-- preferir CTEs lineares — cada uma com 1 propósito
|
|
62
|
-
with recent_books as (
|
|
63
|
-
-- 1. livros publicados nos últimos 30 dias
|
|
64
|
-
select id, title, author_id, published_at
|
|
65
|
-
from public.books
|
|
66
|
-
where published_at >= now() - interval '30 days'
|
|
67
|
-
),
|
|
68
|
-
author_stats as (
|
|
69
|
-
-- 2. agregação por autor sobre os livros recentes
|
|
70
|
-
select author_id, count(*) as total_recent
|
|
71
|
-
from recent_books
|
|
72
|
-
group by author_id
|
|
73
|
-
)
|
|
74
|
-
select a.name as author_name, s.total_recent
|
|
75
|
-
from author_stats as s
|
|
76
|
-
join public.authors as a on a.id = s.author_id
|
|
77
|
-
order by s.total_recent desc;
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Anti-patterns
|
|
81
|
-
|
|
82
|
-
### Anti-pattern 1: Reserved words em maiúscula + mixed case
|
|
83
|
-
|
|
84
|
-
**Errado:**
|
|
85
|
-
```sql
|
|
86
|
-
SELECT * FROM Books WHERE Title='X'
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
**Por quê:** vai contra convenção da comunidade Postgres + dificulta diff em pull requests. Identificadores `Books` exigirão quoting (`"Books"`) sempre, ou o Postgres dobra para `books` quietly.
|
|
90
|
-
|
|
91
|
-
**Certo:**
|
|
92
|
-
```sql
|
|
93
|
-
select * from books where title = 'X'
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### Anti-pattern 2: `timestamp` sem timezone + camelCase
|
|
97
|
-
|
|
98
|
-
**Errado:**
|
|
99
|
-
```sql
|
|
100
|
-
create table users (
|
|
101
|
-
id int primary key,
|
|
102
|
-
createdAt timestamp, -- sem timezone
|
|
103
|
-
fullName text -- camelCase
|
|
104
|
-
);
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
**Por quê:** `timestamp` (sem `tz`) não preserva timezone — converte tudo para o timezone do servidor; ambíguo em apps multi-região. `camelCase` em SQL é estilizado por engine driver (caso por caso) e quebra em ferramentas que esperam snake_case.
|
|
108
|
-
|
|
109
|
-
**Certo:**
|
|
110
|
-
```sql
|
|
111
|
-
create table users (
|
|
112
|
-
id uuid primary key default gen_random_uuid(),
|
|
113
|
-
created_at timestamptz not null default now(),
|
|
114
|
-
full_name text
|
|
115
|
-
);
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### Anti-pattern 3: subqueries aninhadas em vez de CTEs
|
|
119
|
-
|
|
120
|
-
**Errado:**
|
|
121
|
-
```sql
|
|
122
|
-
select * from (
|
|
123
|
-
select author_id, count(*) from (
|
|
124
|
-
select * from books where published_at > now() - interval '30 days'
|
|
125
|
-
) recent group by author_id
|
|
126
|
-
) ranked where count > 5;
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
**Por quê:** ilegível, impossível de comentar cada nível, query plan harder to read.
|
|
130
|
-
|
|
131
|
-
**Certo:** ver "Query complexa com CTEs lineares" acima.
|
|
132
|
-
|
|
133
|
-
## Ver também
|
|
134
|
-
|
|
135
|
-
- [supabase-migrations](../supabase-migrations/SKILL.md) — estilo aplicado em arquivos de migration
|
|
136
|
-
- [supabase-database-functions](../supabase-database-functions/SKILL.md) — estilo aplicado em funções Postgres
|
|
137
|
-
- [supabase-rls-policies](../supabase-rls-policies/SKILL.md) — convenção de naming em policies
|
|
138
|
-
- [glossário](../_shared-supabase/glossary.md) — termos PT-BR↔EN + comandos CLI canônicos
|
|
1
|
+
---
|
|
2
|
+
name: supabase-postgres-style
|
|
3
|
+
description: Use ao escrever SQL para Postgres/Supabase — snake_case, lowercase reserved, plurais para tabelas e singular para colunas, ISO 8601, CTEs lineares.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Supabase — Postgres Style Guide
|
|
7
|
+
|
|
8
|
+
## Quando usar
|
|
9
|
+
|
|
10
|
+
LLM carrega esta skill quando trabalhar com SQL em projeto Supabase/Postgres — definir schemas, escrever queries, criar tabelas/colunas, padronizar dates, decidir nomes. Trigger phrases:
|
|
11
|
+
|
|
12
|
+
- "criar tabela em postgres", "create table"
|
|
13
|
+
- "escrever query SQL para Supabase"
|
|
14
|
+
- "estilo de schema", "convenção de nomes em SQL"
|
|
15
|
+
- "estrutura de query complexa" (CTE vs subquery)
|
|
16
|
+
|
|
17
|
+
## Regras absolutas
|
|
18
|
+
|
|
19
|
+
- **Sempre** use **`lowercase reserved`** words: `select`, `from`, `where`, `join`, `with`, `as`. **Nunca** `SELECT`, `FROM`, `WHERE` em maiúscula.
|
|
20
|
+
- **Sempre** use **`snake_case`** para tabelas, colunas, funções, índices. **Nunca** `camelCase` ou `PascalCase`.
|
|
21
|
+
- **Tabelas em plural** (`books`, `authors`, `users`); **colunas em singular** (`title`, `author_id`, `created_at`).
|
|
22
|
+
- **Datas em `ISO 8601`** com timezone: `timestamptz` (não `timestamp` sem tz). String literal: `'2026-05-06T12:00:00Z'`.
|
|
23
|
+
- Aliases descritivos com `as` **explícito**: `select b.title as book_title from books as b`. Nunca alias implícito.
|
|
24
|
+
- Evite `id` ambíguo. Em FKs use `<entity>_id` (`author_id`, `user_id`). Em PKs use `id` apenas se a tabela já é singular contextualmente.
|
|
25
|
+
- Para queries complexas: prefira **múltiplas CTEs lineares** sobre subqueries aninhadas. Cada CTE com 1 propósito + comentário.
|
|
26
|
+
- JOINs sempre com nomes completos da tabela qualificadora: `books.author_id = authors.id` (não aliases curtos como `b.x = a.y` sem `as`).
|
|
27
|
+
|
|
28
|
+
## Patterns canônicos
|
|
29
|
+
|
|
30
|
+
### Tabela típica
|
|
31
|
+
|
|
32
|
+
```sql
|
|
33
|
+
-- estilo: lowercase reserved + snake_case + tabela em plural + colunas em singular
|
|
34
|
+
create table public.books (
|
|
35
|
+
id uuid primary key default gen_random_uuid(),
|
|
36
|
+
title text not null,
|
|
37
|
+
author_id uuid references public.authors (id) on delete cascade,
|
|
38
|
+
published_at timestamptz, -- ISO 8601 com timezone
|
|
39
|
+
created_at timestamptz not null default now(),
|
|
40
|
+
updated_at timestamptz not null default now()
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
-- comentário descritivo na tabela (até 1024 chars)
|
|
44
|
+
comment on table public.books is 'Catálogo de livros disponíveis na biblioteca.';
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Query simples (uma linha por cláusula)
|
|
48
|
+
|
|
49
|
+
```sql
|
|
50
|
+
-- query curta: pode ficar em poucas linhas
|
|
51
|
+
select id, title, author_id
|
|
52
|
+
from public.books
|
|
53
|
+
where published_at is not null
|
|
54
|
+
order by published_at desc
|
|
55
|
+
limit 50;
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Query complexa com CTEs lineares
|
|
59
|
+
|
|
60
|
+
```sql
|
|
61
|
+
-- preferir CTEs lineares — cada uma com 1 propósito
|
|
62
|
+
with recent_books as (
|
|
63
|
+
-- 1. livros publicados nos últimos 30 dias
|
|
64
|
+
select id, title, author_id, published_at
|
|
65
|
+
from public.books
|
|
66
|
+
where published_at >= now() - interval '30 days'
|
|
67
|
+
),
|
|
68
|
+
author_stats as (
|
|
69
|
+
-- 2. agregação por autor sobre os livros recentes
|
|
70
|
+
select author_id, count(*) as total_recent
|
|
71
|
+
from recent_books
|
|
72
|
+
group by author_id
|
|
73
|
+
)
|
|
74
|
+
select a.name as author_name, s.total_recent
|
|
75
|
+
from author_stats as s
|
|
76
|
+
join public.authors as a on a.id = s.author_id
|
|
77
|
+
order by s.total_recent desc;
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Anti-patterns
|
|
81
|
+
|
|
82
|
+
### Anti-pattern 1: Reserved words em maiúscula + mixed case
|
|
83
|
+
|
|
84
|
+
**Errado:**
|
|
85
|
+
```sql
|
|
86
|
+
SELECT * FROM Books WHERE Title='X'
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Por quê:** vai contra convenção da comunidade Postgres + dificulta diff em pull requests. Identificadores `Books` exigirão quoting (`"Books"`) sempre, ou o Postgres dobra para `books` quietly.
|
|
90
|
+
|
|
91
|
+
**Certo:**
|
|
92
|
+
```sql
|
|
93
|
+
select * from books where title = 'X'
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Anti-pattern 2: `timestamp` sem timezone + camelCase
|
|
97
|
+
|
|
98
|
+
**Errado:**
|
|
99
|
+
```sql
|
|
100
|
+
create table users (
|
|
101
|
+
id int primary key,
|
|
102
|
+
createdAt timestamp, -- sem timezone
|
|
103
|
+
fullName text -- camelCase
|
|
104
|
+
);
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Por quê:** `timestamp` (sem `tz`) não preserva timezone — converte tudo para o timezone do servidor; ambíguo em apps multi-região. `camelCase` em SQL é estilizado por engine driver (caso por caso) e quebra em ferramentas que esperam snake_case.
|
|
108
|
+
|
|
109
|
+
**Certo:**
|
|
110
|
+
```sql
|
|
111
|
+
create table users (
|
|
112
|
+
id uuid primary key default gen_random_uuid(),
|
|
113
|
+
created_at timestamptz not null default now(),
|
|
114
|
+
full_name text
|
|
115
|
+
);
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Anti-pattern 3: subqueries aninhadas em vez de CTEs
|
|
119
|
+
|
|
120
|
+
**Errado:**
|
|
121
|
+
```sql
|
|
122
|
+
select * from (
|
|
123
|
+
select author_id, count(*) from (
|
|
124
|
+
select * from books where published_at > now() - interval '30 days'
|
|
125
|
+
) recent group by author_id
|
|
126
|
+
) ranked where count > 5;
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Por quê:** ilegível, impossível de comentar cada nível, query plan harder to read.
|
|
130
|
+
|
|
131
|
+
**Certo:** ver "Query complexa com CTEs lineares" acima.
|
|
132
|
+
|
|
133
|
+
## Ver também
|
|
134
|
+
|
|
135
|
+
- [supabase-migrations](../supabase-migrations/SKILL.md) — estilo aplicado em arquivos de migration
|
|
136
|
+
- [supabase-database-functions](../supabase-database-functions/SKILL.md) — estilo aplicado em funções Postgres
|
|
137
|
+
- [supabase-rls-policies](../supabase-rls-policies/SKILL.md) — convenção de naming em policies
|
|
138
|
+
- [glossário](../_shared-supabase/glossary.md) — termos PT-BR↔EN + comandos CLI canônicos
|