Repository navigation
fix(prompt): keep skill routing in skill policy - #1179
Merged
Merged
Conversation
The available-skills data block duplicated skill routing policy and
said plugin names were skill matches. That caused loadSkill("scheduler")
even though scheduler is only a catalog source.
Keep available-skills as data and consolidate semantic matching plus
exact listed-name validation in the higher-authority skill policy.
Co-Authored-By: David Cramer <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Summary
Observed misfire: for a scheduled-task request, Junior called
loadSkill("scheduler")even thoughscheduleris a plugin/catalog source, not a skill. It recovered viasearchTools(source: "scheduler"), but the first hop was wrong.Root cause: skill routing was duplicated and overfitted:
<available-skills>intro said a request naming a plugin/provider/account matching a skill name is a skill match.$skill//skillis already handled pre-model; auto-select should be semantic.<skill-policy>already owned load rules, so the data block was the wrong place for routing prose.Fix: one file, two small edits in
packages/junior/src/chat/prompt.ts:<available-skills>data-only (drop the intro sentence)<skill-policy>:loadSkillwith an exact listed<name>Evidence
slack:C08J1NSPU6S:1785604967.856429loadSkill({ skill_name: "scheduler" })→Unknown skill: schedulersearchTools/scheduler_slackScheduleCreateTaskVerification
pnpm --filter @sentry/junior typecheck— passprettier --check packages/junior/src/chat/prompt.ts— passprompt.test.tsnot run here: local vitest blocked by missing Postgres at127.0.0.1:54322Risk
Low. Residual: models can still invent skill names from task nouns; skill-policy now forbids that more clearly, and
searchToolsremains the path for plugin/catalog work.Requested by David Cramer.
--
View Junior Session Sentry