-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Add workspace-aware knowledge scoping for monorepos #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…pace values (with dry-run)
…ss workspace to agents
…itPath integration)
Add workspace filtering support for monorepo-aware knowledge queries: - cmd/list.go: Add --workspace (-w) and --all flags - --workspace filters by workspace name, includes root by default - --all explicitly shows all workspaces (ignores auto-detection) - Uses ListNodesFiltered when workspace is specified - cmd/context.go: Add --workspace (-w) and --all flags - Passes workspace to RecallOptions for SearchWithFilter - Updated help text with workspace filtering documentation Help text includes back-compat note: nodes without workspace are treated as 'root' (global knowledge). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Workspace and All parameters to ProjectContextParams - Update handleNodeContext to use workspace filtering - Validates workspace name and includes root by default This completes workspace-aware recall for both CLI and MCP. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add cmd/workspaces.go: new command to list detected workspaces - Shows workspace type (single/monorepo/multi-repo) - Shows current workspace based on cwd - Optional --counts flag for node counts per workspace - JSON output support - Update internal/ui/list_view.go: add workspace display - Compact mode: workspace badge [name] for non-root nodes - Verbose mode: dedicated Workspace column in table Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add TestMonorepoWorkspace_EndToEnd integration test that validates: - Workspace detection in monorepo structures - Knowledge nodes created with correct workspace tags - ListNodesFiltered returns workspace-scoped results - SearchFTSFiltered respects workspace filters - IncludeRoot flag includes root nodes when filtering - Add TestWorkspaceDetectionFromCwd for cwd-based detection - Add scripts/test_mcp_workspace.sh for manual MCP testing - Apply go fmt formatting to modified files Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Document new tw workspaces command - Document --workspace and --all flags for list/context - Document MCP recall workspace parameter - Document backward-compatible migration behavior - Note database schema change (workspace column) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Workspace Support section to BOOTSTRAP_INTERNALS.md - Document workspace detection (single/monorepo/multi-repo) - Document workspace tagging behavior - Add MCP integration examples with workspace params - Reference local dev MCP testing workflow - Update MCP_INTEGRATION.md - Add all MCP tools to Available Tools table - Document recall tool parameters (query, answer, workspace, all) - Add workspace-scoped search examples - Add Development & Testing section for local dev MCP Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The release notes were empty because changelog was disabled. Now using GitHub-native changelog with conventional commit grouping: - 🚀 Features (feat:) - 🐛 Bug Fixes (fix:) - 📚 Documentation (docs:) - 🧪 Tests (test:) - 🔧 Maintenance (chore, refactor, etc.) Also updated header to include full changelog comparison link. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This reverts commit c262642.
This reverts commit e3cc64d.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
api,web,root) and filtered during recalltw workspacescommand to list detected workspaces in a project--workspaceand--allflags fortw listandtw contextcommandsrecalltool now acceptsworkspaceandallparameterstw listoutput showing[workspace]for non-root nodesworkspacecolumn to nodes table with indexKey Changes
Database & Models
workspacecolumn to nodes table with index for efficient filteringNodemodel includesWorkspacefield (defaults to empty, treated asroot)NodeFilterstruct withWorkspaceandIncludeRootfieldsRepository Layer
ListNodesFiltered(),ListNodesWithEmbeddingsFiltered(),SearchFTSFiltered()methodsKnowledge Service
SearchWithFilter()for workspace-scoped searchmatchesWorkspaceFilter()helper for post-search filteringCLI Commands
tw workspaces- List detected workspaces with optional--countstw list --workspace=<name>- Filter by workspace (includes root by default)tw context --workspace=<name>- Search within workspace scope--allflag to explicitly search all workspacesMCP Integration
recalltool acceptsworkspaceandallparametersIncludeRoot=trueBootstrap
Test plan
internal/memory/migration_test.go)internal/knowledge/debug_test.go)tests/integration/workspace_test.go)go test ./...passesmake test(unit + integration + MCP) passestw workspaces,tw list --workspace,tw context --workspaceDocumentation
BOOTSTRAP_INTERNALS.mdwith workspace support sectionMCP_INTEGRATION.mdwith recall tool parameters and examplesCHANGELOG.mdwith feature notes🤖 Generated with Claude Code