Skip to content
All projects
Second Brain: A Personal Knowledge OS for AI Sessions
Developer Toolscompleted

Second Brain: A Personal Knowledge OS for AI Sessions

Jul 2026solo build
load 3, not allThe agent reads one ~90-line index that maps tasks to files, then loads only the two or three files a task needs — never the whole vault. The problem turned out to be context delivery, not note-taking.

Overview

AI models are brilliant and amnesiac: every session opens with the same monologue — who I am, what I'm building, what I decided last week — before any real work starts. The obvious fix, one giant CONTEXT.md pasted everywhere, made the agent worse: slower, vaguer, skimming my life like a textbook the night before an exam. Second Brain fixes the actual problem, which turned out to be context delivery, not note-taking — a router that maps tasks to files and a write-back loop that keeps the vault current.

Tech Stack

system
Markdown vaultClaude Code router patternGit
integrity
PowerShell health-check (~120 lines)frontmatter + line-budget rules
showcase
Hand-written HTML5CSS custom propertiesVanilla JS
hosting
Vercel (static, cleanUrls)

Challenges

  • A single huge context file makes the agent slower and vaguer, not smarter.
  • Keeping evergreen facts and time-stamped events from bleeding into each other and going stale.
  • Making sure the agent actually writes back what it learned instead of forgetting it next session.
  • Detecting when the knowledge base is silently lying — stale, over-budget, or full of broken links.

Solution

A router, not a search engine: the agent reads one ~90-line index that maps tasks to files, then loads only the two or three files a task needs. Two kinds of truth never mix — evergreen facts live in line-capped _context.md files patched in place, events live in append-only dated logs — which keeps retrieval cheap and answers current. Every meaningful session ends with /checkpoint: decisions appended, evergreen facts patched, the focus file rewritten. A ~120-line PowerShell health check enforces frontmatter, line budgets, 30-day staleness and broken-link detection, exiting non-zero when the brain is lying — CI for your life.

Outcome

Every AI session now starts from context instead of a cold introduction, loading only what a task needs. The public showcase site tells that story with a zero-dependency front end — three static pages, one stylesheet, one small JS file — including a hero terminal that replays a real Claude Code session (route → read 3 files → work → /checkpoint) character by character, accessible by construction and responsive down to 360px. The vault itself stays private; it's literally my brain.

What I'd do differently

The lesson that reframed the project: the bottleneck was never storage, it was delivery — a memory system without an update loop is a diary you stop writing in. The health-check-that-exits-non-zero is the DRDO instinct again: a system that fails quietly is the dangerous kind, so make it fail loudly.

Built with

Claude CodeMarkdownObsidianGitPowerShellVercel