validate_wiki
Validate wiki pages against the ontology-atlas contract, checking required frontmatter, section order, and citation integrity, then get a structured problem report with codes and line numbers.
Instructions
Judge the pages under wiki/ against the wiki page contract (docs/ONTOLOGY-ATLAS-SPEC.md §11): no kind:, the seven required frontmatter fields, the five sections in order, a citation on every bullet under ## Facts, and a cited path that is both declared in sources: and present in the folder. A wiki page is not an ontology node — it carries no kind: by contract, which is what keeps it out of the graph — so validate_vault says nothing about whether one fits its own shape. This is that answer. Problem codes: kind-present, missing-field:, section-order, uncited-fact, bad-citation, bad-truncation-record, citation-target-missing, describes-needs-approval. The optional sources_truncated: key lists which paths in sources: the run read only part of; it is what lets a reader tell a document written up whole from one written up in part. Returns { pageCount, failingCount, pages: [{path, problems: [{code, message, line?}]}] } — the same shape ontology-atlas wiki-validate --json prints, so a person and an agent read one report. side effect 0. Use it after writing or editing a page, and before claiming a compile finished.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | No | Vault-relative page paths to judge (`wiki/quarter-plan.md`). Omit to judge every page under `wiki/`, which has no cap because the folder decides how many there are. Max 50 when naming them, the same ceiling `get_concepts.uids` uses: past that, asking for the whole folder is one call instead of a list somebody has to assemble. A path outside `wiki/` is reported as a problem rather than silently skipped. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | Yes | ||
| pageCount | Yes | Pages judged. | |
| failingCount | Yes | Pages with at least one problem. Zero means every page judged fits. |