What It Does
Builds a BM25 full-text index of the project's source code. Agents can query it to find relevant files without reading the entire codebase.
How It Works
mithril scanwalks the project tree (respects .gitignore)- Each file is tokenized into terms
- A BM25 inverted index is built and stored in
.mithril/palantir.idx - Agents query with natural language → get ranked file paths
Use Case
When a user asks "fix the authentication bug", the agent searches the index for
"auth" → finds src/auth.rs, src/middleware/jwt.rs → reads only
the relevant files instead of scanning everything.