| name | distill |
| description | Distill knowledge from the current conversation or working session into a napkin vault as permanent, structured notes. Use when the user says "save this", "distill this", "remember this", "capture this conversation", or at the end of a session where something non-obvious was figured out. Extracts the substance — decisions, fixes, gotchas, patterns — not a transcript. Requires the napkin CLI (`npm install -g napkin-ai`; run `napkin --help` for the command surface).
|
Distill — Conversation to Vault
You are preserving knowledge from this session into a napkin vault. Write the
knowledge itself, not a record of the conversation.
Every judgment below is anchored to a napkin command. Use --json for all
programmatic calls.
Step 0: Gate — is there anything worth keeping?
KEEP (proceed) if any are true:
- A fix or workaround was found through investigation
- Non-obvious library/API/tool behavior was confirmed (edge case, undocumented
constraint, a gotcha that cost real time)
- A decision was made, with reasons
- A reusable pattern or procedure emerged
SKIP (say "nothing worth distilling" and stop) if all are true: the session
was pure Q&A/planning/explanation, nothing surprising happened, and everything
discussed is obvious from the docs.
When invoked automatically (hook, timer), err toward SKIP. When the user asked
for it, err toward KEEP — they called it for a reason.
Step 1: Extract
Apply the 3-month test: what from this session would be valuable in 3 months
with no memory of this chat?
- Cluster by topic, not by chronology. Twenty messages about one bug is one
note. A session spanning three topics is at most three notes.
- Keep: decisions and their why, root causes, confirmed behaviors, procedures,
mental models that took effort to reach.
- Drop: pleasantries, exploration that reached no conclusion, raw code dumps
(unless the code the reusable pattern), anything already in the vault.