Skip to content

Releases: ErebusEnigma/context-memory

v1.3.1

17 Feb 18:06

Choose a tag to compare

Fixed

  • install.py: generalized hook installation to loop over all hook types (Stop, PreCompact, etc.) instead of hardcoding Stop-only
  • uninstall.py: generalized hook removal to iterate all hook type keys, not just Stop
  • _hook_matches() in both install/uninstall: now recognizes pre_compact_save.py alongside auto_save.py and db_save.py
  • tests/test_dashboard.py: added pytest.importorskip("flask_cors") guard to prevent import errors when flask-cors is not installed
  • save_summary(): made brief optional for updates (COALESCE preserves existing value); still required for new summaries (raises ValueError). Fixes dashboard PUT crash when updating a single summary field without brief.
  • dashboard.py: api_delete_session() now cleans up context_checkpoints (linked by TEXT session_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/ to skills/context-memory/scripts/
  • README: updated test count from 351 to 364
  • recall.md: added missing --format flag to argument-hint and options list
  • schema-reference.md: added PRAGMA foreign_keys=ON to documented PRAGMA settings
  • db_search.py: fixed stale search_tier1() docstring to include code_snippets_fts
  • db_save.py: fixed save_messages() sequence collision when appending (replace=False) — now queries MAX(sequence) to continue numbering instead of restarting at 0
  • db_search.py: fixed search_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 delete
  • test_db_save.py: added tests for save_summary update-without-brief and insert-without-brief-raises
  • Extracted shared read_hook_input() and extract_text_content(content, max_length=None) to db_utils.py, replacing duplicate implementations in auto_save.py and pre_compact_save.py
  • __init__.py: added exports for save_checkpoint, prune_checkpoints, read_hook_input, and extract_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: added context_checkpoints table 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

17 Feb 11:27

Choose a tag to compare

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:

  1. PreCompact hook (pre_compact_save.py) — captures all messages without truncation or sampling
  2. Compact instructions in CLAUDE.md — guides the summarizer on what to preserve
  3. context_load_checkpoint MCP tool — on-demand retrieval by session ID or project path

Also included

  • Schema v4: context_checkpoints table 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

17 Feb 05:25

Choose a tag to compare

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_dashboard MCP 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_dashboard MCP tool in mcp_server.py to 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

  • .gitignore expanded 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_dashboard MCP 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

16 Feb 13:09

Choose a tag to compare

Highlights

  • MCP server — new mcp_server.py exposes context_search, context_save, context_stats, and context_init tools 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--force uninstall 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.json project-level config
  • install_mcp() / uninstall_mcp() for automatic MCP server registration
  • --force uninstall flag for modified command files
  • Auto-save: read_hook_input(), parse_transcript(), build_brief() functions
  • Loop prevention via stop_hook_active flag
  • 72 new tests (auto-save 26, MCP server 19, install 16, uninstall 11)

Fixed

  • Recursive sessions_updated trigger (schema migration v3)
  • N+1 queries in search_tier1 and search_tier2 — replaced with batch WHERE IN
  • save_topics() miscounting inserted topics
  • save_messages() incorrect message_count when appending
  • Missing encoding='utf-8' on file open
  • verify_schema() crash on missing database
  • Silent except Exception: pass replaced with traceback.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 to claude 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 against VALID_TABLES
  • Added mcp to CI dependencies

Full Changelog: v1.0.7...v1.1.0

v1.0.9

15 Feb 14:23

Choose a tag to compare

Fixed

  • Windows: stop hook failed because cmd.exe does 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

15 Feb 13:01

Choose a tag to compare

Fixed

  • Stop hook now works on Windows (CMD, PowerShell) — replaced Bash one-liner with cross-platform auto_save.py Python wrapper

Changed

  • hooks/hooks.json command simplified to python ~/.claude/skills/context-memory/scripts/auto_save.py
  • _hook_matches() in install.py and uninstall.py now 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 wrapper
  • tests/test_auto_save.py — tests for the new wrapper script

v1.0.7

15 Feb 10:44

Choose a tag to compare

Fixed

  • Windows: backslash paths in project_path no longer cause json.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 requirements
  • normalize_project_path() in db_utils.py for cross-platform path storage

Changed

  • SKILL.md and remember.md now use --json - heredoc pipe instead of temp files
  • save_session() normalizes project_path before storage

v1.0.6

13 Feb 19:44

Choose a tag to compare

What's New

Features

  • Schema versioningschema_version table with migration system. Legacy databases (v1) auto-migrate on first save.
  • Session deduplicationshould_skip_auto_save() prevents redundant auto-saves when /remember was used recently. New --auto and --dedup-window CLI flags.
  • DB pruning — New db_prune.py for database maintenance: prune by age (--max-age), count (--max-sessions), or both. Includes --dry-run preview and FTS index rebuild.
  • Improved stop hook — Captures project name in brief and git branch as topic. Uses --auto flag for deduplication.
  • CONTEXT_MEMORY_DB_PATH — Environment variable override for custom DB location.

Bug Fixes

  • /remember now saves complete data — Uses --json path to save all fields (detailed summary, decisions, messages, code snippets). Previously only saved brief + topics, leaving --detailed recall empty.
  • --json no longer requires --session-id — The --json flag now works standalone as documented; session_id is read from the JSON payload.
  • Installer no longer leaves orphaned clone — Clones to CWD instead of ~/.claude/plugins/. Copies uninstall.py to ~/.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.py

Existing 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

13 Feb 19:10

Choose a tag to compare

Added

  • install.py for one-command setup (copies skill, commands, hooks, inits DB)
  • uninstall.py for 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.json uses 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.py

v1.0.4

13 Feb 19:11

Choose a tag to compare

Fixed

  • db_init.py --verify no longer crashes on fresh install when database doesn't exist
  • get_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 --verify and --stats on missing database