Playbooks: prompts distilled from what you actually did.
Every good session leaves a method behind: the order you checked things in, the traps you learned to avoid, the framing that finally worked. Normally that knowledge evaporates when the tab closes. Playbooks capture it. An AI reads your saved sessions and transcripts and distills the reusable prompt: the one you would hand a fresh assistant to redo that kind of task for a new subject. Nobody writes it by hand; the library is generated from your own work.
This is a Pro feature: it composes session capture, the encrypted store, and multi-provider consult.
How it works
- Work normally. Sessions accumulate through
save_session, threads, and (optionally) full transcripts. - Ask any connected agent: "distill a playbook from the <thread> thread". The
distill_playbooktool runs your sessions through the models configured underconsult.providers: a local Ollama model means nothing leaves your machine; a cloud key is your explicit choice. - Candidates land in the playbook library: encrypted at rest (AES-256-GCM, key in your OS keychain), provenance on every entry (which model, which sessions), redacted before write like everything ctxfile stores.
- Reuse anywhere: playbooks appear in the
ctxfile uidashboard with one-click copy, and they are also served as native MCP prompts, so clients with a prompt picker list them automatically. No copy-paste between tools.
A real example
The first playbook ever distilled came from a real session: hours of university research for a student blocked by one grade. The local model (qwen3:8b, on a laptop) produced a general "educational pathway planning with constraints" prompt that preserved every hard-won gotcha: hidden mandatory fees, conditional credit transfers, checking the department page instead of aggregators, even the required neutral tone. That method is now reusable for any student, in any chatbot, forever.
The tools
| Tool | What it does |
|---|---|
distill_playbook | Analyze a thread (or the most recent sessions) and store candidate playbooks |
list_playbooks | Titles, ids, and provenance |
get_playbook | One playbook's full prompt |
rm_playbook | Delete an entry permanently |
Honest edges
- Distillation quality tracks the model: a local 8B produces genuinely usable playbooks (that is the tested floor); frontier models via an API key produce sharper ones. You choose per
consult.providers. - Playbooks generalize what the sessions show. If the session record is thin, the playbook will be too; rich saves (decisions, gotchas, transcripts) distill best.
- The library is local and encrypted; it does not sync in this release. Distill on the machine where you want the prompts.