The MCP surface is impact, path and tests: search is the agent's own - #1852
Open
swapnilpaliwal-sd wants to merge 15 commits into
Open
swapnilpaliwal-sd wants to merge 15 commits into
swapnilpaliwal-sd wants to merge 15 commits into
Conversation
…hrough an index Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
index: three missing lookup indexes made large-repo queries and warm take minutes
…yable Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
build: export impact facts in the background once the graph is queryable
…k names the error Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
index now warms impact's facts in the background, so a query can arrive before edge.facts exists. context never exported them and died on a missing file. Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
…warm context: export the graph's facts before reading its edges
…at once The export had no lock: a query that found the stamp stale while another process was already writing the same facts (the background warm-up after index, a second query, several hooks at once) ran the whole export again beside it. Measured on an 8,619-file Java repository: the first query after index cost 193 s against 8.8 s warm, and every concurrent query paid the same again while thrashing the writer. The first comer now takes <facts>/.exporting and the others wait for its stamp, then answer from the facts it wrote; a lock whose writer is gone is taken over. tests/export_singleflight.py pins the wait, the takeover and the unlock. Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
…library staging A name no graph declares, reached only by text, whose lines include an import of it is the signature of an unstaged dependency — until now the answer was indistinguishable from an engine gap, and the fix is one flag away. One hint line under the [text] rows, only for undeclared names. Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
impact/path: one facts export per graph, however many queries arrive at once
…s on 8,619 files Three wastes, found by timing each exported relation and profiling the poles standalone: - site_file() ran one has() and one paths lookup PER CALL, and the export calls it for every call edge: 638k round-trips over 319k edges. The paths map is now read once per graph (171 s -> 89 s). - via_base_rows probes field_access per single-target call site, and the table had no caller_id index: a 65,797-row scan 5,162 times. fa_caller lands with the other build-time indexes (89 s -> 63 s). - registrations() was computed twice in one export, once for the registration relation and again inside reg_key_fact (63 s -> 55 s). Every fact file is content-identical before and after (two differ in row order only, written from unsorted sets before this change too). Tests: java 329/329, python 287/287, facts_cache, latency, freshness, export_singleflight, front_door. Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
impact/path: the facts export stops paying per-row SQL (171 s to 55 s on 8.6k files)
find(question) is no longer offered as an MCP tool or advertised on any agent-facing surface (SKILL.md, AGENTS.md, the rules file, the install block, the CLI help, the hooks' hints). Search belongs to the agent; the graph's job is what search cannot do — callers, blast radius, call chains, test selection — and the hooks keep feeding that in where a search falls short. The verb stays dispatched (find is context underneath) for the hooks, the suites and anyone who already calls it; it is internal now, not public. The orientation hook's two find hints become impact and path hints, and the pre-search directive drops its find clause. The suites that pin the surface (surfaces, mcp, mcp_docs, mcp_first, manifests, front_door, repo_arg, freshness) pin the three-tool surface instead. Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
October 3, 2026 22:24
…e CLI surface too The integration branch removed find from the MCP tools and the agent docs on its own; those files are taken as they landed. The one difference kept from this branch: find is not a public CLI verb either — it moves to INTERNAL (the dispatcher still answers it as context), so the help, public_verbs, the typo hint and the SKILL.md section drop it, and tests/surfaces.py pins that. Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
find(question)is no longer an MCP tool and is no longer advertised on any agent-facing surface: SKILL.md (both copies), AGENTS.md, the rules file, the install block, the CLI help, and the hooks' hints. The surface isimpact,pathandtests.Why
Search is the agent's own; offering a search tool gets in its way. The graph's job is what text search cannot do — callers, blast radius, call chains, test selection — and the hooks keep feeding that in where a search falls short. Narrowing the surface also narrows what we optimize.
How
mcp/server.py: thefindtool is removed;impact,path,testsunchanged.findiscontextunderneath) for the hooks, the suites and existing callers; it moves from PUBLIC to INTERNAL in tests/surfaces.py, so the CLI help,public_verbsand the typo hint drop it automatically (both are derived from the help block).Verified
surfaces, manifests, mcp_docs, mcp, freshness, mcp_first (40/40), front_door (17/17) and repo_arg all pass locally;
packaging/copies.py --checkis clean.🤖 Generated with Claude Code