Minimum Viable Wiki Spec (Cloudflare)
Goal
Generate an internal executive wiki from markdown and frontmatter metadata with fast search, cross-repo deep links, and mobile-first navigation.
Build and Deployment Model
- Source: markdown files in
earnOSplus canonical links to entity repositories. - Build target: static site deployed on Cloudflare Pages.
- Runtime: static HTML/CSS with progressive enhancement JS for search, recent docs, and reading progress.
- Optional worker: Cloudflare Worker for index caching and link validation telemetry.
- Build quality gate: markdown validation for required frontmatter and relative-link integrity.
Search Model
- Search is primary navigation.
- Sticky search is always visible on mobile and desktop.
- Desktop shortcut:
Cmd/Ctrl + K. - Mobile search opens full-screen search sheet.
- Build extracts
{id, title, summary, domain, entity_badges, headings, body_excerpt, canonical_url, repo, last_reviewed}. - Build emits
public/search-index.json. - Client search uses MiniSearch or Lunr loaded from
search-index.json. - Ranking order:
- title exact match
- summary match
- heading match
- body excerpt match
- recency boost from
last_reviewed
Navigation Model
- Mobile bottom navigation tabs:
- Home
- Domains
- Search
- Entities
- Recent
- Domain switcher uses frontmatter
domain. - Entity switcher uses
entity_badgesorrelated_entities. - Sidebar/left-rail ordering:
- explicit
nav_weight(optional) - alphabetical by
title
- explicit
Breadcrumbs and Cross-Repo Context
- Breadcrumb format:
repo > domain > page. - Show
Repobadge and entity badges on each page header. - Entity links always use
canonical_url. - UI displays
Source Repowhenrepo != earnOS. - Canonical path redirects are generated into
site/dist/_redirects.
Recently Viewed
- Client stores last 20 page IDs in
localStoragekeyearnos_recent_pages. - Stored object:
{id, title, canonical_url, repo, viewed_at}. - Deduplicate by
id, move latest to top. - Show in mobile
Recenttab and desktop left rail.
Executive Reading Experience
- Each document should render:
- Summary card
- Decision points block
- Main sections
- Collapsible detail sections
- Use native
<details>for long sections. - Reading progress bar appears below sticky search for long pages.
Desktop Layout
- Left rail: domain/entity/recent navigation.
- Center column: primary content.
- Right rail: summary, on-page outline, cross-repo links.
Accessibility Requirements
- Minimum tap target: 48x48px.
- WCAG AA contrast minimum.
- Base text size 17px or higher.
- Visible focus styles for keyboard navigation.
Non-Functional Requirements
- Time to interactive under 2 seconds on corporate network.
- Search response under 150ms after index load.
- Runtime enhancement scripts under 35KB gzip total.
- Build fails on missing required frontmatter fields.
- Broken link checker runs during CI using canonical URL validation.
- CI workflow runs validate + build on PR, and deploys to Pages on
mainwhen Cloudflare secrets are configured.