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=$needle — Symbol 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:
- 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
- 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
Context
jrag find --fuzzywas 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) runsMATCH (s:Symbol) WHERE s.name=$needle OR s.fqn=$needle— Symbol nodes only, exact match only.NodeFilteronly hasfqn_prefix(FQN prefix viaSTARTS WITH); there is no name-prefix or name-contains path anywhere in the backend.So
--fuzzywas removed fromfindin 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:
LIKE) support tofind_by_name_or_fqn(e.g. amodeparam: exact | prefix | contains), with tests intest_ladybug_queries.py; then wirefind --fuzzy(exact → prefix → contains) injava_codebase_rag/jrag.py; orLadybugGraphand compose it in the CLI.Option 1 is smaller. Either keeps the CLI a thin layer.
Related
plans/active/PLAN-JRAG-CLI.md(PR-JRAG-1b)feat/cli