Skip to content

docs(design-system): the colour table names 13 tokens that do not exist, and two wrong hex values - #175

Merged
sydevs-bot merged 6 commits into
mainfrom
claude/docs-172-colour-table
Oct 11, 2026
Merged

sydevs-bot merged 6 commits into
mainfrom
claude/docs-172-colour-table

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • The colour table now names the tokens layouts/tailwind.css declares, with matching hex values.
  • A guard holds the three tables to the @theme block, so the copy cannot drift again.
  • Four adjacent claims that sent readers to a file the build never opens are corrected too.

Change outline

The doc is the contract here, so the views paraphrase its rules.

Contract — DESIGN_SYSTEM.md § Design tokens → Colors

-a semantic alias tier: --color-primary, --color-text-primary, --color-border, --color-bg-white
-  and nine more, declared nowhere; --color-primary-300 #5dd4bd and --color-secondary-300 #f0a898
-  match nothing in the repo
+three ten-step scales, by step: teal, coral, gray — 30 hex values, each read from the @theme block
+six standalone tokens: accent, error, error-dark, success, info, bg-warm
+  success == teal-600 and info == teal-500, stated where a reader would otherwise wonder
+a role table: which step a button, link, heading, body, border and surface reach for today
+  "records what the components do, not a contrast clearance" — several pairings are under 4.5:1
+  and #179 would rewrite three of the rows, which the sentence above the table now says
+the dark-background line names --color-teal-300 / --color-coral-300, and gives a surface with
+  each ratio: 9.8:1 on black, 3.0:1 on gray-800

Guard — tests/guards/design-tokens.test.ts

The 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.

+every --color-* name the doc mentions is declared in the @theme block
+every hex the ramp and the standalone table state equals the declared value
+every declared token appears in a table, so the drift cannot run the other way either
+four tests, following tests/guards/_source-scan.ts — no render, no network, 262ms

Contract — DESIGN_SYSTEM.md § Tailwind configuration, docs/rules/tailwind.md, two READMEs

Four places credited tailwind.config.ts with work the build never does, one of them as a step to
follow.

-tailwind.config.ts extends the palette and the font families
-tailwind.config.ts lists the content paths for class detection
-public/fonts/README.md: it maps the font tokens — and update it for a new weight or family
-components/atoms/README.md: follow the tokens in tailwind.config.ts
+nothing loads tailwind.config.ts: v4 reads a config only through @config, and no stylesheet has one
+layouts/tailwind.css holds the theme (@theme) and the scan set (@source)
+the theme also declares two animations, which the rule credited to Tailwind's defaults
+both READMEs name layouts/tailwind.css and its @theme block

Preview

  • No rendered route changes — every file here is developer documentation or a test.

Test results

  • Lean gate: ✓ lint, tsc --noEmit, vitest run (81 files, 813 tests)
  • Targeted specs: tests/guards/design-tokens.test.ts — 4 tests
  • Build: N/A — Markdown plus one test file, neither of which reaches the bundle

Manual verification

  1. Read the three colour tables against layouts/tailwind.css:24-69. The guard now checks every
    token name and all 36 hex values on every run; a human eye on the role column is still worth
    having.
  2. Confirm the role rows match how you want new components written, not only how the current ones
    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.md is in this PR because the new § Tailwind configuration text would
otherwise 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:

Detail

Review. /code-review high plus /simplify; the pr-review-toolkit plugin is not installed
here. /simplify had nothing to act on — the first three commits change no code. comment-lint.mjs --base origin/main reported 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 was
still wrong, because v4 ignores the content array as completely as theme.extend. Two are the
font-raleway and dark-theme findings, filed rather than folded in.

The adversarial review's three findings are addressed in 89a762f (three more docs naming the
dead config), 9417290 (the guard) and f8d59a6 (the #179 pointer on the role table).

Verification. The script that extracted every --color-* name and every hex from the doc and
checked both against the @theme block is now tests/guards/design-tokens.test.ts: 0 undeclared
names, 0 mismatched values, all 36 tokens documented. Both failure directions were confirmed by
injecting them — --color-primary reports undeclared, teal-300: #5dd4bd reports doc #5dd4bd, theme #83bcb4, and a --color-bg-cool added to @theme reports 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

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
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

sydevs-bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

recent dispatches
  • 19:59Z address-review · attempt 1 · session · done
  • 19:59Z address-review · attempt 1 · session
  • 19:50Z review-pr · attempt 1 · session · done
  • 19:50Z review-pr · attempt 1 · session

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐 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.ts as 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

Comment thread DESIGN_SYSTEM.md Resolved
Comment thread DESIGN_SYSTEM.md Resolved
Comment thread DESIGN_SYSTEM.md Resolved
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Oct 10, 2026
`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
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Three review threads, all adopted. Pushed f8d59a6.

Lean gate green: lint, tsc --noEmit, 813 tests in 81 files. Body refreshed — the diff is no longer Markdown-only.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 10, 2026
@sydevs-bot
sydevs-bot marked this pull request as ready for review October 10, 2026 20:10
@sydevs-bot
sydevs-bot requested a review from Ardnived October 10, 2026 20:10
@sydevs-bot
sydevs-bot enabled auto-merge October 10, 2026 20:11
@sydevs-bot
sydevs-bot added this pull request to the merge queue Oct 11, 2026
Merged via the queue into main with commit 5d0f471 Oct 11, 2026
63 of 66 checks passed
@sydevs-bot
sydevs-bot deleted the claude/docs-172-colour-table branch October 11, 2026 19:27
@sydevs-bot sydevs-bot moved this from Revising to Done in SYDevelopers Technical Roadmap Oct 11, 2026
sydevs-bot pushed a commit that referenced this pull request Oct 11, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

docs(design-system): the colour table names 13 tokens that do not exist, and two wrong hex values

3 participants