Repository navigation
Description
Problem or Motivation
The docs site (Jekyll 3.10, docs/) does not follow the design spec of #4735:
- It is dark by default and ignores the system theme:
docs/_layouts/default.htmlline 2 setsdata-theme="dark", and the toggle script also starts in dark. - Its light theme has text under the WCAG 2.2 AA minimum of 4.5:1: the Rouge classes
.sband.scat 1.44:1,.nnat 1.83:1, and--text-mutedat 3.04:1 (2.85:1 on code). - It has no focus style, 11 font sizes with no scale, and one breakpoint at 768px.
docs/assets/css/style.css(570 lines) holds 34 distinct hex values in GitHub colors, and 4 hex and 5 rgba values outside its own variables. The fonts are Inter and JetBrains Mono. The favicon is an emoji.
Proposed Solution & Architectural Design
docs/_layouts/default.htmllinks the generated token CSS of feat(design): add the design tokens and their build #4738 (docs/assets/css/tokens-{base,light,dark,dark-explicit}.css).- Rewrite
style.css(about 250 lines) so that it reads only token variables. It holds no color literal. - Remove
data-theme="dark"from line 2 and the dark default of the toggle script. The system theme applies until the reader picks a theme;data-themestays as the reader's override. - Load Source Serif 4, Source Sans 3 and Source Code Pro through the same Google Fonts css2 API, in place of Inter and JetBrains Mono.
- Map the Rouge classes to the syntax roles:
.c .c1 .cm .cstosyntax.comment(italic);.s .s1 .s2 .sb .sc .sd .se .sh .si .sx .sr .sstosyntax.string;.k .kc .kd .kn .kp .kr .kttosyntax.keyword(weight 600); all other classes tofg. - Add
:focus-visible(2 px accent outline, 2 px offset), the breakpoints 40rem and 75rem in place of 768px, the caption classes of rules C3 and T1 ofdocs/DESIGN.md, and one SVG favicon in place of the emoji favicon. - Add an ast-grep rule "no color literal in hand-written CSS" to the existing
sgconfig.yml(CSS is a built-in ast-grep language). It coversdocs/assets/css/style.css,src/devops_cli/design/css/report.cssandk8s/startpage/custom.css, and skips the generatedtokens-*.css. - ci(pages): build the docs site from a workflow with a docs filter #4656 moves the site build to a Pages workflow. This item changes only the layout and CSS files, so it works with both builds.
Target Subsystem
Documentation (docs/_layouts/, docs/assets/css/, sgconfig.yml).
Existing Tool Considered
The generated token CSS of #4738 (Style Dictionary), the Google Fonts css2 API (the site uses it today), Rouge (in use) and ast-grep (in use). The layout follows the model of Tufte CSS 1.9.0 (MIT) through docs/DESIGN.md; the Tufte file itself is not used, because it has fixed colors, a fixed font and no custom properties. Custom code: CSS that reads only tokens and the theme toggle (about 15 lines of JavaScript). Cost (estimate): about 120,000 tokens and 0.5 day.
Acceptance Criteria
- The ast-grep rule finds 0 color literals in
docs/assets/css/style.css. - A headless browser check of 3 pages, in both themes, at 400 px and 1280 px width, shows no sideways page scroll and every text pair at 4.5:1 or more.
- With no
data-themeset, the page followsprefers-color-scheme. - The Docs Site Build check passes.
Dependencies
- feat(design): add the design tokens and their build #4738 (the token CSS and
docs/DESIGN.md).
Source: #4735
Alternatives check of 2026-11-26: in-use.
The repository already uses this tool.
Tool: zensical/zensical (https://github.com/zensical/zensical), MIT, last activity 2026-11-24, maintained.
Reason: Searches found Zensical, the maintained generator the docs site already uses; it supplies the palette toggle, font and favicon settings and syntax theme classes, but it does not build its theme from the project's design tokens, so a hand-written token map remains.
Covers:
- Light and dark palette with system preference and reader toggle
- Theme font and favicon settings in the site config
- Theme CSS variables and Pygments syntax classes
Lacks:
- No build of theme values from project tokens
- No ast-grep color-literal rule
- No 40rem and 75rem breakpoints or C3/T1 caption classes
Proposed design
Problem statement
The docs site builds with Zensical after #5152 and #5183. Its palette, fonts, code colors and favicon do not come from the design tokens of ADR 0024 and #4735. The docs pages thus break the design spec and its WCAG 2.2 AA contrast rules. This item maps the token CSS to the Zensical theme, so that the docs site follows docs/DESIGN.md.
Acceptance criteria
Requirement: No color literal in the docs theme CSS
The hand-written docs theme CSS SHALL hold no color literal.
Scenario: The color literal rule over the docs theme CSS
- WHEN A developer runs
ast-grep scanwith the rulecss-color-literaloverdocs/assets/css/theme.css. - THEN The scan reports 0 findings.
Requirement: Each theme value is a token reference
Each custom property in the docs theme CSS SHALL take its value from a design token variable.
Scenario: Every declaration reads a token
- WHEN A test reads each declaration of
docs/assets/css/theme.css. - THEN Each value is a
var()of a variable thatdocs/assets/css/tokens-base.css,tokens-light.cssortokens-dark-docs.cssdeclares.
Requirement: Contrast of each text pair
Each text pair of the docs theme MUST have a contrast of 4.5:1 or more in both schemes.
Scenario: Contrast of body text, muted text, links and code in the light and the dark scheme
- WHEN A test resolves the token values of each scheme and computes the WCAG 2.2 ratio of body text, muted text and links on the page background, and of code, comments, strings and keywords on the code background.
- THEN Each ratio is 4.5:1 or more.
Requirement: The slate scheme takes the dark tokens
The docs dark token file SHALL apply the dark values when the page sets data-md-color-scheme to slate.
Scenario: The dark token file matches the Zensical scheme
- WHEN A test reads
docs/assets/css/tokens-dark-docs.cssandsrc/devops_cli/design/tokens-dark.css. - THEN The docs file uses the selector
[data-md-color-scheme="slate"]and holds the same token names and values as the package file.
Requirement: The token test compares names and values
tests/design/test_tokens.py SHALL compare the docs dark token file with the package dark file by token name and value, not by bytes.
Scenario: A changed selector passes and a changed value fails
- WHEN A developer changes one value of
docs/assets/css/tokens-dark-docs.cssand runsuv run pytest tests/design. - THEN The test fails, and it passes when the value equals the package value.
Requirement: The three Source faces load
The docs site SHALL load Source Serif 4, Source Sans 3 and Source Code Pro through the Google Fonts css2 API.
Scenario: The font setting and the font request
- WHEN A test reads
zensical.tomlanddocs/assets/css/theme.css. - THEN
theme.fontnames Source Sans 3 and Source Code Pro, and the css2 request names the three faces withdisplay=swap.
Requirement: The focus outline
Each focusable element of the docs site SHALL show a 2 px accent outline with a 2 px offset.
Scenario: The focus rule in the theme CSS
- WHEN A test reads the
:focus-visiblerule ofdocs/assets/css/theme.css. - THEN The rule sets
outline: 2px solid var(--color-focus)andoutline-offset: 2px.
Requirement: The two breakpoints
The docs theme CSS SHALL use only the breakpoints 40rem and 75rem.
Scenario: Each media query width
- WHEN A test reads each
@mediarule ofdocs/assets/css/theme.css. - THEN Each width is
40remor75rem.
Requirement: The caption classes of rules C3 and T1
The docs theme CSS SHALL provide the figure caption class and the table caption class of docs/DESIGN.md.
Scenario: The caption class declarations
- WHEN A test reads the caption classes of
docs/assets/css/theme.css. - THEN Each class sets
font-size: var(--font-size-sm)andcolor: var(--color-fg-muted), and the table caption class sets a margin below the caption.
Requirement: The syntax classes of Pygments
The docs theme SHALL give each Pygments class its syntax role.
Scenario: The syntax rules in the theme CSS
- WHEN A test reads the syntax rules of
docs/assets/css/theme.css. - THEN The comment classes take
var(--color-syntax-comment)in italics, the string classes takevar(--color-syntax-string), the keyword classes takevar(--color-syntax-keyword)at weight 600, and other code takesvar(--color-fg).
Requirement: The gate scans the docs theme CSS
The construct gate SHALL scan the docs theme CSS with the color literal rule.
Scenario: The gate constants and the rule files
- WHEN A test reads
tests/gate/construct_gate.pyand.ast-grep/rules/css-color-literal.yml. - THEN
CONST_AST_GREP_SCAN_ROOTSholdsdocs/assets/css,CONST_AST_GREP_RULE_FILESholdsdocs/assets/css/theme.css, the rulefilesholds the same path, and the rule holds noignores.
Requirement: The SVG favicon
The docs site SHALL use one SVG favicon in place of the emoji favicon.
Scenario: The favicon setting
- WHEN A test reads
zensical.toml. - THEN
theme.faviconnamesassets/favicon.svg, and the value holds no emoji.
Requirement: The docs site builds
The docs site build SHALL succeed with the new theme.
Scenario: A local build
- WHEN A developer runs the docs site build with the new
extra_csslist andthemesettings. - THEN The build exits 0 and each built page links the token CSS files and
assets/css/theme.css.
Existing Tool Considered
Zensical (https://github.com/zensical/zensical, MIT, last activity 2026-11-13) is in use: #5152 and #5183 moved the docs site to it. It supplies the palette that follows prefers-color-scheme with a reader toggle, the --md-* theme variables, theme.font, theme.favicon, the responsive breakpoints, focus styles and the Pygments classes. It lacks the build of its theme from this project's tokens, so the map from tokens-*.css to --md-* stays hand-written and kept in sync. It lacks the ast-grep rule, the caption classes C3 and T1, the 40rem and 75rem breakpoints, and the contrast check of each text pair. The custom work that remains is the token map, one docs dark token file, the caption classes and the ast-grep rule: about 40,000 tokens and 0.25 day to build, keep and fix. Style Dictionary, the Google Fonts css2 API and Pygments are in use and cover the rest.
Key questions
- How does the docs site apply the dark token values when Zensical sets
data-md-color-schemeand notdata-theme?: Add one docs-only dark token file,docs/assets/css/tokens-dark-docs.css, from the configdesign/sd/dark-docs.jsonwith the sourcedark.tokens.jsonand the selector[data-md-color-scheme="slate"]. The docs site loadstokens-base.css,tokens-light.css,tokens-dark-docs.cssandtheme.cssin that order.tests/design/test_tokens.pycompares this file with the packagetokens-dark.cssby token name and value, not by bytes. The docs site does not loadtokens-dark-explicit.css, because the slate selector covers the system dark theme and the reader's dark choice. (best practice) [sources: docs/DESIGN.md, design/sd/dark.json, tests/design/test_tokens.py, zensical.toml]- Chosen: one docs dark token file with the Zensical selector. Zensical sets
data-md-color-scheme, so thedata-themeselectors of the shared dark platform never match the docs pages. - Rejected: one selector set for both targets. The
css/variablesformat writes one block for each config, so the shared file cannot hold thedata-themeand thedata-md-color-schemeselectors without a custom format. - Rejected: a script that copies
data-md-color-schemetodata-theme. It depends on the DOM of Zensical, it can flash the wrong theme before it runs, and no offline test can check it.
- Chosen: one docs dark token file with the Zensical selector. Zensical sets
- Which Zensical theme variables does the docs theme map to tokens?: Map the
--md-*variables that the palette table ofdocs/DESIGN.mdgives a role: the page and surface background, the body and muted text, the link, the code background and text, the primary and accent colors, and the footer. Leave the other variables at the Zensical default. (best practice) [sources: docs/DESIGN.md]- Chosen: the documented role set. Each mapped variable takes a token that
docs/DESIGN.mdgives a contrast rule. - Rejected: every
--md-*variable. Many have no token role, and a value with no token is a color literal. - Rejected: the Zensical default palette. The docs pages would not follow the tokens or the contrast rules.
- Chosen: the documented role set. Each mapped variable takes a token that
- How does the docs site load the three Source faces?:
theme.font.textnames Source Sans 3 andtheme.font.codenames Source Code Pro inzensical.toml.theme.cssrequests Source Sans 3, Source Serif 4 and Source Code Pro from the Google Fonts css2 API withdisplay=swap, and sets Source Serif 4 on the reading text. (best practice) [sources: docs/DESIGN.md]- Chosen: theme.font for the sans and the mono, the css2 request for the serif.
theme.fontholds one text face and one code face, anddocs/DESIGN.mdgives the reading text a serif. - Rejected: the css2 request for all three faces. Zensical sets its own font stack on the theme elements, so the sans and the mono need
theme.font. - Rejected: self-hosted
@font-facefiles.docs/DESIGN.mdrequires the Google Fonts css2 API.
- Chosen: theme.font for the sans and the mono, the css2 request for the serif.
- Which Pygments classes map to the syntax roles?: The comment classes
.c,.c1,.cmand.cstake--color-syntax-commentin italics. The string classes.s,.s1,.s2,.sb,.sc,.sd,.se,.sh,.si,.sx,.srand.sstake--color-syntax-string. The keyword classes.k,.kc,.kd,.kn,.kpand.kttake--color-syntax-keywordat weight 600. All other code takes--color-fg. (best practice) [sources: docs/DESIGN.md]- Chosen: the four-role map.
docs/DESIGN.mdgives code three roles and the foreground for all other code. - Rejected: one color for all code. It loses the string and the keyword roles that the palette defines.
- Chosen: the four-role map.
- How do the caption classes of rules C3 and T1 reach the docs pages?:
theme.cssdeclares.doc-captionfor a figure caption below the figure and.doc-caption--tablefor a table caption above the table, both invar(--font-size-sm)Source Sans 3 andvar(--color-fg-muted). A page writes the figure caption in afigureandfigcaptionpair, and the table caption in apwith the class above the table. (best practice) [sources: docs/DESIGN.md]- Chosen: CSS classes used by HTML in the pages. Zensical renders the Markdown of a page as it is, and rules C3 and T1 give the size, the color and the position.
- Rejected: a Markdown extension that builds captions. No such extension is in the lock, and the caption number belongs to the page.
- How does the color literal rule cover the docs theme CSS without an
ignoresentry?: Adddocs/assets/css/theme.cssto thefilesof.ast-grep/rules/css-color-literal.ymland toCONST_AST_GREP_RULE_FILES, and adddocs/assets/csstoCONST_AST_GREP_SCAN_ROOTSintests/gate/construct_gate.py. The generatedtokens-*.cssfiles stay out of the rulefiles, so noignoresis needed. (best practice) [sources: .ast-grep/rules/css-color-literal.yml, tests/gate/construct_gate.py, docs/DESIGN.md]- Chosen: extend the existing rule and the gate roots. The gate refuses
ignoresin a rule and reads its roots from one constant, so one rule covers the file. - Rejected: a second rule for the docs folder. The gate reads one list of rule files, and
docs/DESIGN.mdnames one rule for hand-written CSS.
- Chosen: extend the existing rule and the gate roots. The gate refuses
- Does the docs site still use the Jekyll layout and
style.css?: No. The docs site builds with Zensical, anddocs/DESIGN.mdsets its rules: map the token variables inextra_css, keep the palette toggle, and map the Pygments classes. This item changeszensical.toml, oneextra_cssfile, the token build and the ast-grep rule. It changes no Jekyll file. [sources: docs/DESIGN.md, zensical.toml] - Which favicon does the docs site use?: One SVG file,
docs/assets/favicon.svg, set bytheme.faviconinzensical.toml. The emoji favicon goes. (best practice) [sources: zensical.toml]- Chosen: one SVG file. A vector file keeps its shape at each size and follows the design spec.
- Rejected: keep the emoji favicon. The emoji is a font glyph, and its color does not follow the theme.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(docs)scope of the title gives the scope.The docs site is usable but has accessibility gaps; fixing them is important but not urgent.It removes WCAG contrast failures and theme inconsistency for all docs readers.The body estimates about 0.5 day of work covering CSS rewrite, font swap, and one ast-grep rule.Both consume the design tokens of the project spec for visual output, but the candidate targets the Jekyll docs site while 4720 targets the project review HTML page.dan-petty commentedon Nov 11, 2026
Note from #4738 (pull request #4811) for this item:
css-color-literal(.ast-grep/rules/css-color-literal.yml) holds onlysrc/devops_cli/design/css/**now. The construct gate (tests/gate/construct_gate.py) refusesignoresin a rule and scans onlysrcandtests(CONST_AST_GREP_SCAN_ROOTS).docs/assets/css/with the rule finds 51 color literals instyle.csson 2026-11-11. When this item removes them, adddocs/assets/css/style.cssto thefilesof the rule and toCONST_AST_GREP_RULE_FILES, and add the folder to the scan roots, so the gate holds the file.docs/assets/css/tokens-*.css. Do not edit it by hand: changedesign/tokens/and runmake design-tokens(docs/DESIGN.md, "Token pipeline").dan-petty commentedon Nov 12, 2026
Scope change from tracker #5151 (2026-11-12).
#5152 moves the docs site from Jekyll to Zensical 0.1.1 and deletes
docs/_layouts/default.htmlanddocs/assets/css/style.css. When #5152 merges first, this item changes as follows:style.css. Add oneextra_cssfile that sets the Zensical theme variables (--md-default-bg-color,--md-default-fg-color,--md-primary-fg-color,--md-accent-fg-color,--md-code-bg-colorand the others) from the token variables ofdocs/assets/css/tokens-*.css, for the light and dark palettes. The file holds no color literal.theme.font(Source Sans 3 and Source Code Pro), and the reading face Source Serif 4 in the sameextra_cssfile, through the Google Fonts css2 API (decision 4 of feat(design): track the project design spec #4735).prefers-color-scheme, with a toggle. Keep it.theme.favicon) and the ast-grep rule stay in scope.If this item merges before #5152, #5152 carries the token mapping to Zensical.
dan-petty commentedon Nov 12, 2026
Scope change, 2026-11-12. #5152 replaces the Jekyll site with Zensical and deletes
docs/_layouts/default.htmlanddocs/assets/css/style.css. It keepsdocs/assets/css/tokens-*.cssfor this item. So this item applies the tokens to the Zensical site after #5152 merges:extra_css. No other color literal.:focus-visible, and the code colors from the tokens (Zensical uses Pygments classes, not Rouge).The owner asked on 2026-11-12 for one look across the start page, the dashboards, the docs, the artifacts and the hosted service UIs (#5186).
dan-petty commentedon Nov 12, 2026
Two facts for this item after #5183 moved the docs site to Zensical:
design/sd/dark.jsonanddesign/sd/dark-explicit.jsonwritesdata-themeselectors::root:not([data-theme="light"])and:root[data-theme="dark"]. Zensical does not setdata-theme. It setsdata-md-color-schemetodefaultorslate(zensical.toml:44, 50). So these dark selectors never match on the docs site.tests/design/test_tokens.py:89-91asserts that the docs copy and the package copy of eachtokens-<file>.cssare byte-equal. A selector change for the docs site only makes this test fail. The item must state the choice: separate docs files with Zensical selectors, or one selector set that works on both.devops-cli-service commentedon Nov 14, 2026
Alternatives check: in-use
Reason: The searches found Zensical, the MIT static site generator that #5152 moves the docs site to: it already supplies the theme machinery the item would otherwise hand-build (a palette that follows prefers-color-scheme with a reader toggle, CSS variables for background/text/accent/code colours, theme fonts and favicon settings, responsive breakpoints, focus styles and Pygments code-highlight classes). It does not turn this project's DTCG tokens into that theme, so the token-to-variable mapping, the caption classes and the ast-grep no-colour-literal gate remain custom work, which makes the coverage partial.
The repository already uses this tool.
Tool: zensical/zensical (https://github.com/zensical/zensical)
Covers:
Lacks:
Tools considered:
Searches run:
Sources:
Checked on 2026-11-14. A person decides what this means for the item. The check changes no label and closes no issue.
29 remaining items
devops-cli-service commentedon Nov 25, 2026
Cleared the stop at job by the rule
continue: the runner Job devops-cli-implement-devops-cli-4745-ae3aaa ended without a result. The classci_infraof the stop is one that a new attempt can fix. This is continuation 1 of 4 for this item. The item is Ready again. The Service takes it in the next round. The new Job takes the branch fromorigin, so it keeps the work that the run pushed there.docs(spec): plan #4745 Map the docs site theme to the design tokens
docs(spec): correct the selector and the checks of plan #4745
docs(spec): plan #4745 Map the docs site theme to the design tokens (#…
devops-cli-service commentedon Nov 26, 2026
The runner Job devops-cli-implement-devops-cli-4745-fa87a8 ended: failed.
Image digest: sha256:4cc489070b36fcbcb50c042b238b5c60c4dff130ecb09ca5e7257fbb083d8e04
The last lines of its log:
Failure class:
spend_limit.Action taken: none.
Action left:
wait: wait for a person.The Job left this item without a result. The item is Blocked. When a retry can fix the class of the stop, the Service starts a new Job in the next round. The limit is
roadmap.implement.continuations_per_item, and the comment of that round says so. If no continuation is left, fix the cause. Then commentimplement: retry. A new runner image also clears the stop. This holds only if a retry can fix the class of the stop. The limits ofroadmap.implement.digest_clears_per_classandroadmap.implement.digest_clears_per_itemmust also allow it.