Generated Docs
Everything in wiki/generated/ — this page included — is machine-written
by bun run wiki:build (tools/build-wiki.ts + the generators in
tools/wiki/). Never edit these files by hand: your change is overwritten on
the next build, and a page that drifts from what its generator would produce
fails the gates — bun run wiki:check (pre-push + CI docs job) for the
source-derived pages, bun run wiki:bundle:check (right after the production
build in pre-push + CI's test job) for the bundle page. Each page carries a
banner naming its generator and data source.
| Page | What it shows | Derived from | Refresh |
|---|---|---|---|
| Storybook | story inventory, play coverage, storyless components | *.stories.ts sources | wiki:build |
| Test Coverage | per-project coverage vs enforced thresholds | coverage-summary.json from --coverage runs | wiki:build |
| Production Bundle | ship sizes, package weights, project import graph | dist/ + stats.json + nx graph | build:prod + wiki:build |
| Routes | both apps’ sitemap: guards, flags, visual coverage | app.routes.ts + visual-diff manifests | wiki:build |
| Entitlements | tier ladder + permission matrix (executes can()) | @stretched/types acl/entitlements | wiki:build |
| Story Graph | runtime story dependency DAG | story-teller story sources | wiki:build |
| Functions API | Cloud Functions endpoints, auth markers, secrets, collections | apps/firebase-functions/src | wiki:build |
| E2E Flows | Playwright flow inventory (web / mobile / extension) | apps/playwright-e2e/src *.e2e.ts | wiki:build |
Adding a generated page
- Write a generator in
tools/wiki/that returns the page markdown — start it withGENERATED_NOTICEand rendergeneratedBanner({...})under the H1 (both fromtools/wiki/generated-page.ts). Diagrams are mermaid fences, so they render on GitHub and in the local site alike. - Register it in
tools/build-wiki.ts(cheapPages()if it needs no build, or the bundle path if it does) and add its row to theGENERATED_INDEXthere — this README regenerates from that registry. - Pin the parser with tests in
tools/build-wiki.spec.ts(wiki:test). - List the page in
wiki/_Sidebar.md,wiki/Home.md, and the table on Wiki Publishing.