| name | ref-audit |
| description | Integrity report for a reference scope — the reference-scope analog of /coherence-sweep. Scans every entity note for provenance violations (any note not provenance:reference), type/relationship enum violations, missing/invalid as_of, status/superseded_by integrity, dangling wiki-links, orphan entities, and duplicate-entity candidates. READ-ONLY — it reports, it never fixes (fixes are ref-reconcile). Company is the default scope. Safe to run unattended. |
| automation | autonomous |
| allowed-tools | ["Read","Write","Bash","Glob","Grep"] |
| user-invocable | true |
| argument-hint | [scope=Company] [--json] |
| metadata | {"version":"1.1","created":"2026-07-08T00:00:00.000Z","author":"Cornelius","changelog":["1.1: Report template now includes the Freshness (vs SLA) section it already emitted; explicit audit/reconcile boundary note (structural links only — relational asymmetry/conflicts are ref-reconcile's, not a CLEAN-verdict gap)","1.0: Initial version — read-only integrity report (provenance/enum/as_of/status/dangling-link/orphan/duplicate) to resources/company-brain/reports/"]} |
Ref Audit
ℹ️ First, set expectations: before anything else, print one short line with this skill's version and its most recent change — the top entry of metadata.changelog above — e.g. ref-audit v1.0 — recent: initial version. Then proceed.
The integrity health check for a reference scope. It answers "is the source of truth still canonical, well-formed, and honestly stamped?" It is read-only: it produces a report and prints a summary. It never edits (repairs/merges are /ref-reconcile, which is human-gated) — that is exactly what makes it autonomous-safe.
Read first: resources/layered-brains/COMPANY-BRAIN-SCHEMA.md (the enum + temporal contract) and resources/layered-brains/REFERENCE-SCOPE-SCHEMA.md (the reference-kind contract). This skill checks notes against those docs.
State Dependencies
| Source | Location | Read | Write | Description |
|---|
| Company family | Brain/Company/{people,orgs,products,engagements,market}/*.md | ✓ | | Entity notes audited |
| Reports | resources/company-brain/reports/ | | ✓ | ref-audit-YYYY-MM-DD.md |
The contract this audits
- provenance: every note must be
provenance: reference. Anything else = a leak (a cognitive note crept in, or an insight was mis-filed here).
- type ∈
person · organization · product · agent · engagement · interaction.
- relationship ∈ (by
type) person: self-team·client-contact·counsel·prospect·partner-contact; organization: self·client·prospect·partner·vendor·competitor·investor; product: own·competitor. agent/engagement/interaction carry no relationship.
- as_of: present + a valid
YYYY-MM-DD.
- status ∈
active · superseded; a superseded note MUST have a that resolves.