Contributing to the Docs
This site is a VitePress docsite, themed from design-system/DESIGN.md, gated behind Cloudflare Access. Drop a markdown file into a category folder and it appears in the sidebar. Need richer than markdown? Inline Vue lives in the same file. Need a fully standalone artifact? Drop it in public/.
Quick start
# from the repo root
bun install
bunx vitepress dev docs --port 5199
# → http://localhost:5199There's also a Docs entry in .claude/launch.json for the Claude Code preview tooling.
Drop-in workflow. Create docs/<category>/my-doc.md, add a title: and order: to its frontmatter, restart the dev server, and it's in the nav + sidebar. No config.mts edits.
Pick a tier of fidelity
Pick the lowest tier that fits — higher tiers add maintenance cost.
Tier 1 — Markdown
Plain markdown, fenced code, mermaid, frontmatter. The default for most docs.
---
title: My Doc
order: 3
---
# My Doc
Short intro paragraph.
## A section
- Lists
- `inline code`
- Tables, fenced code, mermaid all work natively
```python
def hello(): return "world"
```
```mermaid
flowchart LR
A[Start] --> B[Done]
```Use it for: runbooks, RFCs, architecture notes, dev-setup guides — anything that reads top-to-bottom.
Categories
Every category is a top-level folder under docs/. Drop a .md in and it appears.
| Folder | Sidebar label | Goes here |
|---|---|---|
architecture/ | Architecture | System/design docs. |
design-system/ | Design System | DESIGN.md tokens, style guidance. |
proposals/ | Proposals & RFCs | Design proposals/RFCs. Copy proposals/_template.md. |
runbooks/ | Runbooks & Guides | Operational runbooks. |
dev-setup/ | Dev Setup | New-machine / dev-environment setup. |
Add a new category
Add one row to CATEGORIES in config.mts and create the matching folder with at least one .md (otherwise it's skipped):
const CATEGORIES = [
{ dir: 'architecture', label: 'Architecture' },
// ...
{ dir: 'my-new-cat', label: 'My New Category' },
]Mermaid diagrams
Fenced ```mermaid blocks render client-side. The theme cleans up after failures so a single broken diagram can't pollute other pages.
Semicolons break sequenceDiagram text. ; is a statement separator in mermaid's sequence grammar. Inside any sequenceDiagram message or Note, use —, ,, or <br/> instead.
Note over X: token validated; identity locked ❌ parse error
Note over X: token validated, identity locked ✓Design tokens
The docsite imports the live DESIGN.md token set. Use the CSS variables for every color, font, and radius — never hardcode brand hex.
/* available globally on every page */
color: var(--color-primary); /* #893eff */
background: var(--vp-c-bg-soft); /* dark-mode aware surface */
border-radius: var(--radius-lg); /* 16px */
font-family: var(--font-body);| Variable family | Source | Use for |
|---|---|---|
--color-primary, --color-brand-*, --color-purple-50..950 (+ pink/green/red/orange/black ramps) | design-system/generated/tokens.css (from DESIGN.md) | Brand, accents, tints. |
--vp-c-bg, --vp-c-bg-soft, --vp-c-bg-alt, --vp-c-text-1, --vp-c-text-2, --vp-c-divider, --vp-c-brand-1 | VitePress + theme overrides | Surfaces and text — dark-mode aware. Prefer these for chrome. |
--radius-xs..xl, --font-body | DESIGN.md | Shape and type. |
See /design-system/ in the sidebar for the palette and full token list.
Run locally / build / deploy
bunx vitepress dev docs --port 5199 # dev w/ HMR
bunx vitepress build docs # production build — catches dead linksThe build is dependency-free (bunx resolves VitePress on demand). The deploy build command is just bunx vitepress build with docs as the root.
Dev-server restart needed for new files/categories. The nav + sidebar are generated by a filesystem scan at config-load time. HMR covers content edits live, but a newly added file or category only shows up after the dev server restarts (or in a fresh build).
See also
- For Claude Code agents: the
docsskill — same content, agent-targeted. - Tokens source of truth:
design-system/DESIGN.md. Hand-edit; generated artifacts flow from it. - VitePress docs: vitepress.dev for the framework itself (Vue in markdown, frontmatter, custom theme).