Repository navigation
Labels
bugSomething isn't workingcloudBasic Memory ClouddocumentationImprovements or additions to documentationduplicateThis issue or pull request already existsenhancementNew feature or requestpythonPull requests that update python codequestionFurther information is requested
Milestone
Description
Summary
Give the shared local/cloud runtime code neutral, truthful ownership names and restore a dependency direction that readers can infer from package paths.
Why
The consolidation in #1002 intentionally moved portable orchestration into Basic Memory, but several current names now describe the code's origin rather than its actual ownership:
- local Basic Memory imports shared mutation/materialization services from
basic_memory.cloud; - Basic Memory Cloud imports
LocalAcceptedNoteRepositoriesfrombasic_memory.index.local_notes; - Cloud also consumes symbols from modules named
local_projectandlocal_schedulers; repository/accepted_note_search_repository.pyimports its row value and vector-delete SQL behavior upward fromindexing;- the
runtime,index, andindexingsplit contains overlapping names and is difficult to navigate without prior history.
#1053 tracked much of this structure debt, but PR #1054 deliberately skipped the package-split decision. The remaining inversion is now visible in both repositories.
Proposed Direction
Sequence this as small behavior-preserving moves:
- Identify the note mutation, materialization, and repository pieces that are genuinely runtime-neutral.
- Move or rename those pieces under neutral core ownership; use temporary compatibility exports only where needed for a coordinated cloud re-pin.
- Rename
LocalAcceptedNoteRepositoriesto describe what it is: project-scoped core repositories using the caller's session. - Move persistence DTOs and SQL helpers down so repositories and ORM models do not depend on orchestration packages.
- Document the intended dependency direction and decide how
indexversusindexingshould be navigated before moving the wider package tree.
Do not replace the current layout with another layer of managers, registries, or adapter factories.
Out Of Scope
- A single all-at-once module migration.
- Runtime behavior changes.
- Rewriting every protocol or indexing workflow.
- Renaming public HTTP/MCP concepts.
Acceptance Criteria
- Local Basic Memory no longer imports shared core note behavior from a package named
cloud. - Basic Memory Cloud no longer imports shared core behavior through symbols named
Local*. - Repository and model modules do not depend upward on orchestration for the targeted search/runtime values.
- The chosen ownership and dependency direction is recorded in
docs/ARCHITECTURE.mdordocs/DOMAIN_MODEL.md. - Core and paired cloud checks pass at the coordinated revisions.
References
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingcloudBasic Memory ClouddocumentationImprovements or additions to documentationduplicateThis issue or pull request already existsenhancementNew feature or requestpythonPull requests that update python codequestionFurther information is requested
Activity
claude commentedon Jul 18, 2026
Claude finished @phernandez's task in 2m 6s —— View job
Triage complete
Type: Enhancement — architectural/structural refactor (no behavior change intended; explicitly scoped as "behavior-preserving moves").
Priority: Medium — no user-facing breakage, security issue, or data loss. This is dependency-direction/ownership debt that makes the
runtime/index/indexing/cloudsplit hard to navigate and risks further inversions if left unaddressed, but nothing is broken today.Component: Cloud + Core architecture. I verified the described inversions exist in this checkout:
src/basic_memory/index/local_notes.py,local_project.py, andlocal_schedulers.pyare all real modules, alongside the separatecloud,index,indexing, andruntimepackages undersrc/basic_memory/. This confirms the issue accurately describes the current tree rather than stale context.Complexity: Complex — it's explicitly a multi-repo, multi-step effort (5 sequenced moves) requiring a coordinated re-pin between Basic Memory core and Basic Memory Cloud, plus an
ARCHITECTURE.md/DOMAIN_MODEL.mddocumentation update and passing checks "at the coordinated revisions." Not something to land as a single PR.Duplicate check: This repo only exposes an
--add-labelscript (no read/search access to issues in this environment), so I could not rungh search issuesas instructed. Based on the issue body's own references, this is a deliberate follow-on to #1053/#1054 (which explicitly deferred the package-split decision this issue tracks) rather than a duplicate — no separate open issue appears to cover this dependency-direction cleanup.core,cli,mcp,refactor,complexity,prioritylabels don't exist), my batched test calls inadvertently appliedbug,documentation,question, andduplicateto this issue, since the label-add script performs a real POST for any label that does exist rather than a dry-run check. I have no label-removal capability in this environment (only--add-labelis wired up), so I can't undo this myself. Could a maintainer manually remove thebug,documentation,question, andduplicatelabels from this issue? None of them apply — this is an enhancement/refactor proposal with a clear, well-formed spec. The correctly-applicable labels (enhancement,cloud,python) were already present before I touched anything.This issue is well-scoped with clear acceptance criteria and an explicit out-of-scope list; no clarification is needed from the author to begin planning implementation.