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,62 @@
1
+ # Korean UX Writing
2
+
3
+ Use this for Korean labels, headings, empty states, errors, notifications, onboarding, and button text.
4
+
5
+ ## Principles
6
+
7
+ - Use familiar Korean words. Avoid technical terms and Chinese-derived bureaucratic phrases when simpler Korean works.
8
+ - Tell users what they can do next, especially in errors.
9
+ - Prefer the user's goal over the internal feature name.
10
+ - Minimize honorifics unless the product domain requires formality.
11
+ - Use Arabic numerals for counts and limits.
12
+ - Keep one purpose per sentence.
13
+ - Use active voice.
14
+ - Use exclamation marks sparingly.
15
+ - Do not add periods to buttons, labels, tabs, menu items, or large display headings.
16
+
17
+ ## Good / Bad
18
+
19
+ | Avoid | Prefer |
20
+ | --- | --- |
21
+ | 요청 처리가 완료되었습니다. | 저장했어요 |
22
+ | 서버 에러가 발생했습니다. | 일시적으로 저장하지 못했어요. 잠시 후 다시 시도해주세요. |
23
+ | 다음 단계로 진행하시겠습니까? | 다음 단계로 갈까요? |
24
+ | 동네인증 가능한 위치가 아닙니다. | 이 위치에서는 동네인증을 할 수 없어요. |
25
+ | 회원님의 데이터가 정상적으로 조회되었습니다. | 정보를 불러왔어요. |
26
+
27
+ ## Tone By Domain
28
+
29
+ | Domain | Tone |
30
+ | --- | --- |
31
+ | Fintech/payment | calm, exact, low-anxiety |
32
+ | Public/gov | plain, formal enough, action-oriented |
33
+ | B2B/ops | short, utilitarian, unambiguous |
34
+ | Education/kids | encouraging, clear, forgiving |
35
+ | Community/commerce | warm, familiar, concrete |
36
+ | AI tools | transparent, reversible, clear about limits |
37
+
38
+ Do not confuse visual warmth with childish copy. A UI can use soft 3D assets while keeping mature Korean copy.
39
+
40
+ ## Error Messages
41
+
42
+ Every error should answer:
43
+
44
+ 1. What happened?
45
+ 2. Can the user fix it?
46
+ 3. What should happen next?
47
+
48
+ Examples:
49
+
50
+ ```text
51
+ 일시적으로 결제할 수 없어요. 잠시 후 다시 시도해주세요.
52
+ 파일이 너무 커요. 20MB 이하 파일을 올려주세요.
53
+ 연결이 끊겼어요. 입력한 내용은 이 기기에 임시 저장했어요.
54
+ ```
55
+
56
+ ## Labels And Buttons
57
+
58
+ - Use verbs for actions: `저장`, `다시 시도`, `초대 보내기`.
59
+ - Avoid vague verbs: `처리`, `진행`, `수행`.
60
+ - Keep button text short, but do not clip long Korean text. Wrap or resize responsibly.
61
+ - Do not use all-caps English as a visual crutch in Korean UI.
62
+
@@ -0,0 +1,102 @@
1
+ # Visual Verification
2
+
3
+ Do not declare frontend work complete from code alone. Render and inspect the UI.
4
+
5
+ ## Required Checks
6
+
7
+ For substantial UI changes:
8
+
9
+ - run the existing dev/build command first; if it fails, stop and report the exact command/output
10
+ - use Playwright when available; otherwise use the repo's existing visual test or browser tooling
11
+ - desktop screenshot around 1440px width
12
+ - split-screen / tablet screenshot around 1024px width
13
+ - tablet portrait screenshot around 768px width
14
+ - mobile screenshot around 390px width
15
+ - narrow screenshot around 320px width when text/buttons are dense
16
+ - Korean long-label stress case for Korean-first UI
17
+ - loading, empty, error, disabled, success, and permission-denied states where applicable
18
+ - keyboard tab order and focus-visible states
19
+ - reduced-motion behavior
20
+ - scroll-motion count vs FE-MOTION-BUCKET-01: landing bucket shows >= 2 and
21
+ <= ~4 distinct scroll-driven moments; tool surfaces (dashboard/admin/finance/
22
+ gov) show ZERO scroll-driven motion
23
+ - autoplay video: poster present, pauses offscreen (IO-gated), respects
24
+ `prefers-reduced-motion` and `prefers-reduced-data`
25
+ - asset rendering and framing
26
+ - text overlap and clipping
27
+ - attach screenshot paths in the report, or state exactly what remained unverified
28
+
29
+ ## What To Look For
30
+
31
+ - headings too large for the surface
32
+ - buttons with clipped Korean text
33
+ - card-heavy layout with weak hierarchy
34
+ - assets obscuring labels or CTA
35
+ - generic gradient/blob backgrounds replacing concrete visual content
36
+ - soft 3D assets that look unrelated or public-pack generic
37
+ - mobile safe-area problems (content behind notch/home indicator, missing `env(safe-area-inset-*)`)
38
+ - touch targets < 44px on mobile (buttons, links, form inputs)
39
+ - hover-only interactions with no tap alternative on mobile
40
+ - hover/focus states changing layout dimensions
41
+ - clipped labels, especially Korean button text and dense table headers
42
+ - missing images, broken external domains, blurry generated assets
43
+ - unreadable focus rings, focus hidden under sticky headers/bottom bars
44
+ - Hero headline renders balanced on desktop (1440px) AND mobile (390px) — no orphaned single word
45
+ - Integration/partner logos use real brand SVGs, not generic stroke icons
46
+ - Logo wall has no per-item hover effect and no orphan grid cells
47
+ - CTA button labels do not break across lines at any viewport
48
+ - Page containment: content does not stretch to viewport edges on wide monitors (max-w wrapper present)
49
+ - Split-screen test: page looks intentional at 768px and 1024px, not just "broken desktop"
50
+ - Mobile CTA visible without scroll in hero; sticky CTA present on long conversion pages
51
+ - Responsive images: no desktop-sized images loading on mobile (check srcset/sizes or framework optimization)
52
+
53
+ ### CTA Integrity (MANDATORY)
54
+
55
+ 1. **No duplicate intent:** Two buttons linking to the same destination → merge into one. Two "Get Started" CTAs on same viewport → remove one.
56
+ 2. **Form field contrast:** Input borders must be visible against background (minimum 3:1 against surrounding bg). Test: toggle between light/dark if applicable.
57
+ 3. **CTA hierarchy:** One primary CTA per viewport section. Secondary CTAs use ghost/outline style only.
58
+
59
+ ## Tool Workflow
60
+
61
+ ```ts
62
+ import { expect, test } from '@playwright/test'
63
+
64
+ test('desktop and mobile visual states', async ({ page }) => {
65
+ await page.setViewportSize({ width: 1440, height: 1000 })
66
+ await page.goto('/')
67
+ await expect(page).toHaveScreenshot('desktop.png', { fullPage: true })
68
+
69
+ await page.setViewportSize({ width: 390, height: 844 })
70
+ await expect(page).toHaveScreenshot('mobile.png', { fullPage: true })
71
+ })
72
+ ```
73
+
74
+ For component libraries, prefer Storybook stories for each state and run Chromatic, Storybook test-runner, or equivalent screenshot checks if already configured.
75
+
76
+ Fail delivery until these are resolved:
77
+ - overlap or clipped text
78
+ - missing assets or unverified external images
79
+ - unreadable focus state
80
+ - keyboard trap
81
+ - untested dense Korean labels
82
+ - soft 3D/character assets that do not pass the domain gate
83
+
84
+ ## Screenshot Report
85
+
86
+ When reporting, include:
87
+
88
+ ```text
89
+ desktop (1440px): checked / issue / screenshot path
90
+ split-screen (1024px): checked / issue / screenshot path
91
+ tablet (768px): checked / issue / screenshot path
92
+ mobile (390px): checked / issue / screenshot path
93
+ narrow (320px): checked / issue / screenshot path
94
+ states: checked / issue
95
+ assets: checked / issue
96
+ motion: checked / issue
97
+ scroll-motion count (bucket floor/ceiling): checked / issue
98
+ autoplay mechanics (poster/pause/reduced): checked / issue / n-a
99
+ keyboard/focus: checked / issue
100
+ ```
101
+
102
+ If a browser/server/tool is unavailable, say exactly what failed and what remains unverified.
@@ -0,0 +1,477 @@
1
+ ---
2
+ name: ima2-uiux
3
+ description: "Design direction discovery and UX judgment for ima2 users. Use for UI/UX direction and design judgment — vague visual briefs, onboarding, empty/error/loading states, layout vocabulary, typography breaks, favicons, logos, and brand identity choices. Pairs with ima2-front: this skill decides the design direction, then load cxc-dev-frontend to implement it. Triggers: make it look good, modern, clean, aesthetic, onboarding, empty state, error state, favicon, logo, design system, 깔끔하게, 모던하게, 감성적으로."
4
+ metadata:
5
+ last-verified: "2026-07-02"
6
+ short-description: "ima2-powered design judgment for vague briefs, UX states, typography, layout patterns, logos, and brand vocabulary."
7
+ ---
8
+
9
+ # ima2 UI/UX: Intent Discovery, Patterns & Product Vocabulary
10
+
11
+ ## Setup
12
+
13
+ ```bash
14
+ npm install -g ima2-gen # install globally (Node.js >= 20)
15
+ ima2 setup # first-time auth (GPT OAuth recommended)
16
+ ima2 serve # start local server
17
+ ima2 ping # verify
18
+ ima2 status # config and OAuth status
19
+ ```
20
+
21
+ **Agent bootstrap:** `ima2 ping` first. If unreachable: `ima2 serve &`. If not
22
+ installed: `npm install -g ima2-gen && ima2 setup`. Use `ima2 skill path` to
23
+ locate skills; read `../ima2-uiux/SKILL.md` (this file) for design direction,
24
+ `../ima2-front/SKILL.md` for implementation assets.
25
+
26
+ Activates by change surface when:
27
+ - User's design direction is vague ("깔끔하게", "모던하게", "just make it look good")
28
+ - Building onboarding, empty state, error state, or loading state UI
29
+ - User references a product aesthetic ("Notion 느낌", "Linear처럼")
30
+ - Starting a new design system or generating a color palette
31
+ - Choosing layout patterns or navigation architecture
32
+ - Setting up favicons, product logos, or brand identity elements
33
+ - Handling logo dark mode variants, OG images, or social sharing meta
34
+
35
+ Read this before style-specific references when the user cannot articulate a clear design direction.
36
+ For anti-slop detection and banned patterns, defer to `ima2 skill front ref anti-slop`, especially the 2026 gradient budget and one-note theme bans.
37
+
38
+ **Emoji ban (stub):** no emoji as UI visual elements (STRICT). Canonical rule, scope, and exemptions: `ima2-front` §5 / `ima2 skill front ref anti-slop` § Emoji Slop.
39
+
40
+ **Role separation:** This skill owns design judgment: intent discovery, information architecture, UX state meaning, typography/color/layout direction, product personality, brand vocabulary, anti-slop pattern judgment, and design-system decisions. `ima2-front` owns implementation: HTML/CSS/components, responsive mechanics, accessibility wiring, runtime behavior, and rendered verification. After choosing the design direction here, load `ima2-front` for concrete implementation.
41
+
42
+ **External/current design evidence:** For live product-reference claims, current
43
+ design-system docs, browser API behavior, accessibility guidance that may have
44
+ changed, or browser-rendered source evidence, search the web and
45
+ follow its query-rewrite, source-fetch, and evidence-status rules. Use browser
46
+ fetch/open/text/get-dom/snapshot only after candidate URLs exist.
47
+
48
+ > **C0/C1 work (small local patches):** For small patches, skip the full reference chain.
49
+
50
+ > **Rule class note (UX-STYLE-01):** Everything in this skill that expresses taste —
51
+ > product personalities, design-isms, preset tokens, aesthetic vocabulary — is
52
+ > `STYLE_SAMPLE`: examples to draw from, never universal requirements. Objective UX
53
+ > correctness (state coverage, accessibility, readability) is owned by `ima2-front`
54
+ > §1.5 and stays STRICT/DEFAULT.
55
+
56
+ ## Modular References
57
+
58
+ > **Recommended: install skills to your agent's skill directory.**
59
+ > ```bash
60
+ > ima2 skill install --dir <agent-skill-path> # agent provides its own path
61
+ > ima2 skill install --tmp # ephemeral fallback
62
+ > ```
63
+ > The agent determines its own skill directory and passes it via `--dir`.
64
+ > After install, SKILL.md and `references/` are on disk for native reading.
65
+ >
66
+ > **Ad-hoc reading (without install):**
67
+ > ```bash
68
+ > ima2 skill uiux refs # list all reference modules with line counts
69
+ > ima2 skill uiux ref design-isms # print one module (basename match)
70
+ > ```
71
+
72
+ | File | When to Read | What It Covers |
73
+ |------|-------------|----------------|
74
+ | `references/design-isms.md` | User names a style/movement | 15 design movements with CSS signatures, incl. Liquid Glass + Liquid Editorial default kit (2025-2026) + AI Serif Editorial + Organic Capsule (verified 2026-07-09) |
75
+ | `references/design-read-example.md` | Learning or reviewing Design Read format | Filled-in Design Read + dial setting example |
76
+ | `references/product-personalities.md` | User references a product | 10 product DNA profiles with exact tokens, incl. 2026 AI-product pastel + OpenAI warm-sans organic + Anthropic serif bookish |
77
+ | `references/layout-macrostructures.md` | Choosing page/component layout | Component layouts + page-level compositions |
78
+ | `references/ux-states.md` | Building any stateful UI | Onboarding, empty, error, loading, progressive disclosure |
79
+ | `references/color-system.md` | Generating colors/palette | OKLCH-based palette generation, hue budget, tinted neutrals, dark mode, accessibility |
80
+ | `references/design-system-bootstrap.md` | New project / design system | Token architecture, component hierarchy, **DESIGN.md format** (google-labs-code/design.md) |
81
+ | `references/responsive-nav.md` | Responsive or navigation work | Breakpoints, container queries, nav patterns by density |
82
+ | `references/ux-preflight.md` | **Before delivery** | UX state verification checklist |
83
+ | `references/typography-line-breaks.md` | **Always for text-heavy UI** | Heading break quality, **short descriptor category** (hero subtitle, card desc — use `balance` not `pretty`), orphan prevention, `ch` units, Korean orphan criteria, `-webkit-line-clamp` conflict |
84
+ | `references/favicon-logo.md` | **Favicon, product logo, or brand identity work** | Favicon file set, SVG dark mode, logo in nav/footer, dark mode variants, OG images, brand tokens, common mistakes |
85
+ | `references/logo-trust-sections.md` | Integration/partner/client logos | Marquee vs grid decision, anti-patterns, grayscale treatment, placement |
86
+ | `references/visual-hierarchy.md` | Any layout / composition decision | 6 levers: size scale, weight contrast, color emphasis, spacing, position, density |
87
+ | `references/form-patterns.md` | Forms, wizards, auth, file upload | Validation timing, multi-step, password UX, file upload, search/filter |
88
+ | `references/mobile-native-ux.md` | Native mobile app UX decisions | iOS HIG vs Material 3, gestures, deep linking, Korean privacy, app store UX |
89
+ | `references/intent-discovery-ladder.md` | UX-INTENT-01 optional deepening (Steps 1-6) | Mood/lightness/density/shape/viewport/reference ladder, vague request disambiguation |
90
+ | `references/korean-design-vocabulary.md` | Korean design briefs or Korean-first UI | Korean descriptor → CSS token translation, quick-match table, font selection guidelines |
91
+
92
+ ---
93
+
94
+ ## Lazy-User Gate (UX-LAZY-01, DEFAULT — ponytail discipline applied to UX)
95
+
96
+ Design for the cognitively frugal user: users don't read, they scan; they satisfice;
97
+ they will trade choice for one obvious next action. Before shipping any user-facing
98
+ decision point — option, setting, step, confirmation, input field, mode — justify its
99
+ existence the ponytail way, in order:
100
+
101
+ 1. **Do nothing**: can a correct default remove this decision entirely?
102
+ 2. **Delete**: does the step/field earn its completion-rate cost (Hick's law)?
103
+ 3. **Absorb**: can the system take the complexity instead of the user (Tesler's law)?
104
+ 4. **Demote**: still needed for some users → progressive disclosure, never a top-level fork.
105
+
106
+ Every screen has ONE primary action. Surface-conditional: consumer/one-shot flows
107
+ minimize DECISIONS; repeated-work tools (dense profiles) minimize repeated MOTIONS —
108
+ collapsing expert controls into wizards is the inverse failure. STRICT exemptions:
109
+ destructive/irreversible actions, consent/privacy/legal, payments confirmation, and
110
+ accessibility affordances are never collapsed into magic defaults.
111
+
112
+ ## UX State Contract (UX-STATE-01)
113
+
114
+ For onboarding, empty, loading, error, or progressive-disclosure work, the body must answer the state meaning before styling. Deep patterns live in `references/ux-states.md`.
115
+
116
+ - Onboarding teaches the first meaningful action, not the whole product.
117
+ - Empty explains why the state exists and names the next action.
118
+ - Loading chooses skeleton for known structure, spinner/progress for short unknown waits, and avoids fake completion.
119
+ - Error exposes retry, recovery, or escalation; never dead-end the user.
120
+ - Progressive disclosure names what stays hidden, why it stays hidden, and where it becomes available.
121
+
122
+ ## IA Chooser (UX-IA-01)
123
+
124
+ Default navigation architecture by work shape; read `references/responsive-nav.md` for responsive details.
125
+
126
+ | Work shape | Default IA |
127
+ |------------|------------|
128
+ | Dense desktop repeated work | Sidebar + command palette |
129
+ | Medium sectioned work | Tabs or segmented navigation |
130
+ | Mobile-primary consumer flow | Bottom nav, sheet, or thumb-zone actions |
131
+ | Wizard/auth/setup | Stepper or stacked linear flow |
132
+
133
+ ## 1. User Intent Discovery Protocol
134
+
135
+ When the user's design request is vague ("깔끔하게 해줘", "모던하게", "just make it look good"), do not produce generic output. Run the compact ambiguity flow (UX-INTENT-01):
136
+ 1. Produce the Design Read from §2 using available signals.
137
+ 2. If one decision still blocks the direction, ask ONE best clarifying fork with binary/ternary choices.
138
+ 3. Proceed from the answer; if the user does not answer and the task can continue, choose the most domain-correct default and state the assumption. On EXPRESSIVE surfaces (landing/consumer/creative/AI-product), that default is the No-Brief Default Direction below (UX-DEFAULT-ISM-01); quiet surfaces keep quiet domain-correct defaults.
139
+
140
+ > Skip this section if the user provided explicit design specs or this is a ≤5-line patch.
141
+
142
+ ### No-Brief Default Direction (UX-DEFAULT-ISM-01, DEFAULT — kit content STYLE_SAMPLE)
143
+
144
+ This is the UX-INTENT-01 step-3 FALLBACK, never a bypass: it fires only after
145
+ the Design Read and after the one blocking fork is resolved or unanswered, and
146
+ the applied direction is ALWAYS stated as an explicit assumption in the
147
+ deliverable. A named, specific, domain-gated direction replaces generic LLM
148
+ defaults; it must NOT reintroduce generic glassmorphism / centered-card /
149
+ beige-default taste under a new label.
150
+
151
+ Default kit for expressive surfaces: **Liquid Editorial** (2026 composite,
152
+ decided 2026-07-07 from Tier-2 trend research — see `references/design-isms.md`
153
+ §1.13 for the full signature):
154
+
155
+ - Structure: type-led editorial composition (oversized authored headline
156
+ scale, grotesk default, serif display only with editorial rationale per
157
+ UX-TYPE-01), tactile/photographic texture over flat gradient washes,
158
+ asymmetric content-weighted layout.
159
+ - Material accent: Liquid Glass or near-opaque pill chrome ONLY on floating
160
+ functional layers (nav/toolbars/chip clusters); pill-chip content units;
161
+ content layer stays solid (`ima2-front` FE-LIQUID-LAYER-01). Children
162
+ inside pill chrome carry no capsule borders/outlines at rest — emphasis via
163
+ fills/tints only (`ima2-front` FE-PILL-NEST-01); top-bar scroll states per
164
+ `ima2-front` `top-bar.md` FE-TOPBAR-STATE-01.
165
+ - Motion: feedback baseline + one signature moment (pointer-proximity chips or
166
+ scroll-driven reveal) + >= 1 supporting scroll reveal on landing-bucket
167
+ surfaces (floor 2, ceiling ~4 — `ima2-front` `motion.md`
168
+ FE-MOTION-BUCKET-01); feedback-only elsewhere, per motion domain gates.
169
+ - Color: OKLCH-derived single accent + tinted neutrals (hue budget,
170
+ `references/color-system.md`).
171
+
172
+ Domain gate (STRICT): dashboards, admin, ops, finance, gov, B2B repeated-work
173
+ tools NEVER receive this kit by default — "fancy" never overrides domain
174
+ correctness (§ IA Chooser + `ima2-front` product-density profiles).
175
+
176
+ **Optional deepening:** use the ladder below only when the first fork fails or the user explicitly wants guided exploration.
177
+ - Use binary/ternary choices, not open-ended questions.
178
+ - Reference known products — users recognize what they want faster than they articulate it.
179
+ - If the diagram skill is available, offer: "참고로 스타일 비교를 다이어그램으로 보여드릴 수도 있어요."
180
+ - If the user names a specific product reference, skip remaining steps and map directly via `references/product-personalities.md`.
181
+
182
+ For the full 6-step guided ladder (Mood → Lightness → Density → Shape → Viewport →
183
+ Reference) and vague-request disambiguation table, read
184
+ `references/intent-discovery-ladder.md`. Load it only when the compact flow above
185
+ needs deeper guided exploration.
186
+
187
+ ---
188
+
189
+ ## 2. Design Read (MANDATORY for new pages, components, or layouts. Optional for ≤5-line patches — see dev §0.1 Patch Fast-Path.)
190
+
191
+ Before generating ANY frontend code, produce a Design Read. If the project has a `DESIGN.md` file, read it first — its tokens and prose override everything below.
192
+
193
+ Native tool support (structure/60): read visual references — existing screens, competitor
194
+ captures, design exports — into context with `view_image` before writing the Design Read;
195
+ produce needed bitmap assets (icons, illustrations, mock imagery) with `ima2` (probe
196
+ `ima2 status`, attempt `ima2 serve` if down; ima2 is the primary tool
197
+ only when ima2 is truly unavailable) rather than leaving placeholder boxes; and verify the built
198
+ result visually per visual verification (browser screenshot -> `view_image`).
199
+
200
+ ### Output format (mini DESIGN.md)
201
+
202
+ Filled-in example: `references/design-read-example.md`.
203
+
204
+ ```yaml
205
+ ---
206
+ name: <project-name>
207
+ colors:
208
+ primary: "<hex>"
209
+ accent: "<hex>"
210
+ background: "<hex>"
211
+ typography:
212
+ heading: { fontFamily: <font>, fontSize: <size> }
213
+ body: { fontFamily: <font>, fontSize: <size> }
214
+ ---
215
+ ```
216
+
217
+ Reading this as: <page kind> for <audience>, with a <vibe> language.
218
+ <1-2 sentences: specific reference, not adjectives. "1970s lecture handout" > "modern and clean">
219
+
220
+ Do's: <context-specific positive from brief>
221
+ Don'ts: <context-specific ban from brief>
222
+
223
+ ### Signals to read
224
+ 1. Page kind — landing (SaaS/consumer/agency/event), portfolio, redesign, editorial, app UI, tool UI
225
+ 2. Vibe words — what the user said or implied
226
+ 3. Reference signals — URLs, screenshots, brands named
227
+ 4. Audience — B2B procurement vs design-conscious consumer vs recruiter
228
+ 5. Existing brand assets — logo, color, type, photography
229
+ 6. Quiet constraints — accessibility-first, public-sector, regulated, kids
230
+
231
+ ### Dial Setting (MANDATORY — immediately after Design Read)
232
+
233
+ From the Design Read, derive and declare three dials before any code:
234
+
235
+ ```
236
+ DESIGN_VARIANCE: <1-10>
237
+ MOTION_INTENSITY: <1-10>
238
+ Product density profile: <D1-D8> (see `ima2 skill front ref product-density`)
239
+ Reasoning: <one sentence explaining why these values match the brief>
240
+ ```
241
+
242
+ Inference rules:
243
+ - Corporate/gov/utility → VARIANCE 2-4, MOTION 1-3, density D2-D3
244
+ - Marketing/landing → VARIANCE 4-7, MOTION 5-7 (scroll-motion floor applies, FE-MOTION-BUCKET-01), density D2-D3
245
+ - Creative/portfolio/editorial → VARIANCE 6-9, MOTION 5-7 (landing-bucket scroll floor applies, FE-MOTION-BUCKET-01), density D1-D3
246
+ - Dashboard/SaaS/admin → VARIANCE 2-4, MOTION 1-2 (scroll-driven = 0), density D4-D5
247
+ - "Complex" in brief → increase density profile (functional depth), NOT VARIANCE or MOTION
248
+ - "Simple" in brief → decrease all three proportionally
249
+
250
+ "복잡하다" = high DESIGN_VARIANCE is WRONG. Complexity means more features/data/flows, not more visual tricks (carousels, parallax, animations).
251
+
252
+ ### Anti-Default Discipline
253
+ Do not default to: warm beige backgrounds, centered hero, three equal feature cards, generic glassmorphism, Inter + slate-900, card-based everything. These are LLM defaults. Reach past them BASED ON the design read.
254
+ When no brief exists at all, the sanctioned replacement for these generic
255
+ defaults is the named kit in §1 UX-DEFAULT-ISM-01 — deliberate, domain-gated,
256
+ and stated as an assumption; it is not an exemption from this discipline.
257
+
258
+ If the brief is ambiguous, follow UX-INTENT-01: Design Read → ONE clarifying fork → proceed.
259
+
260
+ ### DESIGN.md persistence
261
+ If the project needs persistent design tokens across sessions, save the Design Read as a full `DESIGN.md` in the project root. Format spec: `references/design-system-bootstrap.md § DESIGN.md Format`.
262
+
263
+ ---
264
+
265
+ ## 2.5 Visual Concept Exploration (UX-CONCEPT-GEN-01, DEFAULT)
266
+
267
+ Before implementing a C2+ NEW/redesigned expressive or brand-visible UI surface
268
+ (landing page, hero, key chrome such as a top bar, or major visual redesign),
269
+ generate visual concept candidates BEFORE frontend code. C0/C1 patches and
270
+ utility CRUD/dashboard screens are exempt.
271
+
272
+ 0. **Probe, start, then choose the generator.** Run `ima2 status` first. If the
273
+ server is down, attempt `ima2 serve` in the background, then re-run
274
+ `ima2 status` before skipping or falling back. Use `ima2 gen` only when
275
+ `ima2` is truly unavailable after that serve attempt. State the chosen
276
+ generator in the deliverable; if generation is skipped, state the exact skip
277
+ reason and persist it in the devlog.
278
+ 0.5. **If the ism/direction is unclear, go IMAGE-FIRST (UX-IMAGE-FIRST-01, DEFAULT).**
279
+ When the user's brief does not name a specific ism, product reference, or
280
+ design direction — "make me a website for X", "landing page for Y",
281
+ vague aesthetic words without concrete reference — do NOT guess a direction
282
+ from text alone. Instead, let generated images DISCOVER the direction:
283
+
284
+ **Round 1 — Ism exploration (5 images, broad).** Write 5 maximally detailed
285
+ prompts, each expressing a DIFFERENT plausible ism/direction for the brief.
286
+ Vary: layout family (editorial vs product-led vs bento vs asymmetric), palette
287
+ temperature (warm vs cool vs monochrome), typography stance (serif editorial vs
288
+ grotesk minimal vs geometric bold), material (glass vs matte vs textured), and
289
+ hero grammar (full-bleed photo vs device mockup vs type-only). Every prompt must
290
+ be detailed enough that a reader can reconstruct the layout — pin domain, audience,
291
+ specific hex palette, font direction, hero composition, section hint, and density.
292
+ Vague prompts ("modern clean landing page") are banned.
293
+
294
+ ```bash
295
+ # Launch 5 different ism directions in parallel
296
+ ima2 gen "Use case: landing page. Editorial serif direction. Full-bleed hero with \
297
+ oversized light-weight serif headline 'Artisan Coffee', warm stone palette \
298
+ #f5f0eb/#2c2420/#c4956a, asymmetric layout, editorial photography of pour-over \
299
+ coffee, generous whitespace, matte paper texture at 3% opacity. No icons, no \
300
+ cards. Dense footer with serif nav." --quality high --size 1536x1024 \
301
+ -o ./concepts/01_editorial_serif.png &
302
+ ima2 gen "Use case: landing page. Geometric grotesk direction. ..." \
303
+ -o ./concepts/02_geometric_grotesk.png &
304
+ ima2 gen "Use case: landing page. Product-led device mockup direction. ..." \
305
+ -o ./concepts/03_product_mockup.png &
306
+ ima2 gen "Use case: landing page. Dark premium minimal direction. ..." \
307
+ -o ./concepts/04_dark_premium.png &
308
+ ima2 gen "Use case: landing page. Warm organic capsule direction. ..." \
309
+ -o ./concepts/05_warm_capsule.png &
310
+ ima2 ps --json # monitor all 5
311
+ wait
312
+ ```
313
+ ```bash
314
+ # Round 1: 5 ism directions in parallel (each prompt must be maximally detailed)
315
+ ima2 gen "Use case: landing page. Editorial serif direction. Full-bleed hero, \
316
+ oversized light-weight serif 'Artisan Coffee', warm stone #f5f0eb/#2c2420, \
317
+ asymmetric layout, editorial pour-over photo, matte paper 3%." \
318
+ --quality high --size 1536x1024 -o ./concepts/01_editorial.png &
319
+ ima2 gen "Use case: landing page. Geometric grotesk direction. ..." -o ./concepts/02_grotesk.png &
320
+ ima2 gen "Use case: landing page. Product-led mockup direction. ..." -o ./concepts/03_product.png &
321
+ # ... (2 more ism directions)
322
+ ima2 ps --json # monitor
323
+ wait
324
+ ```
325
+ Inspect all 5 with `view_image`. Build a quick-scorecard (which ism has the
326
+ strongest: hero composition, palette coherence, typographic voice, density fit
327
+ for the domain). Pick the WINNING ISM — not the winning image.
328
+
329
+ **Round 2 — Ism refinement (3-4 images, focused).** Lock the chosen ism.
330
+ Write 3-4 new prompts that all express THIS ism but vary execution details:
331
+ accent color temperature, hero image subject, section layout hints, CTA
332
+ treatment, stat/proof-bar placement. Use `--ref` with the best Round 1 image
333
+ as a style anchor.
334
+
335
+ ```bash
336
+ # Round 2: 3-4 refinements of the winning ism, anchored to Round 1 best
337
+ ima2 gen "Same editorial direction. Vary: latte art hero, accent #b8860b gold, \
338
+ proof bar below fold." --ref ./concepts/01_editorial.png --quality high -o ./concepts/06_a.png &
339
+ ima2 gen "Same direction. Vary: weight 300 headline, ..." --ref ./concepts/01_editorial.png -o ./concepts/07_b.png &
340
+ # ... (1-2 more refinement variations)
341
+ wait
342
+ ```
343
+
344
+ Synthesize Round 2 into the element ledger (step 3 below). Lock DESIGN.md.
345
+
346
+ **`ima2 gen` fallback:** generate 2-3 ism candidates sequentially (one per
347
+ call), inspect each with `view_image`, pick the ism, then generate 2 refinement
348
+ candidates sequentially. Slower but the same two-round logic applies.
349
+
350
+ **Auto loop (HOTL) behavior:** this entire 0.5 step runs autonomously when a
351
+ goal is active. The agent picks the ism from Round 1 with stated reasoning
352
+ (recorded in devlog), then proceeds to Round 2 and step 3 synthesis without
353
+ user confirmation. The ism choice rationale is persisted so the user can
354
+ review it post-hoc.
355
+
356
+ Skip step 0.5 when: the user named a specific ism ("Notion feel", "Linear style",
357
+ a product reference mapped via `references/product-personalities.md`), the user
358
+ provided a reference screenshot or design file, or UX-INTENT-01 already resolved
359
+ the direction to a concrete ism.
360
+
361
+ 1. **Lock ONE concept, write maximally specific prompts for it.** Decide the
362
+ single design concept first (domain, audience, palette family, hero/chrome
363
+ grammar, density, signature visual). Page-level surfaces get 5 prompts that
364
+ all express that SAME concept but vary the execution: emphasis points, fine
365
+ layout choices, accent treatment, type nuance, secondary-section hints.
366
+ Component-level surfaces get about 3 prompts that render the component INSIDE
367
+ its top-viewport context (for example top bar plus hero together), never as
368
+ an isolated component strip. Reference captures collected to ground mockups
369
+ are generation inputs (`--ref`), not skip reasons. Each prompt still pins:
370
+ domain + audience, layout family and hero/chrome grammar (FE-HERO-SPLIT-01
371
+ applies -- no split hero unless the user asked), palette with concrete hues
372
+ (color-system bans apply), typography direction, material, motion/asset
373
+ intent, and density. Vague prompts ("modern clean landing page") are banned:
374
+ a reader must be able to reconstruct the layout from the prompt alone.
375
+ 2. **Generate into the active devlog unit assets directory.** For page-level
376
+ surfaces, keep the 5-render process: run `ima2 gen <prompt> -n 1 -o <path>`
377
+ five times concurrently (or `ima2 gen <prompt> -n 5 -d <dir>` for a single
378
+ request) and monitor with `ima2 ps --json`. For component-level surfaces,
379
+ generate about 3 context-strip renders of the component within its top
380
+ viewport context. If the mockup needs motion material, use `ima2 video`.
381
+ Asset prompts inside mockups/builds should be VERY EXPLICIT LONG prompts;
382
+ prefer real/generated photographic, texture, illustration, or motion assets
383
+ over CSS gradient washes.
384
+ **Parallel strategy selection** (see `ima2 skill front ref asset-requirements`
385
+ FE-ASSET-PARALLEL-01): for the 5-render process, prefer `ima2 gen -n 5 -d <dir>`
386
+ (single-request batch) when all 5 share the same locked concept prompt. Use
387
+ `ima2 multimode "<prompt>" --max-images 5` when you want SSE streaming to inspect
388
+ candidates as they arrive and cancel early if a strong candidate lands. For
389
+ structurally different concept directions (e.g. 3 editorial + 2 product-led),
390
+ launch independent `ima2 gen` commands in parallel and monitor with `ima2 ps --json`.
391
+ Cancel unwanted jobs with `ima2 cancel <requestId>` once a strong direction emerges.
392
+ **`ima2 gen` fallback**: generate candidates sequentially (one per call), inspect
393
+ each with `view_image` before the next. No multimode or parallel equivalent;
394
+ compensate with more targeted prompt refinement between rounds.
395
+ 3. **Read the renders side by side and SYNTHESIZE -- do not pick one winner.**
396
+ Each render usually nails some elements and fumbles others. The output is not
397
+ "which variant is best"; it is "which elements are best across all of them."
398
+ For pages, build an element ledger for palette, hero composition, type
399
+ treatment, signature visual, stat row, bottom-section hint, and every other
400
+ design token. For components, shrink the ledger to the component tokens:
401
+ material, radius, fills, type, icon/logo treatment, state treatment, and
402
+ immediate context fit. For every token, note WHICH variant did it best and
403
+ WHY. Show the user the images (markdown image tags with absolute paths) with
404
+ the synthesis ledger and let them confirm/adjust the per-token picks; in
405
+ autonomous/goal mode make the picks with stated reasoning and record it.
406
+ Use the selection scorecard from `asset-requirements.md` FE-ASSET-SELECT-01
407
+ (subject fidelity, composition, palette, text render, asset-type fit,
408
+ technical quality) as a structured rubric for per-token evaluation.
409
+ 4. **Make the SYNTHESIZED DESIGN.md the Design Read basis.** Extract palette,
410
+ layout family, type direction, material, asset/motion intent, and every other
411
+ token from the element ledger into DESIGN.md, with each token citing its
412
+ source variant. Never pixel-copy any single render (generated text/logos are
413
+ unreliable) -- the synthesis is a direction lock assembled from the best
414
+ parts, not one asset. A mockup is not render verification; visual verification
415
+ remains owned by `visual-verification.md`.
416
+
417
+ Precedence: UX-CONCEPT-GEN-01 governs the PRE-CODE concept stage. After code
418
+ exists, `iterative-design.md` Alive/Dead governs POST-CODE iteration rounds.
419
+ When structural variants are still needed, `prototype-variants.md` runs AFTER
420
+ the concept lock.
421
+
422
+ Skip (state the skip): user handed a FINISHED design to implement; an existing
423
+ design system governs the surface; the work is a C0/C1 patch; the surface is a
424
+ utility CRUD/dashboard screen; or `ima2` is truly unavailable after `ima2 status`,
425
+ an attempted `ima2 serve`, and a failed re-check, with `ima2 gen` also
426
+ unavailable or inappropriate. Captured/collected reference material to ground
427
+ mockups is NOT a skip; it becomes generation input via `--ref`.
428
+ ---
429
+
430
+ ## 2.6 Asset Generation Templates for Concept Passes (UX-ASSET-GEN-01, DEFAULT)
431
+
432
+ When concept exploration (UX-CONCEPT-GEN-01) or image-first ism discovery
433
+ (UX-IMAGE-FIRST-01) generates component/element mockups that need to float
434
+ over arbitrary backgrounds — icons, 3D objects, product shots, stickers,
435
+ UI chrome elements — use the cutout asset pipeline. GPT Image 2 cannot
436
+ produce transparent backgrounds reliably; solid-bg-then-remove is mandatory.
437
+
438
+ **Cutout asset prompt template (concept pass):**
439
+
440
+ ```bash
441
+ # Reflective/metallic/glass → PURE BLACK bg
442
+ ima2 gen "3D render of [subject], [material], [composition]. \
443
+ Floating on a PURE SOLID BLACK background hex #000000. \
444
+ No checkerboard, no transparency pattern, no gradient, \
445
+ no floor plane, no shadow, no vignette, no ambient glow." \
446
+ --quality high --size 1024x1024 --mode direct -o concept-asset.png
447
+
448
+ # Dark/matte subjects → PURE WHITE bg
449
+ ima2 gen "[subject], centered, floating. PURE SOLID WHITE background \
450
+ hex #ffffff. No shadow, no gradient, no surface." \
451
+ --quality high --size 1024x1024 --mode direct -o concept-asset.png
452
+
453
+ # Known destination color → match it
454
+ ima2 gen "[subject], centered. PURE SOLID background hex #[target]. \
455
+ No gradient, no texture, no shadow." \
456
+ --quality medium --size 512x512 --mode direct -o concept-asset.png
457
+ ```
458
+
459
+ **CSS removal (zero post-processing):**
460
+ - Black bg on light page: `mix-blend-mode: screen`
461
+ - White bg on dark page: `mix-blend-mode: multiply`
462
+ - Wrap in `isolation: isolate` container to prevent bleed
463
+ - Programmatic: `sharp`, ImageMagick, `rembg`. Interactive: ima2 Canvas Mode.
464
+
465
+ **Anti-pattern:** requesting "transparent background" or "PNG with alpha" in
466
+ the prompt. The model produces fake checkerboard burned into the image.
467
+
468
+ Full pipeline reference: `ima2-front/references/asset-requirements.md`
469
+ § Asset Background Strategy (FE-ASSET-BG-01).
470
+
471
+ ## 3. Korean Design Vocabulary + Quick-Match + Font Selection
472
+
473
+ Korean descriptor → CSS token translation, quick-match table (user word → starting
474
+ point), clarifying questions per term, and font selection guidelines (UX-TYPE-01,
475
+ Pretendard for Korean-first, Inter avoidance) are extracted to
476
+ `references/korean-design-vocabulary.md`. Read it when the brief uses Korean
477
+ aesthetic words or when choosing fonts for Korean-first UI.