Skip to content

feat(design): add the design tokens and their build - #4811

Merged
dan-petty merged 5 commits into
mainfrom
feat/4738-design-tokens
Nov 12, 2026
Merged

dan-petty merged 5 commits into
mainfrom
feat/4738-design-tokens

Conversation

@dan-petty

@dan-petty dan-petty commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Adds one source of design values and its build. Before, each artifact set its colors, fonts and sizes by hand, and no check measured contrast or colorblind safety.

Three W3C DTCG 2025.10 token files in design/tokens/ are the source. Style Dictionary 5.7.1 builds them with built-in formats and warnings as errors (make design-tokens) into committed CSS for the docs site and CSS and JSON for devops_cli.design. The CI job "Design Tokens" fails when an output is not the build, and runs tests/design: name parity, 74 contrast rules, colorblind gates, ramps, breakpoints, dash patterns. Renovate updates the lock. An ast-grep rule rejects color literals in package CSS. docs/DESIGN.md is the spec; ADR 0024 records the base and pipeline. No consumer changes: the other items of #4735 apply the tokens.

Closes #4738

Change: openspec/changes/archive/2026-11-11-4738-add-the-design-tokens-and-their/

@dan-petty

Copy link
Copy Markdown
Owner Author

Measurements for this pull request (devcontainer, 2026-11-11):

Step Result
npm ci --ignore-scripts of the lock 106 packages in 4 s
make design-tokens 2.0 s, 0 warnings with log.warnings "error"
Second build the same bytes (md5 of all 11 outputs)
CSS variables 88: 50 base, 38 for each theme
uv run pytest tests/design -n 0 15 passed in 6.5 s
Contrast rules 37 for each theme, 0 failures; a light color.fg of #aaaaaa fails at 2.32:1 and 2.15:1
ast-grep rule on docs/assets/css/ 51 literals in style.css, 0 in the token CSS
Static gate rows lint, format, typecheck, zizmor, docs, constructs, openspec, git, test-tree: pass
Tests of tests/invariants, tests/design, tests/tools_lock, tests/commands/test_ci.py pass

Tool age and license checks:

  • Style Dictionary 5.7.1: npm 2026-10-24 (18 days), Apache-2.0. A new resolution with npm install --package-lock-only --before=2026-10-28 gives the same 106 versions. Licenses in the lock: MIT 69, Apache-2.0 26, BlueOak-1.0.0 5, BSD-3-Clause 3, ISC 2, 0BSD 1.
  • coloraide 8.13.1: PyPI 2026-10-16 (26 days), MIT.
  • actions/setup-node, dorny/paths-filter and actions/checkout are the pins that ci.yml already uses.

The CI time of the job "Design Tokens" follows in a later comment, when the run leaves the queue.

@dan-petty
dan-petty marked this pull request as ready for review November 11, 2026 21:49
@dan-petty
dan-petty enabled auto-merge (squash) November 11, 2026 21:49
@dan-petty
dan-petty force-pushed the feat/4738-design-tokens branch from 4c3d897 to 046c481 Compare November 11, 2026 22:02
@devops-cli-service

Copy link
Copy Markdown
Contributor

Pull request #4811 has merge conflicts with main at commit d69459b452aa. GitHub cannot merge it. Rebase the branch onto the current main, resolve the conflicts and push the branch.

Add the design tokens in the W3C DTCG format 2025.10 (design/tokens/),
four Style Dictionary 5.7.1 configs with warnings set to "error"
(design/sd/), `make design-tokens`, and the committed outputs for the
docs site and the package `devops_cli.design`.

The CI job "Design Tokens" builds the tokens when a path of its filter
changes, fails when a committed output is not the build, and runs
tests/design. The tests check the name parity of the themes, 74
contrast rules, the categorical gates under simulated color vision
deficiency, the ramps, the breakpoint literals and the dash patterns.

The devcontainer image installs the Style Dictionary lock, and Renovate
updates it 14 days after a release. The ast-grep rule css-color-literal
rejects a color literal in the hand-written CSS of the package.

docs/DESIGN.md is the spec, and ADR 0024 records the base and the
pipeline. No consumer changes.
The scope of the pull request title needs a label in .github/labels.yml and a place in the scope list of the title check.
CONTRIBUTING.md, Dependency Versions, sets no minimum release age (owner, 2026-11-11). Pin Style Dictionary 5.8.0 and coloraide 8.14.1, and remove the minimum release age from the Renovate rule of the Style Dictionary lock. The build gives the same bytes.
@dan-petty
dan-petty force-pushed the feat/4738-design-tokens branch from d69459b to 4e7474f Compare November 12, 2026 00:23
@dan-petty
dan-petty merged commit db4b19a into main Nov 12, 2026
36 checks passed
@dan-petty
dan-petty deleted the feat/4738-design-tokens branch November 12, 2026 00:33
@dan-petty

Copy link
Copy Markdown
Owner Author

CI time of the job "Design Tokens" (job limit 5 minutes):

Head Total Install Style Dictionary Build Diff Design tests Result
046c481c (Style Dictionary 5.7.1) 32 s 2 s 1 s 0 s 6 s Pass
4e7474f5 (Style Dictionary 5.8.0) 39 s 4 s 1 s 0 s 7 s Pass

Changes after the first comment:

dan-petty pushed a commit that referenced this pull request Nov 12, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.115.0](v0.114.1...v0.115.0)
(2026-11-12)


### Features

* **design:** add the design tokens and their build
([#4811](#4811))
([db4b19a](db4b19a))
* **roadmap:** find symbol definitions with tree-sitter
([#4820](#4820))
([3b3fddc](3b3fddc))


### Bug Fixes

* **ai:** the gateway group that answered decides the local label
([#4907](#4907))
([0da637f](0da637f))
* **ci:** replay a changed gate check in fail-to-pass
([#4898](#4898))
([59bfc57](59bfc57))
* **config:** read each config file as YAML 1.2
([#4858](#4858))
([c3130a3](c3130a3))
* **roadmap:** loosen the caps that turn a stage refusal into a loss
([#4869](#4869))
([4492fc3](4492fc3))
* **roadmap:** refine reads a dependency named by title
([#4877](#4877))
([2829f9c](2829f9c))
* **roadmap:** refine sends a judge refusal to an agent round
([#4874](#4874))
([e4fc6a9](e4fc6a9))
* **tests:** refuse test writes under the real home
([#4857](#4857))
([0f6ac1b](0f6ac1b))
* **tests:** the plain-Python helper test keeps PYTHONPATH
([#4914](#4914))
([99c109d](99c109d))


### Performance Improvements

* **ci:** direct pytest runs wait for a gate slot
([#4901](#4901))
([e80db62](e80db62))
* **roadmap:** status lane reads the snapshot, skips idle stops
([#4887](#4887))
([f285cf8](f285cf8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
dan-petty added a commit that referenced this pull request Nov 12, 2026
The review of #4811 found two gaps in the design token checks.

- The step "Run the Design Tests" had a limit of 2 minutes, but one test
had a bound of 600 s. This broke "Nested Time Limits" in
ARCHITECTURE.md: a hung test stopped the step with no pytest-timeout
diagnostic. The step now gives `--timeout 60`, and the contract test
asserts a test bound shorter than the step.
- Each DTCG source color holds its value in `components` and in `hex`.
Style Dictionary reads only `components`, so a change to `hex` alone
passed every check. A new design test compares the `hex` of each of the
66 source colors with its `components` (coloraide). `docs/DESIGN.md`
tells a person to keep the two equal. The sources keep `hex` because
people read it.

Closes #4906

Change:
`openspec/changes/archive/2026-11-12-4906-check-the-design-test-bound-and/`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(design): add the design tokens and their build

1 participant