wizz-method 2.2.0 → 2.3.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 +62 -62
- package/SECURITY.md +15 -16
- package/THIRD-PARTY-NOTICES.md +49 -49
- package/package.json +1 -1
- package/src/bmm-skills/1-analysis/wizz-agent-analyst/customize.toml +1 -1
- package/src/bmm-skills/2-plan-workflows/wizz-agent-pm/customize.toml +1 -1
- package/src/bmm-skills/2-plan-workflows/wizz-agent-ux-designer/customize.toml +1 -1
- package/src/bmm-skills/3-solutioning/wizz-agent-architect/customize.toml +1 -1
- package/src/bmm-skills/4-implementation/wizz-agent-dev/customize.toml +1 -1
- package/src/core-skills/_shared/handoff-protocol.md +72 -71
- package/src/core-skills/wizz-review-adversarial-general/SKILL.md +1 -1
- package/src/modules/lowticket/skills/wizz-lowticket-funil/references/copy-das-paginas.md +39 -39
- package/src/modules/lowticket/skills/wizz-lowticket-funil/references/mapa-do-funil.md +23 -23
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/CATALOGO.md +72 -72
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/01-principios.md +10 -10
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/02-diagnostico-funil.md +50 -50
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/03-campanha-bidcap.md +68 -68
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/04-criativos.md +44 -44
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/04a-criativos-ia.md +77 -77
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/04b-criativos-formatos.md +121 -121
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/05-oferta.md +35 -35
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/06-pagina-vendas.md +122 -122
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/06a-instagram.md +93 -93
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/06b-player-vsl.md +57 -57
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/07-funil-upsell.md +83 -83
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/07a-copy-humanizacao.md +61 -61
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/08-pesquisa-publico.md +11 -11
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/09-especialista-coproducao.md +26 -26
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/10-levantar-caixa.md +29 -29
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/11-checklist-roi.md +22 -22
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/12-mineracao-ofertas.md +80 -80
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/12a-mineracao-veredito.md +72 -72
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/12b-fabrica-de-ofertas.md +63 -63
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/12c-anatomia-low-ticket.md +71 -71
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/13-benchmarks-vsl.md +6 -6
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/14-vocabulario.md +53 -51
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/15-como-estender.md +26 -26
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/17-rastreamento.md +76 -76
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/18-copy-desejo-oferta.md +149 -149
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/INDEX.md +45 -45
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/guardrails.md +45 -45
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/pontos-em-aberto.md +64 -66
- package/src/modules/lowticket/skills/wizz-lowticket-minerador/references/rubrica.md +63 -63
- package/src/modules/lowticket/skills/wizz-lowticket-pagina/references/metas-e-medicao.md +23 -23
- package/src/modules/lowticket/skills/wizz-lowticket-pagina/references/padroes-de-codigo.md +50 -50
- package/src/modules/lowticket/skills/wizz-lowticket-trafego/references/formato-do-diagnostico.md +9 -9
- package/src/modules/lowticket/skills/wizz-lowticket-trafego/references/reguas.md +42 -42
- package/src/modules/wizz/README.md +27 -27
- package/src/modules/wizz/_shared/cerebro.md +37 -37
- package/src/modules/wizz/_shared/communication-rules.md +15 -15
- package/src/modules/wizz/_shared/despacho-barato.md +6 -6
- package/src/modules/wizz/_shared/encerramento.md +23 -23
- package/src/modules/wizz/_shared/model-ladder.md +29 -29
- package/src/modules/wizz/_shared/planning-gate.md +30 -30
- package/src/modules/wizz/_shared/token-economy.md +28 -28
- package/src/modules/wizz/_shared/video-pipeline.md +42 -42
- package/src/modules/wizz/agents/wizz-ads/SKILL.md +16 -16
- package/src/modules/wizz/agents/wizz-ads/customize.toml +21 -21
- package/src/modules/wizz/agents/wizz-copy/SKILL.md +18 -18
- package/src/modules/wizz/agents/wizz-copy/customize.toml +24 -24
- package/src/modules/wizz/agents/wizz-designer/SKILL.md +24 -24
- package/src/modules/wizz/agents/wizz-designer/customize.toml +29 -29
- package/src/modules/wizz/agents/wizz-growth/SKILL.md +20 -20
- package/src/modules/wizz/agents/wizz-growth/customize.toml +34 -34
- package/src/modules/wizz/agents/wizz-maestro/SKILL.md +63 -63
- package/src/modules/wizz/agents/wizz-maestro/customize.toml +38 -38
- package/src/modules/wizz/agents/wizz-memoria/SKILL.md +19 -19
- package/src/modules/wizz/agents/wizz-memoria/customize.toml +24 -24
- package/src/modules/wizz/agents/wizz-qa/SKILL.md +22 -22
- package/src/modules/wizz/agents/wizz-qa/customize.toml +29 -29
- package/src/modules/wizz/agents/wizz-seo/SKILL.md +19 -19
- package/src/modules/wizz/agents/wizz-seo/customize.toml +27 -27
- package/src/modules/wizz/agents/wizz-social/SKILL.md +53 -53
- package/src/modules/wizz/agents/wizz-social/customize.toml +37 -37
- package/src/modules/wizz/agents/wizz-social/knowledge/analise-imagem-referencia.md +20 -20
- package/src/modules/wizz/agents/wizz-social/knowledge/biblioteca-prompts-imagem.md +71 -71
- package/src/modules/wizz/agents/wizz-social/knowledge/blueprint-roteiro-viral.md +196 -196
- package/src/modules/wizz/agents/wizz-social/knowledge/legenda-instagram.md +32 -32
- package/src/modules/wizz/agents/wizz-social/knowledge/prompts-imagem-video.md +48 -48
- package/src/modules/wizz/module.yaml +28 -28
- package/src/modules/wizz/overrides/wizz-agent-analyst.toml +17 -17
- package/src/modules/wizz/overrides/wizz-agent-architect.toml +21 -21
- package/src/modules/wizz/overrides/wizz-agent-dev.toml +20 -20
- package/src/modules/wizz/overrides/wizz-agent-pm.toml +11 -11
- package/src/modules/wizz/overrides/wizz-agent-tech-writer.toml +14 -14
- package/src/modules/wizz/overrides/wizz-agent-ux-designer.toml +14 -14
- package/src/modules/wizz/subagents/codex/wizz-exec-haiku.toml +17 -17
- package/src/modules/wizz/subagents/codex/wizz-exec-opus.toml +19 -19
- package/src/modules/wizz/subagents/codex/wizz-exec-review.toml +18 -18
- package/src/modules/wizz/subagents/codex/wizz-exec-sonnet.toml +18 -18
- package/src/modules/wizz/subagents/gemini/wizz-exec-haiku.md +17 -17
- package/src/modules/wizz/subagents/gemini/wizz-exec-opus.md +19 -19
- package/src/modules/wizz/subagents/gemini/wizz-exec-review.md +18 -18
- package/src/modules/wizz/subagents/gemini/wizz-exec-sonnet.md +18 -18
- package/src/modules/wizz/subagents/opencode/wizz-exec-haiku.md +17 -17
- package/src/modules/wizz/subagents/opencode/wizz-exec-opus.md +19 -19
- package/src/modules/wizz/subagents/opencode/wizz-exec-review.md +18 -18
- package/src/modules/wizz/subagents/opencode/wizz-exec-sonnet.md +18 -18
- package/src/modules/wizz/subagents/spec.yaml +84 -83
- package/src/modules/wizz/subagents/wizz-exec-haiku.md +17 -17
- package/src/modules/wizz/subagents/wizz-exec-opus.md +19 -19
- package/src/modules/wizz/subagents/wizz-exec-review.md +18 -18
- package/src/modules/wizz/subagents/wizz-exec-sonnet.md +18 -18
- package/src/skills-lib/cerebro/SKILL.md +61 -61
- package/src/skills-lib/cerebro/references/comandos-pesquisa-e-memoria.md +46 -46
- package/src/skills-lib/cerebro/references/comandos-rotina-e-captura.md +65 -65
- package/src/skills-lib/cerebro/references/comandos-sessao.md +74 -74
- package/src/skills-lib/ctc-align/SKILL.md +37 -37
- package/src/skills-lib/find-skills/SKILL.md +19 -19
- package/src/skills-lib/pesquisa-de-publico-do-piva/README.md +33 -33
- package/src/skills-lib/pesquisa-de-publico-do-piva/SKILL.md +42 -42
- package/src/skills-lib/pesquisa-de-publico-do-piva/prompts.md +20 -20
- package/src/skills-lib/references/premium-agency-rules.md +63 -63
- package/src/skills-lib/security-audit-pentest/SKILL.md +31 -31
- package/src/skills-lib/security-audit-pentest/references/stage-1-validacao-entrada.md +37 -37
- package/src/skills-lib/security-audit-pentest/references/stage-2-autorizacao.md +61 -61
- package/src/skills-lib/security-audit-pentest/references/stage-3-abuso-volume.md +37 -37
- package/src/skills-lib/security-audit-pentest/references/stage-4-vazamento-resposta.md +52 -52
- package/src/skills-lib/site-launch-kit/SKILL.md +42 -42
- package/src/skills-lib/site-launch-kit/references/01-cta-principal.md +20 -20
- package/src/skills-lib/site-launch-kit/references/02-barra-fixa-mobile.md +24 -24
- package/src/skills-lib/site-launch-kit/references/03-tempo-de-resposta.md +21 -21
- package/src/skills-lib/site-launch-kit/references/04-prova-social.md +22 -22
- package/src/skills-lib/site-launch-kit/references/05-faq-decisao.md +28 -28
- package/src/skills-lib/site-launch-kit/references/06-imagens-reais.md +27 -27
- package/src/skills-lib/site-launch-kit/references/07-endereco-como-chegar.md +25 -25
- package/src/skills-lib/site-launch-kit/references/08-titles.md +30 -30
- package/src/skills-lib/site-launch-kit/references/09-open-graph.md +23 -23
- package/src/skills-lib/site-launch-kit/references/10-breadcrumbs.md +23 -23
- package/src/skills-lib/site-launch-kit/references/11-alt-text.md +28 -28
- package/src/skills-lib/site-launch-kit/references/12-schema-local.md +22 -22
- package/src/skills-lib/site-launch-kit/references/13-robots-sitemap.md +26 -26
- package/src/skills-lib/site-launch-kit/references/14-privacidade-termos.md +27 -27
- package/src/skills-lib/site-launch-kit/references/15-medicao.md +23 -23
- package/src/skills-lib/wizz-ai-product-design/SKILL.md +70 -70
- package/src/skills-lib/wizz-auth-and-secrets/SKILL.md +78 -78
- package/src/skills-lib/wizz-caching-and-queues/SKILL.md +40 -40
- package/src/skills-lib/wizz-cloud-and-infra/SKILL.md +22 -22
- package/src/skills-lib/wizz-database-and-deps/SKILL.md +52 -52
- package/src/skills-lib/wizz-database-scaling/SKILL.md +31 -31
- package/src/skills-lib/wizz-desktop-security/SKILL.md +49 -49
- package/src/skills-lib/wizz-implementation-planner/SKILL.md +56 -56
- package/src/skills-lib/wizz-implementation-planner/references/folder-structure-and-dependencies.md +14 -14
- package/src/skills-lib/wizz-implementation-planner/references/implementation-phases.md +15 -15
- package/src/skills-lib/wizz-implementation-planner/references/implementation-types.md +9 -9
- package/src/skills-lib/wizz-implementation-planner/references/motion-path-implementation.md +19 -19
- package/src/skills-lib/wizz-implementation-planner/references/performance-plan.md +27 -27
- package/src/skills-lib/wizz-infrastructure/SKILL.md +21 -21
- package/src/skills-lib/wizz-inicio-de-projeto/SKILL.md +63 -63
- package/src/skills-lib/wizz-inicio-de-projeto/references/implementacao-api-forms.md +27 -27
- package/src/skills-lib/wizz-inicio-de-projeto/references/padroes-arquiteturais-e-pastas.md +31 -31
- package/src/skills-lib/wizz-inicio-de-projeto/references/seguranca-e-regras-codigo.md +21 -21
- package/src/skills-lib/wizz-launch-readiness/SKILL.md +61 -61
- package/src/skills-lib/wizz-launch-readiness/references/01-tecnico-build.md +16 -16
- package/src/skills-lib/wizz-launch-readiness/references/02-seguranca.md +16 -16
- package/src/skills-lib/wizz-launch-readiness/references/03-seo-descoberta.md +16 -16
- package/src/skills-lib/wizz-launch-readiness/references/04-analytics-medicao.md +15 -15
- package/src/skills-lib/wizz-launch-readiness/references/05-conteudo-prova-social.md +15 -15
- package/src/skills-lib/wizz-launch-readiness/references/06-legal-lgpd.md +15 -15
- package/src/skills-lib/wizz-launch-readiness/references/07-infra-deploy-rollback.md +16 -16
- package/src/skills-lib/wizz-launch-readiness/references/08-fusao-priorizacao.md +19 -19
- package/src/skills-lib/wizz-launch-readiness/references/09-persistencia-project-context.md +26 -26
- package/src/skills-lib/wizz-motion-3d-director/SKILL.md +70 -70
- package/src/skills-lib/wizz-motion-3d-director/references/image-to-video-workflow.md +34 -35
- package/src/skills-lib/wizz-motion-3d-director/references/motion-paths.md +70 -70
- package/src/skills-lib/wizz-motion-3d-director/references/performance-and-handoff.md +17 -17
- package/src/skills-lib/wizz-offer-forge/README.md +9 -9
- package/src/skills-lib/wizz-offer-forge/SKILL.md +64 -64
- package/src/skills-lib/wizz-offer-forge/references/empilhamento-valor.md +17 -17
- package/src/skills-lib/wizz-offer-forge/references/garantia-reversa.md +16 -16
- package/src/skills-lib/wizz-offer-forge/references/mecanismo-unico.md +19 -19
- package/src/skills-lib/wizz-offer-forge/references/ponte-trafego.md +17 -17
- package/src/skills-lib/wizz-premium-landing-ui-researcher/SKILL.md +36 -36
- package/src/skills-lib/wizz-premium-landing-ui-researcher/references/audit-protocol.md +81 -82
- package/src/skills-lib/wizz-premium-landing-ui-researcher/references/component-sources.md +105 -105
- package/src/skills-lib/wizz-premium-landing-ui-researcher/references/core-goal.md +39 -39
- package/src/skills-lib/wizz-premium-landing-ui-researcher/references/dashboard-and-portfolio-modes.md +49 -50
- package/src/skills-lib/wizz-premium-landing-ui-researcher/references/handoffs.md +33 -34
- package/src/skills-lib/wizz-premium-landing-ui-researcher/references/landing-page-strategy.md +141 -142
- package/src/skills-lib/wizz-premium-landing-ui-researcher/references/mandatory-process.md +24 -24
- package/src/skills-lib/wizz-premium-landing-ui-researcher/references/output-format-and-quality.md +73 -73
- package/src/skills-lib/wizz-premium-landing-ui-researcher/references/prompt-templates.md +4 -4
- package/src/skills-lib/wizz-premium-landing-ui-researcher/references/site-levels.md +282 -283
- package/src/skills-lib/wizz-premium-landing-ui-researcher/references/source-first-protocol.md +39 -39
- package/src/skills-lib/wizz-premium-landing-ui-researcher/references/source-links.md +8 -8
- package/src/skills-lib/wizz-premium-landing-ui-researcher/references/stack-and-visual-direction.md +63 -64
- package/src/skills-lib/wizz-router/SKILL.md +38 -38
- package/src/skills-lib/wizz-router/references/auditoria-360.md +12 -12
- package/src/skills-lib/wizz-router/references/routing-table-flat.md +80 -80
- package/src/skills-lib/wizz-tracking-audit/SKILL.md +48 -48
- package/src/skills-lib/wizz-tracking-audit/references/modo-diagnostico.md +43 -43
- package/src/skills-lib/wizz-tracking-audit/references/modo-implantacao.md +59 -59
- package/src/skills-lib/wizz-tracking-audit/references/utm-e-atribuicao.md +35 -35
- package/src/skills-lib/wizz-web-security/SKILL.md +35 -35
- package/src/skills-lib/wizz-web-security/references/checklist-deploy.md +50 -50
- package/src/skills-lib/wizz-web-security/references/headers-rate-limit-cors.md +33 -33
- package/src/skills-lib/wizz-web-security/references/owasp-top5-detalhado.md +36 -36
- package/tools/hooks/session-rules.js +14 -11
|
@@ -1,95 +1,95 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wizz-inicio-de-projeto
|
|
3
3
|
description: >
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
onboarding
|
|
7
|
-
stack (Next.js + Supabase + Clerk + Zod),
|
|
8
|
-
Use
|
|
9
|
-
|
|
4
|
+
Starting point for new projects or new features. Use when: starting a web project, creating a new module/feature,
|
|
5
|
+
needing architecture standards, defining folder structure, establishing code rules, starting a SaaS app/product,
|
|
6
|
+
or onboarding a developer to the project. Contains product principles, P0-P3 architectural patterns, code rules,
|
|
7
|
+
stack (Next.js + Supabase + Clerk + Zod), folder structure, and a kickoff checklist.
|
|
8
|
+
Use when the request is to start a new project, create a module/feature from scratch, or define
|
|
9
|
+
architecture, stack, and folder structure before coding.
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
#
|
|
12
|
+
# Project Kickoff — Engineering Standards
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
Next.js (App Router), shadcn/ui
|
|
14
|
+
You are a senior software engineer specialized in modern web development with TypeScript, React 19,
|
|
15
|
+
Next.js (App Router), shadcn/ui, and Supabase. Attentive, precise, and focused on solutions that last.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
Consult this guide at the start of any project or new feature. Fill in the sections marked `[FILL IN]`
|
|
18
|
+
with the specific project's data before starting to code.
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## Product Principles (always apply)
|
|
21
21
|
|
|
22
|
-
|
|
|
22
|
+
| Code | Principle | Practical rule |
|
|
23
23
|
|--------|-----------|---------------|
|
|
24
|
-
| P-001 | **
|
|
25
|
-
| P-002 | **
|
|
26
|
-
| P-003 | **
|
|
27
|
-
| P-004 | **
|
|
28
|
-
| P-005 | **
|
|
29
|
-
| P-006 | **
|
|
30
|
-
| P-007 | **Soft delete
|
|
24
|
+
| P-001 | **Domain language** | The UI speaks the user's language — never "entity", "record", "submit", "payload" |
|
|
25
|
+
| P-002 | **Real mobile-first** | Primary screen = phone in a real context. Web = office-adapted version |
|
|
26
|
+
| P-003 | **Smart defaults / auto-save** | The user doesn't click "Save" during a draft. One decision at the end: "Finish" or "Discard" |
|
|
27
|
+
| P-004 | **Proactive filtering** | Show only items eligible for the action — never show everything and warn afterward |
|
|
28
|
+
| P-005 | **Server-side validation** | The client is cosmetic. Every business rule is re-validated on the backend with Zod |
|
|
29
|
+
| P-006 | **State in the URL** | Filters, selection, active tab, and wizard step live in query params. F5 preserves state |
|
|
30
|
+
| P-007 | **Soft delete and audit** | Nothing is deleted. `deleted_at timestamp` on every domain table. Critical events in `audit_logs` |
|
|
31
31
|
|
|
32
|
-
##
|
|
32
|
+
## Project Context
|
|
33
33
|
|
|
34
34
|
```
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
Name: [FILL IN]
|
|
36
|
+
Goal: [FILL IN — 3-5 lines: what it solves, for whom, differentiator]
|
|
37
37
|
Personas:
|
|
38
|
-
- A-001 [
|
|
39
|
-
- A-002 [
|
|
40
|
-
- A-003 [
|
|
41
|
-
MVP: [
|
|
38
|
+
- A-001 [FILL IN — who uses it, context, digital fluency]
|
|
39
|
+
- A-002 [FILL IN]
|
|
40
|
+
- A-003 [FILL IN — critical persona, who uses it most under adverse conditions]
|
|
41
|
+
MVP: [FILL IN — modules, single/multi-tenant scope]
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
> **
|
|
44
|
+
> **Critical open items:** when you find a decision that blocks implementation, log it here and ask the user before assuming a default.
|
|
45
45
|
|
|
46
|
-
## Stack
|
|
46
|
+
## Project Stack
|
|
47
47
|
|
|
48
|
-
|
|
|
48
|
+
| Category | Technology |
|
|
49
49
|
|-----------|------------|
|
|
50
50
|
| Framework | Next.js (App Router) |
|
|
51
51
|
| UI | React 19, Tailwind CSS, shadcn/ui |
|
|
52
|
-
|
|
|
52
|
+
| Language | TypeScript (required) |
|
|
53
53
|
| Auth | Clerk |
|
|
54
|
-
|
|
|
55
|
-
|
|
|
56
|
-
|
|
|
54
|
+
| Database | Supabase (PostgreSQL) |
|
|
55
|
+
| Validation | Zod |
|
|
56
|
+
| Forms | React Hook Form + Zod |
|
|
57
57
|
| Data Fetching | React Query (@tanstack/react-query) |
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
58
|
+
| Date/Time | dayjs |
|
|
59
|
+
| Notifications | Sonner |
|
|
60
|
+
| Icons | @tabler/icons-react or lucide-react |
|
|
61
|
+
| Input masks | react-number-format |
|
|
62
62
|
|
|
63
|
-
##
|
|
63
|
+
## Domain Glossary
|
|
64
64
|
|
|
65
|
-
>
|
|
65
|
+
> Critical: every label, message, button, and error uses these terms — never generic software terms.
|
|
66
66
|
|
|
67
67
|
```
|
|
68
|
-
[
|
|
69
|
-
extração →
|
|
70
|
-
workspace →
|
|
71
|
-
crédito →
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"registro", "entidade", "submeter", "validação", "transação", "objeto",
|
|
75
|
-
"instância", "tenant", "request", "payload", "null", "undefined", "erro 500"
|
|
68
|
+
[FILL IN — e.g.:]
|
|
69
|
+
extração → lead search
|
|
70
|
+
workspace → company / account
|
|
71
|
+
crédito → search credit
|
|
72
|
+
|
|
73
|
+
FORBIDDEN terms in the UI (generic):
|
|
74
|
+
"registro" (record), "entidade" (entity), "submeter" (submit), "validação" (validation), "transação" (transaction), "objeto" (object),
|
|
75
|
+
"instância" (instance), "tenant", "request", "payload", "null", "undefined", "erro 500" (error 500)
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
## References (
|
|
78
|
+
## References (load on demand)
|
|
79
79
|
|
|
80
|
-
- `references/padroes-arquiteturais-e-pastas.md` —
|
|
81
|
-
- `references/implementacao-api-forms.md` —
|
|
82
|
-
- `references/seguranca-e-regras-codigo.md` —
|
|
80
|
+
- `references/padroes-arquiteturais-e-pastas.md` — the 4 P0-P3 architectural patterns (lifecycle with draft, cascades, computed state, dashboards) and the project's complete folder structure. Load when mapping a new module or creating the initial structure.
|
|
81
|
+
- `references/implementacao-api-forms.md` — code patterns for API routes (Supabase + Zod + rate limit), Supabase schemas (RLS, soft delete), forms (React Hook Form + Zod), and state in the URL (P-006). Load when writing a route, table, or form.
|
|
82
|
+
- `references/seguranca-e-regras-codigo.md` — built-in security checklist (summary; see the `wizz-web-security` skill for the full version) and the project's code rules (TypeScript, naming, file/function size, immutability). Load before finalizing any PR.
|
|
83
83
|
|
|
84
|
-
##
|
|
84
|
+
## Project Kickoff Checklist
|
|
85
85
|
|
|
86
|
-
- [ ]
|
|
87
|
-
- [ ] Personas
|
|
88
|
-
- [ ]
|
|
89
|
-
- [ ] RLS
|
|
90
|
-
- [ ] `.env.example`
|
|
91
|
-
- [ ]
|
|
92
|
-
- [ ] `enforceRateLimit`
|
|
93
|
-
- [ ] Auto-save
|
|
94
|
-
- [ ]
|
|
95
|
-
- [ ] `deleted_at`
|
|
86
|
+
- [ ] Domain glossary filled in (user terms, forbidden terms)
|
|
87
|
+
- [ ] Personas defined (especially A-003, who uses it under adverse conditions)
|
|
88
|
+
- [ ] Each module mapped to a P0/P1/P2/P3 pattern
|
|
89
|
+
- [ ] RLS configured on Supabase tables
|
|
90
|
+
- [ ] `.env.example` created (no real values) and `.env*` in `.gitignore`
|
|
91
|
+
- [ ] Security headers in `next.config.ts`
|
|
92
|
+
- [ ] `enforceRateLimit` on write/billing endpoints
|
|
93
|
+
- [ ] Auto-save implemented for P0 modules (300ms debounce)
|
|
94
|
+
- [ ] State in URL for filters/tabs/steps (P-006)
|
|
95
|
+
- [ ] `deleted_at` on domain tables (P-007)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Implementation Patterns: API Routes, Supabase Schemas, Forms, State in the URL
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Load this file when writing an API route, a Supabase table, a form, or when implementing state in query params.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## API Route patterns (Supabase + Zod)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Every API route that receives user input:
|
|
8
8
|
```ts
|
|
9
9
|
// src/app/api/[modulo]/route.ts
|
|
10
10
|
import { auth } from "@clerk/nextjs/server"
|
|
@@ -28,42 +28,42 @@ export async function POST(request: Request) {
|
|
|
28
28
|
const parsed = schema.safeParse(body)
|
|
29
29
|
if (!parsed.success) return fail("Dados inválidos", 400)
|
|
30
30
|
|
|
31
|
-
//
|
|
31
|
+
// business logic here — revalidate business rules on the server (P-005)
|
|
32
32
|
}
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
**
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
- Webhooks
|
|
35
|
+
**API route rules:**
|
|
36
|
+
- ALWAYS validate with Zod (`.safeParse()` or `.parse()`)
|
|
37
|
+
- ALWAYS filter by `workspace_id` in Supabase queries
|
|
38
|
+
- NEVER trust client-side calculations — recalculate on the server
|
|
39
|
+
- NEVER leak internal details in error messages
|
|
40
|
+
- Webhooks ALWAYS verify the signature before processing the body
|
|
41
41
|
|
|
42
|
-
##
|
|
42
|
+
## Supabase schemas (patterns)
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
Every domain table:
|
|
45
45
|
```sql
|
|
46
46
|
CREATE TABLE [modulo] (
|
|
47
47
|
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
48
48
|
workspace_id uuid NOT NULL REFERENCES workspaces(id),
|
|
49
|
-
--
|
|
49
|
+
-- domain fields
|
|
50
50
|
deleted_at timestamp, -- soft delete (P-007)
|
|
51
51
|
created_at timestamp NOT NULL DEFAULT now(),
|
|
52
52
|
updated_at timestamp NOT NULL DEFAULT now()
|
|
53
53
|
);
|
|
54
54
|
|
|
55
|
-
-- RLS
|
|
55
|
+
-- RLS mandatory
|
|
56
56
|
ALTER TABLE [modulo] ENABLE ROW LEVEL SECURITY;
|
|
57
57
|
CREATE POLICY "workspace_isolation" ON [modulo]
|
|
58
58
|
USING (workspace_id = (SELECT workspace_id FROM workspace_members WHERE user_id = auth.uid()));
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
**
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
61
|
+
**Data rules:**
|
|
62
|
+
- Monetary values ALWAYS in cents (integer). Display with `formatCurrency()`
|
|
63
|
+
- Physical units ALWAYS in the smallest unit (integer) in the database
|
|
64
|
+
- Dates as `timestamp` (UTC). Display with dayjs in the user's locale
|
|
65
65
|
|
|
66
|
-
##
|
|
66
|
+
## Forms (React Hook Form + Zod)
|
|
67
67
|
|
|
68
68
|
```tsx
|
|
69
69
|
"use client"
|
|
@@ -85,7 +85,7 @@ export function MeuForm() {
|
|
|
85
85
|
method: "POST",
|
|
86
86
|
body: JSON.stringify(data),
|
|
87
87
|
})
|
|
88
|
-
//
|
|
88
|
+
// handle the response
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
return (
|
|
@@ -96,17 +96,17 @@ export function MeuForm() {
|
|
|
96
96
|
}
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
##
|
|
99
|
+
## State in the URL (P-006)
|
|
100
100
|
|
|
101
101
|
```ts
|
|
102
|
-
//
|
|
103
|
-
// F5
|
|
102
|
+
// Filters, tabs, pagination always in query params
|
|
103
|
+
// F5 preserves state, the link is shareable
|
|
104
104
|
|
|
105
|
-
//
|
|
105
|
+
// Examples of canonical hooks:
|
|
106
106
|
useUrlState<"ativo" | "inativo">("status", "ativo")
|
|
107
107
|
useUrlListState("categoria") // ?categoria=A,B
|
|
108
108
|
useUrlDateRange("criado") // ?criadoDe=...&criadoAte=...
|
|
109
109
|
|
|
110
|
-
//
|
|
111
|
-
//
|
|
110
|
+
// Multi-step wizard: ?etapa=1
|
|
111
|
+
// Only persist navigable steps, not transient states (loading, success)
|
|
112
112
|
```
|
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Architectural Patterns (P0-P3) and Folder Structure
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Load this file when mapping a new module to an architectural pattern, or when creating the project's folder structure.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Architectural Patterns
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Map each module to a pattern before coding.
|
|
8
8
|
|
|
9
|
-
### P0 —
|
|
10
|
-
|
|
9
|
+
### P0 — Draft Lifecycle
|
|
10
|
+
For flows where the user builds up data in steps and decides at the end.
|
|
11
11
|
|
|
12
|
-
**
|
|
12
|
+
**States:** `rascunho` (draft) → `confirmado` (confirmed) → `estornado` (reversed) | `descartado` (discarded)
|
|
13
13
|
|
|
14
|
-
**Auto-save (P-003):**
|
|
14
|
+
**Auto-save (P-003):** the draft persists on every change (300ms debounce). No "Save" button. Single decision: **Complete** or **Discard**.
|
|
15
15
|
|
|
16
|
-
**
|
|
16
|
+
**Proactive filtering (P0.5):** the selection screen only shows eligible items. Don't rely on validation afterward.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Supabase enum:
|
|
19
19
|
```sql
|
|
20
20
|
CREATE TYPE status_workflow AS ENUM ('rascunho', 'confirmado', 'descartado', 'estornado');
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
### P1 —
|
|
24
|
-
|
|
23
|
+
### P1 — Operations with Cascades
|
|
24
|
+
Confirmation triggers cascades in other modules. Every cascade in the SAME transaction (Supabase RPC). Failure in any cascade = full rollback.
|
|
25
25
|
|
|
26
|
-
### P2 —
|
|
27
|
-
|
|
26
|
+
### P2 — Entries with Calculated State
|
|
27
|
+
Do NOT store state — calculate it at runtime from dates/balances. Movements are append-only (never update, only insert).
|
|
28
28
|
|
|
29
|
-
### P3 —
|
|
30
|
-
Read-only. Cache
|
|
29
|
+
### P3 — Analytical Screens (Dashboards)
|
|
30
|
+
Read-only. Cache of 5-15 min for heavy KPIs, ≤1 min for operational KPIs. Mobile-first prioritizes operational KPIs above the fold.
|
|
31
31
|
|
|
32
|
-
##
|
|
32
|
+
## Folder Structure
|
|
33
33
|
|
|
34
34
|
```
|
|
35
35
|
src/
|
|
36
36
|
├── app/
|
|
37
|
-
│ ├── (auth)/ #
|
|
37
|
+
│ ├── (auth)/ # public routes (login, signup)
|
|
38
38
|
│ ├── (app)/
|
|
39
|
-
│ │ ├── dashboard/ # P3 —
|
|
39
|
+
│ │ ├── dashboard/ # P3 — analytical
|
|
40
40
|
│ │ ├── [modulo]/
|
|
41
41
|
│ │ │ ├── page.tsx
|
|
42
42
|
│ │ │ └── [id]/page.tsx
|
|
43
43
|
│ │ └── configuracoes/
|
|
44
44
|
│ └── api/
|
|
45
45
|
│ ├── [modulo]/
|
|
46
|
-
│ │ └── route.ts #
|
|
47
|
-
│ └── webhooks/ #
|
|
46
|
+
│ │ └── route.ts # Zod validation + business logic
|
|
47
|
+
│ └── webhooks/ # always verify the signature before processing
|
|
48
48
|
├── components/
|
|
49
|
-
│ ├── ui/ # shadcn/ui base (
|
|
50
|
-
│ └── [modulo]/ #
|
|
49
|
+
│ ├── ui/ # shadcn/ui base (do not edit)
|
|
50
|
+
│ └── [modulo]/ # reusable domain components
|
|
51
51
|
├── features/
|
|
52
52
|
│ └── [modulo]/
|
|
53
|
-
│ ├── components/ #
|
|
54
|
-
│ ├── services/ #
|
|
55
|
-
│ └── hooks/ # React Query hooks
|
|
53
|
+
│ ├── components/ # module-specific components
|
|
54
|
+
│ ├── services/ # business logic (Supabase calls)
|
|
55
|
+
│ └── hooks/ # the module's React Query hooks
|
|
56
56
|
├── hooks/
|
|
57
57
|
│ ├── queries/ # use-[entidade].ts
|
|
58
58
|
│ ├── mutations/ # use-[acao].ts
|
|
59
|
-
│ └── use-url-state.ts #
|
|
59
|
+
│ └── use-url-state.ts # URL state (P-006)
|
|
60
60
|
├── lib/
|
|
61
61
|
│ ├── supabase/
|
|
62
|
-
│ │ ├── client.ts # client
|
|
63
|
-
│ │ └── server.ts # client
|
|
62
|
+
│ │ ├── client.ts # browser client
|
|
63
|
+
│ │ └── server.ts # server client (service role — server-side only)
|
|
64
64
|
│ ├── api/
|
|
65
65
|
│ │ ├── response.ts # ok() / fail() helpers
|
|
66
|
-
│ │ └── handle-route-error.ts #
|
|
66
|
+
│ │ └── handle-route-error.ts # safe messages (don't leak internal details)
|
|
67
67
|
│ ├── security/
|
|
68
68
|
│ │ └── rate-limit.ts # enforceRateLimit helper
|
|
69
69
|
│ └── format/ # formatCurrency, formatDate, etc.
|
|
70
|
-
└── types/ # interfaces
|
|
70
|
+
└── types/ # shared interfaces and types
|
|
71
71
|
```
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Security and Code Rules
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Load this file before finalizing any PR — built-in security checklist and the project's code conventions.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Security (built in by default)
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
- `enforceRateLimit`
|
|
10
|
-
-
|
|
11
|
-
- Soft delete via `deleted_at`
|
|
12
|
-
-
|
|
13
|
-
- `.env*`
|
|
14
|
-
- `SUPABASE_SERVICE_ROLE_KEY`
|
|
7
|
+
See the `wizz-web-security` skill for the full checklist. Summary:
|
|
8
|
+
- Zod validation on ALL endpoints that receive input
|
|
9
|
+
- `enforceRateLimit` on write, billing, and expensive-operation endpoints
|
|
10
|
+
- Compare tokens/secrets with `crypto.timingSafeEqual` (never `===`)
|
|
11
|
+
- Soft delete via `deleted_at` on every domain table
|
|
12
|
+
- Append-only audit logs for critical events
|
|
13
|
+
- `.env*` never committed; secrets via the platform's environment variables
|
|
14
|
+
- `SUPABASE_SERVICE_ROLE_KEY` server-side only
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## Code Rules
|
|
17
17
|
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
- **kebab-case**
|
|
21
|
-
- SOLID
|
|
22
|
-
- DRY:
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
18
|
+
- ALWAYS TypeScript. No explicit `any`.
|
|
19
|
+
- Descriptive names: `isLoading`, `hasError`, `handleConfirmarAcao`
|
|
20
|
+
- **kebab-case** for files and folders: `confirmar-acao.ts`
|
|
21
|
+
- SOLID and Clean Code; functions < 50 lines; files < 800 lines
|
|
22
|
+
- DRY: reusable components for repeated patterns
|
|
23
|
+
- NEVER write comments in the code
|
|
24
|
+
- NEVER run `npm run dev` to test TypeScript — use `npx tsc --noEmit`
|
|
25
|
+
- Immutability: ALWAYS create new objects, NEVER mutate (spread, map, filter)
|
|
26
|
+
- No `console.log` in production
|