Skip to content

jrag find --fuzzy: name prefix/contains fallback (deferred from PR-JRAG-1b) #375

Description

@HumanBean17

Context

jrag find --fuzzy was specified in the JRAG-CLI plan (PR-JRAG-1b) as a jrag-side fallback: exact → name-prefix → name-contains on the identifier string, used when the exact match returns nothing.

Why it was deferred

The backend cannot support it faithfully today:

  • LadybugGraph.find_by_name_or_fqn (ladybug_queries.py) runs MATCH (s:Symbol) WHERE s.name=$needle OR s.fqn=$needleSymbol nodes only, exact match only.
  • NodeFilter only has fqn_prefix (FQN prefix via STARTS WITH); there is no name-prefix or name-contains path anywhere in the backend.
  • A client-side fallback is not feasible without a candidate-fetching method.

So --fuzzy was removed from find in PR-JRAG-1b rather than ship a flag that silently does less than advertised. It is listed in the plan`s Out-of-Scope.

What is needed to implement

Either:

  1. Add name prefix/contains (SQL LIKE) support to find_by_name_or_fqn (e.g. a mode param: exact | prefix | contains), with tests in test_ladybug_queries.py; then wire find --fuzzy (exact → prefix → contains) in java_codebase_rag/jrag.py; or
  2. Add a dedicated fuzzy/name-search method on LadybugGraph and compose it in the CLI.

Option 1 is smaller. Either keeps the CLI a thin layer.

Related

  • Plan: plans/active/PLAN-JRAG-CLI.md (PR-JRAG-1b)
  • Branch: feat/cli

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions