~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

A documentation site built from docs/, the spec and the lexicons

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/monolith:docs/site

A documentation site for spec-pds, at https://chadtmiller-com.knotless.page/spec-pds/ once this lands. Only the guides are written by hand. The spec pages are rendered as they are, and the methods and variables pages are generated from the lexicons and the spec, so they cannot drift. Before it deploys, the owner has to set SITE_PASSWORD.

Claude Opus 5.5 · high

What changes

Guides. docs/README.md and six guides in docs/guide/: getting started, calling the server, deploying, operating, comparing with the reference, and contributing. They take over the README's "How it is checked", "Commands", "Running it", "Deploying", "Checks" and "Releases" sections, with no fact dropped. Operating is new: it covers logs, health, metrics, traces, shutdown, upgrades, and disk and memory bounds, each linking the spec section that sets the rule. The README keeps its intro, Layout and Known gaps, and gains a Documentation section.

The site. docs-site/ uses the same Astro Starlight setup as knotless's docs. content.mjs copies docs/**, spec/*.md, and compat/ and bench/ (both the README and RESULTS), taking each page's title from its first heading. It also generates two pages:

  • Methods: every method lexicon in spec/lexicons (88 of them). Each entry gives its HTTP verb, its MCP tool and pds command (by COMMANDS.md's rule), its parameters, input, output and errors, and a link to the spec page that PDS.md's "What it serves" list gives for it.
  • Environment variables: every | Variable | Is | table in the spec, page by page.

plugins.mjs turns links to rendered files into links to their site pages, and any other relative link into a link to the file on knotless.dev. In the spec, it also turns a page named in code, such as LIMITS.md, into a link to that page. The sidebar orders the guides as docs/README.md lists them and groups the spec into areas; a spec page not in any area lands under "More", so a new page is never left out.

Spec. No behaviour changes. OAUTH-CLIENTS.md gets a one-row table for PDS_OAUTH_CLIENT_FETCH, and COMMANDS.md a table of the CLI's PDS_URL, PDS_TOKEN and PDS_ADMIN_PASSWORD, so every variable the spec names is in a table. OAUTH-MCP.md and the Dockerfile comment point at docs/guide/deploying.md instead of the README.

Workflow. .knotless/workflows/docs.yml builds the site on pulls into main and on pushes to it, when they touch docs/, the spec's pages or lexicons, compat/, bench/ or the site. On main only, it deploys with the pinned chadtmiller.com/steps/site@1, which is added to uses.lock.

Rules. AGENTS.md and .knotless/review.md: a change to how the server is run, deployed, called or checked updates its guide in the same pull, and docs/ holds no history or plans. AGENTS.md's Tools section says how to build the site.

Why

The spec pages are long and are written as rules, so someone who wants to run or call the server has nowhere to start. Writing plain-language explainers for each area would create a second copy of the spec, which agents would not keep current, since they change the spec first. So only the how-to material is new prose, and most of it is moved from the README rather than copied. The rest of the site comes from files that are kept up to date already.

How it was checked

  • npm run build in docs-site/: 44 pages, with no broken link or anchor.
  • The build failing on purpose:
    • A link to a missing file, or to a missing heading in an existing file, fails (tried on both).
    • Dropping getLatestCommit from PDS.md's "What it serves" list fails with "lists no page for com.atproto.sync.getLatestCommit".
    • Removing the PDS_URL row fails with "variables the spec names in no table".
    • Each file was restored after each attempt.
  • Methods: all 88 link to a spec page. Before a fix, the last list item had swallowed the paragraph after the list and pointed the proxied app.bsky methods at OAUTH-SCOPES.md; they now point at PROXY.md.
  • Looked at the built site in Chromium, light and dark: the overview, a guide, a spec page, Methods and Variables.
  • No server code changed, so just quick was not run. The gates run here because uses.lock and Dockerfile changed.

Shortcomings

  • It won't deploy until the owner makes an app password and runs printf %s "$APP_PASSWORD" | knotless secret knotless://chadtmiller.com/spec-pds set SITE_PASSWORD --ref refs/heads/main. Until then, the deploy step on main fails.
  • The docs workflow has not run on the runner yet; this pull's run is its first.
  • The vendored specs (spec/atproto, rfc, mcp, spaces) are not rendered; links to them go to knotless.dev.
  • The spec's areas in the sidebar are a hand-kept list in astro.config.mjs. A page missing from it shows under "More", so leaving one out is visible but does not fail the build.

Review

The design, more than the prose. Start with docs-site/content.mjs (the pages and the two generators), then plugins.mjs. The guides are mostly README text moved.

Approved

This adds an Astro Starlight site under docs-site/, built from the new docs/ guides, the spec pages and the lexicons. The methods and variables pages are generated. No server code changes, and the spec changes only add tables for variables that were already named, so no behaviour moves. The docs workflow passed on this head: install and build succeeded, and the deploy step was skipped because this isn't main. The gates run was still running when I looked.

The generators fail the build when a method has no spec page or a variable has no table, which is a sound design. The link plugin errors on a missing file or heading. The SITE_PASSWORD secret is only on the main-only deploy step, so pulls never get it. The uses.lock pin and the review.md and AGENTS.md rules match what the pull says.

I read content.mjs, plugins.mjs, the workflow, uses.lock, review.md, AGENTS.md, Dockerfile and the three spec edits. I did not read the guides, the site styling, the Astro config or the lockfile.

Non-blocking: the README's "Checks" section moved into docs/guide/contributing.md, but several comments still point at it as "README.md, Checks". They are in deny.toml, harness/code.mjs and harness/gates.mjs. Repoint them to the guide so they don't dangle. The bench/README.md and compat/README.md references still resolve.

Merged as 99e4916