Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "context-memory",
"version": "1.1.0",
"version": "1.2.0",
"description": "Persistent, searchable context storage across Claude Code sessions using SQLite + FTS5",
"author": {
"name": "ErebusEnigma"
Expand Down
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@ __pycache__/
*.py[cod]
*$py.class
*.egg-info/
.eggs/
dist/
build/
*.egg
*.whl
*.tar.gz
pip-log.txt
MANIFEST

# SQLite
*.db
*.db-wal
*.db-shm
*.db-journal

# IDE
.vscode/
Expand All @@ -23,20 +29,31 @@ build/
.DS_Store
Thumbs.db
Desktop.ini
ehthumbs.db

# Testing & Coverage
.pytest_cache/
.coverage
.coverage.*
coverage.xml
htmlcov/
.tox/
.nox/
.hypothesis/

# Type checking & Linting
.mypy_cache/
.ruff_cache/

# Environment
.env
.env.*
.venv/
venv/
.python-version

# Logs
*.log

# Claude Code local settings
.claude/
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## [1.2.0] - 2026-02-17

### Added
- **Web dashboard** (`dashboard.py`) — Flask-based single-page app for browsing, searching, managing, and analyzing stored sessions
- REST API with 17 endpoints: sessions CRUD, full-text search, analytics (timeline, topics, projects, outcomes, technologies), database management (init, prune, export), and search hint chips
- Frontend SPA with hash-based routing, dark/light theme toggle, session detail views, code syntax highlighting (Highlight.js), and interactive charts (Chart.js)
- Session editing (summary, topics, user notes) and deletion from the UI
- Database export as JSON, prune with dry-run preview
- `context_dashboard` MCP tool to launch the web dashboard 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

### Changed
- `.gitignore` expanded with additional patterns: build artifacts (`*.whl`, `*.tar.gz`, `MANIFEST`), SQLite journal files, coverage variants, test framework caches (`.tox/`, `.nox/`, `.hypothesis/`), log files

## [1.1.0] - 2026-02-16

### Added
Expand Down
3 changes: 3 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ skills/context-memory/ # Skill definition (SKILL.md)
db_prune.py # Database pruning (by age/count)
db_utils.py # Connection management, helpers, VALID_TABLES
mcp_server.py # MCP server (FastMCP, stdio transport)
dashboard.py # Web dashboard (Flask REST API + SPA)
static/ # Dashboard frontend (vanilla JS, CSS)
commands/ # /remember and /recall command definitions
hooks/ # Auto-save stop hook (with dedup)
```
Expand All @@ -27,6 +29,7 @@ hooks/ # Auto-save stop hook (with dedup)
python skills/context-memory/scripts/db_init.py --verify # Verify schema
python skills/context-memory/scripts/db_init.py --stats # DB statistics
python skills/context-memory/scripts/db_prune.py --max-sessions 100 --dry-run # Preview prune
python skills/context-memory/scripts/dashboard.py # Launch web dashboard (localhost:5111)
python -m pytest tests/ -v # Run tests
ruff check . # Lint
```
Expand Down
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ cd context-memory

```bash
pip install ruff pytest
pip install flask flask-cors # optional, for dashboard development
```

## Verify Schema
Expand All @@ -43,6 +44,14 @@ ruff check .
python -m pytest tests/ -v
```

## Running the Dashboard

```bash
python skills/context-memory/scripts/dashboard.py
```

Opens at [http://127.0.0.1:5111](http://127.0.0.1:5111). The frontend is vanilla JS in `skills/context-memory/scripts/static/` — no build step required.

## Project Structure Notes

- `.claude-plugin/plugin.json` is **not** part of the Anthropic skill spec. It exists for potential future plugin registry use. The canonical metadata lives in `skills/context-memory/SKILL.md` frontmatter.
Expand Down
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Persistent, searchable context storage across Claude Code sessions using SQLite
- [How It Works](#how-it-works)
- [Usage Examples](#usage-examples)
- [Trigger Phrases](#trigger-phrases)
- [Web Dashboard](#web-dashboard)
- [Database Management](#database-management)
- [Contributing](#contributing)
- [License](#license)
Expand Down Expand Up @@ -84,6 +85,7 @@ This removes the skill, commands, hooks, and MCP server registration. Your saved
- Python >= 3.8
- SQLite with FTS5 support (included in Python's standard library)
- MCP server (optional): Python >= 3.10 and `pip install mcp`
- Web dashboard (optional): `pip install flask flask-cors`

## Commands

Expand Down Expand Up @@ -152,6 +154,7 @@ An optional MCP (Model Context Protocol) server exposes context-memory operation
- `context_save` — Save a session with messages, summary, topics, snippets
- `context_stats` — Database statistics
- `context_init` — Initialize/verify database
- `context_dashboard` — Launch the web dashboard (see [Web Dashboard](#web-dashboard))

**Setup:**

Expand Down Expand Up @@ -208,6 +211,34 @@ The context-memory skill also activates on natural language:
- "what did we discuss about..."
- "find previous work on..."

## Web Dashboard

A browser-based UI for browsing, searching, and managing your stored sessions.

```bash
pip install flask flask-cors
python skills/context-memory/scripts/dashboard.py
```

Then open [http://127.0.0.1:5111](http://127.0.0.1:5111).

**Features:**
- **Search** — Full-text search with topic/technology hint chips
- **Sessions** — Browse all sessions with pagination, project filtering, and sorting
- **Session detail** — View full summaries, messages, and code snippets; edit topics and notes inline
- **Analytics** — Timeline charts, topic frequency, project distribution, outcome breakdown, technology usage
- **Settings** — Initialize or reinitialize the database, prune old sessions (with dry-run preview), export all data as JSON

Use `--port` to change the default port:

```bash
python skills/context-memory/scripts/dashboard.py --port 8080
```

The dashboard can also be launched via the MCP `context_dashboard` tool, which starts it in the background.

> **Note**: The dashboard requires `flask` and `flask-cors` (`pip install flask flask-cors`). These are not needed for the core plugin.

## Database Management

Initialize or verify the database manually:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "context-memory"
version = "1.1.0"
version = "1.2.0"
description = "Persistent, searchable context storage across Claude Code sessions using SQLite + FTS5"
readme = "README.md"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion skills/context-memory/scripts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Database utilities for persistent, searchable context storage.
"""

__version__ = "1.1.0"
__version__ = "1.2.0"

from .db_init import get_stats, init_database, verify_schema
from .db_prune import prune_sessions
Expand Down
Loading