Memory
The knowledge vault — recall, session capture, vault structure, pruning, and scratch notes.
3 commands · 8 skills · 1 hook · 5 tools
The knowledge vault: what agents learned in earlier sessions, kept where the next session can find it.
What it does
- Recall —
search-memorylooks up past decisions, learnings and gotchas before a problem is solved again. - Capture —
remember-sessionpromotes what a session learned into the vault and routes each entry by kind;commit-memoriespublishes the captured notes as a standing pull request in the project that owns them, and drains the notes an earlier session left unpublished (memory-residuenames them). - Structure —
memory-managementdefines the vault layout and routing rules;create-todocaptures an ad-hoc TODO as a work item underwork/todo/;prune-memories(skill and command) keeps it from going stale;reconcile-workaligns the work-folder states (todo→active→archive), takes down landed worktrees and their local branches, and deletes the session’sthinking/scratch files at wrap-up;thinkingprovides those scratch files for work in progress. - Staying current — a
file.editedhook reindexes the vault as it changes, so a search never misses a note written moments ago.
Session capture
The remember-session skill captures what was learned during a session and routes it to the knowledge vault — so the next session starts smarter.
- Finish flow: the primary agent runs
remember-sessiononce when the work is confirmed finished, before[FINISHED]; the captured notes are then committed and published throughcommit-memories - Publishing:
commit-memoriesgroups the notes by the repository and stream that own them — the project’s vault in the project’s repository underchore(agents): commit memories and lessons learned, global lessons in the dev-bot store underchore(global-memories): commit global memories and lessons learned— and opens or appends each standing pull request without asking - Learning routing: findings are categorized —
- Product decisions →
memory/latent/PDRs/ - Architecture decisions →
memory/latent/ADRs/ - Gotchas →
memory/latent/global/<tech>/ormemory/latent/learnings/
- Product decisions →
- Watermark tracking: only new learnings since the last capture are processed
Say “wrap up”, “remember session”, or “capture session” to trigger it manually.
Polyrepo sessions
A project with workspace.type: "polyrepo" runs sessions across the managed projects
registered in .devbot.global.jsonc::projects. Memory is scoped by the files
the session touches: search-memories --focus <path> searches the touched
projects’ vaults + the polyrepo’s vault + the shared global store + any
configured custom collection, and a finding routes back to the project it
concerns. Only each child’s own
commit_memory gates its vault notes; commit-memories publishes them from a
temporary worktree as that child’s standing memory pull request, while global
lessons go to the dev-bot store’s repository (see devbot:commit-memories). A
session launched inside a child is unchanged — it searches the child + global,
never the polyrepo.
Collections
search-memories and reindex-memories cover the project latent corpus, the
shared global store, and any custom collection configured under
memory_collections (project or global config). Each entry is a name mapped to
a path and a semantic flag; the flag is reserved — both engines are
keyword-only today. See Configuration for
the shape, precedence, and placeholders.
Contents
| Type | Name | Purpose |
|---|---|---|
| Command | audit-memory |
Audit the memory vault — check folder placement, latent note quality, thinking/ hygiene, and issue folder consistency |
| Command | prune-memories |
Prune the memory vault — remove stale entries, merge complementary notes, rewrite incomplete ones |
| Command | remember-session |
Remember any worthwhile learnings from this session |
| Skill | commit-memories |
Use at wrap-up to publish the session’s captured memories and global lessons. Triggers on ‘commit the memories’, ‘publish the session memories’. |
| Skill | create-todo |
Use when the user asks to create a TODO or capture an unplanned task for later. Triggers on ‘create a TODO’, ‘add a TODO’, ‘note this for later’, ‘add this to the backlog’. |
| Skill | memory-management |
Use when deciding where to save knowledge, formatting a memory entry, or auditing the vault. |
| Skill | prune-memories |
Use when the memory vault has grown noisy or after a major milestone. Triggers on ‘prune memories’. |
| Skill | reconcile-work |
Use when wrapping up to reconcile the artifacts a session touched — work folders, worktrees and thinking files — the finish flow’s housekeeping step, after devbot:remember-session and devbot:grade-tools, ahead of devbot:improve-reviewing when the session ran a code review loop. Triggers on ‘wrap up’, ‘wrapping up’, ‘let’s wrap’, ‘tidy the work folders’, ‘clean up my scratch notes’. |
| Skill | remember-session |
Use when a session ends or the user asks to capture it. Triggers on ‘wrap up’, ‘remember this session’, ‘let’s wrap’. |
| Skill | search-memory |
Use when you need to recall past decisions, learnings, or solutions before solving a problem. |
| Skill | thinking |
Use when creating temporary files, drafts, or WIP notes. Triggers on ‘scratch file’, ‘temp file’, ‘draft’, ‘WIP’. |
| Hook | reindex-memories |
file.edited |
| Tool | generate-mcp-guide |
— |
| Tool | memory-residue |
Report the memory notes a checkout holds unpublished, pending or landed — classify every dirty vault path against HEAD, the default branch and the open memories pull requests |
| Tool | reindex-memories |
Rebuild the memory index in the background (fire-and-forget) for every configured collection (project vault, global store, and memory_collections customs) using the configured memory-search engine (qmd: cleanup && update, BM25-only; mdctx: incremental build of each index). Coalesces concurrent runs via a pidfile. Pass ‘status’ to check whether a reindex is running without launching one, or ‘prune’ to run the incremental rebuild that drops deleted-note entries (same background build as the default; verify completion with ‘status’). |
| Tool | reindex-passive-memories |
— |
| Tool | search-memories |
Search the memory vault and return bounded snippets (path, title, score and the relevant excerpt); pass –full for complete bodies. Fast keyword (BM25) search across memories indexed by the configured engine (qmd or mdctx) — no GPU or LLM models required. Branch-aware: refreshes the index first when it was built for a different git branch or checkout. |
Configuration
The vault is published on the owning project’s memory pull request when
commit_memory is true (the default is false) in the devbot config. Search engine choice —
mdctx (keyword) or qmd (BM25 keyword) — is set by memory_search_provider in
.devbot.global.jsonc; the searched corpora are listed under memory_collections.
See also
- Polyrepo sessions — how this module scopes itself to the owning project
- QMD — the BM25 vault search engine
- mdctx — the keyword vault search engine
- Configuration —
memory_search_provider,memory_collections, andcommit_memory