Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By andrewjsauerv0.1.0Apache-2.0
Stop your AI coding agent from undoing decisions it doesn't remember you made. Captures why code is the way it is as work happens, stores it git-natively as Lore-compatible records, and serves it back to fresh sessions over MCP.
Claude Code doesn't load everything this plugin declares
dist/cli.js, which isn't in the repository. Claude Code installs the plugin without an error, but the hooks exit with an error each time they run. Claude Code installs a copy of the repository and runs no build step.cairn runs dist/mcp/server.js, which isn't in the repository. Claude Code installs the plugin without an error, but the server fails to start. Claude Code installs a copy of the repository and runs no build step.Checked against Claude Code 2.1.332.
Claude loads one when your task matches it, or you run it by name.
2 cautions to review before installing
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
decision-records, lore, mcp, git-notes, memory, coding-agents
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Stop your AI coding agent from confidently undoing decisions you made on purpose. A fresh session has no memory of why your code is the way it is — Cairn gives it that memory, so the next traveler doesn't re-derive (and reverse) yesterday's reasoning.
Under the hood: a self-compacting, code-indexed decision graph built on git and Lore-compatible decision records, served to agents over MCP.
Git is a perfect record of what changed and an amnesiac about why. Cairn captures the reasoning behind code as work happens, stores it in git itself, and hands a fresh agent session the answer to "why is this code the way it is?" — bound to the specific decision that touched the code, not to a file, a folder, or a chat log.
Cairn does not invent a format and does not run a backend. It emits Lore-compatible commit trailers, keeps a compacted graph in a refs/notes/cairn git-notes namespace, and serves two read tools over the Model Context Protocol. It is single-player and local.
Cairn — a cairn is a stack of stones hikers build to mark a trail, left so the next person to come through can find the way the last one already worked out. That is exactly the job here: leave a durable marker of the reasoning behind a piece of code, so the next traveler — usually an agent with no memory of yesterday — doesn't have to re-find the path from scratch.
plan approved / /cairn:decision ─▶ opens a decision (intent + alternatives)
agent edits a file ─▶ durable journal entry in .git/cairn/ [synchronous, no model call]
you commit ─▶ consolidate: journal ─▶ Lore trailers on the commit
+ decision atoms in refs/notes/cairn
compaction / session end|start ─▶ flush journal ─▶ notes graph, then dream: compact the store if over budget
fresh session ─▶ cairn MCP ─▶ why(file) | recent(n)
A decision opens two ways: automatically when you approve a plan (the plan is the richest statement of intent there is), or manually with /cairn:decision "<intent>". Consolidation runs at every inflection point — at a commit it writes Lore trailers onto the commit and updates the notes graph; at compaction / session end / session start there is no commit to amend, so it promotes the journal to the notes graph only, making in-flight reasoning queryable across sessions before it is committed.
At those same idle boundaries (or on demand via cairn dream), Cairn also dreams: when the whole stored graph has grown past a budget, it folds the oldest decisions into compact rollups so the store stays bounded as history accrues — the self-compacting "memory" step, run at sleep-time rather than inline. See DESIGN.md.
Capture is split from persistence on purpose. The reasoning is journaled the instant a file changes, so a /clear, a crash, or a compaction can't erase it. Turning that raw journal into clean Lore records happens later, at a commit. Durability never waits for a commit and never depends on catching a teardown event — a missed trigger loses nothing, because the journal survives and the next commit picks it up.
Every individual capability here already exists somewhere. The unoccupied space is the intersection, and Cairn occupies exactly that and nothing wider:
What nobody has shipped as one thing is the full intersection — and that is Cairn:
| Axis | Cairn |
|---|---|
| Capture | Automatic, at decision-time and edit-time — not a manual writeup step. |
| Index | Bound to the decision that touched specific code — not a file, a folder, or a chat session. |
| Size | Self-compacting under a per-agent token budget, so a month of work still fits a cold session. |
| Storage | Git itself — Lore trailers + refs/notes/cairn. No backend; it travels with the repo. |
| Delivery | Served to agents over MCP. |
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground
Generated from the plugin's indexed repository (andrewjsauer/cairn) — no native marketplace selected
npx claudepluginhub p/andrewjsauer-cairn