Skip to content

docs: list every component in the README, and guard that it stays that way - #78

Merged
rodriabregu merged 1 commit into
mainfrom
docs/readme-coverage
Aug 29, 2026
Merged

rodriabregu merged 1 commit into
mainfrom
docs/readme-coverage

Conversation

@rodriabregu

Copy link
Copy Markdown
Owner

What & why

The package README is the npm page, and it listed 18 of 61 exports. A sixty-component library was selling itself as sixteen. Table, Toast, Sidebar, Combobox, Command, Select, Tabs, Field, Busy and the whole date family — 43 components — were not named anywhere in the file.

That surface is also the only one indexed for the package, so an incomplete README was a documentation bug and a discovery bug.

check-docs-coverage already guards the registry, the docs pages and the agent skill. The one surface a person actually lands on had no guard at all — which is exactly why it rotted unnoticed.

Review path

Start at packages/sve-ui/scripts/check-readme-coverage.mjs. It is deliberately the same shape as check-docs-coverage.mjs: check that the prose exists, keep a NOT_IN_TABLE map where every exclusion carries a reason, and say something useful when it fails.

Then packages/sve-ui/README.md — the component table it enforces.

Intentionally out of scope: generating the README section from the registry. This repo's stated position is that the reasoning in documentation is the valuable half and does not generate; the guard checks completeness and leaves the prose hand-written.

apps/example/README.md was audited and left alone — it is current and accurate.

Changes

File Change
packages/sve-ui/README.md All 60 components, grouped as the docs site groups them, .* marking namespaces
packages/sve-ui/scripts/check-readme-coverage.mjs New guard: every export listed, and the stated count matches
packages/sve-ui/package.json Guard wired into pnpm package — it runs before publish
apps/docs/README.md Replaced 38 lines of untouched create-svelte scaffold with a real README
README.md Repo tree never listed apps/example/
ROADMAP.md Render guard covers 67 pages, not 65

The guard, proven to fail

Per this repo's rule that a guard nobody has seen fail is not a guard:

── remove `Table.*` from the table ──
check-readme-coverage: FAILED
  - Table is exported but never listed as `Table.*` in the README
exit=1

── move the stated count 60 → 61 ──
check-readme-coverage: FAILED
  - the README claims 61 components but the library exports 60
exit=1

── restored ──
check-readme-coverage: 60 components, all listed in the README, and the stated count matches.
exit=0

Why the namespace split is marked

Dialog.* versus Button is the single thing consumers and LLMs get wrong most often — it is called out in the agent skill for that reason. The table now carries it, so the README answers the question without a round trip to the docs site.

Test plan

  • pnpm build — the package guard chain now runs six checks; check-readme-coverage reports 60 components, all listed in the README
  • Both failure modes of the new guard demonstrated (above), and the passing state restored
  • pnpm lint && pnpm check green; pnpm format:check clean
  • turbo run test --force — 644 tests across 72 files
  • pnpm --filter docs check:render — 67 pages unchanged
  • Every command and path claimed in the new apps/docs/README.md verified to exist (gen:props:check, check:render, check:render:update, gen:og, test:visual, render-baseline.json)

Checklist

  • Tests added/updated and passing (pnpm test)
  • pnpm lint && pnpm check && pnpm build all green
  • Changeset — not applicable: documentation and a build-time guard only, no library code and no published behaviour change
  • Docs updated if the public API changed — no API change; this is the docs catching up to the API
  • No Tailwind / config required in consumer projects

…t way

The package README is the npm page, and it had rotted all the way through: it
listed 18 of 61 exports and sold a sixty-component library as sixteen. Table,
Toast, Sidebar, Combobox, Command, Field, Busy and the entire date family — 43
components in total — were not named anywhere in the file. That surface is also
the only one a search engine indexes for the package, so an incomplete README
was both a documentation bug and a discovery bug.

`check-docs-coverage` already guards the registry, the docs pages and the agent
skill. The one surface a person actually lands on had no guard at all, which is
why nobody noticed.

- All 60 components now appear, grouped exactly as the docs site groups them,
  with `.*` marking the namespace compositions — the single/namespace split is
  the thing consumers and LLMs get wrong most often.
- `scripts/check-readme-coverage.mjs` fails when an export is missing from that
  table, and separately when the stated count disagrees with the exports. Both
  halves proven: removing `Table.*` reports it by name, and moving the count to
  61 reports the mismatch. Wired into `pnpm package`, so it runs before publish.
- `apps/docs/README.md` was still the untouched `create-svelte` scaffold for its
  first 38 lines, burying the visual-regression documentation underneath. It now
  describes the app, what is generated from what, and its guards.
- The root README's repo tree never listed `apps/example/`.
- The roadmap said the render guard covers 65 pages; it covers 67.
@vercel

vercel Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sve-ui Ready Ready Preview Aug 29, 2026 10:11pm

@rodriabregu
rodriabregu merged commit 6e0de5d into main Aug 29, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — e08105af Deployed Aug 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant