Back to Library
Stage 04 / 4D build

Memory Linting.

A second brain rots quietly. Stale entries pile up, backlinks break, duplicates breed, raw sources sit uncataloged. The /cairns-lint skill audits the vault weekly and proposes fixes one at a time. You approve. Memory stays honest.

What you'll have
  • A weekly audit pass that scans your vault for weak waypoints, missing cards, broken backlinks, stale entries, duplicates, and privacy leaks before they compound.
  • A prioritized fix list ranked Fix First, then P1 / P2 / P3, so you know which issues actually matter and which can wait.
  • A repeatable cadence Run /cairns-lint, review the report, approve the fixes worth making. Memory hygiene becomes a 15-minute weekly ritual, not a quarterly bankruptcy.
4D Build
Build time ~20 min first run
Cadence Weekly, or after big ingest batches
Touches Cairns vault · L1 INDEX · L2 Chain of Density Card Catalog Layer (Card Catalog Layer for short) cards · L3 raw · .gitignore
Source .claude/skills/cairns-lint/SKILL.md
One-click start

Run your first lint.

Point the skill at your vault. It scans, ranks the findings, and waits for you to decide what to fix. No file gets rewritten without your sign-off.

How this fits in the OS.

Depends on

A working Cairns vault from The Cairns Three Tiers. At minimum, the 4D folder shape with CLAUDE.md, AGENTS.md, and L1 waypoint notes. A handful of L2 Chain of Density Card Catalog Layer (Card Catalog Layer for short) cards from Chain-of-Density Cards if you want the full audit.

Uses

The cairns-lint skill, your local file system, and the agent's read access. No external services. The lint runs entirely on the computer your vault lives on.

Unlocks

A weekly hygiene ritual that catches rot before it compounds. Healthy soil for Librarian Agent queries and any future cairns-dream consolidation pass.

What you'll build.

A weekly audit ritual, powered by a skill that already ships in the workshop repo. You'll install cairns-lint, run it against your vault, and walk through the report with the agent. Each finding is a proposal, not a rewrite. You approve, skip, or edit. The skill checks the same six things every time, so the report stays predictable and your vault stays clean.

The audit covers the structural failure modes that kill a second brain: L1 waypoints that drifted into raw summaries, L2 Chain of Density Card Catalog Layer cards with no source pointer or filler-only density, L3 raw files no one ever cataloged, backlinks pointing at deleted cards, duplicate cards for the same source, and privacy leaks in files that should be gitignored. Each rule maps to a real failure the team has seen in production vaults.

What changes for you.

The shift is small but compounding. Three things you'll feel:

  • You stop pruning by feel. The lint surfaces issues you'd never have spotted by browsing. Stale entries, orphan raw files, duplicate cards across sessions, L1 notes that quietly bloated past their waypoint job.
  • You start trusting the vault under retrieval. When the librarian agent comes up empty, you know it's a missing card, not a hidden one buried in mis-tiered junk. The lint keeps that signal clean.
  • You build a maintenance cadence. Once a week, after a big ingest batch, or before a session where memory accuracy matters. Run /cairns-lint, fix what's worth fixing, move on.

Before you start.

Two prereqs, both inside this workshop:

  • The Cairns Three Tiers shipped. At minimum the 4D fast path: CLAUDE.md, AGENTS.md, cairns/L1/INDEX.md, and the personal L1 set (my-self.md, my-tools.md, my-style.md). The lint detects 4D versus 8D automatically.
  • At least some L2 Chain of Density Card Catalog Layer cards written. If your vault has no L2 Chain of Density Card Catalog Layer cards yet, run /cairns-ingest on two or three sources first. The audit is most useful once there's material to audit. See Chain-of-Density Cards for the per-card workflow.

The build.

Three steps. The skill is already in the workshop repo, so the install is light. The first lint pass is the actual work.

Step 01

Install and verify the skill

~5 min

The cairns-lint skill ships in the workshop repo under .claude/skills/cairns-lint/SKILL.md. If you cloned agent-native-os, you already have it. Confirm Claude Code can see it.

Paste into Claude Code

Confirm the cairns-lint skill is installed and discoverable. Read .claude/skills/cairns-lint/SKILL.md and summarize: what checks does it run, what arguments does it take, and what is the default vault path on Windows. Don't run the lint yet. Just verify the skill is wired up.

The agent does this for you. It reads the spec, confirms the skill is in the project, and reports what arguments to pass (vault_path and mode). If the file is missing, the agent will tell you. Don't fix anything manually until you've seen the skill load.

Step 02

Run the first lint

~10 min

Point the skill at your vault. The default on Windows is your Documents folder under second-brain. If you initialized somewhere else, pass the path explicitly. The skill detects 4D versus 8D from the folder shape, so you don't have to specify the mode unless you want to override.

Paste into Claude Code

Run the cairns-lint skill against my Cairns vault. Walk the six checks in order: folder shape, L3 sources without L2 Chain of Density Card Catalog Layer cards (skip in 4D), weak L2 Chain of Density Card Catalog Layer cards, L1 route-map quality, broken links and duplicates, and privacy / namespace isolation. Return the report in the format from the skill spec: a Summary block with counts, a Fix First block with the top three highest-impact issues, and a Detailed Findings list with P1 / P2 / P3 severity tags. Do not rewrite any files. Just produce the report.

What you'll get back is something like this:

Sample report output
## Cairns Lint Report
 
### Summary
- L3 sources: 47
- L2 Chain of Density Card Catalog Layer cards: 39
- Missing L2 Chain of Density Card Catalog Layer cards: 8
- Weak L2 Chain of Density Card Catalog Layer cards: 5
- L1 issues: 2
- Privacy issues: 1
- Namespace issues: 0
 
### Fix First
1. Privacy leak in cairns/L1/personal/my-tools.md (credential string)
2. 8 L3 sources without L2 Chain of Density Card Catalog Layer cards (provenance gap)
3. L1 INDEX points to 3 deleted L2 Chain of Density Card Catalog Layer cards
 
### Detailed Findings
[P1] Privacy: API token in plaintext - my-tools.md:42
[P1] Broken link: INDEX -> cards/zoom-cli-notes.md (missing)
[P2] Weak card: dense summary 38 words - cards/april-mentor-meeting.md
[P2] Orphan L3: no card references - L3/transcripts/2026-04-12.md
[P3] Duplicate: two cards point to same L3 - cards/fishback-case.md, cards/fishback-walkthrough.md

The Summary tells you scale. Fix First tells you where to start. Detailed Findings is the working list.

Step 03

Walk the triage with the agent

~10 min, repeats weekly

The report is the input to a conversation, not a script. Walk findings with the agent one at a time. For each one, decide: fix it now, defer it (note why in your decisions log), or accept it (the rule is too strict for this entry).

01 / Surface

Lint produces the report

You don't curate the list. The skill scans every file, applies the rules, and ranks by severity. The agent does this for you.

02 / Decide

You approve each fix

Fix First items first, then the P1 list. For each finding, the agent proposes the change. You say yes, skip, or edit. Nothing rewrites without sign-off.

03 / Apply

The agent makes the edits

Only after you approve. The agent writes the change, shows the diff, and moves to the next finding. Stop the walk any time. The report stays valid until the next lint.

Paste into Claude Code

Walk the lint findings with me one at a time, starting with Fix First. For each finding, propose the specific change (which file, which lines, what to write). Show me the proposed diff. Wait for me to say apply, skip, or edit. If I say edit, ask the one clarifying question that resolves the ambiguity, then re-propose. Do not chain multiple fixes without explicit approval between each one.

Cadence. Once a week is the default. After a big ingest batch (a dozen new L2 Chain of Density Card Catalog Layer cards) is the other natural trigger. If the report keeps coming back clean, stretch to every two weeks. If it keeps surfacing the same class of issue, the issue is upstream of the lint, fix the ingest workflow or the L1 entry-format template, not the symptoms.

When it works.

You'll feel the lint working in three places.

  • The report shrinks week over week. The first lint always finds a backlog. Run two, then five, and the Fix First section starts coming back empty more often than not. That's the goal state.
  • Librarian queries stop missing. Broken backlinks and orphan L3 files are the most common reason a librarian agent can't find something it should. Once those are fixed, retrieval gets quietly more reliable. You won't notice the wins, but you'll stop noticing the misses.
  • Privacy stops being a worry. The privacy check confirms the vault-root .gitignore excludes the right paths and flags any credential strings that leaked into L1. Run it before any vault sync, share, or backup. If P1 privacy issues come back clean, the vault is safe to move.
Five lint passes in, the report is mostly green, the Fix First block is usually empty, and the librarian agent has stopped missing on retrievals that used to fail. Your second brain is now under audit. Memory hygiene is a 15-minute weekly ritual instead of a quarterly bankruptcy.

If you get stuck.

Common failure modes, ranked by how often they bite people:

  • The lint flags everything. Most common on first run. Don't try to fix it all in one pass. Take the top three Fix First items, ship those, run the lint again. The list will be smaller. Repeat. Two or three weekly passes clear the backlog.
  • The skill can't find your vault. The default path is your Documents folder under second-brain. If you initialized somewhere else, pass the path explicitly to the skill. The spec asks once if unclear. Answer once and move on.
  • Density-drift warnings on intentionally short cards. The rule flags L2 Chain of Density Card Catalog Layer cards under 80 or over 220 words. If a card is intentionally outside that range (a deliberate one-liner pointer, a long technical reference), the right move is to convert it, not to argue with the rule. If it's truly a pointer, demote it to an L1 INDEX entry. If it's a long reference, split it into two cards.
  • Privacy P1 in a file you thought was gitignored. Confirm the exclusion is at the vault root .gitignore, not a nested one. The spec lists the exact entries that must be excluded. Add the missing line, re-run the lint, the P1 should clear.
  • Tried to auto-fix the whole report. Don't. The lint surfaces; you decide. Approving in bulk is how mis-tiered junk gets locked in as "fixed." Walk findings one at a time. The 10 minutes is the point.

Still stuck? Post the report output and the specific finding you're not sure about in the workshop Slack. Someone in the cohort is auditing the same shape of vault.

Where to go next.

The lint is the read-side of vault hygiene. There are two related builds worth running next, depending on what your audit surfaced.

Back to the Library