feat: enable default_project_mode by default#560
Conversation
Flips default_project_mode from False to True so MCP tools automatically use the configured default project when no project parameter is specified. This eliminates the "which project?" back-and-forth for the common single-project case, while preserving the ability to pass an explicit project parameter. 📝 Updates tool docstrings to reflect automatic project resolution 🧪 Discovery mode tests now explicitly set default_project_mode=False Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
|
Claude finished @phernandez's task in 1m 36s —— View job Review Complete: Enable default_project_mode by default ✅I've thoroughly reviewed this PR against the Basic Memory team checklist. This is a clean, well-executed change that improves the UX for single-project workflows. Code Quality & Standards ✅
Notes:
Testing & Documentation ✅
Outstanding:
Observations:
Basic Memory Architecture ✅
Impact Analysis:
Security & Performance ✅
Compatibility ✅
SummaryThis PR successfully addresses the UX friction reported by Drew for single-project workflows. The implementation is clean, well-tested, and maintains backward compatibility. Strengths
Recommendations
Overall AssessmentAPPROVE - This is a well-crafted change that improves the default UX while preserving power-user workflows. The test updates demonstrate good engineering discipline by making expectations explicit. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5ef114cb4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Project Resolution: | ||
| Server resolves projects in this order: Single Project Mode → project parameter → default project. | ||
| If project unknown, use list_memory_projects() or recent_activity() first. | ||
| Uses default project automatically. Specify `project` parameter to target a different project. |
There was a problem hiding this comment.
Scope default-project guidance to local mode
This text now tells callers that the default project is used automatically when project is omitted, but that is only valid in local mode with default_project_mode=true. ProjectResolver.resolve still requires an explicit project in cloud mode (it raises when cloud_mode is set and no project is passed), and users can also disable default-project mode; in both cases this guidance leads assistants to issue calls that fail at runtime. Please qualify this instruction so it only applies when that mode is actually active.
Useful? React with 👍 / 👎.
The cloud-mode code path in ProjectResolver.resolve() short-circuited before checking default_project, so cloud users with default_project_mode enabled still got "project required" errors. This restructures resolve() into a single linear priority chain (ENV_CONSTRAINT → EXPLICIT → DEFAULT → fallback) that works identically in both modes. - Remove cloud-mode short-circuit block in ProjectResolver.resolve() - Cloud-specific behavior now only affects explicit step and final fallback - Update tool docstrings to remove "In cloud mode, project is required" - Update ai_assistant_guide.md to remove stale "(default)" on default_project_mode - Add 7 new unit tests for cloud+default scenarios - Fix 2 integration tests, add 1 new cloud+default integration test Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
…feat/default-project-mode-on-by-default
|
Claude finished @phernandez's task in 1m 35s —— View job Review Complete: Enable default_project_mode by defaultI've thoroughly reviewed this PR against the Basic Memory team checklist. This is a well-executed UX improvement with one important issue that needs addressing. Code Quality & Standards ✅
Notes: The changes are minimal and focused. Code follows literate programming style with clear docstrings. Testing & Documentation
|
The codex review flagged that docstrings didn't mention cloud mode behavior. Since this PR unifies the resolution chain to work identically in both local and cloud modes, make that explicit in the docstrings for write_note, read_note, and build_context. Addresses PR review comment on #560. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
|
Claude finished @phernandez's task in 1m 58s —— View job Review Complete: Enable default_project_mode by default ✅I've thoroughly reviewed this PR against the Basic Memory team checklist. This is an excellent, well-executed UX improvement that went beyond the original scope to fix a critical architectural issue. Code Quality & Standards ✅
Notes:
Testing & Documentation ✅
Test Updates:
Outstanding Manual Testing:
Basic Memory Architecture ✅
Architectural Excellence: This PR discovered and fixed a critical architectural inconsistency in The fix unified the resolution into a single linear priority chain that works identically in both modes: # Unified Priority Chain (project_resolver.py:109-179)
1. ENV_CONSTRAINT — BASIC_MEMORY_MCP_PROJECT env var (highest priority)
2. EXPLICIT — project parameter passed directly
3. DEFAULT — default project when default_project_mode=true
4. Fallback — cloud: CLOUD_DISCOVERY or ValueError; local: NONEImpact:
Security & Performance ✅
Compatibility ✅
Docstring Issue Resolution ✅Previous review concern: Docstrings claimed "Uses default project automatically" without qualifying for cloud mode. Resolution: Commit
This is more accurate than the previous review's suggestion because:
Affected files verified:
SummaryStrengths
Commit Quality
All three commits have clear messages, proper co-authorship, and signed-off commits. Recommendations
Overall AssessmentAPPROVE ⭐ This PR exemplifies excellent engineering:
The architectural unification is arguably more valuable than the original UX improvement. Both local and cloud users now benefit from consistent, predictable project resolution behavior. |
Summary
default_project_modefromFalsetoTrueso MCP tools automatically use the configured default project when noprojectparameter is specifieddefault_project_mode=Falseto continue testing that pathTest plan
just fast-check— lint, format, typecheck, impacted tests all passjust test— full suite (1572 unit + 226 integration), 0 failuresBASIC_MEMORY_MCP_PROJECT, callwrite_notewithoutproject— should use default project automatically🤖 Generated with Claude Code