@luanpdd/kit-mcp 1.35.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.
Files changed (117) hide show
  1. package/bin/cli.js +2 -2
  2. package/bin/mcp.js +6 -6
  3. package/bin/ui.js +74 -74
  4. package/gates/ai-prompt-stability.md +120 -120
  5. package/gates/budget-description.md +68 -68
  6. package/gates/confidence.md +29 -29
  7. package/gates/dependency-check.md +33 -33
  8. package/gates/dept-cycle-prevention.md +179 -179
  9. package/gates/golden-signals-coverage.md +133 -133
  10. package/gates/legacy-refactor-safety.md +178 -178
  11. package/gates/multi-tenant-rls-coverage.md +102 -102
  12. package/gates/no-personal-uuid.md +72 -72
  13. package/gates/obs-agents-mcp-supabase.md +86 -86
  14. package/gates/obs-skills-frontmatter.md +76 -76
  15. package/gates/observability-coverage.md +151 -151
  16. package/gates/omm-no-regression.md +83 -83
  17. package/gates/postmortem-template-required.md +127 -127
  18. package/gates/prr-checklist-coverage.md +128 -128
  19. package/gates/regression.md +32 -32
  20. package/gates/release-pipeline-policy.md +132 -132
  21. package/gates/secrets-scan.md +33 -33
  22. package/gates/service-role-not-in-user-facing.md +113 -113
  23. package/gates/skill-must-include.md +71 -71
  24. package/gates/sync-idempotent.md +62 -62
  25. package/gates/verify-phase-goal.md +34 -34
  26. package/kit/agents/designer-ui.md +216 -216
  27. package/kit/agents/workflow-generator.md +537 -167
  28. package/kit/commands/adicionar-backlog.md +1 -1
  29. package/kit/commands/adicionar-fase.md +1 -1
  30. package/kit/commands/adicionar-tarefa.md +1 -1
  31. package/kit/commands/auditar-observabilidade.md +103 -103
  32. package/kit/commands/auditar-toil.md +129 -129
  33. package/kit/commands/caracterizar-prompt.md +195 -195
  34. package/kit/commands/criar-workflow.md +158 -158
  35. package/kit/commands/definir-perfil.md +1 -1
  36. package/kit/commands/definir-slo.md +108 -108
  37. package/kit/commands/fio.md +1 -1
  38. package/kit/commands/golden-signals.md +142 -142
  39. package/kit/commands/instrumentar-fase.md +200 -200
  40. package/kit/commands/investigar-producao.md +162 -162
  41. package/kit/commands/observabilidade.md +118 -118
  42. package/kit/commands/postmortem.md +179 -179
  43. package/kit/commands/prr.md +205 -205
  44. package/kit/commands/publicar-rapido.md +207 -207
  45. package/kit/commands/risk-budget.md +220 -220
  46. package/kit/commands/sre.md +230 -230
  47. package/kit/file-manifest.json +424 -424
  48. package/kit/framework/references/output-style.md +22 -22
  49. package/kit/hooks/post-apply-migration.js +199 -199
  50. package/kit/hooks/sidecar-tool-publisher.js +210 -210
  51. package/kit/skills/_shared-dados-distribuidos/glossary.md +224 -224
  52. package/kit/skills/_shared-legacy/glossary.md +389 -389
  53. package/kit/skills/_shared-multi-tenant/glossary.md +186 -186
  54. package/kit/skills/_shared-observability/glossary.md +396 -396
  55. package/kit/skills/_shared-sre/glossary.md +712 -712
  56. package/kit/skills/_shared-supabase/glossary.md +234 -234
  57. package/kit/skills/blameless-postmortems/SKILL.md +340 -340
  58. package/kit/skills/burn-rate-alerting/SKILL.md +258 -258
  59. package/kit/skills/cascading-failures/SKILL.md +311 -311
  60. package/kit/skills/core-analysis-loop/SKILL.md +352 -352
  61. package/kit/skills/distributed-tracing/SKILL.md +362 -362
  62. package/kit/skills/dynamic-workflow-authoring/SKILL.md +327 -223
  63. package/kit/skills/eliminating-toil/SKILL.md +243 -243
  64. package/kit/skills/event-based-slos/SKILL.md +296 -296
  65. package/kit/skills/four-golden-signals/SKILL.md +314 -314
  66. package/kit/skills/hermetic-builds/SKILL.md +323 -323
  67. package/kit/skills/legacy-monster-methods/SKILL.md +444 -444
  68. package/kit/skills/llm-as-dependency/SKILL.md +436 -436
  69. package/kit/skills/load-shedding-graceful-degradation/SKILL.md +396 -396
  70. package/kit/skills/observability-driven-development/SKILL.md +315 -315
  71. package/kit/skills/observability-maturity-model/SKILL.md +222 -222
  72. package/kit/skills/opentelemetry-standard/SKILL.md +351 -351
  73. package/kit/skills/production-readiness-review/SKILL.md +305 -305
  74. package/kit/skills/release-engineering/SKILL.md +367 -367
  75. package/kit/skills/retry-strategies/SKILL.md +372 -372
  76. package/kit/skills/sre-risk-management/SKILL.md +221 -221
  77. package/kit/skills/structured-events/SKILL.md +265 -265
  78. package/kit/skills/supabase-cron-queues/SKILL.md +275 -275
  79. package/kit/skills/supabase-database-functions/SKILL.md +332 -332
  80. package/kit/skills/supabase-declarative-schema/SKILL.md +183 -183
  81. package/kit/skills/supabase-pgvector-rag/SKILL.md +253 -253
  82. package/kit/skills/supabase-postgres-style/SKILL.md +138 -138
  83. package/kit/skills/supabase-storage/SKILL.md +234 -234
  84. package/kit/skills/telemetry-pipelines/SKILL.md +259 -259
  85. package/kit/skills/telemetry-sampling/SKILL.md +256 -256
  86. package/kit/skills/ui-anti-padroes-ia/SKILL.md +261 -261
  87. package/kit/skills/ui-contexto-produto/SKILL.md +248 -248
  88. package/kit/skills/ui-cor-estrategia/SKILL.md +213 -213
  89. package/kit/skills/ui-critica-auditoria/SKILL.md +260 -260
  90. package/kit/skills/ui-motion-funcional/SKILL.md +264 -264
  91. package/kit/skills/ui-ritmo-espacial/SKILL.md +259 -259
  92. package/kit/skills/ui-tipografia/SKILL.md +211 -211
  93. package/package.json +1 -1
  94. package/src/cli/index.js +1114 -1114
  95. package/src/cli/render.js +194 -194
  96. package/src/cli/upgrade-check.js +135 -135
  97. package/src/core/error-redaction.js +76 -76
  98. package/src/core/failures.js +153 -153
  99. package/src/core/gate-runner.js +205 -205
  100. package/src/core/gates.js +82 -82
  101. package/src/core/logger.js +170 -170
  102. package/src/core/manifest-verify.js +174 -174
  103. package/src/core/metrics.js +268 -268
  104. package/src/core/notify.js +60 -60
  105. package/src/core/path-safety.js +141 -141
  106. package/src/core/replays.js +120 -120
  107. package/src/core/ui.js +185 -185
  108. package/src/mcp-server/install.js +149 -149
  109. package/src/mcp-server/roots.js +124 -124
  110. package/src/ui/auto-spawn.js +113 -113
  111. package/src/ui/browser.js +78 -78
  112. package/src/ui/client.js +130 -130
  113. package/src/ui/events.js +65 -65
  114. package/src/ui/lockfile.js +191 -191
  115. package/src/ui/port.js +67 -67
  116. package/src/ui/server.js +547 -547
  117. package/src/ui/wrapper.js +129 -129
@@ -1,264 +1,264 @@
1
- ---
2
- name: ui-motion-funcional
3
- description: Use ao adicionar animation/transition — motion comunica estado, nao decora. 150-200ms interacoes / 250-400ms layout. ease-out default. prefers-reduced-motion sempre. Sem auto-play e parallax.
4
- ---
5
-
6
- # UI — Motion Funcional
7
-
8
- ## Quando usar
9
-
10
- LLM carrega esta skill quando:
11
-
12
- - "Adicionar animation / transition / motion"
13
- - "Algo parece estático / sem vida"
14
- - "Confetti / celebration / delight moment"
15
- - "Page transition / route change"
16
- - Preenchendo Componentes/Regras com motion rules
17
-
18
- ## Regras absolutas
19
-
20
- **REGRA #1 (com propósito, não decorativo):** Motion existe para comunicar **mudança de estado** (loading → done, hidden → visible, focus, error). Decoração pura (parallax, auto-scrolling text, ambient bg motion) é proibida em produto, raramente justificada em marca.
21
-
22
- **REGRA #2 (duração por contexto):**
23
- - **Micro-interação** (hover, focus, button press): **100-150ms**
24
- - **Mudança de estado** (toggle, dropdown, popover open): **150-200ms**
25
- - **Layout shift** (modal open, drawer slide): **250-400ms**
26
- - **Page transition**: **300-400ms** max
27
- - **Celebration** (confetti, hero entrance): **600-800ms** com justificativa, 1 vez
28
-
29
- Duração > 500ms em interação = lento. < 100ms = imperceptível, sem valor.
30
-
31
- **REGRA #3 (easing canônico):**
32
- - **Padrão**: `ease-out` ou `cubic-bezier(0.2, 0.8, 0.2, 1)` (entry rápido, settle suave)
33
- - **Exit/dismiss**: `ease-in` aceitável para "remover do palco"
34
- - **Layout shifts**: `cubic-bezier(0.4, 0, 0.2, 1)` (Material standard)
35
- - **PROIBIDO em produto**: `bounce`, `elastic`, `back` easings — playful demais para uso funcional
36
-
37
- **REGRA #4 (prefers-reduced-motion sempre):** Toda animation tem fallback estático.
38
-
39
- **REGRA #5 (no layout thrash):** Anime apenas `transform` + `opacity`. Nunca anime `width`, `height`, `top`, `left`, `padding` em hot path. Use `transform: translate3d()` + `scale()`.
40
-
41
- ## Patterns canônicos
42
-
43
- ### Micro-interação (button hover)
44
-
45
- ```css
46
- .button {
47
- transition: background-color 150ms ease-out, transform 150ms ease-out;
48
- }
49
- .button:hover {
50
- background-color: var(--primary-hover);
51
- }
52
- .button:active {
53
- transform: translateY(1px); /* sutil press-down */
54
- }
55
-
56
- @media (prefers-reduced-motion: reduce) {
57
- .button { transition: none; }
58
- }
59
- ```
60
-
61
- ### Dropdown / Popover open
62
-
63
- ```tsx
64
- // Framer Motion
65
- <motion.div
66
- initial={{ opacity: 0, y: -8 }}
67
- animate={{ opacity: 1, y: 0 }}
68
- exit={{ opacity: 0, y: -8 }}
69
- transition={{ duration: 0.18, ease: [0.2, 0.8, 0.2, 1] }}
70
- >
71
- {/* content */}
72
- </motion.div>
73
-
74
- // Tailwind / CSS only
75
- className="data-[state=open]:animate-in data-[state=open]:fade-in-0
76
- data-[state=open]:slide-in-from-top-1
77
- data-[state=closed]:animate-out data-[state=closed]:fade-out-0
78
- data-[state=closed]:slide-out-to-top-1
79
- duration-200 ease-out"
80
- ```
81
-
82
- ### Modal / Dialog
83
-
84
- ```tsx
85
- // Mobile: slide-from-bottom (sheet)
86
- // Desktop: scale central + fade
87
-
88
- className="
89
- /* mobile */
90
- data-[state=open]:animate-in data-[state=open]:slide-in-from-bottom
91
- data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom
92
- /* desktop */
93
- sm:data-[state=open]:zoom-in-95 sm:data-[state=closed]:zoom-out-95
94
- sm:data-[state=open]:fade-in-0 sm:data-[state=closed]:fade-out-0
95
- /* timing */
96
- duration-300 ease-out
97
- "
98
- ```
99
-
100
- ### Layout state transitions
101
-
102
- ```tsx
103
- // Lista que filtra: AnimatePresence + layout
104
- <AnimatePresence mode="popLayout">
105
- {items.map(item => (
106
- <motion.div
107
- key={item.id}
108
- layout
109
- initial={{ opacity: 0, scale: 0.95 }}
110
- animate={{ opacity: 1, scale: 1 }}
111
- exit={{ opacity: 0, scale: 0.95 }}
112
- transition={{ duration: 0.2, ease: 'easeOut' }}
113
- >
114
- {item.label}
115
- </motion.div>
116
- ))}
117
- </AnimatePresence>
118
- ```
119
-
120
- ### Loading state (skeleton + transition)
121
-
122
- ```tsx
123
- {loading ? (
124
- <Skeleton className="h-24 animate-pulse" />
125
- ) : (
126
- <motion.div
127
- initial={{ opacity: 0 }}
128
- animate={{ opacity: 1 }}
129
- transition={{ duration: 0.15 }}
130
- >
131
- {data}
132
- </motion.div>
133
- )}
134
- ```
135
-
136
- ### Celebration (use 1× por flow, justificado)
137
-
138
- ```tsx
139
- // Onboarding: primeiro check-in completado
140
- import confetti from 'canvas-confetti'
141
-
142
- useEffect(() => {
143
- if (justCompleted) {
144
- confetti({
145
- particleCount: 80,
146
- spread: 60,
147
- origin: { y: 0.4 },
148
- colors: [primaryColor, foregroundColor], // brand-tinted, não rainbow
149
- disableForReducedMotion: true,
150
- })
151
- }
152
- }, [justCompleted])
153
- ```
154
-
155
- Critérios para usar confetti:
156
- 1. Evento raro (não toast comum)
157
- 2. Sucesso significativo (não "saved successfully" trivial)
158
- 3. Cores da marca (não default rainbow)
159
- 4. `disableForReducedMotion: true`
160
- 5. Não bloqueia interação subsequente
161
-
162
- ## Anti-patterns
163
-
164
- ### Anti-pattern 1: bounce easing em produto
165
-
166
- **Errado:**
167
- ```css
168
- .dropdown {
169
- transition: transform 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55); /* bounce */
170
- }
171
- ```
172
-
173
- **Por quê:** Q08 — bounce em interação comum = playful demais, perde profissionalismo em context dashboard.
174
-
175
- **Certo:** `ease-out` ou `cubic-bezier(0.2, 0.8, 0.2, 1)`.
176
-
177
- ### Anti-pattern 2: motion em decoração de bg
178
-
179
- **Errado:** SVG floating shapes orbitando hero em background, animação infinita.
180
-
181
- **Por quê:** REGRA #1 — decoração sem propósito + drena GPU + viewport battery + distrai do conteúdo.
182
-
183
- **Certo:** static. Ou movimento triggerado por scroll JÁ engajado (parallax leve, max -10% translate), nunca infinito.
184
-
185
- ### Anti-pattern 3: animar `height` ou `width` em accordion
186
-
187
- **Errado:**
188
- ```css
189
- .accordion-content {
190
- transition: height 300ms;
191
- }
192
- .accordion-content.open { height: auto; } /* além de quebrar transition, layout thrash */
193
- ```
194
-
195
- **Por quê:** REGRA #5 — height/width disparam reflow + paint, queda de fps em mobile.
196
-
197
- **Certo:** anime `transform: scaleY` ou `max-height` + `clip-path`. Ou use lib (Radix Accordion) que faz right.
198
-
199
- ### Anti-pattern 4: page transition longa
200
-
201
- **Errado:** route change com fade out 600ms + fade in 600ms = 1.2s de tela vazia.
202
-
203
- **Por quê:** REGRA #2 — user percebe app lento. App nativo bom = transição instantânea ou < 300ms.
204
-
205
- **Certo:** 200ms fade out + 200ms fade in, OU cross-fade overlap 250ms total.
206
-
207
- ### Anti-pattern 5: ignorar prefers-reduced-motion
208
-
209
- **Errado:**
210
- ```tsx
211
- <motion.div animate={{ x: [0, 100, 0] }} transition={{ repeat: Infinity }} />
212
- ```
213
-
214
- **Por quê:** REGRA #4 — users com vestibular disorder ou enxaqueca + usuários com bateria fraca + corporate machines.
215
-
216
- **Certo:**
217
- ```tsx
218
- const shouldReduceMotion = useReducedMotion()
219
- <motion.div
220
- animate={shouldReduceMotion ? {} : { x: [0, 100, 0] }}
221
- transition={{ repeat: shouldReduceMotion ? 0 : Infinity }}
222
- />
223
- ```
224
-
225
- ### Anti-pattern 6: auto-play hero video sem controle
226
-
227
- **Errado:** `<video autoPlay loop muted playsInline>` em hero, 5MB+, sem botão pausar.
228
-
229
- **Por quê:** Acessibilidade + bateria + bandwidth. Tem que existir pause/control visível e respeitar prefers-reduced-motion (pausa default).
230
-
231
- **Certo:**
232
- ```tsx
233
- <video
234
- ref={videoRef}
235
- autoPlay={!prefersReducedMotion}
236
- loop muted playsInline
237
- poster="/hero-static.jpg"
238
- />
239
- <button onClick={togglePlay} aria-label="Toggle video">…</button>
240
- ```
241
-
242
- ## Detecção
243
-
244
- ```bash
245
- # Bounce/elastic easing
246
- grep -rnE "bounce|cubic-bezier\(0\.68|elastic" src --include="*.css" --include="*.tsx" 2>/dev/null
247
-
248
- # Animação > 500ms em interação
249
- grep -rnE "duration-(700|1000|1500|2000)\b|duration:\s*(700|800|1000|1500)" src --include="*.tsx" --include="*.css" 2>/dev/null
250
-
251
- # Layout-thrashing animations
252
- grep -rnE "transition.*width|transition.*height|transition.*top|transition.*left|transition.*padding|transition.*margin" src --include="*.css" 2>/dev/null
253
-
254
- # Falta de prefers-reduced-motion handler
255
- grep -rln "framer-motion\|animate=" src --include="*.tsx" 2>/dev/null | while read f; do
256
- grep -q "useReducedMotion\|prefers-reduced-motion" "$f" || echo "$f: motion sem reduce handler"
257
- done
258
- ```
259
-
260
- ## Ver também
261
-
262
- - [ui-anti-padroes-ia](../ui-anti-padroes-ia/SKILL.md) — Q08 (bounce easing)
263
- - [ui-contexto-produto](../ui-contexto-produto/SKILL.md) — sensibilidade a motion em MARCA.md
264
- - WCAG SC 2.3.3 Animation from Interactions: https://www.w3.org/WAI/WCAG21/Understanding/animation-from-interactions
1
+ ---
2
+ name: ui-motion-funcional
3
+ description: Use ao adicionar animation/transition — motion comunica estado, nao decora. 150-200ms interacoes / 250-400ms layout. ease-out default. prefers-reduced-motion sempre. Sem auto-play e parallax.
4
+ ---
5
+
6
+ # UI — Motion Funcional
7
+
8
+ ## Quando usar
9
+
10
+ LLM carrega esta skill quando:
11
+
12
+ - "Adicionar animation / transition / motion"
13
+ - "Algo parece estático / sem vida"
14
+ - "Confetti / celebration / delight moment"
15
+ - "Page transition / route change"
16
+ - Preenchendo Componentes/Regras com motion rules
17
+
18
+ ## Regras absolutas
19
+
20
+ **REGRA #1 (com propósito, não decorativo):** Motion existe para comunicar **mudança de estado** (loading → done, hidden → visible, focus, error). Decoração pura (parallax, auto-scrolling text, ambient bg motion) é proibida em produto, raramente justificada em marca.
21
+
22
+ **REGRA #2 (duração por contexto):**
23
+ - **Micro-interação** (hover, focus, button press): **100-150ms**
24
+ - **Mudança de estado** (toggle, dropdown, popover open): **150-200ms**
25
+ - **Layout shift** (modal open, drawer slide): **250-400ms**
26
+ - **Page transition**: **300-400ms** max
27
+ - **Celebration** (confetti, hero entrance): **600-800ms** com justificativa, 1 vez
28
+
29
+ Duração > 500ms em interação = lento. < 100ms = imperceptível, sem valor.
30
+
31
+ **REGRA #3 (easing canônico):**
32
+ - **Padrão**: `ease-out` ou `cubic-bezier(0.2, 0.8, 0.2, 1)` (entry rápido, settle suave)
33
+ - **Exit/dismiss**: `ease-in` aceitável para "remover do palco"
34
+ - **Layout shifts**: `cubic-bezier(0.4, 0, 0.2, 1)` (Material standard)
35
+ - **PROIBIDO em produto**: `bounce`, `elastic`, `back` easings — playful demais para uso funcional
36
+
37
+ **REGRA #4 (prefers-reduced-motion sempre):** Toda animation tem fallback estático.
38
+
39
+ **REGRA #5 (no layout thrash):** Anime apenas `transform` + `opacity`. Nunca anime `width`, `height`, `top`, `left`, `padding` em hot path. Use `transform: translate3d()` + `scale()`.
40
+
41
+ ## Patterns canônicos
42
+
43
+ ### Micro-interação (button hover)
44
+
45
+ ```css
46
+ .button {
47
+ transition: background-color 150ms ease-out, transform 150ms ease-out;
48
+ }
49
+ .button:hover {
50
+ background-color: var(--primary-hover);
51
+ }
52
+ .button:active {
53
+ transform: translateY(1px); /* sutil press-down */
54
+ }
55
+
56
+ @media (prefers-reduced-motion: reduce) {
57
+ .button { transition: none; }
58
+ }
59
+ ```
60
+
61
+ ### Dropdown / Popover open
62
+
63
+ ```tsx
64
+ // Framer Motion
65
+ <motion.div
66
+ initial={{ opacity: 0, y: -8 }}
67
+ animate={{ opacity: 1, y: 0 }}
68
+ exit={{ opacity: 0, y: -8 }}
69
+ transition={{ duration: 0.18, ease: [0.2, 0.8, 0.2, 1] }}
70
+ >
71
+ {/* content */}
72
+ </motion.div>
73
+
74
+ // Tailwind / CSS only
75
+ className="data-[state=open]:animate-in data-[state=open]:fade-in-0
76
+ data-[state=open]:slide-in-from-top-1
77
+ data-[state=closed]:animate-out data-[state=closed]:fade-out-0
78
+ data-[state=closed]:slide-out-to-top-1
79
+ duration-200 ease-out"
80
+ ```
81
+
82
+ ### Modal / Dialog
83
+
84
+ ```tsx
85
+ // Mobile: slide-from-bottom (sheet)
86
+ // Desktop: scale central + fade
87
+
88
+ className="
89
+ /* mobile */
90
+ data-[state=open]:animate-in data-[state=open]:slide-in-from-bottom
91
+ data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom
92
+ /* desktop */
93
+ sm:data-[state=open]:zoom-in-95 sm:data-[state=closed]:zoom-out-95
94
+ sm:data-[state=open]:fade-in-0 sm:data-[state=closed]:fade-out-0
95
+ /* timing */
96
+ duration-300 ease-out
97
+ "
98
+ ```
99
+
100
+ ### Layout state transitions
101
+
102
+ ```tsx
103
+ // Lista que filtra: AnimatePresence + layout
104
+ <AnimatePresence mode="popLayout">
105
+ {items.map(item => (
106
+ <motion.div
107
+ key={item.id}
108
+ layout
109
+ initial={{ opacity: 0, scale: 0.95 }}
110
+ animate={{ opacity: 1, scale: 1 }}
111
+ exit={{ opacity: 0, scale: 0.95 }}
112
+ transition={{ duration: 0.2, ease: 'easeOut' }}
113
+ >
114
+ {item.label}
115
+ </motion.div>
116
+ ))}
117
+ </AnimatePresence>
118
+ ```
119
+
120
+ ### Loading state (skeleton + transition)
121
+
122
+ ```tsx
123
+ {loading ? (
124
+ <Skeleton className="h-24 animate-pulse" />
125
+ ) : (
126
+ <motion.div
127
+ initial={{ opacity: 0 }}
128
+ animate={{ opacity: 1 }}
129
+ transition={{ duration: 0.15 }}
130
+ >
131
+ {data}
132
+ </motion.div>
133
+ )}
134
+ ```
135
+
136
+ ### Celebration (use 1× por flow, justificado)
137
+
138
+ ```tsx
139
+ // Onboarding: primeiro check-in completado
140
+ import confetti from 'canvas-confetti'
141
+
142
+ useEffect(() => {
143
+ if (justCompleted) {
144
+ confetti({
145
+ particleCount: 80,
146
+ spread: 60,
147
+ origin: { y: 0.4 },
148
+ colors: [primaryColor, foregroundColor], // brand-tinted, não rainbow
149
+ disableForReducedMotion: true,
150
+ })
151
+ }
152
+ }, [justCompleted])
153
+ ```
154
+
155
+ Critérios para usar confetti:
156
+ 1. Evento raro (não toast comum)
157
+ 2. Sucesso significativo (não "saved successfully" trivial)
158
+ 3. Cores da marca (não default rainbow)
159
+ 4. `disableForReducedMotion: true`
160
+ 5. Não bloqueia interação subsequente
161
+
162
+ ## Anti-patterns
163
+
164
+ ### Anti-pattern 1: bounce easing em produto
165
+
166
+ **Errado:**
167
+ ```css
168
+ .dropdown {
169
+ transition: transform 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55); /* bounce */
170
+ }
171
+ ```
172
+
173
+ **Por quê:** Q08 — bounce em interação comum = playful demais, perde profissionalismo em context dashboard.
174
+
175
+ **Certo:** `ease-out` ou `cubic-bezier(0.2, 0.8, 0.2, 1)`.
176
+
177
+ ### Anti-pattern 2: motion em decoração de bg
178
+
179
+ **Errado:** SVG floating shapes orbitando hero em background, animação infinita.
180
+
181
+ **Por quê:** REGRA #1 — decoração sem propósito + drena GPU + viewport battery + distrai do conteúdo.
182
+
183
+ **Certo:** static. Ou movimento triggerado por scroll JÁ engajado (parallax leve, max -10% translate), nunca infinito.
184
+
185
+ ### Anti-pattern 3: animar `height` ou `width` em accordion
186
+
187
+ **Errado:**
188
+ ```css
189
+ .accordion-content {
190
+ transition: height 300ms;
191
+ }
192
+ .accordion-content.open { height: auto; } /* além de quebrar transition, layout thrash */
193
+ ```
194
+
195
+ **Por quê:** REGRA #5 — height/width disparam reflow + paint, queda de fps em mobile.
196
+
197
+ **Certo:** anime `transform: scaleY` ou `max-height` + `clip-path`. Ou use lib (Radix Accordion) que faz right.
198
+
199
+ ### Anti-pattern 4: page transition longa
200
+
201
+ **Errado:** route change com fade out 600ms + fade in 600ms = 1.2s de tela vazia.
202
+
203
+ **Por quê:** REGRA #2 — user percebe app lento. App nativo bom = transição instantânea ou < 300ms.
204
+
205
+ **Certo:** 200ms fade out + 200ms fade in, OU cross-fade overlap 250ms total.
206
+
207
+ ### Anti-pattern 5: ignorar prefers-reduced-motion
208
+
209
+ **Errado:**
210
+ ```tsx
211
+ <motion.div animate={{ x: [0, 100, 0] }} transition={{ repeat: Infinity }} />
212
+ ```
213
+
214
+ **Por quê:** REGRA #4 — users com vestibular disorder ou enxaqueca + usuários com bateria fraca + corporate machines.
215
+
216
+ **Certo:**
217
+ ```tsx
218
+ const shouldReduceMotion = useReducedMotion()
219
+ <motion.div
220
+ animate={shouldReduceMotion ? {} : { x: [0, 100, 0] }}
221
+ transition={{ repeat: shouldReduceMotion ? 0 : Infinity }}
222
+ />
223
+ ```
224
+
225
+ ### Anti-pattern 6: auto-play hero video sem controle
226
+
227
+ **Errado:** `<video autoPlay loop muted playsInline>` em hero, 5MB+, sem botão pausar.
228
+
229
+ **Por quê:** Acessibilidade + bateria + bandwidth. Tem que existir pause/control visível e respeitar prefers-reduced-motion (pausa default).
230
+
231
+ **Certo:**
232
+ ```tsx
233
+ <video
234
+ ref={videoRef}
235
+ autoPlay={!prefersReducedMotion}
236
+ loop muted playsInline
237
+ poster="/hero-static.jpg"
238
+ />
239
+ <button onClick={togglePlay} aria-label="Toggle video">…</button>
240
+ ```
241
+
242
+ ## Detecção
243
+
244
+ ```bash
245
+ # Bounce/elastic easing
246
+ grep -rnE "bounce|cubic-bezier\(0\.68|elastic" src --include="*.css" --include="*.tsx" 2>/dev/null
247
+
248
+ # Animação > 500ms em interação
249
+ grep -rnE "duration-(700|1000|1500|2000)\b|duration:\s*(700|800|1000|1500)" src --include="*.tsx" --include="*.css" 2>/dev/null
250
+
251
+ # Layout-thrashing animations
252
+ grep -rnE "transition.*width|transition.*height|transition.*top|transition.*left|transition.*padding|transition.*margin" src --include="*.css" 2>/dev/null
253
+
254
+ # Falta de prefers-reduced-motion handler
255
+ grep -rln "framer-motion\|animate=" src --include="*.tsx" 2>/dev/null | while read f; do
256
+ grep -q "useReducedMotion\|prefers-reduced-motion" "$f" || echo "$f: motion sem reduce handler"
257
+ done
258
+ ```
259
+
260
+ ## Ver também
261
+
262
+ - [ui-anti-padroes-ia](../ui-anti-padroes-ia/SKILL.md) — Q08 (bounce easing)
263
+ - [ui-contexto-produto](../ui-contexto-produto/SKILL.md) — sensibilidade a motion em MARCA.md
264
+ - WCAG SC 2.3.3 Animation from Interactions: https://www.w3.org/WAI/WCAG21/Understanding/animation-from-interactions