Skip to content

configure skills: utility-tools-only mode, announce registration, restart hint - #248

Merged
xsh310 merged 10 commits into
databricks:mainfrom
xsh310:skills-bugbash-p0-main
Jul 28, 2026
Merged

configure skills: utility-tools-only mode, announce registration, restart hint#248
xsh310 merged 10 commits into
databricks:mainfrom
xsh310:skills-bugbash-p0-main

Conversation

@xsh310

@xsh310 xsh310 commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Addresses three bug-bash P0 gaps in ucode configure skills. All three are about the command surface and its output; none change the download/MCP mechanics.

P0-1 — get the bare toolset without a download

--location is now optional. A bare ucode configure skills (or --mcp with no location) registers the schema-less skills MCP connection — the cross-schema utility tools only — without forcing a download. Previously --location was required, so there was no way to get just the discovery tools.

  • configure skills / configure skills --mcp → register schema-less connection, no download.
  • configure skills --location a.b → download + register.
  • configure skills --location a.b --mcp → set scope to a.b.
  • --path without --location is rejected; --path with --mcp still rejected.

P0-2 — no more silent MCP registration

Every run now prints the registered server name, URL, configured agents, and a tool summary. Download mode also prints where the files landed. The tool line names categories (UC skill utility tools, plus + live skills tools in schema … when scoped) rather than individual tool names, so it can't go stale when the backend changes its tool offering.

P0-3 — restart requirement is now explicit

The summary always ends with a launch/restart line:

Run ucode <agent> to use the skills MCP. For existing sessions, restart the agent before skills become available.

Download mode appends that the downloaded files already work from disk. The summary prints even on a no-op re-run; only the state save stays gated on a real change.

Example output

Screenshot 2026-07-27 at 3 39 00 PM Screenshot 2026-07-27 at 3 27 40 PM image

Testing

  • uv run pytest — full suite green except a pre-existing test_e2e_user_agent failure (launches a real claude binary; fails identically on main, unrelated to this change).
  • uv run ruff check / ruff format --check — clean.
  • Added/updated tests: bare + --mcp-only dispatch, --path-without-location error, the tool-summary one-liner (bare/scoped/multi-schema), the summary printer's server/URL/agents/tools + restart wording, and the download "files written under" line.

This pull request and its description were written by Isaac.

…tart hint

Addresses three bug-bash P0 gaps in `ucode configure skills`:

- Make `--location` optional. A bare `ucode configure skills` (or `--mcp` with
  no location) now registers the schema-less skills MCP connection — the
  cross-schema utility tools only — without forcing a download. `--path`
  without `--location` is rejected.
- Announce the registration: print the server name, URL, configured agents, and
  a tool-category one-liner (utility tools, plus live per-schema skill tools
  when scoped). Download mode also prints where files landed. The summary names
  categories, not individual tools, so it can't drift when the backend changes
  its offering.
- Always end with a launch/restart line ("Run `ucode <agent>` ...; existing
  sessions need a restart"), and note that downloaded files already work from
  disk. The summary prints even on a no-op re-run; only the save is gated on a
  real change.

Co-authored-by: Isaac
Comment thread src/ucode/cli.py Outdated
Comment thread README.md Outdated
Comment thread tests/test_mcp.py Outdated
Comment thread tests/test_mcp.py Outdated
Comment thread src/ucode/skills_download.py Outdated
Comment thread src/ucode/mcp.py Outdated
Comment thread src/ucode/mcp.py Outdated
Comment thread src/ucode/mcp.py Outdated
Comment thread src/ucode/mcp.py Outdated
Comment thread src/ucode/mcp.py Outdated
- mcp.py: drop the download-specific restart clause; rename `_join_human` to
  `_join_with_and`; tighten `_print_skills_summary` docstring and restore the
  original `_update_skills_mcp` docstring; rename the local `displays` to
  `clients`; remove the now-unused `download_roots` plumbing and `Path` import.
- Drop "live" from the tools summary line.
- skills_download.py: fold the download roots into the per-location summary
  ("Downloaded N/M skill(s) from `x.y` in <roots>") instead of a separate note.
- README / status hint: reword the skills copy.
- Tests: assert the full summary strings (not substrings); update the download
  summary + dispatch tests accordingly.

Co-authored-by: Isaac
Comment thread src/ucode/mcp.py Outdated
Comment thread src/ucode/mcp.py Outdated
xsh310 added 2 commits July 27, 2026 22:08
- Rename `_skills_tools_summary` to `_skills_tools_description` and drop its
  docstring (the function is self-explanatory).
- Prefix the summary heading with ✔ and the restart note with ⚠.

Co-authored-by: Isaac
Keep the plain `print_note` bullet for the restart line; the ✔ heading stays.

Co-authored-by: Isaac
Comment thread src/ucode/cli.py Outdated
Comment thread src/ucode/mcp.py Outdated
xsh310 added 5 commits July 27, 2026 22:23
The `✔ Skills MCP registered` summary heading now serves as the confirmation,
so the separate `✔ Saved` line was printing two checkmarks for one action.

Co-authored-by: Isaac
- Restructure the `configure_skills` docstring around whether `--location` is
  given, then whether `--mcp` is present.
- Reword the restart note to "restart the agent for the skills to take effect".

Co-authored-by: Isaac
The download path registers the MCP connection with utility tools only.

Co-authored-by: Isaac
- Color the summary heading's ✔ green so it matches the green ✔ from
  `print_success` on the download line (the heading's bold-wrap was rendering
  it white).
- Print a blank line before each per-location "Downloaded ..." line.

Co-authored-by: Isaac
Replace the manually-greened print_heading with print_success so the summary
heading's ✔ matches the download line's checkmark (both green, no bold-wrap or
inline color markup). Keep the leading blank line for spacing.

Co-authored-by: Isaac
@xsh310
xsh310 marked this pull request as ready for review July 27, 2026 22:39
@xsh310
xsh310 merged commit 4740381 into databricks:main Jul 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants