[loop-cycle-1] refactor: split memory_system.py into submodules (#1277) #1323

Merged
Timmy merged 1 commits from refactor/split-memory-system into main 2026-03-24 02:21:43 +00:00
Owner

Summary

Splits the 1543-line memory_system.py monolith into 5 focused submodules under src/timmy/memory/:

Module Lines Contents
db.py 213 DB connection, schema, migrations, data classes
crud.py 395 CRUD operations, personal facts, reflections
semantic.py 300 SemanticMemory + MemorySearcher
consolidation.py 301 HotMemory + VaultMemory
tools.py 253 Tool functions (search/read/store/forget/jot/log)
memory_system.py 177 MemorySystem class + singleton + re-exports

Key points

  • All existing from timmy.memory_system import X statements continue to work
  • No module exceeds 400 lines
  • All 647 unit tests pass
  • No new dependencies

Closes #1277

## Summary Splits the 1543-line `memory_system.py` monolith into 5 focused submodules under `src/timmy/memory/`: | Module | Lines | Contents | |--------|-------|----------| | `db.py` | 213 | DB connection, schema, migrations, data classes | | `crud.py` | 395 | CRUD operations, personal facts, reflections | | `semantic.py` | 300 | SemanticMemory + MemorySearcher | | `consolidation.py` | 301 | HotMemory + VaultMemory | | `tools.py` | 253 | Tool functions (search/read/store/forget/jot/log) | | `memory_system.py` | 177 | MemorySystem class + singleton + re-exports | ## Key points - All existing `from timmy.memory_system import X` statements continue to work - No module exceeds 400 lines - All 647 unit tests pass - No new dependencies Closes #1277
Timmy added 1 commit 2026-03-24 02:18:50 +00:00
refactor: split memory_system.py into submodules (#1277)
Some checks failed
Tests / lint (pull_request) Failing after 34s
Tests / test (pull_request) Has been skipped
ced3b2c2c6
Extract 1543-line monolith into 5 focused modules:
- memory/db.py (213 lines): DB connection, schema, migrations, data classes
- memory/crud.py (395 lines): CRUD operations, personal facts, reflections
- memory/semantic.py (300 lines): SemanticMemory + MemorySearcher
- memory/consolidation.py (301 lines): HotMemory + VaultMemory
- memory/tools.py (253 lines): Tool functions (search, read, store, forget)

memory_system.py (177 lines) remains as thin orchestrator with full
re-exports — all existing imports continue to work unchanged.

No module exceeds 400 lines. All 647 unit tests pass.
Timmy merged commit e325f028ba into main 2026-03-24 02:21:43 +00:00
Timmy deleted branch refactor/split-memory-system 2026-03-24 02:21:44 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#1323