@uselazuli/cli 0.0.0-stage → 1.0.1

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 (179) hide show
  1. package/CHANGELOG.md +98 -0
  2. package/LICENSE +21 -0
  3. package/README.md +202 -2
  4. package/agents/lazuli-design-reviewer.md +30 -0
  5. package/agents/lazuli-first-look.md +22 -0
  6. package/agents/lazuli-task-tester.md +25 -0
  7. package/bin/lazuli.mjs +699 -0
  8. package/package.json +11 -4
  9. package/rules/accessibility/HYPOTHESES.md +8 -0
  10. package/rules/accessibility/_area.yaml +7 -0
  11. package/rules/accessibility/operable.yaml +100 -0
  12. package/rules/accessibility/perceivable.yaml +153 -0
  13. package/rules/accessibility/robust.yaml +24 -0
  14. package/rules/accessibility/understandable.yaml +72 -0
  15. package/rules/color/HYPOTHESES.md +27 -0
  16. package/rules/color/_area.yaml +10 -0
  17. package/rules/color/adapt.yaml +183 -0
  18. package/rules/color/create.yaml +259 -0
  19. package/rules/color/review.yaml +215 -0
  20. package/rules/color/signal.yaml +196 -0
  21. package/rules/content/HYPOTHESES.md +18 -0
  22. package/rules/content/_area.yaml +8 -0
  23. package/rules/content/review.yaml +347 -0
  24. package/rules/content/voice.yaml +144 -0
  25. package/rules/content/writing.yaml +202 -0
  26. package/rules/data/HYPOTHESES.md +11 -0
  27. package/rules/data/_area.yaml +7 -0
  28. package/rules/data/charts.yaml +189 -0
  29. package/rules/data/dashboards.yaml +141 -0
  30. package/rules/data/review.yaml +159 -0
  31. package/rules/graphic/HYPOTHESES.md +17 -0
  32. package/rules/graphic/_area.yaml +8 -0
  33. package/rules/graphic/identity.yaml +141 -0
  34. package/rules/graphic/pieces.yaml +164 -0
  35. package/rules/graphic/review.yaml +242 -0
  36. package/rules/graphic/symbol.yaml +141 -0
  37. package/rules/motion/HYPOTHESES.md +19 -0
  38. package/rules/motion/_area.yaml +7 -0
  39. package/rules/motion/micro.yaml +143 -0
  40. package/rules/motion/review.yaml +347 -0
  41. package/rules/motion/transitions.yaml +169 -0
  42. package/rules/typography/HYPOTHESES.md +12 -0
  43. package/rules/typography/_area.yaml +8 -0
  44. package/rules/typography/adapt.yaml +45 -0
  45. package/rules/typography/create.yaml +126 -0
  46. package/rules/typography/review.yaml +127 -0
  47. package/rules/ui/HYPOTHESES.md +23 -0
  48. package/rules/ui/_area.yaml +9 -0
  49. package/rules/ui/compose.yaml +219 -0
  50. package/rules/ui/grid.yaml +75 -0
  51. package/rules/ui/review.yaml +399 -0
  52. package/rules/ui/states.yaml +257 -0
  53. package/rules/ux/HYPOTHESES.md +13 -0
  54. package/rules/ux/_area.yaml +8 -0
  55. package/rules/ux/flows.yaml +164 -0
  56. package/rules/ux/forms.yaml +142 -0
  57. package/rules/ux/review.yaml +186 -0
  58. package/skills/lazuli/SKILL.md +180 -0
  59. package/skills/lazuli/procedures/create.md +29 -0
  60. package/skills/lazuli/procedures/explain-decisions.md +22 -0
  61. package/skills/lazuli/procedures/improve.md +30 -0
  62. package/skills/lazuli/procedures/remember-this.md +41 -0
  63. package/skills/lazuli/procedures/review-design.md +35 -0
  64. package/skills/lazuli/procedures/show-options.md +32 -0
  65. package/skills/lazuli-accessibility-check/SKILL.md +68 -0
  66. package/skills/lazuli-color-context-and-culture/SKILL.md +53 -0
  67. package/skills/lazuli-color-context-and-culture/references/sectors.md +26 -0
  68. package/skills/lazuli-color-palette-by-intent/SKILL.md +54 -0
  69. package/skills/lazuli-color-palette-by-intent/references/intent-chords.md +51 -0
  70. package/skills/lazuli-color-screen-review/SKILL.md +51 -0
  71. package/skills/lazuli-color-states-and-signals/SKILL.md +53 -0
  72. package/skills/lazuli-content-interface-writing/SKILL.md +53 -0
  73. package/skills/lazuli-content-voice/SKILL.md +39 -0
  74. package/skills/lazuli-data-charts-and-dashboards/SKILL.md +59 -0
  75. package/skills/lazuli-graphic-derived-pieces/SKILL.md +40 -0
  76. package/skills/lazuli-graphic-derived-pieces/references/piece-template.html +24 -0
  77. package/skills/lazuli-graphic-identity/SKILL.md +43 -0
  78. package/skills/lazuli-motion-micro-and-transitions/SKILL.md +49 -0
  79. package/skills/lazuli-typography-choose-and-pair/SKILL.md +50 -0
  80. package/skills/lazuli-typography-screen-review/SKILL.md +51 -0
  81. package/skills/lazuli-ui-composition/SKILL.md +42 -0
  82. package/skills/lazuli-ui-composition/references/option-template.html +34 -0
  83. package/skills/lazuli-ui-layout-review/SKILL.md +47 -0
  84. package/skills/lazuli-ui-states-and-system/SKILL.md +54 -0
  85. package/skills/lazuli-ux-flows-and-forms/SKILL.md +51 -0
  86. package/skills/lazuli-ux-task-test/SKILL.md +44 -0
  87. package/src/browser.mjs +161 -0
  88. package/src/commands/capture.mjs +313 -0
  89. package/src/commands/catalog.mjs +37 -0
  90. package/src/commands/check-design.mjs +428 -0
  91. package/src/commands/check-goals.mjs +57 -0
  92. package/src/commands/compare-designs.mjs +97 -0
  93. package/src/commands/draft-memo.mjs +161 -0
  94. package/src/commands/hooks.mjs +343 -0
  95. package/src/commands/install-hooks.mjs +120 -0
  96. package/src/commands/install.mjs +132 -0
  97. package/src/commands/list-rules.mjs +49 -0
  98. package/src/commands/map-page.mjs +594 -0
  99. package/src/commands/record-answers.mjs +79 -0
  100. package/src/commands/record-log.mjs +296 -0
  101. package/src/commands/record-task.mjs +250 -0
  102. package/src/commands/render-options.mjs +164 -0
  103. package/src/commands/start-project.mjs +32 -0
  104. package/src/measure/a11y.mjs +383 -0
  105. package/src/measure/asset.mjs +206 -0
  106. package/src/measure/at-rest.mjs +49 -0
  107. package/src/measure/cases.mjs +549 -0
  108. package/src/measure/chart-read.mjs +401 -0
  109. package/src/measure/chart.mjs +264 -0
  110. package/src/measure/coherence.mjs +145 -0
  111. package/src/measure/color.mjs +79 -0
  112. package/src/measure/content.mjs +82 -0
  113. package/src/measure/cvd.mjs +24 -0
  114. package/src/measure/extreme.mjs +241 -0
  115. package/src/measure/forms.mjs +150 -0
  116. package/src/measure/in-page/a11y.js +489 -0
  117. package/src/measure/in-page/color.js +346 -0
  118. package/src/measure/in-page/composition.js +1496 -0
  119. package/src/measure/in-page/contrast.js +15 -0
  120. package/src/measure/in-page/cvd.js +173 -0
  121. package/src/measure/in-page/extreme.js +355 -0
  122. package/src/measure/in-page/frames.js +781 -0
  123. package/src/measure/in-page/look.js +28 -0
  124. package/src/measure/in-page/motion-probe.js +169 -0
  125. package/src/measure/in-page/style.js +107 -0
  126. package/src/measure/in-page/svg-strokes.js +112 -0
  127. package/src/measure/in-page/svg-uses.js +50 -0
  128. package/src/measure/in-page/symbol.js +123 -0
  129. package/src/measure/in-page/type.js +266 -0
  130. package/src/measure/in-page/weight.js +207 -0
  131. package/src/measure/layout.mjs +91 -0
  132. package/src/measure/motion.mjs +508 -0
  133. package/src/measure/piece.mjs +195 -0
  134. package/src/measure/registry.mjs +252 -0
  135. package/src/measure/rhythm.mjs +81 -0
  136. package/src/measure/signature.mjs +65 -0
  137. package/src/measure/states.mjs +240 -0
  138. package/src/measure/style.mjs +13 -0
  139. package/src/measure/symbol.mjs +268 -0
  140. package/src/measure/terms.mjs +153 -0
  141. package/src/measure/tiles.mjs +20 -0
  142. package/src/measure/timeline.mjs +621 -0
  143. package/src/measure/type.mjs +167 -0
  144. package/src/measure/weight.mjs +18 -0
  145. package/src/private-strings.mjs +81 -0
  146. package/src/project/blind.mjs +70 -0
  147. package/src/project/edits.mjs +154 -0
  148. package/src/project/gate.mjs +159 -0
  149. package/src/project/lazuli-md.mjs +497 -0
  150. package/src/project/log.mjs +329 -0
  151. package/src/project/match.mjs +112 -0
  152. package/src/project/records.mjs +380 -0
  153. package/src/project/tasks.mjs +153 -0
  154. package/src/report/evaluate.mjs +27 -0
  155. package/src/report/evaluators/a11y.mjs +206 -0
  156. package/src/report/evaluators/chart.mjs +151 -0
  157. package/src/report/evaluators/coherence.mjs +103 -0
  158. package/src/report/evaluators/color.mjs +86 -0
  159. package/src/report/evaluators/content.mjs +112 -0
  160. package/src/report/evaluators/extreme.mjs +53 -0
  161. package/src/report/evaluators/forms.mjs +116 -0
  162. package/src/report/evaluators/layout.mjs +94 -0
  163. package/src/report/evaluators/motion.mjs +273 -0
  164. package/src/report/evaluators/piece.mjs +69 -0
  165. package/src/report/evaluators/rhythm.mjs +99 -0
  166. package/src/report/evaluators/states.mjs +39 -0
  167. package/src/report/evaluators/style.mjs +35 -0
  168. package/src/report/evaluators/symbol.mjs +110 -0
  169. package/src/report/evaluators/terms.mjs +49 -0
  170. package/src/report/evaluators/type.mjs +163 -0
  171. package/src/report/evaluators/weight.mjs +51 -0
  172. package/src/report/evidence.mjs +4 -0
  173. package/src/report/finding.mjs +11 -0
  174. package/src/report/format.mjs +215 -0
  175. package/src/rules/hypotheses.mjs +28 -0
  176. package/src/rules/load.mjs +256 -0
  177. package/src/rules/public-text.mjs +56 -0
  178. package/src/rules/schema.mjs +212 -0
  179. package/templates/LAZULI.md +86 -0
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: lazuli-content-voice
3
+ description: Use when defining or reviewing how a product speaks, such as its brand voice and tone of voice, words to use and avoid, tone by moment in errors, empty states and success, plain language for the audience, and copy only this product could have instead of generic sentences that sound like any company.
4
+ ---
5
+
6
+ # Voice
7
+
8
+ A voice is declared as three traits, kept in `## Voice` of `LAZULI.md`, and every line of copy can be held against it. Voice rules are CV1 to CV6 (`../lazuli/rules/content/voice.yaml`), the swap test is CR12 and the claims check is CR13 (`review.yaml`) in the same folder, after install (in a kit checkout: `rules/content/`). `## Voice` is prose that the CLI does not parse: no measure reads it.
9
+
10
+ Do not use when:
11
+ - the question is a button label, an error message or one name per thing: use `lazuli-content-interface-writing`;
12
+ - the question is the look of the type: use the typography skills.
13
+
14
+ ## Define
15
+ 1. Read `## Audience`, `## Language` and `## Idea` in `LAZULI.md`. The voice comes from the audience and the idea, not from a mood word.
16
+ 2. Director mode: propose three voices and wait for the choice. Write each as three "this, not that" traits ("direct, not curt"), and rewrite the same three lines in each voice: the main heading, the main button and one error message. Delegate mode: pick one voice and say why in plain words, without design terms.
17
+ 3. Write the choice under `## Voice` as the three traits, the words to use and the words to avoid (CV1, CV3). Log it under a text of its own:
18
+ `lazuli record-decision --decision "Voice: <the three traits, this not that>" --piece "<goal piece>" --goal "<the goal it serves>" --rule "CV1 followed" --measure "<not measured, judged by the swap test>"`
19
+
20
+ ## Write
21
+ 1. Move the tone with the moment and keep the voice: an error is calmer than a welcome, and neither drops a trait (CV4).
22
+ 2. Use the audience's own words and a plain register (CV5). Prefer a specific fact to a superlative (CV6): "Open until 22:00" over "the best service".
23
+ 3. Write the copy with the voice before layout is final, so the layout is built around real words.
24
+ 4. The terms list and the labels are the work of `lazuli-content-interface-writing`; the voice decides how they sound.
25
+
26
+ ## Review
27
+ 1. A fresh agent that did not write the copy runs the swap test (CR12, CV2) on the main heading, the first paragraph and the main button: it replaces the product name with a competitor's and lists in words which lines still hold, which could belong to any company. Give it the capture and the page text, never the goals or the voice.
28
+ 2. Quote its answer in words. A line that still holds with a competitor's name is rewritten around a fact only this product has, or kept through `break-a-rule` and `review-design`. A kept break is logged with `record-decision` under its own text.
29
+ 3. Without subagents, ask the person or a separate session that has not seen the work. If neither is possible, say the swap test was not run.
30
+ 4. Hold the copy against `## Voice` in words: which trait each line shows, which it ignores, which avoided word appears.
31
+ 5. On a page with sales copy, walk CR13 while writing and have the reviewer walk it again: one line per claim (a number, a discount, a scarcity or deadline line, a health, income or result claim) with where its source is shown on the page, or "no source on the page". A discount is checked against the page's own prices, and a countdown or "few left" line must be true for every visitor, never generated. In regulated sectors (food supplements, health, finance) a person who knows the local regulation reviews the claims; the kit does not.
32
+
33
+ ## Closing checklist
34
+ - Three "this, not that" traits in `## Voice`, chosen by the person in director mode, with a reason in delegate mode.
35
+ - The decision logged; the swap test run by an agent that did not write the copy.
36
+ - Tone by moment and the audience's words checked in words.
37
+
38
+ ## What never to say
39
+ Never say the copy has a voice, is clear, fits the audience or is on brand because of a measure. No measure reads voice: `check-design` never says it, and only a reviewer's words do.
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: lazuli-data-charts-and-dashboards
3
+ description: "Use when designing or reviewing charts and dashboards: choosing the chart form, axes and baselines, readable labels and legends, chart colors and color blindness, key numbers and panel layout, and whether the message shows at first look."
4
+ ---
5
+
6
+ # Charts and dashboards
7
+
8
+ A chart carries one message, in the form that fits its comparison, read at first look. The rules are DC1 to DC8 (`../lazuli/rules/data/charts.yaml`), DD1 to DD6 (`dashboards.yaml`) and the checks DR1 to DR6 (`review.yaml`) in the same folder, after install (in a kit checkout: `rules/data/`). The numbers of DR2 to DR5 are hypotheses with ids H1 to H4 in `HYPOTHESES.md`, so those findings are hints. DC6 and DC7 are WCAG 2.2 norms (1.4.1 and 1.1.1, level A).
9
+
10
+ Do not use when:
11
+ - the color is a state or signal of the interface (an error badge, a status): use `lazuli-color-states-and-signals`;
12
+ - the question is the palette of the brand: use `lazuli-color-palette-by-intent`.
13
+
14
+ ## Create
15
+ 1. Write the chart's message as one sentence before drawing and make it the title: the finding, not the topic (DC1). Put the same sentence in the goal's `Understand:` line, so the first look can be compared with it. Log it:
16
+ `lazuli record-decision --decision "Chart message: <the sentence of the title>" --piece "<goal piece>" --goal "<the goal it serves>" --rule "DC1 followed" --measure "<judged at first look, DR6>"`
17
+ 2. Name the comparison and choose the form for it (DC2): bars for amounts, lines for change over time. Log it:
18
+ `lazuli record-decision --decision "Chart form: <the comparison and the form chosen>" --piece "<goal piece>" --goal "<the goal it serves>" --rule "DC2 followed" --measure "<not measured, judged by the reviewer>"`
19
+ 3. Bars grow from zero (DC3). A line axis cut on purpose shows the cut and the text alternative says so.
20
+ 4. Name each series at its data, in dark text; a legend only when labels cannot fit (DC4). Log it:
21
+ `lazuli record-decision --decision "Series names: <where each series is named>" --piece "<goal piece>" --goal "<the goal it serves>" --rule "DC4 followed" --measure "<check-design chart.direct-labels>"`
22
+ 5. Color by intent: one highlight for the series that carries the message, the rest neutral, with the palette of `lazuli-color-palette-by-intent` and status colors from `lazuli-color-states-and-signals` (DC5). Log it:
23
+ `lazuli record-decision --decision "Chart colors: <the highlight, the neutrals and why>" --piece "<goal piece>" --goal "<the goal it serves>" --rule "DC5 followed" --measure "<check-design chart.categories and chart.cvd>"`
24
+ 6. Never tell series apart by color alone (DC6), and give every chart a text alternative that states its message (DC7). Both are norms that a reviewer judges from the chart and its code, never measured: `lazuli-accessibility-check` does not check them, so a clean run there says nothing about DC6 or DC7. A fail blocks delivery and a break never waives them. Log the alternative:
25
+ `lazuli record-decision --decision "Chart text alternative: <where it is and what it says>" --piece "<goal piece>" --goal "<the goal it serves>" --rule "DC7 followed" --measure "<not measured, judged by the reviewer>"`
26
+ 7. Size labels for the smallest width the page runs at, with units and the audience's number format (DC8).
27
+
28
+ The same decision text on the same piece replaces the earlier entry, so each line above has its own text.
29
+
30
+ ## Dashboards
31
+ 1. Write who reads it and the questions they come with, most important first; each panel answers one (DD1). Log it:
32
+ `lazuli record-decision --decision "Dashboard questions: <the reader and the questions in order>" --piece "<goal piece>" --goal "<the goal it serves>" --rule "DD1 followed" --measure "<not measured, judged by the reviewer>"`
33
+ 2. Show each key number with its comparison and the difference in words or a sign (DD2).
34
+ 3. Keep one color, scale and number format per measure across panels (DD3). Log it:
35
+ `lazuli record-decision --decision "Dashboard measures: <each measure and its color>" --piece "<goal piece>" --goal "<the goal it serves>" --rule "DD3 followed" --measure "<not measured, judged by the reviewer>"`
36
+ 4. Nothing decorates the data (DD4). Design every panel's loading, empty and error states with `lazuli-ui-states-and-system` (DD5). At the smallest width the panels stack in the order of the questions (DD6).
37
+
38
+ Then run `check-design <target> --area data` and the first look (`lazuli capture`, then `record-first-look`) through `review-design`.
39
+
40
+ ## Review
41
+ 1. Measure: `check-design <target> --area data` at each width. Quote DR1 to DR5 with their hypothesis ids where they have one, and these limits: an svg chart is read from its geometry and computed paint; a canvas chart from its pixels only, so its baseline, labels and legend are not read and its colors come from the part in the first view; a legend is found by the word legend in its class, id or label; gradient paints and clip paths other than one rect are not read. The measure never hovers, clicks or scrolls, so tooltips and interactive legends are not read. The post-edit hook reads charts but writes no chart sheet.
42
+ 2. DR5 simulates the series colors with the model of Machado, Oliveira and Fernandes (2009) at severity 1 (protanopia, deuteranopia, tritanopia) and in grayscale; milder deficiencies are not read. DR4 counts saturated colors (on a canvas, saturated color buckets).
43
+ 3. Open the sheet the report prints as `Charts for review: <path>` (`.lazuli/charts/<target key>/charts-<width>.png`): each chart as captured and in the four simulated views. Say in words what each view still shows: which series stay apart, whether the highlight still leads. The sheet is for the reviewer only.
44
+ 4. DR6 comes from the first look, never from a measure: compare its answer with the `Understand:` line and quote both.
45
+ 5. DC6 and DC7 are norms: judge DC6 on the sheet and in the code (DR3 is only a hint toward it, under 1.4.1), and check the text alternative. A fail blocks delivery; a break never waives them.
46
+ 6. A hint judged false is noted with its evidence, not silenced by changing the page.
47
+ 7. A kept break goes through `break-a-rule` and is kept only after `review-design`, with the chart sheet attached to that review (the capture does not carry it).
48
+
49
+ ## Reading the report
50
+ | Measure | Rule | A finding means |
51
+ |---|---|---|
52
+ | chart.baseline | DR1 | the bars of an svg chart grow from a value other than zero |
53
+ | chart.label-size | DR2 | svg chart labels render under the size of H1 |
54
+ | chart.direct-labels | DR3 | series named only in a legend, or not named |
55
+ | chart.categories | DR4 | more saturated colors than the count of H3 |
56
+ | chart.cvd | DR5 | a pair of series colors closer than H4 in some view, named |
57
+
58
+ ## What never to say
59
+ Never say a chart is clear, readable, accessible or safe for color blind readers, and never that an effect was achieved. The report lists what was measured; the first look and the reviewer judge the rest.
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: lazuli-graphic-derived-pieces
3
+ description: Use when making social posts for Instagram or LinkedIn, Open Graph share images, a favicon set or a presentation cover from the Brand tokens, and when checking that a piece uses only the brand colors, fonts and symbol.
4
+ ---
5
+
6
+ # Derived pieces
7
+
8
+ A piece is made from the identity, never from a stock layout: every color, font and symbol comes from the `## Brand` lines of `LAZULI.md` (GD1). The rules are in `../lazuli/rules/graphic/pieces.yaml` (the checks in `review.yaml`; in a kit checkout: `rules/graphic/`). The CLI renders, measures and writes the images; whether the piece carries its idea is judged by a reviewer.
9
+
10
+ Do not use when:
11
+ - there is no symbol or Brand yet: use `lazuli-graphic-identity` first;
12
+ - the work is a page of the product: use the ui skills.
13
+
14
+ ## Procedure
15
+ 1. Make each piece a goal under `## Goals` with `Target:` (its HTML file) and `Size:` (the canvas, GD2). Take the size from the platform's current page when the piece is made, never from memory, and ask when no page gives it (GD4 to GD6). Social and Open Graph canvases are not invented.
16
+ 2. Start from `references/piece-template.html` (next to this skill), saved as the piece's own file. It has the Brand variables and one `img` for the symbol and gives no layout on purpose. Copy the colors and fonts from `## Brand` and point the `img` at a `- Symbol:` file, the small version where its range covers the size (GD1).
17
+ 3. Compose for the piece's one idea (GD3) with the composition moves of `lazuli-ui-composition`. Keep text and symbol inside the platform's safe area (GD4). A presentation cover is a composition of its own (GD7).
18
+ 4. Run `lazuli check-design --asset <piece.html> --area graphic`. Quote GR6 to GR9 with their findings and the `Files written:` (the PNG at the declared size). GR7 and GR8 name colors and fonts not in Brand: fix the piece, or declare the color or font in Brand if it is a real choice. GR9 asks for a file, not a pasted copy of the symbol.
19
+ 5. For text contrast and type in a piece with text and a canvas width of 200 px or more, run `lazuli check-design <piece.html> --width <its width> --area color,typography`. That is a page run: its viewport is 900 px tall, not the canvas height, and the hook runs one after each edit of the HTML. A piece narrower than 200 px (a favicon) cannot take it: run it at 200 px or more on the same HTML, knowing the layout may reflow, or rely on `--asset`, which checks its colors and fonts against the Brand but not text contrast.
20
+ 6. View the PNG at the size a feed or a link preview shows it, and judge the text and the symbol there (GD5). Give an Open Graph image its `og:image:alt` text.
21
+ 7. A piece is delivered like a page: `lazuli capture <piece.html>`, then `review-design`, whose step runs `check-design --asset` and puts its report in the review. `--asset` measures but is not that review. Run it explicitly after each edit: the hook does not run `--asset`. For a piece with text, run the page check of step 5 first and quote its findings (text contrast, RV2, is a WCAG norm: a fail blocks delivery like any page norm), then `--asset` last, so the reviewer packet holds both reports.
22
+ 8. Log each decision under its own text, one call per rule id (the same text replaces the earlier entry):
23
+ `lazuli record-decision --decision "Open Graph idea: <what the piece gets across>" --piece "<piece goal>" --goal "<the goal it serves>" --rule "GD3 followed" --measure "<what check-design --asset reported>"`
24
+ `lazuli record-decision --decision "Open Graph safe area: <the platform page and the margins used>" --piece "<piece goal>" --goal "<the goal it serves>" --rule "GD4 followed" --measure "<not measured, judged in the preview>"`
25
+ 9. A rule broken on purpose goes through `break-a-rule` and is kept only after `review-design`. WCAG A and AA norms are fixed, never broken.
26
+
27
+ ## Favicon set
28
+ One goal with `Size: 16, 32, 180, 512`, drawn from the small symbol where its range covers the size and from the main symbol above it (GD6). The run writes the PNGs and `favicon.ico`, listed under `Files written:`. Check the small symbol itself with `lazuli-graphic-identity`.
29
+
30
+ ## Rule index
31
+ | Ids | Theme |
32
+ |---|---|
33
+ | GD1, GD2 | Brand tokens, one HTML file at its exact canvas with `Size:` |
34
+ | GD3, GD7 | one idea composed on purpose, the cover |
35
+ | GD4, GD5 | safe area, judged at feed size |
36
+ | GD6 | the favicon set from the Brand symbols |
37
+ | GR6 to GR9 | measured: fits the canvas, Brand colors, Brand fonts, the Brand symbol file |
38
+
39
+ ## What never to say
40
+ Never say a piece works on the platform, converts or is on brand as a verdict: the report lists what was measured, and the reviewer judges the rest. Never say an effect was achieved.
@@ -0,0 +1,24 @@
1
+ <!doctype html>
2
+ <html lang="en"><head><meta charset="utf-8"><title>Piece</title>
3
+ <!-- A starting canvas for one derived piece, not a layout. Save it as the piece's own HTML file, declare it
4
+ under ## Goals in LAZULI.md with a Target line (this file) and a Size line (the canvas, such as 1200x630),
5
+ and check it with check-design --asset. html and body fill the canvas with no margin and no overflow rule,
6
+ so content that runs past the canvas stays visible while you compose; the PNG cuts it, and the check reports it.
7
+ Compose this canvas for this piece's idea (GD3); the template gives no layout on purpose. -->
8
+ <style>
9
+ :root {
10
+ /* Placeholders. Copy each Brand color and font from the ## Brand section of LAZULI.md, one property per
11
+ "- Color:" and "- Font:" line, named after it (--brand-ink for "- Color: ink #1a1a1a"). */
12
+ --brand-ink: #000000;
13
+ --brand-paper: #ffffff;
14
+ --brand-font: sans-serif;
15
+ }
16
+ html, body { margin: 0; width: 100%; height: 100%; }
17
+ body { background: var(--brand-paper); color: var(--brand-ink); font-family: var(--brand-font); }
18
+ /* Only keeps a symbol with no size of its own inside the canvas; size and place it for the idea. */
19
+ img { display: block; max-width: 100%; max-height: 100%; }
20
+ </style></head>
21
+ <body>
22
+ <!-- Point src at the file of a "- Symbol:" line of ## Brand (the small version where its range covers the size). -->
23
+ <img src="brand/symbol.svg" alt="">
24
+ </body></html>
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: lazuli-graphic-identity
3
+ description: Use when creating or reviewing a logo, symbol or brand mark ("design a symbol for this brand", "our logo turns into a blob at 16 px", "is this mark too close to our sector?"), its simplified small version, favicon readiness, light and dark versions, and the Brand tokens of the identity.
4
+ ---
5
+
6
+ # Graphic identity
7
+
8
+ A symbol that has an idea only this brand could have, and still reads from a billboard down to a 16 px tab. The CLI renders and measures; whether the mark carries the idea is judged by a reviewer and by a blind look. The rules are in `../lazuli/rules/graphic/identity.yaml` (the symbol rules in `symbol.yaml`, the checks in `review.yaml`; in a kit checkout: `rules/graphic/`). Palette and type are chosen with `lazuli-color-palette-by-intent` and `lazuli-typography-choose-and-pair`, not here (GI5).
9
+
10
+ Do not use when:
11
+ - the work is a social post, an Open Graph image, a favicon set or a cover: use `lazuli-graphic-derived-pieces`;
12
+ - the work is a page or a screen: use the ui, color or typography skills.
13
+
14
+ ## Create
15
+ 1. Read `## Idea` in `LAZULI.md`. Write one sentence: what only this brand has, and the visual device that carries it (GI1). No idea written, no drawing.
16
+ 2. Check the sector's marks (GI3): three competitors and the signs the sector repeats. Do not build on those devices.
17
+ 3. Draw several directions and look at each at 16 px next to its large size, from the first sketch (GS1, GI2). Few parts, open counters, one flat color that still holds the silhouette (GS4), no live text (GS6).
18
+ 4. Choose by what reads at both sizes and carries the idea. Log it, naming the directions that were left out:
19
+ `lazuli record-decision --decision "Symbol direction: <chosen, and the ones dropped>" --piece "<symbol goal>" --goal "<the goal it serves>" --rule "GI2 followed" --measure "<what you saw at 16 px and large>"`
20
+ 5. Declare the Brand tokens in `## Brand` (GI4): `- Color:`, `- Font:` and `- Symbol:` lines. When detail cannot survive small, draw a simplified version and declare it with its range, for example `- Symbol: brand/symbol-small.svg (up to 32 px)` (GS2). There is no dark-symbol slot: a symbol that fails on one background gets a second file or a theme-switching SVG (GS5). Log it under its own text:
21
+ `lazuli record-decision --decision "Small version: <what was dropped and the range>" --piece "<symbol goal>" --goal "<the goal it serves>" --rule "GS2 followed" --measure "<widths from check-design --asset>"`
22
+ 6. Place the mark where it will live: a tab, an avatar circle, large, and a dark tab (GI6).
23
+ Each rule id gets its own decision text, because the same text replaces the earlier entry.
24
+
25
+ ## Review
26
+ 1. Run `lazuli check-design --asset <symbol file> --area graphic`. Quote GR1 to GR4 with their limits: the symbol is rendered at scale 1, a size is the longer side, strokes are read from SVG only (a PNG or ICO has none, say so). Also quote `Files written:`.
27
+ 2. Look at `symbol-sheet.png` yourself. The measures are hints with hypothesis ids, not a verdict.
28
+ 3. The blind look (GR5): start a plain fresh agent that did not draw the symbol (not `lazuli-first-look`, whose prompt is for pages) and give it only the path printed as `Blind look sheet:`. That is `sheet.png`, a copy of the sheet in a `lz-<token>` folder outside the project, each tile labeled with its size only. Give it nothing else: not the Brand or the goals, not the name, not the symbol's file name or its `.lazuli/assets/` path. The host may give every subagent the project's instructions (such as CLAUDE.md), its memory and recent commit messages, which Lazuli does not control; keep the brand, the idea and the goals out of those, or the look is not blind. Ask what it sees at 16 and 32 px and whether those are the same mark as the large one. With no subagent, ask the person, or a session that has not seen the work. Report the answer in the agent's words, never as a measure. It is not recorded as data and the effect gate does not count it.
29
+ 4. A hint judged false is noted with evidence, never silenced. To keep a failing rule on purpose, declare it with `break-a-rule` and keep it only after `review-design`. WCAG A and AA norms are fixed, never broken.
30
+ 5. A symbol goal is delivered like a page: `capture` it and run `review-design` (its step runs `check-design --asset` for you); `--asset` measures but is not that review.
31
+
32
+ ## Rule index
33
+ | Ids | Theme |
34
+ |---|---|
35
+ | GI1, GI3 | the idea first, leave the sector's sign |
36
+ | GI2, GI6 | directions at 16 px and large, test where it lives |
37
+ | GI4, GI5 | Brand tokens, palette and type from their own skills |
38
+ | GS1 to GS6 | smallest size first, small version, strokes, flat color, light and dark, no live text |
39
+ | GR1 to GR4 | measured: silhouette, parts, strokes, edge on light and dark |
40
+ | GR5 | the blind look at small sizes |
41
+
42
+ ## What never to say
43
+ Never say the symbol is recognizable, memorable or distinctive, or that an effect was achieved. The CLI measures pixels and geometry; the blind answer is one agent's reading.
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: lazuli-motion-micro-and-transitions
3
+ description: Use when designing or reviewing animation and microinteractions ("the hover feels sluggish", "make the entrances less samey", "does this respect reduced motion?"), such as hover, press and focus feedback, entrances, page and scroll transitions, durations and easing curves, layout jumps, flashing or moving content, and reduced motion.
4
+ ---
5
+
6
+ # Motion: microinteractions and transitions
7
+
8
+ Motion answers something the person did, tells where things came from and went, and stops when the person asks for less. The rules are MI1 to MI6 (`../lazuli/rules/motion/micro.yaml`), MT1 to MT7 (`transitions.yaml`) and the recorded checks MR1 to MR13 (`review.yaml`) in the same folder, after install (in a kit checkout: `rules/motion/`). The cutoffs of MR1 to MR11 are hypotheses with ids H1 to H11 in `HYPOTHESES.md`, so those findings are hints. MR12 and MR13 are WCAG 2.2 norms.
9
+
10
+ Do not use when:
11
+ - the question is the look of a control's states at rest: use `lazuli-ui-states-and-system`;
12
+ - the question is fonts or color: use the matching area skill.
13
+
14
+ ## Create
15
+ 1. For each thing that moves, write in one line what it answers or shows (MI1, MT1). Motion that answers nothing is cut. Log it under a text of its own:
16
+ `lazuli record-decision --decision "Motion answers: <what each movement answers or shows>" --piece "<goal piece>" --goal "<the goal it serves>" --rule "MI1 followed" --measure "<not measured, judged in the filmstrip>"`
17
+ 2. Declare the motion tokens once, as CSS custom properties for a few durations and curves, and use only those names (MI5). Log them:
18
+ `lazuli record-decision --decision "Motion tokens: <the names, their values and what each is for>" --piece "<goal piece>" --goal "<the goal it serves>" --rule "MI5 followed" --measure "<check-design motion.micro-duration and motion.transition-duration>"`
19
+ 3. Choose each entrance by the role of what enters (a heading, a figure, a list, a message), not one fade for all (MT2). Keep a stagger short, since its last item carries the whole delay (MT4). Log it:
20
+ `lazuli record-decision --decision "Entrances by role: <role, movement and curve for each>" --piece "<goal piece>" --goal "<the goal it serves>" --rule "MT2 followed" --measure "<check-design motion.sameness>"`
21
+ 4. Animate `transform` and `opacity` (MI4), ease what moves and reserve the space of what arrives late (MT3, MT5).
22
+ 5. Write a reduced-motion version for every moving part: with `prefers-reduced-motion: reduce` it stops moving and every state still shows (MT6, MI3). Log it:
23
+ `lazuli record-decision --decision "Reduced motion: <what each moving part does instead>" --piece "<goal piece>" --goal "<the goal it serves>" --rule "MT6 followed" --measure "<check-design motion.reduced>"`
24
+ 6. Run `check-design <target> --area motion`. The post-edit hook does not record motion (each recording takes seconds), so this run is yours to make after motion work.
25
+
26
+ The same decision text on the same piece replaces the earlier entry, so each line above has its own text.
27
+
28
+ ## Review
29
+ 1. Measure: `check-design <target> --area motion`. Quote MR1 to MR10 with their hypothesis ids and these limits: motion is recorded at the first width of the run only, on this machine; only the first view is read, so a flash or a ticker lower down the page, or shown only after a scroll, is not seen, and a pass on MR12 or MR13 covers the first view only; durations come from the page's own animations, so motion driven by script is seen from frames only, with no duration; each timing is judged within a small tolerance, named in the report; and an iframe from another host on a local page is not filtered by the recorder's request blocking, so a hover over a control it covers can reach that frame.
30
+ 2. On a page that is not local the recorder only loads, hovers, focuses and scrolls. It never clicks, types, selects or submits there. Clicks on disclosure controls happen only on a local page.
31
+ 3. Open `filmstrip.png`, written under `.lazuli/motion` in a folder named for the target (the report prints its path as `Frames for review:`): one row for the load window and one for each step that changed the screen. Judge MR11 as a reviewer, in words: what each movement explains and whether it belongs to the brand. Name the movements. The CLI never calls motion smooth, delightful or on brand, and neither do you from a clean report.
32
+ 4. MR12 (flashing) and MR13 (moving content with no way to pause) are norms. A fail blocks delivery and a break never waives it: fix it, for example with a visible pause control reachable before the moving content. MR13 passes with a note when a control named with a pause word exists: whether it really pauses that content is not read, so check it. When flashes over the limit involve movement, the report gives a hint to check the frames by eye, never a verdict: look at the filmstrip and say what you saw.
33
+ 5. A hint judged false is noted with its evidence, not silenced by changing the page. Hints never block.
34
+ 6. A kept break goes through `break-a-rule` and is kept only after `review-design`, and for that review open the filmstrip path that the motion report prints (`Frames for review: <path>`) and attach that file to the review, since the capture does not carry it.
35
+
36
+ ## Reading the report
37
+ | Measure | Rule | A finding means |
38
+ |---|---|---|
39
+ | motion.micro-duration | MR1 | a hover, focus or click animation outlasts the cutoff (H1) |
40
+ | motion.transition-duration | MR2 | an entrance or transition, stagger included, outlasts the cutoff (H2) |
41
+ | motion.easing, motion.properties | MR3, MR4 | a finite move runs at constant speed, or a layout property is animated |
42
+ | motion.sameness | MR5 | every entrance is one animation |
43
+ | motion.long-frames, motion.layout-shift, motion.settle | MR6 to MR8 | frozen frames, a page that jumps, a screen that keeps changing |
44
+ | motion.banding | MR9 | a gradient shows flat bands |
45
+ | motion.reduced | MR10 | something still moves with reduced motion asked for |
46
+ | motion.flashes, motion.moving | MR12, MR13 | norms: flashing, or moving content with no pause control |
47
+
48
+ ## What never to say
49
+ Never say the motion is smooth, feels good, is on brand or that an effect was achieved. The report lists what was recorded and the reviewer judges the rest.
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: lazuli-typography-choose-and-pair
3
+ description: Use when type must be chosen or paired before a page exists ("which fonts should this site use", "pick a heading and body font", "type scale for a new brand", "give this product a typographic voice").
4
+ ---
5
+
6
+ # Choosing and pairing type
7
+
8
+ Type is a decision about the effect on people, made before the form. Letterforms carry a voice before the words are read. This skill goes from intent to a small, defensible type system. The rules (TC1 to TC5) are in `../lazuli/rules/typography/create.yaml` after install (in a kit checkout: `rules/typography/create.yaml`). The numeric limits are hypotheses, listed in `../lazuli/rules/typography/HYPOTHESES.md`: hints, never verdicts.
9
+
10
+ Do not use when:
11
+ - a page already renders and its type needs judging: use `lazuli-typography-screen-review`;
12
+ - the question is about color: use the color skills.
13
+
14
+ ## Procedure
15
+ 1. Read `LAZULI.md` (`## Brand`, `## Audience`, `## Language`, `## Goals`). Without a goal, run `set-goals` first (TC1).
16
+ 2. Write the voice in three adjectives and one sentence about what the reader should feel in the first second. Find the idea before the form: what would this voice look like if it were printed, carved or spoken?
17
+ 3. Name two or three real alternatives, each with the voice it carries and what it gives up. Choose one. Say why the others lose, in one line each (TC1).
18
+ 4. Pair by contrast of structure, with one family leading and one supporting. Name the difference you are using. If you cannot name it, drop the second family (TC4).
19
+ 5. Count the families and give each a job. Add weights before adding families (TC2).
20
+ 6. Build the scale: pick the base size for the real device and distance, then the steps, each with one role and clearly different from its neighbor (TC5, TC3).
21
+ 7. Check the language: the candidate fonts must cover the accents of the project language (TA2).
22
+ 8. Hand over the system (families, sizes, weights, roles) and the one move that gives the page character (see below).
23
+
24
+ ## One award-level move
25
+ A system with no point of view is a template. Take one move from a rule's `break_effect` and commit to it. Examples: a display size so large and tight that the headline becomes the image (breaks TR2 for impact); a single family used alone, with weight as the only contrast (breaks TC4); one family in two voices, such as a serif at text size and the same serif in a loud cut for titles. State the effect you want, then check it on the render with `lazuli-typography-screen-review`.
26
+
27
+ ## When to break each rule
28
+ | Rule | Break it when | Effect |
29
+ |---|---|---|
30
+ | TC1 | the brand already owns its type | trust through continuity |
31
+ | TC2 | the piece is a specimen or a collage | a gallery of voices |
32
+ | TC3 | a dense tool, or a one-size page | calm, exact uniformity |
33
+ | TC4 | one superfamily, or one family alone | one coherent voice |
34
+ | TC5 | captions and legal text, or a hero lead | the size sets the rank of the message |
35
+ Log a deliberate break with the `break-a-rule` procedure of the `lazuli` skill.
36
+
37
+ ## Expected output
38
+ ```
39
+ Voice: exact, calm, a little old-fashioned (a notary office)
40
+ Alternatives: sturdy text serif (gives up modern) | neutral grotesque (gives up warmth) | slab (too loud)
41
+ Choice: serif for titles and text, mono for fees. Reason: TC1, contrast of structure with the mono (TC4).
42
+ Scale: 16, 20, 28, 44 px, one role each (TC3). Families: 2 (TC2). Accents covered (TA2).
43
+ Move: a 64 px title at line height 1 that carries the page; check with the review skill.
44
+ ```
45
+
46
+ ## Common errors
47
+ - Choosing from a list of favorites, then inventing a reason (TC1).
48
+ - Two grotesques that differ by a hair (TC4).
49
+ - A scale of 15, 16, 17 and 18 px (TC3).
50
+ - Picking the font in a mock and never rendering real Portuguese words (TA2).
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: lazuli-typography-screen-review
3
+ description: Use when a page, mock or component already exists and its type needs judging or fixing ("the text is hard to read", "check the line length and line height", "is my font actually loading", "headline wraps badly", "check the Portuguese version", "the accents look wrong").
4
+ ---
5
+
6
+ # Typography review on a finished screen
7
+
8
+ The most common mistake is judging type from the CSS instead of the result. A font that fails to load keeps the layout and loses the voice, and the code looks right. This skill measures the render. The rules are TR1 to TR5 (`../lazuli/rules/typography/review.yaml`), TC2, TC3 and TC5 (`../lazuli/rules/typography/create.yaml`) and TA1, TA2 (`../lazuli/rules/typography/adapt.yaml`) after install (in a kit checkout: `rules/typography/`). Numeric limits are hypotheses (`HYPOTHESES.md` in the same folder): the report shows hints, never verdicts.
9
+
10
+ Do not use when:
11
+ - no page exists yet and fonts must be chosen: use `lazuli-typography-choose-and-pair`;
12
+ - the question is about color or contrast: use `lazuli-color-screen-review`.
13
+
14
+ ## Procedure
15
+ 1. Render and measure: `check-design <target> --area typography --width 1440,390`. Without a render, the review does not start.
16
+ 2. Read the fallbacks first (TR3). If the declared font is not the one rendered, fix that before judging anything else, because every other opinion is about the wrong font.
17
+ 3. Read the blocks: line length (TR1), line height (TR2), body size (TC5), the scale (TC3), the families (TC2), the headings (TR4, TR5). Quote the measured numbers; do not estimate.
18
+ 4. Look at the render itself. A number inside the range can still read wrong, and a number outside can be a deliberate move. Decide which it is.
19
+ 5. For a translated page, run TA1 and TA2 on the target language with real words and accents.
20
+ 6. Report each problem with the rule id, the measured evidence and a fix with a value.
21
+ 7. Fix, render again, measure again. The review closes only on the second render.
22
+
23
+ ## One award-level move
24
+ Do not stop at a clean report. Ask what the page would say if one rule were broken on purpose, and offer it as a choice: a huge, tight headline (TR2 break), a very short measure for a poem-like intro (TR1 break), a kicker smaller than the title that still ranks above it (TR4 break), or a last word left alone as a punchline (TR5 break). Each is a break with a declared effect, logged with `break-a-rule`, and checked on the render.
25
+
26
+ ## Reading the report
27
+ | Measure | Rule | A finding means |
28
+ |---|---|---|
29
+ | type.fallback | TR3 | the first declared family did not paint |
30
+ | type.line-length | TR1 | a block of 3 lines or more outside the candidate range (a block of fewer than 135 characters in all is a caption and is not judged) |
31
+ | type.line-height | TR2 | a multi-line block outside the candidate range |
32
+ | type.body-size | TC5 | body text outside the candidate range |
33
+ | type.scale, type.families | TC3, TC2 | two sizes too close, or many families |
34
+ | type.hierarchy | TR4 | a higher heading level renders smaller than a lower one |
35
+ | type.heading-rag | TR5 | a headline ends on one word |
36
+ Findings from hypothesis rules are hints: say so.
37
+
38
+ ## Expected output
39
+ ```
40
+ Page: /pricing (1440 and 390)
41
+ TR3: h1 asks for "Satoshi", rendered Arial. Fix: font file path and font-display.
42
+ TR1: 2 paragraphs at 128 characters per line at 1440. Fix: max-width 66ch.
43
+ TR5: h1 wraps to a last line with one word at 390. Fix: text-wrap: balance.
44
+ After the fix: measured again? yes, 0 hints.
45
+ ```
46
+
47
+ ## Common errors
48
+ - Judging the type before checking that the right font rendered (TR3).
49
+ - Treating a hypothesis hint as a failure.
50
+ - Fixing line length on desktop and not on the 390 px width.
51
+ - Testing a translation with the source copy (TA1).
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: lazuli-ui-composition
3
+ description: Use when composing a page or landing as one composition instead of stacked blocks from a template, choosing composition moves and which grid the layout uses (and why), writing a rhythm map for the scroll, or sketching layout options before code.
4
+ ---
5
+
6
+ # Composing a page as a whole
7
+
8
+ A page is one composition from the idea, not a column of blocks that were filled in. This skill is for the moment before code. The moves are UC1 to UC8 (`../lazuli/rules/ui/compose.yaml`), the grid rules are UG1 to UG3 (`../lazuli/rules/ui/grid.yaml`) and the numbers behind the checks are hypotheses (`../lazuli/rules/ui/HYPOTHESES.md`), after install (in a kit checkout: `rules/ui/`). Read the rule text there; this file gives the order of work.
9
+
10
+ Do not use when:
11
+ - a page already renders and needs judging: use `lazuli-ui-layout-review`;
12
+ - the question is only about color or type: use the color or typography skills.
13
+
14
+ ## Procedure
15
+ 1. Say the idea of the piece in one sentence, from the goal in `LAZULI.md` (`set-goals` first if there is none). Every choice below serves that sentence.
16
+ 2. The grid is chosen in the options step (5), because the options may vary it: modular, asymmetric or broken on purpose (UG1). Do not log it yet. `show-options` logs it once, after the choice, under its own decision text with the UG id it follows, naming the idea and the rejected alternatives. A framework's default container counts only when logged with its reason (UG2).
17
+ 3. Pick moves from `compose.yaml` by their `works_when` (UC1 to UC8). Read each move's `excess_when` and stop before it. Take the few the idea needs; a page that uses every move tends to be the same page again.
18
+ 4. Write the rhythm map before building: one `Rhythm:` line in the goal, one beat per section from top to bottom (`breathe`, `steady`, `accelerate`, `climax`), exactly one `climax`. Change it through `set-goals`, never by hand-editing `LAZULI.md`. The check later reads it (UR5, UR6).
19
+ 5. Explore before code with `show-options` (`../lazuli/procedures/show-options.md`): 6 to 9 compositions from `references/option-template.html`, rendered into one contact sheet with `render-options <folder> --width 1440` (the template canvas is one first view, 1440 px wide; `--width 390` with a 390 px body when `## Audience` names a phone). Show them; the person or the delegate choice picks.
20
+ 6. Build the chosen one, then run `check-design <target> --area ui --width 1440,768,390` and hand over to `lazuli-ui-layout-review`.
21
+
22
+ ## Breaking on purpose
23
+ Choosing a grid or a move follows a rule: log it with `record-decision` as followed. Two cases are breaks and go through `break-a-rule` first:
24
+ - a move pushed past its `excess_when` (any of UC1 to UC8);
25
+ - an element that leaves the grid on purpose (UG3): name the line or field it breaks and the effect.
26
+ Declare the break with its effect, build, run `review-design`, and log the decision with `--rule "<id> broken"` only after the break is kept (`record-break --status kept`). A break logged before the review has no check behind it.
27
+
28
+ ## Reading the contact sheet
29
+ Each thumbnail carries two lines under its file name (three on a crop). The first reads like `scale 2.4x text, 5x area; empty 62%, spread 0.4; focal #big 1.8x at (0.12, 0.3)`:
30
+ - `scale`: the size contrast of the biggest text against the body text (`x text`), and of the biggest block against the typical block (`x area`);
31
+ - `empty`: the share of the first view left empty; `spread`: how unevenly that empty space is spread across it (low means even, so it reads as leftovers);
32
+ - `focal`: the strongest block, how many times larger it is than the next, and where its center sits in the first view.
33
+ The second line is `no hints`, or names the rules whose check did not pass on that option, like `hints UR2, UR3` (and `fails LR3; hints UR2` when a project rule failed: a failure is never hidden). When the option canvas is wider than the width it was rendered at, a third line says the view is a crop and its bleeds are not meaningful. Look an id up with `list-rules --area ui` to read the rule and its hypothesis id (the cutoff behind the hint lives in `HYPOTHESES.md`). In a `check-design` report the same hint reads `(hypothesis H3, ui)`: the ui area, cutoff hypothesis H3, a starting value not yet tested with people. Say it is a hint, never a failure.
34
+ The sheet never ranks options and never picks a best one. Tension between options (what pulls against what) is named in words by whoever looks, not computed. The measures describe; the choice is a judgment about the idea.
35
+
36
+ ## Common errors
37
+ - Starting from sections and filling them, then adding moves on top.
38
+ - Using the moves as a template: the same three moves on every page.
39
+ - Logging the grid as followed when it was only the framework default (UG2).
40
+ - Logging a pushed move as followed instead of declaring the break.
41
+ - Writing the rhythm map after the page, so it describes what happened and not what was chosen.
42
+ - Saying a measure shows the page "works": the measures only describe the first view and the sequence.
@@ -0,0 +1,34 @@
1
+ <!doctype html>
2
+ <html lang="en"><head><meta charset="utf-8"><title>Option, one composition</title>
3
+ <!-- A format, not a layout. One option is one composition on one canvas: the first view only, 900 px tall.
4
+ The canvas is 1440 px wide by default (render-options --width 1440). When the audience in LAZULI.md
5
+ names a phone as the main device, set body to 390px wide and render with --width 390.
6
+ Read each option at its own canvas width only: a narrower width shows a crop.
7
+ The blocks below are only declared, stacked in source order with no positioning. Each option decides
8
+ where they go (and which to drop or repeat) with a composition move, and sets its own sizes.
9
+ The measurer reads each block's box: give title and text blocks their own width, or they count as full-width.
10
+ Mark each block with data-block. The kinds the measurer reads:
11
+ title the main heading or a huge word or number (its font size counts for scale)
12
+ text running copy (the longest one sets the body size)
13
+ image a picture or a gray box standing for one
14
+ action a button or link
15
+ figure a diagram, chart or number set apart
16
+ space a deliberate gap you want to see; it is left out of coverage and only named in notes
17
+ Use real headline text from the brief, not "Lorem ipsum". Two grays at most, so the sheet shows
18
+ structure, not palette. -->
19
+ <style>
20
+ html, body { margin: 0; }
21
+ body { font-family: sans-serif; width: 1440px; /* 390px for a phone audience */ height: 900px; overflow: hidden; background: #fff; color: #444; }
22
+ [data-block] { margin: 0; }
23
+ [data-block="title"] { font-size: 32px; }
24
+ [data-block="text"] { font-size: 16px; }
25
+ [data-block="image"], [data-block="figure"] { width: 80px; height: 40px; background: #bbb; }
26
+ </style></head>
27
+ <body>
28
+ <h1 data-block="title">Headline from the brief</h1>
29
+ <p data-block="text">Copy from the brief.</p>
30
+ <div data-block="image"></div>
31
+ <a data-block="action" href="#">Action label</a>
32
+ <div data-block="figure"></div>
33
+ <div data-block="space"></div>
34
+ </body></html>
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: lazuli-ui-layout-review
3
+ description: Use when a rendered page needs its layout judged as a composition ("does the scroll have rhythm and a climax", "is this layout just the default", "how far is it from a generic template"), checking crossings, empty space and focal point.
4
+ ---
5
+
6
+ # Reviewing the composition of a rendered page
7
+
8
+ A page can pass every check and still look like what any tool would make for the same brief. This skill reads the render as a composition: the first view, the sequence down the scroll and the distance from the default. The rules are UR1 to UR8 (`../lazuli/rules/ui/review.yaml`), with UC1 to UC8 and UG1 to UG3 as the choices they review (`compose.yaml`, `grid.yaml` in the same folder), after install (in a kit checkout: `rules/ui/`). Every cutoff is a hypothesis in `HYPOTHESES.md`: the report gives hints, never verdicts.
9
+
10
+ Do not use when:
11
+ - no page exists yet: use `lazuli-ui-composition`;
12
+ - the question is contrast, type or accessibility: use the matching area skill.
13
+
14
+ ## Procedure
15
+ 1. Render and measure: `check-design <target> --area ui --width 1440,768,390`. Without a render the review does not start.
16
+ 2. Read `layout` in the report: the focal block (UR3), the empty cells of the first view (UR2), blocks that bleed off the page, and elements that cross a section edge. A bleed or a crossing is often a chosen move (UC1, UC3, UC7), so ask which it is before calling it a problem.
17
+ 3. Read `rhythm`: the sections found, the steps between them (height and density) and where the climax falls (UR4 to UR6). Compare with the `Rhythm:` line of the goal.
18
+ 4. If the measured sections do not match the page's real sections (a wrapper counted as one, two sections merged), mark them with `data-section` on each real section and measure again. Never judge a rhythm read from the wrong sections.
19
+ 5. Distance from default (UR7). Have a fresh subagent get only the brief (no kit, no `LAZULI.md`, no conversation) and build a baseline page into `.lazuli/baseline/<piece>.html`. Tell it not to use any Lazuli skill. A host where the kit is installed may still load it, so call the baseline approximate. On a host without subagents, ask the person for a baseline made in a separate session without the kit; with none, report distance from default as not measured. Then run `compare-designs <target> --baseline .lazuli/baseline/<piece>.html --width 1440,390`.
20
+ 6. Quote the distance as hypothesis H1 with its parts. It is a measurement of structure, not a verdict: a small distance asks "what did this page decide?", a large one asks "is that distance the idea or a mistake?". Say what you looked at yourself.
21
+ 7. A piece meant for an award: read the jury's published criteria and paraphrase each one in the review (UR8). A piece with none in view skips this.
22
+ 8. A move pushed past its `excess_when`, or a grid broken on purpose, is declared with `break-a-rule` and kept only after `review-design`; the `broken` decision is logged after that. A normal grid choice is logged with `record-decision` as followed.
23
+
24
+ ## Reading the report
25
+ | Measure | Rule | A finding means |
26
+ |---|---|---|
27
+ | layout.scale-contrast | UR1 | neither the biggest text nor the biggest block stands out in the first view |
28
+ | layout.empty-space | UR2 | empty space is spread evenly, so it reads as leftovers |
29
+ | layout.focal-point | UR3 | no block leads the first view |
30
+ | layout.grid | UG2 | every section sits between the same centered edges (judged at 768 px and wider) |
31
+ | rhythm.pace | UR4 | sections do not change pace |
32
+ | rhythm.map | UR5 | sections do not follow the declared map, or there is none |
33
+ | rhythm.climax | UR6 | the largest-type section is far from the declared climax |
34
+ A hint id like `hypothesis H3, ui` names the cutoff's hypothesis in `HYPOTHESES.md`. Say it is a hint.
35
+
36
+ ## Closing checklist
37
+ - Rendered at three widths and measured again after every fix.
38
+ - Each hint answered: fixed, or chosen and logged, or a break declared.
39
+ - Distance from default measured against a no-kit baseline, or said to be not measured.
40
+ - Jury criteria paraphrased when an award is the target.
41
+ - Nothing claimed about effect: the measures describe structure only.
42
+
43
+ ## Common errors
44
+ - Reading a rhythm from a page whose sections were counted wrong.
45
+ - Treating a hint as a failure, or a small distance as proof the page is bad.
46
+ - Building the baseline with the kit loaded, then reporting it as clean.
47
+ - Logging a broken decision before the break was kept after review.
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: lazuli-ui-states-and-system
3
+ description: Use when designing or reviewing component states (hover, focus, pressed, disabled, loading, empty, error, success) and checking that components look the same across the screens of one product.
4
+ ---
5
+
6
+ # Component states and the system
7
+
8
+ Every component is designed in each state it can be in, and the same component looks the same on every screen. The rules are US1 to US11 (`../lazuli/rules/ui/states.yaml`) and UR9 to UR15 (`review.yaml` in the same folder), after install (in a kit checkout: `rules/ui/`). Their hypotheses are in `HYPOTHESES.md`: H9 to H14 are measured; H15 is staged and reviewed. The report gives hints, never verdicts.
9
+
10
+ Do not use when:
11
+ - the question is the composition of the page: use `lazuli-ui-composition` or `lazuli-ui-layout-review`;
12
+ - the question is contrast or the focus norm alone: use the matching area skill.
13
+
14
+ ## Create
15
+ 1. Design the default state first, from tokens (US1). Per kind, list the states it needs (US2 to US9): hover, focus, pressed, disabled, loading, empty, error, success.
16
+ 2. Focus is a norm measured by AO1 (a11y.focus-visible); US3 adds the design part: from the brand, and different from hover. A failed AO1 is fixed, never broken.
17
+ 3. Mark repeated components with `data-component` when their text does not name them (two links with the same text in header and footer), so US10 can match them. The name is used only to match it across screens: it stays a button, link or field for the state checks and the count of looks.
18
+ 4. Choose a small set of variants per kind (US11) and log each kind under its own decision text. The same text on the same piece replaces the earlier entry, so each kind needs its own:
19
+ `lazuli record-decision --decision "Buttons: <the variants and their jobs>" --piece "<goal piece>" --goal "<the goal it serves>" --rule "US11 followed" --measure "<what check-design counted>"`
20
+ `lazuli record-decision --decision "Fields: <the variants and their jobs>" --piece "<goal piece>" --goal "<the goal it serves>" --rule "US11 followed" --measure "<what check-design counted>"`
21
+
22
+ ## Review
23
+ 1. Measure: `check-design <page> --area ui --width 1440,390`. Read `states` (UR9 to UR12): hover and pressed that leave a control unchanged, a disabled or invalid look equal to its enabled or valid peer. `--json` has `present`: `present` counts state markers in the render (disabled, aria-invalid, aria-busy, role=alert, role=status, progressbar); a count says a marker exists, not that the state is designed.
24
+ 2. Say what forced states cannot see: a hover made by a script, or styled on a parent, a pressed look written for `:hover:active`, and a hover or press shown only by an animation (looks are read at rest, running animations finished or stopped). Point at each listed control yourself.
25
+ 3. A hint judged false (a disabled look carried by a faded parent, UR11): note it in the review with the evidence. Do not change the page to silence a hint. Hints never block.
26
+ 4. Loading, empty, error and success (US6 to US9, UR15) usually need app data: the CLI cannot produce them. `check-design` and `capture` open a URL or file and never click, so each staged state needs its own URL or file (a query string, a fixture, a story, a dev flag). Run `check-design` and `capture` on each staged render and have the reviewer judge the captures. A state the app cannot produce, or one that needs a click, is reported as not checked, with the reason. A stand-in page you built is called a stand-in, never the product's state.
27
+ 5. Coherence (UR13, UR14): `check-design <page> --site` (the `Target` lines of `LAZULI.md`) or list the screens: `check-design <home> <about> <pricing> --area ui --width 1440`. Quote each divergent component by its signature, with the property and its value on each screen. A wrong match (two components read as one, or one split in two) is fixed with `data-component`, then measured again.
28
+ 6. A difference kept on purpose (a campaign screen) is declared with `break-a-rule` and kept only after `review-design`; the `broken` decision is logged after that. More looks than UR14 allows is a question: was each chosen and logged?
29
+
30
+ ## Reading the report
31
+ | Measure | Rule | A finding means |
32
+ |---|---|---|
33
+ | states.hover | UR9 | a control looks the same under forced `:hover` |
34
+ | states.active | UR10 | a control looks the same under forced `:active` |
35
+ | states.disabled | UR11 | a disabled control looks like an enabled peer |
36
+ | states.invalid | UR12 | an invalid field looks like a valid one |
37
+ | coherence.same-component | UR13 | a component differs between screens |
38
+ | coherence.variants | UR14 | a kind has more looks than the cutoff |
39
+ A hint id like `hypothesis H13, ui` names the cutoff's hypothesis. Say it is a hint.
40
+
41
+ ## Closing checklist
42
+ - Each kind has its states designed, and focus passes AO1.
43
+ - Variants logged per kind, each under its own decision text.
44
+ - Forced-state hints answered, with what they cannot see said.
45
+ - Loading, empty, error and success staged and captured, or reported as not checked.
46
+ - Coherence run on every screen of the product, or on the screens named.
47
+ - Nothing claimed about effect: the measures describe looks only.
48
+
49
+ ## Common errors
50
+ - Calling a forced-state hint a failure, or changing the page to silence a false one.
51
+ - Approving from the default render with no word on the four staged states.
52
+ - Presenting a stand-in page as the product's state.
53
+ - Logging two kinds under one decision text, so the second replaces the first.
54
+ - Breaking AO1 instead of fixing the focus look.