Pattern Index (the generated README capability map)
Generated from
pattern-library/registry.json— do not edit by hand; change the registry and runbun run patterns:build.
Category: Docs & Agent Experience · Tier: deep · Maturity: proven (verified 2026-08-20 @ 1a130d67) · Risk: low — documentation artifact
A generated table in README.md mapping every repo pattern to the doc that explains it, the code that implements it, and the showcase page that proves it — rendered from this registry (136 rows, 20 categories, two tiers).
When to use: Use as the top-level discovery surface for what a reference repo can do; it is the human-readable projection of this registry, regenerated by patterns
.Docs
Code
scripts/patterns/build-derived.ts— Generates the README region + docs/pattern-library/ pages; --check mode gates staleness (GitHub · GitLab)src/lib/server/patterns/render.ts— Pure renderers (testable, Vite-free) (GitHub · GitLab)src/lib/showcases/catalog/registry.ts— Showcase-route cells are validated against this registry's hrefs (GitHub · GitLab)
Tests
src/lib/server/patterns/render.test.ts— Pins the generated index/page renderers; staleness is gated by patterns in the same validate gate — runs on every bun run validate (GitHub · GitLab)src/lib/server/patterns/links.gate.test.ts— Every registry docs ref must resolve to a published manifest entry (GitHub · GitLab)
Invariants
- Coverage source of truth is pattern-library/registry.json — the README region between the PATTERN-INDEX markers is generated and must never be hand-edited.
- Every row must point to docs AND code AND (where possible) a live proof route — a row without proof is a claim, not a pattern.
- patterns in the validate gate blocks shipping a stale index; bun run patterns (or vr ref) regenerates it.
Emulation notes
- Anchor the human-readable index to a machine-readable registry and GENERATE it — a hand-maintained twin drifts (this one did: its own row-count claim went stale before the generator existed).
- Showcase-route cells are validated by pattern-library/validate.ts against src/lib/showcases/catalog/registry.ts membership, not mere directory existence.
Depends on
Machine-readable record: pattern-index in pattern-library/registry.json.