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

@ -61,9 +61,11 @@ Reuses the token-Jaccard approach already proven in `overlaps.py`
same codebase:
1. **Tokenize** the query blob with the existing `TOKEN_RE`.
2. **Score** against every federated capability's blob (`name` + `summary` +
`tags` + `discovery.intent` + `discovery.includes`, mirroring
`overlaps._entry_blob`) via Jaccard similarity.
2. **Score** with the maximum of two token-Jaccard similarities: query versus
capability `name`, and query versus `name` + `summary` + `tags`.
Scoring the name separately prevents detailed summaries and consumption
instructions from diluting a short direct query such as "headless browser".
Summary/tag matches and longer intents retain the full-blob signal.
3. **Rank signal, not just tie-break:** among candidates within
`--tie-window` (default 0.05) of the top score, prefer the entry with the
higher discovery/availability vector (a more mature capability is a safer
@ -76,7 +78,7 @@ same codebase:
| Verdict | Condition | Meaning |
|---|---|---|
| `reuse` | top score ≥ `--reuse-threshold` (default 0.45) | An existing capability already covers this need — link it, don't rebuild it. |
| `reuse` | top score ≥ `--reuse-threshold` (default 0.45) | A close lexical match exists; review its consumption contract and availability before adoption. |
| `extend` | top score in `[--extend-threshold, --reuse-threshold)` (default 0.22–0.45) | Scope overlaps a capability closely enough that extending it is very likely cheaper than a new one — surfaced with an explicit "consider extending" framing. |
| `new` | top score < `--extend-threshold`, or no federated capabilities exist | No good match. Proceed; optionally file a capability request (T04). |
@ -86,6 +88,12 @@ the same threshold reasoning as `overlaps.py`'s `--threshold 0.28` default,
shifted since plan-check matches short intent text against short summaries
rather than long entry-to-entry blobs.
Verdicts describe relevance, not runtime readiness. A source-only candidate or
an unavailable endpoint is an availability gap on the existing capability, not
evidence that a second capability should be built. The match summary carries
provider consumption guidance where published; callers must run its preflight
and respect any local-only or managed-admission conditions.
## 6. Output
### Markdown (TTY default)