- Mode Support no longer reads "Dark supported" next to an AVOID list that
says "Dark mode". Light results now print "Dark supported, but avoid for
this product" (the light-side counterpart of #428).
- ASCII box: long single-line fields (conversion, CTA, perf/a11y, Google
Fonts URL, motion) now wrap, over-long tokens split, section headers and
the CSS Import line were one char too wide, and the colour label column
fits "Muted Foreground:".
- MASTER.md buttons: .btn-primary used hard-coded white text, below 4.5:1
on the accent in 137/192 palettes; it now uses the palette's On Accent.
.btn-secondary text falls back to Foreground when Primary is below 4.5:1
on Background (94/192 palettes).
Adds regression tests for all three.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
generate() ranked style, palette and anti-patterns independently, so a
dark-primary style could come back with a light palette and a
"Dark mode by default" anti-pattern in the same output. The palette is
what users copy into CSS variables, so the output shipped a light theme
with dark-theme styling instructions attached.
Resolve the mode first -- from the query keywords and the style's own
Light/Dark Mode columns -- then pick a palette whose Background matches
it and drop mode-contradicting anti-pattern clauses.
Only the dark case filters palettes. Light keeps the existing top-hit
behaviour so queries that never mention a mode are untouched, and dark
falls back to the top hit when colors.csv has no dark ramp for the
product type.
Adds scripts/tests/test_design_system_mode.py (stdlib unittest, matching
test_core.py) and syncs cli/assets + .claude/skills via sync-assets.mjs.