Working memory for AI agents: digest-indexed episodes on a git shelf, recalled a section at a time.
Strong schema definitions with comprehensive parameter documentation. All 14 tools have clear descriptions (avg 150+ chars) and detailed input schemas with types and descriptions. Tool naming follows verb_noun pattern (memshelf_shelve, memshelf_recall, etc.). Key strengths: enum constraints on kind/mode, detailed parameter descriptions with context. Weaknesses: output schemas not documented in source; no error handling guidance visible; some parameter relationships underdocumented (e.g., approx_tokens vs approx_tokens_source contradiction handling); no confirmation pattern for destructive ops (purge, rollup).
Context advisor: which episodes fit in the window, and how much room is left.
Integrity check: scan the shelf for corruption, stale derived files, and other issues.
Import episodes from external sources into the shelf.
Return the shelf INDEX — the small recall entry point. Read it before answering anything about past work, then recall only what you need.
Bootstrap a new memory shelf at the given path.
Check a digest against the contract while it is still being written — the same validator `memshelf_shelve` runs, writing nothing. `strict` turns warnings into failures.
Output schemas not documented in source code. LLMs cannot plan downstream tool calls or extract required fields without knowing response structure.
Destructive operations (memshelf_purge, memshelf_rollup) lack confirmation/dry-run pattern. Agents can irreversibly delete data without safeguards.
No error handling guidance visible in tool definitions. Error responses should tell LLMs what to do next (retry, ask user, or fail).
Parameter relationship underdocumented: approx_tokens and approx_tokens_source have a contradiction rule ('Contradiction (a source with no number) is refused') but this constraint is not stated in parameter descriptions.
Inferred effective spec: 2025-06-18+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 65 | 2025-06-18+ | v2 |
Purge episodes past their retention date.
Rebuild derived files (INDEX, ledger, etc.) from the shelf's episodes.
Fetch a shelved episode by id, or one `## Section` of it, as a data envelope. Prefer the section when it answers the question.
Resolve multi-writer conflicts: merge diverged branches and rebuild the shelf.
Archive old episodes into a rollup file.
Grep the shelf for episodes matching every query token; returns addresses and snippets. Use when the episode id is unknown.
Offload one closed topic to the shelf as a durable, indexed episode — redaction, digest contract and git commit included. Derived files are not written here — they are rendered by `memshelf_rebuild` or the shelf's bot.
Accounting: shelf size, episode count, token totals, and context advice.
Generic tool names reduce clarity: memshelf_doctor, memshelf_resolve, memshelf_rebuild could be more specific about what they repair/rebuild (e.g., memshelf_check_integrity, memshelf_merge_conflicts, memshelf_regenerate_index).