A governed second brain for Claude Code — ONE plugin, two modes. Local (default): turn your own files into cited (qmd://) memory, every write run through deterministic governance and a tamper-evident SHA-256 hash-chained audit trail, in-process, no daemon, no network. Team (set TEAMKB_API_URL): query your team's single governed brain over the tailnet with a per-user token. Same /brain and /brain-save skills in both modes.
Based on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Saves a single fact, decision, pattern, or convention into your governed knowledge brain so it can be recalled later — and retires memories that are outdated. Side-effecting: it writes to your durable corpus, so it never auto-fires — invoke it explicitly. Use when you want the brain to remember something specific going forward without a full recompile, or to mark an old memory outdated. Trigger with "/brain-save".
Answers questions about your own systems, notes, decisions, runbooks, and conventions from your governed knowledge brain, returning a qmd:// citation for every claim — receipts, not recall. Use when you want to know what your brain has captured about your own architecture, infrastructure, decisions, or conventions (e.g. "what does my system map say about the proxy", "why did I pick Apache-2.0", "what's my deploy runbook"). Trigger with "/brain", "ask the brain", "what do I know about", or "check my knowledge base".
Admin access level
Server config contains admin-level keywords
Requires secrets
Needs API keys or credentials to function
A local-first Claude Code + Cowork plugin: turn your own files into a governed,
qmd://-cited second brain with a tamper-evident, SHA-256 hash-chained audit trail.
Compile, then govern. Runs in-process — no daemon, no network, no API key for retrieval.
| Repo | What it is | |
|---|---|---|
| Landing / thesis | intent-solutions-io/governed-second-brain | The umbrella — why this exists, the competitive teardown, the "Compile, Then Govern" thesis, the receipts argument. Start here for the story. |
| The plugin (you are here) | jeremylongshore/governed-second-brain-plugin | The installable code — the local stdio MCP server + skills. Start here to run it. |
It stacks on three engines:
| Engine | Repo | Layer |
|---|---|---|
| ICO | jeremylongshore/intentional-cognition-os | Compile — derive knowledge from a corpus (optional; the only part that egresses) |
| INTKB | jeremylongshore/qmd-team-intent-kb | Govern — deterministic dedupe → policy → promote + the hash-chained audit |
| qmd | tobi/qmd | Retrieve — on-device search; every hit is a qmd:// citation |
This plugin bundles the compiled INTKB packages, so it runs the govern + retrieve loop fully in-process — the engines stay independent repos; nothing here forks or privatizes them.
Most "AI memory" gives an agent better recall. This does two things the category skips: it
governs what's allowed to become durable memory (deterministic dedupe / policy / promotion — by
code, not a model), and it ships a receipt — a qmd:// citation plus a SHA-256 hash-chained audit
event — for every write. Runs on your machine; your files never leave it (retrieval is local; the
optional ICO compile step is the only thing that egresses, and it's opt-in).
| Tool | Kind | What it does |
|---|---|---|
brain_search | read | Cited search over your governed memory (qmd:// receipts), in-process |
brain_status | read | Counts by lifecycle state + category |
brain_audit_verify | read | Verify the audit trail — the SHA-256 hash chain and the external anchor log; flags any tamper |
brain_capture | write | Capture a fact as a governance proposal (to the local spool) |
brain_govern | write | Drain the spool → dedupe → policy → promote, with a hash-chained audit receipt — daemon-free |
brain_transition | write | Retire / re-lifecycle a memory (audited) |
Two skills front these: /brain (cited answers) and /brain-save (governed capture).
Honesty is the point of a receipt. The chain gives you tamper-detection — integrity + ordering,
so an edited or reordered record is caught by verify. It is not tamper-proof: on your own machine
a writer with access can edit an event and re-hash the chain forward. Within a single trust boundary
(your machine) that's exactly the integrity guarantee you want; cross-actor non-repudiation needs an
external chain-head anchor (on the roadmap). It is not a blockchain and not immutable storage.
One command, two modes:
# A) zero-egress (default for regulated/client data) — nothing leaves the machine
npx governed-second-brain init <your-folder> --index-only
# B) full compile — ICO derives knowledge (6 passes) before governing; opt-in egress to DeepSeek
DEEPSEEK_API_KEY=… npx governed-second-brain init <your-folder>
It builds a governed, qmd://-cited, hash-chained-audited brain under ~/.teamkb, installs the native
dep per-platform, and auto-registers the MCP server with Claude Code (claude mcp add; --no-register
to skip). Full mode runs a loud pre-flight consent (your file text goes to DeepSeek; --yes to skip the
prompt). Requires Node 20+, a C/C++ toolchain (for better-sqlite3), and qmd 2.x on PATH for retrieval.
After it finishes, start a new Claude Code session — the governed-brain tools are live. For the
/brain and /brain-save skills too, claude plugin install governed-second-brain.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimnpx claudepluginhub jeremylongshore/governed-second-brain-plugin --plugin governed-second-brainClaude Code skill pack for Notion (30 skills)
Claude Code skill pack for Cast AI (18 skills)
Claude Code skill pack for Lucidchart (18 skills)
Claude Code skill pack for Cohere (24 skills)
Claude Code skill pack for Procore (24 skills)
Upstash Context7 MCP server for up-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your LLM context.
Permanent coding companion for Claude Code — survives any update. MCP-based terminal pet with ASCII art, stats, reactions, and personality.
Production-grade vibe coding suite. Structured workflows from discovery to deployment: start, build, ship, fix, refactor.
Memory compression system for Claude Code - persist context across sessions