khairold
← Back to Work

Second Brain

An AI-powered personal knowledge system — dump your thoughts, and AI files, connects, and surfaces them when they matter.

February 2026
ClaudeCloudflare D1PiWorkersWhatsApp

The Problem

I’ve tried every note-taking app — Notion, Obsidian, Apple Notes, Roam, Logseq. They all share the same fatal flaw: they require me to organize things. Create a page, pick a folder, add tags, link to related notes.

I never do that. Nobody does. You start with good intentions, then three weeks later you’re dumping everything into a single “Inbox” note that never gets processed.

I wanted the opposite: a system where my only job is to talk, and AI handles everything else.

The Approach

I built a three-layer system: capture, processing, and retrieval. Everything runs on Cloudflare’s free tier.

Capture — just talk

Two input channels, both zero-friction:

  • Pi CLI — type /dump in my terminal and brain-dump in natural language
  • WhatsApp — send a text or voice note to a dedicated number

Voice notes get transcribed by Whisper. Everything lands in a Cloudflare D1 database as an unprocessed session — raw text, timestamp, source. That’s it.

Processing — AI does the filing

When I run /process, Claude reads each unprocessed session and extracts entities into four buckets — what I call PPIA:

  • People — who was mentioned, what’s the context, any follow-ups
  • Projects — what I’m working on, current status, next concrete action
  • Ideas — sparks, concepts, things worth remembering
  • Admin — tasks, deadlines, things that need doing

Each extraction gets a confidence score. Below 0.6, the item gets flagged for manual review instead of auto-filed. Above 0.6, it merges into existing entities — appending notes rather than creating duplicates. One entity per slug, with an append-only history of everything related to it.

The schema is intentionally simple: an items table (slug, category, name, JSON meta) and a notes table (append-only, linked to items). No complex graph structures, no tag taxonomies. Just entities and their notes.

Retrieval — it comes back to you

The data surfaces through multiple channels:

  • /digest — daily summary of active projects, pending follow-ups, recent ideas
  • /weekly — weekly review with trends, stale items, and suggestions
  • /search — full-text search across everything
  • WhatsApp — send ?anand to instantly find everything about Anand

There’s also /nextactions to audit vague project next-actions, /tensions to surface system friction, and /duplicates to find entities that should be merged.

Architecture

Pi CLI  ──→  Cloudflare Worker (API)  ──→  D1 Database
WhatsApp ──→  Cloudflare Worker (webhook) ──→  D1 Database

               Claude API (entity extraction)
               Whisper (voice transcription)

The Cloudflare Worker exposes a REST API — sessions, items, notes, search. Pi talks to it through a custom tool extension (d1_api), so every command is just a function call to the API.

The entire system — API, database, WhatsApp webhook — runs on Cloudflare’s free tier. Total cost: effectively $0/month.

The Result

I use this daily. Brain dumps flow in throughout the day — from my terminal when I’m coding, from WhatsApp when I’m walking. They get processed into structured knowledge automatically.

The shift is real: I capture 5–10x more thoughts than I ever did with traditional note apps, because the friction is zero. And unlike those apps, things actually come back — /digest reminds me of follow-ups I would have forgotten, /weekly surfaces patterns I wouldn’t have noticed.

The best part: the system gets more useful over time. More entities, more connections, richer context for AI to work with. The opposite of a note-taking app that slowly becomes a graveyard.

What I Learned

  • The best PKM system is the one that requires zero effort to maintain. Every tool that asked me to organize things eventually got abandoned. This one just asks me to talk.
  • Append-only notes beat structured updates. Instead of editing entity fields, everything is a timestamped note. You get full history for free, and AI can synthesize the current state from the log.
  • Confidence thresholds prevent garbage-in-garbage-out. Without the 0.6 cutoff, AI would confidently file every vague mention as a new entity. The threshold forces ambiguous extractions into manual review.
  • WhatsApp as an input channel changes everything. The barrier between “I had a thought” and “it’s captured” drops to near zero. Voice notes while walking are the highest-bandwidth capture method I’ve found.