CI gates
LAW — locked, CI-gatedCI gates
Section titled “CI gates”Docs are docs-as-code (decision 0005), and this site is where the enforcement runs. This page describes the gates that actually run — no more, no less.
the gate script (npm run gate) runs three checks:
- Status present. every page under
src/content/docs/carries astatusfrontmatter value of law, proposal, or concept. a page without one fails. - Generated pages in sync. the tokens page, the decisions log page, and the haptics page are rendered from their sources (the token source,
decisions/log.md, and the haptics chapter) by the renderers intokens/. the specimen variable layer (src/styles/specimen-vars.css) is rendered from the token source the same way, so the site’s live demonstrations cannot show a value the tokens do not hold. the gate re-runs the renderers and fails if any generated file changes: what is published can never drift from what was ratified, silently. - Badge agrees with source. each page’s badge is checked against
scripts/status-map.json, a checked-in table naming every page, its source document, and the status that source records. a badge that disagrees with its source fails, and a page missing from the table fails: a new page must declare its expected status and source when it is added.
the build check (.github/workflows/docs.yml) runs on every pull request that touches the site, the decisions log, or the haptics chapter: install, the gate script, then a full site build. a docs change that fails to build, drifts from a source, or mislabels a page cannot merge. deployment is handled by Cloudflare Pages building from the same tree; this workflow is the check, not the deploy.
not yet running (proposal). a link check across the built site is proposed, not built; until it runs, this page does not claim it. a governance page that overstates its own enforcement would be the failure these gates exist to prevent.
Canonical record: decision 0005 in the decisions log; the gate script is docs-site/scripts/check-status.mjs.