@litfamily/litgravity 0.1.1 → 0.1.2

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 (246) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +17 -3
  3. package/README_ko-KR.md +17 -3
  4. package/package.json +1 -1
  5. package/plugin/hooks/lib/lanes.mjs +65 -0
  6. package/plugin/hooks/lib/motion.mjs +34 -5
  7. package/plugin/hooks/lib/reentry.mjs +7 -0
  8. package/plugin/hooks/lib/rewind/brief.mjs +332 -0
  9. package/plugin/hooks/lib/rewind/collect.mjs +328 -0
  10. package/plugin/hooks/lib/rewind/gauge.mjs +55 -0
  11. package/plugin/hooks/lib/rewind/next-step.mjs +77 -0
  12. package/plugin/hooks/lib/rewind/redact.mjs +60 -0
  13. package/plugin/hooks/lib/rewind/transcripts.mjs +211 -0
  14. package/plugin/hooks/lib/routes.mjs +79 -5
  15. package/plugin/hooks/lib/workflow-stack.mjs +213 -0
  16. package/plugin/hooks/post-tool-use.mjs +37 -1
  17. package/plugin/hooks/pre-invocation.mjs +91 -2
  18. package/plugin/hooks/session-start.mjs +26 -3
  19. package/plugin/hooks/stop.mjs +22 -2
  20. package/plugin/hud/looks.mjs +29 -0
  21. package/plugin/hud/render.mjs +234 -12
  22. package/plugin/plugin.json +1 -1
  23. package/plugin/skills/frontend-ui-ux/SKILL.md +12 -1
  24. package/plugin/skills/frontend-ui-ux/kit/components.css +417 -0
  25. package/plugin/skills/frontend-ui-ux/kit/fonts.json +22 -0
  26. package/plugin/skills/frontend-ui-ux/kit/layouts/landing.html +164 -0
  27. package/plugin/skills/frontend-ui-ux/kit/layouts/settings.html +114 -0
  28. package/plugin/skills/frontend-ui-ux/kit/layouts/workspace.html +115 -0
  29. package/plugin/skills/frontend-ui-ux/kit/styles/computational-brutalism.json +227 -0
  30. package/plugin/skills/frontend-ui-ux/kit/styles/field-notes.json +205 -0
  31. package/plugin/skills/frontend-ui-ux/kit/styles/graphite.json +200 -0
  32. package/plugin/skills/frontend-ui-ux/kit/styles/meadow.json +199 -0
  33. package/plugin/skills/frontend-ui-ux/kit/styles/neo-brutalism.json +222 -0
  34. package/plugin/skills/frontend-ui-ux/kit/ui.js +226 -0
  35. package/plugin/skills/frontend-ui-ux/references/house-styles.md +234 -0
  36. package/plugin/skills/frontend-ui-ux/scripts/design-lock.mjs +400 -0
  37. package/plugin/skills/frontend-ui-ux/scripts/interface-probe-lock.mjs +196 -0
  38. package/plugin/skills/frontend-ui-ux/scripts/interface-probe-page.mjs +30 -9
  39. package/plugin/skills/frontend-ui-ux/scripts/interface-probe-rules.mjs +20 -8
  40. package/plugin/skills/frontend-ui-ux/scripts/interface-probe.mjs +42 -9
  41. package/plugin/skills/frontend-ui-ux/scripts/pixel-art.mjs +60 -0
  42. package/plugin/skills/lit-adhd/SKILL.md +157 -0
  43. package/plugin/skills/lit-adhd/references/card-examples.md +101 -0
  44. package/plugin/skills/lit-adhd/references/status-taxonomy.md +32 -0
  45. package/plugin/skills/lit-adhd/scripts/rewind.mjs +5 -0
  46. package/plugin/skills/lit-diagram-drawer/SKILL.md +5 -3
  47. package/plugin/skills/lit-diagram-drawer/references/drawing-rules.md +1 -1
  48. package/plugin/skills/lit-diagram-drawer/references/style-guide.md +21 -12
  49. package/plugin/skills/lit-diagram-drawer/references/type-architecture.md +3 -3
  50. package/plugin/skills/lit-diagram-drawer/references/type-dependency.md +1 -1
  51. package/plugin/skills/lit-diagram-drawer/references/type-tree.md +3 -3
  52. package/plugin/skills/lit-diagram-drawer/references/type-wardley.md +1 -1
  53. package/plugin/skills/lit-diagram-drawer/scripts/diagram-craft-rules.mjs +1 -2
  54. package/plugin/skills/lit-diagram-drawer/scripts/visual-quality.mjs +1 -2
  55. package/plugin/skills/lit-docx/SKILL.md +3 -3
  56. package/plugin/skills/lit-handoff/SKILL.md +1 -0
  57. package/plugin/skills/lit-hijack/SKILL.md +263 -0
  58. package/plugin/skills/lit-hijack/references/capture-and-provenance.md +100 -0
  59. package/plugin/skills/lit-hijack/references/clean-room-build.md +75 -0
  60. package/plugin/skills/lit-hijack/references/distil-and-licence.md +67 -0
  61. package/plugin/skills/lit-hijack/references/gap-and-port-design.md +100 -0
  62. package/plugin/skills/lit-hijack/references/parity-and-report.md +85 -0
  63. package/plugin/skills/lit-hijack/scripts/hijack.mjs +953 -0
  64. package/plugin/skills/lit-plan/SKILL.md +1 -1
  65. package/plugin/skills/lit-pptx/SKILL.md +8 -8
  66. package/plugin/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Bold.ttf +0 -0
  67. package/plugin/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf +0 -0
  68. package/plugin/skills/lit-pptx/fonts/jetbrains-mono/OFL.txt +93 -0
  69. package/plugin/skills/lit-pptx/fonts/provenance.json +32 -1
  70. package/plugin/skills/lit-pptx/references/agents/analyst.md +34 -56
  71. package/plugin/skills/lit-pptx/references/agents/antithesis.md +49 -67
  72. package/plugin/skills/lit-pptx/references/agents/architect.md +38 -51
  73. package/plugin/skills/lit-pptx/references/agents/critic.md +25 -41
  74. package/plugin/skills/lit-pptx/references/agents/synthesizer.md +37 -46
  75. package/plugin/skills/lit-pptx/references/agents/thesis.md +29 -49
  76. package/plugin/skills/lit-pptx/references/anti-slop-checklist.md +119 -145
  77. package/plugin/skills/lit-pptx/references/authoring-guide.md +187 -278
  78. package/plugin/skills/lit-pptx/references/consensus-protocol.md +99 -97
  79. package/plugin/skills/lit-pptx/references/data-display-cookbook.md +36 -137
  80. package/plugin/skills/lit-pptx/references/density-and-fill.md +147 -216
  81. package/plugin/skills/lit-pptx/references/design-system-azure.md +56 -85
  82. package/plugin/skills/lit-pptx/references/direction-step.md +134 -176
  83. package/plugin/skills/lit-pptx/references/examples/01-pitch-signal-ko.md +114 -115
  84. package/plugin/skills/lit-pptx/references/examples/02-pitch-studio-ko.md +66 -66
  85. package/plugin/skills/lit-pptx/references/examples/03-business-review-ledger-ko.md +63 -63
  86. package/plugin/skills/lit-pptx/references/examples/04-business-review-night-en.md +96 -96
  87. package/plugin/skills/lit-pptx/references/examples/05-research-talk-paper-en.md +81 -81
  88. package/plugin/skills/lit-pptx/references/examples/06-lecture-chalk-ko.md +103 -103
  89. package/plugin/skills/lit-pptx/references/examples/07-data-review-night-en.md +100 -98
  90. package/plugin/skills/lit-pptx/references/examples/08-image-led-atlas-ko.md +76 -76
  91. package/plugin/skills/lit-pptx/references/examples/09-briefing-gazette-ko.md +96 -96
  92. package/plugin/skills/lit-pptx/references/examples/10-status-update-ledger-ko.md +80 -80
  93. package/plugin/skills/lit-pptx/references/examples/11-portfolio-studio-en.md +72 -72
  94. package/plugin/skills/lit-pptx/references/examples/12-research-tutorial-chalk-en.md +95 -95
  95. package/plugin/skills/lit-pptx/references/examples/13-engineering-review-computational-brutalism-ko.md +173 -0
  96. package/plugin/skills/lit-pptx/references/examples/14-launch-pitch-neo-brutalism-ko.md +154 -0
  97. package/plugin/skills/lit-pptx/references/examples/15-design-lecture-bauhaus-ko.md +139 -0
  98. package/plugin/skills/lit-pptx/references/examples/16-community-programme-riso-ko.md +158 -0
  99. package/plugin/skills/lit-pptx/references/examples/17-public-data-briefing-newsroom-ko.md +179 -0
  100. package/plugin/skills/lit-pptx/references/interview-protocol.md +83 -102
  101. package/plugin/skills/lit-pptx/references/layout-families.md +161 -265
  102. package/plugin/skills/lit-pptx/references/stages/autopilot.md +30 -70
  103. package/plugin/skills/lit-pptx/references/stages/interview.md +36 -68
  104. package/plugin/skills/lit-pptx/references/stages/plan.md +26 -67
  105. package/plugin/skills/lit-pptx/references/title-treatments.md +93 -145
  106. package/plugin/skills/lit-pptx/references/tonalities/atlas.md +95 -108
  107. package/plugin/skills/lit-pptx/references/tonalities/bauhaus.md +140 -0
  108. package/plugin/skills/lit-pptx/references/tonalities/chalk.md +107 -122
  109. package/plugin/skills/lit-pptx/references/tonalities/computational-brutalism.md +150 -0
  110. package/plugin/skills/lit-pptx/references/tonalities/gazette.md +87 -111
  111. package/plugin/skills/lit-pptx/references/tonalities/ledger.md +96 -125
  112. package/plugin/skills/lit-pptx/references/tonalities/neo-brutalism.md +161 -0
  113. package/plugin/skills/lit-pptx/references/tonalities/newsroom.md +144 -0
  114. package/plugin/skills/lit-pptx/references/tonalities/night.md +104 -131
  115. package/plugin/skills/lit-pptx/references/tonalities/paper.md +114 -130
  116. package/plugin/skills/lit-pptx/references/tonalities/riso.md +137 -0
  117. package/plugin/skills/lit-pptx/references/tonalities/signal.md +96 -103
  118. package/plugin/skills/lit-pptx/references/tonalities/studio.md +81 -112
  119. package/plugin/skills/lit-pptx/scripts/compile-deck.js +4 -6
  120. package/plugin/skills/lit-pptx/scripts/craft_extras.py +135 -91
  121. package/plugin/skills/lit-pptx/scripts/deck_craft.py +1 -1
  122. package/plugin/skills/lit-pptx/scripts/embed_fonts.py +13 -1
  123. package/plugin/skills/lit-pptx/scripts/layout_inventory.py +1 -1
  124. package/plugin/skills/lit-pptx/scripts/learn_template.py +1 -1
  125. package/plugin/skills/lit-pptx/scripts/lib/grid-resolver.js +101 -110
  126. package/plugin/skills/lit-pptx/scripts/lib/layout-resolver.js +9 -15
  127. package/plugin/skills/lit-pptx/scripts/lib/render-pack.js +370 -563
  128. package/plugin/skills/lit-pptx/scripts/lib/slide-grid.js +104 -0
  129. package/plugin/skills/lit-pptx/scripts/lib/template-registry.js +57 -6
  130. package/plugin/skills/lit-pptx/scripts/qa_deck.py +6 -6
  131. package/plugin/skills/lit-pptx/scripts/render_pages.py +31 -0
  132. package/plugin/skills/lit-pptx/scripts/validate_pptx.py +1 -1
  133. package/plugin/skills/lit-pptx/specs/markdown-slide-spec-v1.md +167 -191
  134. package/plugin/skills/lit-pptx/specs/markdown-slide-spec-v2.md +117 -166
  135. package/plugin/skills/lit-pptx/specs/template-enrollment-contract.md +307 -330
  136. package/plugin/skills/lit-pptx/templates/tonalities/atlas/pack.yaml +1 -1
  137. package/plugin/skills/lit-pptx/templates/tonalities/bauhaus/pack.yaml +98 -0
  138. package/plugin/skills/lit-pptx/templates/tonalities/chalk/pack.yaml +1 -1
  139. package/plugin/skills/lit-pptx/templates/tonalities/computational-brutalism/pack.yaml +99 -0
  140. package/plugin/skills/lit-pptx/templates/tonalities/gazette/pack.yaml +1 -1
  141. package/plugin/skills/lit-pptx/templates/tonalities/ledger/pack.yaml +1 -1
  142. package/plugin/skills/lit-pptx/templates/tonalities/neo-brutalism/pack.yaml +107 -0
  143. package/plugin/skills/lit-pptx/templates/tonalities/newsroom/pack.yaml +99 -0
  144. package/plugin/skills/lit-pptx/templates/tonalities/night/pack.yaml +1 -1
  145. package/plugin/skills/lit-pptx/templates/tonalities/paper/pack.yaml +1 -1
  146. package/plugin/skills/lit-pptx/templates/tonalities/riso/pack.yaml +99 -0
  147. package/plugin/skills/lit-pptx/templates/tonalities/signal/pack.yaml +2 -2
  148. package/plugin/skills/lit-pptx/templates/tonalities/studio/pack.yaml +1 -1
  149. package/plugin/skills/lit-schematic/SKILL.md +114 -0
  150. package/plugin/skills/lit-schematic/examples/iso-heat-exchanger/build.mjs +38 -0
  151. package/plugin/skills/lit-schematic/examples/iso-heat-exchanger/scene.mjs +133 -0
  152. package/plugin/skills/lit-schematic/examples/journal-adsorption-rig/build.mjs +87 -0
  153. package/plugin/skills/lit-schematic/examples/pid-dosing-skid/build.mjs +85 -0
  154. package/plugin/skills/lit-schematic/references/cutaway-outputs.md +70 -0
  155. package/plugin/skills/lit-schematic/references/isometric-craft.md +101 -0
  156. package/plugin/skills/lit-schematic/references/journal-figures.md +72 -0
  157. package/plugin/skills/lit-schematic/references/kit-api.md +134 -0
  158. package/plugin/skills/lit-schematic/references/pfd-and-layout.md +53 -0
  159. package/plugin/skills/lit-schematic/references/pid-drafting.md +103 -0
  160. package/plugin/skills/lit-schematic/references/pid-symbols.md +163 -0
  161. package/plugin/skills/lit-schematic/references/verification.md +100 -0
  162. package/plugin/skills/lit-schematic/scripts/doctor.mjs +57 -0
  163. package/plugin/skills/lit-schematic/scripts/lib/figure.mjs +81 -0
  164. package/plugin/skills/lit-schematic/scripts/lib/fonts.mjs +27 -0
  165. package/plugin/skills/lit-schematic/scripts/lib/geom.mjs +113 -0
  166. package/plugin/skills/lit-schematic/scripts/lib/interactive.mjs +292 -0
  167. package/plugin/skills/lit-schematic/scripts/lib/isa.mjs +115 -0
  168. package/plugin/skills/lit-schematic/scripts/lib/iso.mjs +719 -0
  169. package/plugin/skills/lit-schematic/scripts/lib/legend-sheet.mjs +162 -0
  170. package/plugin/skills/lit-schematic/scripts/lib/pid.mjs +937 -0
  171. package/plugin/skills/lit-schematic/scripts/lib/png.mjs +132 -0
  172. package/plugin/skills/lit-schematic/scripts/lib/qa-core.mjs +658 -0
  173. package/plugin/skills/lit-schematic/scripts/lib/route.mjs +218 -0
  174. package/plugin/skills/lit-schematic/scripts/lib/sheet.mjs +890 -0
  175. package/plugin/skills/lit-schematic/scripts/lib/svg.mjs +82 -0
  176. package/plugin/skills/lit-schematic/scripts/lib/theme.mjs +115 -0
  177. package/plugin/skills/lit-schematic/scripts/motion.mjs +129 -0
  178. package/plugin/skills/lit-schematic/scripts/qa.mjs +92 -0
  179. package/plugin/skills/lit-schematic/scripts/render.mjs +233 -0
  180. package/plugin/skills/lit-schematic/scripts/scaffold.mjs +60 -0
  181. package/plugin/skills/lit-scientific-visualization/SKILL.md +17 -6
  182. package/plugin/skills/lit-typographic-motion/SKILL.md +58 -48
  183. package/plugin/skills/lit-typographic-motion/engine/THIRD_PARTY_NOTICES +13 -2
  184. package/plugin/skills/lit-typographic-motion/engine/blender/runner.py +218 -0
  185. package/plugin/skills/lit-typographic-motion/engine/core/presets.mjs +1 -1
  186. package/plugin/skills/lit-typographic-motion/engine/node/analysis.mjs +65 -1
  187. package/plugin/skills/lit-typographic-motion/engine/node/assets.mjs +298 -0
  188. package/plugin/skills/lit-typographic-motion/engine/node/blender.mjs +143 -0
  189. package/plugin/skills/lit-typographic-motion/engine/node/board.mjs +136 -0
  190. package/plugin/skills/lit-typographic-motion/engine/node/brief.mjs +7 -1
  191. package/plugin/skills/lit-typographic-motion/engine/node/chrome.mjs +9 -12
  192. package/plugin/skills/lit-typographic-motion/engine/node/cover-assets.mjs +5 -3
  193. package/plugin/skills/lit-typographic-motion/engine/node/cover-capture.mjs +7 -6
  194. package/plugin/skills/lit-typographic-motion/engine/node/cover-treatment.mjs +37 -4
  195. package/plugin/skills/lit-typographic-motion/engine/node/cover.mjs +19 -8
  196. package/plugin/skills/lit-typographic-motion/engine/node/done.mjs +45 -6
  197. package/plugin/skills/lit-typographic-motion/engine/node/frame-worker.mjs +7 -5
  198. package/plugin/skills/lit-typographic-motion/engine/node/gallery.mjs +121 -0
  199. package/plugin/skills/lit-typographic-motion/engine/node/host.mjs +34 -0
  200. package/plugin/skills/lit-typographic-motion/engine/node/house.mjs +44 -0
  201. package/plugin/skills/lit-typographic-motion/engine/node/look.mjs +34 -20
  202. package/plugin/skills/lit-typographic-motion/engine/node/pipeline.mjs +19 -9
  203. package/plugin/skills/lit-typographic-motion/engine/node/scaffold.mjs +210 -0
  204. package/plugin/skills/lit-typographic-motion/engine/node/score.mjs +639 -0
  205. package/plugin/skills/lit-typographic-motion/engine/node/sound-cli.mjs +21 -4
  206. package/plugin/skills/lit-typographic-motion/engine/node/sound.mjs +127 -29
  207. package/plugin/skills/lit-typographic-motion/engine/node/stage-capture.mjs +7 -6
  208. package/plugin/skills/lit-typographic-motion/engine/node/stage-gate.mjs +59 -5
  209. package/plugin/skills/lit-typographic-motion/engine/node/stage-qa.mjs +141 -9
  210. package/plugin/skills/lit-typographic-motion/engine/node/stage-serve.mjs +28 -5
  211. package/plugin/skills/lit-typographic-motion/engine/node/stage.mjs +82 -14
  212. package/plugin/skills/lit-typographic-motion/engine/node/styles.mjs +213 -0
  213. package/plugin/skills/lit-typographic-motion/engine/node/treatment.mjs +311 -10
  214. package/plugin/skills/lit-typographic-motion/engine/stage/cover-init.js +14 -2
  215. package/plugin/skills/lit-typographic-motion/engine/stage/init.js +11 -1
  216. package/plugin/skills/lit-typographic-motion/engine/stage/qa.js +6 -1
  217. package/plugin/skills/lit-typographic-motion/engine/stage/stage-kit.js +83 -0
  218. package/plugin/skills/lit-typographic-motion/engine/vendor/three/LICENSE +21 -0
  219. package/plugin/skills/lit-typographic-motion/engine/vendor/three/addons/environments/RoomEnvironment.js +144 -0
  220. package/plugin/skills/lit-typographic-motion/engine/vendor/three/addons/geometries/RoundedBoxGeometry.js +155 -0
  221. package/plugin/skills/lit-typographic-motion/engine/vendor/three/three.module.js +54571 -0
  222. package/plugin/skills/lit-typographic-motion/recipes/hero-3d/expected.json +69 -0
  223. package/plugin/skills/lit-typographic-motion/recipes/hero-3d/index.html +139 -0
  224. package/plugin/skills/lit-typographic-motion/recipes/orbit-loop/expected.json +6 -4
  225. package/plugin/skills/lit-typographic-motion/recipes/painted-light/expected.json +4 -2
  226. package/plugin/skills/lit-typographic-motion/recipes/weight-tide/expected.json +7 -5
  227. package/plugin/skills/lit-typographic-motion/references/cover.md +394 -443
  228. package/plugin/skills/lit-typographic-motion/references/craft-loop.md +57 -87
  229. package/plugin/skills/lit-typographic-motion/references/depth.md +122 -0
  230. package/plugin/skills/lit-typographic-motion/references/look.md +94 -129
  231. package/plugin/skills/lit-typographic-motion/references/runtime.md +58 -91
  232. package/plugin/skills/lit-typographic-motion/references/sound.md +130 -99
  233. package/plugin/skills/lit-typographic-motion/references/stage.md +190 -215
  234. package/plugin/skills/lit-typographic-motion/references/studio.md +245 -0
  235. package/plugin/skills/lit-typographic-motion/references/style-bibles.md +108 -97
  236. package/plugin/skills/lit-typographic-motion/references/treatment.md +191 -143
  237. package/plugin/skills/lit-typographic-motion/scripts/motion-doctor.mjs +17 -5
  238. package/plugin/skills/lit-typographic-motion/scripts/motion.mjs +47 -7
  239. package/plugin/skills/lit-typographic-motion/styles/paper.json +41 -0
  240. package/plugin/skills/lit-typographic-motion/styles/swiss-signal.json +41 -0
  241. package/plugin/skills/lit-typographic-motion/styles/terminalcore.json +42 -0
  242. package/plugin/skills/lit-typographic-motion/styles/tidal.json +41 -0
  243. package/plugin/skills/litresearch/SKILL.md +1 -0
  244. package/plugin/skills/readme-studio/SKILL.md +2 -0
  245. package/plugin/skills/review-work/SKILL.md +1 -1
  246. package/plugin/skills/start-work/SKILL.md +1 -1
@@ -0,0 +1,226 @@
1
+ // frontend-ui-ux kit: behaviour that every build otherwise re-invents. No dependencies, no
2
+ // network. Colours come from the locked tokens (CSS custom properties), never from literals.
3
+ // UI.bars(el, { labels, series: [{ name, values, role }], marker, unit, caption })
4
+ // UI.lines(el, { labels, series: [{ name, values, role }], marker, unit, caption })
5
+ // <table data-ui-sortable> header <button class="ui-sort"> cells sort by data-value or text
6
+ // <div role="tablist" data-ui-tabs> arrow keys, Home and End move between tabs
7
+ (function () {
8
+ "use strict";
9
+ const NS = "http://www.w3.org/2000/svg";
10
+ const svg = (tag, attrs = {}) => {
11
+ const node = document.createElementNS(NS, tag);
12
+ for (const [key, value] of Object.entries(attrs)) node.setAttribute(key, String(value));
13
+ return node;
14
+ };
15
+ const roleColor = (role, index) => `var(--c-${role || `chart-${(index % 5) + 1}`})`;
16
+ const niceMax = (value) => {
17
+ if (value <= 0) return 1;
18
+ const power = 10 ** Math.floor(Math.log10(value));
19
+ const step = [1, 2, 2.5, 5, 10].find((n) => n * power >= value / 4) * power;
20
+ return Math.ceil(value / step) * step;
21
+ };
22
+ const fmt = (value, unit) => `${Number(value).toLocaleString()}${unit ?? ""}`;
23
+
24
+ function frame(el, opts, maxValue) {
25
+ el.classList.add("ui-chart");
26
+ el.replaceChildren();
27
+ const width = Math.max(280, Math.round(el.getBoundingClientRect().width) || 640);
28
+ const height = opts.height ?? (width < 480 ? 200 : 240);
29
+ const pad = { top: 16, right: 8, bottom: 28, left: 36 };
30
+ const plotW = width - pad.left - pad.right;
31
+ const plotH = height - pad.top - pad.bottom;
32
+ const root = svg("svg", { viewBox: `0 0 ${width} ${height}`, width, height, role: "img", "aria-label": opts.caption ?? "Chart" });
33
+ // Whole-number data keeps whole-number ticks: round the top up to a multiple of the four steps.
34
+ const top = opts.integer ? Math.max(4, Math.ceil(niceMax(maxValue) / 4) * 4) : niceMax(maxValue);
35
+ const axis = svg("g", { class: "ui-axis" });
36
+ for (let i = 0; i <= 4; i += 1) {
37
+ const y = pad.top + plotH - (plotH * i) / 4;
38
+ root.append(svg("line", { class: i === 0 ? "ui-baseline" : "ui-grid-line", x1: pad.left, x2: width - pad.right, y1: y, y2: y }));
39
+ const label = svg("text", { x: pad.left - 8, y: y + 4, "text-anchor": "end" });
40
+ label.textContent = fmt((top * i) / 4, "");
41
+ axis.append(label);
42
+ }
43
+ root.append(axis);
44
+ return { root, axis, width, height, pad, plotW, plotH, top };
45
+ }
46
+
47
+ function legendAndTable(el, opts) {
48
+ if (opts.series.length > 1) {
49
+ const legend = document.createElement("div");
50
+ legend.className = "ui-legend";
51
+ opts.series.forEach((series, index) => {
52
+ const item = document.createElement("span");
53
+ const swatch = document.createElement("i");
54
+ swatch.style.setProperty("--swatch", roleColor(series.role, index));
55
+ item.append(swatch, document.createTextNode(series.name));
56
+ legend.append(item);
57
+ });
58
+ el.prepend(legend);
59
+ }
60
+ const details = document.createElement("details");
61
+ const summary = document.createElement("summary");
62
+ summary.className = "ui-meta";
63
+ summary.textContent = opts.tableLabel ?? "Show as table";
64
+ const table = document.createElement("table");
65
+ table.className = "ui-table ui-table--compact";
66
+ const head = document.createElement("tr");
67
+ for (const text of [opts.indexLabel ?? "", ...opts.series.map((s) => s.name)]) {
68
+ const th = document.createElement("th");
69
+ th.textContent = text;
70
+ head.append(th);
71
+ }
72
+ const thead = document.createElement("thead");
73
+ thead.append(head);
74
+ const tbody = document.createElement("tbody");
75
+ opts.labels.forEach((label, row) => {
76
+ const tr = document.createElement("tr");
77
+ const th = document.createElement("th");
78
+ th.scope = "row";
79
+ th.textContent = label;
80
+ tr.append(th);
81
+ for (const series of opts.series) {
82
+ const td = document.createElement("td");
83
+ td.className = "is-num";
84
+ td.textContent = fmt(series.values[row], opts.unit);
85
+ tr.append(td);
86
+ }
87
+ tbody.append(tr);
88
+ });
89
+ table.append(thead, tbody);
90
+ details.append(summary, table);
91
+ el.append(details);
92
+ }
93
+
94
+ function xLabels(f, labels, step) {
95
+ const every = Math.max(1, Math.ceil(labels.length / (f.plotW / 44)));
96
+ labels.forEach((label, index) => {
97
+ if (index % every) return;
98
+ const text = svg("text", { x: f.pad.left + step * index + (step / 2) * (f.bandCenter ? 1 : 0), y: f.height - 8, "text-anchor": "middle" });
99
+ text.textContent = label;
100
+ f.axis.append(text);
101
+ });
102
+ }
103
+
104
+ function marker(f, opts, x) {
105
+ if (!opts.marker) return;
106
+ f.root.append(svg("line", { class: "ui-marker", x1: x, x2: x, y1: f.pad.top - 4, y2: f.pad.top + f.plotH }));
107
+ const text = svg("text", { class: "ui-marker-label", x: x + 4, y: f.pad.top + 6 });
108
+ text.textContent = opts.marker.label;
109
+ f.root.append(text);
110
+ }
111
+
112
+ const drawn = new Map();
113
+ let resizeTimer = 0;
114
+ addEventListener("resize", () => {
115
+ clearTimeout(resizeTimer);
116
+ resizeTimer = setTimeout(() => { for (const [el, draw] of drawn) draw(); }, 150);
117
+ });
118
+ const remember = (el, draw) => { drawn.set(el, draw); draw(); };
119
+
120
+ function bars(el, opts) { remember(el, () => drawBars(el, opts)); }
121
+ function lines(el, opts) { remember(el, () => drawLines(el, opts)); }
122
+
123
+ function drawBars(el, opts) {
124
+ const stacked = Boolean(opts.stacked);
125
+ const totals = opts.labels.map((_, i) => opts.series.reduce((sum, s) => sum + (stacked ? s.values[i] : 0), 0));
126
+ const max = stacked ? Math.max(...totals) : Math.max(...opts.series.flatMap((s) => s.values));
127
+ const f = frame(el, { ...opts, integer: opts.series.every((s) => s.values.every(Number.isInteger)) }, max);
128
+ f.bandCenter = true;
129
+ const step = f.plotW / opts.labels.length;
130
+ const groupW = step * 0.64;
131
+ const barW = stacked ? groupW : groupW / opts.series.length;
132
+ opts.labels.forEach((label, i) => {
133
+ let base = 0;
134
+ opts.series.forEach((series, s) => {
135
+ const value = series.values[i];
136
+ const h = (value / f.top) * f.plotH;
137
+ const x = f.pad.left + step * i + (step - groupW) / 2 + (stacked ? 0 : barW * s);
138
+ const y = f.pad.top + f.plotH - h - (stacked ? (base / f.top) * f.plotH : 0);
139
+ const rect = svg("rect", { x, y, width: Math.max(1, barW - (stacked ? 0 : 2)), height: Math.max(0, h), rx: 2, style: `fill: ${roleColor(series.role, s)}` });
140
+ const title = svg("title");
141
+ title.textContent = `${label}: ${series.name} ${fmt(value, opts.unit)}`;
142
+ rect.append(title);
143
+ f.root.append(rect);
144
+ base += stacked ? value : 0;
145
+ });
146
+ });
147
+ xLabels(f, opts.labels, step);
148
+ if (opts.marker) marker(f, opts, f.pad.left + step * opts.marker.index + step / 2);
149
+ el.append(f.root);
150
+ legendAndTable(el, opts);
151
+ }
152
+
153
+ function drawLines(el, opts) {
154
+ const max = Math.max(...opts.series.flatMap((s) => s.values));
155
+ const f = frame(el, { ...opts, integer: opts.series.every((s) => s.values.every(Number.isInteger)) }, max);
156
+ const step = f.plotW / Math.max(1, opts.labels.length - 1);
157
+ opts.series.forEach((series, s) => {
158
+ const points = series.values.map((value, i) => `${f.pad.left + step * i},${f.pad.top + f.plotH - (value / f.top) * f.plotH}`);
159
+ f.root.append(svg("polyline", { points: points.join(" "), style: `fill: none; stroke: ${roleColor(series.role, s)}`, "stroke-width": 2, "stroke-linejoin": "round", "stroke-linecap": "round" }));
160
+ });
161
+ f.bandCenter = false;
162
+ xLabels(f, opts.labels, step);
163
+ if (opts.marker) marker(f, opts, f.pad.left + step * opts.marker.index);
164
+ el.append(f.root);
165
+ legendAndTable(el, opts);
166
+ }
167
+
168
+ function sortable(table) {
169
+ const tbody = table.tBodies[0];
170
+ table.querySelectorAll("thead th .ui-sort").forEach((button) => {
171
+ button.type = "button";
172
+ button.addEventListener("click", () => {
173
+ const th = button.closest("th");
174
+ const index = [...th.parentElement.children].indexOf(th);
175
+ const next = th.getAttribute("aria-sort") === "ascending" ? "descending" : "ascending";
176
+ table.querySelectorAll("thead th[aria-sort]").forEach((cell) => cell.removeAttribute("aria-sort"));
177
+ th.setAttribute("aria-sort", next);
178
+ const key = (row) => {
179
+ const cell = row.children[index];
180
+ const raw = cell?.dataset.value ?? cell?.textContent.trim() ?? "";
181
+ const number = Number(raw);
182
+ return raw !== "" && !Number.isNaN(number) ? number : raw.toLocaleLowerCase();
183
+ };
184
+ const rows = [...tbody.rows].sort((a, b) => {
185
+ const x = key(a);
186
+ const y = key(b);
187
+ const order = typeof x === "number" && typeof y === "number" ? x - y : String(x).localeCompare(String(y));
188
+ return next === "ascending" ? order : -order;
189
+ });
190
+ tbody.append(...rows);
191
+ table.dispatchEvent(new CustomEvent("ui:sorted", { detail: { index, order: next } }));
192
+ });
193
+ });
194
+ }
195
+
196
+ function tabs(list) {
197
+ const items = [...list.querySelectorAll('[role="tab"]')];
198
+ const select = (tab) => {
199
+ for (const item of items) {
200
+ const on = item === tab;
201
+ item.setAttribute("aria-selected", String(on));
202
+ item.tabIndex = on ? 0 : -1;
203
+ const panel = document.getElementById(item.getAttribute("aria-controls"));
204
+ if (panel) panel.hidden = !on;
205
+ }
206
+ };
207
+ items.forEach((tab, index) => {
208
+ tab.addEventListener("click", () => select(tab));
209
+ tab.addEventListener("keydown", (event) => {
210
+ const move = { ArrowRight: 1, ArrowLeft: -1, Home: -index, End: items.length - 1 - index }[event.key];
211
+ if (move === undefined) return;
212
+ event.preventDefault();
213
+ const next = items[(index + move + items.length) % items.length];
214
+ next.focus();
215
+ select(next);
216
+ });
217
+ });
218
+ select(items.find((tab) => tab.getAttribute("aria-selected") === "true") ?? items[0]);
219
+ }
220
+
221
+ document.addEventListener("DOMContentLoaded", () => {
222
+ document.querySelectorAll("table[data-ui-sortable]").forEach(sortable);
223
+ document.querySelectorAll("[data-ui-tabs]").forEach(tabs);
224
+ });
225
+ window.UI = { bars, lines, sortable, tabs };
226
+ })();
@@ -0,0 +1,234 @@
1
+ # House styles, the kit and the design lock
2
+
3
+ Read this before writing markup for a new page or screen. It replaces the decisions a run used to
4
+ make from scratch every time (typeface, palette, scale, radii, component anatomy, page skeleton)
5
+ with a small closed set that a script writes into the project and the interface probe checks on the
6
+ render. The point is that two runs of the same brief land in the same register at the same level of
7
+ craft; what still varies is the content, the composition inside the skeleton and the accent art. One
8
+ place on every page is allowed to be bold: its signature moment (section 6), declared in the lock and
9
+ checked like the rest.
10
+
11
+ ## 1. Lock the look first
12
+
13
+ ```bash
14
+ FRONTEND_UIUX_SKILL_ROOT="<directory containing the selected installed SKILL.md>"
15
+ node "$FRONTEND_UIUX_SKILL_ROOT/scripts/design-lock.mjs" list
16
+ node "$FRONTEND_UIUX_SKILL_ROOT/scripts/design-lock.mjs" match "<the request>"
17
+ node "$FRONTEND_UIUX_SKILL_ROOT/scripts/design-lock.mjs" init --family <family> [--style <id>] [--brief "<the request>"] [--density calm] --dir <project> --scaffold \
18
+ --moment <kind> --moment-note "<what it shows>" [--moment-place "<where it sits>"]
19
+ node "$FRONTEND_UIUX_SKILL_ROOT/scripts/design-lock.mjs" moment --dir <project> --kind <kind> --note "<what it shows>"
20
+ ```
21
+
22
+ `init` writes into the project:
23
+
24
+ | File | What it is |
25
+ |---|---|
26
+ | `design.lock.json` | The declaration the probe reads: style id, family, density, fonts, type scale, display range and moment ceiling, radii, spacing, light and dark palette, elevation, and the signature moment (scale, kind, note, place) |
27
+ | `ui/tokens.css` | Generated custom properties (`--c-*`, `--fs-*`, `--fw-*`, `--sp-*`, `--radius-*`, `--shadow-*`, `--dur-*`) with dark mode and the `@font-face` rules |
28
+ | `ui/components.css` | The shared `ui-*` component sheet; it reads only tokens |
29
+ | `ui/ui.js` | Charts with a table fallback, sortable tables, keyboard tabs |
30
+ | `ui/fonts/` | Pretendard (Latin and Hangul) and JetBrains Mono with their OFL texts, copied from this plugin after a sha256 check; nothing is fetched |
31
+ | `index.html` | Only with `--scaffold` and no existing page: the starter for the family |
32
+
33
+ **Density.** Every lock records `density: rich` unless the request asks for a calm page. Rich is
34
+ the default because the user wants pages that feel made, not emptied: a tighter section rhythm
35
+ (48, 72 and 96 px), the style's texture (field-notes notebook dots), a second accent family
36
+ (`--c-accent-2`, `-ink`, `-wash`, `on-accent-2`), colour bands (`ui-band`, `ui-band--accent-2`,
37
+ `ui-band--support`), a two-accent wash (`ui-wash`) and an atmosphere glow (`ui-glow`, a soft
38
+ glow token that is `none` on flat and offset locks). `density: calm` is opt-in: `--density calm`,
39
+ or a brief that says minimal, calm, quiet, restrained, understated, 미니멀, 차분, 절제, 담백 or 간결
40
+ (`match` prints the density it reads). Calm restores the broad 64, 96 and 128 px sections, a flat
41
+ canvas, no glow, and holds the probe to one accent hue (CF-205). Contrast, focus, overflow,
42
+ reduced motion and every other floor are the same in both.
43
+
44
+ Choose in this order and stop at the first rule that decides:
45
+
46
+ 1. **Existing product or brand tokens** (brownfield, a design system in the repo, colours or type the
47
+ user named): do not lock a kit style over them. Either write a style file in the same schema as
48
+ `kit/styles/*.json` with the brand's values and lock it with `--from <file>` (a new id), or skip
49
+ the lock and say the DS rules did not run.
50
+ 2. **The brief names a register.** A style keyword in the request picks it: pass the request as
51
+ `--brief` (or run `match`) and `init` locks the style whose keyword it contains, the longest
52
+ keyword winning, so "neo-brutalism" never lands on `computational-brutalism`. Brutalist,
53
+ brutalism, retro-futurist, CRT, 브루탈리즘 and 레트로퓨처 pick `computational-brutalism`;
54
+ neo-brutalism, neubrutalism and 네오브루탈리즘 pick `neo-brutalism`; `list` prints every
55
+ keyword. A register named in other words matches a style's `use_when` line: lock that style.
56
+ 3. **Competing directions left open** by the brief: ask, as `references/production-interview.md`
57
+ says, before locking.
58
+ 4. **No visual direction at all:** the family decides, and `init` without `--style` applies it.
59
+ A `landing` page (read once: landing, docs, report) locks `field-notes`, the authored default
60
+ profile (`references/default-editorial-pixel.json`) made complete: same palette, spacing, type
61
+ ranges and pixel-art rule, plus the fonts, radii, elevation and component anatomy the profile
62
+ left open. A `workspace` or `settings` screen (dashboards, settings, forms, admin and data-dense
63
+ screens) locks `graphite`. `meadow` is never a default; it needs a brief that asks for its
64
+ register. The same holds for `computational-brutalism` and `neo-brutalism`: opt-in only.
65
+
66
+ | Style | Register | Accent art |
67
+ |---|---|---|
68
+ | `field-notes` | Default for `landing`. Warm paper with notebook dots, deep ink, a terracotta accent with a deep-teal second accent, mist as the tint, thin rules instead of shadows, large editorial title, small lowercase mono labels | An original pixel motif on read-once pages (section 5) |
69
+ | `graphite` | Default for `workspace` and `settings`. Cool greys, white surfaces, a blue accent with a rose second accent, 6–8 px radii, soft two-layer elevation | None |
70
+ | `meadow` | Opt-in only. Near-white, deep teal accent, coral second accent, sand tint, 12–18 px radii, soft elevation | None |
71
+ | `computational-brutalism` | Opt-in only. Retro-futurist instrument with its structure on show: drafting-film grey on a 32 px plotting grid with a stronger line every 160 px, monospaced text and mono headings and figures at real size, square corners, 3 px section rules carrying `data-coord` labels, 2 px compartments with inverse ink header bars, uppercase mono meta, heavy uppercase display, a hazard-orange signal with a plotter-blue second accent; dark mode is a phosphor CRT with an amber signal. Flat elevation | Instrument parts (section 5) |
72
+ | `neo-brutalism` | Opt-in only. Lavender canvas, white surfaces, 3 px ink outlines on surfaces and 2 px on controls, zero-blur ink offset shadows (6 px surfaces, 3 px controls), solid sunflower-yellow panel heads and accent with ink text, an electric-blue second accent, pink support block, chunky 900-weight display and 800-weight headings, buttons that press into their shadow. Offset elevation | Stickers and colour blocks (section 5) |
73
+
74
+ Each style file also carries `signature` (what must show for the register to read) and `forbid`
75
+ (what breaks it); `design-lock.mjs list` prints both. The two brutalist registers differ on
76
+ purpose: computational brutalism is flat, square and monospaced, neo-brutalism is outlined, offset
77
+ and loud. Never mix their signatures on one page.
78
+
79
+ Families decide the skeleton, not the look:
80
+
81
+ | Family | Use for | Starter |
82
+ |---|---|---|
83
+ | `landing` | Pages read once: landing, product, launch, portfolio, docs home | Site bar, split hero, steps, feature split with a real kit view, quote, three plans, FAQ, footer |
84
+ | `workspace` | Screens worked in: dashboards, consoles, admin, tables | App shell (side nav, top bar), headline figures, 8 + 4 panel row, full-width table with filter and search |
85
+ | `settings` | Guided forms: settings, account, onboarding, checkout | Section index plus one column capped near 720 px, labelled fields with hints and errors, save bar with status, danger zone with a typed confirmation dialog |
86
+
87
+ A starter is a skeleton: keep its order unless the brief says otherwise, delete what the brief does
88
+ not ask for, add sections by reusing its parts. Replace every `{{slot}}`; the probe fails a page
89
+ that still shows one (DS-006). Mixed products use one style and the family of each screen.
90
+
91
+ ## 2. Build only with the kit
92
+
93
+ - Link `ui/tokens.css` first, then `ui/components.css`, then page rules. Load `ui/ui.js` with
94
+ `defer` when a chart, sortable table or tab set is on the page.
95
+ - Page rules may set layout (grid areas, widths, order, `gap`) and may only use `var(--…)` for
96
+ colour, type size, weight, radius, shadow, spacing and duration. A literal colour, font family or
97
+ off-scale size is drift; the probe reports it (DS-002 to DS-005).
98
+ - Something the kit lacks is built from tokens in a page rule, in the kit's idiom. It is not a reason
99
+ to import a framework, a second icon set or another font.
100
+ - Copy is still the work: product names, numbers and sentences specific to the brief. Mark invented
101
+ figures as examples where a reader could take them as real.
102
+
103
+ ### Class catalogue
104
+
105
+ | Area | Classes |
106
+ |---|---|
107
+ | Type | `ui-display` (the one display title), `ui-h1` `ui-h2` `ui-h3` `ui-h4`, `ui-lead`, `ui-body`, `ui-muted`, `ui-small`, `ui-meta`, `ui-label` (mono, lowercase, short), `ui-num` (tabular), `ui-code` |
108
+ | Layout | `ui-container` (`--narrow`, `--wide`), `ui-section` (`--sunken`), `ui-band` (`--accent-2`, `--support`: a full-bleed colour band whose text takes the band's ink), `ui-section-head`, `ui-stack` (`--tight`, `--loose`), `ui-cluster`, `ui-split` (`--even`, `--top`), `ui-grid` with `--cols` |
109
+ | Actions | `ui-btn` with `--primary`, `--ink`, `--quiet`, `--danger`, `--sm`; one primary per view |
110
+ | Forms | `ui-field` with `__label`, `__hint`, `__error`; `ui-input`, `ui-select`, `ui-textarea`; `ui-input-group` with `__addon`; `ui-check`; `ui-switch` (a checkbox with `role="switch"`); `ui-segmented` (buttons with `aria-pressed`); `ui-form-actions` |
111
+ | Surfaces | `ui-panel` (`--flush`, `--accent-2`) with `__head` and `__title`; `ui-wash` (the two-accent wash); `ui-glow` (the lock's glow, for one surface such as the moment; on `ui-hero__art` it lands on the moment itself); `ui-rule`; `ui-callout` (`--info`, `--positive`, `--warning`, `--negative`) |
112
+ | Status | `ui-status` (`--positive`, `--warning`, `--negative`, `--info`) always with words; `ui-tag` with the same variants, `--accent` and `--accent-2` |
113
+ | Figures | `ui-stat-row` of `ui-stat` with `__label`, `__value` (a `div`), `__note`; `ui-meter` with an inner `span` width |
114
+ | Tables | `ui-table-wrap` around every `ui-table` (`--compact`, `--stack` for phones with `data-label` on each cell); numeric cells `is-num`; sortable headers `<th><button class="ui-sort">` inside `table[data-ui-sortable]` |
115
+ | Lists | `ui-list`, `ui-steps` (an `ol` of real steps), `ui-checklist` |
116
+ | Disclosure | `details.ui-disclosure`, `ui-tabs` with `role="tablist"` and `data-ui-tabs`, `dialog.ui-dialog` with `__body` and `__actions`, `ui-toast-region` and `ui-toast` |
117
+ | Site | `ui-skip`, `ui-sitebar` with `__inner`, `ui-brand`, `ui-sitenav`, `details.ui-menu` with `__panel`, `ui-hero` (`--stage`: the art takes the larger column and the height) with `__copy` and `__art`, `ui-quote`, `ui-plans` of `ui-plan` (`--featured`) with `__price`, `ui-cta-band`, `ui-footer`, `ui-pixel` |
118
+ | App | `ui-app` with `__nav` and `__main`, `ui-navgroup` with `__label`, `ui-navlist` with `aria-current`, `ui-topbar`, `ui-page` with `__head` and `__title`, `ui-workgrid` with `ui-span-12/8/7/6/5/4/3`, `ui-scroll`, `ui-toolbar`, `ui-search`, `ui-empty` |
119
+ | Settings | `ui-settings` with `__nav` and `__body`, `ui-setting-section` (`--danger`) with `__head`, `ui-savebar` |
120
+ | Moment | `ui-setpiece` (display type at the lock's moment size), `ui-bignum` (one figure at moment size, heading font, tabular); both only inside `[data-ui-moment]` (section 6) |
121
+ | Signature | `ui-coord` (bracketed mono coordinate or measurement label), `ui-prompt` (a `>` prefix; `--cursor` adds a static block cursor), `data-coord="…"` on a `ui-section` or `ui-hero` (a label on the section rule where the lock shows section marks), `ui-ruler` (tick bar), `ui-frame` (a ruled box with registration crosses), `ui-scan` (static scanlines), `ui-readout` (mono value well), `ui-panel--accent` and `ui-panel--support` (colour blocks), `ui-sticker` (tilted tag) |
122
+ | Charts | `UI.bars(el, { labels, series: [{ name, values, role: "chart-1" }], marker: { index, label }, caption, indexLabel, unit, stacked })` and `UI.lines(…)`; roles are `chart-1` to `chart-5`; each chart gets a legend when it has two series and a "Show as table" fallback |
123
+
124
+ ## 3. What the probe checks against the lock
125
+
126
+ The interface probe finds `design.lock.json` beside the page it serves (or takes `--lock <path>`)
127
+ and runs these rules at every matrix row. Without a lock they are listed under Not verified.
128
+
129
+ | Id | Rule | Severity |
130
+ |---|---|---|
131
+ | DS-001 | `ui/tokens.css` is not applied: `--ui-lock` on `:root` is missing or names another style | HIGH |
132
+ | DS-002 | Visible text set in a family the lock does not name | HIGH |
133
+ | DS-003 | Text, background, border or SVG colour more than 8 per channel from every palette role (light and dark); four or more distinct colours is HIGH, fewer is MEDIUM | HIGH / MEDIUM |
134
+ | DS-004 | Font size neither on the scale (±0.5 px) nor inside the display range | MEDIUM |
135
+ | DS-005 | Corner radius not in the lock and not fully round | LOW |
136
+ | DS-006 | A `{{slot}}` from a starter left in text, a title or a labelling attribute (the static fallback reads `.html` files only, since framework templates use braces) | HIGH |
137
+ | DS-007 | A shadow outside the lock's elevation grammar: a `flat` lock (computational-brutalism) takes only rings, no blur and no offset past a hairline; an `offset` lock (neo-brutalism) takes zero-blur offsets but no blur. Inset shadows never count; `soft` locks leave offsets to CF-403 | MEDIUM |
138
+ | DS-008 | The signature moment: the lock declares none (a lock written before signature moments counts; add one with `design-lock.mjs moment`); no visible `[data-ui-moment]`; the marked kind differs from the lock; it is smaller than 40 000 px² (bold) or 4 800 px² (small); a read-once page's moment starts below the first screen at 1024 px and wider (more than 120 px short of the fold) or past 1.5 screens on narrower viewports; it lacks what its kind needs (section 6); or it is a generic gradient-and-centred-text hero. Two marked moments, and a work-surface moment over half the screen at 1024 px and wider, are MEDIUM. Fold and size-share checks run on the base rows | HIGH |
139
+
140
+ A lock with `offset` elevation is also the recorded neo-brutalist register CF-403 asks for, so the
141
+ probe clears CF-403 on a neo-brutalism page; on any other lock a hard offset shadow is still CF-403.
142
+
143
+ Media, `img`, `video`, `canvas`, `iframe` and anything inside `[data-lock-exempt]` are skipped. Use
144
+ the exemption only for third-party embeds and real brand marks, and say so in the reply.
145
+
146
+ Thresholds live in `scripts/interface-probe-rules.mjs` like every other rule. Never widen a
147
+ tolerance or add an exemption to make a page pass; change the page.
148
+
149
+ ## 4. Look, then fix
150
+
151
+ After the rule table, a rendered probe run prints the paths of the 1440, 390 and 320 screenshots
152
+ and six fixed questions (LOOK-1 to LOOK-6: one focal point, shared edges, grouping by space, kit not
153
+ costume, composed mobile, specific content). Open the screenshots, answer each question in one line,
154
+ fix the two worst answers, and run the probe again. Stop after two look rounds; keep the better
155
+ version if a round made it worse. The questions are concrete on purpose: a reviewer, human or
156
+ model, agrees with itself on "do the sections share a left edge" far more often than on "is it
157
+ beautiful".
158
+
159
+ ## 5. Accent art by style
160
+
161
+ The landing starter's art slot takes the locked style's art; work surfaces keep at most a small mark.
162
+
163
+ | Style | Accent art |
164
+ |---|---|
165
+ | `field-notes` | The pixel motif below |
166
+ | `graphite`, `meadow` | A real product view set on a `ui-wash` or between `ui-band` sections, with the second accent on the featured panel |
167
+ | `computational-brutalism` | Instrument parts on real content: a `ui-frame` around the product view or a key figure, `ui-coord` labels that name real positions, sizes or revisions, one `ui-ruler`, `data-coord` on each section (sheet, grid reference or revision, not 01/02/03), a `ui-prompt--cursor` line, and `ui-readout ui-scan` wells on the readouts that carry real values. No made-up telemetry: every number labels something on the page |
168
+ | `neo-brutalism` | `ui-sticker` labels with real facts (price, launch date, a count), never over body text, and colour blocks in all three fills (`ui-panel--accent`, `ui-panel--accent-2`, `ui-panel--support`) |
169
+
170
+ ### Pixel motif (field-notes)
171
+
172
+ On read-once pages the field-notes hero carries an original pixel motif of the product's subject.
173
+ Draw it as a character grid and convert it, rather than hand-placing rectangles:
174
+
175
+ ```bash
176
+ node "$FRONTEND_UIUX_SKILL_ROOT/scripts/pixel-art.mjs" motif.txt --label "<what it shows>" --cell 12
177
+ ```
178
+
179
+ Characters map to palette roles (`i` ink, `a` accent, `b` second accent, `m` support, `s` sunken, `p` surface,
180
+ `c` canvas, `l` line-strong, `2` ink-2, `.` empty), so the motif follows dark mode and stays inside
181
+ the lock. Keep it recognisable: a scene of the product's subject, 20 to 64 cells wide, hard edges, as
182
+ many roles as the subject needs, the accent on the one detail that matters. Cells render at 6 px or more. On a
183
+ work surface the motif is at most a small mark beside the product name.
184
+
185
+ ## 6. Signature moment
186
+
187
+ The lock makes runs agree on the look. The signature moment is the one place a page is allowed to be
188
+ bold, so a locked page still has something that makes a person stop. Choose it from the content before
189
+ writing markup, record it in the lock, mark it in the page, and let the probe check it (DS-008).
190
+
191
+ 1. Record it: `init … --moment <kind> --moment-note "<what it shows>" [--moment-place "<where>"]`, or
192
+ later `design-lock.mjs moment --dir <project> --kind <kind> --note "<what it shows>"`. Until a kind
193
+ is recorded the probe fails every render.
194
+ 2. Mark the one element that carries it: `data-ui-moment="<kind>"`.
195
+ 3. Build it from this page's content, inside the lock: palette roles, the kit's type, radii and
196
+ elevation. The moment may use `--fs-moment` (`ui-setpiece`, `ui-bignum`) up to the lock's moment
197
+ ceiling; DS-004 accepts that size only inside `[data-ui-moment]`.
198
+
199
+ | Family | Scale | Kinds | Where |
200
+ |---|---|---|---|
201
+ | `landing` (landing, product, launch, portfolio, docs home, report) | bold | `hero-composition`, `type-set-piece`, `data-moment`, `diagram`, `motion-detail`, `interactive-object` | Starts in the first screen at 1024 px and wider, within 1.5 screens on phones |
202
+ | `workspace`, `settings` | small | `chart`, `empty-state`, `header-detail` | Anywhere; under half the screen at desktop widths. The data stays the focus |
203
+
204
+ | Kind | What it is | DS-008 needs inside it |
205
+ |---|---|---|
206
+ | `hero-composition` | The hero arranged around the product's one concrete object: the invoice, the truck, the score, drawn or built from kit parts at a size that dominates the first screen (`ui-hero--stage`) | An image, drawing, figure, frame or product view |
207
+ | `type-set-piece` | The pitch set as type: a short line at moment size with the accent on the one word that matters, aligned to the grid, never centred over a gradient | Text at display size or above |
208
+ | `data-moment` | One real number or small dataset made big: a `ui-bignum` with its unit and source, a chart that answers the page's question | A chart, table, figure or readout |
209
+ | `diagram` | The product's process or structure drawn once, clearly: inputs, the step the product does, the result | An image, drawing or figure |
210
+ | `motion-detail` | One movement that explains something (a figure counting up to its real value, a step sequence), short, in the style's durations, stopped under reduced motion (RS-003) | An animation or transition (not checked on the reduced-motion row) |
211
+ | `interactive-object` | Something to try on the page: a fee calculator, a toggle between before and after, a slider on a real variable | A control a reader can operate |
212
+ | `chart` | The work surface's main chart, with one annotated marker that names the event a person acts on | A chart, table or readout |
213
+ | `empty-state` | The empty state drawn with care: a small mark from the style, one sentence, the next action | Nothing beyond presence |
214
+ | `header-detail` | The page header's one detail: the product mark, a live status, the plan or period, set with care | Nothing beyond presence |
215
+
216
+ Choose the kind from the content in this order: the one object or number the reader cares about
217
+ (`data-moment`, `hero-composition`); a process they must grasp (`diagram`); words that carry the
218
+ pitch (`type-set-piece`); something worth trying (`interactive-object`); `motion-detail` only when
219
+ movement is the point. State the choice and the note in the reply.
220
+
221
+ Moments by style:
222
+
223
+ | Style | A moment that belongs to it |
224
+ |---|---|
225
+ | `field-notes` | A pixel scene of the product's subject filling the art column (`ui-hero--stage`, cells of 10 to 16 px, the accent on the one detail that matters), or a `ui-setpiece` line in the editorial display with a small pixel mark |
226
+ | `graphite`, `meadow` | On a landing page, the real product view at full size with one live state shown (`ui-panel` parts, `UI.bars`); on a work surface, the main chart with its annotated marker |
227
+ | `computational-brutalism` | An instrument plate on the plot grid: a `ui-frame` holding a `ui-bignum` readout in mono at moment size, a `ui-ruler` and `ui-coord` labels that measure real values, one `ui-scan`; or a heavy uppercase `ui-setpiece` that spans the grid columns |
228
+ | `neo-brutalism` | A stacked block composition: the product object in a `ui-panel--accent` with its offset shadow, more blocks in `ui-panel--accent-2` and `ui-panel--support`, `ui-sticker` labels with real facts, chunky `ui-setpiece` type |
229
+
230
+ Never, in a moment or anywhere: a centred headline over a gradient (DS-008 reports it as a generic
231
+ hero), scattered floating blobs, glass, a stock 3D object, a fake dashboard with invented numbers, or
232
+ a second moment competing with the first. Everything outside the moment stays inside the kit and, in
233
+ the default rich register, may be layered: bands, a wash, the style's texture, the second accent and
234
+ an atmosphere glow.