Coming soon
Your sessions become knowledge.
pks-brain
Turn Claude Code sessions into a searchable graph, wiki, ADRs, and commit reasons you own.

You built all of it — and your history sits there rotting.
Every time you code with an agent, a perfect log grows: every prompt you wrote, every tool it called, every file it touched. It sits as JSONL on your disk and is never read again. So when someone asks “why does this file look like this?”, or you need to write a commit message, or the project is missing the wiki and ADRs real projects have — you start over, from memory, as if those three months of work were never saved. They were. We turned the log into a graph you can query — and let it write the artefacts itself.
Every session is already saved as JSONL — and never read again.
“Why does this file look like this?” no one can answer, though the answer is in a prompt you wrote yourself.
The wiki, ADRs, and commit messages with real reasons go unwritten — so vibe-code never becomes a real project.
Five phases. Re-run only the one you need.
Ingest — the deterministic dump
`pks brain ingest` dumps every session JSONL into compact firehose files: prompts, tools, files, errors. 100% deterministic, runs in 1-2 seconds, spends zero tokens, and recomputes for free any time.
Extract — one AI summary per session
`pks brain extract` writes a markdown summary per session, driven by an editable brain-extract skill. The interpretation is yours to shape — and kept separate from the deterministic truth.
Synth & wiki — themes become pages
`pks brain synth` clusters sessions thematically across projects; `pks brain wiki` writes one wiki page per cluster. Automatic wiki generation out of work you've already done.
ADR & refresh — distill and chain it
`pks brain adr` distills architectural clusters into ADRs. `pks brain refresh` chains all five phases; otherwise you just re-run the one phase that needs it. Each phase is its own command and its own checkpoint.
See it run
# Harvest every session that's already on disk.❯ pks brain ingestscanned 312 sessions in ~/.claude/projects/ prompts.jsonl 6,984 tools.jsonl 88,102 files.jsonl 46,217 errors.jsonl 431ingest complete in 1.7s — 0 tokens spent❯ pks brain extractwrote 2,940 session extracts -> .pks/brain/extracts/❯ pks brain synth && pks brain wiki && pks brain adrclustered 19 themes -> 19 wiki pages, 6 ADRsbrain refreshed — your history is now queryable.Deterministic dump first (free, zero tokens), then the AI layer on top — all plain files in .pks/brain/.
What it does

Deterministic firehose, zero tokens
`ingest` dumps every session into prompts, tools, files, and errors files in 1-2 seconds without spending a single token — and recomputes for free whenever you want.

A graph, not a log
Four node types — Session, Prompt, ToolCall, File — and edges like drove and wrote/edited/read. The firehoses share sessionId and timestamp, so joins are free.

Automatic wiki and ADRs
`synth` clusters themes across projects; `wiki` writes one page per cluster and `adr` distills the architectural ones into decision records — the artefacts real projects have, without you writing them.

Commits that explain why
`commit-plan` groups your working-tree changes into commits with real reasons — pulled from the actual prompts that drove each edit. The message explains why, not just what.

Search your whole history
`search` makes the whole history searchable: point at a file and find the prompt that drove the change, and why. It can also surface your recurring bad habits and coach you on them.

Two scopes, plain files
A user-wide firehose at ~/.pks-cli/brain/ is the cross-project engine room; ./.pks/brain/ in each repo holds the wiki, ADRs, and specs for that project. No database, no graph engine, no SaaS.
Truth and interpretation are kept apart on purpose. The deterministic core re-runs for free and spends zero tokens; the AI layer is interpretation on top — never mixed into what is simply true.
It's JSONL and markdown, all the way down. No database, no graph engine, no managed control plane, no SaaS — just files on your disk you can read, move, and own.
It harvests what you already have. Your sessions are already there; pks-brain pulls a fortune of knowledge out of them without you changing a single workflow.
Start vibe, go pro. Vibe-code freely — the brain quietly converges your chaos into the wiki, ADRs, and commit reasons, so a play project grows imperceptibly into a real one.
Composes with
Every session you've already run — now as knowledge.
Every Claude Code session already sits as JSONL in ~/.claude/projects/ and is never read again. pks-brain harvests it: one real repo yielded ~7,000 prompts, 88,000 tool calls, and 46,000 file operations. A deterministic core that spends zero tokens and re-runs for free — and an AI layer that turns it into the wiki, ADRs, and commit messages with real reasons. Start vibe, go pro.