ollama_repo_brief
Repo brief. FLAGSHIP compound job. Produces an OPERATOR MAP of a repo: {repo_thesis, key_surfaces, architecture_shape, risk_areas, read_next, evidence, weak, coverage_notes, corpus_used}. Takes source_paths (typically README + key src entries + manifests + docs) and optionally a corpus for cross-cutting context. Corpus-sourced evidence items carry retrieval score. Optional corpus_min_evidence_score drops corpus chunks below the relevance floor before the model sees them. Not a research clone — research answers a specific question; repo_brief synthesizes orientation. Every key_surface and risk_area cites evidence. read_next is INVESTIGATIVE (files or sections to look at), never prescriptive fixes or refactors. Thin evidence → weak=true with coverage notes. If you pre-extracted claims via ollama_extract with a frame argument, drop off-topic items before assembling source_paths — there’s no in-brief topicality gate for path inputs.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
source_paths |
string[] | yes | — | Files the brief should read server-side. Typically README, key src/ entries, package/manifest files, docs. Claude does not preload them — that’s the context-saving shape. |
corpus |
string | no | — | Optional: named corpus (e.g. ‘handbook’, ‘doctrine’) for cross-cutting context beyond the repo’s own files. |
corpus_query |
string | no | — | Query used to pull chunks from the corpus. Defaults to ‘repo architecture and surfaces’ when unspecified. |
per_file_max_chars |
integer | no | — | Chars per source file (default 20k). |
max_key_surfaces |
integer | no | — | Cap on key_surfaces (default 8). |
max_risk_areas |
integer | no | — | Cap on risk_areas (default 5). |
max_read_next |
integer | no | — | Cap on read_next (default 8). |
corpus_min_evidence_score |
number | no | — | Minimum retrieval score (0–1) for a corpus chunk to enter evidence. Hits below the floor are dropped before the model sees them, with a counted note in coverage_notes. Absent → no relevance filter. |
Full input schema
Section titled “Full input schema”The JSON Schema below is generated from the same zod schema the server validates against at the wire — it cannot drift from runtime behavior.
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "source_paths": { "minItems": 1, "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "Files the brief should read server-side. Typically README, key src/ entries, package/manifest files, docs. Claude does not preload them — that's the context-saving shape." }, "corpus": { "description": "Optional: named corpus (e.g. 'handbook', 'doctrine') for cross-cutting context beyond the repo's own files.", "type": "string", "pattern": "^[a-zA-Z0-9_-]+$" }, "corpus_query": { "description": "Query used to pull chunks from the corpus. Defaults to 'repo architecture and surfaces' when unspecified.", "type": "string", "minLength": 1 }, "per_file_max_chars": { "description": "Chars per source file (default 20k).", "type": "integer", "minimum": 1000, "maximum": 200000 }, "max_key_surfaces": { "description": "Cap on key_surfaces (default 8).", "type": "integer", "minimum": 1, "maximum": 20 }, "max_risk_areas": { "description": "Cap on risk_areas (default 5).", "type": "integer", "minimum": 1, "maximum": 10 }, "max_read_next": { "description": "Cap on read_next (default 8).", "type": "integer", "minimum": 1, "maximum": 15 }, "corpus_min_evidence_score": { "description": "Minimum retrieval score (0–1) for a corpus chunk to enter evidence. Hits below the floor are dropped before the model sees them, with a counted note in coverage_notes. Absent → no relevance filter.", "type": "number", "minimum": 0, "maximum": 1 } }, "required": [ "source_paths" ]}Envelope
Section titled “Envelope”Every tool returns the standard envelope — tier_used, model, tokens_in/tokens_out, elapsed_ms, backend provenance, warnings. See Envelope & tiers.
Source
Section titled “Source”Schema + handler: src/tools/repoBrief.ts · registration: src/index.ts
Back to the Tool Reference.