@litfamily/litgrok 1.0.26 → 1.0.28

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 (235) hide show
  1. package/.grok/hooks/lit-mark.mjs +42 -0
  2. package/.grok/hooks/lit-status-line.mjs +174 -21
  3. package/.grok/hooks/plan-gate.mjs +13 -3
  4. package/.grok/hooks/record-passive-event.mjs +40 -6
  5. package/.grok/hooks/session-end.json +15 -0
  6. package/.grok/hooks/session-end.mjs +6 -0
  7. package/.grok/hooks/session-liveness.mjs +102 -0
  8. package/.grok/hooks/session-rows.mjs +57 -0
  9. package/.grok/hooks/session-start.mjs +17 -0
  10. package/.grok/hooks/workflow-stage.mjs +5 -2
  11. package/.grok/rules/00-litgrok.md +14 -0
  12. package/.grok/skills/frontend-ui-ux/ATTRIBUTION.md +23 -0
  13. package/.grok/skills/frontend-ui-ux/SKILL.md +4 -1
  14. package/.grok/skills/frontend-ui-ux/examples/phase-3-readme-ab/README.md +9 -0
  15. package/.grok/skills/frontend-ui-ux/kit/components.css +414 -0
  16. package/.grok/skills/frontend-ui-ux/kit/fonts.json +22 -0
  17. package/.grok/skills/frontend-ui-ux/kit/layouts/landing.html +164 -0
  18. package/.grok/skills/frontend-ui-ux/kit/layouts/settings.html +114 -0
  19. package/.grok/skills/frontend-ui-ux/kit/layouts/workspace.html +115 -0
  20. package/.grok/skills/frontend-ui-ux/kit/styles/computational-brutalism.json +227 -0
  21. package/.grok/skills/frontend-ui-ux/kit/styles/field-notes.json +205 -0
  22. package/.grok/skills/frontend-ui-ux/kit/styles/graphite.json +200 -0
  23. package/.grok/skills/frontend-ui-ux/kit/styles/meadow.json +199 -0
  24. package/.grok/skills/frontend-ui-ux/kit/styles/neo-brutalism.json +222 -0
  25. package/.grok/skills/frontend-ui-ux/kit/ui.js +226 -0
  26. package/.grok/skills/frontend-ui-ux/references/adaptive-layout.md +10 -4
  27. package/.grok/skills/frontend-ui-ux/references/brand-and-imagery.md +11 -7
  28. package/.grok/skills/frontend-ui-ux/references/complete-contract.md +21 -0
  29. package/.grok/skills/frontend-ui-ux/references/composition.md +10 -6
  30. package/.grok/skills/frontend-ui-ux/references/craft-floor.md +256 -93
  31. package/.grok/skills/frontend-ui-ux/references/creative-directions.md +9 -6
  32. package/.grok/skills/frontend-ui-ux/references/default-editorial-pixel.json +28 -0
  33. package/.grok/skills/frontend-ui-ux/references/house-styles.md +234 -0
  34. package/.grok/skills/frontend-ui-ux/references/implementation-platforms.md +10 -6
  35. package/.grok/skills/frontend-ui-ux/references/inclusive-interface.md +11 -5
  36. package/.grok/skills/frontend-ui-ux/references/interaction-motion.md +34 -78
  37. package/.grok/skills/frontend-ui-ux/references/motion-guide.md +10 -7
  38. package/.grok/skills/frontend-ui-ux/references/performance-delivery.md +11 -8
  39. package/.grok/skills/frontend-ui-ux/references/probe-loop.md +1 -1
  40. package/.grok/skills/frontend-ui-ux/references/product-direction.md +9 -4
  41. package/.grok/skills/frontend-ui-ux/references/production-interview.md +17 -0
  42. package/.grok/skills/frontend-ui-ux/references/redesign-playbook.md +10 -6
  43. package/.grok/skills/frontend-ui-ux/references/slop-register.md +148 -73
  44. package/.grok/skills/frontend-ui-ux/references/system-foundations.md +10 -4
  45. package/.grok/skills/frontend-ui-ux/references/visual-language.md +10 -4
  46. package/.grok/skills/frontend-ui-ux/references/visual-reconstruction.md +39 -72
  47. package/.grok/skills/frontend-ui-ux/scripts/design-lock.mjs +400 -0
  48. package/.grok/skills/frontend-ui-ux/scripts/interface-probe-driver.mjs +33 -0
  49. package/.grok/skills/frontend-ui-ux/scripts/interface-probe-lock.mjs +196 -0
  50. package/.grok/skills/frontend-ui-ux/scripts/interface-probe-page.mjs +1555 -0
  51. package/.grok/skills/frontend-ui-ux/scripts/interface-probe-rules.mjs +153 -0
  52. package/.grok/skills/frontend-ui-ux/scripts/interface-probe-server.mjs +57 -0
  53. package/.grok/skills/frontend-ui-ux/scripts/interface-probe-static.mjs +139 -0
  54. package/.grok/skills/frontend-ui-ux/scripts/interface-probe.mjs +363 -0
  55. package/.grok/skills/frontend-ui-ux/scripts/pixel-art.mjs +60 -0
  56. package/.grok/skills/lit-adhd/SKILL.md +155 -0
  57. package/.grok/skills/lit-adhd/references/card-examples.md +131 -0
  58. package/.grok/skills/lit-adhd/references/status-taxonomy.md +50 -0
  59. package/.grok/skills/lit-adhd/scripts/lib/brief.mjs +421 -0
  60. package/.grok/skills/lit-adhd/scripts/lib/collect.mjs +395 -0
  61. package/.grok/skills/lit-adhd/scripts/lib/gauge.mjs +87 -0
  62. package/.grok/skills/lit-adhd/scripts/lib/next-step.mjs +22 -0
  63. package/.grok/skills/lit-adhd/scripts/lib/plan-task-rows.mjs +32 -0
  64. package/.grok/skills/lit-adhd/scripts/lib/project-state-root.mjs +55 -0
  65. package/.grok/skills/lit-adhd/scripts/lib/redact.mjs +64 -0
  66. package/.grok/skills/lit-adhd/scripts/lib/suggest.mjs +140 -0
  67. package/.grok/skills/lit-adhd/scripts/lib/transcripts.mjs +232 -0
  68. package/.grok/skills/lit-adhd/scripts/rewind.mjs +6 -0
  69. package/.grok/skills/lit-diagram-drawer/SKILL.md +17 -5
  70. package/.grok/skills/lit-diagram-drawer/references/output-spec.md +2 -2
  71. package/.grok/skills/lit-diagram-drawer/references/style-guide.md +20 -11
  72. package/.grok/skills/lit-diagram-drawer/references/type-architecture.md +3 -3
  73. package/.grok/skills/lit-diagram-drawer/references/type-dependency.md +1 -1
  74. package/.grok/skills/lit-diagram-drawer/references/type-tree.md +3 -3
  75. package/.grok/skills/lit-diagram-drawer/references/type-wardley.md +1 -1
  76. package/.grok/skills/lit-diagram-drawer/references/verifier-guide.md +4 -0
  77. package/.grok/skills/lit-diagram-drawer/scripts/visual-quality.mjs +2 -2
  78. package/.grok/skills/lit-handoff/SKILL.md +2 -0
  79. package/.grok/skills/lit-hijack/SKILL.md +459 -0
  80. package/.grok/skills/lit-hijack/references/capture-and-provenance.md +124 -0
  81. package/.grok/skills/lit-hijack/references/clean-room-build.md +130 -0
  82. package/.grok/skills/lit-hijack/references/distil-and-licence.md +128 -0
  83. package/.grok/skills/lit-hijack/references/gap-and-port-design.md +150 -0
  84. package/.grok/skills/lit-hijack/references/parity-and-report.md +130 -0
  85. package/.grok/skills/lit-hijack/scripts/hijack.mjs +890 -0
  86. package/.grok/skills/lit-hijack/scripts/lib/safe-fetch.mjs +213 -0
  87. package/.grok/skills/lit-plan/SKILL.md +3 -1
  88. package/.grok/skills/lit-plan/references/plan-schema.md +4 -0
  89. package/.grok/skills/lit-plan/scripts/scaffold-plan.mjs +9 -2
  90. package/.grok/skills/lit-plan/scripts/scope-roots.mjs +83 -0
  91. package/.grok/skills/lit-pptx/SKILL.md +10 -5
  92. package/.grok/skills/lit-pptx/examples/13-engineering-review-computational-brutalism-ko.md +173 -0
  93. package/.grok/skills/lit-pptx/examples/14-launch-pitch-neo-brutalism-ko.md +154 -0
  94. package/.grok/skills/lit-pptx/examples/15-design-lecture-bauhaus-ko.md +139 -0
  95. package/.grok/skills/lit-pptx/examples/16-community-programme-riso-ko.md +158 -0
  96. package/.grok/skills/lit-pptx/examples/17-public-data-briefing-newsroom-ko.md +179 -0
  97. package/.grok/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Bold.ttf +0 -0
  98. package/.grok/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf +0 -0
  99. package/.grok/skills/lit-pptx/fonts/jetbrains-mono/OFL.txt +93 -0
  100. package/.grok/skills/lit-pptx/fonts/jetbrains-mono/provenance.json +1 -0
  101. package/.grok/skills/lit-pptx/references/direction-step.md +34 -8
  102. package/.grok/skills/lit-pptx/references/tonalities/bauhaus.md +140 -0
  103. package/.grok/skills/lit-pptx/references/tonalities/computational-brutalism.md +150 -0
  104. package/.grok/skills/lit-pptx/references/tonalities/neo-brutalism.md +161 -0
  105. package/.grok/skills/lit-pptx/references/tonalities/newsroom.md +144 -0
  106. package/.grok/skills/lit-pptx/references/tonalities/riso.md +137 -0
  107. package/.grok/skills/lit-pptx/scripts/compile-deck.js +1 -1
  108. package/.grok/skills/lit-pptx/scripts/craft_extras.py +61 -3
  109. package/.grok/skills/lit-pptx/scripts/deck_output.py +76 -62
  110. package/.grok/skills/lit-pptx/scripts/embed_fonts.py +14 -1
  111. package/.grok/skills/lit-pptx/scripts/lib/grid-resolver.js +101 -110
  112. package/.grok/skills/lit-pptx/scripts/lib/layout-resolver.js +9 -15
  113. package/.grok/skills/lit-pptx/scripts/lib/render-pack.js +389 -582
  114. package/.grok/skills/lit-pptx/scripts/lib/slide-grid.js +104 -0
  115. package/.grok/skills/lit-pptx/scripts/lib/template-registry.js +60 -8
  116. package/.grok/skills/lit-pptx/scripts/qa_deck.py +4 -4
  117. package/.grok/skills/lit-pptx/templates/tonalities/atlas/pack.yaml +2 -0
  118. package/.grok/skills/lit-pptx/templates/tonalities/bauhaus/pack.yaml +98 -0
  119. package/.grok/skills/lit-pptx/templates/tonalities/chalk/pack.yaml +2 -0
  120. package/.grok/skills/lit-pptx/templates/tonalities/computational-brutalism/pack.yaml +99 -0
  121. package/.grok/skills/lit-pptx/templates/tonalities/gazette/pack.yaml +2 -0
  122. package/.grok/skills/lit-pptx/templates/tonalities/ledger/pack.yaml +2 -0
  123. package/.grok/skills/lit-pptx/templates/tonalities/neo-brutalism/pack.yaml +107 -0
  124. package/.grok/skills/lit-pptx/templates/tonalities/newsroom/pack.yaml +99 -0
  125. package/.grok/skills/lit-pptx/templates/tonalities/night/pack.yaml +2 -0
  126. package/.grok/skills/lit-pptx/templates/tonalities/paper/pack.yaml +2 -0
  127. package/.grok/skills/lit-pptx/templates/tonalities/riso/pack.yaml +99 -0
  128. package/.grok/skills/lit-pptx/templates/tonalities/signal/pack.yaml +3 -0
  129. package/.grok/skills/lit-pptx/templates/tonalities/studio/pack.yaml +2 -0
  130. package/.grok/skills/lit-recap/SKILL.md +1 -1
  131. package/.grok/skills/lit-schematic/SKILL.md +140 -0
  132. package/.grok/skills/lit-schematic/examples/iso-heat-exchanger/build.mjs +38 -0
  133. package/.grok/skills/lit-schematic/examples/iso-heat-exchanger/scene.mjs +133 -0
  134. package/.grok/skills/lit-schematic/examples/journal-adsorption-rig/build.mjs +87 -0
  135. package/.grok/skills/lit-schematic/examples/pid-dosing-skid/build.mjs +85 -0
  136. package/.grok/skills/lit-schematic/references/cutaway-outputs.md +70 -0
  137. package/.grok/skills/lit-schematic/references/isometric-craft.md +101 -0
  138. package/.grok/skills/lit-schematic/references/journal-figures.md +72 -0
  139. package/.grok/skills/lit-schematic/references/kit-api.md +134 -0
  140. package/.grok/skills/lit-schematic/references/pfd-and-layout.md +53 -0
  141. package/.grok/skills/lit-schematic/references/pid-drafting.md +103 -0
  142. package/.grok/skills/lit-schematic/references/pid-symbols.md +163 -0
  143. package/.grok/skills/lit-schematic/references/verification.md +100 -0
  144. package/.grok/skills/lit-schematic/scripts/doctor.mjs +57 -0
  145. package/.grok/skills/lit-schematic/scripts/lib/figure.mjs +81 -0
  146. package/.grok/skills/lit-schematic/scripts/lib/fonts.mjs +27 -0
  147. package/.grok/skills/lit-schematic/scripts/lib/geom.mjs +113 -0
  148. package/.grok/skills/lit-schematic/scripts/lib/interactive.mjs +292 -0
  149. package/.grok/skills/lit-schematic/scripts/lib/isa.mjs +115 -0
  150. package/.grok/skills/lit-schematic/scripts/lib/iso.mjs +719 -0
  151. package/.grok/skills/lit-schematic/scripts/lib/legend-sheet.mjs +162 -0
  152. package/.grok/skills/lit-schematic/scripts/lib/pid.mjs +937 -0
  153. package/.grok/skills/lit-schematic/scripts/lib/png.mjs +132 -0
  154. package/.grok/skills/lit-schematic/scripts/lib/qa-core.mjs +658 -0
  155. package/.grok/skills/lit-schematic/scripts/lib/route.mjs +218 -0
  156. package/.grok/skills/lit-schematic/scripts/lib/sheet.mjs +890 -0
  157. package/.grok/skills/lit-schematic/scripts/lib/svg.mjs +82 -0
  158. package/.grok/skills/lit-schematic/scripts/lib/theme.mjs +115 -0
  159. package/.grok/skills/lit-schematic/scripts/motion.mjs +129 -0
  160. package/.grok/skills/lit-schematic/scripts/qa.mjs +92 -0
  161. package/.grok/skills/lit-schematic/scripts/render.mjs +233 -0
  162. package/.grok/skills/lit-schematic/scripts/scaffold.mjs +60 -0
  163. package/.grok/skills/lit-scientific-visualization/SKILL.md +36 -12
  164. package/.grok/skills/lit-typographic-motion/SKILL.md +7 -4
  165. package/.grok/skills/lit-typographic-motion/THIRD_PARTY_NOTICES +11 -0
  166. package/.grok/skills/lit-typographic-motion/recipes/hero-3d/expected.json +62 -0
  167. package/.grok/skills/lit-typographic-motion/recipes/hero-3d/index.html +82 -0
  168. package/.grok/skills/lit-typographic-motion/references/choice-first.md +30 -0
  169. package/.grok/skills/lit-typographic-motion/references/cover.md +10 -1
  170. package/.grok/skills/lit-typographic-motion/references/depth.md +119 -0
  171. package/.grok/skills/lit-typographic-motion/references/treatment.md +9 -1
  172. package/.grok/skills/lit-typographic-motion/scripts/blender/runner.py +218 -0
  173. package/.grok/skills/lit-typographic-motion/scripts/lib/assets.mjs +230 -0
  174. package/.grok/skills/lit-typographic-motion/scripts/lib/blender.mjs +136 -0
  175. package/.grok/skills/lit-typographic-motion/scripts/lib/board.mjs +153 -0
  176. package/.grok/skills/lit-typographic-motion/scripts/lib/chrome.mjs +61 -32
  177. package/.grok/skills/lit-typographic-motion/scripts/lib/constants.mjs +4 -2
  178. package/.grok/skills/lit-typographic-motion/scripts/lib/cover-capture.mjs +20 -11
  179. package/.grok/skills/lit-typographic-motion/scripts/lib/cover-treatment.mjs +26 -2
  180. package/.grok/skills/lit-typographic-motion/scripts/lib/cover.mjs +12 -5
  181. package/.grok/skills/lit-typographic-motion/scripts/lib/frame-pool.mjs +78 -1
  182. package/.grok/skills/lit-typographic-motion/scripts/lib/gallery.mjs +160 -0
  183. package/.grok/skills/lit-typographic-motion/scripts/lib/house.mjs +43 -0
  184. package/.grok/skills/lit-typographic-motion/scripts/lib/look.mjs +39 -1
  185. package/.grok/skills/lit-typographic-motion/scripts/lib/scaffold.mjs +174 -0
  186. package/.grok/skills/lit-typographic-motion/scripts/lib/score.mjs +640 -0
  187. package/.grok/skills/lit-typographic-motion/scripts/lib/sound.mjs +143 -0
  188. package/.grok/skills/lit-typographic-motion/scripts/lib/soundtrack.mjs +12 -3
  189. package/.grok/skills/lit-typographic-motion/scripts/lib/stage-gate.mjs +44 -0
  190. package/.grok/skills/lit-typographic-motion/scripts/lib/stage-qa.mjs +132 -3
  191. package/.grok/skills/lit-typographic-motion/scripts/lib/stage-session.mjs +51 -3
  192. package/.grok/skills/lit-typographic-motion/scripts/lib/stage.mjs +74 -9
  193. package/.grok/skills/lit-typographic-motion/scripts/lib/styles.mjs +224 -0
  194. package/.grok/skills/lit-typographic-motion/scripts/lib/treatment.mjs +198 -4
  195. package/.grok/skills/lit-typographic-motion/scripts/lib/vendor/three/LICENSE +21 -0
  196. package/.grok/skills/lit-typographic-motion/scripts/lib/vendor/three/addons/environments/RoomEnvironment.js +144 -0
  197. package/.grok/skills/lit-typographic-motion/scripts/lib/vendor/three/addons/geometries/RoundedBoxGeometry.js +155 -0
  198. package/.grok/skills/lit-typographic-motion/scripts/lib/vendor/three/three.module.js +54571 -0
  199. package/.grok/skills/lit-typographic-motion/scripts/motion.mjs +56 -6
  200. package/.grok/skills/lit-typographic-motion/scripts/stage/cover-init.js +20 -8
  201. package/.grok/skills/lit-typographic-motion/scripts/stage/loop-kit.js +2 -2
  202. package/.grok/skills/lit-typographic-motion/scripts/stage/stage-kit.js +25 -0
  203. package/.grok/skills/lit-typographic-motion/styles/paper.json +1 -0
  204. package/.grok/skills/lit-typographic-motion/styles/swiss-signal.json +1 -0
  205. package/.grok/skills/lit-typographic-motion/styles/terminalcore.json +1 -0
  206. package/.grok/skills/lit-typographic-motion/styles/tidal.json +1 -0
  207. package/.grok/skills/litgrok/SKILL.md +1 -1
  208. package/.grok/skills/litresearch/SKILL.md +2 -0
  209. package/.grok/skills/readme-studio/SKILL.md +14 -12
  210. package/.grok/skills/readme-studio/references/choice-first.md +24 -0
  211. package/.grok/skills/start-work/SKILL.md +8 -1
  212. package/.grok-plugin/plugin.json +4 -1
  213. package/CHANGELOG.md +18 -0
  214. package/README.md +11 -11
  215. package/README_ko-KR.md +11 -11
  216. package/TRADEMARK.md +12 -0
  217. package/bin/litgrok.mjs +2 -0
  218. package/docs/assets/readme/badge-version.svg +1 -1
  219. package/docs/assets/showcase/brief.webp +0 -0
  220. package/docs/assets/showcase/deck.webp +0 -0
  221. package/docs/assets/showcase/page.webp +0 -0
  222. package/docs/assets/showcase/pid.webp +0 -0
  223. package/docs/assets/skills/lit-adhd.webp +0 -0
  224. package/docs/assets/skills/lit-hijack.webp +0 -0
  225. package/docs/assets/skills/lit-schematic.webp +0 -0
  226. package/docs/reference.md +11 -7
  227. package/docs/reference_ko-KR.md +11 -7
  228. package/hooks/hooks.json +11 -0
  229. package/package.json +6 -1
  230. package/plugin.json +1 -1
  231. package/.grok/skills/frontend-ui-ux/scripts/page-probe.mjs +0 -105
  232. package/.grok/skills/frontend-ui-ux/scripts/probe.mjs +0 -91
  233. package/.grok/skills/frontend-ui-ux/scripts/rule-data.mjs +0 -56
  234. package/.grok/skills/frontend-ui-ux/scripts/static-probe.mjs +0 -27
  235. package/.grok/skills/frontend-ui-ux/scripts/static-server.mjs +0 -19
@@ -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); `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.
@@ -3,8 +3,6 @@ the repository, then apply the universal rules plus that lane's rules.
3
3
 
4
4
  ## Universal rules
5
5
 
6
- These hold in every lane. A stack constraint never justifies dropping one.
7
-
8
6
  - the platform's native control before any custom composite
9
7
  - tokens for color, space, type, and radius; no raw values inside components
10
8
  - behavior separate from decoration; state lives outside the styling layer
@@ -12,8 +10,6 @@ These hold in every lane. A stack constraint never justifies dropping one.
12
10
 
13
11
  ## Rendering lanes
14
12
 
15
- Name the rendering boundary first; it decides where state and escaping live.
16
-
17
13
  ### Server-rendered
18
14
 
19
15
  - ship a complete document; first paint must not depend on JavaScript
@@ -32,8 +28,6 @@ Name the rendering boundary first; it decides where state and escaping live.
32
28
 
33
29
  ## Styling lanes
34
30
 
35
- Keep one token layer whichever styling system the repository uses.
36
-
37
31
  ### Utility CSS
38
32
 
39
33
  - utilities resolve to tokens; no raw hex or arbitrary pixels in class strings
@@ -97,3 +91,13 @@ Verify the lane from the repository, not from the prompt and not from memory.
97
91
  4. Run the repository's build and its package-native validation checks.
98
92
  5. For a Grok skill surface, verify the `.grok/skills/` path and run the package's documented
99
93
  integrity checks; do not infer a host route from an unrelated harness.
94
+
95
+ ## Failure patterns
96
+
97
+ Reject:
98
+
99
+ - a stack claim taken from the prompt with no manifest or lockfile check
100
+ - a client-rendered route with no pending or error branch
101
+ - utility classes carrying raw hex or arbitrary pixel values
102
+ - component-kit internals overridden by descendant selectors
103
+ - one platform verified, parity asserted for the rest
@@ -21,15 +21,11 @@ Measure contrast against the pixels actually painted behind the text, in every t
21
21
 
22
22
  ## Cognitive access
23
23
 
24
- Cut what the user must remember, infer, or type twice.
25
-
26
24
  - one primary action per view, everything else visibly subordinate
27
25
  - say what happened, what it means now, and what to do next, in that order
28
26
 
29
27
  ## Names, errors, and announcements
30
28
 
31
- Write names and messages that survive being heard alone, with no screen.
32
-
33
29
  - the accessible name contains the visible label; on conflict the visible label wins
34
30
  - an error names the field, the problem, and the correction
35
31
  - bind errors with `aria-describedby`; focus the first invalid control
@@ -46,7 +42,7 @@ Assume translation and mirroring from the first commit.
46
42
 
47
43
  ## CJK and IME checklist
48
44
 
49
- Latin-only testing hides these defects. Exercise Korean, Japanese, and Chinese copy.
45
+ Exercise Korean, Japanese, and Chinese copy.
50
46
 
51
47
  - Korean prose: `word-break: keep-all` with `overflow-wrap: anywhere` for long tokens
52
48
  - declare a per-script font stack; check for tofu, synthetic bold, shifted baselines
@@ -80,3 +76,13 @@ Triage by what the user can no longer do, then order the queue.
80
76
  - S2: the task finishes with wrong or missing information. Fix before merge.
81
77
  - S3: finishes at unreasonable cost. Record in `accepted_exceptions` with an owner.
82
78
  - S4: cosmetic or preference-level. Record in `omissions` with a reason and owner.
79
+
80
+ ## Failure patterns
81
+
82
+ Reject:
83
+
84
+ - an overlay widget or audit score offered in place of evidence
85
+ - `outline: none` with no replacement indicator reaching 3:1
86
+ - `aria-hidden` on anything focusable, or a role restating the native element
87
+ - a positive `tabindex`, or focus order diverging from reading order
88
+ - validation fired mid-composition, or CJK copy verified only with Latin strings
@@ -1,91 +1,47 @@
1
- Every interactive surface must answer three questions: what can be done here, what is happening
2
- now, what just happened. Settle all three in `inventory.interactions` and `inventory.states`
3
- first.
1
+ # Interaction states
4
2
 
5
- ## State inventory
6
-
7
- List the states each element can occupy. A state nobody listed is a state nobody built.
8
-
9
- - default, hover, active, focus-visible, disabled, read-only
10
- - selected, expanded, current, checked, indeterminate
11
- - loading, optimistic, retrying, succeeded, failed
12
- - empty, partial, truncated, overflowing, stale
13
-
14
- Each maps to one contract state kind: `loading`, `empty`, `error`, `success`, `disabled`,
15
- `permission`, `offline`, `ready`.
16
-
17
- ## Feedback proportional to consequence
18
-
19
- Weigh the response against what the action costs to undo. Cheap actions stay quiet.
20
-
21
- | Consequence | Required feedback |
22
- |---|---|
23
- | Reversible, local | Immediate change, no confirmation step |
24
- | Reversible, remote | Inline pending state plus undo for 5-10s |
25
- | Longer than 1s | Progress in place; skeleton only where layout is known |
26
- | Irreversible | Confirmation naming object and effect; typed name for bulk delete |
27
- | Failed | Persistent inline error, input preserved, retry within reach |
28
-
29
- ## Input and validation timing
30
-
31
- Validate when the user can act on the answer, not while it is still being typed.
3
+ Use `references/motion-guide.md` for animation choices. This guide covers what a control
4
+ does, how it reports state, and where keyboard focus goes.
32
5
 
33
- - one field: validate on blur; cross-field rules: validate on submit
34
- - once a field has failed, revalidate on input so the error clears
35
- - debounce remote checks at 300-500ms and cancel superseded requests
36
-
37
- ## Focus rules
38
-
39
- Focus is application state. Move it on purpose and put it back exactly.
40
-
41
- 1. On open, focus the first meaningful control, not the container.
42
- 2. Contain focus in a modal surface; `Escape` closes unless it discards data silently.
43
- 3. On dismissal, return focus to the opener; if it is gone, focus its nearest surviving
44
- ancestor, never `body`.
45
- 4. After deleting a row, focus the next row, or the list when none remains.
46
- 5. On route change, focus the new `h1` or the skip target.
47
-
48
- ## Gestures and their keyboard equivalents
49
-
50
- Treat a gesture as an accelerator over a control that already exists. A touch-only path is a
51
- defect.
52
-
53
- - swipe to dismiss requires a close control
54
- - drag to reorder requires up and down controls or a position field
55
- - pull to refresh requires a refresh control
56
-
57
- ## The motion test
6
+ ## State inventory
58
7
 
59
- Answer all three before adding motion. One "no" removes it.
8
+ For each interactive element, name only the states it can actually reach:
60
9
 
61
- 1. Which relationship does it explain: origin, continuity, hierarchy, or outcome?
62
- 2. Does removing it lose information rather than polish?
63
- 3. Does it finish within 400ms, with completion never waiting on it?
10
+ - pointer and keyboard: default, hover, pressed, focus-visible, disabled
11
+ - selection: selected, expanded, current, checked, indeterminate
12
+ - async work: loading, retrying, succeeded, failed
13
+ - content: empty, partial, truncated, stale, overflowing
64
14
 
65
- ## Choreography and sequencing
15
+ Map each state to its visual treatment, accessible announcement, and transition. The
16
+ Design Contract owns the state inventory; an unlisted state is a coverage gap.
66
17
 
67
- Sequence movement to direct attention. Specify trigger, property, duration, easing, interruption.
18
+ ## Feedback follows consequence
68
19
 
69
- - 100-150ms direct feedback, 200-300ms entry and exit, 300-400ms layout change
70
- - stagger 20-40ms per item, capped at five; the remainder arrive together
71
- - animate `transform` and `opacity` only, and never queue a transition
20
+ | Action | Feedback |
21
+ | --- | --- |
22
+ | Reversible local change | Apply immediately; avoid a confirmation step. |
23
+ | Remote action | Show pending state and offer undo when the operation supports it. |
24
+ | Work taking over a second | Keep progress in place and preserve the current layout. |
25
+ | Irreversible action | Name the object and effect before confirmation. |
26
+ | Failure | Keep the user's input, explain the next step, and make retry reachable. |
72
27
 
73
- ## Reduced motion without lost meaning
28
+ Validate a single field on blur and cross-field rules on submit. After an error, revalidate
29
+ as the user edits. Debounce remote checks and cancel requests made stale by newer input.
74
30
 
75
- Under `prefers-reduced-motion: reduce`, keep the information and drop the travel.
31
+ ## Focus and keyboard paths
76
32
 
77
- - replace slide and scale with a 100ms opacity change or an instant swap
78
- - keep progress indicators; make them determinate or a static pending label
79
- - the reduced path still shows every confirmation and result announcement
33
+ 1. On open, focus the first meaningful control.
34
+ 2. Keep focus inside a modal; Escape closes it when that does not discard unsaved work.
35
+ 3. On dismissal, return focus to the opener or its nearest surviving control.
36
+ 4. After removing a row, move focus to the next row or the list when empty.
37
+ 5. After navigation, focus the new heading or skip target.
80
38
 
81
- ## The record handed to review
39
+ Treat gestures as shortcuts. Swipe-to-dismiss needs a close control; drag-to-reorder needs
40
+ keyboard controls or a position field; pull-to-refresh needs a visible refresh action.
82
41
 
83
- Give the independent review pass one entry per interaction, keyed to the design contract hash.
84
- Anything missing counts as untested.
42
+ ## Review record
85
43
 
86
- - trigger and target element with its accessible name
87
- - every state, with its visual and its announced change
88
- - keyboard sequence: keys, focus after each, exit path
89
- - async contract: pending threshold, timeout, error text, retry
90
- - motion: property, duration, easing, interruption, reduced path
91
- - evidence: route, viewport, state, and how the state was reached
44
+ For each interaction, retain an internal Design Contract or QA record keyed to its hash:
45
+ the trigger, accessible name, reachable states, keyboard path, async failure and retry
46
+ behavior, and how QA reached the state. Keep this record detailed. In the chat reply,
47
+ mention only the limitation that changes the user's next decision.
@@ -1,8 +1,8 @@
1
- # Motion guide for frontend work
1
+ # Motion guide for LitGrok frontend work
2
2
 
3
- This guide turns motion into a small, testable part of the interface. Start with one sentence naming the page, target components, and out-of-scope areas; follow it with labeled sections in implementation order. Specify the stack, visual tokens, layers, timing, viewport behavior, reduced-motion behavior, assets, and performance limits before describing a page. Name exact files or components so the implementation does not invent unrelated sections. A page brief may name component families such as hero, pricing, footer, or dashboard before detailing the chosen one.
3
+ Use this guide with the active frontend Design Contract and `references/interaction-motion.md`. Motion decisions belong to named components and states; they do not grant implementation scope. Start with the target page, components, and exclusions. Specify the stack, visual tokens, layers, timing, viewport behavior, reduced-motion path, assets, and performance limits before implementation. Name exact files or components so the work does not invent unrelated sections.
4
4
 
5
- All values below are starting defaults. Keep the page calm when motion does not explain hierarchy, state, or cause and effect.
5
+ All values below are starting defaults. The default register is rich: layered motion (an atmosphere layer drifting behind the hero, the headline entering, the moment animating its own detail) is welcome when each layer has a job and a budget. A calm page is the opt-in, used when the request asks for a minimal or quiet page or the lock records `density: calm`. Either way, every layer stops under `prefers-reduced-motion: reduce`.
6
6
 
7
7
  ## 1. Stack, tokens, and composition
8
8
 
@@ -49,9 +49,9 @@ Use named curves so a later editor can change the motion family without hunting
49
49
 
50
50
  ## 3. Motion and resource budgets
51
51
 
52
- **Do:** Give each section one entrance sequence and no more than two simultaneously moving elements. Give the hero one principal scroll or entrance effect and one animated headline. Keep controls responsive while decorative motion runs.
52
+ **Do:** Layer motion by depth: a slow atmosphere layer (8 s or longer, transform or opacity only), one entrance sequence per section, and the signature moment's own detail. Up to four elements may move at once when they sit on separate layers and none of them is body text. Keep controls responsive while decorative motion runs, and keep each layer inside the frame budget below.
53
53
 
54
- **Don't:** animate the headline, background, cards, icons, and navigation at once. Remove any motion whose absence does not change comprehension or feedback.
54
+ **Don't:** animate every card, icon and nav item on the same beat, move body text while it is being read, or loop anything faster than three flashes a second (the flash floor stays absolute). Drop a layer that costs the frame budget before dropping the moment.
55
55
 
56
56
  **Do:** Animate `transform` and `opacity` for routine movement. Target a frame callback below 4 ms so the page has room for layout, paint, and input work within a 60 Hz frame. Check for dropped frames on a mid-range device.
57
57
 
@@ -122,6 +122,9 @@ Give cursor tracking its own interaction scope and budget. For a 3D scene or car
122
122
  - Are focus, keyboard use, contrast, and nonanimated content complete?
123
123
  - Are package versions pinned, and does the page remain readable when motion or media is unavailable?
124
124
 
125
- ## Phase 3 README examples
125
+ ## Phase 3 README A/B example slot
126
126
 
127
- Record verified before/after examples at `examples/phase-3-readme-motion-ab.md`. Include the Phase 3 evidence path, the README and motion context, verbatim excerpts in Markdown fences, and the observed change. Replace the template placeholders with run material; do not invent examples.
127
+ Keep `examples/phase-3-readme-motion-ab.md` as the verified A/B format (evidence path, README and motion context, verbatim excerpts, observed change). Add examples only after the Phase 3 README motion runs exist. Store each case at
128
+ `.grok/skills/frontend-ui-ux/examples/phase-3-readme-ab/<case>/` with
129
+ `before.md`, `after.md`, `before.png`, and `after.png`. The Markdown files hold the
130
+ README excerpts; the PNGs show the matching rendered states and viewport size.
@@ -3,8 +3,6 @@ Performance is an inventory item with a number attached. Declare it in the Desig
3
3
 
4
4
  ## Measurement environment
5
5
 
6
- Fix one profile and reuse it. Numbers from two profiles cannot be compared.
7
-
8
6
  - CPU throttled 4x; network 1.6 Mbps down, 750 kbps up, 150 ms round trip.
9
7
  - Cold cache, cleared storage, no extensions, declared locale.
10
8
  - Median of five runs at `compact` 360x800; repeat at `expanded` 1440x900.
@@ -12,8 +10,6 @@ Fix one profile and reuse it. Numbers from two profiles cannot be compared.
12
10
 
13
11
  ## Declared budgets
14
12
 
15
- Write each as a number the contract can carry. Tighten per project; never loosen silently.
16
-
17
13
  - LCP 2.5 s, FCP 1.8 s, INP 200 ms, CLS 0.10, each at p75 on the profile above.
18
14
  - Initial route JavaScript 170 KB compressed; total critical-path transfer 500 KB.
19
15
  - Initial CSS 60 KB compressed; webfonts 100 KB across at most two files.
@@ -62,15 +58,11 @@ Virtualize only after measuring. Under ~200 rows or 5 ms per update, paginate or
62
58
 
63
59
  ## Perceived versus measured
64
60
 
65
- Record both. Neither substitutes for the other.
66
-
67
61
  - Under 200 ms show nothing; to 1 s an inline indicator; past 1 s determinate progress.
68
62
  - A skeleton must match the final box, or it trades layout shift for shimmer.
69
63
 
70
64
  ## Audit protocol
71
65
 
72
- Run in order and end in a verdict.
73
-
74
66
  1. Reproduce on the declared profile with a cold cache.
75
67
  2. Capture one load trace and one interaction trace; save both paths.
76
68
  3. Rank findings by milliseconds against the budget each breaks.
@@ -80,3 +72,14 @@ Run in order and end in a verdict.
80
72
  7. Report `PASS` when every declared budget holds, `FAIL` with the violated number and artifact
81
73
  path, or `BLOCKED` with the missing profile or capture capability. Escalate after three
82
74
  iterations that cross no budget.
75
+
76
+ ## Failure patterns
77
+
78
+ Reject:
79
+
80
+ - A budget written as "fast" or "lightweight" with no number.
81
+ - Optimization argued from source reading with no trace attached.
82
+ - Virtualizing a 40-row table because long lists "should" be virtualized.
83
+ - A perceived-performance win offered as closure on a measured budget.
84
+ - A performance claim entering the independent review pass with no trace bound to the design
85
+ contract hash.
@@ -4,7 +4,7 @@ This reference is the execution contract for the four interface modes. Keep the
4
4
 
5
5
  ## Run the page
6
6
 
7
- Finish or build the page, then run `node "$FRONTEND_SKILL_ROOT/scripts/probe.mjs" --url <built-page-or-directory> --out <task-evidence-directory>`. The driver serves a local page on `127.0.0.1`, uses the already available `agent-browser` command, and closes its owned session and server. It never installs a browser or opens a `file://` page. Use an isolated evidence directory for each pass. The seven required views are 320, 390, 768, 1440, 390 dark, 390 reduced motion, and a 720×450 CSS viewport that approximates 1440 at 200% zoom. The last pass is a reflow emulation, not a claim that native browser zoom was changed.
7
+ Finish or build the page, then run `node "$FRONTEND_SKILL_ROOT/scripts/interface-probe.mjs" <built-page-or-directory> --out <task-evidence-directory>`. The driver serves a local page on `127.0.0.1`, uses the already available `agent-browser` command, and closes its owned session and server. It never installs a browser or opens a `file://` page. Use an isolated evidence directory for each pass. The seven required views are 320, 390, 768, 1440, 390 dark, 390 reduced motion, and a 720×450 CSS viewport that approximates 1440 at 200% zoom. The last pass is a reflow emulation, not a claim that native browser zoom was changed.
8
8
 
9
9
  Open the 320, 390, and 1440 screenshots yourself. Look for clipping, hierarchy, focus and labels, image meaning, state handling, and any visual defect that a DOM measurement cannot decide. Inspect the dark and reduced-motion captures when those variants are relevant. The screenshots and the JSON must describe the same build.
10
10
 
@@ -19,8 +19,6 @@ One surface, one task the user must be able to finish. Everything else is subord
19
19
 
20
20
  ## Convert quality words into measured signals
21
21
 
22
- "Fast" and "intuitive" are not acceptance criteria. Each becomes a number you can read.
23
-
24
22
  - Completion time at p50 and p90, with the ceiling you will defend.
25
23
  - Error rate on the primary form, and the share of errors preserving entered input.
26
24
  - Interaction cost on the frequent path, as a keystroke or tap ceiling.
@@ -48,8 +46,6 @@ Each journey ends at the completion condition above. One that stops earlier is a
48
46
 
49
47
  ## Keep more than one answer alive
50
48
 
51
- Hand the next stage a bounded set. One inevitable option is a decision nobody reviewed.
52
-
53
49
  - Produce 2-3 directions separated by structure or density, never by accent hue.
54
50
  - Give each the task it accelerates, the task it slows, and its migration cost.
55
51
  - Mark one recommendation with a one-sentence reason; keep the rejected ones legible.
@@ -73,3 +69,12 @@ The next stage reads this package, not the transcript. What is missing does not
73
69
  - Five journeys with pass conditions; bounded directions with costs and recommendation.
74
70
  - Finite surface list: routes, states, viewport bands, auth requirements.
75
71
  - The design contract hash the independent review pass binds its receipt to.
72
+
73
+ ## Failure patterns
74
+
75
+ Reject:
76
+
77
+ - A persona described by demographics rather than by a decision.
78
+ - "Improve the experience" accepted as an outcome with no observable task.
79
+ - One direction presented with no alternative and no stated cost.
80
+ - A success claim resting on a single happy-path capture.
@@ -0,0 +1,17 @@
1
+ # From a design request to a working screen
2
+
3
+ Choose the output mode from the user's actual request. A critique or plan is read-only. A build with a clear target proceeds to source changes and inspection. A bare skill name with several frontends needs a target choice; naming a skill does not settle scope. PostToolUse guidance is a reminder to inspect the changed UI, never permission to redesign unrelated screens.
4
+
5
+ Before implementation, record a short direction and the finite routes, controls and states that matter. Read current components, brand tokens and dirty files. Preserve established identity in brownfield work. For new work with no visual direction in the brief, apply the authored default pixel profile without asking; absence of direction is not an unresolved choice. The profile is not a mandate to recolor an existing product.
6
+
7
+ There is no mandatory interview. Ask only when two plausible answers would materially change scope, architecture, permissions, accessibility, or visual direction. Resolve a known conflict before installing tooling or producing a baseline capture; a capture is not needed to ask the question. Ask one high-impact question at a time, present concrete alternatives and their consequences, then wait for the answer before choosing the next unresolved material decision. Continue for as many rounds as materially necessary; there is no fixed question count.
8
+
9
+ If the brief itself names competing directions and says both directions are acceptable, acceptance alone is not a selection or delegation: that visual axis remains unresolved. This is different from a brief that gives no visual direction at all. Ask about the competing directions as their own round after higher-impact questions have been answered. You may include a recommendation in a concrete alternatives question, but do not treat that recommendation as a selection or begin work on the unresolved direction before the user selects or delegates it. Apply the same rule to any other material axis the brief leaves undecided. Give each remaining open axis its own round after higher-impact choices have been answered. A default is valid only when the brief settles that axis, expressly delegates it to you (for example, “your call” or “pick one”), or the alternatives would not materially change the result.
10
+
11
+ Retain earlier answers across rounds in the conversation and task-local direction note. On resume, reread the confirmed choices and inspect partial work before asking anything new; do not re-ask a resolved question. When all material choices have been answered or delegated, state the default and proceed only on remaining details that do not materially change the result. A skill name or keyword-only request does not authorize a build: review, plan, and keyword-only requests remain read-only. An answer resolves the stated design choice; it does not grant broader file, host, permission, credential, or publication authority.
12
+
13
+ The beta2 contract records the real inventory, tokens, responsive transformations and acceptance criteria as they develop. It can evolve with the code. Validate it before acceptance using the helper rooted at the selected installed skill directory. A validator result proves schema consistency, not an attractive or working interface. Do not stop after handing over a contract when the user requested a screen.
14
+
15
+ Use deliberate type hierarchy, one coherent palette and an original crisp pixel illustration tied to the product's purpose. A smooth generic icon does not satisfy the pixel direction. Compose separate mobile line breaks; use Korean display leading above Latin display leading. Keep readable body text and comfortable controls. Effects stay behind content. Prefer an asymmetric layout that still gives the primary task an obvious reading order.
16
+
17
+ Exercise the actual page: initial empty state, successful primary action, validation error and recovery, keyboard focus, responsive layout and reduced motion. Check 320, 390 and 1440 CSS pixels. A class that sets display can override the hidden attribute; include a targeted `[hidden] { display: none }` rule and verify the transition in the browser. Record unavailable browser capability separately from implementation completion; never substitute source inspection for rendered evidence.