sinapse-ai 9.3.0 → 9.4.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 (192) hide show
  1. package/.claude/CLAUDE.md +56 -343
  2. package/.claude/rules/agent-authority.md +6 -0
  3. package/.claude/rules/agent-handoff.md +5 -0
  4. package/.claude/rules/cross-squad-routing.md +5 -0
  5. package/.claude/rules/hook-governance.md +6 -0
  6. package/.claude/rules/mcp-usage.md +3 -1
  7. package/.claude/rules/safe-collaboration.md +10 -0
  8. package/.claude/rules/security-data-protection.md +9 -0
  9. package/.claude/rules/squad-awareness.md +3 -1
  10. package/.claude/rules/tool-examples.md +6 -0
  11. package/.claude/rules/workflow-execution.md +7 -0
  12. package/.codex/agents/analyst.md +253 -72
  13. package/.codex/agents/architect.md +455 -68
  14. package/.codex/agents/data-engineer.md +492 -106
  15. package/.codex/agents/developer.md +560 -0
  16. package/.codex/agents/devops.md +518 -69
  17. package/.codex/agents/product-lead.md +335 -0
  18. package/.codex/agents/project-lead.md +377 -0
  19. package/.codex/agents/quality-gate.md +449 -0
  20. package/.codex/agents/sinapse-orqx.md +9 -7
  21. package/.codex/agents/sprint-lead.md +287 -0
  22. package/.codex/agents/squad-creator.md +344 -0
  23. package/.codex/agents/ux-design-expert.md +495 -0
  24. package/.codex/delegation-matrix.json +756 -44
  25. package/.codex/handoff-packet.schema.json +30 -6
  26. package/.sinapse-ai/data/entity-registry.yaml +175 -363
  27. package/.sinapse-ai/data/registry-update-log.jsonl +16 -0
  28. package/.sinapse-ai/development/agents/analyst.md +90 -0
  29. package/.sinapse-ai/development/agents/architect.md +73 -0
  30. package/.sinapse-ai/development/agents/developer.md +69 -0
  31. package/.sinapse-ai/development/agents/devops.md +117 -0
  32. package/.sinapse-ai/development/agents/quality-gate.md +85 -0
  33. package/.sinapse-ai/development/checklists/agent-quality-gate.md +27 -0
  34. package/.sinapse-ai/development/checklists/brownfield-compatibility-checklist.md +20 -0
  35. package/.sinapse-ai/development/checklists/code-review-checklist.md +106 -0
  36. package/.sinapse-ai/development/checklists/issue-triage-checklist.md +9 -0
  37. package/.sinapse-ai/development/checklists/memory-audit-checklist.md +16 -0
  38. package/.sinapse-ai/development/checklists/pr-quality-checklist.md +72 -0
  39. package/.sinapse-ai/development/checklists/security-deployment-checklist.md +54 -0
  40. package/.sinapse-ai/development/checklists/self-critique-checklist.md +19 -1
  41. package/.sinapse-ai/development/skills/debug.md +57 -0
  42. package/.sinapse-ai/development/skills/fast-review.md +69 -0
  43. package/.sinapse-ai/development/skills/research-synthesis.md +77 -0
  44. package/.sinapse-ai/development/skills/security-scan.md +73 -0
  45. package/.sinapse-ai/development/skills/verify.md +53 -0
  46. package/.sinapse-ai/development/templates/squad/agent-template.md +17 -4
  47. package/.sinapse-ai/development/templates/squad/checklist-template.md +13 -5
  48. package/.sinapse-ai/development/templates/squad/task-template.md +7 -0
  49. package/.sinapse-ai/development/templates/squad/workflow-template.yaml +7 -0
  50. package/.sinapse-ai/development/workflows/fast-track.yaml +87 -0
  51. package/.sinapse-ai/infrastructure/scripts/validate-codex-delegation.js +3 -1
  52. package/.sinapse-ai/install-manifest.yaml +71 -35
  53. package/docs/codex-integration-process.md +22 -0
  54. package/docs/codex-parity-program.md +27 -0
  55. package/docs/ide-integration.md +36 -0
  56. package/package.json +1 -1
  57. package/squads/claude-code-mastery/knowledge-base/claude-code-internals-reference.md +927 -0
  58. package/squads/squad-brand/knowledge-base/archetype-brand-mapping.md +12 -1
  59. package/squads/squad-brand/knowledge-base/brand-activism-cultural-branding.md +216 -0
  60. package/squads/squad-brand/knowledge-base/brand-audit-criteria.md +58 -0
  61. package/squads/squad-brand/knowledge-base/brand-digital-strategy.md +188 -0
  62. package/squads/squad-brand/knowledge-base/brand-legal-ip.md +222 -0
  63. package/squads/squad-brand/knowledge-base/brand-naming-framework.md +163 -0
  64. package/squads/squad-brand/knowledge-base/branding-master-reference.md +1001 -0
  65. package/squads/squad-brand/knowledge-base/color-psychology.md +25 -12
  66. package/squads/squad-brand/knowledge-base/employer-personal-branding.md +206 -0
  67. package/squads/squad-brand/knowledge-base/routing-catalog.md +34 -0
  68. package/squads/squad-brand/knowledge-base/sonic-branding-principles.md +6 -1
  69. package/squads/squad-brand/knowledge-base/typography-personality.md +34 -0
  70. package/squads/squad-claude/knowledge-base/context-window-optimization.md +334 -0
  71. package/squads/squad-claude/knowledge-base/knowledge-architecture-reference.md +403 -0
  72. package/squads/squad-claude/knowledge-base/memory-systems-reference.md +412 -0
  73. package/squads/squad-claude/knowledge-base/obsidian-claude-integration.md +423 -0
  74. package/squads/squad-claude/knowledge-base/retrieval-augmented-generation.md +320 -0
  75. package/squads/squad-claude/knowledge-base/skill-creation-patterns.md +380 -0
  76. package/squads/squad-claude/knowledge-base/swarm-orchestration-patterns.md +411 -0
  77. package/squads/squad-cloning/knowledge-base/clone-quality-assurance.md +211 -0
  78. package/squads/squad-cloning/knowledge-base/confidence-scoring.md +51 -0
  79. package/squads/squad-cloning/knowledge-base/cross-squad-deployment.md +47 -0
  80. package/squads/squad-cloning/knowledge-base/ethical-guidelines.md +237 -0
  81. package/squads/squad-cloning/knowledge-base/knowledge-graph-for-clones.md +295 -0
  82. package/squads/squad-cloning/knowledge-base/memory-architecture-for-clones.md +229 -0
  83. package/squads/squad-cloning/knowledge-base/multi-agent-deployment-patterns.md +320 -0
  84. package/squads/squad-cloning/knowledge-base/skill-standard-for-clones.md +262 -0
  85. package/squads/squad-cloning/knowledge-base/sop-extraction-guide.md +243 -0
  86. package/squads/squad-commercial/knowledge-base/account-based-selling.md +206 -0
  87. package/squads/squad-commercial/knowledge-base/ai-as-competitive-infrastructure.md +14 -0
  88. package/squads/squad-commercial/knowledge-base/ai-in-sales.md +199 -0
  89. package/squads/squad-commercial/knowledge-base/brazilian-sales-context.md +195 -0
  90. package/squads/squad-commercial/knowledge-base/customer-success-operations.md +83 -2
  91. package/squads/squad-commercial/knowledge-base/prospecting-pipeline-generation.md +69 -0
  92. package/squads/squad-commercial/knowledge-base/sales-enablement-playbook.md +260 -0
  93. package/squads/squad-commercial/knowledge-base/sales-methodology-comparison.md +185 -0
  94. package/squads/squad-commercial/knowledge-base/sales-revenue-master-reference.md +1123 -0
  95. package/squads/squad-content/knowledge-base/brazilian-content-context.md +176 -0
  96. package/squads/squad-content/knowledge-base/competitor-analysis-methods.md +40 -1
  97. package/squads/squad-content/knowledge-base/content-architecture-taxonomy.md +206 -0
  98. package/squads/squad-content/knowledge-base/content-formats-encyclopedia.md +58 -1
  99. package/squads/squad-content/knowledge-base/content-references-bibliography.md +130 -0
  100. package/squads/squad-content/knowledge-base/content-strategy-master-reference.md +1097 -0
  101. package/squads/squad-content/knowledge-base/content-tech-stack.md +150 -0
  102. package/squads/squad-content/knowledge-base/copywriting-formulas-library.md +188 -0
  103. package/squads/squad-content/knowledge-base/email-newsletter-strategy.md +161 -0
  104. package/squads/squad-content/knowledge-base/platform-algorithm-intelligence.md +86 -1
  105. package/squads/squad-content/knowledge-base/social-algorithms-master-reference.md +1007 -0
  106. package/squads/squad-content/knowledge-base/video-audio-content-playbook.md +218 -0
  107. package/squads/squad-copy/knowledge-base/ai-copy-production.md +254 -0
  108. package/squads/squad-copy/knowledge-base/brazilian-copywriting-context.md +242 -0
  109. package/squads/squad-copy/knowledge-base/email-copywriting-system.md +299 -0
  110. package/squads/squad-copy/knowledge-base/landing-page-copy-architecture.md +267 -0
  111. package/squads/squad-copy/knowledge-base/power-words-catalog.md +205 -0
  112. package/squads/squad-copy/knowledge-base/seo-copywriting.md +255 -0
  113. package/squads/squad-copy/knowledge-base/video-script-copywriting.md +239 -0
  114. package/squads/squad-council/knowledge-base/brand-strategy-models.md +193 -0
  115. package/squads/squad-council/knowledge-base/growth-strategy-models.md +267 -0
  116. package/squads/squad-council/knowledge-base/innovation-disruption-frameworks.md +193 -0
  117. package/squads/squad-council/knowledge-base/market-analysis-frameworks.md +240 -0
  118. package/squads/squad-council/knowledge-base/organizational-leadership-models.md +212 -0
  119. package/squads/squad-council/knowledge-base/sales-strategy-models.md +215 -0
  120. package/squads/squad-courses/knowledge-base/course-launch-strategy.md +251 -0
  121. package/squads/squad-courses/knowledge-base/domain-advocacia-curriculum.md +385 -0
  122. package/squads/squad-courses/knowledge-base/domain-contabilidade-curriculum.md +266 -0
  123. package/squads/squad-courses/knowledge-base/platform-comparison.md +68 -0
  124. package/squads/squad-courses/knowledge-base/video-production-guide.md +70 -0
  125. package/squads/squad-cybersecurity/knowledge-base/cloud-security-reference.md +363 -0
  126. package/squads/squad-cybersecurity/knowledge-base/compliance-frameworks.md +273 -0
  127. package/squads/squad-cybersecurity/knowledge-base/database-security.md +438 -0
  128. package/squads/squad-cybersecurity/knowledge-base/incident-response-playbook.md +420 -0
  129. package/squads/squad-cybersecurity/knowledge-base/network-security-reference.md +477 -0
  130. package/squads/squad-cybersecurity/knowledge-base/penetration-testing-methodology.md +350 -0
  131. package/squads/squad-cybersecurity/knowledge-base/vulnerability-management.md +349 -0
  132. package/squads/squad-design/knowledge-base/brazilian-design-context.md +223 -0
  133. package/squads/squad-design/knowledge-base/component-api-patterns.md +208 -4
  134. package/squads/squad-design/knowledge-base/design-system-master-reference.md +1302 -0
  135. package/squads/squad-design/knowledge-base/design-systems-frameworks.md +91 -1
  136. package/squads/squad-design/knowledge-base/responsive-modern-css.md +96 -4
  137. package/squads/squad-design/knowledge-base/wcag-aria-reference.md +117 -5
  138. package/squads/squad-design/knowledge-base/web-performance-reference.md +127 -4
  139. package/squads/squad-finance/knowledge-base/brazilian-taxation.md +263 -0
  140. package/squads/squad-finance/knowledge-base/contabilidade-master-reference.md +998 -0
  141. package/squads/squad-finance/knowledge-base/finance-master-reference.md +946 -0
  142. package/squads/squad-finance/knowledge-base/financial-reporting-analysis.md +316 -0
  143. package/squads/squad-finance/knowledge-base/fintech-brazilian-context.md +242 -0
  144. package/squads/squad-finance/knowledge-base/fpa-planning-frameworks.md +286 -0
  145. package/squads/squad-finance/knowledge-base/ma-and-transactions.md +285 -0
  146. package/squads/squad-finance/knowledge-base/risk-management.md +233 -0
  147. package/squads/squad-finance/knowledge-base/startups-venture-capital.md +337 -0
  148. package/squads/squad-growth/knowledge-base/ai-growth-playbook.md +216 -0
  149. package/squads/squad-growth/knowledge-base/attribution-models.md +78 -0
  150. package/squads/squad-growth/knowledge-base/brazilian-growth-context.md +208 -0
  151. package/squads/squad-growth/knowledge-base/community-led-growth.md +175 -0
  152. package/squads/squad-growth/knowledge-base/content-marketing-flywheel.md +190 -0
  153. package/squads/squad-growth/knowledge-base/email-lifecycle-framework.md +192 -0
  154. package/squads/squad-growth/knowledge-base/growth-frameworks-catalog.md +82 -0
  155. package/squads/squad-growth/knowledge-base/growth-master-reference.md +1168 -0
  156. package/squads/squad-growth/knowledge-base/routing-catalog.md +53 -11
  157. package/squads/squad-paidmedia/knowledge-base/audiences-segmentation-deep.md +285 -0
  158. package/squads/squad-paidmedia/knowledge-base/creative-strategy-deep.md +294 -0
  159. package/squads/squad-paidmedia/knowledge-base/google-ads-account-architecture.md +87 -0
  160. package/squads/squad-paidmedia/knowledge-base/meta-ads-campaign-architecture.md +76 -0
  161. package/squads/squad-paidmedia/knowledge-base/paid-media-metrics-reference.md +117 -0
  162. package/squads/squad-paidmedia/knowledge-base/paid-traffic-master-reference.md +1308 -0
  163. package/squads/squad-paidmedia/knowledge-base/routing-catalog.md +95 -18
  164. package/squads/squad-paidmedia/knowledge-base/traffic-masters-frameworks.md +71 -0
  165. package/squads/squad-product/knowledge-base/brazilian-product-context.md +284 -0
  166. package/squads/squad-product/knowledge-base/discovery-methodology-playbook.md +141 -0
  167. package/squads/squad-product/knowledge-base/pm-frameworks-reference.md +125 -9
  168. package/squads/squad-product/knowledge-base/product-analytics-formulas.md +72 -0
  169. package/squads/squad-product/knowledge-base/product-led-growth-reference.md +155 -13
  170. package/squads/squad-product/knowledge-base/product-market-fit-framework.md +222 -0
  171. package/squads/squad-product/knowledge-base/routing-catalog.md +32 -0
  172. package/squads/squad-research/knowledge-base/agentic-second-brain-reference.md +591 -0
  173. package/squads/squad-research/knowledge-base/ai-augmented-research.md +212 -0
  174. package/squads/squad-research/knowledge-base/brazilian-market-research-sources.md +197 -0
  175. package/squads/squad-research/knowledge-base/community-platforms-reference.md +786 -0
  176. package/squads/squad-research/knowledge-base/community-research-methods.md +194 -0
  177. package/squads/squad-research/knowledge-base/mixed-methods-research-design.md +168 -0
  178. package/squads/squad-research/knowledge-base/network-effects-analysis.md +192 -0
  179. package/squads/squad-research/knowledge-base/qualitative-research-deep-methods.md +202 -0
  180. package/squads/squad-research/knowledge-base/quantitative-research-methods.md +208 -0
  181. package/squads/squad-research/knowledge-base/research-frameworks-encyclopedia.md +40 -0
  182. package/squads/squad-research/knowledge-base/research-synthesis-frameworks.md +223 -0
  183. package/squads/squad-storytelling/knowledge-base/brand-mythology-framework.md +236 -0
  184. package/squads/squad-storytelling/knowledge-base/brazilian-storytelling-context.md +237 -0
  185. package/squads/squad-storytelling/knowledge-base/data-storytelling.md +232 -0
  186. package/squads/squad-storytelling/knowledge-base/improv-storytelling.md +226 -0
  187. package/squads/squad-storytelling/knowledge-base/persuasion-narrative-techniques.md +269 -0
  188. package/squads/squad-storytelling/knowledge-base/social-movement-narratives.md +191 -0
  189. package/squads/squad-storytelling/knowledge-base/video-storytelling.md +252 -0
  190. package/squads/claude-code-mastery/data/swarm-orchestration-patterns.yaml +0 -378
  191. package/squads/squad-animations/knowledge-base/framer-motion-complete-reference.md +0 -710
  192. package/squads/squad-animations/knowledge-base/web-animations-api-view-transitions.md +0 -478
@@ -315,7 +315,97 @@ class MyButton extends LitElement {
315
315
 
316
316
  ---
317
317
 
318
- ## 10. Personagens Fundadores
318
+ ## 10. Foundations — Tipografia, Spacing e Motion
319
+
320
+ ### Type Scale (Modular Scale)
321
+ **Tim Brown** (Adobe) popularizou o conceito de modular scale — tamanhos com relacao matematica:
322
+
323
+ | Razao | Nome | Valores (base 16px) | Uso |
324
+ |-------|------|---------------------|-----|
325
+ | 1.125 | Major Second | 14, 16, 18, 20, 23 | Interfaces densas |
326
+ | 1.200 | Minor Third | 13, 16, 19, 23, 28 | Padrao utilitario |
327
+ | 1.250 | Major Third | 13, 16, 20, 25, 31 | Equilibrado (mais comum) |
328
+ | 1.333 | Perfect Fourth | 12, 16, 21, 28, 38 | Expressivo |
329
+ | 1.500 | Perfect Fifth | 11, 16, 24, 36, 54 | Dramatico (landing pages) |
330
+
331
+ **Fluid Type (Utopia.fyi):** Elimina media queries para tipografia, interpolando com `clamp()`. Ver `responsive-modern-css.md` secao 11.
332
+
333
+ **Variable Fonts:** Um arquivo substitui 9+ arquivos estaticos. Inter Variable, Roboto Flex, Geist Variable sao os mais usados. Ver `responsive-modern-css.md` secao 12.
334
+
335
+ ### Grid de 4px / 8px (Padrao da Industria)
336
+ Base 4px e o padrao universal: Material Design, Tailwind CSS, Polaris, Carbon. Divide bem em qualquer device pixel ratio.
337
+
338
+ ```
339
+ Escala: 0, 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 80, 96px
340
+ ```
341
+
342
+ ### Motion Tokens (12 Principios de Animacao)
343
+ Baseado nos **12 principios de animacao da Disney** (Frank Thomas e Ollie Johnston, 1981). Para interfaces, os mais relevantes:
344
+
345
+ - **Easing:** Nada começa/para instantaneamente
346
+ - **Anticipation:** Sinalizar que algo vai acontecer
347
+ - **Follow-through:** Overshoot leve ao atingir destino
348
+
349
+ ```json
350
+ {
351
+ "motion": {
352
+ "duration": {
353
+ "instant": { "$value": "50ms", "$type": "duration" },
354
+ "fast": { "$value": "100ms", "$type": "duration" },
355
+ "normal": { "$value": "200ms", "$type": "duration" },
356
+ "slow": { "$value": "300ms", "$type": "duration" },
357
+ "slower": { "$value": "500ms", "$type": "duration" }
358
+ },
359
+ "easing": {
360
+ "default": { "$value": "cubic-bezier(0.4, 0, 0.2, 1)", "$type": "cubicBezier" },
361
+ "in": { "$value": "cubic-bezier(0.4, 0, 1, 1)", "$type": "cubicBezier" },
362
+ "out": { "$value": "cubic-bezier(0, 0, 0.2, 1)", "$type": "cubicBezier" },
363
+ "spring": { "$value": "cubic-bezier(0.175, 0.885, 0.32, 1.275)", "$type": "cubicBezier" }
364
+ }
365
+ }
366
+ }
367
+ ```
368
+
369
+ **Animation vocabulary (patterns de uso):**
370
+ | Pattern | Quando | Exemplos |
371
+ |---------|--------|---------|
372
+ | Fade | Aparecer/desaparecer sem mover | Tooltip, notification |
373
+ | Slide | Entrar de uma direcao | Drawer, panel, sheet |
374
+ | Scale | Crescer/diminuir | Modal opening, zoom |
375
+ | Spring | Fisica de mola | Drag and drop, pull to refresh |
376
+ | Stagger | Grupo em sequencia | List items, cards grid |
377
+
378
+ **Framer Motion (23K+ stars):**
379
+ ```tsx
380
+ import { motion, AnimatePresence } from 'framer-motion';
381
+
382
+ <AnimatePresence>
383
+ {isOpen && (
384
+ <motion.div
385
+ initial={{ opacity: 0, scale: 0.95, y: 20 }}
386
+ animate={{ opacity: 1, scale: 1, y: 0 }}
387
+ exit={{ opacity: 0, scale: 0.95, y: 20 }}
388
+ transition={{ type: 'spring', damping: 25, stiffness: 300 }}
389
+ >
390
+ {children}
391
+ </motion.div>
392
+ )}
393
+ </AnimatePresence>
394
+ ```
395
+
396
+ **Reduced Motion (acessibilidade obrigatoria):**
397
+ ```css
398
+ @media (prefers-reduced-motion: reduce) {
399
+ *, *::before, *::after {
400
+ animation-duration: 0.01ms !important;
401
+ transition-duration: 0.01ms !important;
402
+ }
403
+ }
404
+ ```
405
+
406
+ ---
407
+
408
+ ## 11. Personagens Fundadores
319
409
 
320
410
  | Pessoa | Contribuicao | Obra Principal |
321
411
  |--------|-------------|----------------|
@@ -557,9 +557,101 @@ border-left → border-inline-start
557
557
 
558
558
  ---
559
559
 
560
+ ---
561
+
562
+ ## 11. Fluid Typography — Utopia.fyi
563
+
564
+ **Utopia.fyi** (criado por James Gilyead e Trys Mudford) popularizou fluid type scales que interpolam suavemente entre breakpoints usando `clamp()`. Elimina media queries para tipografia.
565
+
566
+ ### Conceito
567
+ ```css
568
+ /* Tipografia fluida: interpola entre min e max baseado no viewport */
569
+ --font-size-body: clamp(1rem, 0.9rem + 0.45vw, 1.25rem);
570
+ /* min preferido max */
571
+ /* 16px escala com vw 20px */
572
+ ```
573
+
574
+ **Utopia scale completa (ex: 320px → 1440px):**
575
+ ```css
576
+ :root {
577
+ --step--1: clamp(0.75rem, 0.72rem + 0.14vw, 0.8125rem); /* ~12-13px */
578
+ --step-0: clamp(1rem, 0.9rem + 0.45vw, 1.25rem); /* 16-20px body */
579
+ --step-1: clamp(1.2rem, 1.02rem + 0.86vw, 1.6625rem); /* 19-27px */
580
+ --step-2: clamp(1.44rem, 1.14rem + 1.48vw, 2.215rem); /* 23-35px */
581
+ --step-3: clamp(1.728rem, 1.25rem + 2.39vw, 2.95rem); /* 28-47px */
582
+ --step-4: clamp(2.074rem, 1.33rem + 3.72vw, 3.934rem); /* 33-63px */
583
+ --step-5: clamp(2.488rem, 1.38rem + 5.54vw, 5.245rem); /* 40-84px */
584
+ }
585
+ ```
586
+
587
+ **Ferramenta:** utopia.fyi — gera escalas fluid customizadas com preview interativo.
588
+
589
+ ### Fluid Spacing (Utopia approach)
590
+ ```css
591
+ :root {
592
+ --space-3xs: clamp(0.25rem, 0.22rem + 0.14vw, 0.3125rem); /* 4-5px */
593
+ --space-2xs: clamp(0.5rem, 0.45rem + 0.23vw, 0.625rem); /* 8-10px */
594
+ --space-xs: clamp(0.75rem, 0.68rem + 0.36vw, 0.9375rem); /* 12-15px */
595
+ --space-sm: clamp(1rem, 0.9rem + 0.45vw, 1.25rem); /* 16-20px */
596
+ --space-md: clamp(1.5rem, 1.36rem + 0.68vw, 1.875rem); /* 24-30px */
597
+ --space-lg: clamp(2rem, 1.8rem + 0.91vw, 2.5rem); /* 32-40px */
598
+ --space-xl: clamp(3rem, 2.73rem + 1.36vw, 3.75rem); /* 48-60px */
599
+ --space-2xl: clamp(4rem, 3.64rem + 1.82vw, 5rem); /* 64-80px */
600
+ --space-3xl: clamp(6rem, 5.45rem + 2.73vw, 7.5rem); /* 96-120px */
601
+ }
602
+ ```
603
+
604
+ ---
605
+
606
+ ## 12. Variable Fonts
607
+
608
+ Fontes variaveis (OpenType variable fonts) interpolam entre multiplos eixos com **um unico arquivo**. Transformacional para design systems.
609
+
610
+ ### Eixos Comuns
611
+ | Eixo | Tag | Range Tipico | Efeito |
612
+ |------|-----|-------------|--------|
613
+ | Weight | `wght` | 100-900 | Espessura do traço |
614
+ | Width | `wdth` | 75-125% | Largura dos glifos |
615
+ | Slant | `slnt` | -15 a 0 | Inclinacao |
616
+ | Optical size | `opsz` | 8-144 | Ajuste para tamanho |
617
+ | Italic | `ital` | 0 ou 1 | On/off italic |
618
+
619
+ ### Uso em CSS
620
+ ```css
621
+ @font-face {
622
+ font-family: 'Inter Variable';
623
+ src: url('Inter-Variable.woff2') format('woff2-variations');
624
+ font-weight: 100 900; /* Range completo */
625
+ font-display: swap;
626
+ }
627
+
628
+ /* Uso granular — pesos nao-padrao possiveis */
629
+ .body { font-weight: 400; }
630
+ .medium { font-weight: 500; }
631
+ .semibold{ font-weight: 600; }
632
+ .fine { font-weight: 350; } /* Impossivel com fontes estaticas */
633
+ ```
634
+
635
+ ### Fontes Variaveis Populares para Interfaces
636
+ | Fonte | Criador | Uso |
637
+ |-------|---------|-----|
638
+ | **Inter Variable** | Rasmus Andersson | UI principal — mais usado em 2024-2026 |
639
+ | **Roboto Flex** | Google | Material Design |
640
+ | **Source Sans Variable** | Adobe | Open source |
641
+ | **Geist Variable** | Vercel | Developer/minimal |
642
+ | **Nu Sans Variable** | Blackletra/Nubank | Proprietary (Nubank) |
643
+
644
+ ### Performance
645
+ Um unico arquivo `.woff2` substitui 9+ arquivos estaticos. Reducao tipica: 150KB → 35KB para uma familia completa.
646
+
647
+ ---
648
+
560
649
  ## Referencias
561
- - MDN Web Docs — CSS Reference
562
- - web.dev — Learn CSS / Responsive Design
563
- - Every Layout (Heydon Pickering & Andy Bell)
564
- - Tailwind CSS Documentation
650
+ - MDN Web Docs — CSS Reference — developer.mozilla.org/CSS
651
+ - web.dev — Learn CSS / Responsive Design — web.dev/learn/css
652
+ - Every Layout (Heydon Pickering & Andy Bell) — every-layout.dev
653
+ - Utopia.fyi utopia.fyi (fluid type + space scales)
654
+ - Tailwind CSS Documentation — tailwindcss.com
655
+ - Inter Variable Font — rsms.me/inter
565
656
  - CSS Tricks / Smashing Magazine
657
+ - Lea Verou — CSS Secrets (O'Reilly, 2015)
@@ -305,9 +305,121 @@ Referencia completa de WCAG 2.2 Level AA e ARIA patterns — criterios de sucess
305
305
 
306
306
  ---
307
307
 
308
+ ---
309
+
310
+ ## 8. WCAG 2.2 — Status Legal e Adocao (2025-2026)
311
+
312
+ ### Aprovacao como ISO/IEC
313
+ WCAG 2.2 foi publicado pelo W3C em outubro 2023 e aprovado como **ISO/IEC 40500:2025** em outubro de 2025. Essa aprovacao acelerou adocao global — leis e regulamentos que referenciam o padrao ISO passam a exigir WCAG 2.2.
314
+
315
+ ### European Accessibility Act (EAA)
316
+ Efetivo em **junho de 2025**, o EAA exige que produtos e servicos digitais vendidos na UE atendam requisitos de acessibilidade baseados em WCAG 2.1/2.2. Empresas brasileiras que vendem para a Europa precisam estar em conformidade.
317
+
318
+ ### WCAG 3.0 (Em Desenvolvimento)
319
+ WCAG 3.0 esta em desenvolvimento mas ainda a anos de se tornar recomendacao oficial. **WCAG 2.2 permanece o estado da arte** e o padrao a implementar.
320
+
321
+ ### Brasil — LBI
322
+ Lei Brasileira de Inclusao (Lei 13.146/2015) exige acessibilidade digital para toda empresa com sede ou representacao no Brasil. O nivel minimo exigido e WCAG AA. Ver `brazilian-design-context.md` para detalhes completos.
323
+
324
+ ---
325
+
326
+ ## 9. Inclusive Design (Alem do Minimo)
327
+
328
+ Acessibilidade = cumprir requisitos tecnicos (o minimo legal).
329
+ **Inclusive Design** = projetar para a diversidade humana desde o inicio.
330
+
331
+ ### Microsoft Inclusive Design Toolkit — 3 Tipos de Exclusao
332
+
333
+ | Tipo | Descricao | Exemplos |
334
+ |------|-----------|---------|
335
+ | **Permanente** | Condicao permanente | Cego, surdo, amputado |
336
+ | **Temporaria** | Condicao temporaria | Olho inflamado, braco quebrado |
337
+ | **Situacional** | Contexto especifico | Dirigindo, ambiente barulhento, sol na tela |
338
+
339
+ **Principio:** Projetar para exclusao permanente beneficia todos.
340
+
341
+ Exemplos de "design inclusivo que escala":
342
+ - **Legendas** (criadas para surdos) → usadas por 80% da audiencia (ambiente barulhento, aprendendo idioma)
343
+ - **Contraste alto** (criado para baixa visao) → beneficia qualquer um sob sol forte
344
+ - **Tela grande** (criada para idosos) → preferida por todos em uso casual
345
+
346
+ ### Heydon Pickering — Componentes Inclusivos
347
+ Autor de "Inclusive Components" (2019) — cada capitulo detalha como construir componentes verdadeiramente inclusivos (card, toggle, notification, data table). Nao apenas tecnicamente acessivel, mas inclusivo na concepcao.
348
+
349
+ **inclusive-components.design** — Recurso gratuito online.
350
+
351
+ ---
352
+
353
+ ## 10. Automated a11y Testing — Stack Completa
354
+
355
+ ### axe-core (Deque Systems)
356
+ Motor de teste mais utilizado. 100+ regras WCAG. Detecta ~30-40% de problemas automaticamente.
357
+
358
+ ```typescript
359
+ // jest-axe — teste unitario
360
+ import { render } from '@testing-library/react';
361
+ import { axe, toHaveNoViolations } from 'jest-axe';
362
+ expect.extend(toHaveNoViolations);
363
+
364
+ test('Button: sem violacoes de acessibilidade', async () => {
365
+ const { container } = render(<Button>Click me</Button>);
366
+ const results = await axe(container);
367
+ expect(results).toHaveNoViolations();
368
+ });
369
+ ```
370
+
371
+ ```typescript
372
+ // @axe-core/playwright — testes E2E
373
+ import { checkA11y } from 'axe-playwright';
374
+
375
+ test('pagina sem violacoes', async ({ page }) => {
376
+ await page.goto('/');
377
+ await checkA11y(page, null, {
378
+ axeOptions: { runOnly: ['wcag2a', 'wcag2aa', 'wcag22aa'] },
379
+ });
380
+ });
381
+ ```
382
+
383
+ ### Storybook a11y Addon
384
+ ```typescript
385
+ // .storybook/main.ts
386
+ export default {
387
+ addons: ['@storybook/addon-a11y'],
388
+ };
389
+ // Exibe painel de acessibilidade em cada story
390
+ // Roda axe-core em tempo real no browser
391
+ // Mostra violations, warnings e passes com links para regras
392
+ ```
393
+
394
+ ### Stack Completa
395
+
396
+ | Ferramenta | Quando usar | Cobertura |
397
+ |-----------|------------|---------|
398
+ | `jest-axe` | Unit tests (por componente) | ~30-40% das issues |
399
+ | `@storybook/addon-a11y` | Desenvolvimento (real-time) | ~30-40% |
400
+ | `@axe-core/playwright` | E2E tests (paginas completas) | ~30-40% |
401
+ | Lighthouse a11y | CI gate (score) | ~20-30% |
402
+ | `eslint-plugin-jsx-a11y` | Static analysis (code) | Problemas estaticos |
403
+ | **Manual keyboard** | Teste manual | Issues de fluxo |
404
+ | **Screen reader** | Teste manual | Announcements |
405
+
406
+ ### O que Automatizacao NAO detecta (teste manual obrigatorio)
407
+ - Logica de focus management em fluxos complexos
408
+ - Qualidade de anuncios de screen reader
409
+ - Adequacao dos labels e textos alternativos (semantica, nao sintaxe)
410
+ - Sequencia de leitura logica
411
+ - Cognitive load e clareza
412
+
413
+ ---
414
+
308
415
  ## Referencias
309
- - W3C WCAG 2.2 Specification
310
- - W3C ARIA Authoring Practices Guide (APG)
311
- - W3C ARIA 1.2 Specification
312
- - WebAIMTesting resources
313
- - Deque Universityaxe-core rules
416
+ - W3C WCAG 2.2 Specification — w3.org/WAI/WCAG22
417
+ - W3C ARIA Authoring Practices Guide (APG) — w3.org/WAI/ARIA/apg
418
+ - W3C ARIA 1.2 Specification — w3.org/TR/wai-aria-1.2
419
+ - ISO/IEC 40500:2025 iso.org
420
+ - European Accessibility Act ec.europa.eu
421
+ - WebAIM — Testing resources — webaim.org
422
+ - Deque University — axe-core rules — deque.com/axe
423
+ - Heydon Pickering — inclusive-components.design
424
+ - Microsoft Inclusive Design Toolkit — microsoft.com/design/inclusive
425
+ - lei Brasileira de Inclusao (LBI) — Lei 13.146/2015
@@ -329,9 +329,132 @@ Monitoring:
329
329
 
330
330
  ---
331
331
 
332
+ ---
333
+
334
+ ## 11. Design System Performance
335
+
336
+ Design systems impactam diretamente Core Web Vitals dos produtos que os consomem.
337
+
338
+ ### Impacto por Metrica
339
+ | Metrica CWV | Como o DS afeta | Otimizacao |
340
+ |-------------|----------------|------------|
341
+ | **LCP** | Componentes pesados atrasam render do elemento principal | Lazy loading, code-splitting |
342
+ | **INP** | Event handlers lentos em componentes complexos | Otimizar renders, evitar re-renders |
343
+ | **CLS** | Componentes sem dimensoes explicitas (Skeleton vs sem nada) | Skeleton loaders, aspect-ratio, dimensoes fixas |
344
+
345
+ ### Bundle Size por Componente (Targets)
346
+ | Tipo | Target gzipped | Ferramenta de verificacao |
347
+ |------|---------------|--------------------------|
348
+ | Atom (Button, Badge, Icon) | < 3KB | size-limit, bundlephobia |
349
+ | Molecule (Form Field, Card) | < 8KB | size-limit |
350
+ | Organism (Table, Modal, DatePicker) | < 20KB | size-limit |
351
+ | Bundle completo (index.js) | < 50KB | size-limit |
352
+
353
+ ### Tree-Shaking (Obrigatorio para DS)
354
+
355
+ Para que tree-shaking funcione, o pacote deve:
356
+
357
+ **1. ESM exports:**
358
+ ```json
359
+ // package.json
360
+ {
361
+ "name": "@mylib/components",
362
+ "sideEffects": false,
363
+ "type": "module",
364
+ "exports": {
365
+ ".": {
366
+ "import": "./dist/index.mjs",
367
+ "require": "./dist/index.cjs"
368
+ },
369
+ "./button": {
370
+ "import": "./dist/button.mjs"
371
+ },
372
+ "./modal": {
373
+ "import": "./dist/modal.mjs"
374
+ }
375
+ }
376
+ }
377
+ ```
378
+
379
+ **2. sideEffects: false** — declara que modulos nao tem efeitos colaterais
380
+
381
+ **3. Per-component exports:**
382
+ ```tsx
383
+ // Tree-shakeable — bundler inclui apenas Button
384
+ import { Button } from '@mylib/components';
385
+
386
+ // Ou explicitamente:
387
+ import { Button } from '@mylib/components/button';
388
+ ```
389
+
390
+ ### size-limit Configuration
391
+ ```json
392
+ // package.json
393
+ {
394
+ "size-limit": [
395
+ { "path": "dist/index.mjs", "limit": "50 KB", "gzip": true },
396
+ { "path": "dist/button.mjs", "limit": "3 KB", "gzip": true },
397
+ { "path": "dist/modal.mjs", "limit": "8 KB", "gzip": true },
398
+ { "path": "dist/data-table.mjs", "limit": "20 KB", "gzip": true }
399
+ ]
400
+ }
401
+ ```
402
+
403
+ ```yaml
404
+ # .github/workflows/size-check.yml
405
+ - name: Check bundle size
406
+ run: npx size-limit
407
+ ```
408
+
409
+ ### React DevTools Profiler
410
+ Para identificar re-renders desnecessarios em componentes:
411
+ ```typescript
412
+ import { useCallback, useMemo } from 'react';
413
+
414
+ // Anti-pattern: nova funcao a cada render
415
+ <Button onClick={() => handleClick(id)} />
416
+
417
+ // Correto: funcao memoizada
418
+ const handleClickMemo = useCallback(() => handleClick(id), [id, handleClick]);
419
+ <Button onClick={handleClickMemo} />
420
+ ```
421
+
422
+ **why-did-you-render** (biblioteca de debug):
423
+ ```typescript
424
+ // index.tsx — dev only
425
+ if (process.env.NODE_ENV === 'development') {
426
+ const whyDidYouRender = require('@welldone-software/why-did-you-render');
427
+ whyDidYouRender(React, { trackAllPureComponents: true });
428
+ }
429
+ ```
430
+
431
+ ### CLS em Design Systems — Skeleton Patterns
432
+ ```tsx
433
+ // Anti-pattern: sem reservar espaco
434
+ {isLoading ? null : <UserCard user={user} />}
435
+
436
+ // Correto: skeleton com mesmas dimensoes
437
+ {isLoading ? <UserCardSkeleton /> : <UserCard user={user} />}
438
+
439
+ // Skeleton implementation
440
+ function UserCardSkeleton() {
441
+ return (
442
+ <div className="animate-pulse">
443
+ <div className="h-12 w-12 rounded-full bg-gray-200" /> {/* Avatar */}
444
+ <div className="mt-2 h-4 w-32 rounded bg-gray-200" /> {/* Name */}
445
+ <div className="mt-1 h-3 w-24 rounded bg-gray-200" /> {/* Role */}
446
+ </div>
447
+ );
448
+ }
449
+ ```
450
+
451
+ ---
452
+
332
453
  ## Referencias
333
454
  - web.dev/performance (Google)
334
- - Core Web Vitals documentation
335
- - Next.js Performance documentation
336
- - HTTP Archive — Web Almanac
337
- - Calibre Performance Blog
455
+ - Core Web Vitals documentation — web.dev/vitals
456
+ - Next.js Performance documentation — nextjs.org/docs/app/building-your-application/optimizing
457
+ - HTTP Archive — Web Almanac — httparchive.org/reports
458
+ - Calibre Performance Blog — calibreapp.com/blog
459
+ - bundlephobia.com — verifica custo de dependencias
460
+ - size-limit — github.com/ai/size-limit