Audit
Whole-vault knowledge integrity audit. Audit applies the same three criteria as verify — Eligibility, Consistency, Confirmability — at scale, through Map clusters and prioritized sampling. It does not verify every page; it scores the sampled scope, surfaces drift patterns and ranks the next verify calls. Audit is the planner; verify is the worker.
Audit is a read-only diagnostic on the vault. It never regenerates the Wiki, rewrites a page, or sets a page property; follow-ups route to verify, lint or ingest. An owner goal to improve the entire Wiki becomes a ranked queue of single-page follow-ups, never blanket regeneration. The only writes are the report note and its wiki log entry, both only after the owner approves saving. A --no-save or unapproved run writes nothing — no report, no log entry, no index change. Never commit or push; commit only when the owner separately asks.
Every finding is stated against what was actually read. Unread pages are "not examined", never "clean"; a score covers only the examined scope and says so.
Tools: rg for the deterministic sweep, qmd query for semantic counter-evidence, obsidian-cli for backlinks when Obsidian runs.
Input
Read the Core Context once per session (reuse it if already read this session) and the destination's live policy for where Raw, Wiki, Map and query notes live; do not assume folder names. The owner names the scope:
- empty or
--full: every Wiki page; --moc {Map}: one Map cluster;--recent {N}: pages whosedate_modifiedfalls within N days (fall back to the file modification time when the field is absent, and say so);--confidence high:confidence: highpages only;--no-save: report in conversation only;--compare {report}: an earlier audit report to diff against; when absent, use the most recent saved audit report if one exists.
Never widen a cluster or folder into the whole vault unasked. The criteria, Claim Type Taxonomy and Evidence Scope Levels are owned by verify; field names follow ingest's frontmatter reference.
Scaling Strategy
| Criterion | At single page (verify) |
At vault scale (audit) |
|---|---|---|
| Eligibility | full per-claim check | deterministic sweep — coverage and gaps |
| Consistency | full cross-page search | Map-cluster batched — each Map is one semantic cluster |
| Confirmability | full calibration | prioritized sampling — every high, every stale explored: false, every disputed: true, a stratified tenth of the rest |
Process
Phase 0 — Inventory
Count Wiki pages, Maps, Raw notes and query notes in scope, then build cluster membership from Map bodies: each Map's outgoing wikilinks to Wiki pages is one cluster. A Map is the parent context of its pages; read a page through the Map that holds it.
Record pages in at least one Map, audit-orphan pages (in zero Maps), and the largest and smallest clusters. Audit-orphans enter Phase A and cannot be cluster-reviewed in Phase B. Print the inventory before Phase A.
Phase A — Eligibility Sweep (deterministic)
Pure search, no judgment. Report each check as n/total plus at most twenty failing paths.
- A.1 Frontmatter coverage. Wiki:
claimType,evidenceScope,confidence,explored,verificationStatus, plussourceandrelated. Asourcewikilink that does not resolve is recorded for Phase D.explored: falseis review backlog, not a failure. Raw:collectionPurposepresence. - A.2 SPO structure. H1,
## Sources,## Relatedpresent; for an Entity,### Sourcesand### Relatedinside its auto zone (## From Sourcesor the live policy's auto-zone heading), never counting owner-zone headings or a missing auto zone; for Terms, assess the corresponding content by the Term template regardless of heading, with relations only where relevant; everyconfidence: highpage carries a Bias Check. - A.3 Source citation density. Check Term source entries for Raws and direct evidence links; report a missing archival copy separately. Pages derived only from other Wiki pages must declare
evidenceScope: synthesis-only. - A.4 Policy violations. Count the mechanical rules the live policy states (YAML indent, body indent, unquoted wikilinks in YAML other than intentional
authorwikilinks, unquoted Mermaid labels, a page whoselayermismatches its folder). Repair belongs tolint.
Output: coverage table per dimension, failing paths (top twenty per dimension), and the Eligibility score — weighted percentage of pages passing frontmatter coverage, SPO presence and claim type assignability.
Phase B — Consistency Clusters (batched)
Each Map cluster is reviewed on its own; clusters are independent, so when the scope is too large to review in one context, split clusters across parallel sub-tasks — pass paths, receive one line per finding, never page bodies.
For each cluster:
- Load cluster — read the Map and every page it links.
- Extract claims — from each page its three to five central claims (Subject · Predicate · Object).
- Cross-compare within the cluster:
- same concept, different definition — the commonest drift;
- contradicting empirical claims — different numbers, dates or attributions for the same fact;
- contradicting prescriptions — "always X" on one page, "avoid X" on another;
- same Raw Source, divergent interpretations.
- Report conflicts — the pages involved, the quoted claim lines, the kind, and the proposed action.
Conflict action default: queue verify --resolve on both pages; verify, the only producer of page disputed, then marks both disputed: true with the owner's authorization and adds cross-linked > [!warning] Contradiction callouts keeping both sides attributed. Audit itself never writes disputed or a callout; it queues the action. Silence on a point is not a contradiction. A secondary page restating a primary study is not independent corroboration of it, and a page attributing a secondary author's interpretation to the original creator is itself a finding.
Audit-orphan handling: group Map-less pages into per-tag pseudo-clusters by their top three tags, or list them as unclusterable with a recommended Map assignment.
Output: per-Map conflict list, cross-Map conflicts (same claim contested in two Maps), hallucination suspects (numbers, dates or quotations not found in any cited Raw — sampled here, confirmed only by verify), and the Consistency score 100 − (5 × Map conflicts) − (10 × hallucination suspects) − (2 × policy violations), floored at 0.
Phase C — Confirmability Sampling (prioritized)
The target population is the union of, in priority order:
- All
confidence: highpages — read in full, not sampled. - Stale unexplored backlog —
explored: falseanddate_modifiedmore than 30 days ago. - Disputed pages —
disputed: trueorverificationStatus: disputed, even if previously verified. - Random 10% stratified sample of the remainder — stratified by
layer(terms, concepts, entities, guides, and the vault's other layers) and Maps; never plain random.
State each group's size and the total sampled against the total in scope.
For each target, an abbreviated verify Confirmability read:
- count primary, secondary and user-original sources;
- search the Wiki for counter-evidence by exact term (
rg) and by meaning (qmd query); - compute the recommended
confidencewithverify's matrix; - flag overclaim (
highon a single source) and underclaim (lowdespite strong evidence); - check Bias Check presence on high-confidence pages.
Audit proposes confidence; it never writes it, nor verificationStatus or disputed. Partition targets into batches of about twenty; run batches in parallel only when the target set is too large to read in one context.
Output: confidence calibration table (page, declared, recommended, verdict), overclaim list, underclaim list, Bias Check coverage on high-confidence pages, and the Confirmability score — weighted average of calibration alignment and high-confidence Bias Check coverage.
Phase D — Synthesis
Compute three scores 0–100 and the composite Vault Health:
| Score | Formula |
|---|---|
| Eligibility | weighted avg of frontmatter coverage + SPO presence + claim type assignability |
| Consistency | 100 − (5 × Map conflicts) − (10 × hallucination suspects) − (2 × policy violations), floored at 0 |
| Confirmability | weighted avg of calibration alignment + Bias Check coverage (high-confidence only) |
| Composite | arithmetic mean of the three |
State weights used and that every score covers only the examined scope. Then the Top 10 actions, each verify [[Page]] — reason, ranked by:
- pages involved in multiple conflicts (Phase B);
- overclaim pages with declared
confidence: high(Phase C); - pages with broken
sourcewikilinks (Phase A); - high-traffic pages (referenced from many
related) with low confirmability.
STALE FLAG repeats (Failure Mode 3) go first. Mechanical findings route to lint; missing source material routes to ingest.
Phase E — Save report (on approval)
Report in the conversation first, using report. Unless --no-save, ask whether to save; only on approval:
- Save
YYYY-MM-DD-Q-vault-audit.mdat the live policy's query location, with the vault's query-result template and frontmatter (date_created,date_modifiedsnake_case; other fields as live policy defines). Body sections follow report, including## Vault Healthand## Drift Since Last Audit. - Append to the wiki log in records (append-only, never rewrite earlier entries):
## [YYYY-MM-DD] audit | {scope}
- Health: {composite}/100 (E:{eligibility} C:{consistency} K:{confirmability})
- Conflicts: {N} | Overclaim: {N} | Coverage gaps: {N}
- Report: [[YYYY-MM-DD-Q-vault-audit]]Without approval, or with --no-save, write nothing.
Output
Print the summary following report: Vault Health composite, then 1. Eligibility, 2. Consistency, 3. Confirmability each with its score and key counts, the Top 10 verify queue, the report path when saved, and drift versus the last audit.
Failure Modes
- Map out of sync — a page names a Map in
relatedbut the Map does not link it, or the reverse. Leave it out of the cluster; flag it as a Map sync gap forlint. - Oversized cluster — a Map with 50+ linked pages. Subdivide by tag intersection and audit each sub-cluster separately; say how it was split.
- Audit storm — the same pages flagged in two consecutive audits with no
verifysince become aSTALE FLAGat the top of the action list. - Concurrency safety — audit is read-only on Wiki pages; the report and wiki log writes happen only in Phase E, serialized, after approval. Page changes wait for the
verifythe owner starts. - Confirmability vs source ground truth — Phase C reads cited Raw only partly. A flagged page is a candidate; the definitive source check is
verifyon that page. - Action list explosion — cap the list at ten and say how many more are in the report.
- Silent coverage loss — a cluster or group skipped for time is reported as not examined, with the reason.
Integration
Audit consumes the keys verify writes (claimType, evidenceScope, verificationStatus, disputed); a first audit after they are introduced shows low coverage — that is the backfill baseline. lint owns mechanical health: broken links, orphans, frontmatter presence, link form. verify owns per-claim review and any change to confidence, explored, verificationStatus or disputed. Run lint before an audit so mechanical noise does not crowd the epistemic findings; after a large ingest, audit only the touched Map clusters with --moc. The owner sets the cadence.