Skip to content

feat(skills): swap UtekeDocIndex to the uteke 0.24 skill surfaces; registry fetch closes #878 #973

Closed

Description

@ajianaz

What problem does this solve?

uteke v0.24.0 (2026-11-14) ships the personal skill library as first-class surfaces — stage 1 CLI (uteke skill index|search|list|show|similar, #1731) and stage 2 remote (POST /skill/search|list|show|similar, MCP uteke_skill_*) — and the release notes name tole as the consumer ("let an agent, tole for one, recall only the few skills a task needs"). tole's UtekeDocIndex (crates/tole-core/src/skills/index.rs, #590) still rides uteke doc search with tag skill / slug skill-<name>. Two problems:

  1. Likely recall break: 0.24 hides skill files from the document surfaces — indexed skills are embedded with content_type = 'skill' and are "hidden from doc list, doc search, recall and the document similarity answers"; doc get/doc update on a skill file answer "not found". Against a 0.24.x store, the doc adapter's recall may return nothing. Needs verification (sandbox recipe exists), then a swap.
  2. feat(skills): fetch a third-party skill from the uteke registry at a pinned SHA #878 stays blocked: the pinned third-party skill fetch ("no verifiable registry API here") now has its API — uteke skill show + the hash recorded at index time — but tole has no path to it.

Bounds that make the swap safe: query cap 2000 chars (tole sends ≤ MAX_QUERY_CHARS = 1000 today), limit clamps (1–50 search / 1–200 list / 1–100 similar), at most 2 concurrent remote embeds — a third request is refused 429 (busy); v0.24.1 additionally fixed uteke-serve 0.24.0 never listening (deadlock at startup), so the floor is 0.24.1.

Proposed solution

One PR per step, trust model unchanged: the index only finds names; every description and body still loads from owner-approved local bytes under the #591 gate.

  1. Verify the break first: sandbox run against a uteke 0.24.1 store (recipe references/qa-sandbox-mcp-probe.md): does uteke doc search (tag skill) still return the indexed skills? Record the result in this issue; if doc search still works, this issue becomes an upgrade-path PR instead of a fix, and the verification is still the deliverable.
  2. New adapter UtekeSkillIndex: call uteke skill search|list|show (CLI argv, same shape as today's UtekeDocIndex, shell-tools builds only). Same SkillIndex trait, same select() pinned-core + top-K semantics, same Candidate/labels; LocalIndex stays the fallback and TOLE_SKILL_INDEX=uteke stays the switch. Version-gate the uteke call: a uteke without the skill subcommand degrades to the doc adapter or LocalIndex with one startup note.
  3. Registry fetch, closing feat(skills): fetch a third-party skill from the uteke registry at a pinned SHA #878: the owner-side approve path resolves a registry id via uteke skill show, records --source-url --registry-id --pinned-sha as today (hash as stated data, never fetched-verified at runtime), writes the same ledger line; a hash mismatch refuses. Approvals still owner-only.
  4. Bounds & politeness: respect the 2000-char query cap, the limit clamps, and back off on 429/busy; one hit per skill (uteke dedupes).
  5. Serve-path note (not this PR): the HTTP /skill/* surfaces matter for serve-face sessions once the epic: gateway — Telegram (then Discord) over tole serve, in a separate repository #910 gateway lands; keep the adapter's transport seam ready for it (uteke itself shares one core entry point across CLI/HTTP — mirror that).

Alternatives considered

  • Ask uteke to expose skills through doc search again: rejected — the hiding is deliberate (skill files were readable through doc get before 0.24), and the owner's 2026-11-11 integration decision names uteke's own surfaces as the registry.
  • Skip the swap, keep LocalIndex only: loses recall-by-meaning, which is the point of feat(skills): SkillIndex seam with a uteke doc adapter, pinned core and top-K recall #590; the library keeps growing.
  • LLM-side selection instead of the index: rejected — non-deterministic and it re-opens the prompt-injection door §4.2 closes.

Acceptance criteria

  • Verification recorded in this issue: doc-adapter behavior against a 0.24.1 store, with the chosen surface (skill vs doc vs local) and the reason.
  • TOLE_SKILL_INDEX=uteke recall returns candidates against a uteke 0.24.1 store; the test pins which surface the adapter calls.
  • Trust invariants hold: the index returns names only; unapproved skills are named unavailable with no description; body text never comes from the index or the registry.
  • skill_search output shape unchanged (local/uteke labels preserved); face parity unaffected (skill roster per face unchanged).
  • Registry fetch resolves via uteke skill show, refuses a hash mismatch, and records the same ledger line shape as a manual approve (feat(skills): fetch a third-party skill from the uteke registry at a pinned SHA #878 closed by this criterion).
  • Query ≤ 2000 chars, limits clamped, 429/busy retried with backoff; a pre-0.24 uteke degrades with a startup note, never a crash.
  • CHANGELOG entry; sandbox QA recipe rerun with uteke 0.24.1.

Related: #590, #591, #879, #878, #589. External: uteke #1731 (skill library stages 1–2), uteke v0.24.0/v0.24.1 release notes.

Activity

  1. ajianaz commented on Nov 19, 2026

    @ajianaz
    ContributorAuthor

    Step 1 result (verified against a real uteke 0.24.1 built from tag v0.24.1, run in an isolated HOME with two test skills):

    • The doc adapter break is real. After uteke skill index <dir>, uteke doc search "ship the release" --json returns []. Skill files are hidden from doc list, doc search and recall (0.24.0 CHANGELOG). A skill that tole itself indexed with tole skills index is an ordinary document and stays searchable through the doc adapter, so the break affects skills indexed with uteke skill index.
    • Chosen surface: uteke skill search|list|show (--json is a global flag). uteke skill --help exits 0, so it is a usable version gate.
    • Real JSON shape: skill search and skill list print a bare array keyed by slug: {slug, name?, description?, status, hash, valid, score, file, snippet}. skill show has approved_hash and current.hash. uteke's status is draft | approved | stale (uteke's own approval, not tole's), so it must not filter. Earlier guesses in the draft (name as identity, a retired status, a top-level content hash) were wrong and are fixed in feat(skills): UtekeSkillIndex over the uteke 0.24 skill surfaces (#973 step 2) #975.
    • Scores: default hybrid scores by rank fusion (about 0.03 at the top), --mode semantic is a cosine similarity (0.78 for an exact match). tole's floor is a cosine floor, so recall must use --mode semantic.
    • End to end: with the real binary on PATH, TOLE_SKILL_INDEX=uteke tole skills search "review a pull request" printed 0.784 review — review a pull request with no fallback note.

    PR #975 carries the adapter with these corrections. Step 3 (#878, registry fetch) starts after it merges.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions