@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.
- package/CHANGELOG.md +120 -0
- package/LICENSE +21 -0
- package/README.md +202 -2
- package/agents/lazuli-design-reviewer.md +30 -0
- package/agents/lazuli-first-look.md +22 -0
- package/agents/lazuli-task-tester.md +25 -0
- package/bin/lazuli.mjs +747 -0
- package/package.json +11 -4
- package/rules/accessibility/HYPOTHESES.md +8 -0
- package/rules/accessibility/_area.yaml +7 -0
- package/rules/accessibility/operable.yaml +100 -0
- package/rules/accessibility/perceivable.yaml +153 -0
- package/rules/accessibility/robust.yaml +24 -0
- package/rules/accessibility/understandable.yaml +72 -0
- package/rules/color/HYPOTHESES.md +27 -0
- package/rules/color/_area.yaml +10 -0
- package/rules/color/adapt.yaml +183 -0
- package/rules/color/create.yaml +259 -0
- package/rules/color/review.yaml +215 -0
- package/rules/color/signal.yaml +196 -0
- package/rules/content/HYPOTHESES.md +19 -0
- package/rules/content/_area.yaml +8 -0
- package/rules/content/review.yaml +378 -0
- package/rules/content/voice.yaml +144 -0
- package/rules/content/writing.yaml +202 -0
- package/rules/data/HYPOTHESES.md +11 -0
- package/rules/data/_area.yaml +7 -0
- package/rules/data/charts.yaml +189 -0
- package/rules/data/dashboards.yaml +141 -0
- package/rules/data/review.yaml +159 -0
- package/rules/graphic/HYPOTHESES.md +18 -0
- package/rules/graphic/_area.yaml +8 -0
- package/rules/graphic/identity.yaml +141 -0
- package/rules/graphic/pieces.yaml +164 -0
- package/rules/graphic/review.yaml +271 -0
- package/rules/graphic/symbol.yaml +141 -0
- package/rules/motion/HYPOTHESES.md +19 -0
- package/rules/motion/_area.yaml +7 -0
- package/rules/motion/micro.yaml +143 -0
- package/rules/motion/review.yaml +347 -0
- package/rules/motion/transitions.yaml +169 -0
- package/rules/typography/HYPOTHESES.md +12 -0
- package/rules/typography/_area.yaml +8 -0
- package/rules/typography/adapt.yaml +45 -0
- package/rules/typography/create.yaml +126 -0
- package/rules/typography/review.yaml +127 -0
- package/rules/ui/HYPOTHESES.md +23 -0
- package/rules/ui/_area.yaml +9 -0
- package/rules/ui/compose.yaml +246 -0
- package/rules/ui/grid.yaml +75 -0
- package/rules/ui/review.yaml +400 -0
- package/rules/ui/states.yaml +257 -0
- package/rules/ux/HYPOTHESES.md +13 -0
- package/rules/ux/_area.yaml +8 -0
- package/rules/ux/flows.yaml +164 -0
- package/rules/ux/forms.yaml +142 -0
- package/rules/ux/review.yaml +186 -0
- package/skills/lazuli/SKILL.md +183 -0
- package/skills/lazuli/procedures/create.md +29 -0
- package/skills/lazuli/procedures/explain-decisions.md +22 -0
- package/skills/lazuli/procedures/improve.md +30 -0
- package/skills/lazuli/procedures/remember-this.md +41 -0
- package/skills/lazuli/procedures/review-design.md +36 -0
- package/skills/lazuli/procedures/show-options.md +33 -0
- package/skills/lazuli-accessibility-check/SKILL.md +68 -0
- package/skills/lazuli-color-context-and-culture/SKILL.md +53 -0
- package/skills/lazuli-color-context-and-culture/references/sectors.md +26 -0
- package/skills/lazuli-color-palette-by-intent/SKILL.md +54 -0
- package/skills/lazuli-color-palette-by-intent/references/intent-chords.md +51 -0
- package/skills/lazuli-color-screen-review/SKILL.md +51 -0
- package/skills/lazuli-color-states-and-signals/SKILL.md +53 -0
- package/skills/lazuli-content-interface-writing/SKILL.md +53 -0
- package/skills/lazuli-content-voice/SKILL.md +40 -0
- package/skills/lazuli-data-charts-and-dashboards/SKILL.md +59 -0
- package/skills/lazuli-graphic-derived-pieces/SKILL.md +40 -0
- package/skills/lazuli-graphic-derived-pieces/references/piece-template.html +24 -0
- package/skills/lazuli-graphic-identity/SKILL.md +45 -0
- package/skills/lazuli-motion-micro-and-transitions/SKILL.md +49 -0
- package/skills/lazuli-typography-choose-and-pair/SKILL.md +50 -0
- package/skills/lazuli-typography-screen-review/SKILL.md +51 -0
- package/skills/lazuli-ui-composition/SKILL.md +42 -0
- package/skills/lazuli-ui-composition/references/option-template.html +34 -0
- package/skills/lazuli-ui-layout-review/SKILL.md +47 -0
- package/skills/lazuli-ui-states-and-system/SKILL.md +54 -0
- package/skills/lazuli-ux-flows-and-forms/SKILL.md +51 -0
- package/skills/lazuli-ux-task-test/SKILL.md +44 -0
- package/src/browser.mjs +162 -0
- package/src/commands/capture.mjs +313 -0
- package/src/commands/catalog.mjs +37 -0
- package/src/commands/check-design.mjs +463 -0
- package/src/commands/check-goals.mjs +57 -0
- package/src/commands/compare-designs.mjs +160 -0
- package/src/commands/draft-memo.mjs +162 -0
- package/src/commands/hooks.mjs +345 -0
- package/src/commands/install-hooks.mjs +120 -0
- package/src/commands/install.mjs +132 -0
- package/src/commands/list-rules.mjs +49 -0
- package/src/commands/map-page.mjs +594 -0
- package/src/commands/record-answers.mjs +79 -0
- package/src/commands/record-log.mjs +325 -0
- package/src/commands/record-task.mjs +250 -0
- package/src/commands/render-options.mjs +227 -0
- package/src/commands/start-project.mjs +32 -0
- package/src/measure/a11y.mjs +391 -0
- package/src/measure/asset.mjs +206 -0
- package/src/measure/at-rest.mjs +49 -0
- package/src/measure/cases.mjs +566 -0
- package/src/measure/chart-read.mjs +401 -0
- package/src/measure/chart.mjs +264 -0
- package/src/measure/coherence.mjs +145 -0
- package/src/measure/color.mjs +86 -0
- package/src/measure/content.mjs +82 -0
- package/src/measure/cvd.mjs +24 -0
- package/src/measure/extreme.mjs +241 -0
- package/src/measure/forms.mjs +150 -0
- package/src/measure/in-page/a11y.js +522 -0
- package/src/measure/in-page/color.js +348 -0
- package/src/measure/in-page/composition.js +1496 -0
- package/src/measure/in-page/contrast.js +15 -0
- package/src/measure/in-page/cvd.js +173 -0
- package/src/measure/in-page/extreme.js +377 -0
- package/src/measure/in-page/frames.js +781 -0
- package/src/measure/in-page/look.js +28 -0
- package/src/measure/in-page/motion-probe.js +171 -0
- package/src/measure/in-page/style.js +107 -0
- package/src/measure/in-page/svg-strokes.js +112 -0
- package/src/measure/in-page/svg-uses.js +50 -0
- package/src/measure/in-page/symbol.js +123 -0
- package/src/measure/in-page/type.js +269 -0
- package/src/measure/in-page/weight.js +207 -0
- package/src/measure/layout.mjs +100 -0
- package/src/measure/motion.mjs +509 -0
- package/src/measure/piece.mjs +195 -0
- package/src/measure/registry.mjs +253 -0
- package/src/measure/rhythm.mjs +81 -0
- package/src/measure/signature.mjs +65 -0
- package/src/measure/states.mjs +240 -0
- package/src/measure/style.mjs +13 -0
- package/src/measure/symbol.mjs +268 -0
- package/src/measure/terms.mjs +153 -0
- package/src/measure/tiles.mjs +20 -0
- package/src/measure/timeline.mjs +621 -0
- package/src/measure/type.mjs +167 -0
- package/src/measure/weight.mjs +18 -0
- package/src/private-strings.mjs +81 -0
- package/src/project/blind.mjs +70 -0
- package/src/project/edits.mjs +154 -0
- package/src/project/gate.mjs +168 -0
- package/src/project/lazuli-md.mjs +521 -0
- package/src/project/log.mjs +335 -0
- package/src/project/match.mjs +200 -0
- package/src/project/records.mjs +380 -0
- package/src/project/tasks.mjs +153 -0
- package/src/report/evaluate.mjs +27 -0
- package/src/report/evaluators/a11y.mjs +227 -0
- package/src/report/evaluators/chart.mjs +151 -0
- package/src/report/evaluators/coherence.mjs +103 -0
- package/src/report/evaluators/color.mjs +133 -0
- package/src/report/evaluators/content.mjs +112 -0
- package/src/report/evaluators/extreme.mjs +87 -0
- package/src/report/evaluators/forms.mjs +116 -0
- package/src/report/evaluators/layout.mjs +103 -0
- package/src/report/evaluators/motion.mjs +280 -0
- package/src/report/evaluators/piece.mjs +69 -0
- package/src/report/evaluators/rhythm.mjs +99 -0
- package/src/report/evaluators/states.mjs +39 -0
- package/src/report/evaluators/style.mjs +35 -0
- package/src/report/evaluators/symbol.mjs +110 -0
- package/src/report/evaluators/terms.mjs +49 -0
- package/src/report/evaluators/type.mjs +166 -0
- package/src/report/evaluators/weight.mjs +51 -0
- package/src/report/evidence.mjs +4 -0
- package/src/report/finding.mjs +11 -0
- package/src/report/format.mjs +215 -0
- package/src/rules/hypotheses.mjs +28 -0
- package/src/rules/load.mjs +274 -0
- package/src/rules/public-text.mjs +56 -0
- package/src/rules/schema.mjs +220 -0
- package/templates/LAZULI.md +88 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# improve
|
|
2
|
+
|
|
3
|
+
Make something that already exists better while keeping what makes it recognizable.
|
|
4
|
+
|
|
5
|
+
In this file `lazuli <command>` means `node "<KIT_PATH>/bin/lazuli.mjs" <command>` (see "Running the CLI" in `SKILL.md`). Run captures and checks one at a time, never in parallel.
|
|
6
|
+
|
|
7
|
+
## Mode
|
|
8
|
+
Same as `create`. Director: ask before changing anything the person might call identity, and wait at each fork. Delegate: decide, explain in plain language with no design terms, and keep the decisions written.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
1. **Read `LAZULI.md`.** If it does not exist, run `lazuli start-project`. If `## Goals` is empty, run `set-goals` first, with a `Target:` for the page you will change. If `## Idea` is empty, write one sentence for it as in `create` (offer two or three and ask in director mode, pick one and say why in delegate mode), starting from what the existing piece already carries.
|
|
12
|
+
2. **Take the baseline before touching anything.** Run these on the existing piece, one at a time:
|
|
13
|
+
- `lazuli check-design <target> --width 1440,768,390`
|
|
14
|
+
- `lazuli capture <target> --width 1440,768,390`. It prints the capture folder, then the order to follow: the first look prompt path (step 1) and the reviewer packet path (step 3).
|
|
15
|
+
- A fresh `lazuli-first-look` agent (pick it by that name whatever prefix your host shows), given only the first look prompt path from step 1 of that order. Save its JSON unchanged to a file and run `lazuli record-first-look --file <that file>`. This deletes the blind folder, so a baseline first look cannot be redone without a new capture. When no fresh agent and no person can run it, say so and do not answer it yourself; the review of the finished piece is then recorded as pending (see `procedures/review-design.md`).
|
|
16
|
+
Keep the baseline answers (about, main action, feeling at each width) in your notes: the review compares against them.
|
|
17
|
+
3. **List what must stay.** Write the identity elements to keep (a logo shape, a color the brand is known by, a type voice, a layout habit, a phrase), each as a decision marked `followed`, before changing anything:
|
|
18
|
+
`lazuli record-decision --decision "Keep <element>" --piece "<goal piece>" --goal "<the goal it serves>" --rule "<id> followed" --measure "<how you will confirm it is unchanged>"`
|
|
19
|
+
Cite a rule only if it covers the kept element: look in `lazuli list-rules --moment review --area <areas in play>`. When no existing rule covers the element, first write a project rule for it through `procedures/remember-this.md`: the condition is the element (a CSS selector when it is visual), and `source` is `Identity element kept from the existing piece on <date>`. Validate it as that procedure says, then record the keep decision citing that `LR` id. Never cite a rule that does not cover the element.
|
|
20
|
+
4. **Read only the rules of the moment.** `lazuli list-rules --moment create --area <areas in play>`, then `lazuli list-rules --area project`.
|
|
21
|
+
5. **Propose directions with show-options** (`procedures/show-options.md`). Rebuild the existing composition as one of the 6 to 9 options so the sheet shows it next to the alternatives, and say in words what each option changes and what stays. Every option keeps the identity elements listed in step 3. Director mode waits for the choice. Delegate mode chooses and explains.
|
|
22
|
+
6. **Change the piece.** Log each new decision with `record-decision`, and each break through break-a-rule (`record-break --status trying`). Keep a break only after review-design (step 7) has a recorded review of the piece; then log its decision marked `broken`.
|
|
23
|
+
7. **Check again.** `lazuli check-design <target> --width 1440,768,390`, then review with `procedures/review-design.md`. The reviewer does not see the baseline answers, so the comparison is yours: quote the baseline answers from step 2 and the new first look side by side and say what changed in how a fresh reader describes the page. The kept elements must still be there.
|
|
24
|
+
8. **Run `lazuli check-goals`, then deliver with explain-decisions** (`procedures/explain-decisions.md`). A `redo` verdict returns to step 5.
|
|
25
|
+
|
|
26
|
+
## Optional
|
|
27
|
+
`lazuli install-hooks` adds opt-in Claude Code hooks. It is the person's choice; offer it once, never run it unasked.
|
|
28
|
+
|
|
29
|
+
## What never to say
|
|
30
|
+
Never say an effect was achieved, and never say the piece "improved" from a clean report alone. Say what was measured and what the baseline and the new first look each said.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# remember-this
|
|
2
|
+
|
|
3
|
+
Turn a correction from the person into a rule this project checks from now on, with a condition and a test. The rule lives in `.lazuli/rules/learned.yaml` and is never a norm.
|
|
4
|
+
|
|
5
|
+
In this file `lazuli <command>` means `node "<KIT_PATH>/bin/lazuli.mjs" <command>` (see "Running the CLI" in `SKILL.md`).
|
|
6
|
+
|
|
7
|
+
## Steps
|
|
8
|
+
1. **Write the three parts of the correction.**
|
|
9
|
+
- Condition: where it applies. When it is visual, give it as a CSS selector (for example `.hero h1`, `button.primary`).
|
|
10
|
+
- Rule: what to do or avoid there, in one sentence.
|
|
11
|
+
- Test: how to tell, as a property and a limit the page can be measured against, or as a check a reviewer can make from a capture.
|
|
12
|
+
If the person's words leave one of the three open, ask for all that is open in one batch.
|
|
13
|
+
2. **Find the next free id.** Run `lazuli list-rules --area project`. Take `LR<n>` with the next number after the highest one listed (`LR1` when it says there are no learned rules yet).
|
|
14
|
+
3. **Write the rule** to `.lazuli/rules/learned.yaml` (create the file, or append a new item to its list; never rewrite another rule). Every field below is required:
|
|
15
|
+
```
|
|
16
|
+
- id: LR<n>
|
|
17
|
+
name: <short name, at most 60 characters>
|
|
18
|
+
area: project
|
|
19
|
+
origin: project
|
|
20
|
+
moment: review
|
|
21
|
+
skill: lazuli
|
|
22
|
+
rule: <the rule, with its condition>
|
|
23
|
+
why: <why the person wants it, in their words if you can>
|
|
24
|
+
source: 'Correction by the person on <date>: "<their words>"'
|
|
25
|
+
when_to_break: <when an exception is fine>
|
|
26
|
+
break_effect: <the effect a break would give>
|
|
27
|
+
test: <how to check it>
|
|
28
|
+
example: <a page that follows it>
|
|
29
|
+
counterexample: <a page that breaks it>
|
|
30
|
+
```
|
|
31
|
+
Write `source` as a YAML single-quoted string and double any apostrophe in the person's words (`don''t`), or the whole file stops parsing.
|
|
32
|
+
`moment` is `create`, `review`, `adapt`, `signal` or `check`; use `review` unless the rule is about a choice made before the page exists.
|
|
33
|
+
- When the property can be measured, add `measure: style.value` and a `threshold` with the `selector`, the CSS `property`, and a limit: `min` and/or `max` (numbers) or `forbid` (a list of values). Example: `threshold: { selector: ".hero h1", property: "font-size", min: 40 }`.
|
|
34
|
+
- When it cannot be measured, leave `measure` out. The `test` text is what the reviewer checks.
|
|
35
|
+
4. **Validate.** Run `lazuli list-rules --area project`. It must exit 0 and show the new rule, with no "Learned rules problems" block. A problem names the field to fix.
|
|
36
|
+
5. **Prove it on the page.** Run `lazuli check-design <target> --area project` on the corrected page: the LR finding passes. When the version before the correction still exists (a copy, a git checkout), run it on that too: the LR finding fails. A rule that cannot fail on the old version is not testing the correction, so fix the threshold. A note saying no visible element matches the selector means the condition did not hit the page: fix the selector. A rule with no `measure` is not measured by `check-design`; say that it is checked by the reviewer.
|
|
37
|
+
6. **Record it.** Add one line under `## Learned rules` in `LAZULI.md`: `- LR<n>: <name> (.lazuli/rules/learned.yaml)`.
|
|
38
|
+
7. **Tell the person** the id, the condition, whether it is measured or reviewed, and what the two runs showed.
|
|
39
|
+
|
|
40
|
+
## What never to say
|
|
41
|
+
Never say the rule is proven right. It records one correction and checks that the page follows it.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# review-design
|
|
2
|
+
|
|
3
|
+
A reviewer who did not take part in the work gives a verdict: `redo`, `fix` or `approve`. The builder never fills in a first look or a review.
|
|
4
|
+
|
|
5
|
+
In this file `lazuli <command>` means `node "<KIT_PATH>/bin/lazuli.mjs" <command>` (see "Running the CLI" in `SKILL.md`). Run every command below one at a time, never in parallel.
|
|
6
|
+
|
|
7
|
+
## Steps
|
|
8
|
+
1. **Measure.** Run `lazuli check-design <target> --width 1440,768,390` right before the capture, so the report the capture copies is current and covers all three widths (1440, 768 and 390). A report from an earlier run, or from the hook (one width), is not enough.
|
|
9
|
+
When a goal's `Target` is a symbol (an SVG, PNG or ICO) or the goal has a `Size`, it is not a screen: run `lazuli check-design --asset <Target>` in place of the three-width check and put its report, with the `Files written:`, in the review. `--asset` measures but is not the review. For a piece with text and a canvas width of 200 px or more, run the page check `lazuli check-design <Target> --width <canvas width> --area color,typography` first and quote its findings in the review: text contrast (RV2) is a WCAG norm, and a norm fail there blocks delivery like any page norm. Run `--asset` last: it keeps that page report beside its own, and the capture puts both in the reviewer packet. For a symbol, also have the blind look at small sizes done by a plain fresh agent given only the path printed as `Blind look sheet:` (see `lazuli-graphic-identity`), and report its answer in words.
|
|
10
|
+
When the motion area ran (`check-design <target> --area motion`), open the filmstrip path that the motion report prints (`Frames for review: <path>`) and attach that file to the review (the capture does not carry it), so the reviewer judges MR11 from `filmstrip.png` in words.
|
|
11
|
+
When the content area ran (`check-design <target> --area content`), run the swap test of CR12 as a reviewer: a fresh agent that did not write the copy replaces the product name with a competitor's in the main heading, the first paragraph and the main button, and says in words which lines still hold (see `lazuli-content-voice`); quote its answer in the review. Have the reviewer also judge CW6 in words, heading by heading and label by label: it is the WCAG 2.2 2.4.6 norm (headings and labels describe topic or purpose), no measure reads it, and a declared break never waives it.
|
|
12
|
+
When CR14 names large images shown recolored, ask the reviewer whether each treated image is proof (a customer, a result, the product as received); quote the answer in the review.
|
|
13
|
+
On a page with sales copy (prices, discounts, a deadline or a stock line, numbers, or health, income or result claims), have the reviewer also walk CR13 as a checklist: one line per claim with where its source is shown on the page, or "no source on the page"; quote the list in the review. In regulated sectors (food supplements, health, finance) a person who knows the local regulation reviews the claims; the kit does not.
|
|
14
|
+
When the data area ran and the page has charts, open each chart sheet path that the report prints (`Charts for review: <path>`, a `charts-<width>.png` per width) and attach that file to the review (the capture does not carry it), so the reviewer says in words what each simulated view still shows; it goes to the reviewer only, never to the first look.
|
|
15
|
+
2. **Task test.** When a goal of the page has a `Do` and a `Target`, and `LAZULI.md` has an `## Audience`, run the `lazuli-ux-task-test` skill before the capture, so the reviewer packet lists the recorded task. Take the audience's device width for `--width` from the Audience. With no Audience, ask for it in director mode, or write a one-line assumption in delegate mode (see the skill). If neither is possible, say the task test was not run, and why. A recorded task never satisfies the effect gate by itself: the reviewer's verdict does that.
|
|
16
|
+
3. **Capture.** Run `lazuli capture <target> --width 1440,768,390`. It prints the capture folder and then the order to follow:
|
|
17
|
+
- `1. First look: give <path> to a reader who has not seen the project.` That path is the first look prompt, in the system temp folder or `~/.lazuli-tmp`, never in the capture folder.
|
|
18
|
+
- `2. lazuli record-first-look --file <answers.json>`
|
|
19
|
+
- `3. Review: give <path>/review.md to a separate reviewer; it reads the stored first look.` That path is the reviewer packet.
|
|
20
|
+
- `4. lazuli record-review --file <verdict.json>`
|
|
21
|
+
Use these printed paths. Never point an agent at the capture folder for the first look: the first-look images live in the blind folder on purpose, outside the project, and they live until `record-first-look` removes them. If the system cleaned that folder first, run `capture` again.
|
|
22
|
+
4. **First look.** Start a fresh `lazuli-first-look` agent (pick the `lazuli-first-look` agent whatever prefix your host shows). Give it only the first look prompt path (step 1 of the printed order): no goals, no idea, no conversation. 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; the first-look prompt itself carries no brief, so keep the goals, the idea and the decisions out of those, or the first look is not blind. Save the JSON it returns, unchanged, to a file in the project (for example `.lazuli/first-look-answer.json`) and run `lazuli record-first-look --file <that file>`. It checks every width is answered, stores the first look and deletes the blind folder. Redoing a first look needs a new capture (back to step 3).
|
|
23
|
+
5. **Review.** Start a fresh `lazuli-design-reviewer` agent (the `lazuli-design-reviewer` agent whatever prefix your host shows). Give it only the reviewer packet path (step 3 of the printed order). Save the JSON it returns, unchanged, to a file (for example `.lazuli/review-answer.json`) and run `lazuli record-review --file <that file>`. If the record is refused, read the message and ask the reviewer again with the same packet (for example when a goal was not judged). Never edit the returned JSON yourself.
|
|
24
|
+
6. **Quote the verdict.** Say the verdict, who reviewed, whether the idea is `shown`, `missing` or `none`, each goal's understand, feel and do with the reviewer's evidence, and the fixes. Then run `lazuli check-goals` for the recorded state.
|
|
25
|
+
7. **Act on it.**
|
|
26
|
+
- `approve`: continue to delivery.
|
|
27
|
+
- `fix`: make the fixes, then start again from step 1 with a new capture. A review is stale once the page changes.
|
|
28
|
+
- `redo`: go back to the directions step of `procedures/create.md` (step 3).
|
|
29
|
+
|
|
30
|
+
## Without subagents
|
|
31
|
+
Another host may not run subagents. Then ask the person, or a separate session of the agent that has not seen this work, to read the first look prompt and then the reviewer packet, and return their JSON. Store it with `record-first-look` and `record-review`. Never answer the first look or the review yourself, not even as an exercise.
|
|
32
|
+
|
|
33
|
+
When no fresh agent and no person can run the first look or the review, record the review as pending: write a file with `{ "captureId": "<the capture folder name>", "verdict": "pending", "reason": "<who or what was missing>" }` and run `lazuli record-review --file <that file>`. A pending review needs no first look, no goals, no fixes and no reviewer. The gate stays closed on it and `check-goals` shows the reason. Say in the hand-off that the piece is not reviewed and that the review is pending, and say what is open. A later real review of a new capture replaces it.
|
|
34
|
+
|
|
35
|
+
## What never to say
|
|
36
|
+
Never say an effect was achieved. A review records what a reviewer judged from screenshots and measurements; it is not a test with people.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# show-options
|
|
2
|
+
|
|
3
|
+
Explore 6 to 9 different compositions of the piece as thumbnails, measure each, and choose one before any final code. The options are sketches. They are never delivered.
|
|
4
|
+
|
|
5
|
+
In this file `lazuli <command>` means `node "<KIT_PATH>/bin/lazuli.mjs" <command>` (see "Running the CLI" in `SKILL.md`). Run captures and checks one at a time, never in parallel.
|
|
6
|
+
|
|
7
|
+
## Needs
|
|
8
|
+
- An idea. `## Idea` in `LAZULI.md` must hold one sentence. If it is empty, do step 2 of `procedures/create.md` first: every option serves that sentence, so there is nothing to compare without it.
|
|
9
|
+
- A goal for the piece with its `Target:` and, for a page that scrolls, its `Rhythm:` line (`set-goals`).
|
|
10
|
+
- For a break on the options, one goal for the folder, `Target: ./.lazuli/options/<piece>/*.html`, not one goal per option file. It is never gated and never a screen. A break that applies to one option names it: `lazuli record-break --piece "<options goal>" --target <option file> ...`. `render-options` applies the breaks to each option through the goals that cover it, and the sheet lists them as breaks.
|
|
11
|
+
|
|
12
|
+
## Mode
|
|
13
|
+
Read `## Mode` in `LAZULI.md`.
|
|
14
|
+
- `director`: show the sheet with each option's measures and wait for the person's choice.
|
|
15
|
+
- `delegate`: choose, say why in plain language with no design terms, and go on.
|
|
16
|
+
|
|
17
|
+
## Steps
|
|
18
|
+
1. **Read the moves and the grid.** `lazuli list-rules --moment create --area ui`. The moves are UC ids, the grid rules are UG ids. Read each move's `works_when` and `excess_when`.
|
|
19
|
+
2. **Write 6 to 9 option files** in `.lazuli/options/<piece>/` (or another folder you name), one HTML file each, starting from `../../lazuli-ui-composition/references/option-template.html` (that path is from this file's folder). Each option is a different composition: different moves or a different grid, not a different palette or font on the same layout. In an HTML comment at the top of each file, name the moves it uses by UC id and the grid it follows by UG id. Fewer than 6 or more than 9 files is refused.
|
|
20
|
+
3. **Render and measure.** `lazuli render-options .lazuli/options/<piece> --width 1440`. The option canvas is one first view, 900 px tall and 1440 px wide by default, so render it at its own width only: a narrower width shows a crop of it, and the sheet says so. When `## Audience` in `LAZULI.md` names a phone as the main device, set `body` to `390px` wide in each option and render with `--width 390 --height 844` instead (a 390 by 844 phone, the kit's phone width); add `--screens 3` when the brief asks to see proof or offer, so each thumbnail shows the first three screens (the measures still read the first view). A later run at another width keeps the earlier measures in `options.json` while the option file names and the height stay the same; if you rename, add or remove a file, or render at another height, the earlier widths are dropped and the output says so. It writes one contact sheet, with the measures under each thumbnail. With `--baseline <page>` (a page made without the kit for the same brief) each label also gives the option's distance from it, a measurement under hypothesis H1 and not a verdict. `lazuli compare-designs --options <folder> --baseline <page>` lists the options from near to far on the same distance; give it the same `--width` and `--height` as `render-options`, so each option is read at its own canvas (1440 wide by default). Open the sheet and look at it.
|
|
21
|
+
4. **Read the measures and name the tension.** The sheet prints scale contrast, empty space and focal point for each option. Tension (what pulls against what) is not computed: judge it from the sheet, where the focal offset and the empty cells help, and say it in words for each option. The sheet never ranks options and never picks a best one, and neither do you: the choice is a judgment about the idea. A hint id on a thumbnail is a hint from a hypothesis, not a failure.
|
|
22
|
+
5. **Choose.** Director mode: show the sheet with the measures and your words on each, then wait. Delegate mode: choose one, and justify it from the idea and the measures in plain language.
|
|
23
|
+
6. **Log the choice.**
|
|
24
|
+
`lazuli record-decision --decision "Grid: <the grid chosen, the idea it serves, the alternative rejected>" --piece "<goal piece>" --goal "<the goal it serves>" --rule "<UG id> followed" --measure "<what the sheet measured>"`
|
|
25
|
+
`lazuli record-decision --decision "Move: <the move> on <the block it shapes>" --piece "<goal piece>" --goal "<the goal it serves>" --rule "<UC id> followed" --measure "<what the sheet measured>"`
|
|
26
|
+
Run it once per rule id the chosen option follows: one call for the grid (a UG id) and one for each move (a UC id), each with its own decision text; `--rule` takes a single id, and an unknown id is refused. The same decision text on the same piece replaces the earlier entry, so reusing one text for two ids keeps only the last. This is where the grid decision is logged, once, after the choice: do not log the grid before the options exist, because the options may vary it. Choosing follows a rule. Two cases are breaks, not choices: a move pushed past its `excess_when`, and a grid broken on purpose (UG3). Declare each with `break-a-rule` first (effect and check, then `lazuli record-break --status trying`). In director mode, ask the person before applying a break and wait for the answer. Log its decision marked `broken` only after the break is kept, which needs a recorded review (`procedures/review-design.md`). Never log a break as followed.
|
|
27
|
+
7. **Say the rest in words** next to the chosen composition: the palette intent and the type pairing, each with the goal it serves.
|
|
28
|
+
|
|
29
|
+
## A piece that is not a page
|
|
30
|
+
A logo or a post has no scroll. Make each option an HTML page that holds the piece at its real size, and read the layout measures on the sheet as data only. Symbol scale checks come in a later version, so do not claim them.
|
|
31
|
+
|
|
32
|
+
## What never to say
|
|
33
|
+
Never say an option is the best, or that a measure shows it will work. The sheet describes the first view and the sequence. Never say an effect was achieved: that is judged by a reviewer after the piece is built.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lazuli-accessibility-check
|
|
3
|
+
description: Use when a page, mock or component exists and needs checking against WCAG 2.2 ("is this accessible", "can keyboard users reach everything", "check this page against WCAG", "buttons without names", "focus indicator", "tap targets too small", "screen reader"), alongside the work of any other area.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Accessibility check on a finished screen
|
|
7
|
+
|
|
8
|
+
Accessibility is not a phase. This skill runs next to every other area: color, type and layout decisions all land on a page that people use with keyboards, screen readers, zoom and small screens. The rules are AP1 to AP6 (`../lazuli/rules/accessibility/perceivable.yaml`), AO1 to AO4 (`../lazuli/rules/accessibility/operable.yaml`), AU1, AU2 (`../lazuli/rules/accessibility/understandable.yaml`) and AR1 (`../lazuli/rules/accessibility/robust.yaml`) after install (in a kit checkout: `rules/accessibility/perceivable.yaml` and its siblings). The WCAG 2.2 rules are norms, which means a published standard that is met or not met and cannot be traded away: each cites its success criterion and level. Only AP4 (a W3C technique), AP5 (WCAG 1.4.10 read at every checked width, our claim), AP6 (hypothesis H2) and AU2 (a phrase list, `HYPOTHESES.md` H1) are hints.
|
|
9
|
+
|
|
10
|
+
Do not use when:
|
|
11
|
+
- the question is only text contrast: that is `lazuli-color-screen-review` (rule RV2), not repeated here;
|
|
12
|
+
- the page does not exist yet and the question is about choosing fonts or colors: use the matching area skill, then come back here.
|
|
13
|
+
|
|
14
|
+
## Procedure
|
|
15
|
+
1. Render and measure: `check-design <target> --area accessibility --width 1440,390`. Without a render, nothing is checked.
|
|
16
|
+
2. Read the fails first. A norm fail stays a fail: a declared break never waives it (`break-a-rule` does not apply to a norm). Say which criteria failed by number.
|
|
17
|
+
3. Read the hints (AP4, AP5, AP6, AU2) and decide for each whether it is a real problem or has context that answers it.
|
|
18
|
+
4. Fix, then measure again. The job is done only when the second measurement shows the fails gone.
|
|
19
|
+
5. Do the part the measurer cannot do (below), or say clearly that it was not done.
|
|
20
|
+
|
|
21
|
+
## What to vary and what not
|
|
22
|
+
A norm is met or it is not. What a designer can vary is how it is met: the look of the focus ring (AO1), a larger hit area through padding or more space around small targets (AO3), growing boxes instead of fixed heights (AP3), a stacked layout at 320 px (AP2), where a control's name comes from (AR1). Do not invent a break to excuse a fail.
|
|
23
|
+
|
|
24
|
+
## What the measurer cannot check
|
|
25
|
+
Give these to the agent or a person, and list them in the answer as not checked:
|
|
26
|
+
- the whole screen reader flow: reading order, whether alternatives and link texts are good words, live announcements;
|
|
27
|
+
- keyboard use beyond the first Tab stops: menus, dialogs, custom widgets, traps further in, shortcuts;
|
|
28
|
+
- flashes and moving content: run `check-design <target> --area motion` (norms MR12 and MR13 in the motion skill), which records them at the first width only and reads the first view only (content lower down the page, or shown only after a scroll, is not read);
|
|
29
|
+
- captions and transcripts for audio and video;
|
|
30
|
+
- cognitive load: plain wording, clear errors, predictable behavior;
|
|
31
|
+
- the width and height rules not measured (the 256 px height case of reflow, zoom to 200 percent) and exemptions that need judgment (Equivalent and Essential in AO3).
|
|
32
|
+
|
|
33
|
+
## Reading the report
|
|
34
|
+
| Measure | Rule | A fail or hint means | Fix |
|
|
35
|
+
|---|---|---|---|
|
|
36
|
+
| a11y.names | AR1 | a control has no accessible name | add a text label or aria-label |
|
|
37
|
+
| a11y.alt | AP1 | a content image has no text alternative | add alt text, or alt="" if purely decorative |
|
|
38
|
+
| a11y.reflow | AP2 | the page scrolls sideways at 320 px | stack the layout in one column |
|
|
39
|
+
| a11y.text-spacing | AP3 | text is cut off with the spacing override | let boxes grow, no fixed heights |
|
|
40
|
+
| layout.sideways | AP5 | the page scrolls sideways at a checked width (hint) | find the block wider than the viewport |
|
|
41
|
+
| a11y.decorative-images | AP6 | every large image is alt="" (hint) | give each image that carries content a text alternative |
|
|
42
|
+
| a11y.headings | AP4 | no h1 or a skipped level (hint) | one h1, then h2, h3 in order |
|
|
43
|
+
| a11y.focus-visible | AO1 | focus shows no change | add a visible outline on focus |
|
|
44
|
+
| a11y.focus-obscured | AO2 | focus is entirely covered | add scroll-padding-top equal to the sticky bar height |
|
|
45
|
+
| a11y.target-size | AO3 | a target under 24 by 24 px with no space around | pad it to 24 px or add space around |
|
|
46
|
+
| a11y.title | AO4 | empty page title | write a short title that names the page |
|
|
47
|
+
| a11y.lang | AU1 | no lang on the html element | set lang, for example pt-BR |
|
|
48
|
+
| a11y.generic-links | AU2 | a link named only by a generic phrase (hint) | name the link by where it goes |
|
|
49
|
+
|
|
50
|
+
Never write that a page "is accessible" or "passes WCAG". Write which criteria were checked, which failed, and which were not checked.
|
|
51
|
+
|
|
52
|
+
## Delegate mode
|
|
53
|
+
When the person is not technical, describe each problem in plain words ("this button has no name, so a screen reader says only 'button'"), fix it, and end with one list: what was checked, what was fixed, what still needs a person.
|
|
54
|
+
|
|
55
|
+
## Expected output
|
|
56
|
+
```
|
|
57
|
+
Checked with check-design (1440 and 390): criteria 1.1.1, 1.4.10, 1.4.12, 2.4.2, 2.4.7, 2.4.11, 2.5.8, 3.1.1, 4.1.2.
|
|
58
|
+
AR1 (4.1.2): 2 icon buttons without a name. Fix: aria-label.
|
|
59
|
+
AO3 (2.5.8): close and open icons 16 by 16 px, no space. Fix: 24 px hit area.
|
|
60
|
+
Not checked: screen reader flow, keyboard use beyond the first stops, captions.
|
|
61
|
+
After the fix: measured again? yes, 0 fails.
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Common errors
|
|
65
|
+
- Saying the page is accessible because the report is clean.
|
|
66
|
+
- Excusing a norm fail with a break.
|
|
67
|
+
- Fixing contrast here instead of in the color rules (RV2).
|
|
68
|
+
- Testing only 1440 and not the phone width.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lazuli-color-context-and-culture
|
|
3
|
+
description: Use when a chosen palette must work for a specific audience, country, sector, age group, religion or moment ("does this work in Brazil?", "audience 50+", "health, food, bank or government brand", "pink and blue for girl and boy?"), or when someone claims a color "means" something.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Color meaning by context
|
|
7
|
+
|
|
8
|
+
Color associations are learned, not innate. The data behind them comes from about two thousand people in Germany, aged 14 to 97. Outside Germany, what was measured is a strong hypothesis, not a fact. This skill is a modifier: it runs after a palette exists and decides what stays, what changes and what needs a test with the real audience.
|
|
9
|
+
|
|
10
|
+
The rules live in `../lazuli/rules/color/adapt.yaml` after install (in a kit checkout: `rules/color/adapt.yaml`) (ids CX1 to CX8). Sector lines are in `references/sectors.md`, the table that rule CX6 checks against.
|
|
11
|
+
|
|
12
|
+
Do not use when:
|
|
13
|
+
- there is no palette yet: start with `lazuli-color-palette-by-intent`;
|
|
14
|
+
- the question is legibility, area or contrast: use `lazuli-color-screen-review`;
|
|
15
|
+
- the color is a state (error, success, alert): use `lazuli-color-states-and-signals`. Signal conventions are international.
|
|
16
|
+
|
|
17
|
+
## Procedure
|
|
18
|
+
1. Classify each association the palette relies on (CX1): physical basis, international convention, European or German, German idiom. Only the first two travel without a test.
|
|
19
|
+
2. Run the sector in `references/sectors.md` (CX6): the chord that usually works and the trap.
|
|
20
|
+
3. Run the audience: age (CX4), gender coding (CX5), religion and country (CX2), climate (CX3).
|
|
21
|
+
4. Check historical and political load for the destination country (CX7).
|
|
22
|
+
5. Check the names that will appear in copy, product or tokens (CX8).
|
|
23
|
+
6. For everything still a hypothesis in the target country, propose a short test (starting hypothesis: 5 to 8 people from the audience, a 5 second look at a screenshot; adjust to the project) and an open question ("what kind of company is this?", "what word comes to mind?"). Record the answers before asserting anything.
|
|
24
|
+
|
|
25
|
+
When someone says "studies prove color X means Y": answer with the origin (the most cited research is spontaneous association among Germans, not proof of effect), do not invent a local meaning in its place, and offer the test in step 6. Never use "color X means Y" as an argument in campaign copy.
|
|
26
|
+
|
|
27
|
+
For an audience of 50 and older, or a pale cool palette, the legibility risk belongs to `lazuli-color-screen-review` (RV2). Flag it and hand over.
|
|
28
|
+
|
|
29
|
+
## Rule index
|
|
30
|
+
| Ids | Theme |
|
|
31
|
+
|---|---|
|
|
32
|
+
| CX1 | classify the origin of an association before trusting it |
|
|
33
|
+
| CX2, CX3 | mourning, feast and sacred change by culture; climate changes warm and cool |
|
|
34
|
+
| CX4, CX5 | age shifts preference; do not code gender by color alone |
|
|
35
|
+
| CX6 | sector chord and trap |
|
|
36
|
+
| CX7, CX8 | political and historical load; the name changes the perception |
|
|
37
|
+
|
|
38
|
+
## Breaking a rule
|
|
39
|
+
Leaving a sector chord is allowed when the reason is written (see CX6 `when_to_break`). Use the break log procedure in the `lazuli` skill and keep the test from step 6 as the check.
|
|
40
|
+
|
|
41
|
+
## Expected output
|
|
42
|
+
```
|
|
43
|
+
Palette: blue, white, silver | Audience: Brazil, 35 to 60, health
|
|
44
|
+
CX1: blue = trust (European, strong hypothesis in Brazil; test) | blue = cold (physical, travels)
|
|
45
|
+
CX3: hot climate, cold reads as freshness (favorable hypothesis)
|
|
46
|
+
CX6 health: expected chord ok; trap = total white (see RV8)
|
|
47
|
+
Proposed test (illustrative): a few people, a short look at a screenshot, "what word comes to mind?"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Common errors
|
|
51
|
+
- Quoting "red means X" as universal without saying where it comes from.
|
|
52
|
+
- Inventing a local meaning. With no source, the answer is "I do not know; test it like this".
|
|
53
|
+
- Using the religious or political sense of a color as decoration.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Sectors: expected chord and trap
|
|
2
|
+
|
|
3
|
+
Our own synthesis from Heller's *Psychology of Color*. "Expected" is what the audience tends to read as right for the sector. It is not an obligation. Rows without a chapter are our hypothesis. Rule CX6 compares a palette against these lines: leaving the expected chord needs a written reason, and landing in a trap without one is a fail.
|
|
4
|
+
|
|
5
|
+
| Sector | Expected chord (usually works) | Trap | Basis in the book |
|
|
6
|
+
|---|---|---|---|
|
|
7
|
+
| Health, clinic | calm green and blue, warmed white | cold total white (feels like a hospital stay); dominant red; acid green (poison) | Green s.4, s.13, s.18; White s.7 |
|
|
8
|
+
| Hygiene, cleaning | dominant white, blue, silver | brown, dull gray (dirty) | White s.7; Blue s.20 |
|
|
9
|
+
| Food in general | the food's own colors, warm neutral background | a strange color on food; colored overlay on a photo | Red s.20 to s.22; Blue s.1 |
|
|
10
|
+
| Sweets, confectionery | pink, orange, yellow | pink plus violet plus black (turns adult and sensual, fine only for liqueur chocolates) | Pink s.8 |
|
|
11
|
+
| Coffee, chocolate, dark beer, barbecue | textured brown, gold as a detail | flat brown with no photo (reads ugly and old-fashioned) | Brown s.1, s.5 |
|
|
12
|
+
| Cold drinks and frozen goods | blue, white, silver | dominant red and orange | Blue s.7; Silver s.9; White s.16 |
|
|
13
|
+
| Natural, organic, eco | green, white, brown, blue | violet, silver, pink (artificial); "green" as varnish with no proof | Green s.3; Violet s.13 |
|
|
14
|
+
| Whole-grain, artisanal, premium food | raw, beige, natural dark tones | pure white (reads refined and industrial) | White s.16 |
|
|
15
|
+
| Banking, insurance, legal, accounting | blue, white, gray, gold as a detail | flat orange and pink (not serious); brown (low formality) | Blue s.2; White s.3; Orange s.6; Brown s.6 |
|
|
16
|
+
| Government, city hall, public institution | blue and white, discreet gold if there is a coat of arms | party color; dominant red; designer violet | Blue s.24; White s.3. Party: hypothesis |
|
|
17
|
+
| Technology, SaaS, B2B | blue, silver or gray, white, one accent | gray with yellow or pink (insecurity); brown | Silver s.11; Gray s.4 |
|
|
18
|
+
| Sport, mobility, automotive | red, silver, blue | dull gray, brown | Red s.17; Silver s.3 |
|
|
19
|
+
| Luxury, jewelry, high fashion | black, silver, white, gold as a detail; violet with silver for the unconventional | too much gold; orange; flat pink; unfinished gray | Black s.16; Gold s.10, s.14; Silver s.12 |
|
|
20
|
+
| Children (parents are the buyers) | light luminous colors, yellow, orange, blue, pink without the stereotype | black plus yellow (construction site); pink and blue as the only gender code | Yellow s.2; Pink s.4, s.5 |
|
|
21
|
+
| Education | blue plus white (focus) with yellow or orange (curiosity) | dominant gray (boredom) | Blue s.10; Gray s.2 |
|
|
22
|
+
| Leisure, tourism, events | orange, yellow, red, sky and sea blue | gray, dominant black | Orange s.4 |
|
|
23
|
+
| Cosmetics and beauty | pink, white, gold as a detail; violet for indulgence | lilac as "the color of the mature woman" (stereotype) | Pink s.3; Violet s.8, s.18; Gold s.9 |
|
|
24
|
+
| Creative, agency, culture | violet, orange, blue (fantasy) | dates fast if it is the main color (see PA10) | Blue s.5; Violet s.12 |
|
|
25
|
+
| Discount retail, promotion | red for discounts, yellow or orange for highlights | dominant orange read as an unwanted flyer | Red s.16; Orange s.5 |
|
|
26
|
+
| Religion (Catholic) | gold instead of yellow; violet in penance; white on feast days | isolated yellow in a liturgical setting | Yellow s.12; Violet s.6 |
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lazuli-color-palette-by-intent
|
|
3
|
+
description: Use when choosing or proposing colors from scratch for a brand, landing page, product or interface from an intent, emotion or positioning ("make it feel trustworthy", "it must look premium", "something fun for kids"), or when a brief asks for a palette and only brings adjectives; it builds the palette from the effect it should have on people.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Palette by intent
|
|
7
|
+
|
|
8
|
+
A color alone has no fixed effect. The effect comes from the chord: the main color plus the two or three that appear with it. The same color turns positive or negative with its company. This skill turns an intent into a chord, an area split and usage rules, then measures the palette on a render and leaves the effect to a separate reviewer or a test with people.
|
|
9
|
+
|
|
10
|
+
The rules live in `../lazuli/rules/color/create.yaml` after install (in a kit checkout: `rules/color/create.yaml`) (ids PA1 to PA11). Each one carries its hypothesis, its test, and when it may be broken on purpose. Read the rule text there, do not work from memory.
|
|
11
|
+
|
|
12
|
+
Do not use when:
|
|
13
|
+
- the screen already exists and the question is "is it good?": use `lazuli-color-screen-review`;
|
|
14
|
+
- the question is whether it works for a country, sector or age: choose here, then run `lazuli-color-context-and-culture`;
|
|
15
|
+
- the subject is error, alert, success, charts or component states: use `lazuli-color-states-and-signals`.
|
|
16
|
+
|
|
17
|
+
## Procedure
|
|
18
|
+
1. Read `LAZULI.md` (Goals, Audience, Mode). If there are no goals, run `/lazuli set-goals` first.
|
|
19
|
+
2. Translate the brief into one main intent and at most two secondary ones, using the names in `references/intent-chords.md`. If the brief has five adjectives, ask which wins when two fight. When two intents pull apart, the main one sets the chord and the secondary one sets the treatment (area, purity, finish; PA4, PA7, PA9).
|
|
20
|
+
3. Build the chord from the table: what leads, what accompanies, what to avoid. Cross every pair against the opposites list (PA3) and the accidental combinations (PA1, PA2).
|
|
21
|
+
4. Pick one temperature for the whole palette (PA5), then split area: one small pure color, the rest broken (PA4).
|
|
22
|
+
5. Write the palette as roles, not a hex list: background, surface, text, action accent, brand accent, metal or detail. Each role has a hex, ordered by area.
|
|
23
|
+
6. Declare the intended effect for each piece, then check it on a render with `check-design` (see the `lazuli` skill). Without a render, label the palette "unverified" and do not claim contrast ratios.
|
|
24
|
+
7. If the audience is not German or European, run `lazuli-color-context-and-culture` before closing.
|
|
25
|
+
|
|
26
|
+
A client color that fights the table stays, with a changed role: name the reading it risks, shrink it to text, detail or small accent, and show the alternative beside it.
|
|
27
|
+
|
|
28
|
+
## Breaking a rule
|
|
29
|
+
Every PA rule has `when_to_break` and `break_effect`. To break one, follow the break log procedure in the `lazuli` skill: name the rule id, state the intended effect, say how it will be checked, and log it in `## Breaks`.
|
|
30
|
+
|
|
31
|
+
## Rule index
|
|
32
|
+
| Ids | Theme |
|
|
33
|
+
|---|---|
|
|
34
|
+
| PA1, PA2, PA3 | the chord, black beside color, psychological opposites |
|
|
35
|
+
| PA4, PA5, PA6 | area split, one temperature, purity |
|
|
36
|
+
| PA7, PA9 | metal as a detail, elegance by renunciation |
|
|
37
|
+
| PA8, PA10 | cliche against surprise, how fast a color dates |
|
|
38
|
+
| PA11 | warm advances, cool recedes, light above heavy |
|
|
39
|
+
|
|
40
|
+
## Expected output
|
|
41
|
+
```
|
|
42
|
+
Intent: trust (main), modern (secondary)
|
|
43
|
+
Chord: blue leads; white and silver accompany; avoid brown and flat orange
|
|
44
|
+
Temperature: cool
|
|
45
|
+
Roles by area: background | surface | text | detail | action (smallest area, pure)
|
|
46
|
+
Opposites (PA3): none | Black (PA2): graphite in text only
|
|
47
|
+
Verified on a render: yes/no (which test, which result)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Common errors
|
|
51
|
+
- Handing over five hex values with no role or area. Without proportion there is a swatch, not a chord.
|
|
52
|
+
- Completing the "emotion" color with a trendy one and creating an opposite pair.
|
|
53
|
+
- Using black as the neutral companion on a cheerful brand (PA2).
|
|
54
|
+
- Treating the result as universal. The research behind it asked people in Germany.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Intent chords
|
|
2
|
+
|
|
3
|
+
Our own synthesis in 15 composite intents, shaped the way a brief usually arrives. Base: the spontaneous color associations in Eva Heller's *Psychology of Color* (a survey of people in Germany). It does not copy the book's tables: each row joins several findings into one project intent, and color strength is described in words. Outside Germany, validate with the skill `lazuli-color-context-and-culture`.
|
|
4
|
+
|
|
5
|
+
How to read it: **Leads** is the color that pulls the meaning. **Accompanies** completes the chord. **Avoid together** lists the colors that invert or contradict the effect. **Accepted opposite pairs** are opposites that already belong to the chord (see rule PA3).
|
|
6
|
+
|
|
7
|
+
| # | Composite intent | Leads | Accompanies | Avoid together | Accepted opposite pairs | Chapters |
|
|
8
|
+
|---|---|---|---|---|---|---|
|
|
9
|
+
| 1 | Institutional trust (truth, loyalty, honesty, public service) | blue or white | gold as a detail, green | dark brown, dominant black | none | Blue s.2, s.4, s.24; White s.3 |
|
|
10
|
+
| 2 | Precision and reason (science, technology, focus, data) | blue with white | silver, gray, black in text | brown, pink, mixed colors | none | Blue s.10; White s.4; Silver s.10, s.11; Gray s.4 |
|
|
11
|
+
| 3 | Modern and fast (mobility, sport, technology in motion) | silver or red | blue, white, black | brown, dull gray | red with blue; silver with yellow | Silver s.3, s.11; Red s.17 |
|
|
12
|
+
| 4 | Energy and joy (leisure, party, extroversion) | red, yellow or orange | the other two of the warm trio, sky blue | black, gray | none | Red s.4, s.6, s.8; Yellow s.2; Orange s.4 |
|
|
13
|
+
| 5 | Playful and creative (children, fantasy, a new idea) | yellow or blue | orange, violet, red | gray, brown, black | red with blue (playful) | Yellow s.2; Blue s.5 |
|
|
14
|
+
| 6 | Calm and rest (wellbeing, sleep, waiting) | green or blue | white, a touch of light earth | red, saturated orange | none | Green s.2, s.18; Blue s.20 |
|
|
15
|
+
| 7 | Welcome (care with trust, emotional health) | calm green or blue | light warm neutrals (cream, sand), one warm accent | total white, black, ice blue | none | Green s.18; Brown s.4; Blue s.2; White s.7 |
|
|
16
|
+
| 8 | Natural and healthy (organic, eco, nutrition) | green | white, earth tones, blue | violet, silver, pink | none | Green s.3, s.4 |
|
|
17
|
+
| 9 | Clean and fresh (hygiene, cold drink, freshness) | white or blue | silver, aqua | brown, red, orange | none | White s.7, s.16; Blue s.7; Green s.6 |
|
|
18
|
+
| 10 | Delicate and tender (baby, personal care, soft romance) | pink or white | white, pale yellow, soft red | black, dark violet | none | Pink s.3, s.4; White s.8 |
|
|
19
|
+
| 11 | Quiet elegance (silent premium, fashion, design) | black | silver, white, minimal gold | orange, brown, flat pink | none | Black s.16, s.24; Silver s.12 |
|
|
20
|
+
| 12 | Luxury and prestige (pomp, achievement, celebration) | gold as a detail on dark | black, red, violet, blue | flat yellow, dull gray | blue with gold and red (merit) | Gold s.6, s.9, s.10; Black s.22 |
|
|
21
|
+
| 13 | Singular and disruptive (original brand, avant-garde) | violet | orange, silver, gold | beige, gray, conservative blue | none | Violet s.7, s.12 |
|
|
22
|
+
| 14 | Appetite (sweet, aromatic, intense flavor) | pink (sweet), orange (tasty, spiced) or textured brown (roasted) | yellow, green, gold | blue, gray, a strange color on food | none | Pink s.8; Orange s.3; Brown s.5 |
|
|
23
|
+
| 15 | Mystery and night (adult entertainment, the occult, seduction) | black | violet, silver or gold, red | yellow, pastels | none (careful: with red and pink it turns sexual) | Black s.7; Violet s.9, s.11 |
|
|
24
|
+
|
|
25
|
+
## Intents that accept black beside the main color
|
|
26
|
+
|
|
27
|
+
Rule PA2 keeps pure black away from the main color on cheerful, warm or childlike brands. Black may sit beside it on purpose when the intent is one of these.
|
|
28
|
+
|
|
29
|
+
| Intent named in PA2 | Where it lives | Reading |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| Mystery | row 15 (mystery and night) | black leads, violet or red beside it |
|
|
32
|
+
| Nocturnal elegance | rows 15 and 11 (night, quiet elegance) | black leads, silver or minimal gold beside it |
|
|
33
|
+
| Danger | accidental combinations below (red or orange with black, yellow with black) | alert, warning; right for hazard signage and nothing playful |
|
|
34
|
+
| Power | accidental combinations below (red with black) | aggression and force; not a pilot row, so treat it as our hypothesis and test it with the audience |
|
|
35
|
+
|
|
36
|
+
## Accidental combinations
|
|
37
|
+
|
|
38
|
+
These pairings tend to happen by accident. Treat each as a fail in rules PA1 and PA2 unless the intent asks for it.
|
|
39
|
+
|
|
40
|
+
| Combination | Likely reading | Chapters |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| red or orange with black | aggression, danger, alert | Red s.11, s.12; Orange s.7 |
|
|
43
|
+
| yellow with black | danger; outside a warning, impurity | Yellow s.6, s.9; Black s.6 |
|
|
44
|
+
| red, violet and black (and pink) | immoral, sexual | Red s.13, s.14; Violet s.11 |
|
|
45
|
+
| pale greenish yellow with gray | envy, insecurity, illness | Yellow s.6; Gray s.4 |
|
|
46
|
+
| gray, black and brown | ugly, hostile | Gray s.3; Brown s.2 |
|
|
47
|
+
| gray with brown | boredom, old-fashioned | Brown s.6; Gray s.2 |
|
|
48
|
+
| gold with yellow and orange | showing off, fake gold | Gold s.15 |
|
|
49
|
+
| hot pink with orange and gray | cheap | Pink s.9 |
|
|
50
|
+
| violet with gray and brown | ambiguous, untrustworthy | Violet s.16 |
|
|
51
|
+
| acid green with violet or yellow | poisonous | Green s.13 |
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lazuli-color-screen-review
|
|
3
|
+
description: Use when an interface, page, screenshot, mock or component already exists and its use of color needs judging or fixing ("review the colors", "why does this feel cheap, dull or noisy", "is the text readable", before shipping a generated screen).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Color review on a finished screen
|
|
7
|
+
|
|
8
|
+
The most common mistake is judging color from the code instead of the result. This skill measures the render: area per color, real contrast of text on its real background, and the role of each color. The palette rules (PA) live in `lazuli-color-palette-by-intent` and run here as checks. The review rules (RV1 to RV9) are this skill's own, in `../lazuli/rules/color/review.yaml` after install (in a kit checkout: `rules/color/review.yaml`).
|
|
9
|
+
|
|
10
|
+
Do not use when:
|
|
11
|
+
- there is no screen yet: use `lazuli-color-palette-by-intent`;
|
|
12
|
+
- the question is only about error, alert, success, charts or color blindness: use `lazuli-color-states-and-signals`;
|
|
13
|
+
- the question is cultural or about a sector: use `lazuli-color-context-and-culture`.
|
|
14
|
+
|
|
15
|
+
## Procedure
|
|
16
|
+
1. Render. Run `check-design` on the page at the real widths (1440 and 390). Without a render, the review does not start.
|
|
17
|
+
2. Read the report: color area, text and background pairs under the minimum contrast, text set in chromatic color. These measurements come from the tool, so quote them instead of estimating.
|
|
18
|
+
3. Give each color found a role: background, surface, text, action, brand, state, decoration. A color with no role is a candidate to remove.
|
|
19
|
+
4. Run the RV rules from that same `review.yaml`.
|
|
20
|
+
5. Run PA1 to PA5 on the render. If states or charts exist, run the checks of `lazuli-color-states-and-signals`.
|
|
21
|
+
6. Report in the output format. Each problem carries the rule id, the measured evidence and a proposed fix with a hex.
|
|
22
|
+
7. Fix, render again, measure again. The review closes only when the second render passes.
|
|
23
|
+
|
|
24
|
+
## Rule index
|
|
25
|
+
| Ids | Theme |
|
|
26
|
+
|---|---|
|
|
27
|
+
| RV1, RV2 | judge on the render with numbers, the neighbor changes the color |
|
|
28
|
+
| RV3, RV4 | long text in neutral dark, light surfaces for long reading |
|
|
29
|
+
| RV5 | two strong chromatic colors of equal luminosity vibrate |
|
|
30
|
+
| RV6, RV7, RV8 | function fit (food, health), finish, total white |
|
|
31
|
+
| RV9 | the protagonist element gets the strongest color treatment, alone |
|
|
32
|
+
|
|
33
|
+
## Breaking a rule
|
|
34
|
+
A reviewed screen may keep a failing rule on purpose. Follow the break log procedure in the `lazuli` skill: rule id, intended effect, how it will be checked, then log it in `## Breaks`. Never mark a break as kept without running the check.
|
|
35
|
+
|
|
36
|
+
## Expected output
|
|
37
|
+
```
|
|
38
|
+
Screen: /checkout (1440 and 390)
|
|
39
|
+
Measured: background #FFFFFF 71% | #F2F4F7 18% | blue #2563EB 6% | other 5%
|
|
40
|
+
Contrast: 3 pairs under the minimum (selector, colors, ratio)
|
|
41
|
+
Problems:
|
|
42
|
+
1. RV3: 2 paragraphs in #2563EB. Fix: #1F2937, link color only on the clickable part.
|
|
43
|
+
2. PA3: red button next to a blue banner of equal luminosity (vibrates, RV5).
|
|
44
|
+
After the fix: measured again? yes, 0 pairs under the minimum.
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Common errors
|
|
48
|
+
- Reading the CSS, deciding "looks fine" and never opening the browser.
|
|
49
|
+
- Measuring contrast against the body color when the text sits on a card or an image.
|
|
50
|
+
- Fixing one problem and creating another, such as darkening a button until it turns black and inverts the chord (PA2).
|
|
51
|
+
- Naming a problem without a fix hex.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lazuli-color-states-and-signals
|
|
3
|
+
description: Use when defining or reviewing colors for error, warning, success, info, status, badge, notification, traffic light or any color that carries functional meaning in the interface, and whenever color blindness or color accessibility of those signals is in question.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Color in states, signals and data
|
|
7
|
+
|
|
8
|
+
Here color informs instead of decorating. Signal conventions (red to stop, black on yellow for danger, green for go) are the most international in the research, because they were standardized. The risk is not picking the wrong color. It is relying on color alone, overusing it until the signal wears out, or mixing state colors with brand colors.
|
|
9
|
+
|
|
10
|
+
The rules live in `../lazuli/rules/color/signal.yaml` after install (in a kit checkout: `rules/color/signal.yaml`) (ids ES1 to ES8). Read the rule text there.
|
|
11
|
+
|
|
12
|
+
Do not use when:
|
|
13
|
+
- the color is brand or decoration: use `lazuli-color-palette-by-intent`;
|
|
14
|
+
- the whole screen is under review: use `lazuli-color-screen-review`, which calls this skill for the states part;
|
|
15
|
+
- the question is the cultural meaning of a brand color: use `lazuli-color-context-and-culture`.
|
|
16
|
+
|
|
17
|
+
## Procedure
|
|
18
|
+
1. List the real states of the product (error, warning, success, info, neutral, disabled) and the data scales (categorical, sequential, diverging).
|
|
19
|
+
2. Assign color by convention (ES1) and write the redundancy pair for each state: icon plus text (ES2).
|
|
20
|
+
3. Keep state tokens apart from brand tokens. If the brand color matches a state color, pick a distinguishable shade for the state or reinforce it with an icon (ES6).
|
|
21
|
+
4. Check luminosity between neighboring states and under color blindness simulation (ES3).
|
|
22
|
+
5. For charts, apply ES7 and ES8; the chart itself (form, labels, series colors and color blindness) goes to `lazuli-data-charts-and-dashboards`.
|
|
23
|
+
6. Test on a render: normal, grayscale and deuteranopia (browser DevTools, Rendering, emulate vision deficiencies). Every state must stay identifiable in all three. Run `check-design` for contrast numbers and quote them. Colors of different hue often share a luminosity and collapse into the same gray, so compare state luminosities with each other.
|
|
24
|
+
|
|
25
|
+
Final or inactive states (canceled, archived, disabled) stay neutral with an icon, so they do not compete with states that ask for action.
|
|
26
|
+
|
|
27
|
+
## Rule index
|
|
28
|
+
| Ids | Theme |
|
|
29
|
+
|---|---|
|
|
30
|
+
| ES1, ES5 | follow convention; yellow signals with dark text on top |
|
|
31
|
+
| ES2 | never color alone |
|
|
32
|
+
| ES3, ES4 | red and green confusion, contrast against the surroundings |
|
|
33
|
+
| ES6 | state color used as decoration loses its force |
|
|
34
|
+
| ES7, ES8 | severity runs yellow, orange, red; few chromatic colors in a chart |
|
|
35
|
+
|
|
36
|
+
## Breaking a rule
|
|
37
|
+
A brand may deviate from a convention with a written reason (see each rule's `when_to_break`). Follow the break log procedure in the `lazuli` skill and check the deviation in all three renders from step 6.
|
|
38
|
+
|
|
39
|
+
## Expected output
|
|
40
|
+
```
|
|
41
|
+
State | background | text/icon | icon | contrast | deuteranopia
|
|
42
|
+
error | #FDECEC | #7F1D1D | circle x | <ratio>:1 | much darker than success, plus icon
|
|
43
|
+
warning | #FFF4CC | #5C4400 | triangle ! | <ratio>:1 | ok
|
|
44
|
+
success | #E7F6EC | #1A7F3C | check | <ratio>:1 | ok
|
|
45
|
+
(illustrative table; fill the ratios from the tool, not by hand)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Common errors
|
|
49
|
+
- A field with an error shown only by a red border and no message.
|
|
50
|
+
- Red and green of equal luminosity in an order status.
|
|
51
|
+
- A "new" badge in error red.
|
|
52
|
+
- Warning text in yellow on white.
|
|
53
|
+
- A chart with nine saturated colors and a distant legend.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lazuli-content-interface-writing
|
|
3
|
+
description: Use when writing or reviewing the words of an interface, such as button and link labels that only say Submit or OK, headings, form labels, the wording of error messages that only say Invalid and of empty states, one consistent name or term per thing across screens, and checking that layouts survive longer translated text, long Portuguese text, empty lists, one item and hundreds of items.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Interface writing
|
|
7
|
+
|
|
8
|
+
The words of the interface say what happens, what went wrong and what a thing is called, and they keep working when they grow. Writing rules are CW1 to CW8 (`../lazuli/rules/content/writing.yaml`), review rules CR1 to CR13 (`review.yaml`) in the same folder, after install (in a kit checkout: `rules/content/`). The cutoffs and phrase lists of CR1 to CR11 are hypotheses with ids in `HYPOTHESES.md`, so those findings are hints. CW6 is WCAG 2.4.6, a norm.
|
|
9
|
+
|
|
10
|
+
Do not use when:
|
|
11
|
+
- the question is how the product sounds (voice, tone, words to avoid): use `lazuli-content-voice`;
|
|
12
|
+
- the question is where an error message sits and how it is tied to its field: use `lazuli-ux-flows-and-forms`;
|
|
13
|
+
- the question is a link name alone or a page title: use `lazuli-accessibility-check`;
|
|
14
|
+
- the question is a state of a component rather than its words: use `lazuli-ui-states-and-system`.
|
|
15
|
+
|
|
16
|
+
## Write
|
|
17
|
+
1. Read `## Audience`, `## Language` and `## Voice` in `LAZULI.md` first. Write in the audience's words, in its language.
|
|
18
|
+
2. Each button names its outcome: "Send message", never "Submit" or "OK" (CW1). A label leads with the verb and the object and stays short (CW3).
|
|
19
|
+
3. One name per thing. Keep a short terms list in `DESIGN.md` and reuse it on every screen (CW2). Log it under a text of its own:
|
|
20
|
+
`lazuli record-decision --decision "Terms: <each thing and the one name it keeps>" --piece "<goal piece>" --goal "<the goal it serves>" --rule "CW2 followed" --measure "<check-design with --site, CR5 and CR6>"`
|
|
21
|
+
4. An error message says what went wrong, where, and how to fix it (CW4). Use one capitalization style for every control (CW5).
|
|
22
|
+
5. Headings and labels describe their topic or purpose (CW6). This is a norm: never waived by a break.
|
|
23
|
+
6. Design for growth and for zero, one and hundreds of items (CW7, CW8): leave room, let boxes grow, and write what an empty list says.
|
|
24
|
+
|
|
25
|
+
The same decision text on the same piece replaces the earlier entry, so each line you log has its own text.
|
|
26
|
+
|
|
27
|
+
## Check
|
|
28
|
+
1. Run `check-design <target> --area content` at the widths of the project. Copy the words of CR1 to CR4 with their limits: only buttons and messages already on the page are read, the phrase lists are our claim, each a hypothesis, and meaning is never judged.
|
|
29
|
+
2. CR5 and CR6 compare screens and run only with two or more screens: add `--site`, or give every screen as a target. On one screen they do not run, and the report says so.
|
|
30
|
+
3. CR7 to CR11 open a script-free copy of the page (nothing runs, and nothing but styles, fonts and images is requested, on any host) and report only what the case adds over the untouched copy. Quote their limits: text the walk does not keep is never tested, inline elements moved inside one block are not compared for overlap, text hidden from assistive technology (aria-hidden) is neither changed nor read, line boxes are clamped to their line-height for overlap, a visible layer behind the text or an absolutely positioned label taking long text can form pairs, and the inline word or letter spans of a heading are never a list (a flex or grid heading's word spans can still be read as one). A slow page may leave the list cases unchecked, with a note.
|
|
31
|
+
4. Judge in words what no measure reads: whether a label's outcome is true, whether an error's fix is useful (CW4), the heading words (CW6) and what an empty list says (CW8).
|
|
32
|
+
5. A hint judged false is noted with its evidence. Do not rewrite the page to silence a hint. Hints never block.
|
|
33
|
+
6. A kept break goes through `break-a-rule` and is kept only after `review-design`. When the content area ran, the reviewer also runs the swap test (CR12, see `lazuli-content-voice`).
|
|
34
|
+
7. Run it yourself after writing copy, because the hook does not run content (the extreme cases are too long for it).
|
|
35
|
+
|
|
36
|
+
## Reading the report
|
|
37
|
+
| Measure | Rule | A finding means |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| content.generic-labels | CR1 | a button is named only by a word that names no outcome |
|
|
40
|
+
| content.label-length | CR2 | a button name uses more words than the cutoff |
|
|
41
|
+
| content.label-case | CR3 | buttons mix capitalization styles |
|
|
42
|
+
| content.errors | CR4 | a message is generic, a code alone, or does not name its field |
|
|
43
|
+
| terms.same-target, terms.spelling | CR5, CR6 | needs two or more screens: a destination has two names, a term two spellings |
|
|
44
|
+
| extreme.growth, extreme.long-text, extreme.empty, extreme.one, extreme.many | CR7 to CR11 | longer, Portuguese, empty, one or hundreds of items add a break |
|
|
45
|
+
|
|
46
|
+
## Closing checklist
|
|
47
|
+
- Audience, language and voice read; the terms list written and logged.
|
|
48
|
+
- CR1 to CR11 quoted with limits; CR5 and CR6 run with two or more screens.
|
|
49
|
+
- Meaning, heading words and empty states judged in words.
|
|
50
|
+
- Nothing claimed about clarity: the measures describe the page only.
|
|
51
|
+
|
|
52
|
+
## What never to say
|
|
53
|
+
Never say the copy is clear, on brand or has a voice because the report is clean. The report lists labels, messages, names and layout breaks, and a reviewer judges the rest.
|