Releases: ErebusEnigma/context-memory
Releases · ErebusEnigma/context-memory
v1.3.1
Fixed
install.py: generalized hook installation to loop over all hook types (Stop, PreCompact, etc.) instead of hardcoding Stop-onlyuninstall.py: generalized hook removal to iterate all hook type keys, not just Stop_hook_matches()in both install/uninstall: now recognizespre_compact_save.pyalongsideauto_save.pyanddb_save.pytests/test_dashboard.py: addedpytest.importorskip("flask_cors")guard to prevent import errors when flask-cors is not installedsave_summary(): madebriefoptional for updates (COALESCE preserves existing value); still required for new summaries (raises ValueError). Fixes dashboard PUT crash when updating a single summary field withoutbrief.dashboard.py:api_delete_session()now cleans upcontext_checkpoints(linked by TEXTsession_id) alongside the FK child tables. Previously, deleting a session via the dashboard left orphaned checkpoint rows.- README: corrected dedup mechanism description (brief pattern check, not detailed summary null check)
- README: removed
pip install context-memory[dashboard](package not published to PyPI) - README: fixed CLI Tools paths from
scripts/toskills/context-memory/scripts/ - README: updated test count from 351 to 364
recall.md: added missing--formatflag to argument-hint and options listschema-reference.md: addedPRAGMA foreign_keys=ONto documented PRAGMA settingsdb_search.py: fixed stalesearch_tier1()docstring to includecode_snippets_ftsdb_save.py: fixedsave_messages()sequence collision when appending (replace=False) — now queriesMAX(sequence)to continue numbering instead of restarting at 0db_search.py: fixedsearch_tier1()cross-table BM25 score contamination — topic/snippet BM25 scores are no longer mixed with summary scores. Summary BM25 is now the sole ranking signal with a fixed boost per additional matching source. Non-summary matches are bucketed separately after summary matches.
Changed
test_dashboard.py: added regression tests for partial summary updates (outcome/user_note without brief) and checkpoint cleanup on session deletetest_db_save.py: added tests for save_summary update-without-brief and insert-without-brief-raises- Extracted shared
read_hook_input()andextract_text_content(content, max_length=None)todb_utils.py, replacing duplicate implementations inauto_save.pyandpre_compact_save.py __init__.py: added exports forsave_checkpoint,prune_checkpoints,read_hook_input, andextract_text_content- Comprehensive README rewrite: added Architecture section, CI/test badges, CLI Tools section, Testing section; expanded Features, Installation, How It Works, and Web Dashboard sections to match actual codebase capabilities
schema-reference.md: addedcontext_checkpointstable documentation, Schema Migrations section, and checkpoint cleanup note- Updated tier 1 search descriptions in README, SKILL.md, CLAUDE.md, schema-reference.md, mcp_server.py, and db_init.py to reflect summary-ranked multi-source boost behavior
Full Changelog: v1.3.0...v1.3.1
v1.3.0: Pre-compact context checkpoints
What's New
Pre-compact context checkpoints
Saves the full conversation transcript to the database before context compaction occurs, enabling seamless recovery of lost detail. Uses a three-layer approach:
- PreCompact hook (
pre_compact_save.py) — captures all messages without truncation or sampling - Compact instructions in CLAUDE.md — guides the summarizer on what to preserve
context_load_checkpointMCP tool — on-demand retrieval by session ID or project path
Also included
- Schema v4:
context_checkpointstable with session/project indexes - Checkpoint pruning in
db_prune.py(per-session and age-based) - 50 comprehensive dashboard API tests covering all 17 REST endpoints
- 37 new tests for the pre-compact checkpoint system
- 351 total tests passing
Full Changelog: https://github.com/ErebusEnigma/context-memory/blob/main/CHANGELOG.md#130---2026-02-17
v1.2.0: Web dashboard, expanded test coverage
Highlights
- Web dashboard — new Flask-based single-page app for browsing, searching, managing, and analyzing stored sessions with a REST API, interactive charts, and dark/light theme
context_dashboardMCP tool — launch the dashboard directly from any MCP-compatible client- 73 new tests covering high and medium priority gaps across install, uninstall, search, save, init, utils, and auto-save modules
What's Changed
Added
dashboard.py— Flask REST API + SPA with 17 endpoints:- Sessions CRUD with pagination, project filtering, and sorting
- Full-text search with topic/technology hint chips
- Analytics: timeline, topic frequency, project distribution, outcome breakdown, technology usage
- Database management: init, prune (with dry-run preview), export as JSON
- Frontend SPA (
static/) with hash-based routing, Chart.js analytics, Highlight.js code highlighting, session editing, and responsive dark/light theme context_dashboardMCP tool inmcp_server.pyto launch the dashboard in a background thread- 73 new tests covering install/uninstall flows, search tiers (code snippets, project filtering, markdown formatting, malformed JSON), save edge cases, init migrations, utils, and auto-save
Changed
.gitignoreexpanded with build artifacts, SQLite journal files, coverage variants, test framework caches, and log files- Version bumped to 1.2.0 across
pyproject.toml,plugin.json,SKILL.md, and__init__.py - README: added Web Dashboard section, dashboard requirement,
context_dashboardMCP tool - CHANGELOG: added v1.2.0 entry
- CONTRIBUTING: added dashboard dev setup and run instructions
Requirements
- Dashboard requires
pip install flask flask-cors(optional — core plugin remains zero-dependency Python 3.8+)
v1.1.0: MCP server, auto-save transcript parsing, bug fixes
Highlights
- MCP server — new
mcp_server.pyexposescontext_search,context_save,context_stats, andcontext_inittools via FastMCP stdio transport (requires Python >= 3.10) - Auto-save transcript parsing — stop hook now reads Claude Code's stdin JSON payload and parses JSONL transcripts for rich session data
- 14 bug fixes — recursive trigger, N+1 queries, dead code, Windows path issues, and more
- Cross-platform stop hook — works on Windows CMD/PowerShell and Unix shells
- Install/uninstall improvements —
--forceuninstall flag, automatic MCP server registration - 72 new tests across auto-save, MCP server, install, and uninstall modules
What's Changed
Added
- MCP server with
.mcp.jsonproject-level config install_mcp()/uninstall_mcp()for automatic MCP server registration--forceuninstall flag for modified command files- Auto-save:
read_hook_input(),parse_transcript(),build_brief()functions - Loop prevention via
stop_hook_activeflag - 72 new tests (auto-save 26, MCP server 19, install 16, uninstall 11)
Fixed
- Recursive
sessions_updatedtrigger (schema migration v3) - N+1 queries in
search_tier1andsearch_tier2— replaced with batchWHERE IN save_topics()miscounting inserted topicssave_messages()incorrectmessage_countwhen appending- Missing
encoding='utf-8'on file open verify_schema()crash on missing database- Silent
except Exception: passreplaced withtraceback.print_exc() - Test environment variable leak
- Windows
~expansion in stop hook paths - Hook matching backslash normalization on Windows
install_mcp()writes directly instead of shelling out toclaude mcp add
Changed
- Auto-save reads real stdin payload instead of generating synthetic IDs
- Auto-save parses JSONL transcript (head+tail sampling for large sessions)
- Removed dead
escape_fts_query()function - Removed redundant FTS index rebuild after pruning
get_stats()validates table names againstVALID_TABLES- Added
mcpto CI dependencies
Full Changelog: v1.0.7...v1.1.0
v1.0.9
Fixed
- Windows: stop hook failed because
cmd.exedoes not expand~in paths — installer now resolves~to the full home directory at install time on Windows
Changed
install.py:install_hooks()now updates outdated hooks in-place (supports upgrades from v1.0.8)install.py: added_platform_hook_command()helper for platform-specific path expansion
Added
tests/test_install.py— tests for hook path expansion and upgrade logic
v1.0.8
Fixed
- Stop hook now works on Windows (CMD, PowerShell) — replaced Bash one-liner with cross-platform
auto_save.pyPython wrapper
Changed
hooks/hooks.jsoncommand simplified topython ~/.claude/skills/context-memory/scripts/auto_save.py_hook_matches()ininstall.pyanduninstall.pynow detects both old (db_save.py) and new (auto_save.py) hook formats- README: removed Windows shell warning, noted cross-platform hook support
Added
skills/context-memory/scripts/auto_save.py— cross-platform stop hook wrappertests/test_auto_save.py— tests for the new wrapper script
v1.0.7
Fixed
- Windows: backslash paths in
project_pathno longer causejson.JSONDecodeError(normalized to forward slashes) - Write tool pre-read requirement no longer blocks saves:
--json -reads from stdin
Added
--json -reads JSON from stdin, eliminating temp file requirementsnormalize_project_path()indb_utils.pyfor cross-platform path storage
Changed
- SKILL.md and remember.md now use
--json -heredoc pipe instead of temp files save_session()normalizesproject_pathbefore storage
v1.0.6
What's New
Features
- Schema versioning —
schema_versiontable with migration system. Legacy databases (v1) auto-migrate on first save. - Session deduplication —
should_skip_auto_save()prevents redundant auto-saves when/rememberwas used recently. New--autoand--dedup-windowCLI flags. - DB pruning — New
db_prune.pyfor database maintenance: prune by age (--max-age), count (--max-sessions), or both. Includes--dry-runpreview and FTS index rebuild. - Improved stop hook — Captures project name in brief and git branch as topic. Uses
--autoflag for deduplication. CONTEXT_MEMORY_DB_PATH— Environment variable override for custom DB location.
Bug Fixes
/remembernow saves complete data — Uses--jsonpath to save all fields (detailed summary, decisions, messages, code snippets). Previously only saved brief + topics, leaving--detailedrecall empty.--jsonno longer requires--session-id— The--jsonflag now works standalone as documented;session_idis read from the JSON payload.- Installer no longer leaves orphaned clone — Clones to CWD instead of
~/.claude/plugins/. Copiesuninstall.pyto~/.claude/context-memory/so it survives clone deletion. - Uninstaller works standalone — No longer requires the original clone directory.
Upgrade
git clone https://github.com/ErebusEnigma/context-memory.git
cd context-memory
python install.pyExisting databases are automatically migrated. No manual steps needed.
Stats
- 94 tests passing (54 existing + 40 new)
- 20 files changed, 1098 insertions
Full Changelog: https://github.com/ErebusEnigma/context-memory/blob/main/CHANGELOG.md
v1.0.5
Added
install.pyfor one-command setup (copies skill, commands, hooks, inits DB)uninstall.pyfor clean removal- Negative triggers in SKILL.md to prevent over-activation
- Error handling instructions in SKILL.md
- Helpful first-use message when searching an empty database
Fixed
hooks/hooks.jsonuses correct nested matcher-group format for settings.json- SKILL.md frontmatter expanded to match Claude Code skill guide spec
- Script paths in SKILL.md and commands updated from plugins/ to skills/ directory
Changed
- SKILL.md restructured for progressive disclosure (lean body, details in references/)
- README simplified: install.py replaces manual post-install steps
Install
git clone https://github.com/ErebusEnigma/context-memory.git ~/.claude/plugins/context-memory
python ~/.claude/plugins/context-memory/install.pyv1.0.4
Fixed
db_init.py --verifyno longer crashes on fresh install when database doesn't existget_stats()returns empty dict instead of crashing when database is missing
Added
- Post-install setup instructions in README (DB init, hook registration, verify)
- Hook upgrade guide in README for users with older stop hook versions
- Tests for
--verifyand--statson missing database