Repository navigation
feat(search): find skills for a sentence with task search - #452
Merged
Merged
Conversation
A sentence in the search box can now ask a language model to run a few registry searches and keep the Skills that fit. Stage 1 misses tasks whose words point at the wrong runtime, such as Godot and Tokio Skills for a Node memory leak. The model runs only on an explicit click, is capped per visitor and per day, and can only pick Skills its searches returned.
Collaborator
Author
Contributor
🤖 MERGED
GitHub merged this pull request.
86bc6728-b046-4263-9ad6-57d0abf2b382 Selected findings run after merge and open separate pull requests. |
Contributor
There was a problem hiding this comment.
Harlan Agent Kit posted this automated review. AI open source policy.
Automated Review: READY.
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.





🔗 Linked issue
Related to #440
❓ Type of change
📚 Description
Stage 1 search rewrites a sentence once and cannot judge its results. "stop memory leaks in node" still returns Godot, Tokio and iOS Skills. #440 planned a stage 2 agent loop on Claude Haiku 4.5. An offline eval found GPT-6 Luna better than stage 1 on 15 of 20 sentences, at 20 to 40 times less than the Haiku estimate.
This adds task search. For a sentence, the search panel shows a "Find skills for this task" row at its foot. Nothing runs until a visitor selects it. Then
POST /api/skills/task-searchruns a short loop:querySkills, 15 results each, with a readyrefper result.snapRefskeeps refs the searches returned and drops the rest, so the model can filter and order the registry but never add to it.Model path. The existing Workers AI binding takes
openai/gpt-6-lunawith a Chat Completions body and bills AI Gateway credits. It needs no new secret and no dashboard step. Chat Completions refuses function tools with reasoning on this model, soreasoning_effortisnone.Cost and abuse.
TASK_SEARCH_RATE_LIMITallows 3 model runs a minute per IP. A rate limit binding takes 60 seconds at most, and a daily count per visitor would mean storing an IP hash. The daily ceiling is therefore global:runtimeConfig.taskSearch.dailyBudgetMicros, $1 a UTC day, counted from token usage in KV. KV has no atomic increment, so the ceiling is soft.NUXT_TASK_SEARCH_ENABLED=falseto switch it off without a deploy.task-searchwide event with outcome, turns, searches, tokens, cost and duration. It never carries the question.Scope calls.
search_skills.get_skillandget_collectionwere never called in 41 eval conversations, and collections belong to another layer under ADR-0001.Measured. The shipped core ran 20 sentences against the real model and production search, from a desktop rather than a Worker:
snapRefs