Searching
Not sure which kit
feature to reach for? Use this page as a mental map of
search-and-discovery tools – from plain-text grep all the way to LLM-powered
semantic retrieval.
Decision table
Section titled “Decision table”Your goal | Best tool | One-liner | Docs |
---|---|---|---|
Find an exact string or regex | repo.search_text() | repo.search_text("JWT", "*.go") | Text search |
List symbols in a file | repo.extract_symbols() | repo.extract_symbols("src/db.py") | Repository API |
See where a function is used | repo.find_symbol_usages() | repo.find_symbol_usages("login") | ^ |
Get a concise overview of a file / function | Summarizer | summarizer.summarize_file(path) | Code summarization |
Semantic search over raw code chunks | VectorSearcher | repo.search_semantic() | Semantic search |
Semantic search over LLM summaries | DocstringIndexer + SummarySearcher | see below | Docstring index |
Build an LLM prompt with only the relevant code | ContextAssembler | assembler.from_chunks(chunks) | Context assembly |
Tip: You can mix-and-match. For instance, run a docstring search first, then feed the matching files into
ContextAssembler
for an LLM chat.
Approaches in detail
Section titled “Approaches in detail”1. Plain-text / regex search
Section titled “1. Plain-text / regex search”Fast, zero-setup, works everywhere. Use when you know what string you’re looking for.
repo.search_text("parse_jwt", file_pattern="*.py")
2. Symbol indexing
Section titled “2. Symbol indexing”extract_symbols()
uses tree-sitter queries (Python, JS, Go, etc.) to list
functions, classes, variables – handy for nav trees or refactoring tools.
3. LLM summarization
Section titled “3. LLM summarization”Generate natural-language summaries for files, classes, or functions with
Summarizer
. Great for onboarding or API docs.
4. Vector search (raw code)
Section titled “4. Vector search (raw code)”VectorSearcher
chunks code (symbols or lines) → embeds chunks → stores them in
a local vector database. Good when wording of the query is similar to the
code.
5. Docstring vector search
Section titled “5. Docstring vector search”DocstringIndexer
first summarizes code, then embeds the summary. The
resulting vectors capture intent, not syntax; queries like “retry back-off
logic” match even if the code uses exponential delays without those words.
Still unsure? Start with text-search (cheap), move to vector search (smart), and layer summaries when you need meaning over matching.