Plan: generate the site from docs/, and publish what docs/ already holds
Issue: #528, under the epic architecture#3 (one docs-site workflow for every repo, generated from docs/). It builds on docs-kit, the shared generator (architecture#4), and its MDX pages (architecture#5).
cortex has one set of documents. The site is generated from docs/, like anatomy’s, racing-drone’s, reflex’s and synapse’s: the documents we write and review live in docs/, where GitHub renders them, and a broken relative link or anchor fails the PR.
Two PRs
Section titled “Two PRs”Today the site’s 55 pages live in docs-site/src/content/docs/, and docs/ holds 49 other documents: the records (adr/, plan/), the session logs, and engineering notes and analyses (arch/, assessments/, benchmark/, dfm/, math/, performance-engineering/) that the site doesn’t publish. Moving the pages and deciding what becomes of each note are different reviews, so they are two PRs.
1. The move: every route kept
Section titled “1. The move: every route kept”Implemented in #541.
- The pages move to
docs/at the same paths, so every route stays.docs/index.mdxis the landing page.- The MDX pages import the site’s components and data through docs-kit’s
@site/alias (the site’ssrc/) instead of../../../paths. - Links written as routes (
/vio/overview/,./getting-started/introduction/) become relative links to the documents, so docs-kit checks them.
- The MDX pages import the site’s components and data through docs-kit’s
docs/README.mdis the documentation map: one row per sidebar group, in today’s order, and within a row the pages in today’s order. A sidebar label that differs from the page’s title moves into the page’s front matter (sidebar.label); the group labels (“Math Layer (E2)”, …) are in the config.- One copy of the figures. The SVGs the pages show were in both
docs-site/public/figures/anddocs/assessments/figures/, where the generators write them. The pages now link todocs/assessments/figures/, which takes the two folders onlypublic/had (s4/,s5/), and docs-kit publishes the ones linked. - Not published yet:
arch/,assessments/,benchmark/,dfm/andperformance-engineering/(unpublishedin the config), until the second PR.docs/math/concepts.mdis already in a published folder, so it is listed in the Math row. Never published:sessions/, the session logs, as on synapse. Records:adr/andplan/, on the architecture site, with a redirect from each old URL. - The site code stays in
docs-site/:Scene3D,TriangulationScene,Issue,data/benchmarks.jsonand thegen-*.mjsfigure, benchmark and video scripts, and the scene data inpublic/data/. docs-site/docs-kit.config.mjsholds what docs-kit doesn’t default: the group labels, the perception-blue accent,math: true,src/styles/custom.css, and the API reference with the doxygen-awesome theme (api.doxyfile, new in docs-kitv0.3.0; it replaces theDoxyfile).- The deploy is docs-kit’s shared workflow;
deploy-docs.ymlkeeps the triggers and addsdocs/**. CI gets theDocs sitejob.
2. The merge: one set of documents
Section titled “2. The merge: one set of documents”For each document in arch/, assessments/ and the single-document folders, one decision (decided on #528, 2026-10-31). No published page was absorbed, so no route redirects.
Published as pages:
| Document | Now |
|---|---|
arch/vio-pipeline-canonical.md | The Canonical VIO Pipeline: the S0–S10 contracts the code cites (§S0–§S10). Its dated status sections (the June divergence ranking, which probes were wired) point to Engineering Status instead; the code’s references are repointed. |
assessments/vio-pipeline-howto.md | Running the VIO Pipeline Demo, with the tool’s current flags. |
assessments/covariance-feasibility-safeguards.md | Keeping the Covariance Physically Feasible, after Mixed Precision on MTL5, which points to it. |
Merged into pages, and deleted:
| Document | Into |
|---|---|
arch/stage-benches.md | Stage Benches: its developer reference (layout, bench catalogue, fixtures, the bench contract, file formats). The benches’ comments point there. |
assessments/covariance-architecture.md | MSCKF Backend: the square-root covariance form (#187). |
assessments/filter-consistency-nees-nis.md | Reading the Metrics: the gate vs the run-average test, the code map, the VIO subtleties, reading the verdict, references. |
assessments/current-pipeline.md | The S0 and S10 stage pages: how to run their probes. |
assessments/vio-diagnostic-methodology.md | Diagnostic Methodology: the Sim3-vs-SE3 ATE heuristic; the rest was already there or in Invariants. |
benchmark/vio.md, assessments/intelligency-per-watt.md | Intelligence per Watt: the dataset, progress and fallback notes, and two future-work lines. |
Kept unpublished, as working records:
arch/:cortex-repo.md(the design conversation the ADRs were distilled from; the ADRs, not it, decide when the code is ambiguous),phase0-foundation/andphase1-design/(summarized by the phase pages),visual-inertial-odometry.md(offline background; it recommends libraries cortex chose against).assessments/:3d-viz-options.md(the record of the 3D viewer’s tooling choice),vio-consistency-sweep-diagnosis.md(the raw sweep data; marked superseded), thefigures/the pages show.- Notes outside the site’s subject:
arch/flight-controller-analysis.md,assessments/ai-coding-assistant-failures.md,assessments/embodied-ai-workload-analysis.md,dfm/product-engineering.md,performance-engineering/vio-pipeline-parallelization.md.assessments/workloads.md, an earlier draft of the workload analysis, is deleted.
Moved to sessions/: three session transcripts filed as notes, now dated session logs: 2026-06-03-vio-euroc-troubleshooting.md, 2026-06-04-vio-troubleshooting-fej.md (the FEJ measurements) and 2026-06-05-vio-first-principles.md.
Fixed on the way: four pages placed the cxx bridge in core/src/lib.rs (it is core/src/bridge.rs); Stage Benches called the shipped S10 bench “in review”; the S10 page contradicted itself on calibration states; Repository Layout called cortex-repo.md the source of truth.
Acceptance
Section titled “Acceptance”docs-site/src/content/has no committed content; every page comes fromdocs/.- Every route on today’s site still exists, or redirects to the page that absorbed it.
- Every document in
docs/is either a page or in a folder listed as unpublished or as records. - Figures, 3D scenes and benchmark data render on the deployed site.
- A broken relative link in a published document of
docs/fails the PR. (The records are checked by the architecture site’s check; the unpublished working records are not checked, since they keep the links they had when written.)
The first PR met 1, 4 and 5, and 2 and 3 with today’s routes and the unpublished folders above; the second completes 2 and 3. All five were met on 2026-10-31.
Departures
Section titled “Departures”- Two figures removed. The pipeline overview’s coordinate-frames diagram and S1’s alignment diagram were linked in June but never committed, so the live pages showed a broken image. Their alt text describes them; drawing them is #540.
- Light mode works. cortex’s slate backgrounds and grays applied in light mode too, so the light theme stayed dark. They now apply in dark mode only, and light mode is the kit’s, with cortex’s accent.
- The sidebar:
- “3D Path & Pose Viewer” (
vio/scene3d) is listed under Visual-Inertial Odometry, its folder, instead of VIO Pipeline. docs-kit builds a group from one folder; the route is unchanged. - The “Plans and decisions” link moves to the group docs-kit gives it, and the documentation map and
math/concepts.mdare added. - “Maintaining These Docs” comes before the API reference, which docs-kit lists last.
- “3D Path & Pose Viewer” (
- Figure URLs: the figures are served from the site’s
/_astro/assets, as Astro optimizes them, instead of/figures/. - A favicon: the site had none (every page asked for a missing
favicon.svg). It is the hero’s tile grid.