Skip to content
Go back

Refactoring a Three-Year Obsidian Vault

Updated:

I opened Obsidian to write a single note and stopped at the first question: where does this file go.

That hesitation had been sitting in the vault for months. Not dramatic enough to fix on a Tuesday night. Annoying enough that I quietly stopped opening the app.

For a day I thought the answer was to leave. I sketched a minimalist Markdown app — Cloudflare Workers, D1 with FTS5, CodeMirror 6 — and even checked which open-source editors were worth forking. Then I looked at the spec and realized the last thing I wanted in my life was another piece of software to maintain.

So I stayed in Obsidian, kept local Markdown as the single source of truth, and spent two days across Codex and Antigravity tearing down the vault I had lived in since 2023.

The database mistake

In Dataview in Obsidian, I wrote that Dataview turns Obsidian into a CRUD database. Treat every note like a row, fill the YAML frontmatter, query it back later.

That pitch is true. It is also the exact thing that broke the vault.

When I finally audited the old vault, the core writing habit was fine — 1,533 files in REFLECT/, written almost every day from 2023 through 2026. What felt chaotic was three years of taxonomy drift stacked on top of plugin experimentation:

BEFORE                                  AFTER
24 top-level folders (6 archives)   ->  7 top-level folders
1,301 one-file-per-day YAML logs    ->  47 monthly continuous files
82 plugins (54 disabled, 120 MB)    ->  19 installed, 19 enabled
20 themes                           ->  1 theme (Maple)
33 overlapping templates            ->  7 active templates
320 unreferenced images (151 MB)    ->  moved out; new uploads straight to R2
~405 MB workspace (excl. .git)      ->  108 MB

There were three separate empty 2026/ folders scattered across different trees. Duplicate filenames like wishlist.md showed up in six places. Seven hundred daily notes still carried a dead [[3im]] link from an old template, and thirty-nine had unexpanded Templater syntax frozen in the body.

Every structure you add for the database you might query later is a tax on the sentence you want to write right now.

Move structure behind the write path — Before: three decisions before a single sentence; after: capture first, organize later

Put prose back in the body

The daily note was the clearest symptom. One Markdown file per day, with things, mood, eat, and life stuffed into YAML frontmatter so Dataview could assemble a table.

It looked tidy in a query view. Reading back a week meant clicking across seven files and maintaining a schema.

I collapsed 1,301 daily files into 47 monthly continuous files under Daily/YYYY/YYYY-MM.md. Reverse chronological order, plain headings (## 2026-12-05 Sat), prose directly underneath. A macOS LaunchAgent appends today’s heading automatically, so opening the current month drops the cursor straight into blank space.

Structured long-form journals stayed separate under journals/ — not because they need a separate taxonomy, but because daily logging and sitting down to answer reflective prompts happen in different moods. One file per month works when you want momentum. A dedicated page works when you want to slow down.

Flattening the daily log did more than clean the sidebar. It turned journaling back into writing instead of data entry.

Make capture a zero-decision path

Once the daily files stopped acting like database rows, the remaining friction was everything that wasn’t a daily note: a stray thought, a link, a paragraph that doesn’t have a home yet.

The old vault forced three choices before the first word: folder, template, filename. The new one splits capture into two lanes and defers every decision to later:

One sentence   ->  Mac: Opt+Shift+P (AeroSpace)  ->  prepends timestamped entry to Thoughts.md
                   iOS: Add Thoughts Shortcut    ->  prepends & jumps straight to Thoughts.md

One note       ->  Mac: Cmd+N                    ->  lands in Inbox/ with auto-timestamp
                   iOS: Inbox Note Shortcut      ->  auto-titles from date + first line

Inbox/ is the default landing pad, not a graveyard. When it piles up, an obsidian-inbox skill reads the raw notes, proposes titles, frontmatter, and destinations — either a living file in Notes/ or a merge into the current month’s Daily/ — and waits for approval before moving anything or updating links.

A lot of the refactor wasn’t architecture at all. It was tiny behavioral fixes you only notice once you actually type: making Add Thoughts prepend at the top instead of appending at the bottom, jumping straight to Thoughts.md after saving, binding a three-key global hotkey (⌥⇧P) instead of a four-key chord that collided with window management, and installing Focus Existing Tab so ⌘⌥T stops spawning duplicate Thoughts tabs.

Half the friction in a note app lives in the three seconds between having a thought and seeing the cursor.

Hide yesterday while you write

Continuous files come with one new problem. Open Thoughts.md, Daily/2026/2026-12.md, or a monthly log to add today’s entry, and three weeks of older writing stare back at you from below.

Reading your own past entries before writing the new one quietly edits what you’re about to say.

I couldn’t find an existing plugin that hid everything below the first entry without touching the Markdown underneath. So I built a local CodeMirror 6 plugin — thoughts-focus — that collapses every block after entry one behind a single Show all button in both Live Preview and Reading View. The file on disk stays untouched plain text.

Keep the few habits that survived

Three years of hopping between tools left two other silos lying around: an Emacs Org Mode workflow I wrote about in Org Mode, and an old Logseq vault.

From Org Mode, only one loop had actually stuck: write down three important things (3im), clock in, clock out, review where the day went. I ported that loop into OrgLife/YYYY/YYYY-MM.md with the Timekeep plugin and a monthly summary macro. Then I spent several rounds trimming the Timekeep UI with a CSS snippet — stripping duplicate timestamps, adding a delete button, and hiding the Start input whenever another task is already clocked in so you can’t run two timers by accident.

Logseq got audited before anything moved. I migrated only the active reading and reference notes, uploaded their 20 attachments straight to R2, and left the rest untouched.

Old vaults fail migrations when you move everything out of guilt instead of habit.

Storage, sync, and a real check

The plumbing behind the seven folders had to be boring and private:

  • Sync: Remotely Save over a private Cloudflare R2 bucket with end-to-end encryption. Reading the plugin’s v0.5.25 sync code confirmed its conflict rule (keep_newer per file), which made it clear why Mac-first structural reorgs need a clean baseline before syncing mobile.
  • Images: pasted screenshots bypass PicGo completely and upload straight to a separate public R2 bucket, keeping the local vault light and mobile sync fast.
  • History: obsidian-git pushes to a private repo encrypted transparently with git-crypt.
  • Search: Floating Search (⌥⇧F) for fast local filtering, and qmd for local hybrid semantic search — 4,110 vector chunks indexed locally on Metal in two minutes, returning queries in 0.74 seconds.

In On Harness, I argued that a clean log is not a check — the check has to be something that can actually fail. Here, “the folder tree looks clean on Mac” wasn’t a check. Backing up the vault first, syncing to iPhone, verifying all 136 folders and 2,332 files by checksum, and then actually firing Add Thoughts and Inbox Note on the phone and watching an unprompted Mac write land on iPhone five minutes later — that was a check.

Most sync bugs hide until you write a real sentence from the second device.

Quarantine AI output

Once coding agents start living inside your vault, a new mess shows up fast. Generated summaries mix with handwritten notes, and useful decisions vanish into closed chat windows.

So the seventh top-level folder is AI/, kept strictly separate from human prose:

AI/outputs/              generated reports and long-form artifacts
AI/sessions/<repo>.md    per-repo session ledger, upserted by session_id
AI/memory/candidates.md  staging queue for cross-session memory, human-reviewed

Nothing an agent writes lands directly in CLAUDE.md, AGENTS.md, or a personal note. That stays aligned with The Memory Stack — raw logs and promoted memory are different layers, and mixing them turns context files into sludge.

To keep the ledger updated without manual logging, I wired Antigravity, Claude Code, and Codex into one shared async Stop hook (ai-memory-hook.py). The entry point checks a recursion guard (AI_MEMORY_HOOK_ACTIVE=1), forks a background worker, and returns in 76 ms so no turn ever blocks.

The worker parses all three JSONL transcript formats and asks a cheap model for a binary should_record verdict. One-off syntax lookups get dropped; real sessions upsert in place without duplicate rows, and any durable preference goes to candidates.md to wait for review.

Let agents gather the candidates. Keep the merge gate human.

But

There is an obvious irony in everything above.

To stop over-engineering my note-taking setup, I spent two days running more than twenty sessions across Codex and Antigravity, spawning four parallel cleanup subagents, auditing sync source code, wiring two R2 buckets and git-crypt, indexing 4,110 vector chunks, writing a local CodeMirror 6 plugin, and hooking three coding agents into a shared cheap-model memory pipeline.

I wrote in On Life that systems exist to optimize what has already been found. Refactoring a vault with coding agents is dangerously satisfying for the same reason: every number moves in the right direction. 405 MB drops to 108 MB. 82 plugins drop to 19. Every commit is clean, reversible, and verifiable.

None of those numbers prove I will write more.

The real test starts tomorrow, when there are no more plugins to delete, no more folders to merge, and no agent waiting for approval — just a cursor blinking in an empty line.

Close .obsidian/. Write the sentence.



Previous Post
Better Call Saul