Skip to content

[AIGTWY-4758] Download managed-config skills at ug configure - #691

Open
david-siqi-liu wants to merge 1 commit into
mainfrom
david/ug-configure-skills
Open

david-siqi-liu wants to merge 1 commit into
mainfrom
david/ug-configure-skills

Conversation

@david-siqi-liu

@david-siqi-liu david-siqi-liu commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Problem

Managed coding-agent config can declare a skills selector ({names | unity_catalog_location}), but ug never consumed it. cli read skills.names as if they were <catalog>.<schema> locations and ignored unity_catalog_location, so both valid selector shapes downloaded nothing: a silent no-op, exactly like the managed mcp_servers no-op that #669 fixed.

Change

Mirror #669 for skills. Resolve the NamesOrLocation selector correctly and download the admin's skills at ug configure, alongside managed MCP-server registration.

  • skills_download.py: add _resolve_managed_skill_refs (a unity_catalog_location lists every finalized skill under that <catalog>.<schema>; names resolves each full <catalog>.<schema>.<name> FQN via GetSkill; malformed entries are skipped with a warning) and download_managed_skills, a non-interactive, additive writer that replaces download_managed_skills_on_launch.
  • cli.py: _download_managed_skills is now selector-aware and runs at ug configure. It is no longer called on the launch hot path, so ug <agent> makes no per-launch skill-discovery calls (matching how [AIGTWY-4573] Register managed mcp_servers at ug configure #669 moved MCP registration off launch).
  • Skills land in both .claude/skills and .agents/skills, so Claude Code and Codex both pick them up. A developer's own same-named skill is never overwritten.

Out of scope

Reconcile-on-removal of managed skills dropped from the config (additive download matches prior behavior; ug skill remove already covers user-driven removal).

Testing

Set up
image

Claude

image image

Codex

image image

Unit: selector resolution (names / location / precedence / malformed / unresolvable / failures / empty / duplicate-FQN dedup), configure wiring and order, and launch making no skill calls.

E2E: adds a managed_fixture integration suite (tests/integration/test_ug_configure_managed_skills.py) mirroring the mcp/models suites from #699. It injects an admin config naming a real ca-central skill (main.default.forkable-meals) via UCODE_MANAGED_CONFIG_STUB, runs ug configure, launches the real agent, and asserts the downloaded skill appears in the agent's /skills view, for Claude (via the names selector) and Codex (via the unity_catalog_location selector). Runs in the existing non-blocking managed lanes.

uv run ruff check . / ruff format --check clean; focused unit suites and the integration contract test pass locally; the new suite collects.

Part of epic AIGTWY-4329.

This pull request and its description were written by Isaac.

@david-siqi-liu
david-siqi-liu marked this pull request as ready for review September 16, 2026 21:30
@david-siqi-liu david-siqi-liu added the quicktree-assisted PR created with quicktree-assisted workflow label Sep 16, 2026
@david-siqi-liu
david-siqi-liu force-pushed the david/ug-configure-skills branch from 9cc4fc8 to 6c27edb Compare September 16, 2026 21:36
@david-siqi-liu david-siqi-liu changed the title [AIGTWY-4329] Download managed-config skills at ug configure [AIGTWY-4758] Download managed-config skills at ug configure Sep 16, 2026
@david-siqi-liu
david-siqi-liu force-pushed the david/ug-configure-skills branch from 6c27edb to 04f27f4 Compare September 17, 2026 15:36
Managed coding-agent config can declare a `skills` selector, but ug never
consumed it: cli read `skills.names` as `<catalog>.<schema>` locations and
ignored `unity_catalog_location`, so both valid selector shapes downloaded
nothing -- a silent no-op, like the managed mcp_servers no-op that #669 fixed.

Resolve the `NamesOrLocation` selector correctly (names as full
`<catalog>.<schema>.<name>` FQNs, unity_catalog_location as a schema; malformed
entries skipped with a warning) and download the skills at `ug configure`,
alongside managed MCP-server registration and off the launch hot path. The
bundles land in both `.claude/skills` and `.agents/skills`, so Claude Code and
Codex both pick them up.

Add a managed_fixture integration suite (test_ug_configure_managed_skills.py)
mirroring the mcp/models suites: inject a config naming a real skill, configure,
and assert the agent's /skills view lists it, for both Claude and Codex.

Co-authored-by: Isaac <no-reply@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

quicktree-assisted PR created with quicktree-assisted workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant