From 689e0b10293bf8d6d061bdc673bc8e715ab69e1c Mon Sep 17 00:00:00 2001 From: Harlan Wilton Date: Tue, 6 Oct 2026 12:40:28 +1100 Subject: [PATCH] feat(search): find skills for a sentence with task search 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. --- COPY.md | 18 + GLOSSARY.md | 9 + app/components/SkillSearchPanel.vue | 86 +++- app/composables/useSkillSearch.ts | 70 +++- app/composables/useSkillSearchBox.ts | 6 + layers/marketing/content/pages/privacy.md | 15 +- .../server/api/skills/task-search.post.ts | 36 ++ .../server/presenters/skill-box-search.ts | 4 +- .../registry/server/presenters/task-search.ts | 41 ++ .../registry/server/schemas/skills-query.ts | 19 +- .../registry/server/utils/skill-box-search.ts | 2 +- .../registry/server/utils/task-search-deps.ts | 100 +++++ .../registry/server/utils/task-search-run.ts | 137 +++++++ layers/registry/server/utils/task-search.ts | 368 ++++++++++++++++++ nuxt.config.ts | 19 + test/unit/search-panel-run-command.test.ts | 1 + test/unit/task-search-run.test.ts | 136 +++++++ test/unit/task-search.test.ts | 222 +++++++++++ worker-configuration.d.ts | 3 +- wrangler.jsonc | 6 +- 20 files changed, 1287 insertions(+), 11 deletions(-) create mode 100644 layers/registry/server/api/skills/task-search.post.ts create mode 100644 layers/registry/server/presenters/task-search.ts create mode 100644 layers/registry/server/utils/task-search-deps.ts create mode 100644 layers/registry/server/utils/task-search-run.ts create mode 100644 layers/registry/server/utils/task-search.ts create mode 100644 test/unit/task-search-run.test.ts create mode 100644 test/unit/task-search.test.ts diff --git a/COPY.md b/COPY.md index 474a9e8f..2baaea8e 100644 --- a/COPY.md +++ b/COPY.md @@ -103,6 +103,24 @@ Every ranked section says what orders it. ADR-0004 and ADR-0010 set the rules. The 20 in the trending header is `DEMOTED_STARRED_REPOSITORIES` in `shared/trending-range.ts`. The page and the ranking read that one constant. Never call a ranked section top, popular, hot, best, or a leaderboard. +### Task search + +The search panel offers task search for a sentence, in a row at its foot. GLOSSARY.md defines the term. +Name the model's part plainly, as a language model. Never call the action AI search or smart search. +The strings live in `taskRowCopy` in `app/components/SkillSearchPanel.vue`. + +Each status shows a title, then a detail line: + +- Offer: `Find skills for this task`. `A language model runs a few searches and keeps the skills that fit. Takes about 5 seconds.` +- Running: `Finding skills for this task…`. `This takes about 5 seconds.` +- Nothing fits: `No skill fits this task`. `The search results are the closest matches.` +- Visitor limit: `Too many task searches in a row`. `Try again in a minute.` +- Daily limit: `Task search reached today's limit`. `Try again tomorrow.` +- Off: `Task search is off right now`. `The search results still work.` +- Failed: `Couldn't finish the task search`. `Select to try again.` + +Found Skills replace the search results under the heading `Skills for this task`, with the line `A language model picked these from a few searches of the registry.` + ## Discord digest The weekly card uses `Trending skills this week` as its title and links to the trending page. diff --git a/GLOSSARY.md b/GLOSSARY.md index efacd921..0904339b 100644 --- a/GLOSSARY.md +++ b/GLOSSARY.md @@ -28,6 +28,7 @@ Shared terms match the skilld CLI glossary (`skilld-dev/skilld/GLOSSARY.md`). Th | skilld token | `cli_tokens`, `layers/identity` | Author 1—N token | "skilld token" | | provenance | Skill detail, cards | Skill 1—1 author and source link | "written by", "source" | | behavior | `skilld-protocol/behaviors`, Skill page | Skill 1—N behavior | "Skill behaviors" | +| task search | search box, `layers/registry` | sentence 1—N Skill | "Find skills for this task" | Collisions @@ -272,6 +273,14 @@ Existing route paths, table names, and protocol fields keep their identifiers. **Never:** newsletter, roundup, trending digest. +### task search + +**Is:** the search box action for a sentence. A language model runs a few registry searches for the task and keeps the Skills that fit. It only filters and orders search results; it never adds a Skill. It runs only when a visitor selects "Find skills for this task". + +**Use for:** that action, its status messages in the search panel, and the privacy page. The route is `POST /api/skills/task-search`. + +**Never:** AI search, smart search, deep search, agent search, ask skilld. Those sell the model as the product, and VISION.md says skilld is not AI-powered. + ## Naming new things - Name a feature descriptively, not cleverly. "Stack selector", never "StackMatch". diff --git a/app/components/SkillSearchPanel.vue b/app/components/SkillSearchPanel.vue index 7db46e26..cdbb85ac 100644 --- a/app/components/SkillSearchPanel.vue +++ b/app/components/SkillSearchPanel.vue @@ -1,5 +1,5 @@