feat(scope): isolate user scope when project scope is installed (#73)#77
Merged
Conversation
When a project-scope install is detected in cwd, `pull` and `recall` now operate on the project scope ONLY — the user scope is no longer pulled or searched. This keeps a self-contained project knowledge base from being polluted by user-scope team resources. - pull: skip user scope (print notice), reconcile only the active scope, still pull cross-team source skills (against the project scope). - recall: query the project index only when a project scope is detected, user index otherwise; the two scopes are no longer merged. - uninstall: state which scope (user/project) and path it is acting on. Tests: unit (pull/recall isolation) + offline real-CLI e2e covering pull/recall/uninstall in a dual-scope sandbox. Co-authored-by: Cursor <cursoragent@cursor.com>
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
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
Closes #73. When a project-scope install is detected in the current directory,
teamainow operates on the project scope only — the user scope is no longer pulled or searched. This stops a self-contained project knowledge base from being polluted by user-scope team resources.检测到 project scope,已跳过 user scope. Hooks reconcile is limited to the active scope. Cross-team source skills are still pulled (decision per issue), now against the active scope so deploys land in the right base dir.user/project) and.teamaipath it is acting on, to avoid wiping the wrong scope.auto-recallalready resolved a single scope index viaautoDetectInit(), so it stays consistent with the new behavior.Behavior change
teamai pullteamai recallteamai uninstallBackward compatible for pure user-scope users (no project config → identical behavior).
Test plan
npx tsc --noEmitnpm run buildpull-scope-isolation.test.ts(project mode skips user, source routed to active config; user mode unchanged)recall-scope-isolation.test.ts(project-only vs user-only results, real indexes)scope-isolation-e2e.test.ts— dual-scope sandbox driving the real CLI forpull(notice + project skill deployed, user skill NOT deployed),recall(project knowledge only),uninstall --dry-run(states project scope)Made with Cursor