Repository navigation
fix(skills): say a scoped skill_search miss is out of scope, not absent - #19299
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check what [DESIGN-REVIEWED] d5e6f14 Description read[DESCRIPTION-READ] 603358e9d22339449326d6f7676261dec0da632a8f17015113de22628df41723 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS A scoped miss while body indexing is incomplete still gets the indexing message, which does not mention scope. Confirm that order is intended. What this change shipsInventory (2 items) — 2 justifiedIntent: when an agent's search can only see its mapped skills, a miss should say so, so the agent doesn't conclude the skill isn't installed. This is a FIX (#19294).
[FIRST-PRINCIPLES-REVIEWED] d5e6f14 Description read[DESCRIPTION-READ] d0f5cd2b9928c4467a749ff48ac9448fdb9ea810c95be360ea9157dff5d3bb01 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
f4085e8 to
6464ebf
Compare
6464ebf to
2a9e805
Compare
|
Self-review (crew-pr-reviewer, read-only): CHANGES NEEDED This makes a scoped |
|
Converted to draft by crew-pr-reviewer: the self-review above is CHANGES NEEDED. Mark ready again (gh pr ready 19299) once the points are addressed. |
2a9e805 to
7cd7604
Compare
|
|
|
|
|
Re the crew-pr-reviewer self-review (comment), point by point, on new head 7cd7604:
Still one commit, Premshay as author with both Co-authored-by trailers. PR body updated to describe |
7cd7604 to
d5b0b71
Compare
|
|
d5b0b71 to
0fc447b
Compare
A session whose agent maps skill:// resources searches only those, but a miss read 'No skills matched', which agents took to mean the skill is not installed. The gateway route now returns scoped=true for a mapped scope, and the tool says the search covered only this agent's skill:// resources. The route reports a bit, not a count: the scope is a list of fnmatch globs, so one wildcard entry would have been reported as one skill. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: Premshay <28099628+Premshay@users.noreply.github.com>
0fc447b to
d5e6f14
Compare
|
Dispositions for the two advisory notes on head d5e6f14 (no code change):
Branch is already on origin/main 65df088 (includes #19495). |
bolichen97
left a comment
There was a problem hiding this comment.
Maintainer approval after a full diff read on head d5e6f14146: diff matches the description, no regression to existing behaviour found, CI and readiness green.
Problem / Motivation
Goal: when
skill_searchfinds nothing in an agent's mapped skill scope, the message says so, instead of reading as "this skill is not installed".A session whose agent declares
skill://resources searches only those (session_skill_globs). A miss returned:babysitwas installed. It was simply outside the agent's mapping. Agents read the message as "the skill does not exist" and either gave up or tried more keywords, none of which can match.Replaces #17559 by @Premshay, carried onto a main-repo branch so CI can run with repository permissions. The commit keeps @Premshay as author, with a
Co-authored-by:trailer.Why it matters
The message is the only signal the agent gets, and it points the wrong way: "try broader keywords" cannot succeed for a skill outside the mapping. One session searched for
babysitthree times and got the same message each time, with the skill installed throughout.Not a goal
test_unmapped_custom_agent_still_gets_nothingis untouched.What changed (motivation → approach → change)
api_skillssearch and list responses carryscoped:truewhen the session's agent mapsskill://resources,falsewhen unscoped. It is a bit, not a count: the mapping is a list of fnmatch globs, so one wildcard entry such asskill://~/.kiro/skills/*/SKILL.mdmaps many skills and no glob count is a skill count.scopedand not the catalog'sagent_scoped: they answer different questions.agent_scoped(catalog branch,?agent=) is true only when the listing was filtered, and an agent with an empty mapping keeps the unfiltered legacy listing, so it reads false. On the search/list/read branch an empty mapping is not unfiltered:only == []finds nothing (test_unmapped_custom_agent_still_gets_nothing). That search was restricted, soscopedis true. Reusingagent_scopedwould give one name two meanings.skill_searchsays so on a scoped miss: No skills matched 'babysit'. Search covers only this agent's skill:// resources, so an installed skill outside them is not found; browse action='list' to see the mapped set.Backwards compatibility
Compatible:
scopedis an added response field. Unscoped sessions and the CLI path get the old message.Removes nothing: the diff only adds a response field and a more specific miss message.
Tests
test_skill_mapping_and_lazy_default.py::TestScopedDiscovery::test_gateway_wildcard_mapping_reports_scope_without_a_count: oneteam/*/SKILL.mdglob over 3 skills; assertsscoped is True. Fails on 2a9e805.test_mcp_core_coverage.py::TestSkillSearch::test_no_matches_in_a_mapped_scope_names_the_scope: the scoped miss names the scope and states no count. Fails on 2a9e805.test_gateway_list_and_exact_read_share_the_session_mappingassertsscopedfor a mapped and a cleared mapping.test/test_mcp_core_coverage.pyandtest/test_skill_mapping_and_lazy_default.pypass on this branch (219 passed).Manual verification
N/A — unit coverage sufficient: the change is a response field and a message string, both asserted directly.
Related Issues
Fixes #19294
Replaces #17559
Pattern harvest
Rule candidate: review-prompt
Pattern: an empty result from a scoped search must name the scope it searched and the one action that can still succeed, not suggest broader keywords.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.