feat: docs reference generates a skill catalogue and a page-type reference under docs/reference/ from the shipped defaults, checked and written in the origin repo only (#189)
CI / verify (push) Successful in 6m10s
CI / pwsh (push) Successful in 1m59s
Release / release (push) Successful in 34s

Files changed:
- CHANGES.md
- README.md
- VERSION
- docs/reference/README.md
- docs/reference/commands/README.md
- docs/reference/commands/types-instructions-and-docs.md
- docs/reference/page-types.md
- docs/reference/skills.md
- instructions/dev/doc-pull-through.md
- tools/CONTRACT.md
- tools/README.md
- tools/chemenu/commands/docs_verify.py
- tools/chemenu/reference_doc.py
- tools/chemenu/tests/test_reference_doc.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 22:10:09 +02:00
1 parent d644a1d4f7
commit 070cae6aad
14 files changed
+606 -65

No files matched your search

+7 -2
View File
@@ -9,6 +9,11 @@ written by hand.
generated from the same records as `tools/wikitool <command> -h`.
- [Exit codes and gates](exit-codes.md) - which commands can stop and wait for a person, and
why.
- [Skill catalogue](skills.md) - the skills the stack ships, what each does and which requests
start it, generated from their `SKILL.md`.
- [Page types](page-types.md) - every page type the stack ships for `kb/`, its subtypes, where
its pages are written and its required fields, generated from the type-specs.
Page types are not generated here yet; until they are, a page type is described by
`tools/wikitool types describe <type>`.
The last two describe the stack's shipped defaults, which an instance may change or extend;
`tools/wikitool instructions list` and `tools/wikitool types describe <type>` show what one
instance has.
+1 -1
View File
@@ -123,7 +123,7 @@ Full records: [types-instructions-and-docs.md](types-instructions-and-docs.md)
- [`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/`.
- [`docs reference`](types-instructions-and-docs.md#docs-reference) - Regenerate the human reference under `docs/reference/`.
## Telemetry
@@ -288,7 +288,7 @@ tools/wikitool docs verify
- Every reference file `docs toc` covers carries the current table-of-contents region for its own headings - missing and stale are one check.
- Every relative markdown link in one of those reference files resolves to an existing file. A target's `#anchor` suffix is stripped first, and code fences and inline code spans are masked before scanning, so link syntax shown as an example is not mistaken for a real reference.
- Every file under `docs/` sits in one of its areas - `tutorials/`, `how-to/`, `reference/`, `explanation/` or `dev/` - never directly in `docs/` or in another directory.
- If `docs/` exists: every generated region of the human command reference under `docs/reference/` matches what `docs reference` would write, every `cli_contract.GROUPS` entry has its page under `docs/reference/commands/`, and no page there belongs to no group.
- If `docs/` exists: every generated region of the human reference under `docs/reference/` matches what `docs reference` would write, every `cli_contract.GROUPS` entry has its page under `docs/reference/commands/`, and no page there belongs to no group. The skill catalogue and the page types are checked only in the origin repo (no `.wikitool-release.json`): they describe the stack's shipped defaults, which an instance's own type-specs and instructions may differ from.
- `INSTALL.md` carries one generated `<!-- wikitool:prerequisites -->` region per platform value of `tools/prerequisites.txt` (`prerequisites-<platform>` for a platform-specific one), each current; and the `<!-- setup-question: <key> -->` markers in `instructions/setup-instance.md` and `INSTALL.md` name the same set of keys, so a question the agent asks is never one the human guide leaves out, nor the reverse.
- `VERSION` parses and the newest versioned `CHANGES.md` entry names it. An entry that crosses the compatibility boundary from the last release carries `**Breaking Change:**`, has a migration document or `**Migration:** none required`, and its `**Migration:**` line names every required migration document targeting it.
- The newest versioned `CHANGES.md` entry is at most 32 000 bytes (UTF-8) as `version notes` prints it, and each of its `###` sections is exactly one paragraph of at most 1 000 bytes, heading line excluded. Older entries and a changelog with no versioned entry are not checked.
@@ -312,8 +312,8 @@ tools/wikitool docs verify
- `1` - A type-spec's own frontmatter fails its schema
- `1` - A subtype template `types/<type>.<value>.md` has no type-spec with a `subtype_field:` beside it, names a value outside that field's enum, or carries frontmatter
- `1` - A shipped `.md`/`.template` cites an issue number
- `1` - A region of the human command reference under `docs/reference/` is stale
- `1` - A page of the human command reference is missing or lacks its marker pair, or a page under `docs/reference/commands/` belongs to no group
- `1` - A region of the human reference under `docs/reference/` is stale
- `1` - A page of the human reference is missing or lacks its marker pair, or a page under `docs/reference/commands/` belongs to no group
- `1` - A reference file's table-of-contents region is missing or stale
- `1` - A file sits directly in `docs/`, or in a directory there that is not one of its five areas
- `1` - A reference file's relative markdown link does not resolve to an existing file
@@ -325,7 +325,7 @@ tools/wikitool docs verify
- `wikitool docs toc` - regenerates tables of contents
- `wikitool docs contract` - regenerates the commands region
- `wikitool docs reference` - regenerates the human command reference
- `wikitool docs reference` - regenerates the human reference
- `wikitool docs prerequisites` - regenerates `INSTALL.md`'s prerequisites lists
- `wikitool instructions verify` - the same kind of check for `instructions/`
@@ -471,7 +471,7 @@ tools/wikitool docs contract --apply
## `docs reference`
Regenerate the human command reference under `docs/reference/`.
Regenerate the human reference under `docs/reference/`.
**Synopsis**
@@ -494,6 +494,7 @@ tools/wikitool docs reference --apply
**Behaviour**
- Rewrites the generated region of every page of the human command reference from the `cli_contract` records: one `docs/reference/commands/<group>.md` per `cli_contract.GROUPS` entry (`<!-- wikitool:reference-commands -->`), the overview in `docs/reference/commands/README.md` (`<!-- wikitool:reference-commands-index -->`), and the gates and exit-42 causes in `docs/reference/exit-codes.md` (`<!-- wikitool:reference-exit-codes -->`).
- Also, in the origin repo only, the skill catalogue `docs/reference/skills.md` (`<!-- wikitool:reference-skills -->`: one row per shipped `instructions/<name>/SKILL.md`, its description split at the sentence starting "Use when") and the page types `docs/reference/page-types.md` (`<!-- wikitool:reference-page-types -->`: one section per `root: kb` type-spec, from what `types describe` reads). Both describe the stack's shipped defaults. In an instance - a tree with `.wikitool-release.json` - they are left alone and the output says so: an instance's adopted type-specs and own instructions may differ, and rewriting a shipped page there would block the next `dist upgrade`.
- Renders each command's summary, synopsis, options, examples, notes, properties in words, exit codes with their causes and see-also - but not the ON FAILURE reactions or NEVER, which address an agent; `tools/CONTRACT.md` keeps those.
- Refreshes the table of contents of each page it writes in the same step.
- Never creates a page or places a region: a page's title and one-sentence head are written by hand. A group's page is named after the group - lower case, every run of other characters one hyphen.
+138
View File
@@ -0,0 +1,138 @@
# Page types
Every page type the stack ships for `kb/`: what it is for, where its pages are written, its
subtypes and its required frontmatter fields, generated from the type-specs under `types/` and
their schemas.
This page describes the stack's shipped defaults. An instance adopts these type-specs from their
`.template` and may change them, or add types of its own; `tools/wikitool types list` and
`tools/wikitool types describe <type>` show what this instance has.
<!-- wikitool:toc -->
## Contents
- [`comparison`](#comparison)
- [`concept`](#concept)
- [`entity`](#entity)
- [`project`](#project)
- [`source`](#source)
<!-- /wikitool:toc -->
<!-- wikitool:reference-page-types -->
## `comparison`
Structured type for comparison pages that set several entities or approaches against one another
- Written to: `kb/comparisons/`
**Required fields**
- `type` - string
- `created` - string
- `entities` - array
- `summary` - string
## `concept`
Base type for concept pages - architectures, patterns, protocols, workflows, decisions or problems
- Written to: `kb/concepts/<subtype directory>/`
**Subtypes** (field `concept_type`)
| Value | Written to | Index section |
|---|---|---|
| `architecture` | `kb/concepts/architectures/` | Architekturen |
| `pattern` | `kb/concepts/patterns/` | Muster |
| `protocol` | `kb/concepts/protocols/` | Protokolle |
| `workflow` | `kb/concepts/workflows/` | Abläufe |
| `decision` | `kb/concepts/decisions/` | Entscheidungen |
| `problem` | `kb/concepts/problems/` | Problemstellungen |
**Required fields**
- `type` - string
- `concept_type` - string, one of `architecture`, `pattern`, `protocol`, `workflow`, `decision`, `problem`
- `created` - string
- `modified` - string
- `provenance` - string, one of `sourced`, `general`, `mixed`
- `summary` - string
## `entity`
Base type for entity pages - codebases, systems, tools, technologies, people or organizations
- Written to: `kb/entities/<subtype directory>/`
**Subtypes** (field `entity_type`)
| Value | Written to | Index section |
|---|---|---|
| `codebase` | `kb/entities/codebases/` | Codebasen |
| `system` | `kb/entities/systems/` | Systeme |
| `tool` | `kb/entities/tools/` | Werkzeuge |
| `technology` | `kb/entities/technologies/` | Technologien |
| `person` | `kb/entities/people/` | Personen |
| `organization` | `kb/entities/organizations/` | Organisationen |
**Required fields**
- `type` - string
- `entity_type` - string, one of `codebase`, `system`, `tool`, `technology`, `person`, `organization`
- `created` - string
- `modified` - string
- `provenance` - string, one of `sourced`, `general`, `mixed`
- `summary` - string
## `project`
Structured type for a committed initiative (a GTD project) - goal, participants, durable status, open loops
- Written to: `kb/gtd/<subtype directory>/`
**Subtypes** (field `responsibility`)
| Value | Written to | Index section |
|---|---|---|
| `haus` | `kb/gtd/haus/` | Haus |
| `finanzen` | `kb/gtd/finanzen/` | Finanzen |
| `technik` | `kb/gtd/technik/` | Technik |
**Required fields**
- `type` - string
- `state` - string, one of `active`, `dormant`, `completed`, `abandoned`
- `responsibility` - string, one of `haus`, `finanzen`, `technik`
- `created` - string
- `modified` - string
- `provenance` - string, one of `sourced`, `general`, `mixed`
- `summary` - string
## `source`
Structured type for source pages that record and summarize ingested raw material
- Written to: `kb/sources/<subtype directory>/`
- Title prefix: `Source - `
**Subtypes** (field `source_type`)
| Value | Written to | Index section |
|---|---|---|
| `transcript` | `kb/sources/transcripts/` | Transkripte |
| `analysis` | `kb/sources/analyses/` | Analysen |
| `article` | `kb/sources/articles/` | Artikel |
| `document` | `kb/sources/documents/` | Dokumente |
| `notes` | `kb/sources/notes/` | Notizen |
| `tracker` | `kb/sources/trackers/` | Tracker-Exporte |
| `unclassified` | `kb/sources/unclassified/` | Unklassifiziert |
**Required fields**
- `type` - string
- `source_type` - string, one of `transcript`, `analysis`, `article`, `document`, `notes`, `tracker`, `unclassified`
- `author` - string
- `raw_files` - array
- `date` - string
- `summary` - string
<!-- /wikitool:reference-page-types -->
+19
View File
@@ -0,0 +1,19 @@
# Skill catalogue
The skills the stack ships, as an agent's harness sees them once `tools/wikitool instructions sync`
has published them: each one's name, what it does and the requests it answers, generated from its
`instructions/<name>/SKILL.md`. Any skill also runs when you ask for it by name.
This page describes the stack's shipped defaults. An instance may add instructions of its own;
`tools/wikitool instructions list` shows what this instance has.
<!-- wikitool:reference-skills -->
| Skill | What it does | Use it when |
|---|---|---|
| `gtd-weekly-review` | Turns the findings from `wikitool review` into decisions and page updates - the GTD Weekly Review, with a machine that prepares the list instead of a human reconstructing it from memory. | the user asks for "the weekly review", "review my projects", "what's stalled", or after `wikitool review` has findings nobody has acted on yet. |
| `wiki-ingest` | Processes a new source file into the LLM wiki - extracts entities and concepts, creates a source summary page, files a tracker item for any commitment the source also carries, cross-references, rebuilds indexes, and publishes. | the user drops a file or folder into incoming/ or raw/, names a URL to ingest, or says "ingest &lt;file&gt;", "ingest &lt;url&gt;", "process this source", "add this to the wiki" - or just "ingest" with nothing named, which takes the oldest entry waiting in incoming/ - or asks to "update the captured repositories" / "pull the repo docs", which takes the next bundle `raw status` reports as changed. |
| `wiki-lint` | Checks the health of the LLM wiki - broken links, orphan pages, uncovered raw files, stale claims, duplicated rules, missing cross-references. | the user says "lint the wiki", "health-check the wiki", or periodically every 10 sources per the Maintenance Schedule. |
| `wiki-manage` | Creates a new wiki page (entity, concept, source, comparison) or updates an existing page with new information, including cross-references, index/log, and publishing. | the user says "create a new entity/concept/comparison", "add a page for X", "update the X page", or new information needs integrating into an existing page. |
| `wiki-query` | Answers a question using the LLM wiki's compiled knowledge - read-only, cites sources, can file a valuable answer back as a new page. | the user asks a question about entities, projects, concepts, or anything the wiki might know, or says "query the wiki", "what do we know about X", "search the wiki". |
| `wiki-status` | Shows a quick read-only snapshot of the LLM wiki - page counts, orphan pages, uncovered raw files, recent activity. | the user says "wiki status", "show wiki statistics", "what's new", or wants a quick health snapshot without running a full lint. |
<!-- /wikitool:reference-skills -->