self-evolve-framework 1.1.0 → 1.2.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 (220) hide show
  1. package/package.json +1 -1
  2. package/template/skills/impeccable/SKILL.md +174 -47
  3. package/template/skills/impeccable/agents/impeccable_asset_producer.toml +92 -0
  4. package/template/skills/impeccable/agents/impeccable_manual_edit_applier.toml +95 -0
  5. package/template/skills/impeccable/agents/openai.yaml +4 -0
  6. package/template/skills/impeccable/reference/adapt.md +311 -0
  7. package/template/skills/impeccable/reference/animate.md +201 -0
  8. package/template/skills/impeccable/reference/audit.md +133 -0
  9. package/template/skills/impeccable/reference/bolder.md +113 -0
  10. package/template/skills/impeccable/reference/brand.md +108 -0
  11. package/template/skills/impeccable/reference/clarify.md +288 -0
  12. package/template/skills/impeccable/reference/codex.md +105 -0
  13. package/template/skills/impeccable/reference/colorize.md +257 -0
  14. package/template/skills/impeccable/reference/craft.md +123 -0
  15. package/template/skills/impeccable/reference/critique.md +790 -0
  16. package/template/skills/impeccable/reference/delight.md +302 -0
  17. package/template/skills/impeccable/reference/distill.md +111 -0
  18. package/template/skills/impeccable/reference/document.md +429 -0
  19. package/template/skills/impeccable/reference/extract.md +69 -0
  20. package/template/skills/impeccable/reference/harden.md +347 -0
  21. package/template/skills/impeccable/reference/hooks.md +90 -0
  22. package/template/skills/impeccable/reference/init.md +172 -0
  23. package/template/skills/impeccable/reference/interaction-design.md +189 -0
  24. package/template/skills/impeccable/reference/layout.md +161 -0
  25. package/template/skills/impeccable/reference/live.md +720 -0
  26. package/template/skills/impeccable/reference/onboard.md +234 -0
  27. package/template/skills/impeccable/reference/optimize.md +258 -0
  28. package/template/skills/impeccable/reference/overdrive.md +130 -0
  29. package/template/skills/impeccable/reference/polish.md +241 -0
  30. package/template/skills/impeccable/reference/product.md +60 -0
  31. package/template/skills/impeccable/reference/quieter.md +99 -0
  32. package/template/skills/impeccable/reference/shape.md +165 -0
  33. package/template/skills/impeccable/reference/typeset.md +279 -0
  34. package/template/skills/impeccable/scripts/command-metadata.json +94 -0
  35. package/template/skills/impeccable/scripts/context-signals.mjs +225 -0
  36. package/template/skills/impeccable/scripts/context.mjs +961 -0
  37. package/template/skills/impeccable/scripts/critique-storage.mjs +242 -0
  38. package/template/skills/impeccable/scripts/detect-csp.mjs +198 -0
  39. package/template/skills/impeccable/scripts/detect.mjs +21 -0
  40. package/template/skills/impeccable/scripts/detector/browser/injected/index.mjs +1937 -0
  41. package/template/skills/impeccable/scripts/detector/cli/main.mjs +290 -0
  42. package/template/skills/impeccable/scripts/detector/design-system.mjs +750 -0
  43. package/template/skills/impeccable/scripts/detector/detect-antipatterns-browser.js +5138 -0
  44. package/template/skills/impeccable/scripts/detector/detect-antipatterns.mjs +50 -0
  45. package/template/skills/impeccable/scripts/detector/engines/browser/detect-url.mjs +277 -0
  46. package/template/skills/impeccable/scripts/detector/engines/regex/detect-text.mjs +568 -0
  47. package/template/skills/impeccable/scripts/detector/engines/static-html/css-cascade.mjs +1015 -0
  48. package/template/skills/impeccable/scripts/detector/engines/static-html/detect-html.mjs +234 -0
  49. package/template/skills/impeccable/scripts/detector/engines/visual/screenshot-contrast.mjs +189 -0
  50. package/template/skills/impeccable/scripts/detector/findings.mjs +12 -0
  51. package/template/skills/impeccable/scripts/detector/node/file-system.mjs +198 -0
  52. package/template/skills/impeccable/scripts/detector/profile/profiler.mjs +166 -0
  53. package/template/skills/impeccable/scripts/detector/registry/antipatterns.mjs +448 -0
  54. package/template/skills/impeccable/scripts/detector/rules/checks.mjs +2671 -0
  55. package/template/skills/impeccable/scripts/detector/shared/color.mjs +124 -0
  56. package/template/skills/impeccable/scripts/detector/shared/constants.mjs +101 -0
  57. package/template/skills/impeccable/scripts/detector/shared/inline-ignores.mjs +148 -0
  58. package/template/skills/impeccable/scripts/detector/shared/page.mjs +7 -0
  59. package/template/skills/impeccable/scripts/hook-admin.mjs +661 -0
  60. package/template/skills/impeccable/scripts/hook-before-edit.mjs +476 -0
  61. package/template/skills/impeccable/scripts/hook-lib.mjs +1632 -0
  62. package/template/skills/impeccable/scripts/hook.mjs +61 -0
  63. package/template/skills/impeccable/scripts/lib/design-parser.mjs +842 -0
  64. package/template/skills/impeccable/scripts/lib/impeccable-config.mjs +638 -0
  65. package/template/skills/impeccable/scripts/lib/impeccable-paths.mjs +128 -0
  66. package/template/skills/impeccable/scripts/lib/is-generated.mjs +69 -0
  67. package/template/skills/impeccable/scripts/lib/target-args.mjs +42 -0
  68. package/template/skills/impeccable/scripts/live/browser-script-parts.mjs +49 -0
  69. package/template/skills/impeccable/scripts/live/completion.mjs +19 -0
  70. package/template/skills/impeccable/scripts/live/event-validation.mjs +137 -0
  71. package/template/skills/impeccable/scripts/live/insert-ui.mjs +458 -0
  72. package/template/skills/impeccable/scripts/live/manual-apply.mjs +939 -0
  73. package/template/skills/impeccable/scripts/live/manual-edit-routes.mjs +357 -0
  74. package/template/skills/impeccable/scripts/live/manual-edits-buffer.mjs +152 -0
  75. package/template/skills/impeccable/scripts/live/session-store.mjs +289 -0
  76. package/template/skills/impeccable/scripts/live/svelte-component.mjs +826 -0
  77. package/template/skills/impeccable/scripts/live/sveltekit-adapter.mjs +274 -0
  78. package/template/skills/impeccable/scripts/live/ui-core.mjs +180 -0
  79. package/template/skills/impeccable/scripts/live/vocabulary.mjs +36 -0
  80. package/template/skills/impeccable/scripts/live-accept.mjs +812 -0
  81. package/template/skills/impeccable/scripts/live-browser-dom.js +146 -0
  82. package/template/skills/impeccable/scripts/live-browser-session.js +123 -0
  83. package/template/skills/impeccable/scripts/live-browser.js +11173 -0
  84. package/template/skills/impeccable/scripts/live-commit-manual-edits.mjs +1241 -0
  85. package/template/skills/impeccable/scripts/live-complete.mjs +75 -0
  86. package/template/skills/impeccable/scripts/live-copy-edit-agent.mjs +683 -0
  87. package/template/skills/impeccable/scripts/live-discard-manual-edits.mjs +51 -0
  88. package/template/skills/impeccable/scripts/live-inject.mjs +583 -0
  89. package/template/skills/impeccable/scripts/live-insert.mjs +272 -0
  90. package/template/skills/impeccable/scripts/live-manual-edit-evidence.mjs +363 -0
  91. package/template/skills/impeccable/scripts/live-poll.mjs +384 -0
  92. package/template/skills/impeccable/scripts/live-resume.mjs +94 -0
  93. package/template/skills/impeccable/scripts/live-server.mjs +1135 -0
  94. package/template/skills/impeccable/scripts/live-status.mjs +61 -0
  95. package/template/skills/impeccable/scripts/live-target.mjs +30 -0
  96. package/template/skills/impeccable/scripts/live-wrap.mjs +894 -0
  97. package/template/skills/impeccable/scripts/live.mjs +297 -0
  98. package/template/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
  99. package/template/skills/impeccable/scripts/palette.mjs +633 -0
  100. package/template/skills/impeccable/scripts/pin.mjs +214 -0
  101. package/template/rules/CodeGraph.mdc +0 -23
  102. package/template/rules/Svelte_5.mdc +0 -167
  103. package/template/rules/Svelte_Flow.mdc +0 -176
  104. package/template/rules/Tailwind_CSS_v4.mdc +0 -187
  105. package/template/rules/Tauri.mdc +0 -145
  106. package/template/rules/app-error-pattern.mdc +0 -65
  107. package/template/rules/invoke-safe-pattern.mdc +0 -53
  108. package/template/rules/js.mdc +0 -10
  109. package/template/rules/powershell.mdc +0 -9
  110. package/template/rules//346/227/245/345/277/227.mdc +0 -15
  111. package/template/rules//350/257/267/346/261/202.mdc +0 -49
  112. package/template/skills/caveman/SKILL.md +0 -49
  113. package/template/skills/check/SKILL.md +0 -393
  114. package/template/skills/check/agents/reviewer-architecture.md +0 -39
  115. package/template/skills/check/agents/reviewer-security.md +0 -39
  116. package/template/skills/check/references/persona-catalog.md +0 -56
  117. package/template/skills/check/references/project-context.md +0 -120
  118. package/template/skills/check/references/public-reply.md +0 -14
  119. package/template/skills/check/scripts/audit_signals.py +0 -666
  120. package/template/skills/check/scripts/run-tests.sh +0 -19
  121. package/template/skills/design/SKILL.md +0 -173
  122. package/template/skills/design/references/design-aesthetic-quality.md +0 -67
  123. package/template/skills/design/references/design-data-viz.md +0 -34
  124. package/template/skills/design/references/design-reference.md +0 -295
  125. package/template/skills/design/references/design-tokens.md +0 -45
  126. package/template/skills/design/references/design-traps.md +0 -43
  127. package/template/skills/design-an-interface/SKILL.md +0 -94
  128. package/template/skills/diagnose/SKILL.md +0 -117
  129. package/template/skills/diagnose/scripts/hitl-loop.template.sh +0 -41
  130. package/template/skills/edit-article/SKILL.md +0 -14
  131. package/template/skills/git-guardrails-claude-code/SKILL.md +0 -95
  132. package/template/skills/git-guardrails-claude-code/scripts/block-dangerous-git.sh +0 -25
  133. package/template/skills/grill-me/SKILL.md +0 -10
  134. package/template/skills/grill-with-docs/ADR-FORMAT.md +0 -47
  135. package/template/skills/grill-with-docs/CONTEXT-FORMAT.md +0 -60
  136. package/template/skills/grill-with-docs/SKILL.md +0 -88
  137. package/template/skills/handoff/SKILL.md +0 -15
  138. package/template/skills/health/SKILL.md +0 -260
  139. package/template/skills/health/agents/inspector-context.md +0 -119
  140. package/template/skills/health/agents/inspector-control.md +0 -84
  141. package/template/skills/health/agents/inspector-maintainability.md +0 -55
  142. package/template/skills/health/scripts/check-agent-context.sh +0 -5
  143. package/template/skills/health/scripts/check-doc-refs.sh +0 -8
  144. package/template/skills/health/scripts/check-maintainability.sh +0 -8
  145. package/template/skills/health/scripts/check-verifier-output.sh +0 -5
  146. package/template/skills/health/scripts/check_agent_context.py +0 -444
  147. package/template/skills/health/scripts/check_doc_refs.py +0 -110
  148. package/template/skills/health/scripts/check_maintainability.py +0 -635
  149. package/template/skills/health/scripts/check_verifier_output.py +0 -116
  150. package/template/skills/health/scripts/collect-data.sh +0 -751
  151. package/template/skills/hunt/SKILL.md +0 -232
  152. package/template/skills/hunt/references/failure-patterns.md +0 -138
  153. package/template/skills/hunt/references/ime-unicode.md +0 -58
  154. package/template/skills/hunt/references/logging-techniques.md +0 -72
  155. package/template/skills/hunt/references/rendering-debug.md +0 -34
  156. package/template/skills/improve-codebase-architecture/DEEPENING.md +0 -37
  157. package/template/skills/improve-codebase-architecture/HTML-REPORT.md +0 -123
  158. package/template/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +0 -44
  159. package/template/skills/improve-codebase-architecture/LANGUAGE.md +0 -53
  160. package/template/skills/improve-codebase-architecture/SKILL.md +0 -81
  161. package/template/skills/learn/SKILL.md +0 -140
  162. package/template/skills/migrate-to-shoehorn/SKILL.md +0 -118
  163. package/template/skills/obsidian-vault/SKILL.md +0 -59
  164. package/template/skills/prototype/LOGIC.md +0 -79
  165. package/template/skills/prototype/SKILL.md +0 -30
  166. package/template/skills/prototype/UI.md +0 -112
  167. package/template/skills/qa/SKILL.md +0 -130
  168. package/template/skills/read/SKILL.md +0 -141
  169. package/template/skills/read/references/read-methods.md +0 -129
  170. package/template/skills/read/scripts/fetch.sh +0 -106
  171. package/template/skills/read/scripts/fetch_feishu.py +0 -251
  172. package/template/skills/read/scripts/fetch_local.py +0 -218
  173. package/template/skills/read/scripts/fetch_weixin.py +0 -107
  174. package/template/skills/request-refactor-plan/SKILL.md +0 -68
  175. package/template/skills/review/SKILL.md +0 -78
  176. package/template/skills/rust-auto-fix/SKILL.md +0 -94
  177. package/template/skills/scaffold-exercises/SKILL.md +0 -106
  178. package/template/skills/sdd-dev/SKILL.md +0 -114
  179. package/template/skills/setup-matt-pocock-skills/SKILL.md +0 -121
  180. package/template/skills/setup-matt-pocock-skills/domain.md +0 -51
  181. package/template/skills/setup-matt-pocock-skills/issue-tracker-github.md +0 -22
  182. package/template/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +0 -23
  183. package/template/skills/setup-matt-pocock-skills/issue-tracker-local.md +0 -19
  184. package/template/skills/setup-matt-pocock-skills/triage-labels.md +0 -15
  185. package/template/skills/setup-pre-commit/SKILL.md +0 -91
  186. package/template/skills/svelte-warnings-fix/SKILL.md +0 -94
  187. package/template/skills/tauri-nsis-installer-icon/SKILL.md +0 -92
  188. package/template/skills/tauri-nsis-installer-icon/references/tauri-nsis-schema.md +0 -71
  189. package/template/skills/tb/SKILL.md +0 -62
  190. package/template/skills/tdd/SKILL.md +0 -109
  191. package/template/skills/tdd/deep-modules.md +0 -33
  192. package/template/skills/tdd/interface-design.md +0 -31
  193. package/template/skills/tdd/mocking.md +0 -59
  194. package/template/skills/tdd/refactoring.md +0 -10
  195. package/template/skills/tdd/tests.md +0 -61
  196. package/template/skills/teach/GLOSSARY-FORMAT.md +0 -35
  197. package/template/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
  198. package/template/skills/teach/MISSION-FORMAT.md +0 -31
  199. package/template/skills/teach/RESOURCES-FORMAT.md +0 -32
  200. package/template/skills/teach/SKILL.md +0 -91
  201. package/template/skills/think/SKILL.md +0 -184
  202. package/template/skills/to-issues/SKILL.md +0 -83
  203. package/template/skills/to-prd/SKILL.md +0 -74
  204. package/template/skills/triage/AGENT-BRIEF.md +0 -168
  205. package/template/skills/triage/OUT-OF-SCOPE.md +0 -101
  206. package/template/skills/triage/SKILL.md +0 -103
  207. package/template/skills/ubiquitous-language/SKILL.md +0 -93
  208. package/template/skills/ver/SKILL.md +0 -62
  209. package/template/skills/write/SKILL.md +0 -209
  210. package/template/skills/write/references/write-en.md +0 -199
  211. package/template/skills/write/references/write-product-localization.md +0 -43
  212. package/template/skills/write/references/write-zh-bilingual.md +0 -59
  213. package/template/skills/write/references/write-zh-prose.md +0 -50
  214. package/template/skills/write/references/write-zh-release-notes.md +0 -40
  215. package/template/skills/write/references/write-zh.md +0 -721
  216. package/template/skills/write-a-skill/SKILL.md +0 -117
  217. package/template/skills/writing-beats/SKILL.md +0 -52
  218. package/template/skills/writing-fragments/SKILL.md +0 -75
  219. package/template/skills/writing-shape/SKILL.md +0 -64
  220. package/template/skills/zoom-out/SKILL.md +0 -7
@@ -1,173 +0,0 @@
1
- ---
2
- name: design
3
- description: "Produces distinctive, production-grade UI for pages, components, visual interfaces, typography, and screenshot-driven polish. Use when users ask 设计/做页面/做组件/UI/前端/截图 or say a screen is ugly, unclear, inconsistent, or visually wrong. Not for backend logic or data pipelines."
4
- when_to_use: "设计, 做页面, 做组件, 不好看, 不和谐, 不清晰, 很丑, 很怪, 很傻, 突兀, 不协调, 字体, 字形, 排印, 排版, 样式, 前端, UI, 截图, build page, create component, make it look good, style, design, screenshot with visual complaint, typography, font looks wrong"
5
- dispatch_intent: "UI, component, page, visual interface, frontend, artifact-grounded screenshot aesthetic complaint"
6
- ---
7
-
8
- # Design: Build It With a Point of View
9
-
10
- Prefix your first line with 🥷 inline, not as its own paragraph.
11
-
12
- **Update check (non-blocking).** Before starting, run `bash ../../scripts/check-update.sh` once; if it prints a line, relay it to the user, then continue. It runs at most once a day, only reads a public version file, sends no data, and fails silently.
13
-
14
- If it could have been generated by a default prompt, it is not good enough.
15
-
16
- ## Outcome Contract
17
-
18
- - Outcome: a usable interface or visual fix with a clear point of view and no incoherent layout, text, or responsive breakage.
19
- - Done when: the real rendered surface or generated artifact has been checked against the user's visual goal and the relevant viewport states.
20
- - Evidence: screenshots, rendered UI, source components, design tokens, accessibility constraints, and user-provided references.
21
- - Output: the implemented visual change or a precise visual review with the remaining verification gap named.
22
-
23
- **Output language rule:** Never use em-dash (—) in any output from this skill. Use commas, colons, or periods instead.
24
-
25
- **Chinese gut-feel complaints**: when the user says "很傻", "很怪", "突兀", "不协调", "不和谐" about a visual, treat it as an aesthetic rejection, not a debugging symptom. Route to Screenshot Iteration Mode, not to `/hunt`.
26
-
27
- **Document & print typography → Kami.** When the deliverable is a shippable document rather than a product UI surface (report, slide deck, resume, long-form or print-oriented page, paged PDF), do not hand-roll an over-designed document layout here. Suggest the user run it through Kami (`tw93/Kami`), a document design system with a fixed constraint language and templates, and let Kami draft the detailed plan. Screen 排版 (app surfaces, components, web pages) stays in this skill.
28
-
29
- ## Durable Context Preflight
30
-
31
- See [rules/durable-context.md](../../rules/durable-context.md) for when to read durable context, the read-order budget, and the memory-type mapping.
32
-
33
- For `/design`, visual constraints are `decision`, `preference`, and `principle` entries; reusable product and UI patterns are `pattern` and `learning`. Current screenshots, rendered output, code, design tokens, and user feedback override memory. Reuse durable visual preferences and mature interaction patterns, but still name the current visual problem from the screenshot or source before changing code.
34
-
35
- ## Visual Quick-Fix Mode
36
-
37
- Activate when the user asks for a narrow visual repair with a concrete symptom: overflow, clipped or wrapped text, misalignment, spacing imbalance, contrast/readability, localized text not fitting, or compact responsive breakage. This is for fixing an existing surface, not redesigning it.
38
-
39
- Flow:
40
-
41
- 1. Read the current UI evidence: screenshot, rendered page, native view, or responsible component.
42
- 2. Name the exact visual defect in one sentence.
43
- 3. Make the smallest material, geometry, spacing, contrast, typography, or text-fit change that fixes that defect.
44
- 4. Verify the real running surface or generated artifact. Check long words, localized strings, compact states, and at least one narrow viewport when applicable.
45
- 5. If the fix touches three or more components, changes product behavior, or reveals a direction problem, stop and switch to Screenshot Iteration Mode or Lock the Direction First.
46
-
47
- **Spacing unification rule.** If a magic spacing or sizing value has been adjusted three times and the layout still looks off, stop tuning. Replace the N independent padding / gap / margin / size values with one shared named token (`Spacing.s4`, `--gap-content`, `gap-4`). Outer container padding defaults to the same value as inner element gap. Asymmetry that survives tuning is structural, not numeric, so more rounds of magic numbers will not converge. Reduce the count of independent values first, then argue about the specific value.
48
-
49
- **Fixed-height action slot, uniform typography.** Any container that swaps children based on state (status bar, action slot, toolbar row, menu item) must use one font size across every state. Vary fill, stroke, opacity, color, or icon, never font size. A 1pt height delta between `secondary 13px` and `primary 14px` becomes visible jitter at the state transition. CTA pill buttons in the same slot use the same size (typically 14px), distinguished by background and border, not by typography.
50
-
51
- **Completion screen layout.** Operation-complete surfaces show the single result the user came for: the actual reclaimed size / processed count / changed state. Long explanations belong in a details overlay opened from a summary row, not in the primary completion line. Do not add a separate "Review" button next to the summary row when one tap on the row already opens details; do not show an empty "0 skipped" entry point. If there is no skipped or failed item, hide the details affordance entirely.
52
-
53
- **Safety-bound action design.** For cleanup, deletion, uninstall, reset, or permission-changing surfaces, do not make the UI feel simpler by hiding recoverability. Bulk select, auto-select, one-tap delete, or "recommended" destructive defaults are only appropriate when each row is understandable to the target user and carries enough identity to verify safety (name, source, owner, path, preview, or recovery implication as relevant). If rows are opaque identifiers, inferred leftovers, or machine-only paths, prefer review-first UI, current-target scoping, disabled destructive affordances, or explanatory grouping over faster batch controls. A feature request for fewer clicks is not enough to remove the user's ability to verify what will change.
54
-
55
- **Quiet product boundary.** Fewer clicks and richer controls are not automatically better. Remove misleading affordances before adding alternate controls, prefer quiet defaults for diagnostics and alerts, and fix unstable motion cadence before changing speed or adding a new motion preference. If the current UI implies an action, state, or promise it cannot support, remove that implication first.
56
-
57
- ## Screenshot Iteration Mode
58
-
59
- Activate when the user sends a screenshot or image alongside a complaint ("这里很丑", "这个不对", "fix this", "looks wrong"). The existing product is the direction. Skip the five-question direction lock.
60
-
61
- **Flow:**
62
-
63
- 1. Read the screenshot. State the problem in one sentence: what specifically looks wrong (spacing, contrast, alignment, typeface, color, density, hierarchy). Preserve the user's negative label when it is diagnostic; do not translate "丑", "乱", "不清晰", or "怪" into vague "make it modern" language.
64
- 2. Wait for the user to confirm the diagnosis before touching code.
65
- 3. If the user provides a reference screenshot, older version, or "this one is good" example, compare current vs. reference and name the visual deltas before choosing a fix.
66
- 4. If the diagnosis is a known UX problem (split-view sync, infinite scroll, virtualised list, sticky header), spend one round surveying how 2-3 mature products in the same category solve it before writing code. Cite what each does. Skip only if the fix is purely cosmetic (color, spacing, copy).
67
- 5. Find the responsible code: grep for the component name or class, read the actual file. Do not rely on memory or assumptions about file location.
68
- 6. Apply the minimal fix. For existing products, try material/opacity, geometry, spacing, typography, or text-fit adjustments before redesigning the surface.
69
- 7. Verify the result in a browser, native app, screenshot tool, or rendered artifact at desktop width and 375px mobile width when applicable. Check long words, localized strings, button labels, and compact states for overflow. If the host cannot render, say that explicitly and hand off the exact view the user should check.
70
- 8. Ask the user to verify in the browser. Do not hand off without this step.
71
-
72
- **Calibration rules:**
73
- - The user's screenshot is the strongest design brief in the turn. Keep it visible in the reasoning until the fix is done.
74
- - The real running product is the oracle. Product pages, app screenshots, release pages, and current UI state override generic style instincts.
75
- - Do not flatten specific taste feedback into generic UI adjectives. "More premium" is not a diagnosis; "caption baseline drifts above the Chinese line" is.
76
- - If the screenshot exposes a regression, broken render, timing issue, or generated asset defect rather than taste, route to `/hunt` and preserve the visual evidence.
77
-
78
- **Boundary**: if the fix requires changing 3 or more components, or if it reveals a direction problem rather than a specific bug, pause and run the full direction lock before continuing.
79
-
80
- **Redesign priority order** (when reworking an existing UI rather than building from scratch): font replacement → color cleanup → hover/active states → layout and whitespace → replace generic components → add loading/empty/error states → typographic polish. This order maximizes visual lift while minimizing the blast radius of each pass. Full rules in `references/design-reference.md`. Common traps and absolute CSS bans: `references/design-traps.md`.
81
-
82
- ## Lock the Direction First
83
-
84
- **Before starting any component, page, or visual work**: list 2-3 mature products in the same category (e.g. Notion, Linear, Typora, iA Writer, Raycast), and write one sentence each on how they solve the specific problem at hand. Then write code. Skip only if the task is purely cosmetic (color, spacing, copy).
85
-
86
- Before writing any code, ask the user directly, using the environment's native question or approval mechanism if it has one:
87
-
88
- 1. **Who uses this, and in what context?** Analyst dashboard differs from landing page or onboarding flow. See "App shell exception" below if the answer is a sidebar + main workspace layout.
89
- 2. **What is the aesthetic direction?** Name it precisely: dense editorial, raw terminal, ink-on-paper, brutalist grid, warm analog. "Clean and modern" is not a direction. If the user names a reference site or product ("feels like Linear / Claude.ai / Vercel"), do not accept it as a direction -- extract 3 concrete properties from it: button radius philosophy, surface depth treatment (shadow vs background step vs border), and accent color family. Name those instead.
90
-
91
- **Shortcut for well-known brands**: see "Brand preset flow" in `references/design-reference.md`. Ask first, run the preset, then decompose against the generated file.
92
- 3. **What is the design signature?** A typeface, color system, unexpected motion, asymmetric layout. Pick one and make it obvious.
93
- 4. **What are the hard constraints?** Framework, bundle size, contrast minimums, keyboard accessibility.
94
- 5. **What is the signature micro-interaction?** Scale on press, staggered reveal, or contextual icon animation. Pick one and know exactly how it's implemented.
95
-
96
- Do not proceed until all five are answered.
97
-
98
- ### Source repo as reference
99
-
100
- When the user provides a repository URL or pastes source code of an existing product to recreate or extend: the file tree is a menu, not the meal. Do not reconstruct the UI from memory or training data. Instead, read the actual source:
101
- - Theme and token files: `theme.ts`, `colors.ts`, `tokens.css`, `_variables.scss`, or equivalent
102
- - Global stylesheets and layout scaffolds
103
- - The specific components the user mentioned
104
-
105
- Lift exact values: hex codes, spacing scale entries, font stacks, border radii. A rough approximation is not pixel fidelity.
106
-
107
- Only attach the target component folder or package. Exclude `.git`, `node_modules`, `dist`, and lock files. Dragging in an entire monorepo pollutes the context with irrelevant code and degrades output quality.
108
-
109
- ### Existing-native-app exception (do not propose wholesale platform restyling)
110
-
111
- When the target is an existing macOS / iOS / Android native app that already has a coherent visual direction, do not propose a wholesale port to a newer platform style (macOS 26 Liquid Glass, iOS 18 frosted material, Material You, Fluent Design, etc.) as the default improvement plan. Wholesale restyling reads as "I do not have a specific design intent, here is the platform's." Default to incremental polish on the existing direction: spacing, alignment, hover and focus states, typography hierarchy, copy tightening, motion timing. Only propose a platform-style migration when the user has explicitly asked for it in this turn, or when the existing direction is broken in a way that incremental polish cannot fix. State the existing direction in one sentence before proposing changes so the user can correct the read.
112
-
113
- ### App shell exception (sidebar + main workspace)
114
-
115
- If question 1 is an app shell (Slack, Linear, Notion class), load the "App shell rules" section in `references/design-reference.md` and apply those constraints before proceeding.
116
-
117
- ### Data dashboard exception
118
-
119
- If the surface is a dashboard, analytics view, or chart-heavy interface, also load `references/design-data-viz.md` for chart selection, number alignment, and product-benchmark rules. Skip when building marketing pages, landing pages, or generic components.
120
-
121
- State the chosen direction in one sentence, then load `references/design-reference.md` and check the tech stack conflicts table. Name the single CSS strategy before writing the first component. For token decisions (color, font, motion): load `references/design-tokens.md`. For aesthetic quality review and production structure: load `references/design-aesthetic-quality.md`.
122
-
123
- Summarize the direction as three lines before writing any code:
124
- - **Visual thesis**: mood, material, and energy in one sentence (e.g. "warm brutalist editorial with high-contrast ink type and rough paper texture")
125
- - **Content plan**: hero -> support -> detail -> final CTA, one line each. For **app/dashboard surfaces**: skip the marketing structure, default to utility mode (orient, show status, enable action), no hero unless explicitly requested.
126
- - **Interaction thesis**: 2-3 specific motion ideas that change how the page feels (e.g. "hero text slides in on load, section headers pin while content scrolls beneath, CTA pulses on hover")
127
-
128
- For production or multi-page UIs, expand the thesis into the 9-section DESIGN.md scaffold in `references/design-reference.md` (theme, palette, typography, components, layout, depth, do/don't, responsive, prompt guide). For a single component, the three lines are sufficient.
129
-
130
- ## Hard Rules
131
-
132
- `references/design-reference.md` is already loaded during direction lock. It owns the full rules: typography, OKLCH color, motion timings, layout defaults, CSS-pattern bans, accessibility baseline, and complexity matching. Apply them. Do not restate them here.
133
-
134
- ## When Asked For Options
135
-
136
- Give at least 3 variations across genuinely different dimensions (density, typography, color, layout, motion). See "Options guide" in `references/design-reference.md` for the full variation framework. Three options differing only by accent color are not three variations.
137
-
138
- ## Gotchas
139
-
140
- | What happened | Rule |
141
- |---------------|------|
142
- | Used Inter as the display font | It communicates nothing. Pick something with a personality. |
143
- | Three cards, identical shadows, identical padding -- a template | If swapping content doesn't require layout changes, redo it. |
144
- | Claimed it looked right without opening a browser | Code correct in your head can look broken in the browser. Open it. |
145
- | Chose glassmorphism, ignored the mobile constraint | `backdrop-filter` is expensive on low-power devices. Name the tradeoff. |
146
- | Light-mode app: white panel on white background, visually indistinguishable | Adjacent nested surfaces must differ visually. Either background step (sidebar vs main ≥4% lightness difference) or shadow minimum `0 1px 3px rgba(0,0,0,0.10)`. |
147
- | Fixed visual polish by redesigning the whole surface | Locate the concrete visual delta first, then make the smallest material, opacity, geometry, or typography change that addresses it. |
148
- | Added a setting or louder control to solve UI noise | Remove the misleading affordance or choose a quiet default first |
149
- | English looked fine, localized text overflowed | Test long words and localized strings before handoff, especially inside buttons, tabs, nav, and compact cards. |
150
- | Relied on `…` truncation to fit text in a fixed-width slot | Guarantee fit instead: compact the format, cap to whole segments, or hard-trim with no glyph. Metric and label footers must never tail-truncate into an ellipsis. |
151
-
152
- ## Aesthetic Review
153
-
154
- After significant build phases and at handoff, re-read the visual thesis from direction lock. If what is on screen drifted toward a generic default, identify the specific element that broke first (typeface, color, card treatment, spacing) and fix it before continuing.
155
-
156
- Run these checks before the handoff summary:
157
- - Is the brand or product unmistakable in the first screen?
158
- - Is there one strong visual anchor (real imagery, not a decorative gradient)?
159
- - Can the page be understood by scanning headlines only?
160
- - Does each section have one job?
161
- - Are cards actually necessary, or just default styling?
162
- - Does motion improve hierarchy or atmosphere, or is it ornamental?
163
- - Would the design still feel premium if all decorative shadows were removed?
164
- - AI Slop Test: scan the first screen for default patterns (reflex font, purple-to-blue gradient, centered hero with two CTAs side by side, three identical cards, generic top nav). If any appear unintentionally, fix typography, color, or layout until none remain.
165
-
166
- If any check fails, fix first. Ask the user to verify at full width and at 375px; if the layout breaks at mobile width, fix before handing off.
167
-
168
- End with:
169
- - Aesthetic direction, named and justified in 2-3 sentences
170
- - Non-obvious choices explained: typeface, color decisions, layout logic
171
- - Instructions for replacing placeholder content with real content
172
-
173
- After handoff, stop.
@@ -1,67 +0,0 @@
1
- # Design Aesthetic Quality and Production Structure
2
-
3
- ## App Shell Rules
4
-
5
- When building a sidebar + main workspace layout (Slack, Linear, Notion class):
6
- - Decorative backgrounds default to off
7
- - Surface hierarchy uses background-color steps and shadow only
8
- - All interactive elements get `active:scale-95`
9
- - Button radius is consistent within each component type (pick one: pill, square, or one fixed value, do not mix)
10
- - Commit to a named radius scale before the first component
11
-
12
- ## Options Guide
13
-
14
- When asked for design options, give at least 3 variations spread across genuinely different dimensions:
15
-
16
- - **Dimensions to vary**: visual density, typographic personality, color temperature, layout structure, motion character, amount of decoration, level of abstraction
17
- - **Mix approaches**: one option follows existing conventions closely, one remixes the brand DNA, one is deliberately unexpected
18
- - **Progress from basic to bold**: the first option is safe and understandable; later options push further
19
- - Three options that differ only by accent color are not three variations. Vary layout, typeface, motion, surface treatment.
20
-
21
- ## DESIGN.md Scaffold (Optional, Production UIs)
22
-
23
- For a multi-page or production UI, emit a short `DESIGN.md`-style summary before writing the first component. The nine sections:
24
-
25
- 1. **Visual Theme and Atmosphere**: mood, density, design philosophy in 2-3 sentences
26
- 2. **Color Palette and Roles**: semantic name + value + functional role for each color token
27
- 3. **Typography Rules**: font family, size scale, weight scale, line-height, letter-spacing
28
- 4. **Component Stylings**: buttons (all states), cards (if used), inputs, navigation
29
- 5. **Layout Principles**: spacing scale, grid columns, whitespace philosophy
30
- 6. **Depth and Elevation**: shadow system or background-color-step system; describe each level
31
- 7. **Do's and Don'ts**: 5 to 10 guardrails specific to this project
32
- 8. **Responsive Behavior**: breakpoints, how navigation collapses, touch target minimums
33
- 9. **Agent Prompt Guide**: color reference (name: value pairs) + 3-5 example component prompts with all values inlined
34
-
35
- For a single component or quick prototype, skip this. The three-line thesis is sufficient.
36
-
37
- ## Pre-Handoff Checklist: Strategic Omissions
38
-
39
- Items most frequently missing from AI-generated UIs:
40
-
41
- - [ ] **Custom 404 page**: a branded page with a clear path back
42
- - [ ] **Back navigation**: every page reachable by user action must have a path back
43
- - [ ] **Form client-side validation**: inline errors adjacent to each field
44
- - [ ] **Skip-to-content link**: visually hidden `<a href="#main-content">Skip to main content</a>` as first focusable element
45
- - [ ] **Cookie consent**: for EU or California jurisdictions
46
- - [ ] **Footer Privacy and Terms links**
47
-
48
- These are not polish items. They are the difference between a demo and a shippable product.
49
-
50
- ## Reference Material Priority
51
-
52
- When source code and a screenshot are both available: read the code. Source files contain exact token values; screenshots require guessing.
53
-
54
- When only a URL is provided: fetching returns extracted text only, with no layout information. For visual references, ask for a screenshot rather than inferring from stripped HTML.
55
-
56
- ## Adding to Existing UI
57
-
58
- When extending an existing interface, first understand its visual vocabulary. Match all of the following before writing the first line of new code:
59
- - Copywriting tone and reading level
60
- - Color palette and semantic color roles
61
- - Hover and click states: scale, color shift, underline, background fill
62
- - Animation style: duration, easing, whether interactions bounce or are ease-out
63
- - Shadow and card treatment
64
- - Layout density and whitespace rhythm
65
- - Border radius choices
66
-
67
- If swapping in different content would make the new component look out of place, the vocabulary was not matched closely enough.
@@ -1,34 +0,0 @@
1
- # Design Reference: Data Visualization
2
-
3
- Load this only when the surface is a dashboard, analytics view, chart-heavy interface, or any number-dense data display. Marketing pages, landing pages, and generic component work do not need it.
4
-
5
- ## Dashboard defaults
6
-
7
- Dashboards are utility surfaces: orient the user, show status, enable action. No hero sections, no marketing copy. Every element must earn its place by answering a question the user has.
8
-
9
- - Primary layout: status summary at top, detail below; or sidebar filters + main chart area.
10
- - Whitespace: tighter than marketing pages; users scan, not read. Use generous column spacing, not generous row height.
11
- - Number density: many numbers on screen at once is not a problem. Crowding without alignment is. Use `font-variant-numeric: tabular-nums` for all numeric columns. Right-align numbers. Left-align labels.
12
-
13
- ## Chart selection
14
-
15
- | Use case | Chart type |
16
- |---|---|
17
- | Comparing values across categories | Bar chart (horizontal if labels are long) |
18
- | Trend over time | Line chart; avoid bars for time series with many points |
19
- | Part-whole relationships | Treemap (6+ segments) or stacked bar; pie only for 2-4 segments |
20
- | Distribution | Histogram or box plot; never pie chart |
21
- | Correlation | Scatter plot; do not use line chart |
22
-
23
- Pie charts with more than 4 segments communicate nothing. Use a treemap or ranked list instead.
24
-
25
- ## Number-dense interfaces
26
-
27
- - `font-variant-numeric: tabular-nums` on every number column so digits align vertically.
28
- - Right-align all numbers; left-align all text labels. Mixed alignment in the same column is always wrong.
29
- - Subtle row separators: `1px` line at `rgba(0,0,0,0.06)` (light) or `rgba(255,255,255,0.05)` (dark). Alternating row backgrounds only if the table is very wide (12+ columns).
30
- - Column spacing: at least `16px` between adjacent columns; more between logically distinct groups.
31
-
32
- ## Using a product as a benchmark
33
-
34
- When the user references a product for visual benchmark ("make it feel like Grafana" / "similar to Linear analytics"): extract 3-5 concrete data-visualization-specific properties from that product, not general aesthetic properties. Useful properties: chart color palette (exact values), grid line weight and opacity, axis label size and color, tooltip border-radius and shadow, empty-state treatment. Do not extract "minimal" or "clean" as properties; those are not actionable.
@@ -1,295 +0,0 @@
1
- # Design Reference
2
-
3
- ## Tech Stack Conflicts
4
-
5
- These combinations produce silent failures or incoherent output. Never combine them:
6
-
7
- | Never combine | Why |
8
- |---|---|
9
- | Tailwind + CSS Modules on the same element | Specificity conflicts, unpredictable cascade |
10
- | Framer Motion + CSS transitions on the same element | Double-animating the same property causes jank |
11
- | styled-components or emotion + Tailwind | Two competing class systems fighting for the same DOM node |
12
- | Heroicons + Lucide + Font Awesome in one project | Visual inconsistency, size mismatches, bundle bloat |
13
- | Multiple Google Font families as display fonts | Competing personalities cancel each other out |
14
- | Glassmorphism backdrop-filter + solid `border: 1px solid` | Solid borders shatter the layered depth illusion |
15
- | Dark background + `#ffffff` text at full opacity | Too harsh; use `rgba(255,255,255,0.85)` or `#f0f0f0` |
16
- | Tailwind v4 `@theme` + dynamically constructed class names | `@theme` tokens generate utility classes JIT; if class names are built from variables or not present in scanned source, the class is purged and styles silently disappear. Fix: use static class names in source files, add to `safelist`, or define custom colors in `:root` + `extend.colors` in `tailwind.config.js` instead of `@theme` |
17
-
18
- Before writing the first component, name the single CSS strategy for the project: Tailwind only, CSS Modules only, or CSS-in-JS only. Do not drift from it.
19
-
20
- ## Common Traps
21
-
22
- Before submitting, check whether any of the following slipped in without intention:
23
-
24
- - A purple or blue gradient over white as the hero background
25
- - A three-part hero: large headline, one-line subtext, two CTA buttons side by side
26
- - A grid of cards with identical rounded corners, identical drop shadows, identical padding
27
- - A top navigation bar with logo left, links center, primary action far right
28
- - Sections that alternate between white and `#f9f9f9`
29
- - A centered icon or illustration sitting above a heading above a paragraph
30
- - A four-column footer with equal-weight columns
31
-
32
- Any of these can appear if they serve the design intentionally. They cannot appear by default.
33
-
34
- Final test: if you swapped in completely different content and the layout still made sense without changes, you built a template, not a design. Redo it.
35
-
36
- ## Content Authenticity
37
-
38
- Placeholder copy that looks real but is not real breaks the illusion the moment a user reads it. Apply these rules before handoff.
39
-
40
- **Sample data:**
41
- - No generic names: not John Doe, Jane Smith, Alex Johnson, or any first-name-last-name combination that reads as filler. Use culturally varied names with real specificity (e.g., Priya Mehta, Lars Eriksson, Nia Okafor).
42
- - No generic company names: not Acme Corp, Nexus, SmartFlow, TechCorp, Initech. Pick names with a domain (e.g., Meridian Logistics, Hokkaido Ceramics, Vantage Bioworks).
43
- - No Lorem Ipsum. Write short real copy that matches the layout's reading level.
44
- - No round numbers in data samples. `99.99%` uptime, `50%` conversion, `$100.00` MRR look synthetic. Use organic values instead: `99.94%`, `47.2%`, `$99.00`.
45
- - Multiple avatar instances must not share the same image. Multiple blog post or event cards must not share the same date.
46
-
47
- **UI copy:**
48
- - Sentence case on all headings. Title Case On Every Heading is the most common AI tell in body copy.
49
- - Remove exclamation marks from success states ("Saved!" → "Saved", "Done!" → "Done"). Reserve `!` for genuine urgency.
50
- - Never open an error message with "Oops!". It reads as condescending.
51
- - No passive voice in error messages ("Something went wrong" → "We couldn't load your data. Try refreshing.").
52
- - Banned AI marketing words in hero copy, CTAs, and feature descriptions: Elevate, Seamless, Unleash, Delve, Tapestry, Game-changer, Next-Gen, "In the world of...". These words communicate nothing about the product. Name the specific value instead.
53
-
54
- ## Placeholders Over Imitations
55
-
56
- When an icon, image, or component is unavailable: use a placeholder. In hi-fi design a labeled placeholder is always better than a low-quality attempt at the real thing. Examples: a grey rectangle for a hero image, a monogram wordmark for a missing logo, a dashed border for a component not yet designed.
57
-
58
- Never draw illustrative imagery using inline SVG. SVG is for icons and geometric shapes. For photography, illustrations, or product shots, use a placeholder and ask the user to supply real assets.
59
-
60
- ## Production Quality Baseline
61
-
62
- Check before handoff. These are not aesthetic choices, they are non-negotiable.
63
-
64
- > Treat the sections below as craft details, not defaults. Only apply them when they serve the locked visual direction. If removing a detail changes nothing about how the interface feels, leave it out.
65
-
66
- ### Accessibility
67
- - Icon-only buttons need `aria-label`
68
- - Actions use `<button>`, navigation uses `<a>` (not `<div onClick>`)
69
- - Images need `alt` (or `alt=""` if decorative)
70
- - Visible focus states: `focus-visible:ring-*` or equivalent; never `outline: none` without replacement
71
-
72
- ### Animation
73
- - Honor `prefers-reduced-motion`: disable or reduce animations when set
74
- - Animate `transform`/`opacity` only (compositor-friendly, no layout thrash)
75
- - Never `transition: all`; list properties explicitly
76
- - Interruptible animations: prefer CSS transitions for interactive state changes (hover, toggle, open/close) because they retarget mid-animation; reserve keyframe animations for staged sequences that run once (e.g., staggered page enters)
77
- - Staggered enter: split content into semantic chunks with ~100ms delay; titles into words at ~80ms; typical enter uses `opacity: 0 → 1`, `translateY(12px) → 0`, and `blur(4px) → 0`
78
- - Subtle exit: use a small fixed `translateY(-12px)` instead of full height; keep duration ~150ms `ease-in`, shorter and softer than enter
79
- - Contextual icon swaps: animate with `scale: 0.25 → 1`, `opacity: 0 → 1`, and `blur: 4px → 0px`. With a spring library: `{ type: "spring", duration: 0.3, bounce: 0 }`. Without: keep both icons in DOM (one absolute) and cross-fade with CSS using `cubic-bezier(0.2, 0, 0, 1)`
80
- - Scale on press: buttons use `scale(0.96)` on active/press via CSS transitions so the press can be interrupted; add a `static` prop to disable when motion would be distracting
81
- - Page-load guard: use `initial={false}` on animated presence wrappers for toggles, tabs, and icon swaps to prevent enter animations on first render; do not use it for intentional page-load entrance sequences
82
-
83
- ### Performance
84
- - Transition specificity: never `transition: all`; list exact properties (e.g., `transition-property: scale, opacity`). Tailwind's `transition-transform` covers `transform, translate, scale, rotate`; use `transition-[scale,opacity,filter]` for mixed properties
85
- - GPU compositing: only use `will-change` for `transform`, `opacity`, or `filter`. Never `will-change: all`. Add only when you notice first-frame stutter; do not apply preemptively to every element
86
- - Images: explicit `width` and `height` (prevents layout shift)
87
- - Below-fold images: `loading="lazy"`
88
- - Critical fonts: `font-display: swap`
89
-
90
- ### Touch and Mobile
91
- - `touch-action: manipulation` (prevents double-tap zoom delay)
92
- - Full-bleed layouts: `env(safe-area-inset-*)` for notch devices
93
- - Modals and drawers: `overscroll-behavior: contain`
94
- - Hover guard: wrap interactive hover states with `@media(hover:hover)` so they only apply on pointer devices, not touch screens. Tailwind: `[@media(hover:hover)]:hover:bg-...`. Without this, a tapped element on mobile gets a permanent hover state until the next tap elsewhere.
95
-
96
- ### Typography Details
97
- - Text wrapping: `text-wrap: balance` on headings and short text blocks (≤6 lines in Chromium, ≤10 in Firefox); `text-wrap: pretty` on body paragraphs and longer text; leave default on code blocks and pre-formatted text
98
- - Font smoothing: apply `-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale` once on the root layout (macOS only)
99
- - Tabular numbers: use `font-variant-numeric: tabular-nums` for counters, timers, prices, number columns, or any dynamically updating numbers
100
- - Letter-spacing scales with font size: display type needs negative tracking to look engineered rather than stretched. Two tiers: roughly -0.022em for display sizes (32px and above), -0.012em for mid-range (20–28px), normal at 16px and below. Apply to any display-weight typeface, not just geometric sans. Positive letter-spacing on large headlines is always wrong.
101
-
102
- ### Surfaces
103
- - Concentric border radius: calculate `outerRadius = innerRadius + padding` so nested rounded corners feel intentional, not mechanical; if padding exceeds `24px`, treat layers as separate surfaces and choose each radius independently
104
- - Optical alignment: nudge icons by eye, not just by math, so buttons feel centered; buttons with text and an icon use slightly less padding on the icon side (e.g., `pl-4 pr-3.5`); play triangles and asymmetric icons should shift `1px`-`2px` toward the heavier side, or fix the SVG directly
105
- - Shadows over borders: use layered `box-shadow` for depth on cards, buttons, and elevated elements so the surface feels lifted, not fenced in; reserve actual `border` for dividers, table cells, and layout separation (applies primarily to light mode; on dark surfaces see the dark-mode surface hierarchy rule below)
106
- - Image outlines: add a subtle inset outline so images hold their own depth without altering layout dimensions: `outline: 1px solid rgba(0,0,0,0.1); outline-offset: -1px` (light) or `outline: 1px solid rgba(255,255,255,0.1); outline-offset: -1px` (dark)
107
- - Minimum hit area: keep every interactive target at least 40×40px so even small controls feel generous and precise; extend with a centered pseudo-element when the visible element is smaller, and never let hit areas of two interactive elements overlap
108
- - Multi-card alignment: in a card group, bottom-align all CTA buttons so height variations between cards don't create a ragged action row. In pricing or comparison cards, align feature list items to a shared Y origin across all columns. In side-by-side panels (testimonials, plans, feature breakdowns), title, description, price, and action button must share baselines across the row. Section top and bottom padding need not be symmetric: optical balance often requires bottom padding 20-25% larger than top. Constrain body paragraph width to approximately 65 characters (ch) to maintain comfortable reading line length.
109
- - Light-mode app surface hierarchy: adjacent nested surfaces must be visually distinguishable. Minimum: background-color step of at least 4% lightness between sidebar and main area, and between main area and cards; or a shadow of at least `0 1px 3px rgba(0,0,0,0.10)` on elevated cards. A white card on a near-white background with `box-shadow: 0 1px 2px rgba(0,0,0,0.05)` is invisible -- that is not depth, it is noise.
110
- - Dark-mode surface hierarchy: the page canvas is a near-black solid (e.g. `#08090a`). Elevation is communicated by adding semi-transparent white overlays on top of that canvas: cards at `rgba(255,255,255,0.02)`, elevated surfaces at `0.04`, prominent panels at `0.05`. Borders follow the same logic: `rgba(255,255,255,0.05)` for subtle, `0.08` for standard. Traditional drop shadows (dark on dark) are nearly invisible; luminance stepping through background opacity is the primary depth cue on dark surfaces.
111
- - Border radius system: define a named radius scale during direction lock instead of picking values ad-hoc. A minimal scale is 3–4 tiers (e.g. `{4px, 8px, 12px, pill}`); a richer system might run 6–8 tiers. The point is committing to a named set before the first component so that all surfaces speak the same spatial language -- not covering every possible radius value.
112
-
113
- ### Adding to Existing UI
114
-
115
- When extending an existing interface, first spend time understanding its visual vocabulary. Match all of the following before writing the first line of new code:
116
- - Copywriting tone and reading level (technical? casual? punchy?)
117
- - Color palette and semantic color roles (which tokens mean "danger", "success", "muted")
118
- - Hover and click states: scale, color shift, underline, background fill
119
- - Animation style: duration, easing, whether interactions bounce or are strictly ease-out
120
- - Shadow and card treatment: which surfaces are elevated, which are flush
121
- - Layout density and whitespace rhythm
122
- - Border radius choices and whether buttons are pill, square, or a specific fixed value
123
-
124
- If swapping in different content would make the new component look out of place, the vocabulary was not matched closely enough.
125
-
126
- ### Responsive & Screen Verification
127
- - Verify the rendered surface, not a type check or CSS-balance read. Several regressions (early wraps, orphaned separator dots, table overflow) are invisible in source and only show in the render. Screenshot at phone (375px, plus 320px for buttons) and desktop (1280px), in every shipped locale.
128
- - Line widows: eliminate 1-2 word last lines by trimming the copy so the block rebalances, not by adding a `max-width` cap (a cap narrower than its container wraps early and leaves empty space on the right, which reads as a premature break). Detect objectively: flag any text block whose last line is under ~13% of its widest line; eyeballing misses them, and nested `<code>` hides them from greps.
129
- - Mobile CTA resting state: natural width, left-aligned to the surrounding text edge, height unchanged. Centering reads as floating; full-width `flex: 1` reads heavy; dropping button height to relieve a "too full" feel treats a width problem as a height one.
130
- - Spacing is a system, not a per-gap value. Run section spacing as one responsive ladder; when a page reads too airy or too tight, scale the whole set by a single factor across all breakpoints rather than tuning one gap. Asymmetry that survives tuning is structural.
131
- - Long-form and documentation surfaces stay light: a borderless prev/next text pager (not bordered cards), a sidebar active state as a thin rail rather than a filled block, and build-time zero-runtime-JS code highlighting (bake static spans, plain code stays the source) over a shipped highlighter.
132
-
133
- ## Data Visualization Surfaces
134
-
135
- For dashboards, analytics views, chart-heavy interfaces, or number-dense displays, load `references/design-data-viz.md`. It owns dashboard defaults, chart selection, number alignment, and product-benchmark extraction.
136
-
137
- ## Reflex Fonts to Reject
138
-
139
- LLMs default to these because they dominate training data. Using them signals "no decision was made." Pick from foundries with a clear voice instead. The ban is on reflex use as a display face; informed product-UI use (e.g. Inter for a dense data table) is allowed when justified. This list is not exhaustive -- any font used reflexively without a stated reason qualifies.
140
-
141
- Reject: Inter, DM Sans, DM Serif Display, DM Serif Text, Outfit, Plus Jakarta Sans, Instrument Sans, Instrument Serif, Space Grotesk, Space Mono, IBM Plex Sans, IBM Plex Serif, IBM Plex Mono, Syne, Fraunces, Newsreader, Lora, Crimson Pro, Crimson Text, Playfair Display, Cormorant, Cormorant Garamond.
142
-
143
- ## Font Selection Procedure
144
-
145
- 1. Write three words that describe the brand (e.g. "precise, minimal, fast").
146
- 2. Name the three fonts you would reach for reflexively.
147
- 3. Reject all three.
148
- 4. Pick a typeface from a named foundry (Klim, Commercial Type, Colophon, Grilli Type, OH no Type, Village, etc.) or an open-source option with a clear personality that matches the brand words. Be able to explain why that specific typeface in one sentence.
149
-
150
- ## CJK & Multilingual Type
151
-
152
- When the interface mixes Chinese, Japanese, or Korean with Latin, Latin-only type rules silently break the CJK text. Apply these before handoff:
153
-
154
- - **Latin face first, system CJK face after** in the stack, so each script renders with correct glyphs: `font-family: -apple-system, "SF Pro Text", "PingFang SC", "Noto Sans SC", sans-serif;`. Latin runs use the Latin face; Han characters fall through to the CJK face.
155
- - **Give CJK body text more line-height than Latin**: roughly 1.7–1.8 for reading. Dense Hanzi needs more vertical room than the 1.4–1.5 that suits Latin body copy.
156
- - **Tag runs with `lang="zh"` / `lang="ja"` / `lang="en"`** so the browser picks the right font and line-breaking. Mixed-language paragraphs break badly without it.
157
- - **Serif reading modes need an explicit CJK serif fallback.** Most Latin "reading serif" webfonts carry no CJK glyphs, so a serif toggle silently drops Chinese back to a sans and looks broken. Pair them: `"Newsreader", "Songti SC", "Noto Serif SC", serif`.
158
- - **Do not apply negative letter-spacing to CJK runs.** The display-type tracking rule above is Latin-only; tightening tracking on Hanzi cramps the glyphs and reads as a rendering bug. Scope tracking to `lang="en"` runs.
159
-
160
- ## Color System: OKLCH Rules
161
-
162
- - Use OKLCH instead of HSL. OKLCH is perceptually uniform: equal numeric changes produce equal perceived changes across the spectrum.
163
- - Reduce chroma as lightness approaches the extremes. At 85% lightness a chroma around 0.08 is enough; pushing to 0.15 looks garish. At 15% lightness, tighten chroma similarly.
164
- - Tint neutrals toward the brand hue with a chroma of 0.005 to 0.01. Even this faint amount is perceptible and creates subconscious cohesion.
165
- - 60-30-10 is about visual weight, not pixel count. 60% neutral/surface, 30% secondary text and borders, 10% accent.
166
- - Never use gray text on a colored background. Use a shade of the background hue at reduced lightness instead.
167
-
168
- ## Theme Matrix
169
-
170
- Choose light or dark deliberately based on audience and context. Neither is a default.
171
-
172
- | Context | Direction | Reason |
173
- |---|---|---|
174
- | Trading or analytics dashboard, night-shift use | Dark | High data density; reduced glare during long sessions |
175
- | Children's reading or learning app | Light | Welcoming, low fatigue for eyes still developing contrast sensitivity |
176
- | Enterprise SRE or observability tool | Dark | Operator context; dark surfaces read at a glance in low-light NOC rooms |
177
- | Weekend planning, recipes, journaling | Light | Ambient daytime use; light feels casual and approachable |
178
- | Music player or media browser | Dark | Content-forward; dark surfaces recede and let media pop |
179
- | Hospital or clinical patient portal | Light | Trust and legibility are paramount; clinical associations favor light |
180
- | Vintage or artisanal brand site | Cream/warm light | Dark would clash with the analog material references |
181
-
182
- If the answer is not obvious from the context, default to light. If the user's context implies both modes, ship light first and layer dark-mode tokens on top.
183
-
184
- ## Absolute Bans (CSS-Pattern Level)
185
-
186
- These patterns appear in the majority of AI-generated interfaces. Each one has a specific rewrite. Not exhaustive -- any CSS pattern applied as a mindless default rather than an intentional choice belongs in the same category.
187
-
188
- | Pattern | Why | Rewrite |
189
- |---|---|---|
190
- | `border-left` or `border-right` wider than 1px as a section accent | The single most overused "design touch" in admin and dashboard UIs; it looks like a mistake at anything beyond a hairline divider | Change element structure: use a colored dot, a short horizontal rule, a background swatch, or a typographic weight shift instead |
191
- | `background-clip: text` gradient text | Decorative rather than meaningful; one of the top AI design tells; illegible when printed or in high-contrast mode | Use a solid brand color, a tinted neutral, or typographic weight for emphasis |
192
- | `backdrop-filter: blur` glassmorphism as the default card surface | Expensive on low-power devices; overused; the layered-depth illusion breaks with a solid border | Use elevated surfaces via background color steps and `box-shadow` instead |
193
- | Purple-to-blue gradients or cyan-on-dark accent systems | The canonical "AI design" color palette; communicates nothing about the brand | Pick a palette from the brand words via the OKLCH rules above |
194
- | Generic rounded-rect card with `box-shadow` as the default container | Template thinking; applies the same container to every content type regardless of hierarchy | Default to cardless sections; only add card treatment when the content type requires it |
195
- | Modals as a lazy escape for overflow UI | Interrupts flow and breaks browser back navigation; used when an inline expansion, drawer, or separate page would be better | Inline expand, detail panel, or dedicated route; modals only when the action truly requires focus-lock |
196
- | `transition: all` or animating width/height/padding/margin | Forces the browser into layout recalculation on every frame | List exact properties (`transition-property: transform, opacity`); use `grid-template-rows: 0fr to 1fr` for height reveals |
197
-
198
- ## Motion Specifics
199
-
200
- Complements the motion timing in the main SKILL.md constraints.
201
-
202
- - No bounce or elastic easing. Real objects decelerate smoothly. Use exponential ease-out (`ease-out-quart`, `ease-out-quint`, or `cubic-bezier(0.16,1,0.3,1)`) for natural, high-quality deceleration.
203
- - Animate `transform` and `opacity` only. Every other property triggers layout or paint.
204
- - For height reveals, use `grid-template-rows: 0fr` to `1fr` transitions instead of animating `height` directly. It avoids the `height: auto` animation trap.
205
- - Icon swaps: use a 120ms cross-fade with `opacity` and a subtle `scale(0.9)` to `scale(1)`. No rotation unless rotation is semantically meaningful (e.g. a chevron indicating direction change).
206
- - Do not use `transition: all` even as a quick prototype shortcut. It animates layout, color, and font-size simultaneously, causing visible jank.
207
-
208
- ## Reference-site Brand Presets (awesome-design-md)
209
-
210
- `VoltAgent/awesome-design-md` maintains 66+ curated DESIGN.md files extracted from real-world brand sites. Running `npx getdesign@latest add <brand>` drops the file into the project root, giving the agent concrete token values to decompose rather than reasoning from memory.
211
-
212
- **Usage rule:** never auto-run the command. Offer it as an option during direction lock, run it only with explicit user approval, and treat the result as seed decomposition material, not a finished direction.
213
-
214
- **Brands in the catalog** (recognize these when a user names a reference):
215
-
216
- | Category | Brands |
217
- |---|---|
218
- | AI & LLM | Claude, Cohere, ElevenLabs, Mistral, Ollama, Replicate, RunwayML, Together AI, xAI |
219
- | Dev Tools & IDEs | Cursor, Expo, Lovable, Raycast, Superhuman, Vercel, Warp |
220
- | Backend / DB / DevOps | ClickHouse, Composio, HashiCorp, MongoDB, PostHog, Sanity, Sentry, Supabase |
221
- | Productivity & SaaS | Cal.com, Intercom, Linear, Mintlify, Notion, Resend, Zapier |
222
- | Design & Creative | Airtable, Clay, Figma, Framer, Miro, Webflow |
223
- | Fintech & Crypto | Binance, Coinbase, Kraken, Revolut, Stripe, Wise |
224
- | E-commerce & Retail | Airbnb, Meta, Nike, Shopify |
225
- | Media & Consumer | Apple, IBM, NVIDIA, Pinterest, PlayStation, SpaceX, Spotify, Uber |
226
- | Automotive | BMW, Bugatti, Ferrari, Lamborghini, Tesla |
227
-
228
- **Conflict resolution:** this skill's rules always win. If the preset recommends a font on the Reflex Fonts blocklist (e.g. Inter as a display face), discard it and apply the Font Selection Procedure. If it proposes a pattern in the Absolute Bans table (e.g. purple-to-blue gradient), discard it. State the override in the handoff summary.
229
-
230
- Source: [github.com/VoltAgent/awesome-design-md](https://github.com/VoltAgent/awesome-design-md)
231
-
232
- ## Reference Material Priority
233
-
234
- When source code and a screenshot are both available for a reference UI: read the code. Source files contain exact token values; screenshots require guessing. Reconstruct from what is written, not what is visible.
235
-
236
- When only a URL is provided: fetching it returns extracted text only, with no layout information. For visual references ("make it look like X"), ask for a screenshot rather than inferring visual design from stripped HTML.
237
-
238
- ## DESIGN.md Scaffold (Optional, Production UIs)
239
-
240
- For a multi-page or production UI, emit a short `DESIGN.md`-style summary before writing the first component. This forces enumeration of decisions that would otherwise be left implicit and lets the user correct direction early. The nine sections:
241
-
242
- 1. **Visual Theme and Atmosphere** - mood, density, design philosophy in 2-3 sentences
243
- 2. **Color Palette and Roles** - semantic name + value + functional role for each color token
244
- 3. **Typography Rules** - font family, size scale, weight scale, line-height, letter-spacing; a table if more than 4 levels
245
- 4. **Component Stylings** - buttons (all states), cards (if used), inputs, navigation; describe each with states (default, hover, active, disabled)
246
- 5. **Layout Principles** - spacing scale, grid columns, whitespace philosophy
247
- 6. **Depth and Elevation** - shadow system or background-color-step system; describe each level
248
- 7. **Do's and Don'ts** - 5 to 10 guardrails specific to this project, not generic rules
249
- 8. **Responsive Behavior** - breakpoints, how navigation collapses, touch target minimums
250
- 9. **Agent Prompt Guide** - a quick color reference (name: value pairs) + 3 to 5 example component prompts ready to paste into a follow-up request. Prompts must be specific enough to execute without further lookup: every value, every radius, every letter-spacing, every weight inlined. Example standard (values are illustrative, use the project's own tokens): "Create a hero on `{bg-canvas}`, headline at 48px weight 600, line-height 1.00, letter-spacing -0.022em, color `{text-primary}`, CTA at `{accent}` with `{btn-radius}` radius"; that level of specificity, not "hero with primary color and CTA button"
251
-
252
- For a single component or quick prototype, skip this. The three-line thesis in SKILL.md is sufficient.
253
-
254
- ## Pre-Handoff Checklist: Strategic Omissions
255
-
256
- These are the items most frequently missing from AI-generated UIs because they require intentional product thinking, not visual judgment. Run through them before every handoff.
257
-
258
- - [ ] **Custom 404 page**: a generic framework 404 is a broken experience. Build a branded page with a clear path back (home link, search, or most-used nav items).
259
- - [ ] **Back navigation**: every page reachable by user action must have a clear, functional path back. Dead-end pages (detail views, confirmation screens, modal-only flows) are UX failures.
260
- - [ ] **Form client-side validation**: email fields validate format before submit; required fields show inline errors; error messages appear adjacent to the field, not only at form top.
261
- - [ ] **Skip-to-content link**: a visually hidden `<a href="#main-content">Skip to main content</a>` as the first focusable element in the document. Required for keyboard accessibility.
262
- - [ ] **Cookie consent**: if the product operates in the EU or California, cookie consent UI is not optional. Scope the implementation to the jurisdiction.
263
- - [ ] **Footer Privacy and Terms links**: every product page needs these. Their absence signals "demo", not "product".
264
-
265
- These are not visual polish items. They are the difference between a demo and a shippable product.
266
-
267
- ## AI Slop Test
268
-
269
- Would a stranger glancing at the first viewport say "an AI made this" immediately? If yes, the committed direction was not committed enough. The usual culprits: reflex font, default purple accent, centered hero with generic card grid beneath. Fix the typography, the color system, or the layout until the answer flips.
270
-
271
- ## Brand Preset Flow
272
-
273
- For well-known brands (Linear, Stripe, Claude, Vercel, Apple, Tesla, Notion, Figma, Airbnb, Spotify, and ~56 others catalogued in `awesome-design-md`): ask the user whether to pull the curated preset via `npx getdesign@latest add <brand>`. If they approve, run it, read the generated `DESIGN.md` at project root, then do the 3-property decomposition against that file rather than from memory. The preset is a starting point, not a direction: the user still names the aesthetic precisely, and the reflex-font blocklist and absolute bans still win on any conflict.
274
-
275
- ## App Shell Rules
276
-
277
- When building a sidebar + main workspace layout (Slack, Linear, Notion class):
278
- - Decorative backgrounds default to off
279
- - Surface hierarchy uses background-color steps and shadow only
280
- - All interactive elements get `active:scale-95`
281
- - Button radius is consistent within each component type (pick one: pill, square, or one fixed value, do not mix)
282
- - Commit to a named radius scale before the first component (see Border radius system above)
283
-
284
- ## Options Guide
285
-
286
- When asked for design options, give at least 3 variations spread across genuinely different dimensions:
287
-
288
- - **Dimensions to vary**: visual density, typographic personality, color temperature, layout structure, motion character, amount of decoration, level of abstraction
289
- - **Mix approaches**: one option that follows existing conventions closely, one that remixes the brand DNA in a new way, one that is deliberately unexpected
290
- - **Progress from basic to bold**: the first option is safe and understandable; later options push further
291
- - Three options that differ only by accent color are not three variations. Vary the layout, the typeface, the motion, the surface treatment.
292
-
293
- ---
294
-
295
- *Rules in Reflex Fonts, Font Selection, OKLCH, Theme Matrix, Absolute Bans, Motion Specifics, and AI Slop Test adapted from [pbakaus/impeccable](https://github.com/pbakaus/impeccable) (Apache 2.0). DESIGN.md Scaffold adapted from [getdesign.md](https://getdesign.md) (MIT); concept credited to Google Stitch. Brand preset catalog from [VoltAgent/awesome-design-md](https://github.com/VoltAgent/awesome-design-md) (MIT). Content Authenticity, Multi-Card Alignment, and Strategic Omissions inspired by [Leonxlnx/taste-skill](https://github.com/Leonxlnx/taste-skill).*