ref-audit
Skill109 starsChanged 37 days agoMITView on GitHub
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.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- p4inz-code/3d-ref-skillstheir own version, first seen Oct 18, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- p4inz-code/3d-ref-skills★ 14same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository61 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- adviseSkill
- ai-crystallizeSkill
- analyze-kbSkill
- auto-discoverySkill
- benchmark-memorySkill
- brain-mergeSkill
- changelog-protocolSkill
- coherence-sweepSkill
- compute-lifecycleSkill
- create-articleSkill
- create-explanatory-imageSkill
- decideSkill
- deep-researchSkill
- detect-tensionsSkill
- dialecticSkill
- domain-watchSkill
- elicitation-techniquesSkill
- epistemic-classificationSkill
- epub-chapter-extractorSkill
- extract-document-insightsSkill
- extract-insightsSkill
- find-connectionsSkill
- first-runSkill
- get-perspective-onSkill
- get-youtube-transcriptSkill
- git-commit-pushSkill
- graduate-insightsSkill
- incubation-loopSkill
- ingest-sourceSkill
- insight-capture-formatSkill
- insight-interviewSkill
- integrate-recent-notesSkill
- learn-new-thingsSkill
- manage-reference-dataSkill
- manage-thinking-topicsSkill
- manage-watching-domainsSkill
- multi-format-book-extractorSkill
- nano-banana-image-generatorSkill
- propagate-changeSkill
- quick-searchSkill
- reasoning-checksSkill
- recallSkill
- ref-bridgeSkill
- ref-ingestSkill
- ref-querySkill
- ref-reconcileSkill
- ref-refreshSkill
- refresh-indexSkill
- ref-supersedeSkill
- scheduled-runSkill
- scope-mountSkill
- search-vaultSkill
- self-diagnosticSkill
- start-hereSkill
- synthesize-insightsSkill
- talkSkill
- test-memory-systemSkill
- think-about-itSkill
- update-changelogSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
provenance: every note must be provenance: reference.
- Very specific: line 41
links: every [[wiki-link]] resolves to an existing note.
- Very specific: line 81
Write resources/company-brain/reports/ref-audit-YYYY-MM-DD.md (create the dir if absent):
- Very specific: line 112
Run against the live family → the total matches ls Brain/Company/*/*.md | wc -l (expect 53), and on the current data expect 0 provenance …
- Very specific: line 119
Write anything outside resources/company-brain/reports/.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.changelogabove — 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/interactioncarry norelationship. - as_of: present + a valid
YYYY-MM-DD. - status ∈
active · superseded; asupersedednote MUST have asuperseded_by: "[[...]]"that resolves. - partition rule: a
relationship: competitornote belongs inmarket/; a transacted entity does not. - links: every
[[wiki-link]]resolves to an existing note; every entity has at least one relation (no orphans).
Process
Step 1 — Collect the family + frontmatter
cd $PROJECT_ROOT
SCOPE="${scope:-Company}"
ls Brain/$SCOPE/*/*.md | wc -l # total entity notesStep 2 — Run the checks (read-only)
Scan every Brain/$SCOPE/*/*.md. Use grep sweeps as the fast path, then Read the flagged notes to confirm:
cd Brain/Company
# provenance violations
for f in */*.md; do grep -qE '^provenance: reference$' "$f" || echo "PROVENANCE $f"; done
# type enum violations
grep -rhoE '^type: .*' */*.md | sort -u # eyeball against the allowed set
# missing as_of / bad date
for f in */*.md; do grep -qE '^as_of: [0-9]{4}-[0-9]{2}-[0-9]{2}$' "$f" || echo "AS_OF $f"; done
# superseded without a superseded_by
for f in */*.md; do grep -qE '^status: superseded' "$f" && ! grep -qE '^superseded_by:' "$f" && echo "SUPERSEDED $f"; done
# competitor sitting outside market/
grep -rlE '^relationship: competitor' */*.md | grep -v '^market/' | sed 's/^/PARTITION /'For dangling links and orphans, extract [[...]] targets across the family, resolve each against existing note basenames, and list unresolved targets + notes with zero in/out links:
# every wiki-link target used
grep -rhoE '\[\[[^]]+\]\]' */*.md | sed -E 's/\[\[([^]|#]+).*/\1/' | sort -u
# every existing entity basename
for f in */*.md; do basename "$f" .md; done | sort -u
# a target in the first list but not the second = danglingFor duplicate candidates, flag near-identical display names / aliases across sub-scopes (fuzzy) for /ref-reconcile to judge — do NOT merge here.
Step 3 — Write the report + summarise
Write resources/company-brain/reports/ref-audit-YYYY-MM-DD.md (create the dir if absent):
# Ref Audit — Company — YYYY-MM-DD
Total entity notes: N (people · orgs · products · engagements · market)
## Violations
- Provenance: <count> [list]
- Type/relationship enum: <count> [list]
- Missing/invalid as_of: <count> [list]
- Status/superseded integrity: <count> [list]
- Partition (competitor outside market/): <count> [list]
## Link integrity
- Dangling links: <count> [note → missing target]
- Orphan entities (no relations): <count> [list]
## Duplicate candidates (for ref-reconcile)
- [[A]] ↔ [[B]] — same entity?
## Freshness (vs per-type SLA)
- Over SLA: <count> [note — as_of N days old vs Xd SLA]
- Next cohort to stale: <sub-scope> on <date>
## Verdict: CLEAN | N issues (M require ref-reconcile)Print a one-screen summary + the report path. Do not fix anything.
Scope note (the audit/reconcile boundary): this skill checks structural link integrity only — every [[link]] resolves, no orphan. It deliberately does not flag relational asymmetry (A names [[B]] as client but B doesn't back-link) or conflicts (two notes contradict): most A→B links here are legitimately directional references (built on [[Trinity]], competitor of [[X]]), so a blanket reciprocity check would be almost all false positives. That judgment — relation vs reference — lives in /ref-reconcile Step 1, not here. A CLEAN verdict therefore means "well-formed and canonical," not "every link is mutual."
Verification
- Run against the live family → the total matches
ls Brain/Company/*/*.md | wc -l(expect 53), and on the current data expect 0 provenance violations, 0 enum violations, 0 missing as_of (all 53 areprovenance: reference,status: active,as_of-stamped). - Any dangling links / orphans it finds are listed with the offending note and target.
- A report file exists at
resources/company-brain/reports/ref-audit-<today>.md; no entity note was modified (git statusshows only the new report).
This skill must refuse to
- Edit, merge, delete, or repair any entity note (report-only; hand fixes to
/ref-reconcile). - Write anything outside
resources/company-brain/reports/. - Crystallize, lifecycle-classify, or promote a record into a cognitive insight.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

