The Astro/Starlight site renders the full instance corpus
ADR-0009: The Astro/Starlight site renders the full instance corpus
Section titled “ADR-0009: The Astro/Starlight site renders the full instance corpus”Status
Section titled “Status”Accepted
Context
Section titled “Context”Background and Problem Statement
Section titled “Background and Problem Statement”The Astro/Starlight site (src/content.config.ts, astro.config.mjs) projects the
Diátaxis docs/ tree and the rendered reports/ corpus into one Starlight docs
collection. The template ships only a single example topic, so the template’s own
CI builds the site cleanly. Several gaps therefore stay invisible in the template
and only surface in a real instantiated clone with many topics, genre deliverables,
and falsification output:
harness-instance.md.jinjacarries no Starlight frontmatter. It renders into thedocscollection, whosedocsSchema()requirestitle, soastro build/astro devabort withInvalidContentEntryDataErrorin every clone before any report is even considered.- Copier flattens symlinked directories on render. The template ships
docs/reports -> ../reportsandsrc/content/docs -> ../../docs, but Copier materializes both as real directories in the clone.gate_m23checked only the first symlink, so the second silently regressed and the content collection resolved a stale copy — the site showed only the example, never the clone’s corpus. - The content-glob exclusions did not cover audit/continuity artifacts. A real
corpus emits
*-falsification-report.md,*-delta.md, and*-build-spec.mdlogs that carry no Starlight frontmatter; the glob ingested them and aborted the build. - The sidebar is unusable at corpus scale. With dozens of topics every group expanded by default, the navigation is an unscannable wall.
Decision Drivers
Section titled “Decision Drivers”- The site must build and navigate the clone’s corpus, not just the template’s example — the corpus is the product.
- Fixes belong at the template source (
.jinja,copier.ymltasks, gates, config), never as instance hand-patches, socopier updatepropagates them. - No regression of the existing report channel: canonical L3 reports and genre deliverables stay pages; continuity logs and nav indexes stay out of the collection (ADR-0007).
Decision
Section titled “Decision”Close the four gaps at the source:
harness-instance.md.jinjaships Starlight frontmatter (title,description) and drops the duplicate H1 (Starlight renders the title).- Copier re-establishes both symlinks via
_tasks(ln -sfn ../reports docs/reports,ln -sfn ../../docs src/content/docs), andgate_m23now asserts both symlinks, not justdocs/reports. - The content-glob excludes the audit/continuity artifacts
(
*-falsification-report.md,*-delta.md,*-build-spec.md), andgate_m23enforces those exclusions. They are logs, not pages — consistent with the already-excludedresearch-progress.md,findings/,_meta/, andREADME.md. - The sidebar groups collapse by default (
collapsed: true) so a large corpus is navigable.
Canonical L3 reports and genre deliverables continue to carry MIF frontmatter and
remain pages; the per-topic README.md stays the (frontmatter-less) build-topic
nav index and is intentionally not a page (it serves the --check gate). Surfacing
the per-topic README as a Starlight page would require the README generator to emit
Starlight frontmatter without breaking the --check gate or markdownlint MD025;
that is left to a follow-up.
Consequences
Section titled “Consequences”Positive
Section titled “Positive”- The site builds and navigates the full corpus in any clone (verified: example + real corpora), closing the two filed defects (#164, #165).
- The fixes propagate through
copier updatebecause they live in the template source and are gate-enforced.
Negative / Trade-offs
Section titled “Negative / Trade-offs”- The audit/continuity artifacts (falsification reports, deltas, build specs) are
not browsable as site pages. They remain in
reports/for the corpus and the gates; only the site projection omits them. - The per-topic README is still not a navigable page (follow-up).