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

  1. Work normally. Sessions accumulate through save_session, threads, and (optionally) full transcripts.
  2. Ask any connected agent: "distill a playbook from the <thread> thread". The distill_playbook tool runs your sessions through the models configured under consult.providers: a local Ollama model means nothing leaves your machine; a cloud key is your explicit choice.
  3. 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.
  4. Reuse anywhere: playbooks appear in the ctxfile ui dashboard 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

ToolWhat it does
distill_playbookAnalyze a thread (or the most recent sessions) and store candidate playbooks
list_playbooksTitles, ids, and provenance
get_playbookOne playbook's full prompt
rm_playbookDelete an entry permanently

Honest edges