Build a second brain that maintains itself
You drop messy notes into one inbox folder. A scheduled agent files them into a clean linked wiki while you sleep. One rule keeps it from breaking.
The problem
Every note system I built by hand died the same way. Capturing is easy. Filing, linking, and tidying is a second job, and after two weeks I stopped doing it. Notes piled up, the structure rotted, and I stopped trusting the vault enough to open it.
What I built instead
My Obsidian vault is split into two folders with two different owners.
raw/ is mine. Everything I capture lands there: quick notes from my phone via Telegram, article dumps, half-formed ideas. Messy is fine. Messy is the point.
wiki/ belongs to the agent. A scheduled Claude Code agent I call the Librarian runs on my Mac mini every night at 4 AM. It reads whatever is sitting in raw/, compiles it into clean linked pages (concepts, entities, comparisons), cross-links them in both directions, updates an index and a log, then moves each ingested source into raw/processed/ so the inbox only ever shows the unprocessed queue.
I capture. The agent files. One of my vaults now has over 170 compiled wiki pages and I did not write a single one of them by hand.
The one rule
Only the Librarian writes wiki/. Me, my phone, every other agent: we only ever add files to raw/. The moment two writers touch the wiki, pages contradict each other and nobody knows which version to trust. One inbox, one compiler.
Here is a condensed version of the CLAUDE.md that sits in my vault root. Paste it into yours:
You are the Librarian for this knowledge vault.
I add raw material to raw/. You compile it into a clean, linked wiki in wiki/.
Folders:
- raw/ my inbox. Never edit or delete a source's content.
- wiki/ you own this completely. Nobody else writes here.
- wiki/concepts/ topic pages
- wiki/entities/ people, companies, tools, products
- wiki/comparisons/ side-by-side and tradeoff pages
When I add a source:
1. Read it. Tell me the 3 to 5 things in it that actually matter.
2. Create or update the relevant wiki pages and [[link]] them both ways.
3. If it contradicts an existing page, add a CONFLICT block for me to
resolve. Never silently overwrite.
4. Update wiki/index.md (a map of every page) and append one line to
wiki/log.md.
5. Move the fully ingested file into raw/processed/.
The one rule: you are the ONLY writer inside wiki/. If wiki/ changed and
you did not change it, stop and flag it.
Do this now
- Create the folders in any Obsidian vault:
mkdir -p raw/inbox wiki/concepts wiki/entities wiki/comparisons
- Paste the
CLAUDE.mdabove into the vault root. - Drop three messy notes into
raw/, open Claude Code in the vault, and sayprocess raw/.
Run it manually until you trust the output. Then put it on a nightly schedule and wake up to a wiki that filed itself.