quintessence
Everything not saved will be lost.
A session-continuity store for AI coding agents: plain-Markdown working memory for the
threads your agent is actually thinking through.
Why this exists
A session dies mid-thread: a half-made decision, an open question. The next session
starts cold, spends its first minutes re-deriving, and sometimes settles on a different
decision than the one already made.
The two standard places to persist context don't hold this. AGENTS.md – CLAUDE.md in
Claude Code – is standing instructions: how to behave, always. Memory files are atomic
facts: small, stable, one per file. What gets lost is the reasoning thread: what was
decided and why, what was ruled out, what is still open. Quintessence is where that goes.
One Markdown file per topic (a HEAD): the topic's essence, dated update-lines (newest
first), and an explicit re-entry point. Resuming is one command, and it hands back the
decisions, the dead ends and the open loops rather than a summary of them:
qq brief auth-refactor # resume: essence + newest updates + RE-ENTER point
# ... work happens ...
qq update auth-refactor "chose keyed framing over TLVs — parser stays 40 lines; next: MTU probe"
qq finalize auth-refactor # snapshot the thread to the append-only journal
On top of that:
qq search and qq ask find prior decisions by meaning, and a hook surfaces a matching
thread when a new prompt looks like old work.
- Consistency checks (
qq check plus a staleness cross-reference) raise notes that have
drifted out of sync with each other. A recalled note is a point-in-time snapshot, not
ground truth, and the checks say so.
- Write-time reality binding. A note that names a file, commit, port, or systemd unit
gets that referent fingerprinted on the spot: a claim about something that doesn't exist
warns immediately ("born stale"), and the recorded refs give the staleness checks
something concrete to compare against later. Binding never blocks or alters a write;
QQ_BIND=0 switches it off.
- A locked, merge-safe write path, so several agent sessions can share one store without
clobbering each other.
Constraints: everything is plain Markdown in a git repo you own, greppable and diffable,
readable by anything that reads text. The core engine is stdlib-only Python plus bash;
there is nothing to pip-install (numpy, where it is installed, makes qq search fast and is
not required; the optional MCP servers, qq-search-mcp/qq-remote-mcp, run via uv and pull in
the mcp package, plus uvicorn for the remote one). Everything
degrades rather than stopping: no embedder means keyword search, not silence. Nothing
phones home; the store lives wherever you point it. (The name is the old word for the
fifth essence, the substance that persists when everything else changes.)
Status: alpha, Linux-first. Runs my own sessions daily; ASSURANCE.md
records what is checked and what deliberately is not; CI installs it from scratch into a
fresh $HOME on every push. macOS is untested: the shell hook glue assumes util-linux
flock and GNU readlink -f. Your notes stay in the directory you point the store at.
Dependencies
All of them, in one place:
| binary (package) | without it |
|---|
| the store (required) | bash (bash) · git (git) · jq (jq) · python3 (python3; stdlib only, nothing to pip-install) · flock (util-linux – the reason for "Linux-first") | doesn't run |
semantic recall – qq search + the recall hooks | Ollama with an embedding model pulled (default qwen3-embedding:0.6b); vectors only, nothing generative | keyword search, and it says so |
| fast semantic recall (optional) | numpy (python3-numpy), for the python3 that runs qq | qq search ranks the same, several times slower |
cited answers – qq ask | additionally, a local chat-capable completion endpoint (QQ_ASK_ENDPOINTS, see CONFIG.md) | raw retrieval hits, with a hint |
| binding (optional) + test suite | ss (iproute2) | port-referent fingerprinting degrades quietly (never blocks a write); one test suite fails noisily |
qq doctor reports the state of all of it.
Getting started
From a clone:
bash setup.sh # symlink the CLIs into ~/.local/bin, create a store, write the config,
# run the doctor + test suite — idempotent, nothing destructive
qq menu # empty menu on a fresh store
Or by hand. qq has to be on your PATH first – setup.sh symlinks it into
~/.local/bin, or call it by its full path out of the clone: