Skip to content

feat(code-intel): rank explore results, hide std calls in query, group arch by crate - #742

Merged
ajianaz merged 1 commit into
developfrom
feat/explore-ranking-arch
Nov 16, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/explore-ranking-arch

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

What

  • cora explore orders results exact name, then prefix, then substring, then FTS rank, applies the limit after ranking, prints "Showing N of M symbols" when cut, accepts --kind, and matches doc text only with --docs.
  • cora query hides std and core method names by default (--include-std shows them) and says how many calls were hidden. A project-defined name or an explicitly queried name is never hidden.
  • cora arch groups by crate (nearest Cargo.toml with a [package]), then module path, with call-edge counts between groups and an unattributed count for ambiguous names. The old per-directory list stays as modules in JSON.
  • cora routes prints how many files it searched and for which frameworks.

Why

explore fetch returned 50 noisy symbols with no ordering rule, query listed std method names that are never the answer, and arch grouped only by top-level directory, which says nothing about a multi-crate workspace. Refs #717 (the brain/embedding evaluation and the rest of the routes item are not part of this PR, so the issue stays open).

Testing

  • Unit tests for ranking order, truncation totals, --docs, --kind, the std filter (before the limit, project names kept), crate grouping on a two-crate workspace, and the routes summary.
  • On this repository: query "main -> *" drops from 257 to 206 rows with 52 std calls reported as hidden; explore index lists the module and function index first; arch reports modules with edge counts.
  • cargo fmt --all -- --check, cargo clippy --all-targets --features tree-sitter -- -D warnings, cargo test --features tree-sitter.

…p arch by crate

- explore: order exact name > prefix > substring > FTS rank, match names
  only unless --docs, validate --kind, print 'Showing N of M' when cut
- query: hide std/core method names unless the project defines them;
  --include-std shows them and the output counts what was hidden
- arch: group by Cargo package then module path (--depth), count calls
  between crates and between modules
- routes: state the frameworks searched and the number of files scanned

Refs #717
@ajianaz
ajianaz force-pushed the feat/explore-ranking-arch branch from b33666e to c1489cf Compare November 16, 2026 03:39
@ajianaz
ajianaz merged commit ca9534e into develop Nov 16, 2026
13 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