skills: add ucode skills add for additive skill configuration - #360
Draft
xsh310 wants to merge 2 commits into
Draft
skills: add ucode skills add for additive skill configuration#360xsh310 wants to merge 2 commits into
ucode skills add for additive skill configuration#360xsh310 wants to merge 2 commits into
Conversation
`ucode configure skills --mcp` replaces the skills MCP connection's location set; `ucode skills add` is its additive sibling. With `--mcp` it unions the given schemas into `skill_locations` (via `_union_locations`, the scalar analog of `_union_missing`) instead of replacing them; the default download mode reuses the already-additive download path. Requires `--location`. This mirrors `ucode mcp add` under a new `skills` command namespace, part of moving skill/MCP management off `ucode configure`. Co-authored-by: Isaac
- Drop `ucode configure skills` comparisons from the command docstring and README - Tighten `add_skills_command` to a one-line docstring; drop the self-explanatory `_union_locations` docstring and an inline comment - Reword `--mcp` conflict errors to "--path/--skill is not supported when using --mcp" Co-authored-by: Isaac
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.
What
Adds
ucode skills add, the additive sibling ofucode configure skills, under a newskillscommand namespace.ucode skills add --location <c.s>,… --mcp— unions the given schemas into the skills MCP connection'sskill_locationsinstead of replacing them.ucode skills add --location <c.s>,… [--path <dir>] [--skill <name>,…]— downloads a schema's skills to disk (the existing, already-additive download path), leaving already-downloaded skills in place.--locationis required.--skill/--pathkeep the same semantics and validation asconfigure skills(download-only,--skillneeds a single--location, rejected with--mcp).Why
Per the team discussion on consolidating skill/MCP management:
ucode configure skills --mcpreplaces the connection's location set, but adding a new schema shouldn't clobber the ones already configured. This mirrorsucode mcp add(append semantics) and is the first step of moving skill management offucode configureinto a dedicateducode skills <verb>namespace.This is PR 1 of 3:
ucode skills add(--mcp) ← this PRucode skills remove --mcp--agentsonskills add/removeHow
mcp.py:add_skills_command()unions via a new_union_locations()helper (the scalar analog of_union_missing), then reuses_update_skills_mcpto rebuild and persist the single skills connection.configure_skills_mcp_command(replace) is untouched.cli.py: newskillstyper namespace +skills addcommand;--mcproutes toadd_skills_command, the default routes toconfigure_skills_download_command.Testing
uv run ruff format --check,uv run ruff check, anduv run ty check src/all pass. Added 15 tests:_union_locations(append/dedupe/empty-base),add_skills_command(unions into scope, existing-schema no-op, empty-state registration), and theskills addCLI (mode dispatch + every validation guard). Full non-e2e suite passes except one pre-existing failure (test_managed_wizard.py::TestCliWiring::test_successful_apply_exits_zero) that fails identically onmain.This pull request and its description were written by Isaac.