Skip to content

fix: constrain skill routing to skills actually loaded#98

Open
Volkov Daniil (codeGaus) wants to merge 1 commit into
synthetic-sciences:mainfrom
codeGaus:fix/skill-routing-availability
Open

fix: constrain skill routing to skills actually loaded#98
Volkov Daniil (codeGaus) wants to merge 1 commit into
synthetic-sciences:mainfrom
codeGaus:fix/skill-routing-availability

Conversation

@codeGaus

Copy link
Copy Markdown

What does this PR do?

The science agents' prompts carry a static "Skill Routing Table" (ml.txt, biology.txt, physics.txt) that names skills like peft/unsloth. When those skills aren't loaded in the current environment, the model still routes to them and skill({name}) fails with Skill "<name>" not found. This injects a runtime <available-skills> section built from the actual loaded registry (permission-filtered, grouped by category), so the model only routes to skills that resolve; when none are loaded it tells the model not to call the skill tool at all.

The curated routing tables are left intact as guidance — the runtime section just overlays ground truth on top. Gated to the four science agents (research, biology, physics, ml) so lightweight agents don't get the extra tokens, and it lands in the stable (cache-friendly) system prefix.

How did you verify your code works?

Added test/session/system-skills.test.ts: loads scanpy but not peft, asserts the section lists scanpy and omits peft; also covers permission-denied filtering and the empty-registry path. bun test test/session/system-skills.test.ts → 3 pass. prettier --check clean.

Checklist

  • bun run typecheck — note: the tsgo native binary isn't available for my arch locally; tsc --noEmit on the changed files is clean (only the pre-existing llm.ts TS2589 remains on baseline).
  • bun test (system-skills) passes
  • bunx prettier --check clean
  • Linked issue (none found)
  • Screenshots (n/a)

The science agents' prompts carry a static Skill Routing Table (ml.txt,
biology.txt, physics.txt) that names skills like peft/unsloth. When those
skills aren't loaded in the current environment the model still routes to
them and skill({name}) fails with "not found". Inject a runtime
<available-skills> section built from the real loaded registry (permission
-filtered, grouped by category) so routing targets skills that resolve;
when none are loaded, tell the model not to call the skill tool. The
curated tables stay intact as guidance.
@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

Volkov Daniil (@codeGaus) is attempting to deploy a commit to the InkVell Team on Vercel.

A member of the Team first needs to authorize it.

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