Contribute to the docs
This site is the apiome-docs/ workspace in the Apiome repository. Documentation is part of the
definition of done: every change to the product updates its pages in the same pull request, and
yarn docs:check runs on every pull request that touches the site or anything it is checked
against — its pages, the sources of the generated reference, the release notes, or the app screens
its screenshots show — and must pass before it merges.
Every issue carries a Documentation (Docusaurus) section listing what its pull request owes the docs — pages, screenshots, reference, release notes and the gate — and the pull request checklist below is the same list.
Where docs live
| What | Where |
|---|---|
| How to use Apiome — every page of this site | apiome-docs/docs/ |
| Contributor references that code points at by path (SPI guides, wire contracts, the sign-in provider guide) | apiome-rest/docs/, apiome-mcp/docs/ and a few files in apiome-ui/docs/ and apiome-db/docs/ |
| Old implementation notes — fix summaries, feature write-ups, test journeys | docs/archive/, read-only |
The archive is history: it does not describe the product as it is. Its
inventory (docs/archive/INVENTORY.md) lists every
triaged file and the page of this site that now covers its area.
Do not add Markdown notes beside the code. scripts/check-loose-docs.sh runs on every pull
request and fails when a new .md appears under apiome-*/docs/ — other than README.md,
CHANGELOG.md and AGENTS.md — unless it is listed in scripts/loose-docs-allowlist.txt. Write a
page here instead; add an allow-list line only for a contributor reference that code points at.
Run the site
From the repository root:
| Command | What it does |
|---|---|
yarn docs:dev | Live-reloading site at http://localhost:3200/apiome/ |
yarn docs:check | Page and screenshot rules, then the production build — what CI runs |
yarn docs:screenshots | Recapture the product screenshots |
yarn workspace apiome-docs test | Unit tests for the rules and components |
Write a page
The site is four guides, each with its own sidebar: the User guide (getting-started, build,
bring-in, ship, govern, workspace), the Administration guide (admin), the CLI
(reference/cli-quickstart.md and reference/cli/) and the Reference (the rest of
reference/). Pick the guide its reader is in, then the group:
- Add
docs/<group>/<page>.md— or.mdxwhen the page uses a component such as<Screenshot/>. - Give it front matter:
title, adescriptionof 14 words or fewer,sidebar_positionandtags. A per-format import guide inbring-in/is named<format>-import.md: the sidebar files every page with that name under Bring in › API formats instead of listing it in Bring in itself. - Write steps with bold UI nouns (“click Import to catalog”) and quote buttons as they read in the product.
A diagram goes in a ```mermaid fence, in a .md or .mdx page; it renders as an SVG that
follows the light or dark theme. Prefer it to a hand-drawn image, which cannot be regenerated.
The workspace's apiome-docs/README.md covers the
groups, the components and the generated pages in full.
Some pages are generated and say so in their front matter (generated:): the REST, CLI and MCP
references under Reference, the CI action pages, the supported-formats table and the
lint-rule catalogs. Change the code they come from and rerun the generator named on
Reference — a hand edit is overwritten, and CI fails until the page matches its source.
Withdraw a page for an unreleased feature
When a feature is held back — its rail item shows coming soon — its pages leave the site but are
kept. draft: true and unlisted: true fail the gate, so move them out of docs/ instead:
git mveach page toapiome-docs/unreleased/docs/<same path>.- Move its screenshot entries from
screens.jsontounreleased/screens.json, and its images tounreleased/static/img/screens/— only the ones no remaining page uses. - Fix every page that linked to it or sent the reader there; say plainly when something is not yet available.
- Add the page to the table in
apiome-docs/unreleased/README.md, which also lists the steps to restore it.
Nothing in the build, the gate or the screenshot run reads unreleased/. Generated pages stay in
docs/ while their generator writes them there.
Regenerate the reference
The Reference pages for the REST API, the CLI and the MCP server are generated from their source. When a pull request changes one of them, rerun its generator and commit the pages:
| You changed | Run |
|---|---|
A REST endpoint (apiome-rest/openapi.yaml) — bump its info.version too | cd apiome-rest && uv run python scripts/generate_rest_reference_docs.py |
| A CLI command or option | cd apiome-cli && uv run python scripts/generate_cli_reference_docs.py |
| An MCP tool, resource or prompt | cd apiome-mcp && uv run python scripts/generate_mcp_reference_docs.py |
The diff-action or mock-action README | yarn workspace apiome-docs sync:action-pages |
CI reruns each generator with --check and fails when a committed page no longer matches.
The CLI ↔ UI parity ledger
Every apiome pact command has a screen, and every Contracts screen that changes something has
a command. docs/pact-parity-ledger.json records both directions, and
The same command, in the app is its table for
readers. When you add or rename a pact command, or a POST / PUT / PATCH / DELETE route
under apiome-ui/src/app/api/pact:
-
Regenerate the command list:
cd apiome-cli && uv run python scripts/export_pact_commands.py. The CLI suite fails whileapiome-cli/pact-commands.jsonis stale. -
Add the row to the ledger. A command row names its page (
ui, an App Router route such as/ade/dashboard/pacts/webhooks) and its REST route. A write-route row names the page that sends it and itsapiome pactcommand (cli). -
If one side does not exist yet, set it to
nulland write areason: why, and the ticket that adds it. Remove the reason in the pull request that ships the missing side. -
Give the screen its The same, from anywhere block (
CommandBlock, built withlib/pact-commands.ts), and update the table on the CLI page. -
When a screen does everything a command does (the Publish page and
publish), list the command's arguments and flags underfields, each with the control that sets it.
apiome-ui/tests/pact-parity-ledger.test.ts fails on a command or write route with no row, a row
for something that no longer exists, a page that is not a route, a missing or stale reason, and a
fields map that misses a flag, names one the command does not take, or leaves one empty.
Add a screenshot
Screenshots are never pasted by hand: each one is an entry in apiome-docs/screens.json, captured
by a script in a light and a dark theme, and retaken every week.
-
Add an entry to
screens.json:{"id": "catalog","route": "/ade/dashboard/catalog","waitFor": "[data-testid=\"page-header\"]","mask": ["time"],"data": "golden-path","fallback": "fixture:hive-catalog/table.html"} -
Capture it:
yarn docs:screenshots -- --id catalog. This writesstatic/img/screens/catalog.light.pngandcatalog.dark.png; commit both. -
Place it on an
.mdxpage:<Screenshot id="catalog" alt="The Catalog page listing four imported items" />
The result looks like this — switch the site theme to see the dark capture:


/ade/dashboard/catalogThe catalog, captured from the committed fixture.Manifest fields
| Field | Required | Meaning |
|---|---|---|
id | yes | Lower-case words joined by hyphens; also the image file name |
route | yes | The product route the screen shows; it is opened in golden-path mode and shown as the route badge |
waitFor | yes | CSS selector that is visible once the screen is ready |
data | yes | "golden-path" (the real route, signed in to the seeded stack), "signed-out" (the real route with no session, such as /login — needs only apiome-ui) or "fixture:<dir>/<file>.html" (a dump from apiome-ui/e2e/fixtures/) |
fallback | no | For a golden-path entry: the fixture to use when the stack is not running |
mask | no | CSS selectors painted over before the capture — dates, ids and counts that change between runs |
scrollTo | no | CSS selector scrolled into view before the capture — for a subject below the fold of a long page, such as a card further down System settings |
clip | no | {"x", "y", "width", "height"} to capture one region instead of the viewport |
theme | no | ["light", "dark"] (default); a page can only show an entry that has both |
viewport | no | Default {"width": 1440, "height": 900} |
density | no | comfortable (default) or compact |
fontScale | no | md (default), or xs, sm, lg, xl |
appTheme | no | A product theme — light, dark, high-contrast, blueprint, whiteboard, solarized, nord or darcula — pinned in both captures, whatever the site theme. For theme galleries |
sources | no | Repository paths whose changes make the image stale. Defaults to the route's folder under apiome-ui/src/app/; list the component instead when the screen is a dialog or a shared panel, e.g. ["apiome-ui/src/app/components/ade/WhatsNewDialog.tsx"] |
tags | no | ["legacy"] marks a surface that predates the Hive redesign (#5272): a page showing it needs the <Legacy/> callout, and the weekly refresh lists it when its image changes |
Next.js's development overlay is hidden in every capture. Every capture runs with the clock fixed at 15 June 2026, 09:30 UTC, and with motion off, so two runs produce the same pixels.
Where the pixels come from
- Golden-path mode signs in as the seeded user (
ada@example.com) and opens the real route. It needs the golden-path stack —scripts/golden_path/run.sh --keepbrings it up, or pass--boot— and an apiome-ui pointed at it. - Signed-out entries open their route without signing in, so they work with or without the stack.
- Fixture mode mounts a committed dump of the page into the sign-in route, which loads the
app's real styles and needs no database. Entries with a
fallbackuse it when the stack is down.
| Option | Use |
|---|---|
--id <id> | Capture one entry; repeat it or separate ids with commas |
--route <prefix> | Capture every entry whose route starts with the prefix |
--start-ui | Start an apiome-ui dev server on port 3300 for the run |
--ui-url <url> | Capture from an apiome-ui that is already running (default http://localhost:3300) |
--boot | Bring the golden-path stack up first when it is not running |
--fixtures-only | Use fixtures even when the stack is up |
Set DOCS_CHROMIUM_PATH to a Chromium executable if Playwright's own browser is not installed. The
script exits with an error when any selected entry could not be captured.
What the gate checks
yarn docs:check fails when:
- a page has no
titleordescription, or the description is over 14 words; - a page is an orphan — in no sidebar: directly in
docs/instead of a group folder, or hidden withunlisted: true,draft: trueordisplayed_sidebar: null; - an internal link is broken — a relative link to a page that does not exist, or a site path such
as
/ship/export-a-specthat nothing serves. The build then checks every anchor too; - a manifest entry is invalid, or is missing the image for a theme it declares;
- a page uses
<Screenshot id/>with an id that is not in the manifest, or that lacks a light or a dark image; - a page shows a screenshot tagged
legacywithout the<Legacy/>callout; - a screenshot is stale: it was captured before the last two releases closed and the code behind
its route (or its
sources) changed since. Recapture it withyarn docs:screenshots -- --id <id>; - the REST reference was generated from an older
apiome-rest/openapi.yaml.
The build itself fails when a <Screenshot/> has no alt text. The message names the page, the
link or the screenshot id, and the command that fixes it.
The weekly refresh
The Apiome Docs Screenshots workflow runs every Monday (and on demand). It brings up the
golden-path stack, recaptures every entry, and opens a pull request when any image changed. The pull
request lists any changed legacy screen, since that usually means its redesign has landed.
Pull request checklist
Paste this into the pull request description and tick what applies; say why for anything that does not:
### Documentation
- [ ] Pages: <paths under apiome-docs/docs/ added or changed>
- [ ] Screenshots: <ids added or recaptured with `yarn docs:screenshots -- --id <id>`>
- [ ] Reference: <REST / CLI / MCP pages regenerated, or "no REST, CLI or MCP change">
- [ ] Release notes: <apiome-rest/CHANGELOG.md entry, release-notes post, What's new line>
- [ ] `yarn docs:check` passes