Skip to content

fix(skill): add a site-named fast path to smart-search (#248) - #269

Open
ankitranjan7 wants to merge 1 commit into
mainfrom
fix/smart-search-site-native-fast-path
Open

fix(skill): add a site-named fast path to smart-search (#248)#269
ankitranjan7 wants to merge 1 commit into
mainfrom
fix/smart-search-site-native-fast-path

Conversation

@ankitranjan7

Copy link
Copy Markdown
Contributor

Fixes #248

Problem

skills/smart-search/SKILL.md made SERP-first ordering unconditional ("Cost order is mandatory", "Do not jump to adapters because one engine blocked"). That is right when the target site is unknown and backwards when the request names the site: a "research X on Hacker News and Reddit" session burned DuckDuckGo, Bing, two Reddit URLs, an HN page and pullpush.io — all blocked — before reaching the two site-native sources that produced every piece of evidence.

Change

  • New Site-named fast path section: when the request names a site, run webcmd list --tag search -f json first and use the site's adapter; fall back to the cost order only when no adapter covers that site.
  • Carve-out applied at all five places that enforced SERP-first, so the skill doesn't contradict itself.
  • Zero usable result URLs is a failed search, not an empty one — move to the next engine.
  • A recognised block/CAPTCHA/challenge page retires that engine; don't re-fetch variants.
  • Don't report a site as blocked until adapter availability has been checked.
  • Warn on query tokens that collide with everyday English (puppeteer, playwright).

Discovery stays live — no routing table and no references/sources-* lists, per the existing rules and tests.

Verification

npx vitest run src/skills.test.ts — 12 passed, including two new assertions pinning the fast path.

🤖 Generated with Claude Code

SERP-first ordering was unconditional, so a request that names Hacker
News or Reddit burned its budget on blocked search engines before
reaching the site-native adapter that actually worked.

When the request names a site, discover adapters first and fall back to
the cost order only when no adapter covers that site. Discovery stays
live via `webcmd list --tag search` — no routing table.

Also: zero extracted result URLs is a failed search, a block/challenge
page retires that engine, and adapter availability is checked before
reporting a site as blocked.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🟠 Maintainer review suggested — low confidence

The automated review could not reach a fully supported conclusion.

This review is advisory and does not block merging.

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.

smart-search: mandatory SERP-first cost order wastes the budget when the query names a site

1 participant