Skip to content

docs(design): codify DESIGN.md as enforced visual authority - #320

Merged
deepiq2022 merged 1 commit into
mainfrom
working
Jul 24, 2026
Merged

docs(design): codify DESIGN.md as enforced visual authority#320
deepiq2022 merged 1 commit into
mainfrom
working

Conversation

@deepiq2022

Copy link
Copy Markdown
Contributor

Summary

  • Adds DESIGN.md (the "Lamplit Tome" system: warm-only palette, serif-for-fiction / sans-for-machinery, flat-by-default depth) + an .impeccable/design.json sidecar, and PRODUCT.md for the durable product record. CLAUDE.md rule Campaign file export/import (BYO cloud) #5 makes both binding.
  • Fixes a dark-mode defect found while writing it: the hero-card border was two near-identical literals (#EFC9B4 / #F0CDB8) at four call sites with no dark value — a pale peach ring around a near-black card. Now one JuiceTokens.borderHero with a real dark twin.
  • Rewarms the campaign identity palette — Indigo and Plum were the only cool values in the app's chrome; replaced by Mulberry and Umber, keeping five identities separated by hue and value. Existing campaigns keep their stored hue.
  • Migrates stock Material colors to tokens in five places (sketch toolbar, funnel, NPC disposition, AI-ready check, tally), and brings modals into the tome — sheets, dialogs and snackbars were on raw M3 defaults across 60+ call sites — plus disabled/focus/hover state colors M3 rendered gray.
  • test/design_system_test.dart makes six named rules mechanical: One Shadow, Warm-Only, Two-Voice, identity-spine warmth, hero-border-is-a-token, and a ratchet pinning raw ColorScheme use at 131 so it can only shrink.

Card and chip theming stay deliberately unthemed: a global override restyles hundreds of widgets for little gain, and the ratchet is the mechanism for retiring that debt surface by surface.

Test plan

  • flutter analyze clean (one pre-existing info in test/embark_sheet_ui_test.dart, untouched by this change)
  • flutter test passes — 2192 tests, including 6 new design-system rules
  • Dark mode: confirm the result card and AI nudge borders now read as warm-dark rather than pale peach
  • Launcher: confirm campaign spines show the rewarmed hues
  • Sketch editor toolbar: selected tool/swatch now terracotta, not Material blue

🤖 Generated with Claude Code

Records the shipped "Lamplit Tome" system — warm-only palette, serif for
fiction and sans for machinery, flat-by-default depth — as DESIGN.md plus an
.impeccable/design.json sidecar, and adds PRODUCT.md for the durable product
record. CLAUDE.md working rule #5 makes both binding.

Writing the doc against the source turned up drift the doc then had to fix.
The hero-card border was two near-identical literals (EFC9B4 / F0CDB8) at four
call sites with no dark value at all, so dark mode drew a pale peach ring
around a near-black card; it is now one JuiceTokens.borderHero with a real
dark twin. The campaign identity palette shipped Indigo and Plum, the only
cool values in the app's chrome — rewarmed to Mulberry and Umber, keeping five
identities separated by hue and value. Stock Material colors were doing
semantic work in five places (sketch toolbar, funnel, disposition, AI-ready
check, tally) and now read tokens. Modals were the largest surface still on
raw M3 defaults despite 60+ call sites, so sheets, dialogs and snackbars join
the tome, along with disabled/focus/hover state colors that M3 rendered gray.

test/design_system_test.dart makes six of the named rules mechanical rather
than aspirational: One Shadow, Warm-Only, Two-Voice, identity-spine warmth,
hero-border-is-a-token, and a ratchet pinning raw ColorScheme use at 131 so it
can only shrink. Card and chip theming stay deliberately unthemed — a global
override restyles hundreds of widgets for little gain, and the ratchet is the
mechanism for retiring that debt surface by surface.

Co-Authored-By: Claude <noreply@anthropic.com>
@deepiq2022
deepiq2022 merged commit ddfdc34 into main Jul 24, 2026
1 check passed
@deepiq2022
deepiq2022 deleted the working branch July 24, 2026 21:21
deepiq2022 added a commit that referenced this pull request Jul 25, 2026
Browser verification of the design system caught a real defect the green
suite could not see: in dark mode the primary button rendered as a pale peach
with dark text. Material derives a light `primary` for dark schemes, so the
app's most important control was the one element on screen not wearing
Lamplight Terracotta — a flat break of DESIGN.md's Rubrication Rule. Light
mode had hidden it, because the amber seed's light `primary` happens to land
near the token by luck. The fill is now set from JuiceTokens at the theme in
both brightnesses, with the label flipping per mode: near-white ink on the
deep light clay, page-dark ink on the lifted dark clay.

Also ships the primary lift, the second and last shadow DESIGN.md sanctions
and the only one it had left unimplemented. It rides Material elevation with
a terracotta shadowColor rather than a literal BoxShadow, so the button lifts
without spending the One Shadow Rule's budget, and no call site hand-rolls it.
Warm-tinted per The Warm Shadow Rule — a neutral shadow on cream paper reads
as plastic.

Verified in the browser at both brightnesses, alongside the rewarmed campaign
identity spines from #320, which render distinct in light and dark with Umber
separating from Terracotta by value as intended.

Co-authored-by: John Taylor <jttaylor63@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants