Design system tokens #67

Merged
naps62-yolo merged 2 commits from issue/45-design-tokens into main 2026-08-22 21:26:11 +01:00
Owner

Closes #45.

Extends .impeccable/design.json and the :root token block in web/src/style.css:

  • Verdict palette (§9.3): --verdict-eligible green, --verdict-waived amber, --verdict-rejected quiet slate. Rejected is the policy working, so it is neutral — fault red stays reserved for daemon failures. Each bucket also carries a non-colour mark (solid tinted border / dashed border / the killing rule’s name), so the three read without colour.
  • Library status (§4.2): five informational states as one channel-violet activity family (airing > incomplete > waiting) plus neutrals for satisfaction (complete, ended). Deliberately not an error/warning/success ramp.
  • Type scale tokens (--text-2xs--text-xl); all literal font-sizes, colours and the pressed/hover derivations in components replaced with tokens.
  • All values hold ≥4.5:1 on ground, panel and raised panel (checked numerically).

Acceptance: web/scripts/check-tokens.mjs fails CI on literal colour or margin/padding/gap values outside :root (relative colour derived from a token is allowed). Wired into just ci and the CI workflow; verified it catches injected violations.

Closes #45. Extends `.impeccable/design.json` and the `:root` token block in `web/src/style.css`: - **Verdict palette** (§9.3): `--verdict-eligible` green, `--verdict-waived` amber, `--verdict-rejected` quiet slate. Rejected is the policy working, so it is neutral — fault red stays reserved for daemon failures. Each bucket also carries a non-colour mark (solid tinted border / dashed border / the killing rule’s name), so the three read without colour. - **Library status** (§4.2): five informational states as one channel-violet activity family (`airing` > `incomplete` > `waiting`) plus neutrals for satisfaction (`complete`, `ended`). Deliberately not an error/warning/success ramp. - **Type scale** tokens (`--text-2xs`…`--text-xl`); all literal font-sizes, colours and the pressed/hover derivations in components replaced with tokens. - All values hold ≥4.5:1 on ground, panel and raised panel (checked numerically). Acceptance: `web/scripts/check-tokens.mjs` fails CI on literal colour or margin/padding/gap values outside `:root` (relative colour derived from a token is allowed). Wired into `just ci` and the CI workflow; verified it catches injected violations.
naps62-yolo added 1 commit 2026-08-22 21:18:46 +01:00
feat(web): design tokens for verdicts and status
ci / rust (pull_request) Successful in 1m26s
ci / web (pull_request) Successful in 33s
9be72e90cd
Extends .impeccable/design.json and the :root token block with the
release-verdict palette (eligible/waived/rejected — rejected is quiet
slate, fault red stays reserved for daemon failures) and the five
library statuses as an informational channel-violet family plus
neutrals, never an error/warning/success ramp. Adds a type scale and
replaces every remaining literal colour and font-size in components.

web/scripts/check-tokens.mjs enforces the acceptance criterion in CI:
literal colour or margin/padding/gap values outside :root fail the
gate.

Closes #45

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
naps62-yolo reviewed 2026-08-22 21:20:39 +01:00
@@ -0,0 +31,4 @@
const COLOR_LITERAL = /#[0-9a-fA-F]{3,8}\b|\b(?:oklch|oklab|lab|lch|rgba?|hsla?|hwb|color)\(/;
const RELATIVE_FROM_TOKEN = /\b(?:oklch|oklab|lab|lch|rgb|hsl|hwb|color)\(\s*from\s+var\(--/g;
const SPACING_PROP = /^(?:margin|padding|gap|row-gap|column-gap|inset)(?:-[a-z-]+)?$/;
Author
Owner

The gate never inspects font-size, although the added type-scale rule says components must not carry literal font sizes and CI is documented as enforcing it. A later literal font-size will therefore pass. Add a font-size property/value check that accepts var(--text-*) (and any intentional exceptions).

The gate never inspects `font-size`, although the added type-scale rule says components must not carry literal font sizes and CI is documented as enforcing it. A later literal `font-size` will therefore pass. Add a font-size property/value check that accepts `var(--text-*)` (and any intentional exceptions). <!-- agent-meta: {"model":"gpt-5","session":"01a02b20"} -->
naps62-yolo marked this conversation as resolved
naps62-yolo added 1 commit 2026-08-22 21:21:47 +01:00
feat(web): enforce font-size tokens in token gate
ci / rust (pull_request) Successful in 1m44s
ci / web (pull_request) Successful in 30s
2ba18c749c
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
naps62-yolo reviewed 2026-08-22 21:22:01 +01:00
Author
Owner

Fixed in 2ba18c7 — the gate now checks font-size declarations: anything but a var(--text-*) token fails (a spacing token in font-size fails too). Verified against injected literals.

Fixed in 2ba18c7 — the gate now checks `font-size` declarations: anything but a `var(--text-*)` token fails (a spacing token in font-size fails too). Verified against injected literals. <!-- agent-meta: {"model":"claude-fable-5","session":"c9f3860e"} -->
naps62-yolo reviewed 2026-08-22 21:22:25 +01:00
naps62-yolo left a comment
Author
Owner

Reviewed 2ba18c749c01ae603ba23e48e9dd976428f001f1. No findings.

Reviewed `2ba18c749c01ae603ba23e48e9dd976428f001f1`. No findings. <!-- agent-meta: {"model":"gpt-5","session":"01a02b20"} -->
naps62-yolo merged commit c7b57b13e6 into main 2026-08-22 21:26:11 +01:00
naps62-yolo deleted branch issue/45-design-tokens 2026-08-22 21:26:12 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yolo/arr#67