Agent discoverability pass: intent-differentiated MCP tool descriptions + README selection boundaries (#162) #163
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
P1
P2
P3
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Creatidy/scarcity-router!163
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "docs/162-agent-discoverability"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #162 when merged (issue stays open until human review completes; agents never merge). Representation-only: no routing semantics, authority boundary, machine-interface shape or maturity claim changes. Baseline: canonical
develop@59538e9; this PR is exactly one commit,9ed9675, touching onlyscarcity_router/mcp.py,tests/test_mcp.py,README.md.What changed and why
1. MCP tool descriptions (
scarcity_router/mcp.py) — the material defect. All three tools previously shared one generic prefix and differed only by which REST endpoint they mirror; a retrieval system ranking on name + short description could not separate them by intent, andscarcity_status's description said it "reports or recommends" (false — status never recommends) while never mentioning capacity/quota, the only thing it returns. Each description now states: the intent it serves, its actual output, when to choose it, and which neighbouring tool serves the neighbouring intent — grounded in the already-authoritativeexamples/agent-routing-prompt.mdsemantics and the implemented envelopes (snapshots;decisionwith alternatives/exclusions/reasons and explicit no-solution;SimulationResult= baseline + simulated under typed overrides such asevaluated_atand window-percentage replacement).Preserved exactly (D-028 and
tests/test_mcp.pypins): tool names stay simple and unversioned; every description still opens with "Scarcity Router machine-interface contract v1" and still states it never executes model inference; input schemas, property names/types,required,additionalProperties, envelopes and logical error payloads are byte-identical. No new decision number is needed — D-028 froze names, the contract-v1 documentation statement and the wire contract, not this prose.2. Test pin (
tests/test_mcp.py). The existingtest_tool_descriptions_and_advertised_fieldsgains assertions that each description carries its differentiator ("only reports current state" / "only recommends" / "only answers hypotheticals") and the cross-reference to the neighbouring tool, so the intent split cannot silently regress. No new test framework.3. README (
README.md). One compact "When To Use It" section between the opening paragraph and "What It Does": positive selection boundary (multiple subscription plans, rolling quota windows, want a reproducible routing answer), three explicit negative boundaries (generic OpenAI-compatible reverse proxy — the optional execution gateway serves only explicitly configured authorized resources; autonomous coding agent/orchestrator; hosted multi-user quota pooling), and one honest maturity line (pre-release v0.1.0, not on any package index or registry). No restructuring; all existing prose depth preserved.Discoverability baseline (stable intent set, issue #162)
scarcity_selectscarcity_statusscarcity_simulateMCP-surface verdicts are static-metadata assessments, not claims about any model's tool-selection behavior.
Intentionally unchanged
Tool identifiers, schemas, envelopes, error payloads, versioning; CLI/REST surfaces (already well-differentiated);
examples/agent-routing-prompt.md(remains the deep routing authority);docs/machine-interfaces.md(its "descriptions state contract v1" sentence remains true); nollms.txt/ARD/registry/topics mutation (owner actions; recommendations in the issue); no Forgejo/GitHub metadata changes.Gates (exact head
9ed9675)uv sync --only-devOK;make checkgreen in one run — 2190 tests OK;uv run basedpyright0 errors / 0 warnings / 0 notes;git diff --checkclean.test_openai_codex_acquisition.MalformedAndBoundedOutput.test_oversized_line_with_secret_never_leaks(a stderr thread-exception race under full-suite load, in a path this diff does not touch). It passed 3/3 in isolation and the final full run was green — same class as the documented #143 load-sensitive family, not folded in.origin/develop..HEADis one commit, no merge commits.UX impact: none-to-positive — no workflow, configuration or interface change; the only user-visible difference is richer, accurate tool descriptions and a scannable README selection block. No new required configuration; no first-run regression.
Per repository governance: PR left open for human review; workers never merge.
Review remediation (REQUEST_CHANGES, 3 × MAJOR) — prior reviewed HEAD
9ed9675→ new HEAD332f172One remediation commit on the same branch; base still
develop(now @f79f452— advanced past the PR's merge base59538e9after #157-family integration; the PR remains mergeable and the branch was deliberately not merged with develop per governance). Onlyscarcity_router/mcp.py,tests/test_mcp.py,README.mdchanged;scarcity_simulatewas already accurate and is untouched.Finding 1 —
scarcity_selectoptimization overclaim. Problem: the description said the tool "returns the least scarce capable model configuration" — a global-minimization/optimality claim stronger than the implemented algorithm (eligibility stages + policy-aware ranking; e.g. an active happy-hour quota-preference can rank a candidate ahead of one with better scarcity, perdocs/selection-policy.md's exact ranking order). Remediation: the description now says the tool "gates candidates on capability and hard constraints, then ranks the eligible ones by current capacity/scarcity and the configured selector policy — quota-preference policy may outrank better scarcity — and recommends the top-ranked configuration with ordered alternatives, exclusions and reasons" (no-solution stays explicit and valid). No minimization/optimality/minimum-scarcity wording remains.Finding 2 —
scarcity_statusobservation/freshness overclaim. Problem: "only reports current state" and "health" implied real-time availability guarantees the implementation does not make (docs/capacity-model.md: capacity "describes an observation"; "v3 does not claim that a snapshot is fresh merely because it has a timestamp"). Remediation: the description now says "only reports observations", lists "observed quota windows, validated reset information where known, collection/source status, explicit failures and unknowns", keeps "makes no recommendation", and adds "Snapshots are observations at collection time, not a real-time availability guarantee."Finding 3 — README acceptance overclaim. Problem: "green under this repository's full test and acceptance gates" implied external acceptance is complete while live Windows/Codex acceptance gates remain open. Remediation: the maturity line now reads "the automated repository gate (unit tests and type checks) is green, while live and external acceptance work remains tracked separately in
docs/m10-acceptance.md". No surrounding maturity text or links removed; no completion of external acceptance claimed.Test protection (
tests/test_mcp.py, same test, semantic pins not prose snapshots): status → asserts "only reports observations", "snapshot", "collection/source status" and asserts absent the removed overclaims "current state"/"health"; select → asserts "selector policy", "eligible", "only recommends" and asserts absent "least scarce capable"; simulate pins unchanged. Existing contract-v1 and "never executes model inference" assertions untouched and still green.Contract preservation: no MCP tool names, input schemas, required fields, property names, output envelopes, error contracts or version markers changed — the diff touches description strings, test assertions and one README paragraph only. Routing/capacity/policy algorithms and provider behavior untouched. The D-028 statement ("Scarcity Router machine-interface contract v1") and the no-inference statement remain present in all three descriptions.
Validation (exact head
332f172):uv run python -m unittest tests.test_mcp→ 18 tests OK;make checkgreen in one run — 2190 tests OK;uv run basedpyright0 errors / 0 warnings / 0 notes;git diff --checkclean. Diff vs9ed9675manually inspected: 3 files, +35/−16, no other file touched, no merge commits.Ready for a fresh independent review; the PR stays open — workers never merge.