João BlasquesNotes from the build

Drop it in. It’s filed by morning.

I keep my notes, projects and most of my documents in one Obsidian vault, and an AI agent works inside it every day. This page shows how it works, and the three rules that let me trust it.

  1. Starred email comes in (switched off for now)
  2. Phone folder comes in, then the local filter runs
  3. The router sorts what is left
  4. One-way copy of my documents to the cloud
  5. Encrypted backup

By the time I open the laptop, the inbox is empty. If the router isn’t sure about something, it asks me. It doesn’t guess.

Why I built it

I have always liked personal productivity and organization. For years I used GTD (Getting Things Done) to run my personal and professional life. When I found the Second Brain idea together with PARA, it made complete sense to me, so I built it.

Giving an agent that kind of access has an obvious risk. Your passport, bank statements and contracts end up near your notes. So the system is built around one question: what can the AI see, what can it move, and what can I undo?

Three rules

  1. Sensitive documents never enter the vault, and no AI reads them.A local script that uses plain pattern matching, with no AI and no network, checks every file first.
  2. The system only moves things.It never deletes and never overwrites. Every move is logged and can be reversed with one command.
  3. I dump everything into one inbox, and a nightly job empties it.If it can’t decide, it asks me. It doesn’t guess.

What runs today, and what is still being built

PartStatus
The vault (folders, rules, commands)Running
The knowledge base (Corpus)Running
Nightly pull from my phone’s cloud folderRunning
The sensitivity filter and the nightly routerRunning (first versions)
Router v2: inbox zero, review queue, triage folders, folder limitsBuilt, reviewed and merged. Its first night only writes a report
Starred-email channelSet up and tested on 20 real messages. The rest comes in slowly. The timer is off
Scheduled rituals (morning brief, weekly review)Written for my old Mac setup, being ported to Linux

I list this on purpose. Most pages like this show only the parts that work.

How the pieces fit

How an item moves through the system Three sources feed one inbox. A local filter with no AI sorts each item into four outcomes: moved out of the vault, held for review, filed in a notes folder, or sent to the knowledge base. Phone folder (cloud) Starred email Files I drop in 00_Inboxstaging, never kept Local filterpattern matching only: no AI, no network, names patterns, never values Sensitivemoved out of thevault to my owndocuments folders Unsureheld out of any AI,goes to a reviewpile Clear: notesAI reads the text,picks a folder inAreas, Projects… Clear: readingAI reads the text,sends it to theknowledge base The filter always runs first. The AI only ever sees what comes out as clear.
One inbox in, four places out.

1. The vault

It uses the PARA method: Projects, Areas, Resources, Archives. Plus a folder for the system’s own files.

A thin CLAUDE.md at the root points the agent to three files: who I am and what I’m focused on, the folder rules, and the list of commands. It reads those instead of guessing.

The vault is built for an agent first. Status files and router notes are written so a program can parse them. A human-friendly view comes second.

Technical detail: the two-layer project model

Each project has two layers: a code repository (the technical truth) and a small folder in the vault (plans, decisions, status). A /project command scaffolds or audits that pairing so they don’t drift. The vault folder never duplicates what the code already says.

2. The knowledge base (Corpus)

Corpus is a second layer on top of the vault. It follows the “LLM wiki” pattern: raw sources go in, and an agent turns them into small linked pages.

I have not asked it a real question yet. I am still working out when the knowledge base is the right tool and when a normal web search is better. I will add an example here once I have one that earned its place.

3. The inbox: dump anything, wake up to zero

Anything I want kept goes into one place, from any device:

The goal is inbox zero, like an email inbox. Every item ends up in one of four places:

  1. Out of the vault, if it’s sensitive. Filed into my own documents folders by kind (identity, health, finances, home, cars, family, insurance), using only the file name, never the contents.
  2. A folder in my notes, if it belongs to an area of my life: a contract, a receipt, a note.
  3. The knowledge base, if it’s reading material: an article, a blog, a newsletter, a book.
  4. A review pile, if the router isn’t sure. A morning summary lists one question per item. The inbox itself stays empty.

An email about a new car-insurance policy goes to the insurance folder, not the knowledge base. The star only means “bring this in”. What the item is decides where it goes.

Technical detail: how the router stays small and safe

The router is a thin shell wrapper around a deterministic Python engine that uses only the standard library. The AI’s job is narrow: read extracted text, then propose a destination folder and a tier for each file.

  • The wrapper does the PDF and OCR text extraction itself.
  • The model runs headless with a Read tool and an Edit tool only. It has no shell, no network tool, and none of my usual settings or hooks.
  • It can read only one per-run folder of extracted text. It can edit only one plan file.
  • The engine re-checks every row the model proposes: allowed source, allowed destination, no overwrite, tier rules, a limit on how many files per run.
  • A move happens automatically only if the model is highly confident, a tier is set, there’s no open question and the date comes from the document’s content. Everything else is proposed, not done.
  • The wrapper always exits cleanly, so a timer never retries in a storm. A failure shows up in the next morning’s summary.

4. Trust: the three tiers

Every file gets one of three sensitivity tiers. If I’m unsure which, the stricter one wins.

T0

Identity documents, medical records, bank statements, property deeds, loan papers.

Never in the vault. My own documents folders only. Nobody reads them: they are classified by name, date and folder only.

T1

Contracts, insurance policies, company legal papers, payslips, invoices.

In the vault, but git-ignored (stays on my machine, no cloud copy of the git history). The AI may read them to classify and summarise.

T2

CV, certificates, articles, books, reading material.

In the vault, tracked in git. The AI may read them.

Why this shape:

The local filter

It’s the gate that makes this work. It’s a script of pattern matching in two languages: IBANs with the check digit verified, card numbers (Luhn), ID-document keywords, medical terms, secret-looking strings like keys and tokens. It has no network access and no AI. It prints the name of the pattern it matched, never the value.

It returns one of three results:

The rule is default-deny: “clear” requires readable text. A scanned image with no text is not clear.

It’s deliberately strict. It would rather flag a harmless file than let a sensitive one through. That cost me something real, and I tell the story below.

5. Mistakes are cheap

I assume the system will make mistakes. The design aims to make each one easy to see and easy to undo.

When I get an item wrong, or the filter does

Files the filter can’t clear go to a triage folder outside the vault. When I look in it now and then, I have three moves:

6. Keeping folders tidy

If an agent can create folders, it will, and you end up with dozens of near-duplicates. I allow it, with six limits:

  1. Rule of three. The first two items of a new topic go into the existing parent folder. The folder is created when a third item arrives, and the first two move into it.
  2. Similarity check. The router compares a proposed name with every folder in that area. If one is close, it must reuse it.
  3. Weekly cap. At most two new folders a week.
  4. A registry. One note lists every folder the router made, with the date and the reason.
  5. A monthly check. It lists folders with fewer than three files after 30 days, near-duplicate names, and areas that are growing fast.
  6. Hard limits. Three levels deep, never a new top-level folder, never in the system area, never a name that repeats its parent. The checks only report. I merge, and nothing is deleted.

I don’t have a view on the number three yet. It is a starting value, one number in a config file. I will tune it after the first few weeks of real use.

7. Backups and sync

What broke, and what it taught me

The first version of the filter flagged a file as sensitive on single words like “bank” or “patient”. Overnight it flagged 26 reading PDFs and a spreadsheet and moved them to the triage folder. That folder sat inside the tree my phone mirror copies to the cloud. By morning the files had been uploaded.

Nothing private was in them. They were books and articles. But two things were wrong: the filter was too eager, and the folder meant to be safe sat in an unsafe place.

I fixed both. I restored the files, exempted the reading folders from the filter, excluded the triage folder from the mirror and purged the stray copies from the drive. I also added a report-only first night. A new rule now writes a report and moves nothing until I have read it.

A safety step is only as good as every folder it writes into.

What I would copy if I were you

The stack

Obsidian for the vault. Claude Code for the agent, headless for the nightly router. Python (standard library only) for the engine. Bash for the wrappers. systemd timers for scheduling. rclone and restic for sync and backup. Git and GitHub for history. The Gmail API for the starred-email channel.