validate_vault
Scans every document in the vault and returns per-doc and aggregate issue reports, including path drift, to reveal the whole-vault health before or after writes.
Instructions
R+ (cycle 46) — validate every doc in the vault, return per-doc + per-code aggregate. Replaces the K-round-trip pattern of list_concepts then per-doc get_concept (whose warnings: [...] is per-file). 8 issue codes — unclosed-frontmatter, parse-zero-keys, malformed-frontmatter-line, malformed-quoted-scalar, missing-kind, empty-kind, unknown-kind, missing-uid, invalid-uid, invalid-merged-uids, non-canonical-merged-uids, missing-expected-field, non-canonical-graph-array, dangling-graph-reference, duplicate-slug, duplicate-uid. Returns { scanned, problems: [{slug, issues: [{code, severity, message}]}], summary: { problemFiles, errorFiles, warningFiles, byCode: { code: { severity, count, files } } } }. Also returns pathDrift: frontmatter path: / elements: source paths that no longer exist on disk (vault→code drift), resolved against repoRoot (default: the active resolved repository root from connection_info). Ontology-slug references are never flagged. Fix via patch_concept or remove the stale entry. side effect 0. Use when an agent needs the whole-vault health view: first-contact before writes, before / after a batch write, or surfacing issues to the user.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repoRoot | No | Repository root that frontmatter source paths resolve against, for the pathDrift check. Defaults to the active resolved repository root from connection_info. Pass this if the vault lives apart from the code repo. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scanned | Yes | Number of vault markdown files scanned. | |
| summary | Yes | ||
| problems | Yes | ||
| pathDrift | Yes | Vault→code path drift: frontmatter source paths missing on disk, resolved against repoRoot. |