Fix short-intent discovery and publish verified browser provider guidance
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 2s
ci / validate-registry (push) Successful in 1m40s
Build and Publish Container Image / build-and-push (push) Successful in 40s

Assistant: codex
Assistant-Model: gpt-6-astra
Assistant-Session: 01a13690-1c84-77a2-aeee-7f517ec60f5d
This commit is contained in:
tegwick 2026-10-13 20:48:05 +02:00
parent 9042dec5ed
commit 50077c9bea
22 changed files with 736 additions and 87 deletions

View file

@ -147,7 +147,14 @@ def match_query(
tokens = _tokens(blob)
if not tokens:
continue
score = len(query.tokens & tokens) / len(query.tokens | tokens)
# Score the name independently: descriptive summaries must not dilute
# a direct short-intent match (e.g. "headless browser"). Keep the full
# blob score for longer intents and summary/tag-only matches.
name_tokens = _tokens(item.get("name", ""))
score = max(
len(query.tokens & tokens) / len(query.tokens | tokens),
len(query.tokens & name_tokens) / len(query.tokens | name_tokens),
)
if score <= 0:
continue
scored.append(
@ -340,7 +347,7 @@ def format_plan_check_markdown(result: dict[str, Any]) -> str:
verdict = result["verdict"]
if verdict == "reuse":
lines.append("**Verdict: REUSE** — an existing capability already covers this; link it instead of building new.")
lines.append("**Verdict: REUSE** — a close lexical match exists; review its consumption contract and availability before adopting it.")
elif verdict == "extend":
lines.append("**Verdict: EXTEND** — scope overlaps closely enough that extending the top match is likely cheaper than a new capability.")
else: