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

The docs are a site, with references to the API and the MCP tools

Closed
Closed chadtmiller.com asked to merge into main from chadtmiller.com/group-host:docs/site

What changes

The docs site. docs-site/ makes a Starlight site of docs/, as knotless's docs-site/ does, without changing docs/: content.mjs copies each page in, its first heading its title; plugins.mjs sends a link between pages to the site's page and a link out of docs/ to the file on knotless.dev; reference.mjs draws a reference table of routes or methods as a list, each with its HTTP method as a badge and, for a fyi.opensocial method or MCP tool, its lexicon (parameters, input, output, errors) folded under it, read from lexicons/ so it cannot drift. Its look is the console's, from web/src/tokens.css: its palette, rounded bold headings and type scale.

Two reference pages. docs/reference/api.md lists every route the host answers, by part (groups, membership, people, spaces, signing apps in, assistants, moderation, recovery, moving, the console, the PDS), and who a method takes its caller to be. docs/reference/mcp.md lists the tools at /mcp.

Checks and recipes. A docs workflow runs harness/docs.mjs (every relative link and anchor lands, knotless's check without the diagrams, as there are none here) and builds the site. just docs, just docs-site (served at http://localhost:4321/) and just docs-deploy.

Why

The docs had no reference for the API or the MCP tools, and nowhere to read them but the repository. The site is deployed as the repository's knotless site. The repository is private, so the site is too, served to its members at a host of its own and built with / as its base. A private site is kept in the repository's space, which an app password cannot write, so a workflow can't deploy it: the owner runs just docs-deploy, signed in with knotless login.

How it was checked

node harness/docs.mjs: 17 pages, no problems. npm run build in docs-site/: 16 pages, a lexicon under each fyi.opensocial method in the API and under each of the 21 MCP tools. Looked at the API, MCP and development pages in Chromium, light and dark. Every check passes, docs among them.

Shortcomings

Not deployed yet: the installed knotless predates private sites, so just docs-deploy needs a knotless upgrade first. The site is not redeployed when the docs change; someone has to run the recipe.

🤖 Generated with Claude Code

chadtmiller.com added 2 commits
Asked for changes

This pull adds a Starlight site over docs/, two reference pages (API and MCP), a docs workflow and just recipes. The design is sound, but the Justfile edit deletes the lint: recipe header, which is a bug.

Must fix: the hunk in Justfile replaces the lint: line with the three new recipes and never restores it. cargo fmt --check, clippy, harness/layers.mjs and npm run check now sit under docs-deploy. just lint no longer exists, and just docs-deploy would run the whole lint suite after the knotless site step. Neither .knotless/workflows/web.yml nor AGENTS.md has been updated to reflect this, and web.yml still says "as just lint runs them". Put lint: back above its commands, after docs-deploy.

I read the workflow, harness/docs.mjs, the site's *.mjs files and config, docs/reference/mcp.md and the AGENTS.md changes, and they look fine. I did not read docs/reference/api.md, docs/development.md, docs/README.md, docs/reference/cli.md, theme.css, the two small Astro components, content.config.ts, .gitignore or the lockfile. They are mostly prose, styling or generated, and I didn't have the budget to check them.

Justfileline 48
# The docs site, built and deployed as the repository's, for its members.
docs-deploy:
cd docs-site && npm ci --no-audit --no-fund && npm run build
knotless site knotless://chadtmiller.com/group-host docs-site/dist --not-found 404.html
review.knotless.dev

The lint: header that was here was removed by this diff. fmt --check, clippy, layers and svelte-check now run as part of docs-deploy, and just lint is gone. Restore lint: before the {{cargo}} fmt line.

Asked for changes

The head commit is still d7bc7b48, the same as my last review, so only the title or body changed. The bug I asked you to fix is still there.

Must fix: in Justfile, the lint: header is gone. The cargo fmt --check, clippy, harness/layers.mjs and npm run check lines now sit under docs-deploy. just lint no longer exists, and just docs-deploy would run the whole lint suite after knotless site. Put lint: back above those four commands, after docs-deploy, and keep the original comment that was above lint:.

The rest of the pull is unchanged from my first round.

Justfileline 42
# The docs as their site, at http://localhost:4321/, redrawn as they change.
docs-site:
cd docs-site && npm ci --no-audit --no-fund && npm run dev
review.knotless.dev

The lint: header was dropped here. These four lint commands now belong to docs-deploy, so just lint is gone. Restore lint: (with its comment) above {{cargo}} fmt --all --check, after docs-deploy.

Landed on main with at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.pull/3mzjc6mhqt2ds, which carried these commits and restored the lint: recipe the review asked for.