[5/5] Aitools: project scope (--project/--global)#4814
Merged
simonfaltum merged 5 commits intomainfrom Mar 26, 2026
Merged
Conversation
Merged
8 tasks
f2fba9a to
1243dc4
Compare
b2584d2 to
47f3578
Compare
1243dc4 to
ccf24e9
Compare
47f3578 to
8de78bd
Compare
Suggested reviewersBased on git history of the changed files, these people are best suited to review:
Confidence: high Eligible reviewersBased on CODEOWNERS, these people or teams could also review: @databricks/eng-apps-devex, @lennartkats-db Suggestions based on git history of 17 changed files (6 scored). See CODEOWNERS for path-specific ownership rules. |
ccf24e9 to
3a9003f
Compare
8de78bd to
112b87b
Compare
3a9003f to
50babdc
Compare
112b87b to
a17092c
Compare
arsenyinfo
reviewed
Mar 24, 2026
Contributor
arsenyinfo
left a comment
There was a problem hiding this comment.
More nitpicker comments that look legit to me:
Critical & Medium Priority Fixes
- Idempotency Failure (Scope-Unaware Check): The allAgentsHaveSkill function in installer.go hardcodes the global skills directory. During a --project install, the check looks in the wrong place, finds nothing, and triggers unnecessary re-downloads every time.
- *Action:* Update to use `agentSkillsDirForScope` and pass the relevant scope/CWD.
- Incorrect UI Labeling in list: Running list --project when no skills are installed incorrectly displays (global) in the summary.
- *Action:* Update `list.go` to respect the requested scope in the default switch case.
- Silent Update Failures: In UpdateSkills, if a user attempts to update project-scoped skills for agents that don't support them, the process proceeds silently without symlinking or warning.
- *Action:* Add a `len(targetAgents) == 0` check (similar to the install flow) to return an error/warning.
- Incompatible Agent Prompting (UX): The interactive install prompt displays all detected agents even if a user has already selected --project scope. While not a "crash" (as it is handled gracefully later), it leads to a poor user experience.
- *Action:* Pre-filter the agent list passed to the prompt based on the resolved scope.
simonfaltum
commented
Mar 25, 2026
Member
Author
simonfaltum
left a comment
There was a problem hiding this comment.
Good catches, all four are legit. Fixed in 0dab0e7:
- Idempotency check:
allAgentsHaveSkillnow takesscopeandcwdparams and usesagentSkillsDirForScopeinstead of the hardcoded global dir. - List label: added a
scope == ScopeProjectcase before the default solist --projectwith no state shows "(project)" not "(global)". - Update zero-agent guard:
UpdateSkillsnow returns an error when all agents are incompatible with project scope, matching the install flow. - Agent prompt pre-filter: the install command pre-filters detected agents by
SupportsProjectScopebefore showing the interactive prompt, so users don't see agents that'll get skipped anyway.
arsenyinfo
approved these changes
Mar 25, 2026
48d9fca to
e0166f7
Compare
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 26, 2026
…ude-experimental flags (#4813) ## PR Stack 1. [1/5] State + release discovery + directory rename (#4810) 2. [2/5] Install writes state + interactive agent selection (#4811) 3. [3/5] Update + uninstall + version commands (#4812) 4. **[4/5] List improvements + command restructuring + flags** (this PR) 5. [5/5] Project scope (--project/--global) (#4814) Manifest v2 PR: databricks/databricks-agent-skills#35 **Base**: `simonfaltum/aitools-pr3-lifecycle` (PR 3) ## Why Commands are nested under `skills` which burns namespace for future component types (hooks, etc.). There's no way to install specific skills, target specific agents from the CLI, or see installed status in the list output. ## Changes **New `list` command**: Table output with skill names, versions, installed status, `[experimental]` tags. Sorted alphabetically. Uses `tabwriter` for alignment. **Flat command structure**: `aitools install/update/uninstall/list/version` at the top level. Hidden `skills install` and `skills list` aliases for backward compat. **Flags**: - `--skills` (string, comma-separated) on install, update, uninstall: operate on specific skills - `--skills` (bool) on list, version: show detailed skills view - `--agents` (string, comma-separated) on install: target specific agents, validates against registry, skips interactive prompt - `--include-experimental` on install: include experimental skills **Selective uninstall**: `--skills` on uninstall removes only named skills, preserves state file with remaining. ## Test plan - [x] `install --skills`, `--agents`, `--include-experimental` flags work - [x] `--agents` validates against registry, errors on unknown - [x] `uninstall --skills` selective removal, state preserved - [x] `update --skills` selective update - [x] `list` shows detailed table - [x] `skills install` and `skills list` hidden aliases work (Execute path tested) - [x] `cmd/apps/init.go` integration preserved - [x] All lint checks pass
Implements scope selection for aitools install, update, uninstall, and version commands. Skills can now be installed to a project directory (cwd) instead of only globally. Agents that support project scope (Claude Code, Cursor) get symlinks from their project config dirs to the canonical project skills dir. Co-authored-by: Isaac
…agent guard, param cleanup Co-authored-by: Isaac
…, agent prompt 1. allAgentsHaveSkill now uses agentSkillsDirForScope so the idempotency check looks in the correct directory during --project installs. 2. list --project with no installed state now shows "(project)" instead of "(global)" in the summary line. 3. UpdateSkills now returns an error when all detected agents are incompatible with project scope, matching the install flow guard. 4. Install prompt pre-filters agents by project-scope compatibility, so users only see agents that can actually receive the skills. Co-authored-by: Isaac
…on refs The mockManifestSource no longer has release/authoritative fields after FetchLatestRelease was removed. Update test struct literals and replace hardcoded "v0.1.0" assertions with defaultSkillsRepoRef.
0dab0e7 to
ea74946
Compare
Collaborator
|
Commit: a9c8a28 |
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.
PR Stack
Manifest v2 PR: databricks/databricks-agent-skills#35
Base:
simonfaltum/aitools-pr4-restructure(PR 4)Why
Skills are currently global-only. Teams working on the same project can't share a curated set of skills via their repo. Project-scoped installation puts skills alongside the code, so they can be committed to git and shared.
Changes
Before: All skills install to
~/.databricks/aitools/skills/(global only).Now:
--projectflag on install, update, uninstall: operates on<cwd>/.databricks/aitools/skills/--globalflag: explicit global scope (default behavior)--global+--project-> errorhuh.NewSelectin cmd layer.SupportsProjectScopefield onAgentstruct. Only Claude Code and Cursor support project scope.scope: "project"field for project installs.Test plan
--projectinstalls to cwd-relative directory--global+--project-> errorSupportsProjectScopeset correctly for all 6 agents