Skip to content

Release 3.5.0 - Memory System Improvements#57

Merged
cdnsteve merged 25 commits intomainfrom
develop
Jan 21, 2026
Merged

Release 3.5.0 - Memory System Improvements#57
cdnsteve merged 25 commits intomainfrom
develop

Conversation

@cdnsteve
Copy link
Member

Summary

Release 3.5.0 brings significant improvements to the Memory System, including better search functionality and documentation of token savings.

Highlights

Memory Search Fix

  • FTS5 search now handles stemming (trademarkstrademark)
  • Multi-word queries work correctly (trademark worksignal)
  • Prefix matching for partial words (trade*)

Token Savings

  • Documented ~89% token reduction per session
  • Added examples/token_savings_demo.py for users to measure their own savings
  • Memory summaries are ~90% smaller than full content

Changes

  • fix: Improve FTS5 memory search for stemming and multi-word queries (fix: Improve FTS5 memory search for stemming and multi-word queries #56)
  • docs: Add token savings documentation and demo script
  • docs: Make Memory System more prominent in README
  • style: Sort imports alphabetically across codebase
  • fix: Task priority ordering - urgent tasks now processed first
  • fix: Handle Windows file locking in test teardown

Test Results

813 passed, 2 warnings in 57.05s

After Merge

  1. Tag release: git tag v3.5.0 && git push origin v3.5.0
  2. PyPI publish triggers automatically
  3. Bump develop to 3.5.1.dev0

Bump version to 3.4.5.dev0 and add release process docs
The SQL queries used ORDER BY priority DESC which selected higher
numbers first, but the priority scale defines lower numbers as more
urgent (1=urgent, 5=minimal). This caused minimal priority tasks to
be processed before urgent ones.

Changed priority ordering from DESC to ASC in:
- get_next_work() query
- get_pending_work() query
- Priority index definition

Updated tests to use correct priority values matching the scale.
Fix task priority ordering - urgent tasks now processed first
- Add sugar/memory module with store, embedder, retriever, types
- Add CLI commands: remember, recall, memories, forget, export-context, memory-stats
- Add MCP memory server for Claude Code integration
- Support semantic search with sentence-transformers (optional)
- Fallback to FTS5 keyword search when embeddings unavailable
- Add optional dependencies: memory, all extras in pyproject.toml
- Add 24 comprehensive tests for memory functionality
- Update README, CHANGELOG, and CLI reference documentation
Add Memory System for persistent semantic memory (v3.5)
- Remove phrase-matching quotes that broke multi-word searches
- Add OR between terms for better recall
- Add simple English stemming (trademarks → trademark)
- Add prefix matching (*) for partial word matches

Fixes searches like "trademarks" and "trademark worksignal" that
previously returned 0 results due to exact phrase matching.
Applied consistent import ordering:
- stdlib imports first
- third-party imports second
- local imports last
- alphabetical within each group
Shows users how Sugar memory reduces token usage:
- Compression ratio analysis (typically 90%+ reduction)
- Per-session savings projection
- Cumulative cost savings over time
- Works with real project memory data

Run: python examples/token_savings_demo.py
fix: Improve FTS5 memory search for stemming and multi-word queries
- Add Token Savings section to memory.md with real metrics
- Update README Memory System section with savings highlight
- Bump version to 3.5.0.dev1

Memory system provides ~89% token reduction per session through:
- Compressed summaries (90%+ smaller than full content)
- Targeted retrieval (only fetch what's relevant)
- Persistent storage (store once, retrieve many times)
Memory System improvements:
- fix: FTS5 search now handles stemming and multi-word queries
- docs: Added token savings documentation and demo script
- style: Sorted imports across codebase

Token savings: ~89% reduction per session through compressed summaries
and targeted retrieval.
@cdnsteve cdnsteve merged commit 21ed94a into main Jan 21, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant