silica_search
Rank passages, functions, and constants by a question's words and vectors before grep or Read. Call for questions with no identifier to locate where behavior is decided.
Instructions
For a question that names no identifier (what a behaviour is, where
it is decided, why), call this before any grep (a Grep tool, or
grep or rg in a shell), Glob or Read: it ranks
passages and, in a source tree, the functions, methods, classes and
constants themselves, by the question's words and their vectors.
Do not grep for the words of a question; grep
for an exact string or a symbol name you already know. Each hit carries
its densest width-char window and line; a PDF's section is a page, so
on a PDF hit widen width (1200-1500) rather than reading the page.
matched_terms are the query terms in the hit; coverage is the share
of the query's idf mass they carry (near 1 = every rare term matched,
near 0 = only the common words); terms_absent are query terms found
nowhere in the corpus. No boolean "no answer" exists: read coverage and
matched_terms and decide to stop or rephrase. A hit the dense leg alone
found carries dense and coverage 0. In a source tree a hit's section
is the symbol, span its lines, and silica_read(path, section=<symbol>) serves its body.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | Max hits | |
| query | Yes | Concise question or description of the concept or behavior to find; preserve known names and identifiers | |
| width | No | Characters in each hit's window | |
| folder | No | Only documents under this root-relative folder | |
| per_doc | No | Max sections per document | |
| queries | No | More query groups, each ranked on its own and fused with `query` by rank: the concept in one, its identifiers in another |