Skip to content

feat(skills): UtekeSkillIndex over the uteke 0.24 skill surfaces (#973 step 2) - #975

Merged
ajianaz merged 4 commits into
developfrom
feat/uteke-skill-index
Nov 19, 2026
Merged

ajianaz merged 4 commits into
developfrom
feat/uteke-skill-index

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What

Step 2 of #973: a UtekeSkillIndex adapter behind the existing SkillIndex trait, calling uteke skill search|list|show (shell-tools builds only). TOLE_SKILL_INDEX=uteke stays the switch. Step 3 (registry fetch, #878) is not part of this PR.

Why

uteke 0.24 hides indexed skills from doc search, so UtekeDocIndex recall returns nothing for skills indexed with uteke skill index. Step 1 is now VERIFIED against a real binary (below), and the adapter reads the real output shape.

Verification against a real uteke 0.24.1 (step 1)

uteke v0.24.1 was cloned (tag v0.24.1) and built from source, then run in an isolated HOME with two test skills:

  • uteke skill index <dir> --json, skill search, skill list, skill show --json all work; uteke skill --help exits 0.
  • uteke doc search "ship the release" --json returns [] for the indexed skills: the doc-adapter break is real (the CHANGELOG of 0.24.0 says skill files are hidden from doc list, doc search, recall).
  • 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.
  • Scores: the default hybrid mode scores by rank fusion (0.033 at the top), --mode semantic gives a cosine similarity (0.78 for an exact match). tole's floor (TOLE_SKILL_FLOOR, default 0.35) is a cosine floor, so the adapter searches with --mode semantic; with the default mode every hit would be dropped.
  • End to end: with that 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.
  • Caveat: only the tole-side adapter was exercised live; skills indexed by tole skills index still go through the doc adapter (they are ordinary documents and stay searchable there).

Changes

  • crates/tole-core/src/skills/index.rs: new UtekeSkillIndex (+ SkillMeta). Same select() semantics, Candidate, uteke label. Identity is the slug; uteke's own status does not filter (the local gate feat(skills): load only owner-approved skill content hashes #591 is the authority), only valid: false hits are skipped. Query capped at 2000 chars (tole's 1000 cap still applies first), search limit clamped 1-50, list 1-200, 429/busy retried with backoff (3 retries, 250 ms doubling), one hit per skill. show is reduced to name + recorded hash (approved_hash, else current.hash); a body in the answer is dropped. upsert/retire delegate to UtekeDocIndex unchanged.
  • crates/tole-cli/src/skill/recall.rs: version gate. uteke skill --help failing (pre-0.24) degrades to the doc adapter with ONE startup note, never a crash; also used by tole skills search.
  • Trust invariants unchanged: the index returns names only (Candidate{name,score}), unapproved skills are still named unavailable with no description, bodies load only from owner-approved local bytes (feat(skills): load only owner-approved skill content hashes #591 gate).
  • CHANGELOG, README env row.

Testing

  • Fake uteke on PATH pins the surface and the real v0.24.1 output shape: doc search/doc get are a failing tripwire in the unit tests; the e2e asserts skill search ship the release --limit is called and doc search is not; a pre-0.24 fake asserts the doc fallback and exactly one note.
  • Unit tests: filtering (slug identity, uteke status ignored, valid: false, profile scope, floor, dup, flag-shaped names), limit and query bounds, --mode semantic, busy retry then surface (3 and 4 calls), show drops bodies and reads approved_hash, version gate, malformed output.
  • cargo fmt --all --check; clippy -D warnings clean; cargo test -p tole-core skill tests and cargo test -p tole-cli --test skill_index_e2e --test face_parity pass.
  • The live run above is the sandbox QA with a real 0.24.1 binary.

Not covered: tole skills index|retire still write through the doc adapter (whether 0.24 wants uteke skill index there is a separate question for step 3 / a follow-up).

Refs #973, #590, #591.

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz marked this pull request as ready for review November 19, 2026 08:11
@ajianaz
ajianaz merged commit 25ba0cf into develop Nov 19, 2026
23 checks passed
@ajianaz
ajianaz deleted the feat/uteke-skill-index branch November 20, 2026 08:37
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.

1 participant