slowlp
← Blog
Method 2026.06.11 · 7 min read

The Hard Part Wasn't Collecting, It Was Digesting

How I set up Claude Code to run the second wiki: digest rules, pin, pipeline, and hooks.

Method

Collecting turned out to be easy. Drop a session or a note into the raw folder and you’re done. (Designing a channel that piles up automatically no matter where you throw something was the step before this.) The hard part came next: reading raw, picking out what’s worth keeping, and turning it into a wiki page. That digesting kept going wrong.

One time I came back like this:

“hey, the digest is taking forever so here I am again” “I’m collecting raw data from outside, but honestly there isn’t much — I never really managed my knowledge”

The skeleton is just two folders

raw/ and wiki/, just those two to start. One rule: never modify raw. Original conversations, notes, pastes, whatever comes in, raw stays untouched. wiki is the digested layer the LLM builds and maintains. Splitting “source vs. digested result” from the very beginning is what keeps it from getting confusing later. The folder skeleton itself I set up in one shot with the /docs-init skill.

The digest criteria weren’t settled in one pass

When the criteria are vague, an LLM goes one of two ways. It tidies everything, or it throws everything out. That was exactly the start: turning even small talk into pages, or letting a decision worth keeping slip away.

So I wrote the criteria down. In CLAUDE.md. At first it was loose: roughly “if there’s something gained, pull it out.” That wasn’t enough, so I narrowed it to “things that are reusable or could become knowledge.” Then I tuned it again. Signal scoring (tool use, a problem-to-conclusion arc, an explicit “keep this” gets digested; one-off chatter and throwaway calculations get dropped), a list of what to discard, and content_potential tags (story·lesson·tip at first, method added later) so it would also flag blog material. I later tacked on a rule that project sessions should also update the overview index. It wasn’t set once; it’s the result of fixing whatever broke each time I ran a digest.

Putting all the criteria into CLAUDE.md created another problem: rules unrelated to digesting got loaded into every session’s context. So I pulled the digest criteria out into a /digest command, loaded only when needed.

Criteria alone didn’t surface things, so I started marking them by hand

No matter how much I refined the criteria, there was a ceiling. When a conversation was long or a lot piled up at once, the genuinely important signals still didn’t get pulled. Instead of waiting for the digest to pick them out for me, I decided to mark them myself. That’s why I made the pin and capture skills. Stamp an important moment into raw/inbox/pinned.md right then, and the digest handles it first. It’s leaving a note that says “make sure to grab this.”

The pipeline: ingest → scrub → digest → lint

Stages bolt on before and after the digest.

ingest-chats is the start. It pulls CLI sessions in as manifest diffs. I didn’t hand this to the LLM; a deterministic script does it. It’s closer to “copying files,” so a script is faster and safer.

scrub replaces secrets like API keys, national ID numbers, and passwords. I wondered why this was necessary until I found that obsidian-git doesn’t run native pre-commit hooks on its auto-commits (it’s an isomorphic-git implementation). You can’t trust git hooks. A PreToolUse hook that runs right before the digest is the real line of defense.

digest is the raw-to-wiki conversion, and lint is the closing health check (orphan pages, contradictions, missing cross-references).

Nailing it down with a hook

Right before the digest runs, it scans the raw/wiki diffs, and if sk-ant-, ghp_, AWS key, or national-ID patterns hit with high confidence, it blocks with exit 2. The model isn’t the one judging; a script blocks it, so there are no slips.

In the end

The core is simple. Turn repeated work into one-word commands, and write down the criteria that require judgment. Scripts do the collecting; written-down criteria do the digesting. Digesting was the hardest part at first, and it only started working once I put the criteria into a file instead of just saying them.

From the project
Second Brain LIVE
The source of everything at slowloop — a personal knowledge base where AI conversations pile up and connect.
View →
COMMENTS