-
Notifications
You must be signed in to change notification settings - Fork 149
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Refactor: split deps.py into feature modules + reduce import graph
Why
basic_memory/deps.py currently centralizes many unrelated dependency factories (DB/session, repositories, services, sync/watch, etc.). This increases coupling and the import graph; small changes ripple across unrelated features.
Scope
- Split dependency wiring into feature-scoped modules:
basic_memory/deps/db.pybasic_memory/deps/projects.pybasic_memory/deps/services.pybasic_memory/deps/sync.pybasic_memory/deps/http.py
- Keep
deps.pyas a temporary thin re-export layer during migration (optional), then delete it once callers are migrated.
Acceptance criteria
- Routers/tools only import the deps they need (no global
deps.pyimports for unrelated deps). - Import graph is measurably smaller (qualitative is fine: fewer cross-module imports; no new circulars).
- Tests pass (SQLite + Postgres-focused runs).
Dependencies
- Best done after composition roots are introduced (see the container issue), but can start in parallel.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request