An external hard drive for your AI agent's project memory
Pensieve replaces static agent briefings with a self-growing knowledge graph that remembers conventions, decisions, and facts across sessions.

What it does
Pensieve installs as an AI “skill” and maintains a four-layer knowledge graph inside your project. As you code, commit, and review, it extracts maxims, decisions, facts, and workflows into linked notes that the agent can query on demand instead of re-reading the entire project context every time. Think of it as a structured, auto-updating long-term memory for agent-assisted development.
The interesting bit
Rather than dumping a static markdown file into the context window, Pensieve builds a directed graph with semantic links—based-on, leads-to, related—so the agent can follow chains of reasoning from a high-level maxim down to a specific module boundary. The “Linus prompt” gimmick has evolved into executable pipelines that enforce code taste during commit and review.
Key highlights
- Four-layer model: MUST (cross-project maxims), WANT (project-specific decisions), HOW (workflows/pipelines), and IS (verifiable facts).
- Auto-accumulation via hooks in Claude Code or manual
self-improvein other clients; conclusions from edits and reviews flow back into the graph. - On-demand routing pulls only relevant knowledge instead of injecting full-text, saving tokens.
- Ships with built-in “good taste” principles and review pipelines inspired by Linus Torvalds-style engineering conservatism.
- Global system install shared across projects; per-project data lives in
.pensieve/.
Caveats
- Claude Code gets first-class treatment (auto-sync hooks); Cursor and other agents require manually running
self-improve. - The README already includes v2 migration scripts and legacy-path cleanup, suggesting the project is still settling its architecture.
- Under the hood, it is largely a markdown convention wired together with bash scripts; the graph intelligence depends on consistent use of trigger phrases and
self-improve.
Verdict
Worth trying if you live in Claude Code and are tired of re-explaining architecture every session. If your project fits comfortably inside a static CLAUDE.md, this is probably overkill.
Frequently asked
- What is kingkongshot/Pensieve?
- Pensieve replaces static agent briefings with a self-growing knowledge graph that remembers conventions, decisions, and facts across sessions.
- Is Pensieve open source?
- Yes — kingkongshot/Pensieve is open source, released under the MIT license.
- What language is Pensieve written in?
- kingkongshot/Pensieve is primarily written in Shell.
- How popular is Pensieve?
- kingkongshot/Pensieve has 2.5k stars on GitHub.
- Where can I find Pensieve?
- kingkongshot/Pensieve is on GitHub at https://github.com/kingkongshot/Pensieve.