@uselazuli/cli 0.0.0-stage → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/CHANGELOG.md +120 -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 +747 -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 +19 -0
  22. package/rules/content/_area.yaml +8 -0
  23. package/rules/content/review.yaml +378 -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 +18 -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 +271 -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 +246 -0
  50. package/rules/ui/grid.yaml +75 -0
  51. package/rules/ui/review.yaml +400 -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 +183 -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 +36 -0
  64. package/skills/lazuli/procedures/show-options.md +33 -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 +40 -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 +45 -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 +162 -0
  88. package/src/commands/capture.mjs +313 -0
  89. package/src/commands/catalog.mjs +37 -0
  90. package/src/commands/check-design.mjs +463 -0
  91. package/src/commands/check-goals.mjs +57 -0
  92. package/src/commands/compare-designs.mjs +160 -0
  93. package/src/commands/draft-memo.mjs +162 -0
  94. package/src/commands/hooks.mjs +345 -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 +325 -0
  101. package/src/commands/record-task.mjs +250 -0
  102. package/src/commands/render-options.mjs +227 -0
  103. package/src/commands/start-project.mjs +32 -0
  104. package/src/measure/a11y.mjs +391 -0
  105. package/src/measure/asset.mjs +206 -0
  106. package/src/measure/at-rest.mjs +49 -0
  107. package/src/measure/cases.mjs +566 -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 +86 -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 +522 -0
  117. package/src/measure/in-page/color.js +348 -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 +377 -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 +171 -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 +269 -0
  130. package/src/measure/in-page/weight.js +207 -0
  131. package/src/measure/layout.mjs +100 -0
  132. package/src/measure/motion.mjs +509 -0
  133. package/src/measure/piece.mjs +195 -0
  134. package/src/measure/registry.mjs +253 -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 +168 -0
  149. package/src/project/lazuli-md.mjs +521 -0
  150. package/src/project/log.mjs +335 -0
  151. package/src/project/match.mjs +200 -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 +227 -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 +133 -0
  159. package/src/report/evaluators/content.mjs +112 -0
  160. package/src/report/evaluators/extreme.mjs +87 -0
  161. package/src/report/evaluators/forms.mjs +116 -0
  162. package/src/report/evaluators/layout.mjs +103 -0
  163. package/src/report/evaluators/motion.mjs +280 -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 +166 -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 +274 -0
  177. package/src/rules/public-text.mjs +56 -0
  178. package/src/rules/schema.mjs +220 -0
  179. package/templates/LAZULI.md +88 -0
@@ -0,0 +1,257 @@
1
+ # Component states and the system. Every component is designed in each state it can be in,
2
+ # and the same component looks the same on every screen of one product. The CLI renders
3
+ # the default page only: hover, focus, pressed, disabled and invalid can be read from it, while
4
+ # loading, empty, error and success need app data, so the agent stages them and the reviewer judges them.
5
+
6
+ - id: US1
7
+ name: The default state is the base look, built from tokens
8
+ area: ui
9
+ moment: create
10
+ skill: lazuli-ui-states-and-system
11
+ rule: >-
12
+ Design the default (enabled, at rest) look of each component first, from the project's tokens for color, type, radius and spacing. Every other state starts from it and changes only a few properties (a background, a border, a text color), so the component stays recognizable in all of them.
13
+ why: >-
14
+ When states are swaps of a few tokens on one base, the person reads them as the same control changing, not as a different control; states drawn one by one drift apart and the component loses its identity.
15
+ origin: source
16
+ source: >-
17
+ Carbon Design System, Button style, https://carbondesignsystem.com/components/button/style/ (sections "interactive state color" per variant, opened 2026-11-25): the base tokens give the enabled look, and hover, focus, active and disabled each swap a few tokens of it (a background token, a focus border, the label and icon tokens). That this keeps the control recognizable and that states drawn one by one drift apart is our claim.
18
+ when_to_break: >-
19
+ A component whose state is its whole message (a toggle that flips from off to on, a selected tab) may change more than a few properties, declared with break-a-rule first.
20
+ break_effect: >-
21
+ The change itself becomes the signal, so the person notices the switch at once, at the cost of the two looks reading less clearly as one component.
22
+ test: >-
23
+ The reviewer checks that the default look uses the project's tokens and that each other state differs from it in a few properties only. check-design reports the forced hover and pressed looks against the default on the rendered page.
24
+ example: >-
25
+ A button whose default uses the brand color token and the medium radius token; hover darkens only the background token, and every other property stays.
26
+ counterexample: >-
27
+ A hover look with a new radius, a new font weight, a shadow and a different color, so the button seems to turn into another control under the pointer.
28
+
29
+ - id: US2
30
+ name: Hover answers the pointer without losing contrast
31
+ area: ui
32
+ moment: create
33
+ skill: lazuli-ui-states-and-system
34
+ rule: >-
35
+ Give every control a hover look that changes something visible on the control itself, and keep the hovered look within the contrast minimums of RV2. Do not carry meaning only in hover: anything the person needs must also be there without a pointer.
36
+ why: >-
37
+ Hover tells a pointer user that the thing under the cursor responds before they commit; touch and keyboard users never see it, so it can confirm but never inform.
38
+ origin: source
39
+ source: >-
40
+ W3C, Understanding SC 1.4.11 Non-text Contrast, https://www.w3.org/WAI/WCAG22/Understanding/non-text-contrast.html (section on hover, opened 2026-11-25): author hover styles are supplemental and need no 3:1 ratio, but a hover effect must not make the component lose contrast against adjacent colors. Carbon Design System, Button style, https://carbondesignsystem.com/components/button/style/ (sections "interactive state color", opened 2026-11-25): every button variant has a hover token. That every control needs a visible hover, that touch and keyboard users never see it, and that meaning must not live only in hover are our claim.
41
+ when_to_break: >-
42
+ A dense list where every row is a control (a table, a file list) may hover the row instead of each control in it, declared with break-a-rule first.
43
+ break_effect: >-
44
+ The screen stays calm under a moving pointer, and the row becomes the unit the person acts on.
45
+ test: >-
46
+ check-design forces :hover on the rendered controls and lists those whose look did not change (UR9 reads the result). The reviewer checks that a hover made by a script or styled on a parent works by pointing at it.
47
+ example: >-
48
+ A link that gains an underline and a button whose background darkens one step under the pointer.
49
+ counterexample: >-
50
+ A button that looks exactly the same under the pointer, or one whose label fades to the background color on hover.
51
+
52
+ - id: US3
53
+ name: Focus looks like the brand and differs from hover
54
+ area: ui
55
+ moment: create
56
+ skill: lazuli-ui-states-and-system
57
+ rule: >-
58
+ The norm that keyboard focus is visible is AO1 (a11y.focus-visible), checked by the accessibility area; this rule adds the design part. Draw the focus indicator from the brand (its color token, its line weight, its radius), keep it within the contrast minimum RV2 gives interface components, and make it differ from the hover look, so a person moving with the keyboard and a pointer at once can tell which control is focused.
59
+ why: >-
60
+ A focus ring that looks like the brand reads as designed rather than as a browser default left behind, and one that differs from hover keeps two different facts (where the keyboard is, where the pointer is) from merging into one signal.
61
+ origin: source
62
+ source: >-
63
+ Carbon Design System, Button style, https://carbondesignsystem.com/components/button/style/ (sections "interactive state color", opened 2026-11-25): focus adds a focus border token with an inset on most variants, while hover swaps the background token, so the two states use different properties. W3C, Understanding SC 1.4.11 Non-text Contrast, https://www.w3.org/WAI/WCAG22/Understanding/non-text-contrast.html (section on focus visible, opened 2026-11-25): a focus indicator needs contrast against the adjacent background. That the indicator should come from the brand and that a focus look shared with hover merges two signals are our claim.
64
+ when_to_break: >-
65
+ A product may use the browser's own focus ring on purpose (an internal tool, a plain document), declared with break-a-rule first; AO1 still applies and is never broken.
66
+ break_effect: >-
67
+ The page feels native to the platform instead of branded, which suits tools where the person expects the system look.
68
+ test: >-
69
+ check-design runs AO1 (a11y.focus-visible) for the norm. The reviewer compares the focused look with the hover look of the same control in a capture and checks they differ and that the focus look uses brand tokens.
70
+ example: >-
71
+ A 2 px ring in the brand accent, offset from the button, while hover only darkens the fill.
72
+ counterexample: >-
73
+ The same darker fill for hover and for focus, so a keyboard user cannot tell focus from a resting pointer.
74
+
75
+ - id: US4
76
+ name: The active (pressed) state shows the press landed
77
+ area: ui
78
+ moment: create
79
+ skill: lazuli-ui-states-and-system
80
+ rule: >-
81
+ Give every button and pressable control an active (pressed) look, distinct from hover, that appears while it is pressed: a deeper fill, an inset, a small shift. It confirms the press at the moment it happens, before any result arrives.
82
+ why: >-
83
+ The press is the moment the person commits; a visible answer at that instant tells them the control took it, which matters most when the result takes time.
84
+ origin: source
85
+ source: >-
86
+ Carbon Design System, Button style, https://carbondesignsystem.com/components/button/style/ (sections "interactive state color", opened 2026-11-25): primary, secondary and danger buttons swap to an active background token, distinct from the hover token. Nielsen Norman Group, "Progress Indicators Make a Slow System Less Insufferable", https://www.nngroup.com/articles/progress-indicators/ (opening section, published 2014-10-26, opened 2026-11-25): show a visual response as soon as the person acts. That this applies to every pressable control is our claim.
87
+ when_to_break: >-
88
+ A control whose result appears instantly and in place (a checkbox ticking, a switch flipping) may let the result itself be the answer, declared with break-a-rule first.
89
+ break_effect: >-
90
+ The interface feels lighter, with one change per action instead of two.
91
+ test: >-
92
+ check-design forces :active on the rendered controls and lists those whose look did not change (UR10 reads the result). The reviewer checks the pressed look differs from the hover look.
93
+ example: >-
94
+ A button whose fill goes one step darker than its hover fill while pressed.
95
+ counterexample: >-
96
+ A button with a hover color and no pressed look, so a slow click gives no sign it was taken.
97
+
98
+ - id: US5
99
+ name: Disabled looks unavailable, stays readable, says why
100
+ area: ui
101
+ moment: create
102
+ skill: lazuli-ui-states-and-system
103
+ rule: >-
104
+ Prefer keeping a control enabled and explaining what is missing when it is used. When a control must be disabled, make it look unavailable, keep its label readable (the norm behind RV2, WCAG 1.4.3, exempts text in disabled controls from the contrast minimum; keeping it readable is our claim), and say on the page why it is disabled and what makes it available.
105
+ why: >-
106
+ A disabled control tells the person they cannot act but not why; a faded label that cannot be read hides even what the control was, so they are left guessing what to change.
107
+ origin: source
108
+ source: >-
109
+ GOV.UK Design System, Button, https://design-system.service.gov.uk/components/button/ (section "Disabled buttons", opened 2026-11-25): disabled buttons have poor contrast and can confuse some users, so avoid them unless research shows they help. W3C, Understanding SC 1.4.3 Contrast (Minimum), https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html (section "Inactive User Interface Components", opened 2026-11-25): text in inactive components is exempt from the contrast requirement. WAI-ARIA 1.2, https://www.w3.org/TR/wai-aria-1.2/ (section "aria-disabled state", opened 2026-11-25): a disabled element is "perceivable but disabled, so it is not editable or otherwise operable". That the label should stay readable although the norm exempts it, and that the page should say why, are our claim.
110
+ when_to_break: >-
111
+ A control that is unavailable for a reason the whole screen already states (a form step not reached yet, shown by the progress of the form) may stay disabled without its own explanation, declared with break-a-rule first.
112
+ break_effect: >-
113
+ The screen stays quieter, and the person reads the sequence of the form instead of one note per control.
114
+ test: >-
115
+ check-design compares disabled controls on the rendered page with an enabled control of the same kind and lists those that look the same as the enabled one (UR11 reads the result). The reviewer checks the label stays readable and that the page says why the control is disabled.
116
+ example: >-
117
+ A Pay button shown in a muted fill with a readable label and, beside it, the line "Accept the terms to continue".
118
+ counterexample: >-
119
+ A gray button with a label at the same gray, and nothing on the page that says what is missing.
120
+
121
+ - id: US6
122
+ name: Loading shows that work is under way
123
+ area: ui
124
+ moment: create
125
+ skill: lazuli-ui-states-and-system
126
+ rule: >-
127
+ Design the loading state of every component that waits for data or for an action: show at once that the request was taken, say in words what is loading, and keep the control that started it from being sent twice. Mark the region that is updating as busy for assistive technology.
128
+ why: >-
129
+ A wait with no sign looks like a broken page, and a person who sees nothing happen tends to press again; words and a busy region tell both the eye and the screen reader that the page is working.
130
+ origin: source
131
+ source: >-
132
+ Nielsen Norman Group, "Progress Indicators Make a Slow System Less Insufferable", https://www.nngroup.com/articles/progress-indicators/ (sections on thresholds and looped animation, published 2014-10-26, opened 2026-11-25): give immediate feedback, use a progress indicator for actions longer than about 1 second, a looped one for about 2 to 10 seconds with text explaining what is loading, and a percent-done one beyond that. Carbon Design System, Button usage, https://carbondesignsystem.com/components/button/usage/ (section on loading, opened 2026-11-25): a button can show inline loading and is disabled while it runs. W3C, Understanding SC 4.1.3 Status Messages, https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html (examples, opened 2026-11-25): a busy indicator is a status message. WAI-ARIA 1.2, https://www.w3.org/TR/wai-aria-1.2/ (section "aria-busy state", opened 2026-11-25): while an element is busy, assistive technologies may ignore changes to its content. That every waiting component needs a designed loading state is our claim.
133
+ when_to_break: >-
134
+ A result that always arrives faster than the eye notices may skip the loading look, declared with break-a-rule first.
135
+ break_effect: >-
136
+ The interface feels instant, with no flash of a spinner before the content.
137
+ test: >-
138
+ Staged: the CLI cannot produce this state. The agent stages it through the app's own means (a query string, mocked data, a story, a dev flag) and checks each staged render with check-design and capture, or reports it as not checked. The reviewer judges the staged captures.
139
+ example: >-
140
+ An order list that shows "Loading your orders" with a looped indicator, and a Pay button that shows a spinner and cannot be pressed again while the payment runs.
141
+ counterexample: >-
142
+ A blank area that stays white until the data arrives, and a button that can be pressed again during the wait.
143
+
144
+ - id: US7
145
+ name: Empty says why and offers the next step
146
+ area: ui
147
+ moment: create
148
+ skill: lazuli-ui-states-and-system
149
+ rule: >-
150
+ Design the empty state of every list, table, search and dashboard: say what would normally be here and why it is empty now (first use, no results, removed, no access), and offer one next step (add the first item, change the search). Show it only after loading has finished, never while data may still arrive.
151
+ why: >-
152
+ An empty area with no words looks like an error or a slow load; an empty state that explains and offers one action turns a dead end into the start of the task.
153
+ origin: source
154
+ source: >-
155
+ Nielsen Norman Group, empty states article by Kate Kaplan, https://www.nngroup.com/articles/empty-state-interface-design/ (sections "Use Empty States to Communicate System Status", "Provide Learning Cues", "Provide Direct Pathways for Key Tasks", published 2021-09-19, opened 2026-11-25): tell an empty result from an error or a slow load, do not show "no records" while loading, explain how to fill the space and give a direct way to act. Carbon Design System, Empty states pattern, https://carbondesignsystem.com/patterns/empty-states-pattern/ (sections on types and anatomy, opened 2026-11-25): first-use, user-action and error kinds; a title, a body with the next step, an optional primary action; avoid dead ends. That every list, table, search and dashboard needs one is our claim.
156
+ when_to_break: >-
157
+ A space that is empty by design and says so by its context (an inbox the person just cleared, with the count at zero) may stay quiet, declared with break-a-rule first.
158
+ break_effect: >-
159
+ The calm of the empty space becomes the reward for finishing, instead of a prompt to do more.
160
+ test: >-
161
+ Staged: the CLI cannot produce this state. The agent stages it through the app's own means (a query string, mocked data, a story, a dev flag) and checks each staged render with check-design and capture, or reports it as not checked. The reviewer judges the staged captures.
162
+ example: >-
163
+ An order list with no orders that says "No orders yet. Your orders will show here after your first purchase." and a Browse products button.
164
+ counterexample: >-
165
+ A table header with no rows under it and no words at all.
166
+
167
+ - id: US8
168
+ name: An error names the field, what went wrong and the fix
169
+ area: ui
170
+ moment: create
171
+ skill: lazuli-ui-states-and-system
172
+ rule: >-
173
+ Design the error state of every field, form and data view: mark the field in error and place a message next to it that says what went wrong and how to fix it, in the words of its label, not with color alone (ES2). Mark the invalid field with aria-invalid only after the person has entered or submitted, and keep what they typed.
174
+ why: >-
175
+ The person fixes an error faster when the message sits next to the field and tells them what to do; a generic message or a red border alone makes them search and guess.
176
+ origin: source
177
+ source: >-
178
+ GOV.UK Design System, Error message, https://design-system.service.gov.uk/components/error-message/ (sections "How it works", "Be clear and concise", "Be specific", opened 2026-11-25): show the message after the question, say what went wrong and how to fix it, reuse the label wording, avoid generic messages. Nielsen Norman Group, "10 Design Guidelines for Reporting Errors in Forms", https://www.nngroup.com/articles/errors-forms-design-guidelines/ (sections on placement, inline validation and color plus icon, published 2019-02-03, opened 2026-11-25): place errors next to the field, validate when the person finishes a field, add an icon to the red. W3C, Understanding SC 3.3.1 Error Identification, https://www.w3.org/WAI/WCAG22/Understanding/error-identification.html (section "Success Criterion", opened 2026-11-25): a detected error is identified and described in text. WAI-ARIA 1.2, https://www.w3.org/TR/wai-aria-1.2/ (section "aria-invalid state", opened 2026-11-25): set when a value fails the expected format, and do not flag an empty required field before a submit attempt. That the person's input should be kept is our claim.
179
+ when_to_break: >-
180
+ A form of one or two fields may show one message for the form instead of one per field, declared with break-a-rule first.
181
+ break_effect: >-
182
+ The screen stays compact, at the cost of the person having to work out which field the message means.
183
+ test: >-
184
+ Staged: the CLI cannot produce this state. The agent stages it through the app's own means (a query string, mocked data, a story, a dev flag) and checks each staged render with check-design and capture, or reports it as not checked. On a rendered page that already holds an invalid field, check-design compares the aria-invalid field with a valid one (UR12). The reviewer judges the message text and its place.
185
+ example: >-
186
+ An email field with a red border, an icon and the line "Enter an email address in the correct format, like name@example.com" right under it, the typed text kept.
187
+ counterexample: >-
188
+ A banner at the top that says "An error occurred" and a form emptied of what the person typed.
189
+
190
+ - id: US9
191
+ name: Success confirms what happened
192
+ area: ui
193
+ moment: create
194
+ skill: lazuli-ui-states-and-system
195
+ rule: >-
196
+ Design the success state of every action the person waits on: say in words what was done (not only "Success"), place it where the person is looking, and expose it as a status message so assistive technology announces it without moving focus. Remove it when the person moves on.
197
+ why: >-
198
+ A confirmation that names the outcome ends the doubt the action created; a color flash or a vague word leaves the person checking whether it really worked.
199
+ origin: source
200
+ source: >-
201
+ GOV.UK Design System, Notification banner, https://design-system.service.gov.uk/components/notification-banner/ (sections on the success version, opened 2026-11-25): use it to confirm that something the person expected has happened, start with a plain status heading so color is not the only cue, state what was completed, remove it when the person moves to a new page. W3C, Understanding SC 4.1.3 Status Messages, https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html (section "Success Criterion", opened 2026-11-25): a message reporting the success of an action is a status message, presented without receiving focus. That every awaited action needs one and that it sits where the person is looking are our claim.
202
+ when_to_break: >-
203
+ An action whose result is plain on the screen (an item that appears in the list) may let the result be the confirmation, declared with break-a-rule first.
204
+ break_effect: >-
205
+ The interface feels direct, with the change itself as the answer.
206
+ test: >-
207
+ Staged: the CLI cannot produce this state. The agent stages it through the app's own means (a query string, mocked data, a story, a dev flag) and checks each staged render with check-design and capture, or reports it as not checked. The reviewer judges the message text and where it appears.
208
+ example: >-
209
+ After saving an address, a banner headed "Saved" with the line "Your delivery address was updated", which disappears on the next page.
210
+ counterexample: >-
211
+ The button turns green for a moment and nothing says what happened.
212
+
213
+ - id: US10
214
+ name: One component, one look on every screen
215
+ area: ui
216
+ moment: create
217
+ skill: lazuli-ui-states-and-system
218
+ rule: >-
219
+ A component with the same identity (the same kind and the same text, such as the "Get started" button) looks the same on every screen of one product: same color, type, radius and spacing. Two different components that share a kind and a text are told apart with a data-component attribute, because the kit cannot match them by their text.
220
+ why: >-
221
+ The person learns a component once and recognizes it everywhere; the same button with a different radius on the next screen reads as a different action or as a careless product.
222
+ origin: source
223
+ source: >-
224
+ Nielsen Norman Group, consistency and standards article, https://www.nngroup.com/articles/consistency-and-standards/ (section "Internal Consistency", published 2021-01-10, opened 2026-11-25): a product uses the same patterns throughout, for example one primary color for links and primary buttons, and a design system gives one source of truth for components. Identity by kind and text, and data-component as the name for two components the kit cannot match, are our claim.
225
+ when_to_break: >-
226
+ A campaign or launch screen may restyle a component on purpose for one moment, declared with break-a-rule first.
227
+ break_effect: >-
228
+ The screen stands out from the rest of the product as an event, so the person notices it is special.
229
+ test: >-
230
+ check-design run on several screens of the product compares the look of each component found on more than one of them (UR13). The reviewer checks that components the kit cannot match by text carry a data-component name.
231
+ example: >-
232
+ The "Get started" button with the same fill, radius and type on the home page and the pricing page, though the two pages write it with different class lists.
233
+ counterexample: >-
234
+ The "Get started" button rounded 8 px on the home page and 4 px on the pricing page.
235
+
236
+ - id: US11
237
+ name: A small set of variants per kind, each logged
238
+ area: ui
239
+ moment: create
240
+ skill: lazuli-ui-states-and-system
241
+ rule: >-
242
+ Choose a small set of variants for each kind of component (for buttons, for example, primary, secondary and a quiet one), give each a job, and log each set as a decision with record-decision, one decision text per kind. A new look that fits none of the variants is either added to the set on purpose or replaced by one of them.
243
+ why: >-
244
+ A few variants with a clear job keep the hierarchy readable: the person sees which action leads. A new look for every screen dilutes that hierarchy until no action leads.
245
+ origin: source
246
+ source: >-
247
+ Carbon Design System, Button usage, https://carbondesignsystem.com/components/button/usage/ (sections on variants and emphasis, opened 2026-11-25): five button variants, primary buttons once per screen with stated exceptions, one high-emphasis button per layout, a clear hierarchy among buttons. That the set should be small, chosen per product and logged per kind is our claim.
248
+ when_to_break: >-
249
+ A product with many kinds of action (an editor, a dashboard) may need more variants, each still logged; going past the logged set is declared with break-a-rule first.
250
+ break_effect: >-
251
+ The interface can say more kinds of action, at the cost of the person learning more looks.
252
+ test: >-
253
+ check-design run on several screens counts the looks of buttons and fields (UR14). The reviewer checks the Decisions log in LAZULI.md has one entry per kind naming the variants and their jobs.
254
+ example: >-
255
+ Buttons logged as primary (filled, one per screen), secondary (outlined) and quiet (text only); fields logged as one look.
256
+ counterexample: >-
257
+ Seven button looks across five screens, none logged, each picked when the screen was built.
@@ -0,0 +1,13 @@
1
+ # UX hypotheses to validate in the A/B
2
+
3
+ Numbers and measures of flows and forms that are not from a source or a norm yet. They stay in the rules only as hints (status hypothesis, never a verdict) and become firm only after the A/B shows they improve the result. A row with a cutoff starts with `Cutoff: <key> <value>.`, says how the value was picked before any real page was measured, and lists site readings under "Observed so far, not evidence".
4
+
5
+ | ID | Principle | Candidate limit | How to validate in the A/B |
6
+ |---|---|---|---|
7
+ | H1 | XR1 (every field has a visible label, forms.labels) | Our claim, a hint only; no number is used as a cutoff. A named field is listed when no label a person sees names it: its name comes from a placeholder, a title or an aria-label alone, or from a label or aria-labelledby text that is hidden (sr-only, clipped, in a collapsed or transparent parent, off the page). A field with no name at all is AR1's and is left out of the list and of the count. A custom checkbox, radio or file input hidden by its own style counts through its visible label. How it was picked: no value to pick; what counts as a visible label was fixed before any page was measured. Limits: controls built from ARIA roles (a button with role checkbox, as in Radix or shadcn, or a div with role combobox) are not fields, so this check does not read them; a floating label that moves into the field, and a label drawn by a script after load, are read as they sit at rest. Observed so far, not evidence: forms-signup 3 of 17 (placeholder alone, aria-label alone, an sr-only label), forms-kinds 1 of 13, forms-marks 4 of 8 with 1 unnamed field left to AR1; the home pages of test site A and test site B and a second page of test site B have no visible form field at 1440 and 390 px, so no real page with a form has tested it | Needs pages outside the test sites: real forms with reviewers marking which fields they could not name once typing started, against the list |
8
+ | H2 | XR2 (data about the person carries its autocomplete token, forms.autocomplete) | Our claim, a hint only; no number is used as a cutoff. A field's purpose is guessed from its type (email, tel) and from whole words of its name, id and label, checked in a fixed order (company, e-mail, phone, postal code, address, city, birthday, name); the field is listed when its autocomplete is empty, off or no token accepted for that purpose. Boxes to tick, radios, files, sliders and color pickers are not checked. How it was picked: no value to pick; the word lists were fixed before any page was measured and are not edited after a site reading. Limits: controls built from ARIA roles (a button with role checkbox, as in Radix or shadcn, or a div with role combobox) are not fields, so this check does not read them; the word lists hold no login-name purpose: a login field named only "Username" has no purpose, so a missing autocomplete="username" is not flagged; a field whose words also read as a name or an e-mail ("User name", "E-mail or username") is checked for that purpose, and autocomplete="username" on it reads as missing; a token for another purpose counts as missing; a field whose words name no purpose is not checked. Observed so far, not evidence: forms-signup 7 of 7 checked fields missing, forms-kinds 2 of 5 (one with autocomplete off); no real page with a form has been read (the home pages of test site A and test site B and a second page of test site B have no visible form field) | Needs pages outside the test sites: real forms with their purposes written down by their authors, against the purposes the words gave |
9
+ | H3 | XR3 (the keyboard matches the data, forms.input-mode) | Our claim, a hint only; no number is used as a cutoff. A field a person types into (a textarea, or an input of type text, search, email, tel, url, number or password) is listed when it reads as e-mail, phone or numeric data and neither its type nor its inputmode opens that keyboard (numeric data accepts type number or tel, inputmode numeric, decimal or tel). Numeric is read from whole words of the name, id and label (cpf, cnpj, cep, zip, number, code, quantity and their Portuguese forms). How it was picked: no value to pick; the word list was fixed before any page was measured and is kept as written. Limits: controls built from ARIA roles (a button with role checkbox, as in Radix or shadcn, or a div with role combobox) are not fields, so this check does not read them; promo, coupon and invite codes, tracking numbers and postal codes with letters read as numeric, so they can get a false hint (XM2 lets such a field keep the text keyboard by a declared break); a house number reads as numeric too. Observed so far, not evidence: forms-signup 1 of 3 checked fields (the CEP field), forms-kinds 2 of 4; no real page with a form has been read (the home pages of test site A and test site B and a second page of test site B have no visible form field) | Needs pages outside the test sites: real forms opened on a phone by reviewers who note each field where the keyboard was wrong, against the list |
10
+ | H4 | XR4 (required and optional marked one way, forms.required) | Our claim, a hint only; no number is used as a cutoff. In a form with both required and optional questions (the required attribute or aria-required), the marks pass when every required question carries a required mark (an asterisk anywhere in the visible label, or the word required or obrigatorio) or every optional one carries optional or opcional; otherwise the required questions with no mark are listed. A field marked required that the form does not require is listed in any form. A radio or checkbox group is one question. How it was picked: no value to pick; the mark words were fixed before any page was measured. Limits: controls built from ARIA roles (a button with role checkbox, as in Radix or shadcn, or a div with role combobox) are not fields, so this check does not read them; a mark written only on a group's legend is not read; a form that requires fields by a script and not by the attribute reads as all optional; with no form holding both kinds, only the required marks are set against the form. Observed so far, not evidence: forms-signup marked one way (1 form checked), forms-kinds 2 required fields unmarked and 1 marked field not required; no real page with a form has been read (the home pages of test site A and test site B and a second page of test site B have no visible form field) | Needs pages outside the test sites: real forms with reviewers saying which fields they thought they could skip, against the list |
11
+ | H5 | XR5 (an error message is tied to its field, forms.errors) | Our claim, a hint only; no number is used as a cutoff. A field with aria-invalid true is listed when neither aria-errormessage nor aria-describedby points to text a person sees. Only an invalid field already in the render is seen: the CLI never submits a form, so the error state is staged as US8 says (on a local run, through the app's own means), and a render with no invalid field gives no finding and a note. How it was picked: no value to pick; what counts as a tied message was fixed before any page was measured. Limits: an error shown only by a class or a color, with no aria-invalid, is not seen; whether the message says the fix is left to the reviewer. Observed so far, not evidence: forms-signup 1 of 2 invalid fields untied, forms-kinds 2 of 2; no real page has rendered an invalid field (the test sites are read only and never submitted) | Needs pages outside the test sites: staged error renders of real forms read with a screen reader by reviewers, who note each error they did not hear at its field, against the list |
12
+ | H6 | XR6 (a form asks few questions, forms.field-count) | Cutoff: maxFields 6. How it was picked: a round starting value, our claim, set before any form was measured; the stub used the same. Each field counts once and each radio or checkbox group once; fields outside any form are not one form. No opened page gives a number of questions. Limits: controls built from ARIA roles (a button with role checkbox, as in Radix or shadcn, or a div with role combobox) are not fields, so this check does not read them, and a form built from them reads as shorter than it is. Observed so far, not evidence: forms-signup 14 questions, forms-kinds 11 in form#order; no real page with a form has been read (the home pages of test site A and test site B and a second page of test site B have no form), so the cutoff has met no real form. Whatever real forms show later is recorded here and is not a reason to change it | Needs pages outside the test sites: real forms of different lengths for the same task, with completion counted per form, before the cutoff is applied; then compare cutoffs of 4, 6 and 10 |
13
+ | H7 | XR7 (the main task runs without getting stuck, simulated task) | Our claim, a hint only; no number is used as a cutoff. One agent given the audience profile of LAZULI.md and the goal's Do line, started fresh for the task and continued at each step, sees one screen at a time (map-page) and picks one element per step, or says it is done or stuck; record-task counts the steps, the choices offered in the first view, the hesitations, the scrolls and the outcome (done, stuck, stopped or left), never a weighted score. How it was picked: no value to pick; the counts were chosen before any task was walked. Limits: the CLI never clicks, types or submits, so on a site that is not local the walk follows links only and stops at any form control; every page the walk opens on a site that is not local is checked before it loads (step 1 stays on the start host, with or without a leading www., later steps on the origin step 1 reached, and no checkout or payment address is opened), and a redirect or a script navigation anywhere else is stopped before the browser asks for it, so the other page never loads and the task ends as stopped; a next screen that cannot be opened (a download, an error that stays after one retry) or that moves to another site while it is mapped also ends the task as stopped; a local target (a file or a local app) is checked the same way: it may move between local pages, and a redirect or a script navigation to any host that is not local is stopped before it loads and ends the task as stopped; a window the page opens never loads and is only noted, service workers are blocked, and frames embedded in a page load as the page asks, outside the guard, so their content may appear in the screenshots; a host that cannot continue the tester starts a fresh one per step, and then remembered is not measured on a walk of more than one step; at 390 px a collapsed menu button is a stop on a real site and the links behind it are not in the map, so the walk of a site with a menu button ends there as stopped; an agent reads the whole screen and may not hesitate where a person would. Observed so far, not evidence: test site A at 390 px (the smoke, and one read-only map-page run on 2026-11-25): step 1 has 20 actions, 2 in the first view, 17 stop, 2 follow, 1 leave and 0 act; the smoke answers with a stop action, so the task closed stopped after 1 step. No task has been walked past step 1 on a real site, and no tester has answered one | Needs pages outside the test sites: the same task with people from the audience, comparing where each hesitates or stops with where the agent did, step by step, before the counts are trusted |
@@ -0,0 +1,8 @@
1
+ area: ux
2
+ title: UX
3
+ summary: "Flows that cut the steps nobody needs and keep one moment worth remembering, forms that ask little and recover from errors, checked by a simulated task with the audience profile."
4
+ order: 50
5
+ prefixes: [XF, XM, XR]
6
+ skills:
7
+ - lazuli-ux-flows-and-forms
8
+ - lazuli-ux-task-test
@@ -0,0 +1,164 @@
1
+ # Flows. A flow is the path a person takes to finish one task: from the first screen to the point where
2
+ # the task is done. These rules are for the moment the flow is designed. The CLI never acts on a real site:
3
+ # a simulated task (record-task) walks the flow by reading each screen, and the reviewer judges the rest.
4
+
5
+ - id: XF1
6
+ name: The main task and where it ends are written first
7
+ area: ux
8
+ moment: create
9
+ skill: lazuli-ux-flows-and-forms
10
+ rule: >-
11
+ Before designing any screen of a flow, write the main task as the goal's Do line on its piece and the first screen of that task as its Target line in LAZULI.md, and write in one sentence where the task ends (the screen or message that tells the person it is done). Every step of the flow is judged against that task and that end.
12
+ why: >-
13
+ A flow drawn without a named task collects screens that each look reasonable and lead nowhere in particular; with the task and its end written down, every step can be asked whether it moves the person toward that end. (our claim)
14
+ origin: hypothesis
15
+ source: >-
16
+ Our claim: no page opened on 2026-11-25 states this as a rule. It follows the kit's own practice of judging every effect against a goal (set-goals, the Do and Target lines of LAZULI.md).
17
+ when_to_break: >-
18
+ An exploratory space with no single task (a gallery, an archive meant for browsing) may name a few small tasks instead of one main task, declared with break-a-rule first.
19
+ break_effect: >-
20
+ The person is free to wander, and the flow is judged by how easily each small task is found rather than by one path.
21
+ test: >-
22
+ The reviewer checks that the goal has a Do line and a Target line before the flow is designed and that the end of the task is written. record-task walks the flow from the Target screen and records whether the tester reached that end.
23
+ example: >-
24
+ Do: book a first visit to the clinic. Target: the home page. The task ends on the screen that shows the booked date and time.
25
+ counterexample: >-
26
+ A booking flow designed screen by screen with no written task, where nobody can say which screen means the booking is done.
27
+
28
+ - id: XF2
29
+ name: Cut the steps and fields everyone assumes are required
30
+ area: ux
31
+ moment: create
32
+ skill: lazuli-ux-flows-and-forms
33
+ rule: >-
34
+ For each step and each field of the flow, write what it is for: the person's task or a stated business need. A step or field that serves neither is removed, or moved after the task is done. Do not keep a step only because flows of this kind usually have it.
35
+ why: >-
36
+ Every question and every screen costs the person time and attention, and the ones carried over from habit are the easiest to cut without losing anything the task needs.
37
+ origin: source
38
+ source: >-
39
+ GOV.UK Design System, Question pages, https://design-system.service.gov.uk/patterns/question-pages/ (section on asking only what you need, opened 2026-11-25): make sure you know why you are asking every question, and use a question protocol to check each one is needed. GOV.UK Service Manual, Designing good questions, https://www.gov.uk/service-manual/design/designing-good-questions (section "Ask questions that users understand", opened 2026-11-25): know why you are asking every question. That the same test applies to whole steps, and that steps kept from habit are the easiest to cut, are our claim.
40
+ when_to_break: >-
41
+ A step a regulation or a contract requires (an identity check, a consent) stays even when it serves neither the task nor the business directly, declared with break-a-rule first and named as the requirement it meets.
42
+ break_effect: >-
43
+ The flow is longer by that step, and the person is told why it is there, which costs less trust than an unexplained question.
44
+ test: >-
45
+ The reviewer checks that each step and field has a written purpose and that none without one remains before the task ends. record-task counts the steps the tester walked to finish the task.
46
+ example: >-
47
+ A quote request that asks for name, e-mail and the job to be done, with company size moved to an optional question after the request is sent.
48
+ counterexample: >-
49
+ A contact form that asks for date of birth, gender and how the person heard about the company before it lets them send a question.
50
+
51
+ - id: XF3
52
+ name: One memorable moment in the flow, chosen on purpose
53
+ area: ux
54
+ moment: create
55
+ skill: lazuli-ux-flows-and-forms
56
+ rule: >-
57
+ Choose one moment of the flow for the person to remember (a confirmation that feels personal, a step that shows progress in a way the brand owns) and log the choice with record-decision. Keep every other step plain, so the chosen moment stands out.
58
+ why: >-
59
+ A flow where every step tries to delight blurs into noise, while one chosen moment gives the person something to recall and tell, and the rest of the flow stays fast. (our claim)
60
+ origin: hypothesis
61
+ source: >-
62
+ Our claim: no page opened on 2026-11-25 supports it. It comes from the kit author's internal product plan (award level for UX: one moment of the flow the person remembers) and is checked only by the tester's recall until the A/B tests it.
63
+ when_to_break: >-
64
+ A flow done under stress or in a hurry (a payment error, an urgent support request) may have no designed moment at all, declared with break-a-rule first.
65
+ break_effect: >-
66
+ The flow stays quiet and quick, which suits a person who wants it over with.
67
+ test: >-
68
+ The decision is logged with record-decision on the flow's piece. record-task asks the tester, at the end of the simulated task, which moment they remember, and the reviewer compares the answer with the logged decision when one tester saw every step (otherwise remembered is not measured).
69
+ example: >-
70
+ A booking that ends on a confirmation naming the person and the professional they will meet, with a small map of the street, while every earlier step is a plain question.
71
+ counterexample: >-
72
+ A signup where every step has its own animation and illustration, so the tester remembers none of them.
73
+
74
+ - id: XF4
75
+ name: Each step offers one main next action
76
+ area: ux
77
+ moment: create
78
+ skill: lazuli-ux-flows-and-forms
79
+ rule: >-
80
+ Give each step of the flow one main action that moves the task forward, shown as the strongest control of the step. Other actions (go back, save for later, cancel) are present but weaker, so the person never has to choose between two equal ways forward.
81
+ why: >-
82
+ When two controls look equally important, the person stops to decide which one continues the task; one main action removes that pause. (our claim)
83
+ origin: hypothesis
84
+ source: >-
85
+ Our claim: no page opened on 2026-11-25 states it. record-task counts the choices offered in the first view and where the tester hesitated, which is how it gets tested.
86
+ when_to_break: >-
87
+ A step whose purpose is a real choice between two paths (sign in or continue as a guest) shows both as equals, declared with break-a-rule first.
88
+ break_effect: >-
89
+ The person sees the choice as theirs to make instead of being nudged, at the cost of a short pause.
90
+ test: >-
91
+ The reviewer checks one main action per step in the captures. record-task records the choices offered in the first view of each step and the steps where the tester hesitated.
92
+ example: >-
93
+ A step of a booking with one filled Continue button and a plain Back link beside it.
94
+ counterexample: >-
95
+ A step with Continue, Save and Next as three buttons of the same size and color.
96
+
97
+ - id: XF5
98
+ name: Do not ask for what the person already gave
99
+ area: ux
100
+ moment: create
101
+ skill: lazuli-ux-flows-and-forms
102
+ rule: >-
103
+ Within one flow, information the person already entered or was given is filled in for them or offered to select, never asked again. The exceptions are the ones WCAG 2.2 3.3.7 names: re-entry that is essential, re-entry for security (confirming a new password), and information that is no longer valid.
104
+ why: >-
105
+ Asking twice adds work and makes the person recall what they typed steps ago, which weighs most on people with memory or cognitive disabilities.
106
+ origin: norm
107
+ source: >-
108
+ W3C, Understanding SC 3.3.7 Redundant Entry (level A), https://www.w3.org/WAI/WCAG22/Understanding/redundant-entry.html (sections "Success Criterion", "Intent", opened 2026-11-25): information previously entered or provided in the same process is auto-populated or available to select, with the exceptions essential, security and no longer valid; browser autocomplete alone is not sufficient. GOV.UK Design System, Question pages, https://design-system.service.gov.uk/patterns/question-pages/ (opened 2026-11-25): ask for a piece of information only once within a journey and reuse earlier answers.
109
+ when_to_break: >-
110
+ The criterion's own exceptions are the only room: a password confirmation, a game of memory, data that expired. A declared break never waives the criterion beyond them.
111
+ break_effect: >-
112
+ No effect is bought by asking twice outside the exceptions. Inside them, the repeat protects the person (a mistyped new password is caught).
113
+ test: >-
114
+ The reviewer walks the flow and lists every field that asks again for something given earlier in the same process. record-task records the steps of the simulated task, so the repeated question shows in the walk.
115
+ example: >-
116
+ A checkout whose billing address offers "Same as delivery address", already checked.
117
+ counterexample: >-
118
+ A booking that asks for the e-mail on the first step and again on the confirmation step.
119
+
120
+ - id: XF6
121
+ name: An error keeps the input and says how to fix it
122
+ area: ux
123
+ moment: create
124
+ skill: lazuli-ux-flows-and-forms
125
+ rule: >-
126
+ When the flow rejects an answer, keep everything the person typed, say in text what went wrong and how to fix it, and show that message next to the field it is about (and, on a long form, in a summary at the top that links to it). Never clear the fields or show only a color.
127
+ why: >-
128
+ A cleared form makes the person start over and hides what was wrong; a message that only says something is invalid leaves them guessing the fix, and many give up there.
129
+ origin: source
130
+ source: >-
131
+ GOV.UK Design System, Error message, https://design-system.service.gov.uk/components/error-message/ (opened 2026-11-25): show the message next to the field and in the error summary, explain what went wrong and how to fix it, do not clear any form fields. GOV.UK Design System, Recover from validation errors, https://design-system.service.gov.uk/patterns/validation/ (opened 2026-11-25): redisplay the page with the answers still in the fields, error summary at the top, each message next to its field. W3C, Understanding SC 3.3.1 Error Identification, https://www.w3.org/WAI/WCAG22/Understanding/error-identification.html (opened 2026-11-25): the item in error is identified and the error described in text; the criterion does not fix where the message appears. W3C, Understanding SC 3.3.3 Error Suggestion, https://www.w3.org/WAI/WCAG22/Understanding/error-suggestion.html (opened 2026-11-25): when a correction is known it is suggested, unless that would jeopardize security or purpose. That the message belongs next to the field is the GOV.UK guidance, not a WCAG requirement.
132
+ when_to_break: >-
133
+ A field that must be typed again for security (a password, a card security code) is cleared on purpose, declared with break-a-rule first, and the message says it was cleared.
134
+ break_effect: >-
135
+ The secret is not left in the page, at the cost of the person typing it once more.
136
+ test: >-
137
+ The error state is staged on a local run (the CLI renders only the default state). The reviewer checks in the capture that the typed values stay, that each message names the problem and the fix, and that it sits next to its field.
138
+ example: >-
139
+ "Enter a date of birth in the past, like 27 3 1990", under the date field, with the typed day and month still there.
140
+ counterexample: >-
141
+ A form that reloads empty with a red border on two fields and the words "Invalid input" at the top.
142
+
143
+ - id: XF7
144
+ name: Ask for accounts, newsletters and surveys after the task
145
+ area: ux
146
+ moment: create
147
+ skill: lazuli-ux-flows-and-forms
148
+ rule: >-
149
+ Let the person finish the main task first. Offer account creation, newsletter signup and surveys after the task is done (on the confirmation screen), and when the flow starts tell the person that the offer will come at the end.
150
+ why: >-
151
+ An account invitation before or during the task pulls the person away from finishing it, makes them think an account is required, and makes the task fields look like account fields; at the end most data is already given.
152
+ origin: source
153
+ source: >-
154
+ Baymard Institute, Save Account Creation for the Confirmation Step, https://baymard.com/blog/delayed-account-creation (sections on where to ask and why the confirmation step works, opened 2026-11-25): invite guests to create an account on the order confirmation page, never before or during checkout; tell guests at the start that they can create one after checkout. That newsletters and surveys follow the same rule is our claim.
155
+ when_to_break: >-
156
+ A product the task cannot be done without an account (a bank, a private dashboard) asks for the account first, declared with break-a-rule first and saying why on the first screen.
157
+ break_effect: >-
158
+ The person knows the account is the price of entry before investing time, which costs less than finding out halfway.
159
+ test: >-
160
+ The reviewer checks that no account, newsletter or survey prompt appears before the task ends. record-task records the step where any such prompt appeared during the simulated task.
161
+ example: >-
162
+ An order confirmation that says "Save your details for next time" with only a password field.
163
+ counterexample: >-
164
+ A modal asking for a newsletter signup over the first step of the checkout.