ima2-gen 2.0.15 → 2.0.16

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 (125) hide show
  1. package/README.md +30 -0
  2. package/bin/commands/skill.js +336 -17
  3. package/bin/ima2.js +22 -2
  4. package/bin/lib/doctor-checks.js +6 -4
  5. package/config.js +1 -0
  6. package/docs/CLI.md +25 -3
  7. package/docs/PROMPT_STUDIO.ko.md +29 -0
  8. package/docs/PROMPT_STUDIO.md +31 -0
  9. package/docs/migration/runtime-test-inventory.md +7 -1
  10. package/lib/agentImageVideoGen.js +8 -0
  11. package/lib/agentQueueStore.js +36 -10
  12. package/lib/agentQueueWorker.js +79 -7
  13. package/lib/agentRuntime.js +2 -0
  14. package/lib/assetLifecycle.js +40 -8
  15. package/lib/canvasVersionStore.js +86 -0
  16. package/lib/cardNewsGenerator.js +37 -3
  17. package/lib/cardNewsJobStore.js +10 -0
  18. package/lib/cardNewsManifestStore.js +6 -12
  19. package/lib/cardNewsPath.js +25 -0
  20. package/lib/db.js +2 -0
  21. package/lib/generatePipeline.js +474 -0
  22. package/lib/generationInputValidation.js +32 -0
  23. package/lib/grokImageCore.js +18 -1
  24. package/lib/historyIndex.js +11 -4
  25. package/lib/historyList.js +3 -0
  26. package/lib/imageMetadata.js +3 -0
  27. package/lib/inflight.js +30 -3
  28. package/lib/multimodePipeline.js +462 -0
  29. package/lib/nodeGeneration.js +440 -0
  30. package/lib/nodeValidation.js +23 -0
  31. package/lib/oauthProxy/generators.js +3 -246
  32. package/lib/oauthProxy/multimodeGenerators.js +251 -0
  33. package/lib/routeHelpers.js +9 -2
  34. package/package.json +2 -2
  35. package/routes/agent.js +4 -4
  36. package/routes/canvasVersions.js +21 -1
  37. package/routes/cardNews.js +2 -1
  38. package/routes/edit.js +25 -9
  39. package/routes/events.js +5 -1
  40. package/routes/generate.js +2 -481
  41. package/routes/keys.js +31 -39
  42. package/routes/multimode.js +2 -502
  43. package/routes/nodes.js +3 -448
  44. package/routes/video.js +12 -3
  45. package/routes/videoExtended.js +19 -4
  46. package/server.js +53 -1
  47. package/skills/ima2/SKILL.md +204 -0
  48. package/skills/ima2-front/SKILL.md +611 -0
  49. package/skills/ima2-front/references/a11y-patterns.md +134 -0
  50. package/skills/ima2-front/references/aesthetics.md +327 -0
  51. package/skills/ima2-front/references/anti-slop.md +241 -0
  52. package/skills/ima2-front/references/asset-requirements.md +431 -0
  53. package/skills/ima2-front/references/brand-asset-sourcing.md +122 -0
  54. package/skills/ima2-front/references/color-system.md +132 -0
  55. package/skills/ima2-front/references/consistency-locks.md +20 -0
  56. package/skills/ima2-front/references/crud-ui.md +53 -0
  57. package/skills/ima2-front/references/dropdown-layer.md +110 -0
  58. package/skills/ima2-front/references/i18n-global.md +104 -0
  59. package/skills/ima2-front/references/iterative-design.md +90 -0
  60. package/skills/ima2-front/references/korea-2026.md +174 -0
  61. package/skills/ima2-front/references/layout-discipline.md +161 -0
  62. package/skills/ima2-front/references/liquid-glass.md +181 -0
  63. package/skills/ima2-front/references/logo-sections.md +194 -0
  64. package/skills/ima2-front/references/mobile-ux.md +144 -0
  65. package/skills/ima2-front/references/performance-budget.md +106 -0
  66. package/skills/ima2-front/references/preflight-full.md +58 -0
  67. package/skills/ima2-front/references/product-density.md +53 -0
  68. package/skills/ima2-front/references/prototype-variants.md +54 -0
  69. package/skills/ima2-front/references/reference-capture.md +120 -0
  70. package/skills/ima2-front/references/responsive-viewport.md +139 -0
  71. package/skills/ima2-front/references/seo-baseline.md +123 -0
  72. package/skills/ima2-front/references/soft-3d-asset-gates.md +70 -0
  73. package/skills/ima2-front/references/stacks/astro.md +204 -0
  74. package/skills/ima2-front/references/stacks/mobile-native.md +281 -0
  75. package/skills/ima2-front/references/stacks/nextjs.md +219 -0
  76. package/skills/ima2-front/references/stacks/react.md +264 -0
  77. package/skills/ima2-front/references/stacks/svelte.md +235 -0
  78. package/skills/ima2-front/references/stacks/vanilla.md +226 -0
  79. package/skills/ima2-front/references/theme-switching.md +82 -0
  80. package/skills/ima2-front/references/top-bar.md +126 -0
  81. package/skills/ima2-front/references/typography-wrapping.md +270 -0
  82. package/skills/ima2-front/references/ux-writing-ko.md +62 -0
  83. package/skills/ima2-front/references/visual-verification.md +102 -0
  84. package/skills/ima2-uiux/SKILL.md +477 -0
  85. package/skills/ima2-uiux/references/anti-slop-judgment.md +39 -0
  86. package/skills/ima2-uiux/references/color-system.md +80 -0
  87. package/skills/ima2-uiux/references/design-isms.md +194 -0
  88. package/skills/ima2-uiux/references/design-read-example.md +33 -0
  89. package/skills/ima2-uiux/references/design-system-bootstrap.md +133 -0
  90. package/skills/ima2-uiux/references/favicon-logo.md +355 -0
  91. package/skills/ima2-uiux/references/form-patterns.md +118 -0
  92. package/skills/ima2-uiux/references/intent-discovery-ladder.md +86 -0
  93. package/skills/ima2-uiux/references/korean-design-vocabulary.md +52 -0
  94. package/skills/ima2-uiux/references/layout-macrostructures.md +54 -0
  95. package/skills/ima2-uiux/references/logo-trust-sections.md +96 -0
  96. package/skills/ima2-uiux/references/mobile-native-ux.md +207 -0
  97. package/skills/ima2-uiux/references/product-personalities.md +118 -0
  98. package/skills/ima2-uiux/references/responsive-nav.md +66 -0
  99. package/skills/ima2-uiux/references/typography-line-breaks.md +193 -0
  100. package/skills/ima2-uiux/references/ux-preflight.md +65 -0
  101. package/skills/ima2-uiux/references/ux-states.md +197 -0
  102. package/skills/ima2-uiux/references/visual-hierarchy.md +115 -0
  103. package/ui/dist/.vite/manifest.json +13 -13
  104. package/ui/dist/assets/AgentWorkspace-CtYt4SF5.js +3 -0
  105. package/ui/dist/assets/{CardNewsWorkspace-Cdxn1ohU.js → CardNewsWorkspace-DN5cVqG5.js} +1 -1
  106. package/ui/dist/assets/GenerationRequestLogPanel-DnmUQdKR.js +1 -0
  107. package/ui/dist/assets/{NodeCanvas-C67sLboA.js → NodeCanvas-CxpfIBI0.js} +1 -1
  108. package/ui/dist/assets/PromptBuilderPanel-C2R3ObtR.js +2 -0
  109. package/ui/dist/assets/{PromptImportDialog-DeQXsEEv.js → PromptImportDialog-BIxz_yEx.js} +2 -2
  110. package/ui/dist/assets/PromptImportDiscoverySection-BQTlPMME.js +1 -0
  111. package/ui/dist/assets/PromptImportFolderSection-Ds_Th9O3.js +1 -0
  112. package/ui/dist/assets/{PromptLibraryPanel-Db3xEPM_.js → PromptLibraryPanel-Rs4l45pV.js} +2 -2
  113. package/ui/dist/assets/{SettingsWorkspace-BDk_1W-V.js → SettingsWorkspace-p1AZ6uT9.js} +1 -1
  114. package/ui/dist/assets/index-0-_vgFGs.js +4 -0
  115. package/ui/dist/assets/index-Dm3pFxV4.js +23 -0
  116. package/ui/dist/assets/index-J8yDF3Ch.css +1 -0
  117. package/ui/dist/index.html +2 -2
  118. package/ui/dist/assets/AgentWorkspace-DAg_7zpY.js +0 -3
  119. package/ui/dist/assets/GenerationRequestLogPanel-C_qvEUi2.js +0 -1
  120. package/ui/dist/assets/PromptBuilderPanel-DjvVdAie.js +0 -2
  121. package/ui/dist/assets/PromptImportDiscoverySection-CrwyUKYI.js +0 -1
  122. package/ui/dist/assets/PromptImportFolderSection-CToGMqYE.js +0 -1
  123. package/ui/dist/assets/index-2oG6in1i.css +0 -1
  124. package/ui/dist/assets/index-CoxMOXAU.js +0 -23
  125. package/ui/dist/assets/index-p8egnGHk.js +0 -4
@@ -0,0 +1,134 @@
1
+ # Accessibility Deep Patterns
2
+
3
+ Extends the baseline a11y rules in SKILL.md with ARIA authoring patterns, focus management, and screen reader testing.
4
+
5
+ ## ARIA Widget Patterns
6
+
7
+ Note: a project may unify ALL dropdown-like surfaces under one visual skin
8
+ (`dropdown-layer.md` FE-DROPDOWN-LAYER-01), but the ARIA pattern is still
9
+ chosen per BEHAVIOR — menu vs listbox/select vs combobox vs dialog. One skin
10
+ never means one blanket component.
11
+
12
+ ### Dialog (Modal)
13
+
14
+ ```html
15
+ <div role="dialog" aria-modal="true" aria-labelledby="dialog-title">
16
+ <h2 id="dialog-title">Title</h2>
17
+ </div>
18
+ ```
19
+
20
+ - Trap focus inside (Tab cycles through focusable elements)
21
+ - ESC closes, returns focus to trigger element
22
+ - `aria-modal="true"` tells screen readers to ignore background
23
+
24
+ ### Tabs
25
+
26
+ ```html
27
+ <div role="tablist" aria-label="Settings">
28
+ <button role="tab" id="tab-1" aria-selected="true" aria-controls="panel-1">General</button>
29
+ <button role="tab" id="tab-2" aria-selected="false" aria-controls="panel-2">Advanced</button>
30
+ </div>
31
+ <div role="tabpanel" id="panel-1" aria-labelledby="tab-1">...</div>
32
+ ```
33
+
34
+ - Arrow keys between tabs, Tab into panel content
35
+ - Home/End move to first/last tab
36
+
37
+ ### Disclosure (Accordion)
38
+
39
+ ```html
40
+ <button aria-expanded="false" aria-controls="content-1">Section</button>
41
+ <div id="content-1" hidden>...</div>
42
+ ```
43
+
44
+ ### Combobox (Autocomplete)
45
+
46
+ ```html
47
+ <input role="combobox" aria-expanded="false" aria-controls="listbox-1" aria-autocomplete="list">
48
+ <ul role="listbox" id="listbox-1">
49
+ <li role="option">Option 1</li>
50
+ </ul>
51
+ ```
52
+
53
+ - Arrow keys navigate, `aria-activedescendant` tracks current
54
+ - Enter selects, ESC closes
55
+
56
+ ### Toast / Live Region
57
+
58
+ ```html
59
+ <div role="status" aria-live="polite" aria-atomic="true"></div>
60
+ ```
61
+
62
+ - `polite`: announced after current speech
63
+ - `assertive`: interrupts — errors/critical alerts only
64
+
65
+ ## Focus Management
66
+
67
+ ### SPA Route Changes
68
+
69
+ - Move focus to `<main>` or new page `<h1>`
70
+ - Announce route via `aria-live` region
71
+ - Never leave focus on a destroyed element
72
+
73
+ ### Dynamic Content
74
+
75
+ - Content loads: do NOT move focus unless user-initiated
76
+ - Content removed: move focus to nearest logical parent
77
+ - `tabindex="-1"` for programmatic focus targets
78
+
79
+ ### Focus Order
80
+
81
+ - Tab order follows visual order (never `tabindex > 0`)
82
+ - `tabindex="0"` for custom interactive elements
83
+ - Never make non-interactive elements focusable without a role
84
+
85
+ ## Keyboard Navigation
86
+
87
+ | Pattern | Keys | Behavior |
88
+ |---------|------|----------|
89
+ | Menu bar | Arrow L/R menus, Arrow D opens, ESC closes | WAI-ARIA menu |
90
+ | Grid | Arrow keys cell-to-cell, Enter activates | WAI-ARIA grid |
91
+ | Tree view | Arrow U/D siblings, R expand, L collapse | WAI-ARIA tree |
92
+ | Carousel | Arrow L/R slides, Tab to controls | Must have pause |
93
+ | Command palette | Type to filter, Arrow navigate, Enter select | Combobox variant |
94
+
95
+ ## Screen Reader Testing
96
+
97
+ ### Quick Test (Every Component)
98
+
99
+ 1. Tab through: can you reach every interactive element?
100
+ 2. Keyboard only: can you complete the task?
101
+ 3. Focus indicator visible on every interactive element?
102
+ 4. Every image/icon has appropriate alt text?
103
+
104
+ ### Full Test (Before Release)
105
+
106
+ 1. macOS VoiceOver (Cmd+F5) + Safari
107
+ 2. Read page linearly — content order makes sense?
108
+ 3. Navigate by headings (VO+Cmd+H) — logical outline?
109
+ 4. Navigate by landmarks (VO+Cmd+L) — main, nav, footer present?
110
+ 5. Interact with every widget — roles and states announced?
111
+ 6. Error messages announced when they appear?
112
+ 7. `prefers-reduced-motion` disables non-essential animation?
113
+
114
+ ### Automated (CI)
115
+
116
+ - axe-core or Lighthouse accessibility audit (score ≥ 90)
117
+ - jest-axe / vitest-axe for component testing
118
+ - Pa11y for page-level scanning
119
+
120
+ ## Color & Visual
121
+
122
+ - Never use color alone to convey meaning
123
+ - 3:1 contrast for UI components and graphical objects
124
+ - Support `forced-colors` (Windows High Contrast)
125
+ - Support `prefers-contrast: more`
126
+
127
+ ## Pre-flight
128
+
129
+ - [ ] Every modal traps focus and returns focus on close
130
+ - [ ] Tab order matches visual order
131
+ - [ ] Live regions for dynamic status messages
132
+ - [ ] Keyboard reaches every interactive element
133
+ - [ ] VoiceOver heading navigation produces logical outline
134
+ - [ ] Color is never the sole state indicator
@@ -0,0 +1,327 @@
1
+ # Aesthetics — Domain-Correct Design Engineering Guide
2
+
3
+ Comprehensive design rules for building distinctive frontends. The SKILL.md references this file — read it before any frontend work.
4
+
5
+ ---
6
+
7
+ ## Domain First
8
+
9
+ Do not start from "make it bold." Start from the surface:
10
+
11
+ - Landing/campaign: expressive typography and strong media can be appropriate.
12
+ - Product tools/dashboards/admin: task clarity, density, and repeatability matter more than spectacle.
13
+ - Fintech/public/B2B: trust, predictability, and low anxiety matter more than novelty.
14
+ - Education/community: warmth and guided visuals can help when they clarify the task.
15
+ - Korean-first UI: read `korea-2026.md` before choosing type scale, copy, spacing, or assets.
16
+
17
+ Hero-scale typography belongs to true hero surfaces. It is usually slop inside working tools.
18
+
19
+ ## Typography
20
+
21
+ ### Font Selection
22
+ - **Campaign/landing display**: `clamp(2.5rem, 6vw, 5rem)` when the first viewport is truly a hero.
23
+ - **Product/tool page title**: `clamp(1.5rem, 2vw, 2.25rem)`.
24
+ - **Dashboard/panel heading**: `0.875rem-1.125rem`, clear weight, compact rhythm.
25
+ - **Body**: `text-base text-gray-600 leading-relaxed max-w-[65ch]`
26
+ - **Serif**: BANNED for Dashboard/Software UIs. OK for editorial/creative only.
27
+
28
+ ### Serif Discipline (verified 2026-07-09)
29
+ Serif is a DOMAIN-GATED direction, not a default and not a blanket ban.
30
+ "It feels creative/premium" is still NOT a reason — but the 2024-2026 serif
31
+ renaissance in AI/tech branding is real and measurable, and direction work
32
+ must be able to speak it.
33
+
34
+ **The actual grammar is a three-role system** (never "make everything serif"):
35
+ display serif at LIGHT weights + sans UI + mono technical accent. Measured
36
+ live 2026-07-09: claude.ai display `Anthropic Serif` 56px / weight **330**;
37
+ anthropic.com editorial H2 ~68px/400; medium.com `GT Super` 120px/400 with
38
+ Sohne sans UI; manus.im Libre Baskerville 36px/400 over system-sans UI;
39
+ Perplexity's Comet leads with Editorial New (Studio Freight, Fonts In Use
40
+ 2025-10-23). Note the weights: 330-400. Heavy bold display serif is NOT the
41
+ pattern.
42
+
43
+ **Serif direction is legitimate when:**
44
+ - Brand brief literally names a serif font, OR
45
+ - Aesthetic is genuinely editorial/luxury/publication AND you can articulate why, OR
46
+ - The surface is an AI-product / research / trust brand deliberately signaling
47
+ human warmth and scholarship (the Anthropic / Comet / Manus lane) — serif
48
+ display must then come WITH editorial structure (long-form typography,
49
+ page-like surfaces, restrained palette), never pasted onto a SaaS layout.
50
+
51
+ **Still banned:**
52
+ - Serif in dashboards, dense tools, admin, and Software UIs (unchanged).
53
+ - Fraunces, Instrument_Serif as defaults (the two LLM-favorite display serifs).
54
+ - "tasteslop": a display serif as a generic AI-premium shortcut without
55
+ editorial content structure — the backlash already has a name (WIRED
56
+ 2026-06-05).
57
+
58
+ **Do not overclaim the trend:** Runway loads JHA Times Now but renders its
59
+ hero in a grotesk (abcNormal 48px/400); Attio loads Tiempos Text but leads
60
+ with Inter Display 64px/600; Mistral is sans/mono (ALTMistral 96px/500).
61
+ Loading a serif file is not being serif-led.
62
+
63
+ **Emphasis Rule:**
64
+ - Never inject serif word into sans headline (or vice versa) for visual interest
65
+ - Use italic or bold of the SAME font family
66
+
67
+ **If serif display is chosen, rotate from:**
68
+ Tiempos Headline, Editorial New / PP Editorial New, GT Super, GT Sectra
69
+ Display, Reckless Neue, Libre Baskerville, Recoleta, Cormorant Garamond,
70
+ Playfair Display, EB Garamond, IvyPresto, Migra — at weights 330-500,
71
+ generous size, line-height 1.1-1.25 for Latin display.
72
+
73
+ **Italic Descender Clearance:**
74
+ When italic has descender letters (y g j p q): `line-height: 1.1` min + `padding-bottom: 0.25rem` reserve
75
+
76
+ ### Recommended Fonts (rotate — never converge on one)
77
+ | Category | Options |
78
+ | ---------------- | ----------------------------------------------------------- |
79
+ | Modern Sans | Geist, Outfit, Cabinet Grotesk, Satoshi, Clash Display |
80
+ | Premium Sans | GT America, Neue Machina, Obviously, Reckless |
81
+ | Mono (data/code) | Geist Mono, JetBrains Mono, Fira Code |
82
+ | CJK/Korean | Pretendard, SUIT, Noto Sans KR, Apple SD Gothic Neo |
83
+
84
+ For Korean-first UI, choose CJK-safe fonts before Latin display fonts. Do not apply negative letter-spacing to Hangul by default.
85
+
86
+ ### Variable Font Pairing
87
+ Always pair a distinctive display font with a refined body font:
88
+ - `Clash Display` (display) + `Satoshi` (body)
89
+ - `Cabinet Grotesk` (display) + `Geist` (body)
90
+ - `Outfit` (display) + `Geist Mono` (code)
91
+
92
+ ### Fluid Typography
93
+ Use `clamp()` for responsive sizing:
94
+ ```css
95
+ --fluid-h1: clamp(2rem, 1rem + 3.6vw, 4rem);
96
+ --fluid-h2: clamp(1.75rem, 1rem + 2.3vw, 3rem);
97
+ --fluid-h3: clamp(1.5rem, 1rem + 1.4vw, 2.25rem);
98
+ --fluid-body: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
99
+ ```
100
+
101
+ For CSS text wrapping implementation (`text-wrap`, `ch` units), see `typography-wrapping.md`.
102
+
103
+ ---
104
+
105
+ ## Color & Theme
106
+
107
+ ### Rules
108
+ - **Max 1 accent color.** Saturation < 80%.
109
+ - **THE LILA BAN**: "AI Purple/Blue" aesthetic is BANNED. No purple button glows, no neon gradients.
110
+ - **Neutral bases**: Zinc, Slate, Stone. Not plain gray.
111
+ - **High-contrast singular accents**: Emerald, Electric Blue, Deep Rose, Amber.
112
+ - **Consistency**: ONE palette for entire project. No warm/cool gray mixing.
113
+ - **CSS Variables**: All colors defined as `--color-*` variables.
114
+ - **Never pure black (#000000)**: Use off-black (Zinc-950, Charcoal, `#0a0a0a`).
115
+
116
+ ### Color Scale
117
+ | Step | Brightness | Use Case |
118
+ | ------- | ---------- | --------------------- |
119
+ | 50 | Very light | Subtle backgrounds |
120
+ | 100-200 | Light | Hover states, borders |
121
+ | 300-400 | Mid-light | Disabled states |
122
+ | 500 | Base | Default color |
123
+ | 600-700 | Dark | Hover (dark), active |
124
+ | 800-900 | Very dark | Text, headings |
125
+
126
+ ### Alternative Palettes (use instead of banned warm-beige)
127
+
128
+ | Name | Background | Accent | Text |
129
+ |------|-----------|--------|------|
130
+ | Cold Luxury | silver-grey `#e8e8e8` | chrome `#c0c0c0` | smoke `#2d2d2d` |
131
+ | Forest | deep green `#1a3a2a` | bone `#f0ede5` | amber `#d4a017` |
132
+ | Black and Tan | off-black `#1a1a1a` | warm tan `#c9a96e` | white `#f5f5f5` |
133
+ | Cobalt + Cream | cream `#fafaf5` | cobalt `#0047ab` | near-black `#1a1a2e` |
134
+ | Terracotta + Slate | slate `#e2e0dc` | terracotta `#c75b39` | charcoal `#2f2f2f` |
135
+ | Olive + Brick + Paper | paper `#f2f0e8` | olive `#6b7c3e`, brick `#8b3a2a` | dark grey `#333` |
136
+ | Pure Monochrome | white `#fff` | single saturated pop | black `#111` |
137
+
138
+ Rotate: never the same palette twice in consecutive projects.
139
+
140
+ ---
141
+
142
+ ## Spatial Composition
143
+
144
+ ### Layout Diversification
145
+ - **ANTI-CENTER BIAS**: When DESIGN_VARIANCE > 4, centered Hero/H1 is BANNED.
146
+ Carve-out: FE-HERO-LIGHT-CENTER-01 (canonical in `layout-discipline.md`) is
147
+ the sanctioned named exception at any variance when its conditions hold:
148
+ headline weight <= 400 plus a full-width authored real-media backdrop. Bold
149
+ centered heroes remain banned above variance 4.
150
+ - **ANTI-HERO-IN-TOOLS**: Apps, dashboards, admin, finance flows, and developer tools should not start with landing-page hero composition.
151
+ - Force: "Split Screen" (50/50), "Left-aligned content / Right asset", "Asymmetric white-space"
152
+ - **Grid over Flex-Math**: NEVER `w-[calc(33%-1rem)]`. ALWAYS CSS Grid.
153
+ - **NO 3-Column Card Layouts**: Generic "3 equal cards" is BANNED. Use 2-column zig-zag, asymmetric grid, or horizontal scroll.
154
+
155
+ ### DESIGN_VARIANCE Definitions
156
+ | Level | Style |
157
+ | :---: | ---------------------------------------------------------------------------------------------- |
158
+ | 1-3 | Flexbox centered, strict 12-column symmetry, equal paddings |
159
+ | 4-7 | `margin-top: -2rem` overlapping, varied aspect ratios, left-aligned headers over centered data |
160
+ | 8-10 | Masonry, CSS Grid fractional (`2fr 1fr 1fr`), massive empty zones (`padding-left: 20vw`) |
161
+
162
+ **MOBILE OVERRIDE**: Levels 4-10 MUST fall back to strict single-column (`w-full`, `px-4`, `py-8`) on `< 768px`.
163
+
164
+ ---
165
+
166
+ ## Backgrounds & Visual Depth
167
+
168
+ Don't default to empty decorative atmosphere. First decide whether the surface needs concrete assets:
169
+ - Product/object/person/place pages need real or generated subject imagery.
170
+ - Tools/dashboards need state previews, charts, tables, workflow screenshots, or diagrams.
171
+ - Fintech/public/B2B can use restrained semantic visuals; decoration must not reduce trust.
172
+
173
+ Atmospheric techniques are secondary:
174
+ - **Gradient meshes**: Organic, lava-lamp-like animated color blobs
175
+ - **Noise textures**: Subtle grain overlays on fixed pseudo-elements
176
+ - **Geometric patterns**: SVG-based repeating patterns
177
+ - **Layered transparencies**: Frosted glass with inner refraction borders
178
+ - **Dramatic shadows**: Tinted to background hue, not generic black
179
+
180
+ ### Expressive vs Functional Layers (verified 2026-07-09)
181
+
182
+ The strongest 2025-2026 announcement/hero grammar (OpenAI model cards, Apple
183
+ capsule UI) splits every surface into two layers that must never mix:
184
+
185
+ - **Expressive layer**: soft-focus organic photography, AI-generated texture,
186
+ grain, natural palettes — carries emotion, sits in the background, contains
187
+ NO functional text.
188
+ - **Functional layer**: opaque capsule/pill or card labels, buttons, and copy
189
+ floating ABOVE the expressive layer — full contrast, clean geometry, no
190
+ transparency tricks needed (the OpenAI pill is opaque white, not glass).
191
+
192
+ Rules: never set functional text directly on a busy expressive background
193
+ without its own opaque (or heavily scrimmed) container; never decorate the
194
+ functional layer with the expressive layer's texture; one expressive field per
195
+ viewport. This is the same layer logic as Apple's WWDC25 capsule system
196
+ (controls as a distinct functional layer over content) executed with opaque
197
+ surfaces.
198
+
199
+ Carve-out (FE-TOPBAR-STATE-01, canonical in `top-bar.md`): a scroll-adaptive
200
+ top bar may run a lighter at-top material (~70-80% opacity) ONLY when the hero
201
+ is authored with a calm bar zone (the expressive field deliberately leaves the
202
+ bar area quiet); once content scrolls beneath, the bar returns to near-opaque
203
+ (85-95%). All other functional-layer text keeps the opaque-container rule.
204
+ Emphasis inside pill chrome is carried by FILLS and tints, not by nested
205
+ capsule borders — child capsule borders/outlines at rest are banned
206
+ (FE-PILL-NEST-01, canonical in `liquid-glass.md`).
207
+
208
+ ### Glassmorphism / Liquid Glass (when used)
209
+ Glass recipes, layer discipline, perf and a11y gates are owned by
210
+ `liquid-glass.md` — read it before shipping any translucent material.
211
+ Short version: functional layer only, 1px inner border + inner shadow for
212
+ edge refraction, and consider the blur-free pill-over-imagery alternative.
213
+
214
+ ---
215
+
216
+ ## Visual Density (VISUAL_DENSITY dial)
217
+
218
+ | Level | Style |
219
+ | :---: | -------------------------------------------------------------------------------- |
220
+ | 1-3 | Art Gallery: lots of white space, huge section gaps, expensive/clean feel |
221
+ | 4-7 | Daily App: normal spacing for standard web apps |
222
+ | 8-10 | Cockpit: tiny paddings, 1px separators instead of cards, `font-mono` for numbers |
223
+
224
+ ---
225
+
226
+ ## UI States (Mandatory)
227
+
228
+ LLMs generate "static successul states." You MUST implement full interaction cycles:
229
+ - **Loading**: Skeletal loaders matching layout sizes. No generic circular spinners.
230
+ - **Empty**: Beautifully composed empty states indicating how to populate.
231
+ - **Error**: Clear inline error reporting.
232
+ - **Tactile Feedback**: On `:active`, use `-translate-y-[1px]` or `scale-[0.98]`.
233
+
234
+ ---
235
+
236
+ ## Image Rules
237
+
238
+ Use assets in this priority order:
239
+
240
+ 1. **Existing repo/design-system assets** → strongest fit for brand and provenance
241
+ 2. **User-provided or approved brand assets** → preserve original meaning and legal use
242
+ 3. **Generated local bitmap, SVG, diagram, chart, or screenshot** → create concrete visual evidence when no asset exists
243
+ 4. **Approved external CDN assets configured in the framework** → use only when allowed by project config
244
+ 5. **Temporary stock URLs** → prototypes only; label them as temporary and replace before production
245
+
246
+ Asset quality gates:
247
+ - Every meaningful image needs alt text that describes purpose, not file appearance.
248
+ - Set intrinsic dimensions, aspect-ratio, or layout constraints before rendering.
249
+ - Verify desktop, mobile, and narrow crops; the subject must not be clipped or hidden behind text.
250
+ - Use framework image optimization when available (`next/image`, responsive `srcset`, lazy loading).
251
+ - Track licensing/provenance for stock, generated, and third-party visuals.
252
+ - Never invent fake image URLs or ship generic egg/Lucide user icons as real avatars.
253
+
254
+ ---
255
+
256
+ ## Aesthetic Archetypes (Inspiration Library)
257
+
258
+ When choosing a direction, select from these. Each has distinct rules:
259
+
260
+ | Archetype | Color Vibe | Signature Effects |
261
+ | -------------------------- | ---------------------------------- | ------------------------------------------------- |
262
+ | Minimalism / Swiss | Monochrome + 1 accent | Razor-sharp hierarchy, micro hover lifts |
263
+ | Glassmorphism | Aurora/sunset + translucent whites | Frosted panels, glowing borders |
264
+ | Brutalism | Harsh primaries, black/white | Sharp corners, huge bold text, "broken" aesthetic |
265
+ | Dark OLED Luxury | #0a0a0a + vibrant accent | Velvet textures, cinematic entrance animations |
266
+ | Aurora / Mesh Gradient | Teal→purple→pink | Animated mesh gradients, color breathing |
267
+ | Retro-Futurism / Cyberpunk | Neon cyan/magenta on black | Scanlines, glitch transitions, chrome accents |
268
+ | Organic / Biomorphic | Earthy or muted pastels | SVG morphing, blob shapes, irregular borders |
269
+ | Editorial / Magazine | Warm neutrals, serif display | Column layouts, pull quotes, dramatic whitespace |
270
+
271
+ Vary between these. NEVER converge on the same archetype across generations.
272
+
273
+ ---
274
+
275
+ ### AI-Brand Grammar Vocabulary (verified 2026-07-09)
276
+
277
+ Direction shorthand for AI/tech surfaces, grounded in who actually designed what:
278
+
279
+ | Grammar | Signature | Provenance |
280
+ | --- | --- | --- |
281
+ | OpenAI: warm-sans organic | proprietary warm geometric sans + huge whitespace + soft natural photography/film grain + opaque capsule labels | In-house (Feb 2025 rebrand, led by Veit Moeller/Shannon Jager) + ABC Dinamo (OpenAI Sans) + Studio Dumbar/DEPT (motion/sound) |
282
+ | Anthropic: serif bookish | display serif at light weights + warm off-white page metaphor + editorial layout | Geist (Styrene + Tiempos system) |
283
+ | DeepMind: scientific dimensional | serif/sans duality (DM Serif/DM Sans by Colophon) + conceptual 3D systems | MultiAdaptor + someform |
284
+
285
+ Use these as direction vocabulary ("OpenAI-grammar hero", "Anthropic-grammar
286
+ editorial"), not as skins to copy verbatim; each pairs with the Expressive vs
287
+ Functional Layers rule above and the Serif Discipline gates.
288
+
289
+ ## Icon System
290
+
291
+ ```
292
+ Sizing system:
293
+ --icon-xs: 12px (inline metadata, tight spaces)
294
+ --icon-sm: 16px (inline with body text)
295
+ --icon-md: 20px (buttons, form elements)
296
+ --icon-lg: 24px (navigation, section icons)
297
+ --icon-xl: 32px (feature highlights, empty states)
298
+ --icon-2xl: 48px (hero icons, illustrations)
299
+ ```
300
+
301
+ - Icons inherit `currentColor` — never hardcode fill/stroke colors
302
+ - Stroke width consistent within a page (1.5px for Lucide, 2px for Heroicons)
303
+ - Icon + text alignment: `vertical-align: -0.125em` or flexbox `align-items: center`
304
+ - Touch target: icon buttons min 44x44px touch area (icon can be 24px, padding adds the rest)
305
+ - Never use icons without labels for critical actions (tooltip minimum, visible label preferred)
306
+ - Icon-only buttons require `aria-label`
307
+
308
+ ---
309
+
310
+ ## Print Styles
311
+
312
+ ```css
313
+ @media print {
314
+ nav, footer, .no-print, button, .cookie-banner { display: none; }
315
+ body { font-size: 12pt; line-height: 1.5; color: #000; background: #fff; }
316
+ a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; }
317
+ a[href^="#"]::after, a[href^="javascript"]::after { content: none; }
318
+ h2, h3 { page-break-after: avoid; }
319
+ table, figure, blockquote { page-break-inside: avoid; }
320
+ img { max-width: 100%; page-break-inside: avoid; }
321
+ p { widows: 3; orphans: 3; }
322
+ }
323
+ ```
324
+
325
+ - Only add print styles for content-heavy pages (blog, docs, reports)
326
+ - Marketing/landing pages: print is rarely needed — skip unless requested
327
+ - Test: Cmd+P in browser, check layout breaks