Rust SQLite Lookup Instructions¶
Use the Rust lookup path before DSPy when the task is really about locating likely files or exact passages inside the tracked repository tree.
Required Workflow¶
make ask QUESTION="..."anduv run repo-rag ask --question "..."now perform this Rust lookup-first narrowing automatically before the broader repository retriever runs.- Refresh the local SQLite index with
make rust-lookup-indexafter tracked-file changes, or letmake rust-lookup QUERY="..."refresh it automatically when stale. - Start with short noun-phrase queries such as
dspy training,azure runtime, orfile summaries. - Use
make rust-lookup QUERY="..."orcargo run --manifest-path rust-cli/Cargo.toml -- lookup "..."to inspect direct path/content hits beforemake ask-dspy. - Escalate to
make ask-dspyonly when the question needs DSPy synthesis across multiple hits instead of the default lookup-first answer path.
Output Contract¶
- The index lives under the ignored path
artifacts/sqlite/repo-file-index.sqlite3. - Lookup output is ranked, line-oriented, and compact so agents can scan it quickly:
rank<TAB>path<TAB>lines=<n><TAB>score=<bm25><TAB>snippet. - The index only includes tracked UTF-8 text files below the size cap enforced by the Rust CLI.
Maintenance Notes¶
- Keep this guide aligned with
rust-cli/src/main.rs, theMakefile, andREADME.mdwhenever the lookup workflow changes. - When this workflow changes materially, update
README.AGENTS.mdand the relevant audit note indocs/audit/.