build_corpus
Save a snapshot of project context to disk for reusing in LLM queries without re-running the pack pipeline.
Instructions
Pack a slice of project context into a persistent corpus on disk so future query_corpus calls can prime an LLM with the same snapshot without re-running the pack pipeline. Mutates the corpora store; returns JSON with the saved manifest. Pair with query_corpus for "ask this codebase" workflows.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Corpus slug — alphanumeric + dash + underscore, ≤64 chars, must start with a letter or digit | |
| scope | Yes | Pack scope: project (whole repo), module (subdirectory), feature (NL query rank) | |
| module_path | No | Subdirectory path when scope=module (e.g. "src/auth") | |
| feature_query | No | Natural-language query when scope=feature (e.g. "JWT auth and refresh flow") | |
| token_budget | No | Token budget for the packed body (default 50000) | |
| pack_strategy | No | Pack strategy: most_relevant (default; feature/PageRank ranked), core_first (PageRank wins, surfaces architecturally central code), compact (signatures only — drops source bodies, lets outlines cover much more of the repo per token) | |
| description | No | Optional human-readable description stored on the manifest | |
| overwrite | No | Replace an existing corpus with the same name (default false) |