Policy Overlay, Companion Panes, and Topic-First Navigation
This document specifies two progressive phases for separating durable technical documentation from house usage policy, and for evolving the Antora docs shell from a single-pane Diátaxis tree toward a topic-first, companion-capable reader.
Why separate policy from reference
Technical reference pages explain what a concept or tool is and how it works. Repeating "is this mandatory by default in Dev-Centr, which Band is it in, which skill enforces it, and when do we deviate?" inside every reference article bloats the prose and forces policy edits into evergreen reference pages.
A Policy Overlay keeps the reference page clean and attaches a precompiled, structured house-policy companion on demand.
Phase 1 (v1): Policy Overlay Web Component (non-breaking)
Shipped directly in dev-centr/docs (supplemental-ui/) with zero breaking changes to Antora or valentus-theme:
-
Summon button: mounted in the page contents sidebar (TOC header, with article-header fallback when a page has no TOC). Suppressed on inappropriate landing/meta pages (for example
/home/,/home/changelog/,/home/todo-roadmap/,/home/where-docs-live/). -
Desktop companion layout: right-side hovering, mostly opaque themed panel (
backdrop-filter, Valentus light/dark tokens) rather than a full-screen modal. The outer shell usespointer-events: noneso clicks pass cleanly through the transparent boundary to the main article and nav rail, while the panel surface itself restorespointer-events: auto. -
Populated vs. unpopulated pages:
-
Populated pages display two tabs at the top of the overlay: Policy (adoption status badge, how Dev-Centr uses this topic by default, linked rules/skills, optional section-anchored notes) and About this overlay.
-
Unpopulated pages still show the summon button; clicking it opens the general explanation of the Policy Overlay and how to contribute a policy entry.
-
-
Precompiled data: policy entries live in a structured static manifest (
supplemental-ui/data/policy-overlay-manifest.json, ready to be generated at build time by an Antora extension fromagent-rules/ page attributes). -
SoftNav & WebMCP: listens to
soft-nav:loaded/doc-nav:loadedto refresh button state and open-drawer content on page switches, and exposesget_page_policy/toggle_policy_overlayvia feature-detecteddocument.modelContext.
Phase 2 (v2): Multi-Article Companion Panes & Topic-First Navigation
Requires a major revision to valentus-theme / antora-ui-chassis (or lands natively in antora-supplemental/antora-solidstart):
Modular multi-article content area
-
Refactor
<main class="article">into a pane host capable of opening two articles side by side (primary article + companion pane). -
Treat the Policy Overlay as one companion type alongside sibling documentation pages.
-
Support section-anchored companion notes (already modeled as
sections: [{ headingId, note }]in the v1 manifest): scrolling or clicking a section in the main article highlights its companion policy/commentary without cluttering the primary prose.
Sibling Diátaxis tabs & multi-topic indexes
-
Fold Diátaxis types into topic-scoped tabs alongside the primary article:
Reference|How-to|Tutorials|Explanation|Policy. -
A topic’s How-to tab indexes every how-to tagged with that topic; an article bridging two topics (for example, Cloudflare Access + GitHub Pages) appears in both topics' how-to indexes without duplicating the page.
-
Same indexing model applies to Tutorials and Explanation essays.
Reference vs. Wiki framing
-
Reference carries an authoritative, normative, lookup tone—exact APIs, contracts, schemas, constraints, and facts you check while building.
-
Wiki carries a survey / "about this concept" tone—exploratory, broad, context-setting, and often non-normative (especially in mathematics or broad domain surveys).
-
In Diátaxis, the "about / mental model / why" role belongs to Explanation rather than blurring Reference into a wiki. Under a topic-first layout, each topic’s landing page can act as a concise Topic Overview / Reference (authoritative core + clean table of facts), while deeper background lives under the topic’s Explanation tab and house defaults live under Policy.
Topic-first hierarchy & surgical lazy nav DOM
-
Replace top-level Diátaxis folders (
Tutorials,How-to,Reference,Explanation) with a topic hierarchy at the top of the nav tree. -
Nest Diátaxis sub-nodes inside each topic and keep them hidden by default so the tree stays scannable.
-
DOM cost vs. searchability: Static Antora currently prints every collapsed
<li>in the entire site forest into every page’s HTML DOM (contributing directly to the layout/scroll cost measured in Nav scroll performance A/B). Moving the full nav forest into a compact JSON manifest and surgically mounting/unmounting child DOM nodes only when a topic expands cuts live DOM node count dramatically. -
Search stays complete because Lunr /
antora-search-chatqueries the precompiled search index rather than scraping the nav DOM. -
Crawlability floor (
web-crawlability): Keep top-level topic links and the active ancestor branch rendered in static HTML (backed by/sitemap.xml) so crawlers and no-JS readers still discover every route without executing client JS.
Nav-tree disappearing Home-tree nodes (root cause & fix)
Investigation on 2026-12-01 traced the bug where Home tree nodes disappear after navigating to another component’s subtree and stay missing after returning to Home to three interacting causes:
-
Stale deployed
site-nav-treebuild (< 76dbfe7):dev-centr/docswas still building an oldersite-nav-tree-current.jswhereitemKeycollided depth-0Home(h:/home/) with depth-1Overview(h:/home/) and whereonLabelClickreturned early afterSoftNavcalledpreventDefault(). -
Unindexed & cross-referenced Home subpages: In
site-nav-tree-current.js,maybeExpandForestRootLandingonly expanded the owning component root on the exact root URL (/home/), leavingHomecollapsed when landing on unindexed subpages (/home/tools/…,/home/changelog/org-wide/) or pages matched only via cross-component xrefs under another root. Fixed viaensureForestOwnerActive()with regression test. -
Antora Default UI (
01-nav.js)hashchangewipe:site.jscaptures the initial page’s.is-current-pagenode in closurer; after SoftNav crosses components, clicking any#sectionanchor fireshashchange, wiping.is-activeacross the entire forest and resetting to the stale initial component. Fixed insite-nav-tree-current.jswith a post-hashchangerecovery hook and regression test.
Implementation checklist
Phase 0 — Nav-tree reliability & WebMCP baseline (2026-12-01)
-
Make WebMCP (
document.modelContext) a mandatory Web Band A baseline across all web designs (including marketing, landing, and docs sites) ingeneral-knowledgeandagent-rules. -
Diagnose disappearing Home-tree nodes bug across
site-nav-tree,soft-nav.js, and Antora Default UI01-nav.js. -
Fix owner-root collapse on unindexed/cross-referenced subpages and post-SoftNav
hashchangeforest wipe inantora-supplemental/site-nav-treewith regression tests (55/55passing). -
Release
site-nav-treev0.6.15, bumpfacto-stack, and updatedev-centr/docspin so the hub ships both76dbfe7and the new fixes.
Phase 1 — Policy Overlay Web Component v1 (2026-12-01)
-
Author this architecture RFC and phased checklist.
-
Build
<devcentr-policy-overlay>web component (supplemental-ui/js/policy-overlay.js,supplemental-ui/css/policy-overlay.css) with desktop right-side hovering companion layout, click-through transparent boundary (pointer-events: noneshell /autodrawer),Policy|Abouttabs on populated pages, unpopulated fallback explanation, homepage suppression, SoftNav re-sync, and WebMCP tool registration. -
Ship precompiled pilot manifest (
supplemental-ui/data/policy-overlay-manifest.json) coveringagent-operable-web-ui,webdelivery class,recommended-tools,web-design-tools, andai-site-design-contract. -
Add automated unit tests (
test/policy-overlay.test.js). -
Add build-time Antora extension (
@antora-supplemental/policy-overlay) to compile policy manifests automatically fromagent-rulesmetadata and:page-policy-id:AsciiDoc attributes across all hubs.
Phase 2 — Scheduled next week+ (2026-12-08+)
-
Roll out WebMCP (entry-point/navigation + declarative forms + interactive bridges) to existing Dev-Centr and owned web sites (
devcentr.org,docs.devcentr.org,stack-advisor, etc.). -
Prototype modular multi-article companion pane layout in
valentus-themev5 /antora-solidstart(side-by-side companion + section-anchored policy notes). -
Implement topic-scoped Diátaxis tabs (
Reference|How-to|Tutorials|Explanation|Policy) with multi-topic How-to/Tutorial cross-indexing. -
Implement topic-first nav hierarchy with surgical lazy DOM mounting/unmounting backed by precompiled JSON nav manifest while preserving static crawlable top-level links and Lunr/search-chat indexing.