Repository navigation
docs(design-system): the colour table names 13 tokens that do not exist, and two wrong hex values - #175
Conversation
The colour table documented a semantic alias tier that was never built: thirteen of its token names return zero hits outside this file, so anyone following it wrote var(--color-primary) and got nothing. Two hex values matched nothing in the repo either, and the paragraph under the table already named the real tokens, contradicting the table above it. The table now mirrors layouts/tailwind.css: the three ten-step scales, the six standalone tokens, and a role column saying which step the components reach for today. The Tailwind configuration section pointed the same way, crediting tailwind.config.ts with a palette Tailwind v4 ignores. It now points at layouts/tailwind.css, where the new table says the tokens live. Closes #172 Co-authored-by: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Lb6fbRbH9MEbEJk9i5TC66
Review of the rewritten table caught three overreaches. The role table reads as prescriptive, yet several pairings it records sit under the 4.5:1 bar this same file sets: body text at 4.23:1, secondary text at 2.71:1, white on teal-500 at 2.70:1. It now says it records what the components do and that the reader must check their own pairing. The dark-background line claimed teal-300 and coral-300 "hold enough contrast" with no surface named. teal-300 reaches 9.8:1 on black and 3.0:1 on gray-800, which is the surface the Ladle dark sections use. Tailwind v4 reads a config file only through an @config directive, and no stylesheet here has one, so tailwind.config.ts's content array is as dead as its theme.extend block. Saying it "sets the content paths" sent a reader to a file the build never opens. Co-authored-by: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Lb6fbRbH9MEbEJk9i5TC66
It told readers tailwind.config.ts lists the content paths, which the build never reads, and credited Tailwind's defaults for animation while the theme declares two of its own. Co-authored-by: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Lb6fbRbH9MEbEJk9i5TC66
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
wemeditate-web | f8d59a6 | Commit Preview URL Branch Preview URL |
Oct 10 2026, 08:06 PM |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The diff matches the ticket and is no bigger than it. All 36 token names and all 36 hex values check out against layouts/tailwind.css — zero undeclared, zero mismatched — and the two ratios at :72 compute to 9.82:1 and 2.95:1. The role table replaces the old table's Use column, so it is not new scope. Pulling in docs/rules/tailwind.md was right: it carried the same false premise.
Two things stay open. The premise this PR corrects survives in three more docs, one as a step to follow. And nothing checks the 36 values, in the file whose drift is this ticket.
Findings
- should-fix — three docs still name
tailwind.config.tsas live.DESIGN_SYSTEM.md:352 - should-fix — no guard holds the hex values to
@theme. Drop them or commit the checker.DESIGN_SYSTEM.md:32 - consider — #179 will falsify three role-table rows.
DESIGN_SYSTEM.md:56
What was checked
Ticket #172 against the full diff. Read whole: DESIGN_SYSTEM.md, docs/rules/tailwind.md, layouts/tailwind.css, tailwind.config.ts, Button.tsx, Link.tsx. Scripted: every --color-* name and hex in the doc against @theme, and WCAG ratios from the declared hex. Grepped: @config (none) and tailwind.config across every .md and all code (no importer), so "loaded by nothing" holds. Counted border-/text-/bg-gray-* call sites to test each role row, and teal-200/300 to test the hover claim at :70 — Link.tsx:91-93 backs it. #176 and #179 already own the incidental findings, so I filed nothing new.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
`public/fonts/README.md` credited `tailwind.config.ts` with mapping the font tokens and told a maintainer to update it when adding a weight — a step that emits nothing. `components/atoms/README.md` sent component authors there for token values, which is #172's defect one file over. All three now name `layouts/tailwind.css`. #176 still owns the file's own JSDoc and the scan-set wording. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LpQNhKkXNTcxNQT5uVEhuZ
The three tables in DESIGN_SYSTEM.md restate layouts/tailwind.css, and nothing checked the copy — which is how #172 happened, and how sydevs/SahajCloud#862 happened in another guide. The guard reproduces both halves of #172 when reintroduced: an undeclared token name, and a hex that disagrees with @theme. It also fails on a token added to @theme and left out of the tables, so the drift cannot run the other way either. Kept the hex columns rather than dropping them, as the review suggested: dropping them leaves #172's larger half — 13 token names declared nowhere — still unguarded. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LpQNhKkXNTcxNQT5uVEhuZ
The rows record today's steps, and #179 proposes replacing three of them. A reader copying Primary button, Link or Body text now sees that. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LpQNhKkXNTcxNQT5uVEhuZ
|
Three review threads, all adopted. Pushed
Lean gate green: lint, 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Both sides rewrote the same sentence in components/atoms/README.md. main (#175) corrected the token file from tailwind.config.ts to layouts/tailwind.css; this branch replaced the generic focus-state sentence with focusRing(theme). Kept both. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01N4nAVHRfbJbEtn2qhP1oB6
Summary
layouts/tailwind.cssdeclares, with matching hex values.@themeblock, so the copy cannot drift again.Change outline
The doc is the contract here, so the views paraphrase its rules.
Contract —
DESIGN_SYSTEM.md§ Design tokens → ColorsGuard —
tests/guards/design-tokens.test.tsThe tables restate the stylesheet, and nothing held the copy to its source. That is how #172
happened, and how sydevs/SahajCloud#862 happened in another guide.
Contract —
DESIGN_SYSTEM.md§ Tailwind configuration,docs/rules/tailwind.md, two READMEsFour places credited
tailwind.config.tswith work the build never does, one of them as a step tofollow.
Preview
Test results
tsc --noEmit,vitest run(81 files, 813 tests)tests/guards/design-tokens.test.ts— 4 testsManual verification
layouts/tailwind.css:24-69. The guard now checks everytoken name and all 36 hex values on every run; a human eye on the role column is still worth
having.
are written. They record today's usage counts.
Notes for reviewer
The authorising comment chose the doc side: "implement as a documentation update, the doc is
wrong". No token was added to
layouts/tailwind.css, so the semantic alias tier stays unbuilt.The 30-step ramp is a pivot table — step down the rows, scale across the columns — rather than 30
named rows. Say so if you would rather have the full token names spelled out.
docs/rules/tailwind.mdis in this PR because the new § Tailwind configuration text wouldotherwise contradict it.
The hex columns stayed, against the adversarial review's first preference. Dropping them would
leave #172's larger half — 13 token names declared nowhere — still unguarded, and the guard covers
both halves at the cost of one test file.
Two defects found on the way, neither this ticket's, both filed:
font-ralewayis documented and used in 5 call sites, but no--font-ralewaytoken exists, sothe class emits nothing.
text-gray-darkandtext-gray-lightare dead the same way, across 3files. fix(components): four utility classes name tokens the theme never declares #176.
secondary text 2.71:1, white on
teal-5002.70:1, linkteal-6003.85:1. fix(components): text and button colour pairings fail the 4.5:1 AA bar #179.Detail
Review.
/code-review highplus/simplify; thepr-review-toolkitplugin is not installedhere.
/simplifyhad nothing to act on — the first three commits change no code.comment-lint.mjs --base origin/mainreported 0 changed files at that point, since no code comment had moved.Five findings came back and all five held up against the source. Three are fixed in
bdcfa68: the role table reading as prescription, the unqualified "both hold enough contrast",and my own first-pass claim that
tailwind.config.ts"sets only the content paths" — which wasstill wrong, because v4 ignores the
contentarray as completely astheme.extend. Two are thefont-ralewayand dark-theme findings, filed rather than folded in.The adversarial review's three findings are addressed in
89a762f(three more docs naming thedead config),
9417290(the guard) andf8d59a6(the #179 pointer on the role table).Verification. The script that extracted every
--color-*name and every hex from the doc andchecked both against the
@themeblock is nowtests/guards/design-tokens.test.ts: 0 undeclarednames, 0 mismatched values, all 36 tokens documented. Both failure directions were confirmed by
injecting them —
--color-primaryreports undeclared,teal-300: #5dd4bdreportsdoc #5dd4bd, theme #83bcb4, and a--color-bg-cooladded to@themereports missing from the tables.Contrast ratios were computed from the declared hex values, not taken from the reviewer.
Why the alias tier was not built instead. The ticket offered both sides. Declaring 13 aliases
would make the doc true without changing a pixel, and would give components a semantic name — but
nothing uses one today, and the choice was the reviewer's to make, which the comment made.
Closes #172
🤖 Written by the sydevs autonomous loop — see what this is
🤖 Generated with Claude Code
https://claude.ai/code/session_01Lb6fbRbH9MEbEJk9i5TC66
Generated by Claude Code