Your transcript is evidence, not policy
An old coding-agent session can contain the exact command, file, or diagnosis you need. It can also contain a workaround for a dependency that no longer exists. Retrieval solves the first problem. It does not solve the second.
Dropbox's Witchcraft repository includes a Pickbrain example that can index local sessions from several coding tools into a single SQLite-backed search system. The project says it combines semantic and keyword search, keeps the data on the device, and can return a command that resumes a matching session. We inspected the repository and its October 6 commit. We did not build or run it.
A search hit should reopen an investigation. It should not close one.
Witchcraft names XTR/WARP as its basis. The original WARP repository identifies CPU-optimized retrieval, with GPU use still recommended for index construction. SQLite's FTS5 documentation covers the other part of hybrid search: full-text queries and a rank value that can be ordered.
Memory has different jobs
Anthropic's current Claude Code documentation separates instructions that people write from notes the tool records. It says each session starts with a fresh context window. It also says instruction files and auto memory are loaded as context, not enforced configuration.
That gives us four different objects:
- Transcript. A record of what happened in one session.
- Search index. A way to find a relevant record.
- Project instruction. A reviewed rule that future sessions should see.
- Enforcement. A hook, test, sandbox, permission, or CI gate that can block the wrong action.
Do not collapse those into one bucket called memory. A command copied from a transcript is not a team rule. A team rule is not a hard control. If a correction has repeated, write the smallest durable instruction that would have prevented it. If the consequence matters, add a mechanism that can fail closed.
Use a promotion test
Before promoting a search hit, inspect its source and age. Compare it with the current tree. Then write the rule in present tense and scope it to the files or task that need it. Keep the link back to the original session or commit so another reviewer can see why the rule exists.
The bench below combines search, preview, review steps, and a copyable handoff card. It uses teaching fixtures. It does not read your history, verify your repository, or save a rule.