Summary
The docs sidebar on useforge.ai (src/data/navigation.ts) has drifted from the docs actually synced from initializ/forge. 19 of 55 synced doc pages are orphaned — they build as live routes at /docs/<section>/<slug> and are indexed by Pagefind search, but they do not appear in the left sidebar, so a user browsing the docs cannot discover them. An entire section (mcp/, 6 pages) has no sidebar group at all.
The root cause is architectural: scripts/sync-docs.ts pulls every docs/**/*.md from the forge repo into src/content/docs/, and src/pages/docs/[...slug].astro generates a route for each via getStaticPaths() — but the sidebar tree in src/data/navigation.ts is hand-maintained and has no automated link to what was synced. New upstream docs silently become hidden pages until someone manually edits navigation.ts.
A secondary staleness: the EXPECTED_PAGES completeness allowlist inside scripts/sync-docs.ts (used to warn on missing pages) is also out of date and contains none of the 19 new pages, so the existing guardrail does not catch this drift.
Evidence
Computed from the current tree:
- Synced doc files (
src/content/docs/**/*.md): 55
- Slugs referenced in
src/data/navigation.ts: 36
- Orphaned (synced, live route, but absent from sidebar): 19
- Broken sidebar links (in sidebar, no file): 0 ✅
The 19 orphaned pages
Core Concepts (3) — sidebar section exists, these items missing:
core-concepts/binary-dependencies
core-concepts/context-compression
core-concepts/observability-tracing
Getting Started (1):
getting-started/ship-to-production
Security (6) — sidebar section exists, these items missing:
security/admission
security/audit-tamper-evidence
security/authentication
security/platform-policy
security/tenancy
security/workflow-correlation
Reference (2) — sidebar section exists, these items missing:
reference/browser-tools
reference/library-modules
Deployment (1):
deployment/scheduler-kubernetes
MCP (6) — ⚠️ no mcp/ sidebar group exists at all:
mcp/index
mcp/configuration
mcp/cli-reference
mcp/audit-events
mcp/delegated-consent
mcp/troubleshooting
Impact
- Real, published documentation (MCP configuration, authentication, tenancy, platform policy, tamper-evidence, context compression, the "ship to production" getting-started guide, etc.) is undiscoverable via normal navigation.
- Users can only reach these pages via Pagefind search or a direct/inbound link.
- The gap grows every time forge adds docs, because there is no automated feedback loop.
Proposed fix
Part A — immediate (restore discoverability): Update src/data/navigation.ts:
- Add a new MCP top-level section with its 6 pages (
index, configuration, cli-reference, audit-events, delegated-consent, troubleshooting). Decide placement (suggest after Security or after Reference).
- Add the 13 missing items into their existing sections (Core Concepts, Getting Started, Security, Reference, Deployment) in a sensible order (respect each doc's frontmatter
order where present).
- Confirm section landing
hrefs still resolve.
Part B — prevent recurrence (choose one):
- Option 1 (recommended): derive the sidebar from the synced manifest.
scripts/sync-docs.ts already writes src/data/docs-manifest.json (with section, slug, title, order per entry). Generate the sidebar tree from the manifest at build time (or emit a navigation.generated.ts), keeping only section ordering/labels and any curation overrides hand-maintained. This makes "synced ⇒ navigable" automatic.
- Option 2 (lighter): a drift check in CI. Add a script/test that diffs synced slugs against
navigation.ts slugs and fails the build (or the sync-docs workflow) when a synced page is not in the sidebar. Also refresh the stale EXPECTED_PAGES list in sync-docs.ts (or generate it from the manifest so it can't drift).
Acceptance criteria
Notes / references
- Sidebar source:
src/data/navigation.ts (docsSidebar, flattenNav())
- Route generation:
src/pages/docs/[...slug].astro (getStaticPaths() over the whole docs collection)
- Sync + manifest:
scripts/sync-docs.ts → src/content/docs/, src/data/docs-manifest.json
- Layout that consumes the sidebar:
src/layouts/Docs.astro via DocsSidebar.astro
- No code changes have been made; this is a backlog item.
Summary
The docs sidebar on useforge.ai (
src/data/navigation.ts) has drifted from the docs actually synced frominitializ/forge. 19 of 55 synced doc pages are orphaned — they build as live routes at/docs/<section>/<slug>and are indexed by Pagefind search, but they do not appear in the left sidebar, so a user browsing the docs cannot discover them. An entire section (mcp/, 6 pages) has no sidebar group at all.The root cause is architectural:
scripts/sync-docs.tspulls everydocs/**/*.mdfrom the forge repo intosrc/content/docs/, andsrc/pages/docs/[...slug].astrogenerates a route for each viagetStaticPaths()— but the sidebar tree insrc/data/navigation.tsis hand-maintained and has no automated link to what was synced. New upstream docs silently become hidden pages until someone manually editsnavigation.ts.A secondary staleness: the
EXPECTED_PAGEScompleteness allowlist insidescripts/sync-docs.ts(used to warn on missing pages) is also out of date and contains none of the 19 new pages, so the existing guardrail does not catch this drift.Evidence
Computed from the current tree:
src/content/docs/**/*.md): 55src/data/navigation.ts: 36The 19 orphaned pages
Core Concepts (3) — sidebar section exists, these items missing:
core-concepts/binary-dependenciescore-concepts/context-compressioncore-concepts/observability-tracingGetting Started (1):
getting-started/ship-to-productionSecurity (6) — sidebar section exists, these items missing:
security/admissionsecurity/audit-tamper-evidencesecurity/authenticationsecurity/platform-policysecurity/tenancysecurity/workflow-correlationReference (2) — sidebar section exists, these items missing:
reference/browser-toolsreference/library-modulesDeployment (1):
deployment/scheduler-kubernetesMCP (6) —⚠️ no
mcp/sidebar group exists at all:mcp/indexmcp/configurationmcp/cli-referencemcp/audit-eventsmcp/delegated-consentmcp/troubleshootingImpact
Proposed fix
Part A — immediate (restore discoverability): Update
src/data/navigation.ts:index,configuration,cli-reference,audit-events,delegated-consent,troubleshooting). Decide placement (suggest after Security or after Reference).orderwhere present).hrefs still resolve.Part B — prevent recurrence (choose one):
scripts/sync-docs.tsalready writessrc/data/docs-manifest.json(withsection,slug,title,orderper entry). Generate the sidebar tree from the manifest at build time (or emit anavigation.generated.ts), keeping only section ordering/labels and any curation overrides hand-maintained. This makes "synced ⇒ navigable" automatic.navigation.tsslugs and fails the build (or thesync-docsworkflow) when a synced page is not in the sidebar. Also refresh the staleEXPECTED_PAGESlist insync-docs.ts(or generate it from the manifest so it can't drift).Acceptance criteria
npm run buildsucceeds;astro checkpasses.flattenNav()innavigation.ts) includes the newly added pages in the correct order.EXPECTED_PAGESinscripts/sync-docs.tsis refreshed or made self-updating from the manifest.Notes / references
src/data/navigation.ts(docsSidebar,flattenNav())src/pages/docs/[...slug].astro(getStaticPaths()over the wholedocscollection)scripts/sync-docs.ts→src/content/docs/,src/data/docs-manifest.jsonsrc/layouts/Docs.astroviaDocsSidebar.astro