feat: docs reference generates a human command reference under docs/reference/ from the command records, one page per group plus exit codes and gates; toc never lands inside another generated region (#188)
CI / verify (push) Successful in 6m11s
CI / pwsh (push) Successful in 2m0s
Release / release (push) Successful in 35s

Files changed:
- CHANGES.md
- README.md
- VERSION
- docs/reference/README.md
- docs/reference/commands/README.md
- docs/reference/commands/catalog-and-log.md
- docs/reference/commands/content-migrations.md
- docs/reference/commands/distribution-and-versioning.md
- docs/reference/commands/finding-and-checking.md
- docs/reference/commands/git.md
- docs/reference/commands/guideline-export.md
- docs/reference/commands/instance-health.md
- docs/reference/commands/links-and-citations.md
- docs/reference/commands/pages.md
- docs/reference/commands/provenance.md
- docs/reference/commands/raw-material-and-uploads.md
- docs/reference/commands/telemetry.md
- docs/reference/commands/types-instructions-and-docs.md
- docs/reference/commands/workshop-runs-and-session-budget.md
- docs/reference/exit-codes.md
- instructions/dev/doc-pull-through.md
- tools/CONTRACT.md
- tools/README.md
- tools/chemenu/cli.py
- tools/chemenu/cli_contract.py
- tools/chemenu/commands/docs_verify.py
- tools/chemenu/reference_doc.py
- tools/chemenu/tests/test_reference_doc.py
- tools/chemenu/toc.py

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SnAJ7Z3CpVD3PRbN73QtU2
This commit is contained in:
torbenandClaude Opus 5.5 committed 2026-10-06 21:29:01 +02:00
1 parent 01c888d3cd
commit 53383e7e9b
29 files changed
+5079 -29

No files matched your search

+164
View File
@@ -0,0 +1,164 @@
# Command reference
Every `wikitool` command, one page per group, generated from the same records `tools/wikitool
<command> -h` prints. Each command's section gives its synopsis, options, examples, behaviour,
properties and exit codes; what a command exits 42 for, and which gate it belongs to, is
collected in [exit codes and gates](../exit-codes.md).
<!-- wikitool:toc -->
## Contents
- [Pages](#pages)
- [Links and citations](#links-and-citations)
- [Catalog and log](#catalog-and-log)
- [Finding and checking](#finding-and-checking)
- [Provenance](#provenance)
- [Raw material and uploads](#raw-material-and-uploads)
- [Git](#git)
- [Guideline export](#guideline-export)
- [Workshop runs and session budget](#workshop-runs-and-session-budget)
- [Types, instructions and docs](#types-instructions-and-docs)
- [Telemetry](#telemetry)
- [Distribution and versioning](#distribution-and-versioning)
- [Content migrations](#content-migrations)
- [Instance health](#instance-health)
<!-- /wikitool:toc -->
<!-- wikitool:reference-commands-index -->
## Pages
Full records: [pages.md](pages.md)
- [`new`](pages.md#new) - Scaffold a new wiki page of any type.
- [`task new`](pages.md#task-new) - Create one open item in the configured task tracker - never a kb/ page.
- [`task list`](pages.md#task-list) - List a project's open items - id, title, and whether each carries the WAITING status.
- [`task close`](pages.md#task-close) - Mark one tracker item done - never delete it.
- [`touch`](pages.md#touch) - Bump a page's `modified:` date and optionally rewrite its other frontmatter fields.
- [`rename`](pages.md#rename) - Rename a page, or repoint references that name a page that never existed.
- [`rm`](pages.md#rm) - Delete a page and mechanically de-link it from the rest of the wiki.
- [`move`](pages.md#move) - Move a page (or every misplaced page) to the directory its type-spec computes.
## Links and citations
Full records: [links-and-citations.md](links-and-citations.md)
- [`xref add`](links-and-citations.md#xref-add) - Declare that A <rel> B.
- [`xref remove`](links-and-citations.md#xref-remove) - Remove a cross-reference: the inverse of `xref add`.
- [`xref link-source`](links-and-citations.md#xref-link-source) - Batch-link a source page to every entity/concept it mentions.
- [`links show`](links-and-citations.md#links-show) - Show the edges out of and into a page.
- [`cite id`](links-and-citations.md#cite-id) - Print the deterministic footnote id `cite add` would use for this (title, file) pair.
- [`cite add`](links-and-citations.md#cite-add) - Upsert a `[^cite-id]: [[Source - X]]` definition in a page's footnotes region.
- [`cite sync`](links-and-citations.md#cite-sync) - Reconcile each page's footnotes region against its actual `[^id]` references.
## Catalog and log
Full records: [catalog-and-log.md](catalog-and-log.md)
- [`index rebuild`](catalog-and-log.md#index-rebuild) - Regenerate the catalog from every page's frontmatter.
- [`log append`](catalog-and-log.md#log-append) - Append a formatted entry to `kb/log.md`.
- [`log status`](catalog-and-log.md#log-status) - Read-only: count `ingest` entries logged since the last `lint` entry.
## Finding and checking
Full records: [finding-and-checking.md](finding-and-checking.md)
- [`lint`](finding-and-checking.md#lint) - Run structural lint checks against kb/.
- [`search`](finding-and-checking.md#search) - Find pages in `kb/` by text and/or frontmatter.
- [`review`](finding-and-checking.md#review) - The GTD weekly review.
## Provenance
Full records: [provenance.md](provenance.md)
- [`sources coverage`](provenance.md#sources-coverage) - List raw files with no source page, broken `raw_files:` references, and legacy directory/URL-only source pages.
- [`sources trace`](provenance.md#sources-trace) - Trace provenance in either direction: raw file, or page.
- [`sources rebuild-index`](provenance.md#sources-rebuild-index) - Regenerate the `kb/provenance.md` reverse index.
## Raw material and uploads
Full records: [raw-material-and-uploads.md](raw-material-and-uploads.md)
- [`raw fetch`](raw-material-and-uploads.md#raw-fetch) - Capture a web page the user names into `incoming/`: the HTML as received plus a derived text, for `raw accept` to promote.
- [`raw capture`](raw-material-and-uploads.md#raw-capture) - Capture documentation from a git repository into `incoming/<bundle>/`, with a manifest naming the repository, ref rule and commit, for `raw accept` to promote.
- [`raw status`](raw-material-and-uploads.md#raw-status) - Report which captured bundles under `raw/` have fallen behind their repository, with each changed file as `A`/`M`/`D`.
- [`raw pending`](raw-material-and-uploads.md#raw-pending) - List what waits in `incoming/`, oldest first, and name the entry an ingest without an argument takes next.
- [`raw accept`](raw-material-and-uploads.md#raw-accept) - Promote one or more files, or one folder, from `incoming/` into `raw/`.
- [`upload list`](raw-material-and-uploads.md#upload-list) - List every MCP submission currently waiting in the quarantine (`mcp-upload/`).
- [`upload show`](raw-material-and-uploads.md#upload-show) - Print one submission's manifest in full.
- [`upload accept`](raw-material-and-uploads.md#upload-accept) - **Upload Review Gate:** promote a submission's file from quarantine into `incoming/`.
- [`upload reject`](raw-material-and-uploads.md#upload-reject) - Delete a submission's material, keeping only its ledger trail.
## Git
Full records: [git.md](git.md)
- [`sync`](git.md#sync) - Fetch `<remote>/<branch>` and bring the local branch up to date with it.
- [`publish`](git.md#publish) - Reconcile with `<remote>/<branch>`, then stage all changes, commit, and push.
## Guideline export
Full records: [guideline-export.md](guideline-export.md)
- [`export guidelines`](guideline-export.md#export-guidelines) - Render the guideline pages into one generated `GUIDELINES.md`, or push it into the captured repositories that opted in (**Guideline Push Gate**).
## Workshop runs and session budget
Full records: [workshop-runs-and-session-budget.md](workshop-runs-and-session-budget.md)
- [`work new`](workshop-runs-and-session-budget.md#work-new) - Scaffold `work/<runkey>/` for one workshop run.
- [`work close`](workshop-runs-and-session-budget.md#work-close) - Delete a finished workshop.
- [`budget status`](workshop-runs-and-session-budget.md#budget-status) - Show the current session's `wikitool` call count and recent command history.
- [`budget reset`](workshop-runs-and-session-budget.md#budget-reset) - Clear the current session's (or every session's) iteration budget state.
## Types, instructions and docs
Full records: [types-instructions-and-docs.md](types-instructions-and-docs.md)
- [`types list`](types-instructions-and-docs.md#types-list) - List every type-spec under `types/`.
- [`types describe`](types-instructions-and-docs.md#types-describe) - Print one type's full contract.
- [`instructions sync`](types-instructions-and-docs.md#instructions-sync) - Publish every `instructions/<name>/SKILL.md` into the harness skill directories.
- [`instructions verify`](types-instructions-and-docs.md#instructions-verify) - Check the instruction layer.
- [`instructions list`](types-instructions-and-docs.md#instructions-list) - List the flat instructions with their descriptions.
- [`docs verify`](types-instructions-and-docs.md#docs-verify) - Check the docs that mirror the code.
- [`docs toc`](types-instructions-and-docs.md#docs-toc) - Create, refresh or remove the generated table-of-contents region.
- [`docs prerequisites`](types-instructions-and-docs.md#docs-prerequisites) - Regenerate `INSTALL.md`'s prerequisites lists from `tools/prerequisites.txt`.
- [`docs contract`](types-instructions-and-docs.md#docs-contract) - Regenerate `tools/CONTRACT.md`'s `<!-- wikitool:commands -->` region.
- [`docs reference`](types-instructions-and-docs.md#docs-reference) - Regenerate the human command reference under `docs/reference/`.
## Telemetry
Full records: [telemetry.md](telemetry.md)
- [`eval sessions`](telemetry.md#eval-sessions) - List the sessions that have a trace under `reports/telemetry/`.
- [`eval score`](telemetry.md#eval-score) - Score one traced session.
## Distribution and versioning
Full records: [distribution-and-versioning.md](distribution-and-versioning.md)
- [`dist export`](distribution-and-versioning.md#dist-export) - Write a contentless, distributable copy of this repo's machinery.
- [`dist adopt`](distribution-and-versioning.md#dist-adopt) - Take shipped templates as this instance's own: copy each to its unsuffixed name.
- [`dist upgrade`](distribution-and-versioning.md#dist-upgrade) - Apply a stack update `dist export` produced - the write half of `version check`.
- [`version show`](distribution-and-versioning.md#version-show) - Print this instance's stack version and where it came from.
- [`version check`](distribution-and-versioning.md#version-check) - Ask the origin's release feed whether a newer stack exists.
- [`version notes`](distribution-and-versioning.md#version-notes) - Print one version's release notes.
- [`version bump`](distribution-and-versioning.md#version-bump) - Raise or continue the one running candidate between two releases.
- [`version regrade`](distribution-and-versioning.md#version-regrade) - List the running candidate's bump titles with their impact grade, or change one or more of them.
- [`version release`](distribution-and-versioning.md#version-release) - Fix the running candidate: strip `VERSION`'s `-beta.N` suffix and close its `CHANGES.md` entry.
## Content migrations
Full records: [content-migrations.md](content-migrations.md)
- [`migrate list`](content-migrations.md#migrate-list) - List every migration document under `instructions/migrations/`.
- [`migrate status`](content-migrations.md#migrate-status) - Show the migrations this instance still owes, in the order they must run.
- [`migrate verify`](content-migrations.md#migrate-verify) - Compare `kb/` against a git revision on the invariants a content migration must not change.
- [`migrate done`](content-migrations.md#migrate-done) - Record one migration as applied, advancing `kb_version` in `.wikitool-kb.json`.
- [`migrate baseline`](content-migrations.md#migrate-baseline) - Declare `kb_version` once, for an instance predating `.wikitool-kb.json`.
## Instance health
Full records: [instance-health.md](instance-health.md)
- [`doctor`](instance-health.md#doctor) - Check that this instance is correctly configured.
<!-- /wikitool:reference-commands-index -->