Rituals palette spine + WCAG AA remediation + SVG asset pipeline wiring #29

Merged
peterswimm merged 6 commits from design/artifact-followups into main 2026-07-09 21:27:29 +00:00
Owner

Ships three related streams of design-system work. just check fully green; pytest (79) and yamllint --strict .forgejo/workflows/ clean locally.

Rituals palette spine + accessibility

  • Restore the 5 color groups the app consumes that had been dropped from the self-contained Rituals palette — accent (17 postures + containers), border, safety, status, scrim — using the app's WCAG-correct authoritative light/dark values (6c28055).
  • Remediate the 42 AA contrast gaps this surfaced: wcag.py fix darkens accents (hue preserved) so white text.on-accent clears 4.5:1; one targeted edit for vanillanight (black on-accent) sets accent.error to #F87171 (fb80b92).
  • blocks rebuilt too (borrows the palette via color_from: rituals).

SVG asset pipeline

  • Themeable SVGs now emit a style-agnostic var(--udg-color-*, var(--short, currentColor)) chain so they re-skin under both canonical (rituals) and short (toilville) skins (a9af9e8).
  • Wired assets.py into just build/just check + added build_assets MCP tool.
  • Repaired assets.yml source paths after the Brand/source reorg; logos kept static (fixed brand marks); infographics keep brand: spelwork (9bedeb6).

Follow-ups (filed)

Ships three related streams of design-system work. `just check` fully green; `pytest` (79) and `yamllint --strict .forgejo/workflows/` clean locally. ## Rituals palette spine + accessibility - Restore the 5 color groups the app consumes that had been dropped from the self-contained Rituals palette — `accent` (17 postures + containers), `border`, `safety`, `status`, `scrim` — using the app's WCAG-correct authoritative light/dark values (`6c28055`). - Remediate the 42 AA contrast gaps this surfaced: `wcag.py fix` darkens accents (hue preserved) so white `text.on-accent` clears 4.5:1; one targeted edit for vanillanight (black on-accent) sets `accent.error` to `#F87171` (`fb80b92`). - `blocks` rebuilt too (borrows the palette via `color_from: rituals`). ## SVG asset pipeline - Themeable SVGs now emit a style-agnostic `var(--udg-color-*, var(--short, currentColor))` chain so they re-skin under both canonical (rituals) and short (toilville) skins (`a9af9e8`). - Wired `assets.py` into `just build`/`just check` + added `build_assets` MCP tool. - Repaired `assets.yml` source paths after the Brand/source reorg; logos kept static (fixed brand marks); infographics keep `brand: spelwork` (`9bedeb6`). ## Follow-ups (filed) - #27 — re-sync the app's `udg_tokens.json` with the remediated accent values (design/app currently diverge). - #28 — Ville's call on `accent.success` clay `#936E65` vs blush + dark text. Review artifact: https://claude.ai/code/artifact/035f93fe-4e4e-47f6-9613-cc1c1c78a1bb
The svg pipe.line asset pipeline emitted a single canonical var
(var(--udg-color-*, currentColor)) that only resolves under canonical
skins (rituals). Under the default toilville skin (css_var_style: short,
--text-primary) it fell straight to currentColor, losing per-token
theming. Emit a style-agnostic chain instead:

  var(--udg-color-text-primary, var(--text-primary, currentColor))

so themeable SVGs re-skin under canonical AND short skins, degrading to
currentColor with no skin loaded (reuses extract.SHORT_ALIAS).

Also close the wiring gaps around the existing generator:
- justfile: run assets.py in `build` and `check` (byte-drift gate);
  add assets / assets-one / assets-seed / assets-raster targets
- mcp_server.py: expose build_assets (also closes the docs.py MCP gap)
- opt-in PNG raster (resvg) → gitignored out/assets-raster/, never gated
- assets.py: png in seed default exports + raster subcommand

Regenerates dist/assets themeable + sprite SVGs (doc-safe unchanged).
just check green.
The self-contained Rituals palette (color_inherits_baseline: false) had
lost five whole groups the app consumes — accent (all 17 postures +
containers), border, safety, status, scrim — so they never reached the
generated DTCG. Re-add them with WCAG-correct light/dark values sourced
from the app's authoritative token file (NOT baseline, whose dark accents
still carry the pre-PR-#135 WCAG-failing values where light == dark);
baseline's other-theme values are preserved so the multi-theme web output
isn't degraded.

Regenerates dist/rituals AND dist/blocks (blocks borrows the palette via
color_from: rituals) — tokens, skin.css, and the docs artifacts
(diagrams/pptx/docx/pdf) that resolve palette colors.

Known follow-up: the restored borrowed-theme values (sundered/truancy/
vanilla*) still fail WCAG AA on some accent/safety pairs — the same stale
baseline values, now surfaced. Separate upstream baseline cleanup.
Follow the Brand/source reorg (designs!): point every assets.yml source
at its new canonical path (Brand/source/{icons,wireframes,infographics}),
and update assets.py _SEED_ROOTS to match so `seed` stays correct.

Curate colour maps:
- logos are fixed brand marks (variant encoded in the filename:
  -BW/-OR/-YE/-white/-color/-black) and must NOT recolour per theme —
  empty logo color_map preserves identity (Toilville terracotta #CC5B37 /
  mustard #FBB040, Rituals coral, SPELWork blue stay static). doc-safe
  still emits.
- infographics keep brand: spelwork provenance after the move (path lost
  the marker; inferred from category instead).

Regenerates dist/assets logos (now static) + index.json. Icons /
wireframes / infographics unchanged. just: assets check green.
fix(a11y): remediate Rituals palette to WCAG AA (accent + safety)
Some checks failed
Security Scans / Gitleaks secret scan (pull_request) Failing after 21s
Security Scans / Trivy filesystem scan (pull_request) Successful in 30s
Test Generator / lint-workflows (pull_request) Successful in 12s
Test Generator / lint-prose (pull_request) Failing after 10s
UDG dist drift gate / dist/ matches dtcg + udg sources (pull_request) Successful in 14s
Test Generator / test (pull_request) Successful in 3m5s
fb80b92a82
Resolve the 42 AA contrast gaps surfaced by restoring the accent/safety/
status groups. `wcag.py fix` minimally darkened the accents so white
text.on-accent passes (hue preserved):
  accent.success  #DEA698 → #936E65  (2.1:1 → 4.5:1)
  accent.warning  #FA0000 → #EE0000  (4.2:1 → 4.5:1)
  accent.error[dark] #F87171 → #BE5656 (2.8:1 → 4.5:1)
  safety.{allow,review,block}[vanillanight] nudged to 4.5:1

Plus one targeted edit the auto-fixer can't reach: vanillanight uses BLACK
text.on-accent, so accent.error (falling back to the dark #9E0042) failed
at 2.5:1 for black. Set accent.error[vanillanight] = #F87171 (light red,
black text 7.6:1).

Regenerates dist/rituals + dist/blocks. `just check` fully green (WCAG AA
across all products/themes). Downstream: the app's authoritative token
file should re-sync these accent values.
peterswimm deleted branch design/artifact-followups 2026-07-09 21:27:30 +00:00
Sign in to join this conversation.
No description provided.