Generated from docs/reference/commands/types-instructions-and-docs.md at v10.1.0 – edit the repository, not this wiki.
Types, instructions and docs
The page types, the instruction and skill layer, and the documentation checks and generators that keep the docs in step with the code.
Contents
types listtypes describeinstructions syncinstructions verifyinstructions listdocs verifydocs tocdocs prerequisitesdocs contractdocs reference
types list
List every type-spec under types/.
Synopsis
wikitool types list [--json]
Options
--json Print raw findings as JSON
-h, --help Show this message and exit.
Examples
tools/wikitool types list
tools/wikitool types list --json
Behaviour
- Lists every type-spec under
types/: name, schema path, subtype field, and description - which page types exist, without readingtypes/*.mddirectly. - Never fails; read-only and safe to retry freely.
Properties
- Changes files: no
- Idempotent: yes
- Atomic: Read-only
- Counts toward the session call budget: yes
- Can reach the network: no
Exit codes
0- success
See also
wikitool types describe <name>- one type's full contract
types describe
Print one type's full contract.
Synopsis
wikitool types describe <name> [--json]
Options
Arguments:
name Type name, e.g. 'entity' (see `types list`) [required]
Options:
--json Print raw findings as JSON
-h, --help Show this message and exit.
Examples
tools/wikitool types describe source
tools/wikitool types describe project --json
Behaviour
- Prints one type's full contract: required and optional frontmatter fields with enums, its subtype field (if any), and its authoring body.
- Where the type-spec declares
guidance:, the stack-ownedtypes/<name>.guidance.mdis composed in, so aroot: kbtype's contract reads as one answer even though it may live in two files.--jsonreports it separately asguidance/guidance_path, absent for a type with none. - The generated table-of-contents region a long type-spec (or guidance file) carries is stripped from this output.
- Read-only.
Properties
- Changes files: no
- Idempotent: yes
- Atomic: Read-only
- Counts toward the session call budget: yes
- Can reach the network: no
Exit codes
0- success1- Unknown type name
See also
wikitool types list- every typewikitool new <type>- scaffolds a page of the type
instructions sync
Publish every instructions/<name>/SKILL.md into the harness skill directories.
Synopsis
wikitool instructions sync [--force]
Options
--force Replace a target directory whose contents differ from the source
and was not generated by sync. Without this, sync refuses instead
of deleting content it did not create.
-h, --help Show this message and exit.
Examples
tools/wikitool instructions sync
Behaviour
- Publishes every
instructions/<name>/SKILL.mdinto.agents/skills/and.claude/skills/as copies, and deletes published skills whose source is gone. - Each published
SKILL.mdis its source plus one generated line directly under the frontmatter: thelanguage:ofkb/CONVENTIONS.mdand a pointer toAGENTS.md§ Conversation language, so the agent has the value in context when the task begins. The frontmatter and every other file are copied unchanged. With no language declared, theSKILL.mdis copied unchanged too, and the success message says so. - Both targets are gitignored, so a fresh clone runs this once.
- Re-running repairs a drifted copy: the source always wins.
--forceis required only to replace a target directory that is not a published skill at all (noSKILL.mdin it).- Each copy is idempotent, so a re-run converges even after a partial failure.
Properties
- Changes files: yes
- Idempotent: yes
- Atomic: No - one directory copy per skill per target (
.agents/skills/,.claude/skills/); each copy is idempotent, so a re-run converges even after a partial failure - Counts toward the session call budget: yes
- Can reach the network: no
Exit codes
0- success1- No skills found underinstructions/1- A target directory is not a published skill (noSKILL.md) and--forcewas not passed
See also
instructions/bootstrap.md- the fresh-clone procedure that runs thiswikitool instructions verify- checks the copies match
instructions verify
Check the instruction layer.
Synopsis
wikitool instructions verify
Options
-h, --help Show this message and exit.
Examples
tools/wikitool instructions verify
Behaviour
- Flat instructions validate against
types/instruction.schema.yaml, and eachSKILL.mdcarries the frontmatter its harness reads. - No
SKILL.mdcarries a relative markdown link:synccopies it to a different depth than the source, so aSKILL.mdreferences a target as a repo-root-relative plain path instead (instructions/CONTRACT.md§ "A skill's outbound reference is a plain path, not a link"). - Every published copy is what
syncwould write from its source: byte-identical, except for the generated language line inSKILL.mdthat the currentlanguage:ofkb/CONVENTIONS.mdcalls for. Missing every copy is reported as "run sync", not as drift - that is a clean checkout. - No instruction is left that nothing references; one marked
manual: truemust instead not be linked from AGENTS.md, CLAUDE.md or a skill. - Nothing under
instructions/dev/is referenced from outside it; a<!-- dist:strip-start/end -->block is exempt (instructions/CONTRACT.md). - Read-only.
Properties
- Changes files: no
- Idempotent: yes
- Atomic: Read-only
- Counts toward the session call budget: yes
- Can reach the network: no
Exit codes
0- success1- Nothing found underinstructions/at all, or a malformed instruction orSKILL.md1- ASKILL.mdcarries a relative markdown link1- A published copy drifted from its source - including a language line that belongs to an earlierlanguage:(the message names it as such)1- An instruction nothing references, or amanual: trueone that IS linked from AGENTS.md, CLAUDE.md or a skill and so risks running implicitly1- Something underinstructions/dev/is referenced from outside it and outside adist:stripblock
See also
wikitool instructions sync- publishes the copiesinstructions/CONTRACT.md- the rules this checks
instructions list
List the flat instructions with their descriptions.
Synopsis
wikitool instructions list [--json]
Options
--json Print the listing as JSON
-h, --help Show this message and exit.
Examples
tools/wikitool instructions list
tools/wikitool instructions list --json
Behaviour
- Lists the flat instructions with their descriptions - how the instruction layer is discovered;
searchcoverskb/only. - Never fails: an empty
instructions/prints "No instructions found." Read-only and safe to retry freely.
Properties
- Changes files: no
- Idempotent: yes
- Atomic: Read-only
- Counts toward the session call budget: yes
- Can reach the network: no
Exit codes
0- success
See also
wikitool search- the same question forkb/
docs verify
Check the docs that mirror the code.
Synopsis
wikitool docs verify
Options
-h, --help Show this message and exit.
Examples
tools/wikitool docs verify
Behaviour
- Checks the docs that mirror the code. The name is about documentation parity, not the
docs/directory - it reads that only for its layout and its generated reference pages, and never requires one. - Commands: every command has a
cli_contractrecord and is listed incli_contract.GROUPS, in both directions; every command's non-hidden flags appear in its record's SYNOPSIS and vice versa;tools/CONTRACT.md's generated<!-- wikitool:commands -->region matches whatdocs contractwould write; no command's rendered--help/-htext cites an issue number. - Collections: every directory under
kb/has aCOLLECTION.mdand no directory outside it does; every collection declaresprofile:and arequired_by_stack:that agrees with the stack's own list. - Types: every type the stack lists (currently
sourceandproject) has a type-spec of that name whose schema requires the field the stack list names (raw_files:/state:); every file undertypes/declaringtype: types/type-spec.mdvalidates againsttypes/type-spec.schema.yaml; every subtype templatetypes/<type>.<value>.md(any<value>butguidance) sits beside a type-spec declaringsubtype_field:, names a value that field's schema enum allows, and carries no frontmatter; no pre-migrationtype: entityblocks are left in the contracts. kb/CONVENTIONS.md, if it exists at all, names all three tool-owned section headings; every stage contract is present.- The
.gitignorecanaries clear in both directions: nothing ignored underraw//kb/,incoming/ignored, everything ignored underreports/and the published skill directories,.wikitool-local.jsonignored andwikitool.jsontracked. - A
wikitool.jsonat the root holds every value in the place its tier allows - no secret and no private field as plain text, nocheckoutfield at all except as a reference - and a well-formedschemaandinstance_id. The local file is not read. - No
.md/.templatefiledist exportwould ship cites an issue number. A<!-- dist:strip-start/end -->region is exempt: the check reads the export plan's text, from which it is already gone. - Every reference file
docs toccovers 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
#anchorsuffix 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/ordev/- never directly indocs/or in another directory. AGENTS.md§ Gates names exactly the gates incli_contract.GATES(the bold entry names,- **<Name>.**), and every gate in that register that ends in exit 42 is declared by at least one command record. A record naming a gate outside the register fails whenwikitoolstarts, not here.- If
docs/exists: every generated region of the human reference underdocs/reference/matches whatdocs referencewould write, everycli_contract.GROUPSentry has its page underdocs/reference/commands/, and no page there belongs to no group. That includes the four configuration regions indocs/reference/configuration.md. 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.mdcarries one generated<!-- wikitool:prerequisites -->region per platform value oftools/prerequisites.txt(prerequisites-<platform>for a platform-specific one), each current; and the<!-- setup-question: <key> -->markers ininstructions/setup-instance.mdandINSTALL.mdname the same set of keys, so a question the agent asks is never one the human guide leaves out, nor the reverse.VERSIONparses and the newest versionedCHANGES.mdentry 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.mdentry is at most 32 000 bytes (UTF-8) asversion notesprints 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. - Read-only.
Properties
- Changes files: no
- Idempotent: yes
- Atomic: Read-only
- Counts toward the session call budget: yes
- Can reach the network: no
Exit codes
0- success1- A command, contract, or type-form mismatch1-VERSIONand the newestCHANGES.mdentry disagree, or a boundary-crossing entry lacks its breaking line, its migration, or the migration document's path1- The newestCHANGES.mdentry is over 32 000 bytes, or one of its###sections has more than one paragraph or a paragraph over 1 000 bytes1- The<!-- wikitool:commands -->region oftools/CONTRACT.mdis stale1- A type-spec's own frontmatter fails its schema1- A subtype templatetypes/<type>.<value>.mdhas no type-spec with asubtype_field:beside it, names a value outside that field's enum, or carries frontmatter1-wikitool.jsonholds a secret or private value as plain text, or a value its tier puts elsewhere1- A shipped.md/.templatecites an issue number1- A region of the human reference underdocs/reference/is stale1- A page of the human reference is missing or lacks its marker pair, or a page underdocs/reference/commands/belongs to no group1- A reference file's table-of-contents region is missing or stale1- A file sits directly indocs/, or in a directory there that is not one of its five areas1-AGENTS.md§ Gates andcli_contract.GATESdisagree, or a register gate that ends in exit 42 is declared by no command record1- A reference file's relative markdown link does not resolve to an existing file1- AnINSTALL.mdprerequisites region is stale1- AnINSTALL.mdprerequisites region is missing, or names a platform no tool has1- A setup question is marked in one ofinstructions/setup-instance.mdandINSTALL.mdbut not the other
See also
wikitool docs toc- regenerates tables of contentswikitool docs contract- regenerates the commands regionwikitool docs reference- regenerates the human referencewikitool docs prerequisites- regeneratesINSTALL.md's prerequisites listswikitool instructions verify- the same kind of check forinstructions/
docs toc
Create, refresh or remove the generated table-of-contents region.
Synopsis
wikitool docs toc [--apply]
Options
--apply Write changes; default is dry-run (preview only)
-h, --help Show this message and exit.
Examples
tools/wikitool docs toc
tools/wikitool docs toc --apply
Behaviour
- Creates, refreshes or removes the generated table-of-contents region on every reference file over 100 lines:
AGENTS.md, every stage contract,kb/CONVENTIONS.md, everykb/*/COLLECTION.md, every flatinstructions/**.mdfile, everytypes/*.mdtype-spec, and everydocs/page - each together with the<name>.templateit ships as, where one exists. - The scope is computed from those categories rather than listed, so a file added later is in scope without a code change.
- Out of scope: every
SKILL.md, the human docs at the root and beside the code (README.md,CHANGES.md,INSTALL.md,tools/README.md), and every subtype templatetypes/<type>.<value>.md-newcopies it into a page, so it never carries a region whatever its length. - Dry-run by default (prints which files would change);
--applywrites. Idempotent: a re-run after an interruption converges rather than doubling a region. - If
docs verifystill reports a stale region after--apply, the file's##headings changed in between; run it again.
Properties
- Changes files: yes
- Idempotent: yes
- Atomic:
--applyrewrites each named file in place, one at a time and idempotently, so a re-run after an interruption converges rather than doubling a region; the dry-run form is read-only - Counts toward the session call budget: yes
- Can reach the network: no
Exit codes
0- success0- Never fails on content: a file with no##heading, or one at or under the threshold, is simply left without a region
See also
wikitool docs verify- checks every region is current
docs prerequisites
Regenerate INSTALL.md's prerequisites lists from tools/prerequisites.txt.
Synopsis
wikitool docs prerequisites [--apply]
Options
--apply Write changes; default is dry-run (preview only)
-h, --help Show this message and exit.
Examples
tools/wikitool docs prerequisites
tools/wikitool docs prerequisites --apply
Behaviour
- Rewrites each
<!-- wikitool:prerequisites -->region inINSTALL.md(tools every platform needs) and<!-- wikitool:prerequisites-<platform> -->region (tools only that platform needs) from the manifest: one list item per tool, its label and minimum version. The manifest's reason field stays out - it explains a tool to whoever reads the preflight's own output, while the region only says what to install. - Never places a region: where a list belongs in the human guide is that guide's own decision. A region the manifest calls for but the file lacks is an error naming the marker pair to add.
- Dry-run by default (says whether the file would change);
--applywrites. docs verifychecks the result stays current.
Properties
- Changes files: yes
- Idempotent: yes
- Atomic: Yes - every region is rewritten in one file write
- Counts toward the session call budget: yes
- Can reach the network: no
Exit codes
0- success1-INSTALL.mdis missing, or lacks a region the manifest calls for
See also
wikitool docs verify- checks every region is current
docs contract
Regenerate tools/CONTRACT.md's <!-- wikitool:commands --> region.
Synopsis
wikitool docs contract [--apply]
Options
--apply Write changes; default is dry-run (preview only)
-h, --help Show this message and exit.
Examples
tools/wikitool docs contract
tools/wikitool docs contract --apply
Behaviour
- Rebuilds the region from every
cli_contractrecord: the index (one line per command,GROUPSorder) followed by each###group's commands as#### <path>man-page-shaped sections. - Dry-run by default (says whether the file would change);
--applywrites. docs verifychecks the result stays current.
Properties
- Changes files: yes
- Idempotent: yes
- Atomic: Yes - the whole region is rewritten in one file write
- Counts toward the session call budget: yes
- Can reach the network: no
Exit codes
0- success1-tools/CONTRACT.mdis missing
See also
tools/README.md§ Adding a command - how a command gets its recordwikitool docs reference- the same records, rendered for a person underdocs/reference/wikitool docs verify- checks the region is current
docs reference
Regenerate the human reference under docs/reference/.
Synopsis
wikitool docs reference [--apply]
Options
--apply Write changes; default is dry-run (preview only)
-h, --help Show this message and exit.
Examples
tools/wikitool docs reference
tools/wikitool docs reference --apply
Behaviour
- Rewrites the generated region of every page of the human command reference from the
cli_contractrecords: onedocs/reference/commands/<group>.mdpercli_contract.GROUPSentry (<!-- wikitool:reference-commands -->), the overview indocs/reference/commands/README.md(<!-- wikitool:reference-commands-index -->), and the gates and exit-42 causes indocs/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 shippedinstructions/<name>/SKILL.md, its description split at the sentence starting "Use when") and the page typesdocs/reference/page-types.md(<!-- wikitool:reference-page-types -->: one section perroot: kbtype-spec, from whattypes describereads). 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 nextdist upgrade. - Also the shapes of the four hand-written configuration files in
docs/reference/configuration.md, one region each (<!-- wikitool:reference-config-telemetry -->,-remotes,-tasks,-upload) inside the hand-written section on that file, rendered from the records inchemenu.config_shapesthe loaders read the files with. Those records ship withtools/, so these regions are written and checked in an instance as well. Several regions in one page are refreshed one after the other into the same text. - 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.mdkeeps 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.
- Dry-run by default (lists the pages that would change);
--applywrites. docs verifychecks the result stays current.
Properties
- Changes files: yes
- Idempotent: yes
- Atomic:
--applyrewrites each page in place, one at a time and idempotently, so a re-run after an interruption converges; the dry-run form is read-only - Counts toward the session call budget: yes
- Can reach the network: no
Exit codes
0- success1- A reference page is missing, or lacks its region's marker pair
See also
wikitool docs contract- the same records, rendered for an agent intotools/CONTRACT.mdwikitool docs verify- checks every reference region is currenttools/README.md§ Adding a command - how a command gets its record
- Chemenu - Personal IT Knowledge Base
- Install a Chemenu instance
- Tutorials
- How-to guides
- Back up to a synced folder
- Browse the wiki in Obsidian
- Capture documentation from a git repository
- Collect documents from a synced folder
- Export guidelines to captured repositories
- Export to a synced folder
- Fetch pages behind a login
- Ingest a source
- Maintain the wiki
- Query the wiki
- Run the weekly review
- Set up the MCP read server
- Trace and score agent sessions
- Troubleshoot an instance
- Update an instance
- Use 1Password for settings
- Write a site handler
- Reference
- Explanation
- Architecture
- Configuration tiers
- Why knowledge and commitments are two layers
- Language Boundaries
- Choosing a Claude Code model and effort level
- Ownership and Templates
- Why the pipeline has four stages
- Telemetry and evaluation
- Why the stack version splits compatibility from migration
- Why gates are code
- Dev