Cognito
Persistent structured memory for Claude Code.
Every conversation you have with Claude — every decision, every debugging session, every architecture debate — disappears when the session ends. Six months of daily work, gone. You start over every time.
Cognito fixes this. It gives Claude a local, structured knowledge base on disk that it reads at session start and writes to throughout the session. No vector database, no cloud, no API calls. Just markdown files that Claude compiles, maintains, and queries — and that survive across sessions forever.
It is Claude's own memory. Claude reads it, writes it, maintains it, improves from it.
┌─────────────────────────────────────────────────┐
Session N │ Wake up: read _identity + _facts + _wisdom + │
─────────────> │ _index (~700 tokens). Full project awareness. │
│ │
│ Work: read wing rooms on demand as topics │
│ come up. Update pages in-place with new │
│ decisions, architecture, tasks. │
│ │
│ Save: hooks auto-persist every 15 messages. │
│ Diary captures process observations. │
<───────────── │ Nothing is lost. │
Session N+1 └─────────────────────────────────────────────────┘
Lineage
This plugin synthesizes two ideas:
Andrej Karpathy's LLM Wiki — the insight that RAG re-derives knowledge from scratch on every query, while a compiled wiki accumulates and compounds. Cognito applies this: raw conversation is classified, compiled into structured pages, and updated in-place. Pages reflect current truth, not append-only history. Knowledge is created at write time, not rediscovered at read time.
MemPalace — the spatial metaphor of wings, rooms, halls, and tunnels for organizing memory. Rather than a flat folder of notes, knowledge is organized by domain (wings) and topic (rooms), with cross-references (tunnels) connecting the same concept across domains. The closet/drawer pattern provides compressed summaries that point to detailed content.
The diary system — Claude's personal observation journal that consolidates into long-term behavioral wisdom — is original to this plugin.
Install
Option A: Local development (quick start)
git clone https://github.com/herrhelms/cognito-plugin.git
claude --plugin-dir ./cognito
Option B: Persistent install
git clone https://github.com/herrhelms/cognito-plugin.git ~/cognito
claude plugin install --path ~/cognito
Now every claude session loads the plugin automatically. Verify with /plugins.
Option C: From a marketplace
claude plugin marketplace add <marketplace-url>
claude plugin install cognito
First run
Just start Claude Code in any project. The wake skill auto-triggers, detects there's no vault, runs the bootstrap, and asks a few setup questions. That's it — every future session starts with Claude already knowing your project.
Architecture
The knowledge flow
Cognito has two parallel compilation pipelines that both feed into session startup:
COMPILE PIPELINE DIARY PIPELINE
(Karpathy LLM Wiki) (long-term wisdom)