Skip to content

Find methods, accept module::method names, and group caller replies - #58

Merged
VirtualMachinist merged 7 commits into
mainfrom
feat/w14-answers
Nov 15, 2026
Merged

VirtualMachinist merged 7 commits into
mainfrom
feat/w14-answers

Conversation

@VirtualMachinist

Copy link
Copy Markdown
Member

Makes Phantom's answers easier for agents to find and act on. No resolution changes: every edge, row and score is identical to the base, and every existing reply key is unchanged.

What changes

  • find sees methods. find and find_symbols read the symbols table, so a bare method name returns its definitions. Before, methods were never found.

  • More name forms resolve. module::name now resolves when name is a method of a type in that module (for example app::watch_dir). It is tried only when the existing forms match nothing, so every name that resolved before resolves exactly as before.

  • did_you_mean. A not_found reply now suggests up to ten symbols with the same bare name.

  • Grouped replies. callers, callees and impact add display, callers_distinct, files and sites beside their existing keys. Under max_tokens these new keys are dropped first.

  • Descriptions. Each MCP tool description now says what it answers and which text search it replaces, with honest caveats:

    • co-change is decay-weighted and covers indexed Rust files only;
    • a caller reached only through a re-export or a macro may be missing.

    The server instructions are the trimmed "For agents" list.

Checks

fmt, clippy (--workspace --all-targets --all-features --locked -D warnings), cargo deny check and nextest all pass. No new package, no new crate, no .github change. Store schema 3, extractor version 12, envelope 1.

🤖 Generated with Claude Code

VirtualMachinist and others added 7 commits November 14, 2026 21:33
symbols_named answers find with items and methods alike, carrying the
symbol id, kind, visibility, file and line. symbols_matching accepts a
method named by any module boundary of its file module plus the bare
name. did_you_mean offers up to ten symbols whose bare name equals a
missed query's last segment. collect_rows moves to one shared helper.
find answers from the store rows named exactly the query, so methods are
found; an item hit keeps its bare name and old keys, and a method hit is
named with its module path and type. A lookup that finds nothing carries
data.did_you_mean, up to ten symbols whose bare name is the query's last
segment; its message is unchanged. callers, callees and impact add a
display per hit and, after the old keys, callers_distinct, files and
sites over the listed hits; show and impact --diff keep their old shape.
Under max_tokens those keys go first, as a whole, and the reply is then
cut exactly as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each tool description now leads with the question it answers and the grep
it replaces. cochange says it is decay-weighted, lift-filtered and over
indexed Rust files only, not a raw commit count, and points to git for
raw counts; callers says a caller reached through a re-export or a macro
may be missing. The server instructions become the trimmed For agents
list, 17 lines. The README documents the new reply keys, did_you_mean,
the method name forms, and the budget order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
find_one hands the ambiguous failure to its own builder, and find reads
the walk-kept rows through one helper. The budget no longer asks a reply
whether it had extra keys: it tries the whole reply first and sheds the
lean copy, which gives the same bytes. Tests pin that the new keys stay
exactly when the whole reply fits, at the boundary too; that impact names
each hit by its file; and that show lists 20 callers whole and flags the
21st.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A query the bare, type and module-path forms answer keeps exactly its
rows, so a free fn and a same-file method sharing a name no longer make
the module spelling ambiguous. The method form moves to a second
statement that runs only on an empty result, and the fault seam covers
both. A regression test pins the shared-name case.
Whole test items move unchanged into tests/find.rs, with the two shared
helpers made visible to the sibling: no logic, name or assertion change,
and every file stays under the line cap.
@VirtualMachinist
VirtualMachinist merged commit 21ba5c4 into main Nov 15, 2026
6 checks passed
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.

1 participant