The foundationCase study 12 / 20

Second Brain

The structured second brain every other tool reads from and writes back to: an Obsidian vault plus an agent layer, governed by a single init file.

Role

Sole designer and engineer

Status

● Running in production

Models

Haiku by default · Sonnet when the task needs it

Stack

Obsidian · Claude · Init protocol · Notion CRM · File routing · Git sync

1
init file the whole fleet runs on
Live
▶ Watch the demo

The short version

  • One init file tells every assistant session what to load, what not to load, which model to use, and where every new file belongs.
  • Knowledge, live operations and dated memory are in separate folders, so an agent never confuses what I know with what I did.
  • Git-synced to a private repo about every seven minutes.

01Why I built it

Every AI session starts from nothing. Without structure, an assistant either knows nothing about me or gets the whole vault pasted in, which is slow, expensive and confusing.

I wanted one governed layer: rules for what an agent reads, what it may write, and where things go. Then every other tool could share the same memory without stepping on each other.

02How it works

  1. BootEvery session loads only USER.md, IDENTITY.md and today's memory log.
  2. RouteOne of four personas (Productivity, Content, Growth, Builder) is chosen from the task. One at a time.
  3. RetrievePrior context is searched on demand, and only the relevant snippet is pulled.
  4. FileA pre-filing checklist decides where every new file goes: knowledge, artefacts, drafts, live operations or memory.
  5. LogEach session appends what was done, decisions, blockers and next steps to the day's memory log.
  6. SyncThe vault commits, pulls and pushes to a private GitHub repo about every seven minutes.

03Model choices, and why

Default for everyday work

Claude Haiku

Most tasks are routine. Starting small keeps cost and latency down.

Architecture, production code review, security, hard debugging, multi-project strategy

Claude Sonnet

The init file names exactly when to escalate. “When in doubt, try Haiku first.”

Deeper work

Larger models, under the same working standard

A shared working standard in the init file keeps habits consistent whichever model is running.

04Context: what the model sees

  • Three files at boot, and nothing else. README, the memory overview, session history and previous tool outputs are explicitly not auto-loaded.
  • Search, then read the section. Not whole files to find one line.
  • One persona file for the task at hand, plus a platform style file only when writing for that platform.
  • Separation by purpose. BRAIN is read-only knowledge, OPS is live data, MEMORY is what happened. Agents can't confuse them because they never share a folder.

05Token and cost discipline

  • The boot rule is the biggest saving: three small files instead of a whole vault.
  • A written budget: $5 a day and $150 a month, with a warning at 75%.
  • Rate limits: 5 seconds between API calls, 10 seconds between web searches, at most 5 searches per batch, and a 5-minute stop on any 429.
  • Batch similar work: one request for ten leads, not ten requests.

06Performance

  • Plain Markdown in folders. Fast, portable, readable by any tool and any model.
  • Several apps keep their live data in the vault (receipts, the time tracker, teaching drafts), so one git sync backs them all up.

07Trade-offs I made

Chose

Load little, search on demand

Over

Load everything for context

The agent sometimes has to look something up, and sessions stay cheap and focused.

Chose

Plain files and git

Over

A database or a vector store

Less clever retrieval, but human-readable, diffable and recoverable.

Chose

One persona at a time

Over

Blended instructions

Clearer behaviour, and one question when a task spans two.

Chose

Rules in a file

Over

Rules in each app

One place to change how every agent behaves.

08Guardrails

  • BRAIN is never edited during a working session.
  • Nothing goes to PUBLISHED without my explicit approval.
  • Irreversible actions (sending, deleting, deploying, paying) need my yes.
  • Invent nothing: missing details are marked UNKNOWN.

09What I'd do next

  • Update the model-selection rule to name when larger models are worth it, now that the working standard covers them.

10What this shows

Applied AI engineering

Context engineering as a system: what to load, what to skip, how to route models and personas.

Product

An operating system for one operator across several businesses, with rules people and agents can both follow.

Solutions

A pattern that scales to a team: shared memory, file routing, and budgets written down.

Across the fleet: every build runs on one self-hosted Linux server, binds to localhost and is reached only over a private Tailscale network. AI inference runs on a Claude subscription through one in-house router (part of Sentry) rather than per-token API keys, with open-weight models on Ollama as the local layer: on the server, and on a 64 GB MacBook Pro shared over Tailscale for heavier local work. Everything is backed up to GitHub and a separate cold disk, and nothing reaches another person without a human tap.

Hiring for applied AI, product or solutions work? I'd like to hear about it.