Skip to content

Rename build-catalog to build-llms, and stop claiming /catalog/ #193

Description

@abernier

Part of the distilled-docs spec (parent issue).

Why

The name is contradicted by the output. bin/lib/render.mjs claims in its header that /catalog/<name>.md sits next to the JSON, and test/turbo-cache.test.ts says the website build emits /catalog/*.{json,md} — but the script writes to apps/website/public/examples/. The word "catalog" no longer names anything the script emits.

"llms" names the audience instead, which is what unifies the three outputs: llms.txt, /examples/<name>.md, /examples/<name>.json, all served to the pmndrs docs MCP server and to rel="alternate" on every example page.

What

From To
bin/build-catalog.mjs bin/build-llms.mjs
bin/lib/render.mjs bin/lib/render-llms.mjs
test/render.test.ts test/render-llms.test.ts

Eight real references to update:

  • turbo.json (the inputs list)
  • apps/website/package.jsondev and build scripts, twice
  • test/render.test.ts — the import and its @ts-expect-error comment
  • test/turbo-cache.test.ts — two withTouched(...) calls and the stale /catalog/*.{json,md} comment
  • bin/build-catalog.mjs — its own import of ./lib/render.mjs
  • apps/website/lib/helper.ts — a comment naming the script
  • the two stale /catalog/ mentions, corrected to /examples/

The copies under .claude/worktrees/ are separate checkouts. Leave them alone.

Notes

Pure refactor, no behaviour change. It goes first so nothing else has to rebase over a file move, and alone because it touches turbo.json inputs and so busts the cache once.

Done when

pnpm check and pnpm test pass, the built output is byte-identical to before the rename, and no /catalog/ string survives outside .claude/worktrees/.


How to implement

Start from a cleared session — this issue is written to be self-sufficient, and a session carrying the design discussion also carries the options that were rejected.

Branch off main. Nothing depends on it, and it goes first so nothing else rebases over a file move.

git checkout -b rename-build-llms
/mattpocock-skills:implement #193

implement commits to the current branch, so the branch has to exist first — otherwise this lands on main.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions