Skip to content

docs: one nav manifest, validated, and every page reachable - #544

Merged
godofecht merged 1 commit into
mainfrom
docs/nav-manifest2
Aug 18, 2026
Merged

godofecht merged 1 commit into
mainfrom
docs/nav-manifest2

Conversation

@godofecht

@godofecht godofecht commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Second of the wiki series, rebased onto main now that #540 has landed. Replaces #541, which carried #540's commits and could not rebase cleanly across the squash merge.

The problem

The sidebar was a 280-line dict literal inside build_wiki.py:607-886, and the same information was hand-maintained in four other places: page_category for the search filter, write_llms_txt as a third index, the tutorial track order, and mkdocs.yml. They had drifted.

docs/nav.json is now the single source, and two things are checked on every build, both failures rather than warnings:

  • every nav entry resolves to a real page
  • every page under docs/ is either in the nav or listed in unlisted with a written reason

build_wiki.py exits non-zero on either, and the wiki job runs it, so this is gated without a new CI job.

What the checks found

A dead sidebar link, shipping to readers. The Project section carried project/PROJECT_STRUCTURE.md. That file only exists under archive/.

55 pages in no sidebar at all. For a reference manual that means the information exists and cannot be found. The Language tab had 16 entries while docs/language/ has 36 pages. Absent from it:

ordering            shaders              dynamics-dsl        lifetime-domains
safety-profiles     wasm-crossings       mlir-opt-flags      export-abi
modules-namespacing multi-implementation explainable-compilation
graphics-3d         c-fnptr-call         concurrency-vs-go   replace-go
debugging           flow-run             README (the directory index)

The restructure

Appending 18 rows to one long list would have satisfied the checker and not the reader. The Language tab is now five sections:

Section Entries
Reference 12
Language features 8
Domain surfaces 4
Targets & interop 5
Comparisons 2

Domain surfaces is the one worth calling out. dynamics-dsl and shaders are the headline feature set, the flow / evolves as material the vision leads with, and neither page was reachable from the sidebar.

Library splits into Standard library (7) and Domain libraries (10). Tooling gains a Certification & compliance section for the five certification/ pages, none of which were in the sidebar. Language 16 → 31, Library 8 → 17, Tooling 4 → 12.

Eight pages are explicitly unlisted with reasons: three archived, plus internal runbooks and process notes that are not reader documentation.

The other drift sources

page_category now derives from the tab a page sits under. It was a separate prefix match, so a page could sit under Language in the sidebar and be reported as a guide in search.

llms.txt is generated from the manifest. It was a hand-written 25-link index that neither link checker validated, because it is not markdown, so its paths could rot silently. It now covers everything.

mkdocs.yml is the remaining consumer and is left for a follow-up. I wrote and then removed a mkdocs_nav() helper rather than ship an unused function.

Why JSON and not YAML

The plan said YAML. The wiki job runs bare python3 with no setup-python step and no pip install:

- uses: actions/checkout@v7
- name: Build static wiki
  run: python3 scripts/build_wiki.py

PyYAML is not in requirements.txt or the lock file, so anything build_wiki.py imports has to be standard library. JSON is also already the output format.

Validation

  • Unit suite: 16 new tests, covering both the shipped manifest and each failure the validator exists to catch
  • scripts/wiki_nav.py reports the manifest consistent with docs/
  • check_doc_links.py, check_doc_coverage.py and check_wiki_links.py all clean against merged main
  • Wiki rebuilds; the two generated proof sections still populate (6 Euclid books, 9 corpus groups)

The sidebar was a 280-line dict literal inside build_wiki.py, and the same
information was hand-maintained in four other places: page_category for the
search filter, write_llms_txt as a third index, the tutorial track order,
and mkdocs.yml. They had drifted.

docs/nav.json is now the single source. build_wiki.py reads it, and two
things are checked on every build, both failures rather than warnings:

- every nav entry resolves to a real page
- every page under docs/ is either in the nav or listed in "unlisted" with
  a written reason

The first check immediately found project/PROJECT_STRUCTURE.md in the
Project section, pointing at a file that only exists under archive/. It has
been shipping as a dead sidebar link.

The second found 55 pages that were in no sidebar at all, which for a
reference manual means the information exists and cannot be found. The
Language tab held 16 entries while docs/language/ had 36 pages. Missing
from it: ordering, shaders, dynamics-dsl, lifetime-domains, safety-profiles,
wasm-crossings, mlir-opt-flags, export-abi, modules-namespacing,
multi-implementation, explainable-compilation, graphics-3d, c-fnptr-call,
concurrency-vs-go, replace-go, debugging, flow-run, and the directory index.

Rather than appending 18 rows to one long list, the Language tab is now five
sections: Reference, Language features, Domain surfaces, Targets and interop,
Comparisons. Domain surfaces is the one worth naming, since dynamics-dsl and
shaders are the headline feature set and neither was reachable. Library
splits into Standard library and Domain libraries; Tooling gains a
Certification and compliance section for the five certification pages, none
of which were in the sidebar.

Eight pages are explicitly unlisted with reasons: three archived, plus
internal runbooks and process notes that are not reader documentation.

page_category now derives from the tab a page sits under, so a page cannot
be filed under Language in the sidebar and reported as a guide in search.
llms.txt is generated from the manifest as well; it was a hand-written
25-link index that neither link checker validated, because it is not
markdown.

JSON rather than YAML: the wiki CI job runs bare python3 with no
setup-python and no pip install, so build_wiki.py has to stay stdlib-only.

Language tab 16 entries to 31, Library 8 to 17, Tooling 4 to 12.
Unit 1460 passed, ruff clean, wiki and doc links clean.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@godofecht
godofecht merged commit 4340932 into main Aug 18, 2026
19 checks passed
@godofecht
godofecht deleted the docs/nav-manifest2 branch August 18, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant