The docs/ site architecture

docs/ is the public GitHub-Pages site (served from docs/ on master via its CNAME), repo-root-governed with no owning kit. This page is the load-triggered home for the site’s chrome and license line, and the index of the pages holding the rest — the mechanism CLAUDE.md §Housekeeping names by pointer rather than carries inline. The rest is the page-authoring rules, the generated projections and their fan-outs, the install parity contracts and the install block contracts. It is off-nav by design (scripts/docs-offnav.list): maintainer governance reached by citation, not a reader-nav destination.

Site chrome and the nav contract

The site chrome — the Jekyll layout, client-side search, the code-block copy button and theme selector — lives in docs/_config.yml, docs/_layouts/, docs/_includes/, and docs/assets/. jekyll-sitemap writes sitemap.xml, every HTML page less one setting sitemap: false, and a robots.txt naming it, so the tree carries neither file and a page leaves the sitemap only by that key. The nav is Liquid over front matter: nav_order / nav_parent place a page; a page’s nav_id parents its nav_child_order-sorted children, each child carrying derived suffix links to its generated:-marked directory siblings, the README and SPEC mirrors both. A nav page’s nav_suffix names further pages its entry suffixes, as <label>=<path> pairs relative to the docs root: the SPEC mirror of a component with no kit page, on the page documenting that component. A nav page naming a nav_children_key instead derives its children from the site pages carrying that key, path-descending, each labeled by the key’s value (the release notes under the Releases page), inside a details element that is open only on a page carrying the key. check-docs-nav-reachable holds every docs page to a title: front-matter block and a menu entry of its own: a nav slot, a derived child, a generated-sibling suffix link, or a nav_suffix pair. Reach through a page’s body is not reach: a page off the menu is either given an entry or listed off-nav by design in scripts/docs-offnav.list. That same gate models the front-matter facts, both suffix rules and the derived-children rule, no wider than the include renders them, since a wider model is a green the rendered site does not earn. The agent index reads the same model, one crate module both call, so the menu and that projection cannot disagree on which pages hold a slot; the gate’s verdict turns on a key’s presence alone. It also reds a nav_suffix pair naming no docs page, and an overview among its siblings: under three or more children, one every sibling links and that links each of them. No separate gate covers these. check-docs-render-fidelity renders every tracked docs page through the Pages parser and holds the output against markdown corruption: a code span leaking a stray backtick or a raw tag into text, a code-fenced heading promoted to a real one, or fewer rendered tables than the source has GitHub-Flavored Markdown table starts. A missing renderer fails it closed (site-kit/SPEC.md §check-docs-render-fidelity). check-kit-registration holds a row per kit on docs/kits.md (the Kit Reference page) through GATE_SDK_REGISTRY_DOC, and check-docs-kit-parity the nav child block (nav_parent: kits + nav_child_order) on each docs/<kit>/index.md. Both nav gates read front matter as the front-matter span (canon-kit/SPEC.md §The shared spec adapters).

A page in the set SITE_KIT_SINCE_PAGES governs carries a release status, since: in its front matter. Its value is unreleased or vX.Y.Z, the first release whose binary does what the page says. A page landing with unreleased behavior says unreleased, and so does a page edited to describe new unreleased behavior. The layout renders the key above the page’s body. unreleased renders a notice that the page describes master ahead of every published release, linking the Releases page; a version renders a one-line note naming it; a page without the key renders neither. The banner’s style sits in the layout’s own <style> block with the rest of the chrome’s, since docs/assets/ carries no stylesheet. check-docs-since holds the key (site-kit/SPEC.md §check-docs-since). The banner reaches the governed pages alone; every other page still describes master.

The license line

Every README’s ## License section, the site footer and every package manifest’s license field state the one license scripts/license-line.conf declares. A README or the footer carries it as one sentence: Licensed under Apache-2.0, then where that copy’s license text is. A site a reader follows by link takes the linked form, the license name linked to the text. A README that travels without the repository takes the located form, which names LICENSE and says where it sits beside that copy. A manifest carries the license name alone, the value its registry reads. The source declares the license, each location clause, each site’s form and each manifest. check-license-line holds each site to its rendering and each manifest’s field to the license, and holds every README carrying the heading and every manifest carrying a license field to a declaration, printing the expected value on a red. The mirrors are generated from their sources and are not sites. The footer states the license on every page, so a hand-written page under the source’s pages root carries no License section of its own, and the gate reds one that does.

A markdown site’s section, blank lines dropped, is exactly its one line. An .html site carries exactly one line opening Licensed under, in the linked form only. A manifest’s field is read by its kind: the license key of a Cargo.toml’s [package] table, the top-level license string of a .json manifest, the first license: key of a .yml one, its quotes dropped. A declared manifest carrying no field reds. The coverage walks read every README.md under the root, every file whose name GATE_LOCAL_LICENSE_MANIFEST_NAMES lists, and every other .md page under pages. All three apply the gate-sdk prune set, and the README and page walks skip a file whose front matter sets generated: true, the block read as the front-matter span. The gate exits 2 when a file it is given is absent, and 3 when one cannot be read. It also exits 2 on a malformed source: a key missing, repeated or unknown, a duplicate declaration, a clause named but undeclared, a form other than link or at, or a manifest of a kind it has no reader for. Its positional form is check-license-line [source root].