How I'm building My Digital Cortex

A pure markdown system, version-controlled in git, synced through Google Drive, and readable by any model. Persistent context for working across multiple projects and agents at once.

Many simultaneous projects, decisions made in different contexts, and every AI agent starts from scratch knowing nothing about me.

The fix I landed on was building an external brain in markdown that serves as the single source of truth for any agent. I called it My Digital Cortex.

The core idea

I don’t want to depend on a specific tool. I want simple .md files, version-controlled in git, synced through Drive, and readable by any model: Claude, ChatGPT, Gemini, Cursor, whatever.

Tools die. Markdown survives.

The Cortex lives at G:\My Drive\01 AI\Vault\ and is already open in Obsidian. Any agent that needs context about me reads the files from there.

Architecture in 4 layers

┌─────────────────────────────┐
│ 4. TRIGGERS (cron, webhook) │
├─────────────────────────────┤
│ 3. AGENCY (Gmail, Cal, WA)  │  ← I'm here
├─────────────────────────────┤
│ 2. PERSONA (how I decide)   │  ← done
├─────────────────────────────┤
│ 1. MEMORY (what I know)     │  ← done
└─────────────────────────────┘

Phase 1: Memory

I scanned every source: Drive folders, dev projects, memories generated by Claude Code, scattered context files. Classified everything into categories and copied it into the Cortex structure. Never moved originals without approval.

The structure:

Cortex/
├── 00-meta/           # instructions for any agent
├── 01-pizzarias/      # Dáme and Lov, marketing, ops, finance
├── 02-projetos-dev/   # all code projects
├── 03-pessoal/        # family, health, finance, profile
├── 04-consultoria/    # projects and clients
├── 08-secretaria-log/ # operational logs (gitignored)

Every file has YAML frontmatter with project, status, updated, and tags. That lets any agent grasp the context without reading the whole file.

Phase 2: Persona

I captured how I actually make decisions, not how I think I do. That became persona-decisao.md:

The file isn’t aspirational. It’s descriptive. The agent uses it to flag when it senses I’m in the wrong mode for an important decision.

Phase 3: Agency (in progress)

Here the agents stop being consultative and start acting. WhatsApp was the first integration.

The bot runs in the background, no Chrome, no open window. Every week I get on my own WhatsApp:

The most interesting part: every Sunday the bot reads my perfil-fabio.md, persona-decisao.md, and familia.md files and adds only what is genuinely new. No overwriting, no invention, only what it could observe in that week’s messages.

Details about this bot and how it connects with the Cortex are in I built an AI agent that takes care of my WhatsApp.

What I’ve learned so far

The Cortex only works if it’s easy to maintain. Complicated files don’t get read, don’t get updated, they die. Pure markdown, simple frontmatter, no proprietary plugins.

The automation that feeds the Cortex needs to be conservative.

Better to write nothing than to write something wrong.

That’s why the bot uses a prompt that instructs the model to return “nothing new” whenever there are no clear observations grounded in the messages.


Gmail and Calendar are next in Phase 3, with summaries of important emails, alerts about appointments, and integration with the Cortex. Then Phase 4: automatic triggers that fire actions without me having to ask.

The end goal is a system that knows my context better than I do on any day of overload.