@polymorphism-tech/morph-spec 4.11.1 → 4.12.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 (28) hide show
  1. package/README.md +2 -2
  2. package/claude-plugin.json +1 -1
  3. package/docs/CHEATSHEET.md +1 -1
  4. package/docs/QUICKSTART.md +1 -1
  5. package/framework/agents.json +16 -6
  6. package/framework/hooks/claude-code/post-tool-use/agent-complete.js +122 -0
  7. package/framework/hooks/shared/dispatch-helpers.js +17 -0
  8. package/framework/skills/level-1-workflows/morph-phase-clarify/SKILL.md +1 -1
  9. package/framework/skills/level-1-workflows/morph-phase-codebase-analysis/SKILL.md +1 -1
  10. package/framework/skills/level-1-workflows/morph-phase-design/SKILL.md +1 -1
  11. package/framework/skills/level-1-workflows/morph-phase-implement/SKILL.md +1 -1
  12. package/framework/skills/level-1-workflows/morph-phase-plan/SKILL.md +1 -1
  13. package/framework/skills/level-1-workflows/morph-phase-setup/SKILL.md +1 -1
  14. package/framework/skills/level-1-workflows/morph-phase-tasks/SKILL.md +1 -1
  15. package/framework/skills/level-1-workflows/morph-phase-uiux/SKILL.md +248 -14
  16. package/framework/skills/level-1-workflows/morph-scope-escalation/SKILL.md +1 -1
  17. package/framework/standards/STANDARDS.json +31 -0
  18. package/framework/standards/frontend/design-system/aesthetic-direction.md +60 -7
  19. package/framework/standards/frontend/design-system/design-trends.md +171 -0
  20. package/framework/templates/context/CONTEXT.md +2 -2
  21. package/framework/templates/context/design-system.md +346 -211
  22. package/framework/templates/meta-prompts/squad-leaders/frontend-squad.md +1 -1
  23. package/package.json +1 -1
  24. package/src/commands/mcp/mcp-setup.js +28 -6
  25. package/src/commands/project/init.js +20 -1
  26. package/src/lib/generators/design-system-generator.js +340 -51
  27. package/src/lib/validators/design-system/design-system-validator.js +11 -5
  28. package/src/utils/hooks-installer.js +11 -1
@@ -1359,6 +1359,37 @@
1359
1359
  "*"
1360
1360
  ]
1361
1361
  },
1362
+ {
1363
+ "id": "frontend-design-system-design-trends",
1364
+ "name": "design trends",
1365
+ "path": "frontend/design-system/design-trends.md",
1366
+ "category": "frontend",
1367
+ "subcategory": "design-system",
1368
+ "tags": [
1369
+ "frontend",
1370
+ "design-system",
1371
+ "trends",
1372
+ "modern"
1373
+ ],
1374
+ "aliases": [
1375
+ "design trends",
1376
+ "modern design",
1377
+ "ui trends",
1378
+ "visual trends",
1379
+ "design patterns"
1380
+ ],
1381
+ "anchors": {
1382
+ "layout": "#layout-patterns",
1383
+ "effects": "#visual-effects",
1384
+ "typography": "#typography-techniques",
1385
+ "animation": "#animation-patterns",
1386
+ "dark-mode": "#dark-mode-patterns-dark-first"
1387
+ },
1388
+ "digest": "Curated catalog of modern design techniques (2025-2026). Agents consult during UI/UX phase Step 1.3 before choosing aesthetic direction. Covers: Bento Grid, Glassmorphism, Aurora Gradients, Variable Fonts, Scroll-driven Animations, Dark-first design, domain-specific patterns.",
1389
+ "stacks": [
1390
+ "*"
1391
+ ]
1392
+ },
1362
1393
  {
1363
1394
  "id": "frontend-nextjs-app-router",
1364
1395
  "name": "app router",
@@ -43,13 +43,13 @@ na seção `## Aesthetic Direction` usando o template no final deste standard.
43
43
 
44
44
  ### Font Pairs por Direção
45
45
 
46
- | Direction | Display | Body | Fonte |
47
- |-----------|---------|------|-------|
48
- | Minimal Refined | Cormorant Garamond | DM Sans | Google Fonts |
49
- | Editorial | Playfair Display | Source Sans 3 | Google Fonts |
50
- | Soft Professional | Nunito | Inter | Google Fonts |
51
- | Industrial | JetBrains Mono | IBM Plex Sans | Google Fonts |
52
- | Modern Luxury | Bodoni Moda | Sora | Google Fonts |
46
+ | Direction | Display | Body | Variable Alternative |
47
+ |-----------|---------|------|---------------------|
48
+ | Minimal Refined | Cormorant Garamond | DM Sans | Cormorant Variable + DM Sans Variable |
49
+ | Editorial | Playfair Display | Source Sans 3 | Playfair Display Variable + Source Sans 3 Variable |
50
+ | Soft Professional | Nunito | Inter | Nunito Variable + Inter Variable |
51
+ | Industrial | JetBrains Mono | IBM Plex Sans | JetBrains Mono Variable + IBM Plex Sans Variable |
52
+ | Modern Luxury | Bodoni Moda | Sora | Bodoni Moda Variable + Sora Variable |
53
53
 
54
54
  ### Anti-padrões
55
55
 
@@ -192,6 +192,59 @@ Técnicas por direção para criar profundidade e caráter:
192
192
 
193
193
  ---
194
194
 
195
+ ## Modern Techniques by Direction
196
+
197
+ Cross-reference with `design-trends.md` catalog. For each aesthetic direction, these are the most effective modern techniques:
198
+
199
+ | Direction | Layout | Effects | Animation | Typography |
200
+ |-----------|--------|---------|-----------|------------|
201
+ | **Minimal Refined** | Asymmetric split, generous whitespace | Noise texture, subtle colored shadows | Entry stagger (slow), hover lift | Variable fonts (weight transitions on hover) |
202
+ | **Editorial** | Asymmetric layouts, overlapping layers | Dramatic type shadows, kinetic backgrounds | Scroll-driven reveals, word-by-word entry | Kinetic typography, fluid clamp() sizing |
203
+ | **Soft Professional** | Container query cards, balanced grid | Glassmorphism cards, aurora gradient backgrounds | Spring animations, gentle micro-interactions | Rounded sans variable, generous line-height |
204
+ | **Industrial** | Dense bento grid, hard grid lines | Minimal — border-only cards, no shadows | No animation or minimal loading states | Monospace variable, condensed headings |
205
+ | **Modern Luxury** | Overlapping layers, asymmetric hero | Gradient mesh backgrounds, perspective cards, colored shadows + lift | Parallax + hover lift, shine effect, gold/copper accents | Display italic variable, premium tracking |
206
+
207
+ ### Technique Pairing Rules
208
+
209
+ 1. **Max 3 visual effects per project** — more creates visual noise
210
+ 2. **Aurora gradients + glassmorphism** = strong pairing (both use translucency)
211
+ 3. **Noise texture + glassmorphism** = conflicting (noise reduces glass clarity)
212
+ 4. **Bento grid + container queries** = ideal pairing (responsive cells)
213
+ 5. **Scroll-driven + spring physics** = pair for dynamic feel, avoid for Industrial
214
+
215
+ ---
216
+
217
+ ## Domain Adaptation
218
+
219
+ Adaptar a direção estética ao domínio do projeto. A direção define o *feel*, o domínio define os *patterns*.
220
+
221
+ ### SaaS Dashboard
222
+ - **Preferred directions:** Industrial, Minimal Refined
223
+ - **Key patterns:** Dense bento grid KPIs, skeleton loaders para data fetch, sidebar glassmorphism
224
+ - **Avoid:** Aurora gradients (distrai de dados), kinetic typography (conflita com data density)
225
+
226
+ ### E-commerce / Product
227
+ - **Preferred directions:** Modern Luxury, Soft Professional
228
+ - **Key patterns:** Product card hover lift, CTA colored shadows, image-first asymmetric layouts
229
+ - **Avoid:** Industrial (cold for buying), monospace fonts (breaks trust)
230
+
231
+ ### Landing / Marketing
232
+ - **Preferred directions:** Editorial, Modern Luxury
233
+ - **Key patterns:** Hero aurora gradient, scroll-driven narrative, fluid typography, overlapping layers
234
+ - **Avoid:** Dense layouts (landing needs breathing room), Industrial (too technical)
235
+
236
+ ### Internal Tool / Admin
237
+ - **Preferred directions:** Industrial, Minimal Refined
238
+ - **Key patterns:** Compact forms, dense data tables, status chips, monospace data
239
+ - **Avoid:** Aurora gradients, parallax, any non-functional animation
240
+
241
+ ### Social / Community
242
+ - **Preferred directions:** Soft Professional, Editorial
243
+ - **Key patterns:** Card feed layout, notification badges, avatar systems, drawer navigation
244
+ - **Avoid:** Modern Luxury (too formal), Industrial (too cold)
245
+
246
+ ---
247
+
195
248
  ## Template de Documentação
196
249
 
197
250
  Usar no `ui-design-system.md` de cada feature (seção `## Aesthetic Direction`):
@@ -0,0 +1,171 @@
1
+ # Design Trends — Active Catalog
2
+
3
+ > **Scope:** universal
4
+ > **Layer:** 0 (always load)
5
+ > **Keywords:** design, trends, modern, ui, visual, glassmorphism, bento, aurora, variable-font
6
+ > **Load When:** phase-uiux
7
+
8
+ Curated catalog of modern design techniques. Agents MUST consult this during Step 1.3 (Trend Research) of the UI/UX phase. Updated quarterly.
9
+
10
+ ---
11
+
12
+ ## Layout Patterns
13
+
14
+ ### Bento Grid
15
+ - Grid assimétrico com cells de tamanhos variados (2x1, 1x2, 2x2 mixed)
16
+ - Implementação: CSS Grid com `grid-template-areas` nomeadas ou `grid-auto-flow: dense`
17
+ - Quando: dashboards, landing pages, portfolios, feature showcases
18
+ - Ref: Apple.com product pages, Linear.app dashboard
19
+
20
+ ### Asymmetric Split
21
+ - Layouts 60/40 ou 70/30 em vez de 50/50 simétrico
22
+ - Implementação: `grid-template-columns: 1.4fr 1fr` ou `3fr 2fr`
23
+ - Quando: hero sections, feature showcases, about pages
24
+
25
+ ### Overlapping Layers
26
+ - Elementos que se sobrepõem criando profundidade (z-index composition)
27
+ - Implementação: `position: relative` + negative margins ou CSS Grid `grid-row: 1 / -1` overlap
28
+ - Quando: cards com imagem + texto, testimonials, feature highlights
29
+
30
+ ### Container Query Layouts
31
+ - Componentes responsivos baseados no container, não no viewport
32
+ - Implementação: `container-type: inline-size` + `@container (min-width: 400px)`
33
+ - Quando: cards reutilizáveis, sidebar/main content, dashboards
34
+
35
+ ---
36
+
37
+ ## Visual Effects
38
+
39
+ ### Glassmorphism / Frosted Glass
40
+ - `backdrop-filter: blur(12px) saturate(180%)`
41
+ - `background: rgba(255, 255, 255, 0.15)` (light) ou `rgba(0, 0, 0, 0.25)` (dark)
42
+ - `border: 1px solid rgba(255, 255, 255, 0.18)`
43
+ - Quando: overlays, floating sidebars, navigation, modals, floating cards
44
+
45
+ ### Aurora Gradients
46
+ - Multi-stop radial/conic gradients com animação lenta
47
+ - `background: conic-gradient(from 0deg at 50% 50%, #0ff, #f0f, #ff0, #0ff)`
48
+ - `animation: aurora 15s ease infinite` (rotate hue)
49
+ - Quando: hero backgrounds, empty states, loading screens
50
+
51
+ ### Noise Texture
52
+ - SVG filter com `<feTurbulence>` para textura orgânica
53
+ - Adiciona profundidade tátil sem peso visual
54
+ - Implementação: `filter: url(#noise)` ou CSS `background-image` com tiny SVG data URI
55
+ - Quando: surfaces, backgrounds (especialmente Minimal Refined direction)
56
+
57
+ ### Gradient Mesh
58
+ - Multiple `radial-gradient` sobrepostos em posições diferentes
59
+ - Cria efeito de malha de cores fluida
60
+ - Quando: backgrounds premium, Modern Luxury direction
61
+
62
+ ### Colored Shadows
63
+ - `box-shadow` que usa a cor do elemento (não apenas preto/rgba)
64
+ - `box-shadow: 0 8px 32px rgba(var(--color-primary-rgb), 0.3)`
65
+ - Quando: CTAs, cards destacados, hover states
66
+
67
+ ### 3D CSS Transforms / Perspective Cards
68
+ - `transform: perspective(1000px) rotateY(5deg)` para profundidade sutil
69
+ - Hover: `rotateX(-2deg) rotateY(3deg) translateZ(10px)` com `transition: transform 0.4s ease`
70
+ - `transform-style: preserve-3d` no container para depth real
71
+ - Quando: product cards, pricing tables, feature showcases (Modern Luxury direction)
72
+ - **Performance:** Use `will-change: transform` apenas em hover, remover após transition end
73
+
74
+ ---
75
+
76
+ ## Typography Techniques
77
+
78
+ ### Variable Fonts
79
+ - `font-variation-settings` para weight, width, slant dinâmicos
80
+ - Hover: transição suave de weight (`font-variation-settings: 'wght' 700` com transition)
81
+ - Fontes recomendadas: Inter Variable, Plus Jakarta Sans Variable, Sora Variable, DM Sans Variable
82
+ - Quando: headings interativos, emphasis dinâmico, responsive weight
83
+
84
+ ### Fluid Typography
85
+ - `clamp()` para escala responsiva sem breakpoints
86
+ - `font-size: clamp(1rem, 0.5rem + 2vw, 2.5rem)`
87
+ - Quando: headings, hero text, qualquer texto que precisa escalar com viewport
88
+
89
+ ### Kinetic Typography
90
+ - Texto com movimento: letter-spacing em hover, word-by-word reveal
91
+ - `@keyframes typeReveal` com `clip-path: inset(0 100% 0 0)` por palavra
92
+ - Quando: hero sections, landing pages (Editorial direction)
93
+
94
+ ---
95
+
96
+ ## Animation Patterns
97
+
98
+ ### Scroll-Driven Animations (CSS Native)
99
+ - `animation-timeline: scroll()` — sem JavaScript
100
+ - `animation-range: entry 0% entry 100%`
101
+ - Performance nativa do browser, sem Intersection Observer
102
+ - Quando: progress bars, parallax, reveal on scroll, sticky headers
103
+ - **Browser support:** Chrome 115+, Firefox 110+ (com flag), Safari 16+ (parcial)
104
+
105
+ ### View Transitions API
106
+ - `document.startViewTransition()` para page transitions
107
+ - Transições suaves entre estados sem framework adicional
108
+ - `::view-transition-old(root)` / `::view-transition-new(root)` para customizar
109
+ - Quando: navegação SPA, state changes, list reordering
110
+
111
+ ### Spring Physics
112
+ - `cubic-bezier(0.34, 1.56, 0.64, 1)` (bounce)
113
+ - `cubic-bezier(0.68, -0.55, 0.265, 1.55)` (elastic)
114
+ - Quando: button press, modal enter, toast notifications
115
+
116
+ ### Micro-Interactions Catalog
117
+
118
+ | Interaction | Implementação | Timing |
119
+ |-------------|--------------|--------|
120
+ | Button press | `transform: scale(0.97)` → `scale(1)` | 150ms spring |
121
+ | Toggle morph | `clip-path` transition entre estados | 300ms ease |
122
+ | Skeleton shimmer | `background: linear-gradient(90deg, ...)` animado | 1.5s infinite |
123
+ | Success checkmark | `stroke-dasharray` + `stroke-dashoffset` animation | 500ms ease |
124
+ | Card hover lift | `translateY(-4px)` + `box-shadow` colored | 200ms decelerate |
125
+ | Loading dots | Scale sequence com `animation-delay: 0.1s * n` | 1.4s infinite |
126
+ | Drawer slide | `translateX(-100%)` → `translateX(0)` | 300ms decelerate |
127
+ | Notification badge | `scale(0)` → `scale(1)` com bounce | 400ms spring |
128
+
129
+ ---
130
+
131
+ ## Dark Mode Patterns (Dark-First)
132
+
133
+ ### Princípios
134
+ - Designar dark primeiro, adaptar para light (não o contrário)
135
+ - **Elevated surfaces**: layers mais claras = mais elevadas (não apenas inverter cores)
136
+ - **Luminance hierarchy**: usar luminância para hierarquia em vez de peso de fonte
137
+ - Background base: `#0a0a0a` a `#121212` (não `#000000` puro — muito harsh)
138
+
139
+ ### Token Structure (Dark-First)
140
+
141
+ ```css
142
+ :root {
143
+ /* Surfaces (elevation via luminance) */
144
+ --surface-0: #0a0a0f; /* Base */
145
+ --surface-1: #12121a; /* Cards */
146
+ --surface-2: #1a1a24; /* Elevated cards, dropdowns */
147
+ --surface-3: #22222e; /* Modals, popovers */
148
+ --surface-4: #2a2a38; /* Hover states */
149
+
150
+ /* Text (luminance hierarchy) */
151
+ --text-primary: #f0f0f5; /* 95% luminance */
152
+ --text-secondary: #a0a0b0; /* 65% luminance */
153
+ --text-muted: #606070; /* 40% luminance */
154
+ }
155
+ ```
156
+
157
+ ---
158
+
159
+ ## Domain-Specific Trends
160
+
161
+ | Domain | Layout | Effects | Animation | Typography |
162
+ |--------|--------|---------|-----------|------------|
163
+ | **SaaS Dashboard** | Bento grid, sidebar + main | Colored shadows, glassmorphism sidebar | Skeleton shimmer, data reveal | Compact sans, monospace for data |
164
+ | **E-commerce** | Product grid, asymmetric hero | Colored shadows on CTAs, image zoom | Scroll galleries, hover lift | Display serif for brand, sans for body |
165
+ | **Landing Page** | Full-width sections, asymmetric | Aurora gradients, noise texture | Scroll-driven reveals, kinetic type | Bold display, fluid typography |
166
+ | **Internal Tool** | Dense tables, compact sidebar | Minimal — focus on data clarity | Loading states only | Monospace accents, compact sans |
167
+ | **Social/Community** | Card feed, infinite scroll | Glassmorphism overlays | Notification badge, drawer slide | System fonts for speed |
168
+
169
+ ---
170
+
171
+ *MORPH-SPEC by Polymorphism Tech — review quarterly*
@@ -156,8 +156,8 @@ morph-spec detect-agents "{feature description}"
156
156
  # Initialize new feature
157
157
  morph-spec state init
158
158
 
159
- # Generate design system
160
- morph-spec generate design-system {feature}
159
+ # Update design system (run morph-phase-uiux skill or edit manually)
160
+ # .morph/context/design-system.md
161
161
 
162
162
  # Advance to next phase
163
163
  morph-spec phase advance {feature}