feat: scratchpad support for resumable analyses (#58)#66
Open
marknutter wants to merge 2 commits intomainfrom
Open
feat: scratchpad support for resumable analyses (#58)#66marknutter wants to merge 2 commits intomainfrom
marknutter wants to merge 2 commits intomainfrom
Conversation
Implements short-lived working memory for in-progress RLM analyses, based on the "Everything is Context" paper's scratchpad concept. - Add `scratchpad` SQLite table to the existing memory DB with TTL support - New `rlm/scratchpad.py` module: save, get, list, clear, promote - CLI: `rlm scratchpad save|list|get|clear|promote` subcommands - Auto-expire entries after configurable TTL (default 24h) - `promote` graduates scratchpad entries to long-term memory via existing memory pipeline, merging tags and removing from scratchpad - 5 new MCP tools: rlm_scratchpad_save, _list, _get, _clear, _promote Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
26 tests covering db CRUD, high-level scratchpad API (save/get/list/clear/promote), TTL expiry logic, tag round-trips, promote-to-long-term-memory, and CLI formatting. Total test count: 157 (was 131). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Owner
Author
|
Added 26 scratchpad tests in
Total test count is now 157 (was 131). All passing. 🧱 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scratchpadSQLite table (in the existing memory DB) with TTL-based auto-expiry for short-lived working memoryrlm/scratchpad.pymodule withsave,get,list_entries,clear,delete, andpromoteoperationsrlm scratchpad save|list|get|clear|promotewith configurable--ttl,--tags,--label,--sessionrlm scratchpad promote <id>graduates a scratchpad entry into long-term memory via the existing pipeline, merging tags and removing from scratchpadrlm_scratchpad_save,rlm_scratchpad_list,rlm_scratchpad_get,rlm_scratchpad_clear,rlm_scratchpad_promoteCloses #58
Test plan
uv run rlm scratchpad save "content" --label "test" --tags "foo" --ttl 2creates an entryuv run rlm scratchpad listshows active entries with expiry timeuv run rlm scratchpad get <id>returns full contentuv run rlm scratchpad promote <id> --tags "extra"moves entry to long-term memoryuv run rlm scratchpad clear/--expiredremoves entries🤖 Generated with Claude Code