/** * wiki_read — retrieve what the graph already knows, before doing the work again. * * The graph has had a deliberate WRITE path since wiki_write, and no read path at all. It is * read today only by the hooks, which inject a briefing at SessionStart and on touch. That is * enough for the main session and nothing else, and the gap has a concrete cost: * * A SUBAGENT NEVER RECEIVES SessionStart. Every subagent starts blind, no matter how much the * graph knows about the files it is about to open. Observed while reviewing one pull request: * eleven reviewer subagents each independently re-derived that a particular base-class method * is a setter rather than a gradient step, and the orchestrator had to hand-write that warning * into every prompt to stop them re-reporting it. The graph held the answer; nothing could ask. * * That is the case this tool exists for. A knowledge store meant to stand in for RAG, CLAUDE.md * and a memory system has to be readable by the agents that most need it, not only by the one * process that happens to receive a hook. * * Retrieval is the same traversal the hooks use — `findingsFor`, anchored on a file or symbol, * with the same ranking and the same exclusion of retired findings. Deliberately NOT a second, * divergent definition of "what is relevant here": if the ranking is wrong, it should be wrong * identically in both places and fixed once. */ export interface WikiReadOptions { /** * Files, or `file#symbol`, to retrieve findings for. This is the normal way to ask: an agent * about to work on a file asks what is known about that file. */ anchors?: string[]; /** * Read a project's graph without naming an anchor. Returns its standing rules and most * relevant findings — the equivalent of the briefing a session receives at start. */ projectRoot?: string; /** Maximum findings returned per anchor. Default 10. */ limit?: number; /** * Also return the machine-wide lessons that hold in any repository. Default true: a lesson * about how to run the tests is exactly what a fresh agent is most likely to get wrong, and * it is the tier least likely to be reachable from any anchor it happens to name. */ includeShared?: boolean; } export interface WikiFinding { type: string; claim: string; confidence: number; origin?: string; at?: number; anchors?: string[]; trigger?: string; } export interface WikiReadResult { success: boolean; project?: string; findings: WikiFinding[]; /** Lessons carried from other projects on this machine. */ shared: WikiFinding[]; /** Anchors that named nothing in the graph, so could not be traversed from. */ unresolvedAnchors: string[]; /** Present when the graph exists but holds nothing for this query — a real, common answer. */ note?: string; error?: string; } export declare function wikiRead(options?: WikiReadOptions): Promise; export declare const WIKI_READ_TOOL_DEFINITION: { name: string; description: string; annotations: { title: string; readOnlyHint: boolean; destructiveHint: boolean; idempotentHint: boolean; openWorldHint: boolean; }; inputSchema: { type: string; properties: { anchors: { type: string; items: { type: string; }; description: string; }; projectRoot: { type: string; description: string; }; limit: { type: string; description: string; }; includeShared: { type: string; description: string; }; }; }; }; //# sourceMappingURL=wiki-read.d.ts.map