-
Notifications
You must be signed in to change notification settings - Fork 150
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Refactor: introduce ProjectResolver and unify project selection across MCP/API/CLI
Why
Project resolution logic is scattered (default project, constrained env project, explicit parameters, discovery mode). This leads to inconsistent behavior and duplicated logic.
Scope
- Create a single reusable
ProjectResolver(pure logic / small class) that:- resolves the effective project given requested project + env constraints + config
- supports discovery mode (optional)
- returns a typed result (mode + project name/id + reason)
- Use it in:
- MCP project resolution (
basic_memory/mcp/project_context.pyand MCP tools) - API project routing (where applicable)
- CLI commands that infer default project
- MCP project resolution (
Acceptance criteria
- One canonical implementation of project resolution (no duplicated decision trees).
- Existing behavior preserved (or changes explicitly documented).
- MCP tool behavior remains fully covered.
Dependencies
- Ideally after containers/config injection work, so resolver is used via injected config.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request