Turbocharge Claude Code, Cursor, Codex, Gemini & every coding agent: faster, cheaper, with contextual understanding specific to your codebase.
TypeScript ai-agentsanthropicclaude-codeclicode-graphcodexcontext-engineeringcursordeveloper-toolsgeminiknowledge-graphllmmcpmcp-serveropen-sourceopenaitree-sitter
token-saving pass: gated pointers-only hook, crux-first ask, skeleton view, 3-arm bench with committed results
anirudhkumar-nanonets94d1068591d0
diff --git a/.claude/skills/graft/SKILL.md b/.claude/skills/graft/SKILL.mdindex be6fc768..877c3217 100644--- a/.claude/skills/graft/SKILL.md+++ b/.claude/skills/graft/SKILL.md@@ -16,9 +16,13 @@ same understanding costs thousands.- Ask: `graft ask "<your task, in plain words>"` — returns the relevant nodes,ranked, with file:line pointers. Add `--source` to inline the actual code at- each span, so the result IS the code you need — no separate file read.+ each span, so the result IS the code you need — no separate file read. By+ default `--source` inlines each hit's crux (the ≤8-line core of the+ definition, marked as such); add `--full` only when the crux isn't enough.Ask is cheap (<1s) — re-ask with different phrasings for each sub-question,and use structural forms too: `graft ask "who calls <symbol>"`.+- Skim a file's API without reading it: `graft skeleton <file>` — every+ definition's signature + span in ~200 tokens, ~10× cheaper than the file.- Or explore as usual: grep / ls / cat inside `graft/`. A grep for any concept,symbol, or filename hits the node that covers it; `graft/INDEX.md` lists themall.diff --git a/README.md b/README.mdindex 5d50e4e4..633b1fa0 100644--- a/README.md+++ b/README.md@@ -17,8 +17,8 @@<img src="https://img.shields.io/badge/telemetry-none-546FFF?style=for-the-badge" /></p>-<!-- placeholder: numbers pending a committed benchmark run, see Benchmark below -->-**31% fewer tool calls · 23% less cost · 17% lower latency.** That is what an agent gets from reading the graph first instead of going in cold.+<!-- numbers from the committed run in bench/results/ (2026-07-22, 162 agent runs, 2 repos) — see Benchmark below -->+**32% less cost · 46% fewer tool calls · 60% lower latency** with the graph bundle pushed up front, at equal correctness — or **16% less cost with correctness up 5 points** when the agent pulls from the graph on demand. Measured against the same agent going in cold.</div>@@ -245,22 +245,23 @@ normalized on load — no regeneration needed.## Benchmark-<!-- placeholder: fill from a committed bench/results/ run before launch -->+The claim Graft has to earn is simple: an agent that gets its context from the graph is cheaper and faster without getting more answers wrong. The harness runs every task through three arms of the same Claude Sonnet 5 agent with the same file tools: **cold** (explores from zero), **graph (push)** (a `graft ask --source` bundle injected up front), and **graft (pull)** (graft_ask/graft_skeleton tools, nothing injected — context paid for only when asked). An Opus 4.8 judge scores correctness with a required-keyword floor so a fast-but-wrong answer cannot win. Cost is cache-aware (reads ≈0.1×, writes 1.25×) — the billing model agents actually run under.-The claim Graft has to earn is simple: an agent that reads the graph first is cheaper and faster without getting more answers wrong. The harness runs every task twice through the same agent with the same file tools. One run is **cold** (it explores from zero) and one is **graph** (it gets the `graft/` bundle up front). A separate model judges correctness, with a required-keyword floor so a fast-but-wrong answer cannot win.+Committed run: `bench/results/2026-07-22T13-19-14-246Z` — 162 runs across two repos (graft itself and a real Node/Express auth service), 3 trials each, tasks split between localized (single-file) and multi-file questions.-| Metric | Cold | Graph | Change |+| Metric (mean/task) | Cold | Graph (push) | Graft (pull) ||---|---|---|---|-| Tool calls | _TBD_ | _TBD_ | **−31%** |-| Cost | _TBD_ | _TBD_ | **−23%** |-| Latency | _TBD_ | _TBD_ | **−17%** |-| Correctness | _TBD_ | _TBD_ | _at least as good as cold_ |+| Cost ($) | 0.0429 | **0.0292 (−32%)** | 0.0362 (−16%) |+| Uncached input tokens | 8,070 | **4,650 (−42%)** | 5,965 (−26%) |+| Tool calls | 4.2 | **2.3 (−46%)** | 4.2 (−1%) |+| Latency (s) | 39.8 | **15.8 (−60%)** | 39.5 (−1%) |+| Correctness | 93% | 93% | **98% (+5 pts)** |-_The numbers above are placeholders pending a committed run._ Reproduce it yourself:+Push is the cost/latency win; pull is the correctness win (and never lost to cold anywhere, including single-file tasks). On one corpus push traded 3 correctness points for its savings — the per-corpus and per-locality splits are in the committed results, not averaged away. Reproduce it yourself:```bash-npm run bench -- --smoke # 1 corpus, 1 task, a quick plumbing check-npm run bench # full: all corpora, all tasks+npm run bench -- --smoke # 1 corpus, 1 task, all arms — a quick plumbing check+npm run bench # full: all corpora, all tasks, 3 arms × 3 trials```See [`bench/README.md`](bench/README.md) for the method and how to add your own repo.diff --git a/bench/README.md b/bench/README.mdindex 9bf39367..f384237e 100644--- a/bench/README.md+++ b/bench/README.md@@ -1,61 +1,81 @@# Benchmark harness-Measures the product's central claim: **an agent that reads the context graph before a task+Measures the product's central claim: **an agent that gets its context from the graft graphcosts less (tokens + latency) than an agent that explores from cold — without losing correctness.**+And, just as deliberately, it measures where that claim is expected to FAIL: localized+single-file tasks, where any pre-built context is plausibly net overhead.## What it does-For each corpus it ingests the graph once, then runs every task through two arms of the **same**-Claude Sonnet 5 agent loop with the **same** filesystem tools (`read_file`, `grep`, `glob`, `list_dir`):+For each repo corpus it builds the wiring graph once (Tier-1 tree-sitter, $0, keyless, into a+temp dir — the corpus repo is never written to), then runs every task through three arms of the+**same** Claude Sonnet 5 agent loop with the **same** filesystem tools+(`read_file`, `grep`, `glob`, `list_dir`):- **Cold** — the agent starts from zero and explores to find the answer.-- **Graph** — the agent additionally gets the `engine.read(question)` context bundle injected up front.--Every run records input/output tokens, tool-call count, wall-clock, and a correctness score. Correctness-is scored by an **Opus 4.8 judge** (against a reference answer) gated by a **required-keyword** floor, so a-fast-but-wrong answer can't score a win. Each task runs N trials to average out agent stochasticity.--The result is a per-corpus table (cold vs graph, with deltas) — the artifact for the README/launch.+- **Graph (push)** — the agent additionally gets a `graft ask --source` bundle injected up+ front. The bundle is paid whether or not it helps — this is the "inject context every prompt"+ model.+- **Graft (pull)** — nothing injected; the agent additionally gets `graft_ask` /+ `graft_skeleton` tools over the prebuilt graph and pays for graph context only when it asks.+ This is the just-in-time model the evidence favors.++Every run records uncached input / output / cached tokens (via Anthropic cache-control+breakpoints, mirroring how Claude Code bills), tool-call count, wall-clock, and a correctness+score. Correctness is scored by an **Opus 4.8 judge** (against a reference answer) gated by a+**required-keyword** floor, so a fast-but-wrong answer can't score a win. Each task runs N+trials to average out agent stochasticity.++Tasks carry a **locality** label (`localized` = answerable from one file, `multi-file`), and the+report splits every corpus's table by locality — the honest headline is the split, not the+average.## Requirements-- `OPENROUTER_API_KEY` — that's it. The agent (`anthropic/claude-sonnet-5`), judge- (`anthropic/claude-opus-4.8`), and graph extraction all run through OpenRouter. Embeddings run- locally in-process. Override the models with `BENCH_AGENT_MODEL` / `BENCH_JUDGE_MODEL`.+- `OPENROUTER_API_KEY` — agent (`anthropic/claude-sonnet-5`) and judge+ (`anthropic/claude-opus-4.8`) run through OpenRouter. Graph building is keyless.+ Override the models with `BENCH_AGENT_MODEL` / `BENCH_JUDGE_MODEL`.## Run```bash-npm run bench -- --smoke # 1 corpus, 1 task, 1 trial — plumbing check-npm run bench # full: all corpora, all tasks, 3 trials-npm run bench -- --corpora unified-accounts-login-server --tasks 3 --trials 2-npm run bench -- --arms graph # a single arm+npm run bench -- --smoke # context-engine, 1 task, all arms, 1 trial — plumbing check+npm run bench # full: all corpora, all tasks, 3 arms, 3 trials+npm run bench -- --corpora context-engine --tasks 3 --trials 2+npm run bench -- --arms cold,pull # a subset of arms```Results are written to `bench/results/<timestamp>.json` (raw per-trial rows) and `<timestamp>.md`-(the summary table, also printed to stdout).+(the summary table, also printed to stdout). Judge on the **cost** column (cache-aware:+reads ≈0.1×, writes 1.25×) — "total tokens" overstates any arm that front-loads cacheable context.## Corpora-Defined in `bench/tasks.ts`. The two code repos are expected as **siblings** of this repo under the-same parent directory; override any path with `BENCH_REPO_<ID_UPPER>` (dashes → underscores), e.g.-`BENCH_REPO_NEW_WEBSITE=/path/to/site`.+Defined in `bench/tasks.ts`.++- `context-engine` — graft's own repo; always present, so the bench is self-contained.+ Mixes localized and multi-file tasks; ground truth cited from source at authoring time.+- `unified-accounts-login-server` — the Nanonets unified auth service (Node/Express); expected+ as a **sibling** of this repo (override with `BENCH_REPO_UNIFIED_ACCOUNTS_LOGIN_SERVER`).+- `new-website` — the Nanonets marketing site (Next.js App Router, ~342 `.tsx`); sibling,+ override with `BENCH_REPO_NEW_WEBSITE`. Its README is `create-next-app` boilerplate, so every+ answer requires reading code — a clean cold-arm test.+- `northwind-docs` — currently **skipped**: the wiring graph indexes code only (no docs+ ingestion in the current engine).-- `unified-accounts-login-server` — the Nanonets unified auth service (Node/Express). Small, so cheap to- ingest; ground truth authored from the source (Auth0 flow, session JWT, redirect logic, config).-- `new-website` — the Nanonets marketing site (Next.js App Router, ~342 `.tsx`). Its README is- `create-next-app` boilerplate, so every answer requires reading code — a clean cold-arm test.-- `northwind-docs` — the demo PDFs in `examples/demo-docs`; ground truth from `scripts/make-demo-pdfs.mjs`.- A knowledge-folder data point (segment 3).+Missing corpora are skipped with a message, never a failure.-**Fairness note:** `ingestRepo` summarizes only code files (`CODE_EXTENSIONS`), so README / markdown /-`package.json` / CSS never enter the graph, while the cold agent *can* read them. Tasks are therefore-written to require multi-file **code** understanding, not README/config lookups.+**Fairness note:** the wiring graph indexes only code tree-sitter can parse, so README /+markdown / `package.json` / CSS never enter the graph, while the cold agent *can* read them.+Code tasks are therefore written to require **code** understanding, not README/config lookups.-To add another repo (e.g. `assign`): clone/point at it, add a `kind: "repo"` corpus entry in-`bench/tasks.ts` with tasks whose answers you can verify from its docs or code.+To add another repo: add a `kind: "repo"` corpus entry in `bench/tasks.ts` with tasks whose+answers you can verify from its code, each labeled with `locality`.## Reading the result honestly-The claim holds only if the graph arm is **both** materially cheaper/faster **and** at least as correct.-If it's cheaper but less correct, that's a real finding to report — not something the harness hides.+The claim holds only if a graft arm is **both** materially cheaper/faster **and** at least as+correct — per locality class. Expected shape based on external evidence and graft's earlier+hono-bench: pull ≥ cold everywhere or nearly free; push helps on multi-file and hurts on+localized. If push wins localized too, or pull loses anywhere, that's a real finding to report —+not something the harness hides.diff --git a/bench/agent.ts b/bench/agent.tsindex 1231f473..0084642d 100644--- a/bench/agent.ts+++ b/bench/agent.ts@@ -12,6 +12,7 @@ import type OpenAI from "openai";import { readFileSync, statSync, readdirSync, realpathSync } from "node:fs";import { resolve, relative, join, isAbsolute, sep } from "node:path";import { SKIP_DIRS, MAX_FILE_BYTES } from "../src/ingest/fs.js";+import { ask, formatAsk, skeleton, formatSkeleton } from "../src/ask/ask.js";import { makeClient, AGENT_MODEL } from "./llm.js";export { AGENT_MODEL };@@ -30,8 +31,12 @@ export interface RunAgentOptions {/** Directory the filesystem tools are confined to. */root: string;question: string;- /** When set (graph arm), this bundle is injected before the question. */+ /** When set (graph/push arm), this bundle is injected before the question. */contextBundle?: string;+ /** When set (pull arm), the agent additionally gets graft_ask/graft_skeleton+ * tools over the prebuilt graph at this contextDir — nothing injected up+ * front; the agent pays for graph context only when it asks for it. */+ graft?: { contextDir: string };maxIterations?: number;client?: OpenAI;}@@ -161,12 +166,56 @@ const TOOLS: OpenAI.Chat.Completions.ChatCompletionTool[] = [},];+/** Extra tools for the pull arm: the graft graph as an on-demand service. */+const GRAFT_TOOLS: OpenAI.Chat.Completions.ChatCompletionTool[] = [+ {+ type: "function",+ function: {+ name: "graft_ask",+ description:+ "Query this repo's prebuilt context graph in plain words. Returns ranked symbols/concepts with exact file:line spans and the relevant source inlined — the cheapest way to locate and understand code. Prefer it over grep/read_file for orientation; use structural phrasings too ('who calls X').",+ parameters: {+ type: "object",+ properties: {+ query: { type: "string", description: "What you want to understand, in plain words" },+ limit: { type: "integer", description: "Max results (default 5)" },+ full: { type: "boolean", description: "Inline whole definition spans instead of crux excerpts" },+ },+ required: ["query"],+ },+ },+ },+ {+ type: "function",+ function: {+ name: "graft_skeleton",+ description:+ "Signatures-only view of one file — every definition's signature + line span, ~10× cheaper than reading the file.",+ parameters: {+ type: "object",+ properties: { file: { type: "string", description: "Repo-relative file path" } },+ required: ["file"],+ },+ },+ },+];+const MAX_GREP_MATCHES = 100;const MAX_GLOB_RESULTS = 200;const MAX_READ_LINES = 400;-function runTool(root: string, name: string, input: any): string {+function runTool(root: string, name: string, input: any, graft?: { contextDir: string }): string {try {+ if (graft && name === "graft_ask") {+ const limit = typeof input.limit === "number" ? input.limit : 5;+ const r = ask(root, String(input.query ?? ""), {+ contextDir: graft.contextDir, limit, source: true, full: input.full === true,+ });+ return formatAsk(r);+ }+ if (graft && name === "graft_skeleton") {+ return formatSkeleton(skeleton(root, String(input.file ?? ""), { contextDir: graft.contextDir }));+ }if (name === "read_file") {const file = safePath(root, String(input.path));const lines = readFileSync(file, "utf8").split("\n");@@ -245,8 +294,13 @@ export async function runAgent(opts: RunAgentOptions): Promise<AgentResult> {// prior transcript is a cache read rather than re-billed at full price —// which is how Claude Code actually runs, and what makes the token numbers fair.const cc = { type: "ephemeral" as const };+ const systemText = opts.graft+ ? SYSTEM_PROMPT ++ " This repo also has a prebuilt context graph: the graft_ask and graft_skeleton tools query it and are much cheaper than grep/read_file for finding and understanding code."+ : SYSTEM_PROMPT;+ const tools = opts.graft ? [...TOOLS, ...GRAFT_TOOLS] : TOOLS;const messages: any[] = [- { role: "system", content: [{ type: "text", text: SYSTEM_PROMPT, cache_control: cc }] },+ { role: "system", content: [{ type: "text", text: systemText, cache_control: cc }] },{ role: "user", content: [{ type: "text", text: userText, cache_control: cc }] },];@@ -271,7 +325,7 @@ export async function runAgent(opts: RunAgentOptions): Promise<AgentResult> {model: AGENT_MODEL,max_tokens: 4096,messages,- tools: TOOLS,+ tools,});const u: any = resp.usage ?? {};const cached = u.prompt_tokens_details?.cached_tokens ?? 0;@@ -301,7 +355,7 @@ export async function runAgent(opts: RunAgentOptions): Promise<AgentResult> {/* leave input empty; runTool will error informatively */}toolLog.push({ name: tc.function.name, input });- const result = runTool(root, tc.function.name, input);+ const result = runTool(root, tc.function.name, input, opts.graft);messages.push({ role: "tool", tool_call_id: tc.id, content: [{ type: "text", text: result }] });}slideCacheBreakpoint();diff --git a/bench/report.ts b/bench/report.tsindex 3f8af25c..056422b4 100644--- a/bench/report.ts+++ b/bench/report.ts@@ -3,11 +3,15 @@* table that is the actual launch deliverable: per corpus, cold vs graph, with* the token / latency / correctness deltas that either back the pitch or don't.*/+export type Arm = "cold" | "graph" | "pull";+export interface Row {corpus: string;taskId: string;- arm: "cold" | "graph";+ arm: Arm;trial: number;+ /** "localized" (single-file answer) or "multi-file". */+ locality: string;tokensInput: number;tokensOutput: number;tokensTotal: number;@@ -77,49 +81,95 @@ function fmt(n: number): string {return n >= 1000 ? Math.round(n).toLocaleString() : n.toFixed(n < 10 ? 1 : 0);}+const ARM_LABEL: Record<Arm, string> = { cold: "Cold", graph: "Graph (push)", pull: "Graft (pull)" };++/** The metric table for one row subset, one column per arm plus a Δ-vs-cold+ * column for every non-cold arm present. */+function metricTable(rows: Row[], arms: Arm[]): string[] {+ const agg = new Map<Arm, ArmAgg>(arms.map((a) => [a, aggregate(rows.filter((r) => r.arm === a))]));+ const cold = agg.get("cold");++ const header = ["Metric", ...arms.map((a) => ARM_LABEL[a])];+ const cells = (label: string, value: (a: ArmAgg) => number, render: (v: number) => string, delta?: (c: number, x: number) => string) => {+ const out = [label];+ for (const a of arms) {+ const v = value(agg.get(a)!);+ let cell = render(v);+ if (delta && cold && a !== "cold") cell += ` (${delta(value(cold), v)})`;+ out.push(cell);+ }+ return `| ${out.join(" | ")} |`;+ };++ const lines = [`| ${header.join(" | ")} |`, `|${header.map(() => "---").join("|")}|`];+ lines.push(cells("Cost / task ($)", (a) => a.cost, (v) => v.toFixed(4), pctDelta));+ lines.push(cells("Uncached input tokens", (a) => a.tokensInput, fmt, pctDelta));+ lines.push(cells("Total tokens (incl. cached)", (a) => a.tokensTotal, fmt, pctDelta));+ lines.push(cells("Output tokens", (a) => a.tokensOutput, fmt, pctDelta));+ lines.push(cells("Tool calls", (a) => a.toolCalls, fmt, pctDelta));+ lines.push(cells("Wall-clock (s)", (a) => a.wallMs, (v) => (v / 1000).toFixed(1), pctDelta));+ lines.push(cells("Correctness", (a) => a.correctness, (v) => (v * 100).toFixed(0) + "%"));+ lines.push(cells("Judge score", (a) => a.score, (v) => v.toFixed(2)));+ return lines;+}++/** Cost + correctness verdict for one non-cold arm vs cold. */+function verdictFor(label: string, c: ArmAgg, g: ArmAgg): string {+ const cheaper = g.cost < c.cost;+ const correctnessHeld = g.correctness >= c.correctness - 0.001;+ return cheaper && correctnessHeld+ ? `✅ ${label} is cheaper (${pctDelta(c.cost, g.cost)} cost) and correctness held or improved.`+ : !cheaper && g.correctness > c.correctness + 0.001+ ? `➖ ${label} costs more (${pctDelta(c.cost, g.cost)}) but is more correct (+${((g.correctness - c.correctness) * 100).toFixed(0)} pts) — a quality win, not a cost win.`+ : cheaper+ ? `⚠️ ${label} is cheaper but correctness dropped ${((c.correctness - g.correctness) * 100).toFixed(0)} pts — not a clean win.`+ : `❌ ${label} costs more with no correctness gain here.`;+}+export function buildMarkdown(rows: Row[]): string {const corpora = [...new Set(rows.map((r) => r.corpus))];+ const armOrder: Arm[] = ["cold", "graph", "pull"];const lines: string[] = [];- lines.push("# Context Graph Engine — Benchmark Results", "");+ lines.push("# graft — Benchmark Results", "");lines.push(`Agent: Claude Sonnet 5 · Judge: Claude Opus 4.8 · ${rows.length} agent runs total.`,"",- "Each cell is the mean across all tasks × trials for that corpus/arm. " +- "**Cold** = agent explores with filesystem tools from zero. **Graph** = same agent, " +- "same tools, plus the graph context bundle injected up front.",+ "Each cell is the mean across all tasks × trials for that subset/arm; Δ is vs cold. " ++ "**Cold** = agent explores with filesystem tools from zero. **Graph (push)** = same agent, " ++ "same tools, plus a `graft ask --source` bundle injected up front. **Graft (pull)** = same " ++ "agent plus graft_ask/graft_skeleton tools over the prebuilt graph — nothing injected; " ++ "graph context is paid only when the agent asks for it.",+ "",+ "Judge on **cost** (cache-aware: reads ≈0.1×, writes 1.25×) + correctness — \"total tokens\" " ++ "overstates any arm that front-loads cacheable context.","",);for (const corpus of corpora) {- const cold = rows.filter((r) => r.corpus === corpus && r.arm === "cold");- const graph = rows.filter((r) => r.corpus === corpus && r.arm === "graph");- const c = aggregate(cold);- const g = aggregate(graph);+ const inCorpus = rows.filter((r) => r.corpus === corpus);+ const arms = armOrder.filter((a) => inCorpus.some((r) => r.arm === a));lines.push(`## ${corpus}`, "");- lines.push("| Metric | Cold | Graph | Δ |", "|---|---|---|---|");- lines.push(`| Total tokens (incl. cached) | ${fmt(c.tokensTotal)} | ${fmt(g.tokensTotal)} | ${pctDelta(c.tokensTotal, g.tokensTotal)} |`);- lines.push(`| Uncached input tokens | ${fmt(c.tokensInput)} | ${fmt(g.tokensInput)} | ${pctDelta(c.tokensInput, g.tokensInput)} |`);- lines.push(`| Output tokens | ${fmt(c.tokensOutput)} | ${fmt(g.tokensOutput)} | ${pctDelta(c.tokensOutput, g.tokensOutput)} |`);- lines.push(`| Tool calls | ${fmt(c.toolCalls)} | ${fmt(g.toolCalls)} | ${pctDelta(c.toolCalls, g.toolCalls)} |`);- lines.push(`| Wall-clock (s) | ${(c.wallMs / 1000).toFixed(1)} | ${(g.wallMs / 1000).toFixed(1)} | ${pctDelta(c.wallMs, g.wallMs)} |`);- lines.push(`| Cost / task ($) | ${c.cost.toFixed(4)} | ${g.cost.toFixed(4)} | ${pctDelta(c.cost, g.cost)} |`);- lines.push(`| Correctness | ${(c.correctness * 100).toFixed(0)}% | ${(g.correctness * 100).toFixed(0)}% | ${(g.correctness * 100 - c.correctness * 100).toFixed(0)} pts |`);- lines.push(`| Judge score | ${c.score.toFixed(2)} | ${g.score.toFixed(2)} | ${(g.score - c.score).toFixed(2)} |`);- lines.push("");-- // Judge on COST (cache-aware) + correctness — the economic reality. "Total tokens"- // includes cache reads billed at ~0.1×, so it overstates the graph arm's true cost.- const cheaper = g.cost < c.cost;- const correctnessHeld = g.correctness >= c.correctness - 0.001;- const verdict = cheaper && correctnessHeld- ? `✅ Graph is cheaper (${pctDelta(c.cost, g.cost)} cost) and correctness held or improved.`- : !cheaper && g.correctness > c.correctness + 0.001- ? `➖ Graph costs more (${pctDelta(c.cost, g.cost)}) but is more correct (+${((g.correctness - c.correctness) * 100).toFixed(0)} pts) — a quality win, not a cost win.`- : cheaper- ? `⚠️ Graph is cheaper but correctness dropped ${((c.correctness - g.correctness) * 100).toFixed(0)} pts — not a clean win.`- : `❌ Graph costs more with no correctness gain on this corpus.`;- lines.push(verdict, "");+ lines.push(...metricTable(inCorpus, arms), "");++ const cold = aggregate(inCorpus.filter((r) => r.arm === "cold"));+ if (arms.includes("cold")) {+ for (const a of arms.filter((x) => x !== "cold")) {+ lines.push(verdictFor(ARM_LABEL[a], cold, aggregate(inCorpus.filter((r) => r.arm === a))));+ }+ lines.push("");+ }++ // The locality split is the honest headline: pre-built context is expected+ // to help on multi-file questions and to be net overhead on localized ones.+ const localities = [...new Set(inCorpus.map((r) => r.locality))];+ if (localities.length > 1) {+ for (const loc of localities.sort()) {+ const sub = inCorpus.filter((r) => r.locality === loc);+ lines.push(`### ${corpus} — ${loc} tasks only`, "");+ lines.push(...metricTable(sub, arms), "");+ }+ }}return lines.join("\n");}diff --git a/bench/run.ts b/bench/run.tsindex 2119294a..308818ed 100644--- a/bench/run.ts+++ b/bench/run.ts@@ -4,50 +4,64 @@* npm run bench # full run: all corpora, all tasks, 3 trials* npm run bench -- --smoke # 1 corpus, 1 task, 1 trial (plumbing check)* npm run bench -- --corpora context-engine --tasks 3 --trials 2- * npm run bench -- --arms graph # one arm only+ * npm run bench -- --arms cold,pull # subset of arms*- * Needs OPENROUTER_API_KEY only — the agent (Sonnet 5), judge (Opus 4.8), and- * graph extraction all run through OpenRouter. Override models with- * BENCH_AGENT_MODEL / BENCH_JUDGE_MODEL.+ * Three arms, identical agent loop:+ * cold — filesystem tools only, from zero.+ * graph — same, plus a pre-computed `graft ask --source` bundle injected+ * up front (push: the bundle is paid whether or not it helps).+ * pull — same tools plus graft_ask/graft_skeleton over the prebuilt graph;+ * nothing injected — graph context is paid only when requested.+ *+ * Needs OPENROUTER_API_KEY for the agent (Sonnet 5) and judge (Opus 4.8).+ * The graph itself builds keyless (Tier-1 tree-sitter, $0) into a temp dir —+ * corpora repos are never written to. Override models with BENCH_AGENT_MODEL /+ * BENCH_JUDGE_MODEL.*/import "dotenv/config";-import { mkdtempSync, mkdirSync, writeFileSync, copyFileSync, readdirSync, rmSync } from "node:fs";+import { existsSync, mkdtempSync, mkdirSync, writeFileSync, rmSync } from "node:fs";import { tmpdir } from "node:os";-import { join, dirname, resolve, basename } from "node:path";+import { join, dirname } from "node:path";import { fileURLToPath } from "node:url";-import { Graft } from "../src/index.js";-import { DOC_EXTENSIONS } from "../src/ingest/fs.js";-import { extractPdfText, isPdfPath } from "../src/ingest/pdf.js";-import { CORPORA, type Corpus } from "./tasks.js";+import { buildGraph } from "../src/graph/build.js";+import { ask, formatAsk } from "../src/ask/ask.js";+import { CORPORA } from "./tasks.js";import { runAgent } from "./agent.js";import { judge } from "./judge.js";import { makeClient } from "./llm.js";-import { buildMarkdown, type Row } from "./report.js";+import { buildMarkdown, type Row, type Arm } from "./report.js";const here = dirname(fileURLToPath(import.meta.url));+const ALL_ARMS: Arm[] = ["cold", "graph", "pull"];+interface Args {corpora?: string[];tasks?: number;trials: number;- arms: Array<"cold" | "graph">;+ arms: Arm[];concurrency: number;}function parseArgs(argv: string[]): Args {- const a: Args = { trials: 3, arms: ["cold", "graph"], concurrency: 6 };+ const a: Args = { trials: 3, arms: [...ALL_ARMS], concurrency: 6 };for (let i = 0; i < argv.length; i++) {const arg = argv[i];if (arg === "--smoke") {- a.corpora = ["unified-accounts-login-server"]; // smallest corpus — cheapest plumbing check+ a.corpora = ["context-engine"]; // self-contained — always presenta.tasks = 1;a.trials = 1;} else if (arg === "--corpora" || arg === "--repos") a.corpora = argv[++i].split(",");else if (arg === "--tasks") a.tasks = Number(argv[++i]);else if (arg === "--trials") a.trials = Number(argv[++i]);- else if (arg === "--arms") a.arms = argv[++i].split(",") as Array<"cold" | "graph">;+ else if (arg === "--arms") a.arms = argv[++i].split(",") as Arm[];else if (arg === "--concurrency") a.concurrency = Math.max(1, Number(argv[++i]));}+ const bad = a.arms.filter((x) => !ALL_ARMS.includes(x));+ if (bad.length) {+ console.error(`Unknown arm(s): ${bad.join(", ")}. Valid: ${ALL_ARMS.join(", ")}`);+ process.exit(1);+ }return a;}@@ -65,26 +79,10 @@ async function pool<T, R>(items: T[], n: number, fn: (item: T) => Promise<R>): Preturn results;}-/** For a docs corpus, build a temp dir of plaintext the cold agent can read/grep (PDFs → .txt). */-async function makeDocsWorkdir(corpus: Corpus): Promise<string> {- const dir = mkdtempSync(join(tmpdir(), "cge-bench-docs-"));- const files = readdirSync(corpus.path).filter((f) => DOC_EXTENSIONS.some((e) => f.toLowerCase().endsWith(e)));- for (const f of files) {- const src = join(corpus.path, f);- if (isPdfPath(f)) {- const text = await extractPdfText(src);- writeFileSync(join(dir, f.replace(/\.pdf$/i, ".txt")), text);- } else {- copyFileSync(src, join(dir, f));- }- }- return dir;-}-async function main() {const args = parseArgs(process.argv.slice(2));if (!process.env.OPENROUTER_API_KEY) {- console.error("Set OPENROUTER_API_KEY (agent, judge, and graph extraction all run through OpenRouter).");+ console.error("Set OPENROUTER_API_KEY (agent and judge run through OpenRouter).");process.exit(1);}const client = makeClient();@@ -96,91 +94,94 @@ async function main() {}const rows: Row[] = [];- const tmpDbDirs: string[] = [];+ const tmpDirs: string[] = [];for (const corpus of corpora) {+ if (corpus.kind === "docs") {+ console.log(`\n=== corpus: ${corpus.id} — SKIPPED (wiring graph indexes code only; no docs ingestion) ===`);+ continue;+ }+ if (!existsSync(corpus.path)) {+ console.log(`\n=== corpus: ${corpus.id} — SKIPPED (path not found: ${corpus.path}) ===`);+ continue;+ }const tasks = args.tasks ? corpus.tasks.slice(0, args.tasks) : corpus.tasks;- console.log(`\n=== corpus: ${corpus.id} (${corpus.kind}) — ${tasks.length} tasks × ${args.trials} trials ===`);-- // Fresh temp-backed engine; ingest once and reuse for the whole corpus.- const dbDir = mkdtempSync(join(tmpdir(), "cge-bench-db-"));- tmpDbDirs.push(dbDir);- const engine = new Graft({ dbPath: join(dbDir, "graph.db") });-- let agentRoot = corpus.path;- let docsWorkdir: string | undefined;-- try {- const t0 = Date.now();- if (corpus.kind === "repo") {- const r = await engine.ingestRepo(corpus.path, {- onProgress: (p) => process.stdout.write(`\r ingest: ${p.phase} ${p.index + 1}/${p.total} `),- });- console.log(`\n ingested repo: ${r.files} files (${r.summarized} summarized, ${r.cached} cached) in ${((Date.now() - t0) / 1000).toFixed(1)}s`);- if (r.errors.length) console.log(` ingest errors: ${r.errors.length} (first: ${r.errors[0]})`);- } else {- docsWorkdir = await makeDocsWorkdir(corpus);- agentRoot = docsWorkdir;- const res = await engine.ingestDir(corpus.path);- console.log(` ingested docs: ${res.length} files in ${((Date.now() - t0) / 1000).toFixed(1)}s`);+ console.log(`\n=== corpus: ${corpus.id} — ${tasks.length} tasks × ${args.arms.length} arms × ${args.trials} trials ===`);++ // Build the wiring graph once per corpus into a TEMP contextDir — Tier-1+ // tree-sitter only ($0, keyless), and the corpus repo is never written to.+ const graftDir = mkdtempSync(join(tmpdir(), "graft-bench-ctx-"));+ tmpDirs.push(graftDir);+ const t0 = Date.now();+ const g = await buildGraph(corpus.path, {+ contextDir: graftDir,+ onProgress: (p) => process.stdout.write(`\r build: ${p.phase} ${p.index + 1}/${p.total} `),+ });+ console.log(`\n graph: ${g.nodes} nodes / ${g.edges} edges in ${((Date.now() - t0) / 1000).toFixed(1)}s`);+ if (g.errors.length) console.log(` build errors: ${g.errors.length} (first: ${g.errors[0]})`);++ // Precompute each task's push bundle once (reused across trials). `ask` is+ // deterministic and local, so doing it up front keeps the pool self-contained.+ const bundles = new Map<string, string>();+ if (args.arms.includes("graph")) {+ for (const task of tasks) {+ bundles.set(task.id, formatAsk(ask(corpus.path, task.question, { contextDir: graftDir, source: true, limit: 5 })));}- const stats = await engine.stats();- console.log(` graph: ${stats.nodes} entities, ${stats.edges} relationships, ${stats.chunks} chunks`);+ }- // Precompute each task's graph bundle once (reused across arms/trials). engine.read- // is fast and local; do it up front so the parallel pool below never touches the engine.- const bundles = new Map<string, string>();- for (const task of tasks) {- bundles.set(task.id, args.arms.includes("graph") ? (await engine.read(task.question)).prompt : "");+ // Every (task, arm, trial) is an independent unit — run them through a bounded pool.+ const units: Array<{ task: (typeof tasks)[number]; arm: Arm; trial: number }> = [];+ for (const task of tasks) for (const arm of args.arms) for (let trial = 1; trial <= args.trials; trial++) units.push({ task, arm, trial });++ let done = 0;+ const total = units.length;+ const corpusRows = await pool(units, args.concurrency, async ({ task, arm, trial }) => {+ const base = {+ corpus: corpus.id, taskId: task.id, arm, trial,+ locality: task.locality ?? "multi-file",+ };+ try {+ const ar = await runAgent({+ client,+ root: corpus.path,+ question: task.question,+ contextBundle: arm === "graph" ? bundles.get(task.id) : undefined,+ graft: arm === "pull" ? { contextDir: graftDir } : undefined,+ });+ const v = await judge({+ client,+ question: task.question,+ referenceAnswer: task.referenceAnswer,+ agentAnswer: ar.answer,+ requiredKeywords: task.requiredKeywords,+ });+ console.log(` (${++done}/${total}) [${task.id}] ${arm} t${trial}: ${v.correct ? "✓" : "✗"} ${ar.tokens.total} tok, ${ar.toolCalls} tools, ${(ar.wallMs / 1000).toFixed(1)}s`);+ return {+ ...base,+ tokensInput: ar.tokens.input, tokensOutput: ar.tokens.output, tokensTotal: ar.tokens.total,+ cacheRead: ar.tokens.cacheRead, cacheCreate: ar.tokens.cacheCreate,+ toolCalls: ar.toolCalls, wallMs: ar.wallMs,+ correct: v.correct, score: v.score, keywordPass: v.keywordPass, judgeCorrect: v.judgeCorrect,+ iterations: ar.iterations, stopReason: ar.stopReason, answer: ar.answer, reasoning: v.reasoning,+ } as Row;+ } catch (e) {+ // Non-fatal: record the failure and keep going so one error can't sink the run.+ console.log(` (${++done}/${total}) [${task.id}] ${arm} t${trial}: ERROR ${e instanceof Error ? e.message : String(e)}`);+ return {+ ...base,+ tokensInput: 0, tokensOutput: 0, tokensTotal: 0, cacheRead: 0, cacheCreate: 0,+ toolCalls: 0, wallMs: 0, correct: false, score: 0, keywordPass: false,+ judgeCorrect: false, iterations: 0, stopReason: "error", answer: "",+ reasoning: `run error: ${e instanceof Error ? e.message : String(e)}`,+ } as Row;}+ });+ rows.push(...corpusRows);+ }- // Every (task, arm, trial) is an independent unit — run them through a bounded pool.- const units: Array<{ task: (typeof tasks)[number]; arm: "cold" | "graph"; trial: number }> = [];- for (const task of tasks) for (const arm of args.arms) for (let trial = 1; trial <= args.trials; trial++) units.push({ task, arm, trial });-- let done = 0;- const total = units.length;- const corpusRows = await pool(units, args.concurrency, async ({ task, arm, trial }) => {- try {- const ar = await runAgent({- client,- root: agentRoot,- question: task.question,- contextBundle: arm === "graph" ? bundles.get(task.id) : undefined,- });- const v = await judge({- client,- question: task.question,- referenceAnswer: task.referenceAnswer,- agentAnswer: ar.answer,- requiredKeywords: task.requiredKeywords,- });- console.log(` (${++done}/${total}) [${task.id}] ${arm} t${trial}: ${v.correct ? "✓" : "✗"} ${ar.tokens.total} tok, ${ar.toolCalls} tools, ${(ar.wallMs / 1000).toFixed(1)}s`);- return {- corpus: corpus.id, taskId: task.id, arm, trial,- tokensInput: ar.tokens.input, tokensOutput: ar.tokens.output, tokensTotal: ar.tokens.total,- cacheRead: ar.tokens.cacheRead, cacheCreate: ar.tokens.cacheCreate,- toolCalls: ar.toolCalls, wallMs: ar.wallMs,- correct: v.correct, score: v.score, keywordPass: v.keywordPass, judgeCorrect: v.judgeCorrect,- iterations: ar.iterations, stopReason: ar.stopReason, answer: ar.answer, reasoning: v.reasoning,- } as Row;- } catch (e) {- // Non-fatal: record the failure and keep going so one error can't sink the run.- console.log(` (${++done}/${total}) [${task.id}] ${arm} t${trial}: ERROR ${e instanceof Error ? e.message : String(e)}`);- return {- corpus: corpus.id, taskId: task.id, arm, trial,- tokensInput: 0, tokensOutput: 0, tokensTotal: 0, cacheRead: 0, cacheCreate: 0,- toolCalls: 0, wallMs: 0, correct: false, score: 0, keywordPass: false,- judgeCorrect: false, iterations: 0, stopReason: "error", answer: "",- reasoning: `run error: ${e instanceof Error ? e.message : String(e)}`,- } as Row;- }- });- rows.push(...corpusRows);- } finally {- await engine.close();- if (docsWorkdir) rmSync(docsWorkdir, { recursive: true, force: true });- }+ if (rows.length === 0) {+ console.error("\nNo runnable corpora (all skipped).");+ process.exit(1);}// Write results + summary. Timestamp comes from Date (fine in a standalone script).@@ -197,7 +198,7 @@ async function main() {console.log(`\nRaw rows → ${jsonPath}`);console.log(`Summary → ${mdPath}`);- for (const d of tmpDbDirs) rmSync(d, { recursive: true, force: true });+ for (const d of tmpDirs) rmSync(d, { recursive: true, force: true });}main().catch((err) => {diff --git a/bench/selfcheck.ts b/bench/selfcheck.tsindex af3a650d..dbe23a44 100644--- a/bench/selfcheck.ts+++ b/bench/selfcheck.ts@@ -101,8 +101,8 @@ async function main() {// 4. Report renders.const rows: Row[] = [- { corpus: "demo", taskId: "t1", arm: "cold", trial: 1, tokensInput: 5000, tokensOutput: 800, tokensTotal: 5800, cacheRead: 0, cacheCreate: 0, toolCalls: 6, wallMs: 12000, correct: true, score: 0.9, keywordPass: true, judgeCorrect: true, iterations: 4, stopReason: "end_turn", answer: "a", reasoning: "r" },- { corpus: "demo", taskId: "t1", arm: "graph", trial: 1, tokensInput: 2000, tokensOutput: 400, tokensTotal: 2400, cacheRead: 0, cacheCreate: 0, toolCalls: 1, wallMs: 5000, correct: true, score: 0.92, keywordPass: true, judgeCorrect: true, iterations: 2, stopReason: "end_turn", answer: "a", reasoning: "r" },+ { corpus: "demo", taskId: "t1", arm: "cold", trial: 1, locality: "multi-file", tokensInput: 5000, tokensOutput: 800, tokensTotal: 5800, cacheRead: 0, cacheCreate: 0, toolCalls: 6, wallMs: 12000, correct: true, score: 0.9, keywordPass: true, judgeCorrect: true, iterations: 4, stopReason: "end_turn", answer: "a", reasoning: "r" },+ { corpus: "demo", taskId: "t1", arm: "graph", trial: 1, locality: "multi-file", tokensInput: 2000, tokensOutput: 400, tokensTotal: 2400, cacheRead: 0, cacheCreate: 0, toolCalls: 1, wallMs: 5000, correct: true, score: 0.92, keywordPass: true, judgeCorrect: true, iterations: 2, stopReason: "end_turn", answer: "a", reasoning: "r" },];const md = buildMarkdown(rows);assert.ok(md.includes("## demo"));diff --git a/bench/tasks.ts b/bench/tasks.tsindex e747790e..afb21a46 100644--- a/bench/tasks.ts+++ b/bench/tasks.ts@@ -1,19 +1,23 @@/*** The benchmark corpus and task set. This file *is* the benchmark's validity:- * every task must have a verifiable answer, and (for a fair cold-arm test)- * require reading more than one file to answer confidently. Reference answers- * here are grounded in the actual source (cited during authoring), not guessed.+ * every task must have a verifiable answer, grounded in the actual source+ * (cited during authoring), not guessed. Tasks carry a `locality` label so the+ * report can split the verdict: multi-file questions are where graph context+ * should help; localized single-file questions are where it is expected to be+ * net overhead — the bench must measure both, not select for the winner.*- * Corpora are real external repos expected as siblings of this one under the- * same parent directory (override a path with BENCH_REPO_<ID_UPPER> if needed):+ * Corpora: graft's own repo (context-engine — always present, self-contained),+ * plus real external repos expected as siblings of this one under the same+ * parent directory (override a path with BENCH_REPO_<ID_UPPER> if needed):* - unified-accounts-login-server — the Nanonets unified auth service (Node/Express).* - new-website — the Nanonets marketing site (Next.js App Router).- * Plus the checked-in demo docs (northwind-docs) as a knowledge-folder data point.+ * Plus the checked-in demo docs (northwind-docs) as a knowledge-folder data+ * point (currently skipped: the wiring graph indexes code only).*- * Note on fairness: ingestRepo summarizes only CODE files (CODE_EXTENSIONS), so- * README/markdown/package.json/CSS do NOT enter the graph — while the cold agent- * can read them. Questions therefore target multi-file *code* understanding,- * where the graph bundle should actually help, not README/config lookups.+ * Note on fairness: the wiring graph indexes only code files tree-sitter can+ * parse, so README/markdown/package.json/CSS do NOT enter the graph — while+ * the cold agent can read them. Code questions therefore target *code*+ * understanding, not README/config lookups.*/import { dirname, resolve } from "node:path";import { fileURLToPath } from "node:url";@@ -34,6 +38,10 @@ export interface Task {referenceAnswer: string;/** Case-insensitive substrings the answer must contain (deterministic floor). */requiredKeywords: string[];+ /** "localized" = answerable from one file (where graph context is expected to+ * be net overhead — the hono-bench finding this bench must reproduce, not+ * hide). Absent = "multi-file", the shape the original corpus was limited to. */+ locality?: "localized" | "multi-file";}export interface Corpus {@@ -277,4 +285,80 @@ const NORTHWIND_DOCS: Corpus = {],};-export const CORPORA: Corpus[] = [UNIFIED, NEW_WEBSITE, NORTHWIND_DOCS];+/** graft's own repo: the one corpus that is always present, so the bench runs+ * self-contained (the sibling Nanonets repos are often absent). Mixes localized+ * single-file questions with multi-file traces, so the report can split the+ * verdict by locality. Answers cited from source at authoring time. */+const CONTEXT_ENGINE: Corpus = {+ id: "context-engine",+ kind: "repo",+ path: repoRoot,+ tasks: [+ {+ id: "orientation-budget",+ question: "How many bytes of INDEX.md does the Claude SessionStart hook inject at most?",+ referenceAnswer:+ "1500 bytes — formatOrientation in src/claude/format.ts slices the INDEX.md text to a budgetBytes parameter that defaults to 1500.",+ requiredKeywords: ["1500"],+ locality: "localized",+ },+ {+ id: "span-cap",+ question: "How many source lines can `graft ask --source` inline per hit before truncating?",+ referenceAnswer:+ "80 lines — MAX_SPAN_LINES in src/ask/ask.ts; longer definitions are truncated with a marker naming the file:line range to open.",+ requiredKeywords: ["80"],+ locality: "localized",+ },+ {+ id: "lock-freshness",+ question: "When does acquireLock treat an existing sync lock file as stale?",+ referenceAnswer:+ "When the lock file's mtime is at least LOCK_STALE_MS = 300000 ms (5 minutes) old — then it is removed and re-created; a fresher lock makes acquireLock return false.",+ requiredKeywords: ["300000"],+ locality: "localized",+ },+ {+ id: "link-verbs",+ question: "Which relation verbs is the synthesis LLM allowed to use for links between concept nodes?",+ referenceAnswer:+ "Exactly seven: part_of, uses, depends_on, produces, configures, validates, implements — enforced both in the prompt and by an enum in the record_graph JSON schema.",+ requiredKeywords: ["part_of", "configures", "validates"],+ locality: "localized",+ },+ {+ id: "cache-multipliers",+ question: "What cache read/write cost multipliers does the bench's costOf function apply?",+ referenceAnswer:+ "Cache creation is billed at 1.25× the input rate and cache reads at 0.1×, on Sonnet-5 pricing of $3/MTok input and $15/MTok output.",+ requiredKeywords: ["1.25", "0.1"],+ locality: "localized",+ },+ {+ id: "post-edit-flow",+ question: "After Claude edits a source file, what does graft's PostToolUse hook do, end to end?",+ referenceAnswer:+ "handlePostEdit ignores edits under graft/, otherwise marks the stats dirty with a fresh staleCount from `graft check --json` and records the file basename, then reads the wiring graph and injects a blast-radius block (incoming edges from other files to symbols in the edited file, capped at 8) as PostToolUse additionalContext.",+ requiredKeywords: ["blast radius", "dirty"],+ locality: "multi-file",+ },+ {+ id: "sidecar-consistency",+ question: "How does graft guarantee the ask-index sidecar can never change ranking results versus live tokenization?",+ referenceAnswer:+ "tokenize/counts live only in src/ask/index-file.ts and both build-time indexing and query-time fallback import them, so both sides split text identically; at query time the sidecar is used only if its doc count matches the graph's node count and every node id is present, and the stored df plus live-tokenized concept bags reproduce exactly the idf that computeIdf would produce live — anything off falls back to live tokenization.",+ requiredKeywords: ["tokenize"],+ locality: "multi-file",+ },+ {+ id: "tier2-recompute",+ question: "When is a symbol's Tier-2 summary (crux/summary) recomputed versus reused from cache?",+ referenceAnswer:+ "Enrichment is keyed on the node's body_hash (sha256 of the definition text): buildGraph folds the prior wiring.json in as a cache, and enrichGraph re-summarizes a node only when its body_hash changed (or it was never summarized); unchanged bodies keep their summary, and a Tier-1-only run never wipes Tier-2 fields.",+ requiredKeywords: ["body_hash"],+ locality: "multi-file",+ },+ ],+};++export const CORPORA: Corpus[] = [CONTEXT_ENGINE, UNIFIED, NEW_WEBSITE, NORTHWIND_DOCS];diff --git a/graft/.graph/wiring.json b/graft/.graph/wiring.jsonindex bfc26d5a..8dd89cc8 100644--- a/graft/.graph/wiring.json+++ b/graft/.graph/wiring.json@@ -1,8 +1,8 @@{"meta": {"version": 1,- "nodeCount": 402,- "edgeCount": 977,+ "nodeCount": 621,+ "edgeCount": 1620,"languages": ["typescript"]@@ -13,13 +13,13 @@"name": "agent.ts","kind": "file","path": "bench/agent.ts",- "span": "L1-L323",+ "span": "L1-L377","signature": null,"exported": true,"origin": "ast",- "body_hash": "e10d64f913c9517cef84cce58ea042d71bed3e94182c791245170eca54060e31",- "chars": 12147,- "summary_state": "ready",+ "body_hash": "6e18be8d88e168e07712118533702c7422ee76753d4dcf6032ae685a8c106c8a",+ "chars": 14646,+ "summary_state": "stale","summary": "This file implements a benchmark agent that processes questions about a codebase using filesystem tools and a language model.","crux": null},@@ -28,7 +28,7 @@"name": "AgentResult","kind": "interface","path": "bench/agent.ts",- "span": "L19-L27",+ "span": "L20-L28","signature": "interface AgentResult","exported": true,"origin": "ast",@@ -42,7 +42,7 @@"name": "globToRegExp","kind": "function","path": "bench/agent.ts",- "span": "L92-L106",+ "span": "L97-L111","signature": "function globToRegExp(glob: string): RegExp","exported": false,"origin": "ast",@@ -59,7 +59,7 @@"name": "listFiles","kind": "function","path": "bench/agent.ts",- "span": "L62-L89",+ "span": "L67-L94","signature": "function listFiles(root: string): string[]","exported": false,"origin": "ast",@@ -76,7 +76,7 @@"name": "walk","kind": "function","path": "bench/agent.ts",- "span": "L64-L86",+ "span": "L69-L91","signature": "walk = (dir: string)","exported": false,"origin": "ast",@@ -93,12 +93,12 @@"name": "runAgent","kind": "function","path": "bench/agent.ts",- "span": "L230-L322",+ "span": "L279-L376","signature": "async function runAgent(opts: RunAgentOptions): Promise<AgentResult>","exported": true,"origin": "ast",- "body_hash": "32cb0dc584762b0c9da95c2c69d73afb0d7a9b59628e53e306cd341a0d92cb44",- "summary_state": "ready",+ "body_hash": "5a040fb6f172fea417b7de9b0ae49367cb64b41e35c49e19bf9b1dbb7198f3a6",+ "summary_state": "stale","summary": "Manages the execution of the agent's logic, including handling user questions and tool interactions.","crux": {"code": " const resp = await client.chat.completions.create({\n model: AGENT_MODEL,\n max_tokens: 4096,\n messages,\n tools: TOOLS,\n });\n const u: any = resp.usage ?? {};\n const cached = u.prompt_tokens_details?.cached_tokens ?? 0;\n tokens.cacheRead += cached;\n tokens.input += Math.max(0, (u.prompt_tokens ?? 0) - cached); // uncached input only\n tokens.output += u.completion_tokens ?? 0;\n const choice = resp.choices[0];",@@ -110,7 +110,7 @@"name": "slideCacheBreakpoint","kind": "function","path": "bench/agent.ts",- "span": "L254-L260",+ "span": "L308-L314","signature": "slideCacheBreakpoint = ()","exported": true,"origin": "ast",@@ -127,12 +127,12 @@"name": "RunAgentOptions","kind": "interface","path": "bench/agent.ts",- "span": "L29-L37",+ "span": "L30-L42","signature": "interface RunAgentOptions","exported": true,"origin": "ast",- "body_hash": "b786c099fceddc6e582d26ab2a302637b256ba7144fae8629b8611325b0018e0",- "summary_state": "ready",+ "body_hash": "bd60aca99e3b8bb21cd4769b56ce1464502df9ea4eb7c665d53bc6ca0d2e540b",+ "summary_state": "stale","summary": "Specifies the options for running the agent, including the root directory and the question to be answered.","crux": null},@@ -141,12 +141,12 @@"name": "runTool","kind": "function","path": "bench/agent.ts",- "span": "L168-L228",- "signature": "function runTool(root: string, name: string, input: any): string",+ "span": "L207-L277",+ "signature": "function runTool(root: string, name: string, input: any, graft?: { contextDir: string }): string","exported": false,"origin": "ast",- "body_hash": "e4b0b544cf7ac1c6c08fa61827000496bb74311f04305b9868e5d70695cea9e1",- "summary_state": "ready",+ "body_hash": "00cdcb79849a3f634c0ea08fe3d26b8156d8714e7b2c5d51ca645f74337852c4",+ "summary_state": "stale","summary": "Executes a specified tool (like reading a file or listing a directory) based on the provided input parameters.","crux": {"code": " if (name === \"read_file\") {\n const file = safePath(root, String(input.path));\n const lines = readFileSync(file, \"utf8\").split(\"\\n\");\n const start = input.start_line ? Math.max(1, input.start_line) : 1;\n const end = input.end_line ? Math.min(lines.length, input.end_line) : Math.min(lines.length, start - 1 + MAX_READ_LINES);\n const slice = lines.slice(start - 1, end);\n const numbered = slice.map((l: string, i: number) => `${start + i}\\t${l}`).join(\"\\n\");\n const more = end < lines.length ? `\\n… (${lines.length - end} more lines)` : \"\";\n return numbered + more || \"(empty file)\";\n }\n if (name === \"list_dir\") {\n const dir = input.path ? safePath(root, String(input.path)) : root;",@@ -158,7 +158,7 @@"name": "safePath","kind": "function","path": "bench/agent.ts",- "span": "L46-L60",+ "span": "L51-L65","signature": "function safePath(root: string, p: string): string","exported": true,"origin": "ast",@@ -284,13 +284,13 @@"name": "report.ts","kind": "file","path": "bench/report.ts",- "span": "L1-L126",+ "span": "L1-L176","signature": null,"exported": true,"origin": "ast",- "body_hash": "775be8c40a8e4172521bba8f6a1f026fa23c4d24b9b5225da3ed5b745077a5b0",- "chars": 5288,- "summary_state": "ready",+ "body_hash": "17c0be550f9712165177d070f58cbe7a0f60fcb2c1dc5830eb1a4dde97ec12f3",+ "chars": 6985,+ "summary_state": "stale","summary": "This file provides functionality for aggregating and reporting benchmark results for different agent configurations.","crux": null},@@ -299,7 +299,7 @@"name": "aggregate","kind": "function","path": "bench/report.ts",- "span": "L56-L68",+ "span": "L60-L72","signature": "function aggregate(rows: Row[]): ArmAgg","exported": false,"origin": "ast",@@ -311,12 +311,26 @@"span": "L56-L67"}},+ {+ "id": "bench/report.ts#Arm",+ "name": "Arm",+ "kind": "type",+ "path": "bench/report.ts",+ "span": "L6-L6",+ "signature": "type Arm = \"cold\" | \"graph\" | \"pull\";",+ "exported": true,+ "origin": "ast",+ "body_hash": "4d3e3333d5561c7885e9445936b562e1748016465e14c964652d98acf70b20d4",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },{"id": "bench/report.ts#ArmAgg","name": "ArmAgg","kind": "interface","path": "bench/report.ts",- "span": "L44-L54",+ "span": "L48-L58","signature": "interface ArmAgg","exported": false,"origin": "ast",@@ -330,12 +344,12 @@"name": "buildMarkdown","kind": "function","path": "bench/report.ts",- "span": "L80-L125",+ "span": "L129-L175","signature": "function buildMarkdown(rows: Row[]): string","exported": true,"origin": "ast",- "body_hash": "9534d62231f50105f1ef247af6dd99e180786c443307f1eb82b47e5c9d631152",- "summary_state": "ready",+ "body_hash": "0157ce2adf00bdbf4d01440165deabc0b633ffe5c7db30c55fa19d25bc03d288",+ "summary_state": "stale","summary": "Generates a markdown report summarizing benchmark results across different corpora and arms.","crux": {"code": "export function buildMarkdown(rows: Row[]): string {\n const corpora = [...new Set(rows.map((r) => r.corpus))];\n const lines: string[] = [];\n lines.push(\"# Context Graph Engine — Benchmark Results\", \"\");\n lines.push(\n `Agent: Claude Sonnet 5 · Judge: Claude Opus 4.8 · ${rows.length} agent runs total.`,\n \"\",\n \"Each cell is the mean across all tasks × trials for that corpus/arm. \" +\n \"**Cold** = agent explores with filesystem tools from zero. **Graph** = same agent, \" +\n \"same tools, plus the graph context bundle injected up front.\",\n \"\",\n );",@@ -347,7 +361,7 @@"name": "costOf","kind": "function","path": "bench/report.ts",- "span": "L33-L38",+ "span": "L37-L42","signature": "function costOf(r: { tokensInput: number; tokensOutput: number; cacheRead: number; cacheCreate: number }): number","exported": true,"origin": "ast",@@ -364,7 +378,7 @@"name": "fmt","kind": "function","path": "bench/report.ts",- "span": "L76-L78",+ "span": "L80-L82","signature": "function fmt(n: number): string","exported": false,"origin": "ast",@@ -378,7 +392,7 @@"name": "mean","kind": "function","path": "bench/report.ts",- "span": "L40-L42",+ "span": "L44-L46","signature": "function mean(xs: number[]): number","exported": false,"origin": "ast",@@ -387,12 +401,40 @@"summary": "Computes the mean of an array of numbers, returning zero for an empty array.","crux": null},+ {+ "id": "bench/report.ts#metricTable",+ "name": "metricTable",+ "kind": "function",+ "path": "bench/report.ts",+ "span": "L88-L114",+ "signature": "function metricTable(rows: Row[], arms: Arm[]): string[]",+ "exported": false,+ "origin": "ast",+ "body_hash": "040824ba07e90ba35a7d1b3628412ec72297da5395737d9c1affb2dca8f9e479",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "bench/report.ts#metricTable.cells",+ "name": "cells",+ "kind": "function",+ "path": "bench/report.ts",+ "span": "L93-L102",+ "signature": "cells = (label: string, value: (a: ArmAgg) => number, render: (v: number) => string, delta?: (c: number, x: number) => string)",+ "exported": false,+ "origin": "ast",+ "body_hash": "92c5b466f286a53a3ff7de7e5da8b52695f016703252bbf385df554c730f0b5a",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },{"id": "bench/report.ts#pctDelta","name": "pctDelta","kind": "function","path": "bench/report.ts",- "span": "L70-L74",+ "span": "L74-L78","signature": "function pctDelta(cold: number, graph: number): string","exported": false,"origin": "ast",@@ -409,27 +451,41 @@"name": "Row","kind": "interface","path": "bench/report.ts",- "span": "L6-L26",+ "span": "L8-L30","signature": "interface Row","exported": true,"origin": "ast",- "body_hash": "5715f0dee9c689834b1869bbb14379fbc55d730fbf32dbee62bb7d4ec87f3915",- "summary_state": "ready",+ "body_hash": "3ec44fbebb1290b68e6b1d52a189eabfb75f43e416384671a174769265610c30",+ "summary_state": "stale","summary": "Defines the structure of a benchmark trial row, capturing various metrics related to agent performance.","crux": null},+ {+ "id": "bench/report.ts#verdictFor",+ "name": "verdictFor",+ "kind": "function",+ "path": "bench/report.ts",+ "span": "L117-L127",+ "signature": "function verdictFor(label: string, c: ArmAgg, g: ArmAgg): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "2fb44808117e96d184dcf795bfc7bc9546c05e3d2e0c6b8a888a51c5a8f581ce",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },{"id": "bench/run.ts","name": "run.ts","kind": "file","path": "bench/run.ts",- "span": "L1-L207",+ "span": "L1-L208","signature": null,"exported": true,"origin": "ast",- "body_hash": "a0d2859628588f45ae31862f5f801d6219802449c23bbbdba9aa51b7b9febf47",- "chars": 9000,- "summary_state": "ready",+ "body_hash": "0d18dd7823abcef2c286f792e5362f9d51128c35cfaf8ab1892b6d95823c1e10",+ "chars": 8716,+ "summary_state": "stale","summary": "This file orchestrates the benchmarking process for various corpora and tasks, managing the execution and reporting of results.","crux": {"code": " for (const corpus of corpora) {\n const tasks = args.tasks ? corpus.tasks.slice(0, args.tasks) : corpus.tasks;\n console.log(`\\n=== corpus: ${corpus.id} (${corpus.kind}) — ${tasks.length} tasks × ${args.trials} trials ===`);\n\n // Fresh temp-backed engine; ingest once and reuse for the whole corpus.\n const dbDir = mkdtempSync(join(tmpdir(), \"cge-bench-db-\"));\n tmpDbDirs.push(dbDir);\n const engine = new Graft({ dbPath: join(dbDir, \"graph.db\") });\n\n let agentRoot = corpus.path;\n let docsWorkdir: string | undefined;\n",@@ -441,12 +497,12 @@"name": "Args","kind": "interface","path": "bench/run.ts",- "span": "L29-L35",+ "span": "L38-L44","signature": "interface Args","exported": false,"origin": "ast",- "body_hash": "07bb0961cc69a2894c3baf9941dd072b901a4d94d3527b04a94397d5c88a749f",- "summary_state": "ready",+ "body_hash": "081f4c21818443a203a267bb039fb7209a50acf6b714b402af2d010f5c64d06a",+ "summary_state": "stale","summary": "Defines the structure for command-line arguments used to configure the benchmarking run.","crux": null},@@ -455,46 +511,29 @@"name": "main","kind": "function","path": "bench/run.ts",- "span": "L84-L201",+ "span": "L82-L202","signature": "async function main()","exported": false,"origin": "ast",- "body_hash": "dbf48031433ab51d95363a6e6c55ea949fab2c2a53e903da497fe05f1d58edf5",- "summary_state": "ready",+ "body_hash": "e32e4119f57a31a4f26eb2a0fe5e85e9dc67a607732dc49a21adef2d9f076652",+ "summary_state": "stale","summary": "Coordinates the overall benchmarking process, including argument parsing, corpus ingestion, and result reporting.","crux": {"code": "async function main() {\n const args = parseArgs(process.argv.slice(2));\n if (!process.env.OPENROUTER_API_KEY) {\n console.error(\"Set OPENROUTER_API_KEY (agent, judge, and graph extraction all run through OpenRouter).\");\n process.exit(1);\n }\n const client = makeClient();\n\n const corpora = CORPORA.filter((c) => !args.corpora || args.corpora.includes(c.id));\n if (corpora.length === 0) {\n console.error(`No matching corpora. Available: ${CORPORA.map((c) => c.id).join(\", \")}`);\n process.exit(1);","span": "L84-L95"}},- {- "id": "bench/run.ts#makeDocsWorkdir",- "name": "makeDocsWorkdir",- "kind": "function",- "path": "bench/run.ts",- "span": "L69-L82",- "signature": "async function makeDocsWorkdir(corpus: Corpus): Promise<string>",- "exported": false,- "origin": "ast",- "body_hash": "9688c56522bfdc0e8c20e07526ee021ddd45ab6d77a116b06df1fb770021e017",- "summary_state": "ready",- "summary": "Creates a temporary working directory for processing documents in a specified corpus.",- "crux": {- "code": " const dir = mkdtempSync(join(tmpdir(), \"cge-bench-docs-\"));\n const files = readdirSync(corpus.path).filter((f) => DOC_EXTENSIONS.some((e) => f.toLowerCase().endsWith(e)));\n for (const f of files) {\n const src = join(corpus.path, f);\n if (isPdfPath(f)) {\n const text = await extractPdfText(src);\n writeFileSync(join(dir, f.replace(/\\.pdf$/i, \".txt\")), text);\n } else {\n copyFileSync(src, join(dir, f));\n }\n }\n return dir;",- "span": "L70-L81"- }- },{"id": "bench/run.ts#parseArgs","name": "parseArgs","kind": "function","path": "bench/run.ts",- "span": "L37-L52",+ "span": "L46-L66","signature": "function parseArgs(argv: string[]): Args","exported": false,"origin": "ast",- "body_hash": "dd2d7d4756b068252199a77e1af829fea67d99e8924610198ca79f48a994635b",- "summary_state": "ready",+ "body_hash": "d3862150543501db4a56837578adde9a777203260b8e1c1d7f022615973e0c54",+ "summary_state": "stale","summary": "Parses command-line arguments to extract configuration options for the benchmarking process.","crux": {"code": " const a: Args = { trials: 3, arms: [\"cold\", \"graph\"], concurrency: 6 };\n for (let i = 0; i < argv.length; i++) {\n const arg = argv[i];\n if (arg === \"--smoke\") {\n a.corpora = [\"unified-accounts-login-server\"]; // smallest corpus — cheapest plumbing check\n a.tasks = 1;\n a.trials = 1;\n } else if (arg === \"--corpora\" || arg === \"--repos\") a.corpora = argv[++i].split(\",\");\n else if (arg === \"--tasks\") a.tasks = Number(argv[++i]);\n else if (arg === \"--trials\") a.trials = Number(argv[++i]);\n else if (arg === \"--arms\") a.arms = argv[++i].split(\",\") as Array<\"cold\" | \"graph\">;\n else if (arg === \"--concurrency\") a.concurrency = Math.max(1, Number(argv[++i]));",@@ -506,7 +545,7 @@"name": "pool","kind": "function","path": "bench/run.ts",- "span": "L55-L66",+ "span": "L69-L80","signature": "async function pool<T, R>(items: T[], n: number, fn: (item: T) => Promise<R>): Promise<R[]>","exported": false,"origin": "ast",@@ -523,7 +562,7 @@"name": "worker","kind": "function","path": "bench/run.ts",- "span": "L58-L63",+ "span": "L72-L77","signature": "async function worker()","exported": false,"origin": "ast",@@ -544,9 +583,9 @@"signature": null,"exported": true,"origin": "ast",- "body_hash": "0eaf577938e20fa27d9cd0157bc8843fdc37165d85696789334b8605138f4bb4",- "chars": 5236,- "summary_state": "ready",+ "body_hash": "48c97e7ce8b4e7544ec29c2341d1946b75f5b4ac3b2fef414e9f170da6a90fe6",+ "chars": 5284,+ "summary_state": "stale","summary": "This file performs an offline verification of the harness plumbing to ensure control flow works correctly without needing an API key.","crux": {"code": "async function main() {\n const root = mkdtempSync(join(tmpdir(), \"cge-selfcheck-\"));\n mkdirSync(join(root, \"src\"), { recursive: true });\n writeFileSync(join(root, \"src\", \"config.ts\"), \"export const token = 'SECRET_TOKEN';\\n\");\n\n const client = makeStubClient();\n\n // 1. Agent loop: should call the grep tool once, then answer.\n const ar = await runAgent({ client, root, question: \"What is the secret token?\" });\n assert.equal(ar.toolCalls, 1, \"expected exactly one tool call\");\n assert.equal(ar.toolLog[0].name, \"grep\", \"expected the grep tool to run\");\n assert.ok(ar.answer.includes(\"SECRET_TOKEN\"), \"answer should contain the fact\");",@@ -562,8 +601,8 @@"signature": "async function main()","exported": false,"origin": "ast",- "body_hash": "5f20853f3387db063509fe8426e6f34758fdac602fbef13cba81514ec752483b",- "summary_state": "ready",+ "body_hash": "a36d5aba69d3177e8d2c6eaf9ebdb5d9b03f98356a323e20a99cea25553b4ac4",+ "summary_state": "stale","summary": "Coordinates the self-check process by setting up a temporary environment, running the agent, and validating the results.","crux": {"code": " const ar = await runAgent({ client, root, question: \"What is the secret token?\" });\n assert.equal(ar.toolCalls, 1, \"expected exactly one tool call\");\n assert.equal(ar.toolLog[0].name, \"grep\", \"expected the grep tool to run\");\n assert.ok(ar.answer.includes(\"SECRET_TOKEN\"), \"answer should contain the fact\");\n assert.equal(ar.tokens.total, 300, \"tokens should sum across 2 turns (150 each)\");\n assert.equal(ar.stopReason, \"stop\");\n console.log(`✓ agent loop: ${ar.toolCalls} tool call, ${ar.tokens.total} tokens, answer=\"${ar.answer}\"`);",@@ -592,13 +631,13 @@"name": "tasks.ts","kind": "file","path": "bench/tasks.ts",- "span": "L1-L281",+ "span": "L1-L365","signature": null,"exported": true,"origin": "ast",- "body_hash": "d21168797f40d193a914aca0c438409d29d300441bc0a6a518c93869240b3b69",- "chars": 14060,- "summary_state": "ready",+ "body_hash": "efb90e69f52adcb08bfe45fb5a983fc676df68befdc455513e2581a24f46807e",+ "chars": 18806,+ "summary_state": "stale","summary": "This file defines benchmark tasks and their corresponding reference answers for validating code understanding across multiple repositories.","crux": {"code": "/** Sibling repo path by default; overridable via BENCH_REPO_<ID_UPPER> (dashes → underscores). */\nfunction repoPath(id: string): string {\n const envKey = \"BENCH_REPO_\" + id.toUpperCase().replace(/-/g, \"_\");\n return process.env[envKey] ?? resolve(parent, id);\n}\n\nexport interface Task {\n id: string;\n question: string;\n referenceAnswer: string;\n /** Case-insensitive substrings the answer must contain (deterministic floor). */\n requiredKeywords: string[];",@@ -610,7 +649,7 @@"name": "Corpus","kind": "interface","path": "bench/tasks.ts",- "span": "L39-L45",+ "span": "L47-L53","signature": "interface Corpus","exported": true,"origin": "ast",@@ -624,7 +663,7 @@"name": "repoPath","kind": "function","path": "bench/tasks.ts",- "span": "L26-L29",+ "span": "L30-L33","signature": "function repoPath(id: string): string","exported": false,"origin": "ast",@@ -641,12 +680,12 @@"name": "Task","kind": "interface","path": "bench/tasks.ts",- "span": "L31-L37",+ "span": "L35-L45","signature": "interface Task","exported": true,"origin": "ast",- "body_hash": "ec755cc45cea139405762338ce104dfa8b2307f7bfa4f7733f731e6d80c21cb8",- "summary_state": "ready",+ "body_hash": "5f5e2039755acb77b6a0f6a14f752ef11da6c3b9a3fb124fda4f0fc871246304",+ "summary_state": "stale","summary": "This interface outlines the structure of a benchmark task, including its ID, question, reference answer, and required keywords.","crux": null},@@ -809,6 +848,21 @@"span": "L15-L22"}},+ {+ "id": "scripts/postinstall.mjs",+ "name": "postinstall.mjs",+ "kind": "file",+ "path": "scripts/postinstall.mjs",+ "span": "L1-L12",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "2836cb69bc03453bc22abcae91d58de0a06881ee7f975fe86967aedf5d2d6188",+ "chars": 529,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },{"id": "src/ai/crux.ts","name": "crux.ts",@@ -1179,13 +1233,13 @@"name": "synthesize.ts","kind": "file","path": "src/ai/synthesize.ts",- "span": "L1-L165",+ "span": "L1-L166","signature": null,"exported": true,"origin": "ast",- "body_hash": "982ab91da10ae51fdba64466cbb614db14a51f2e100bb12a72178961d8dd97d7",- "chars": 7187,- "summary_state": "ready",+ "body_hash": "0dcf573a7c4d86b68a4826bd3c6bd31f28e8696654d226669b7eb8052c48f9cf",+ "chars": 7673,+ "summary_state": "stale","summary": "This file defines the architecture for synthesizing a graph of nodes from file summaries, enabling a structured representation of a codebase.","crux": {"code": "const SYSTEM_PROMPT = `You build an ARCHITECTURE graph of a codebase from per-file summaries. The reader is an AI agent that will read this graph before working on the code, so it must describe the system at the level a senior engineer would explain it — not file by file.\n\nProduce a CURATED set of nodes of mixed granularity:\n- \"system\" nodes: GROUP files that collaborate as one component (usually a directory or a cohesive set) into a SINGLE node. This should be the most common node type. Prefer one system node over several file nodes.\n- \"file\" nodes: only for a substantial, standalone module that genuinely deserves its own node apart from its system.\n- \"concept\" nodes: cross-cutting ideas, design decisions, or invariants that span multiple files (e.g. \"local-first provider fallback\", \"staleness checking\", \"content-hash provenance\"). Include several — they are the most valuable nodes for an agent.\n\nRules:\n- Strongly prefer FEWER, larger, meaningful nodes. For a repo of N files, aim for well under N nodes. Do NOT emit one node per file, and never a node per incidental identifier (a local interface, helper, or third-party symbol).\n- Merge duplicates and surface-form variants into one node.\n- For each node give: a canonical human-readable name; a type (\"system\" | \"file\" | \"concept\"); a 1-3 sentence summary of its ROLE in the system; \"sources\" = the exact file paths (from the input) it is grounded in (a system lists all its files; a concept lists the files that motivate it); and \"links\" to other nodes you define, each with a relation and a short description of what concretely happens in the code.\n- The relation MUST be one of exactly these verbs (each answers a question a code reviewer asks): \"part_of\" (where does this live?), \"uses\" (what breaks if the target changes?), \"depends_on\" (same, for non-call dependencies), \"produces\" (where does this output come from?), \"configures\" (what changes its behavior without a code change?), \"validates\" (what checks or judges this? tests, drift checks, scoring), \"implements\" (what contract must this honor?). Never invent vague relations like \"influences\", \"supports\", or \"relates_to\" — if none of the verbs fit, drop the link.",@@ -1197,7 +1251,7 @@"name": "clean","kind": "function","path": "src/ai/synthesize.ts",- "span": "L100-L122",+ "span": "L101-L123","signature": "function clean(nodes: unknown): SynthNode[]","exported": false,"origin": "ast",@@ -1231,7 +1285,7 @@"name": "OpenRouterSynthesizer","kind": "class","path": "src/ai/synthesize.ts",- "span": "L134-L163",+ "span": "L135-L164","signature": "class OpenRouterSynthesizer implements Synthesizer","exported": true,"origin": "ast",@@ -1248,7 +1302,7 @@"name": "constructor","kind": "method","path": "src/ai/synthesize.ts",- "span": "L138-L141",+ "span": "L139-L142","signature": "constructor(apiKey: string, model: string, baseUrl = \"https://openrouter.ai/api/v1\")","exported": true,"origin": "ast",@@ -1265,7 +1319,7 @@"name": "synthesize","kind": "method","path": "src/ai/synthesize.ts",- "span": "L143-L162",+ "span": "L144-L163","signature": "async synthesize(files: FileSummary[]): Promise<SynthNode[]>","exported": true,"origin": "ast",@@ -1330,7 +1384,7 @@"name": "userContent","kind": "function","path": "src/ai/synthesize.ts",- "span": "L92-L97",+ "span": "L93-L98","signature": "function userContent(files: FileSummary[]): string","exported": false,"origin": "ast",@@ -1347,12 +1401,12 @@"name": "ask.ts","kind": "file","path": "src/ask/ask.ts",- "span": "L1-L397",+ "span": "L1-L749","signature": null,"exported": true,"origin": "ast",- "body_hash": "adec0cff818d0e0981f668a7bb92af61312f24a673d27b676446c73871cd1a6e",- "chars": 14971,+ "body_hash": "62d693c39f77019e50437b5285fafe5802b8b077e7aa6545589a3b084f93e552",+ "chars": 32834,"summary_state": "stale","summary": "This file implements a query tool that routes natural language queries to relevant code symbols and returns structured context information.","crux": null@@ -1362,11 +1416,11 @@"name": "ask","kind": "function","path": "src/ask/ask.ts",- "span": "L327-L347",+ "span": "L592-L622","signature": "function ask(dir: string, query: string, opts: AskOptions = {}): AskResult","exported": true,"origin": "ast",- "body_hash": "4cecc60efa689e3b8751a00c500a1a48880e82d57f3bd08607b10d0947af04af",+ "body_hash": "a9f712f1764f9391acc161a721d4c4f944f728cb4d0df2e602126460d3321cd7","summary_state": "stale","summary": "Processes a query against a code graph, returning structured results based on the query type and context.","crux": {@@ -1379,7 +1433,7 @@"name": "AskHit","kind": "interface","path": "src/ask/ask.ts",- "span": "L23-L36",+ "span": "L26-L39","signature": "interface AskHit","exported": true,"origin": "ast",@@ -1393,12 +1447,12 @@"name": "AskOptions","kind": "interface","path": "src/ask/ask.ts",- "span": "L248-L254",+ "span": "L489-L505","signature": "interface AskOptions","exported": true,"origin": "ast",- "body_hash": "64043b27c35ab15223fb25bafbead807a203177b4871d9ca0833012a5ddc3f59",- "summary_state": "ready",+ "body_hash": "e43e59155824acff2cc2bc06107314506a521eba1579a9a04af4875e4736ed57",+ "summary_state": "stale","summary": "Defines options for customizing the behavior of the ask function, such as context directory and result limits.","crux": null},@@ -1407,11 +1461,11 @@"name": "AskResult","kind": "interface","path": "src/ask/ask.ts",- "span": "L42-L53",+ "span": "L45-L62","signature": "interface AskResult","exported": true,"origin": "ast",- "body_hash": "94988e1ce9251abf8e45eb8de671cb40f258c9ef83f60bcc973b58ccc6963483",+ "body_hash": "4c4d6302e47ed2207bf8ea2e976f97386aaac0470d987fe0203790fe796593d5","summary_state": "stale","summary": "Encapsulates the result of a query, including the query string, mode of operation, and the hits found.","crux": null@@ -1421,7 +1475,7 @@"name": "baselineFor","kind": "function","path": "src/ask/ask.ts",- "span": "L309-L324",+ "span": "L574-L589","signature": "function baselineFor(hits: AskHit[], graph: GraphV1 | null): AskResult[\"saved\"] | undefined","exported": false,"origin": "ast",@@ -1430,60 +1484,96 @@"summary": null,"crux": null},+ {+ "id": "src/ask/ask.ts#bm25",+ "name": "bm25",+ "kind": "function",+ "path": "src/ask/ask.ts",+ "span": "L166-L182",+ "signature": "function bm25( query: Map<string, number>, doc: Map<string, number>, idf: Map<string, number>, dl: number, avgdl: number, ): number",+ "exported": false,+ "origin": "ast",+ "body_hash": "8e22c96440f87456feecde97f0e10c924ef34f8634216d0ae6c3a562a42dc039",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/ask/ask.ts#computeIdf",+ "name": "computeIdf",+ "kind": "function",+ "path": "src/ask/ask.ts",+ "span": "L140-L145",+ "signature": "function computeIdf(docBags: Array<Set<string>>): Map<string, number>",+ "exported": false,+ "origin": "ast",+ "body_hash": "5d59d7e73b63c473b62ab741265b168865d8174d1172cc9e534d23147440b4b4",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/ask/ask.ts#computeIdfFromIndex",+ "name": "computeIdfFromIndex",+ "kind": "function",+ "path": "src/ask/ask.ts",+ "span": "L154-L159",+ "signature": "function computeIdfFromIndex(index: AskIndex, conceptBags: Array<Set<string>>): Map<string, number>",+ "exported": false,+ "origin": "ast",+ "body_hash": "cc84ad53f5e0dab091309c87c15652d661faec9f4237e267ba1d2acc51bad9b3",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },{"id": "src/ask/ask.ts#Corpus","name": "Corpus","kind": "interface","path": "src/ask/ask.ts",- "span": "L87-L90",+ "span": "L74-L81","signature": "interface Corpus","exported": false,"origin": "ast",- "body_hash": "8f29f53a7eb72207fae41ba9a163ddbe90d6105fa62f4c7c48153eb895ccecfb",- "summary_state": "ready",+ "body_hash": "447d1a3c8c6b46c599acb70ea56a6ebad5eefcb17a849187c5aa2b364eb85d5d",+ "summary_state": "stale","summary": "Defines the structure for a corpus containing concepts and a graph, used for processing queries.","crux": null},{- "id": "src/ask/ask.ts#counts",- "name": "counts",+ "id": "src/ask/ask.ts#fallthroughNoteFor",+ "name": "fallthroughNoteFor","kind": "function","path": "src/ask/ask.ts",- "span": "L71-L75",- "signature": "function counts(tokens: string[]): Map<string, number>",+ "span": "L223-L228",+ "signature": "function fallthroughNoteFor(subject: string): string","exported": false,"origin": "ast",- "body_hash": "55edb54385b8591bd6442f62f998d9d774eda8c15abd3e368e4b3a8086c84112",- "summary_state": "ready",- "summary": "Creates a frequency count map of tokens, allowing for analysis of term occurrences in a document.",- "crux": {- "code": " const m = new Map<string, number>();\n for (const t of tokens) m.set(t, (m.get(t) ?? 0) + 1);\n return m;",- "span": "L60-L62"- }+ "body_hash": "8894dd2788429383684ba0a325296c7fd8e11865a5fbb7d1fdadc45f4c99ab23",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/ask/ask.ts#findSubject",- "name": "findSubject",+ "id": "src/ask/ask.ts#findSubjectNodes",+ "name": "findSubjectNodes","kind": "function","path": "src/ask/ask.ts",- "span": "L137-L155",- "signature": "function findSubject(query: string, graph: GraphV1): NodeV1[]",+ "span": "L206-L213",+ "signature": "function findSubjectNodes(query: string, graph: GraphV1): { nodes: NodeV1[]; tried: string }","exported": false,"origin": "ast",- "body_hash": "a4ca179ce0a30c212e9481f8da15176f2df209dbe21de3a600b1bf74f1728071",- "summary_state": "ready",- "summary": "Identifies the most relevant symbols in the graph that match the query, prioritizing exact name matches.",- "crux": {- "code": "function findSubject(query: string, graph: GraphV1): NodeV1[] {\n const byName = new Map<string, NodeV1[]>();\n for (const n of graph.nodes) {\n if (n.kind === \"file\") continue;\n const key = n.name.toLowerCase();\n byName.set(key, [...(byName.get(key) ?? []), n]);\n }\n const words = query.split(/[^A-Za-z0-9_.]+/).filter(Boolean);\n let best: NodeV1[] = [];\n let bestLen = 0;\n for (const w of words) {\n const hit = byName.get(w.toLowerCase());",- "span": "L125-L136"- }+ "body_hash": "0a3f88de2d856cea23e66fd4d8ad75220907ec8ddc44e69a3bf853b37ea113f3",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{"id": "src/ask/ask.ts#firstProse","name": "firstProse","kind": "function","path": "src/ask/ask.ts",- "span": "L78-L85",+ "span": "L65-L72","signature": "function firstProse(body: string): string","exported": false,"origin": "ast",@@ -1500,11 +1590,11 @@"name": "formatAsk","kind": "function","path": "src/ask/ask.ts",- "span": "L355-L379",+ "span": "L693-L731","signature": "function formatAsk(r: AskResult): string","exported": true,"origin": "ast",- "body_hash": "9d7ceb49391b7e126bb8e25b73d28e6747a515c831d2e9f8a2ae2e17b73567be",+ "body_hash": "413023c3201e82617c165c0ddf39bf37f4e963b7d5c1af202ff4f7132191f8ae","summary_state": "stale","summary": "Formats the results of a query into a markdown context pack for easy readability and presentation.","crux": {@@ -1512,12 +1602,40 @@"span": "L308-L319"}},+ {+ "id": "src/ask/ask.ts#formatSkeleton",+ "name": "formatSkeleton",+ "kind": "function",+ "path": "src/ask/ask.ts",+ "span": "L676-L685",+ "signature": "function formatSkeleton(r: SkeletonResult): string",+ "exported": true,+ "origin": "ast",+ "body_hash": "959580717569409d09522b36316a884d13fc49702fdd4aa9b55b7d534afdc0fc",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/ask/ask.ts#hasTerm",+ "name": "hasTerm",+ "kind": "function",+ "path": "src/ask/ask.ts",+ "span": "L298-L300",+ "signature": "function hasTerm(f: Map<string, number>, t: string): boolean",+ "exported": false,+ "origin": "ast",+ "body_hash": "fc67bfbddd84c204744457e940d090b6c90985539a1c4cdf713f69d6a92b5c37",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },{"id": "src/ask/ask.ts#hitFiles","name": "hitFiles","kind": "function","path": "src/ask/ask.ts",- "span": "L295-L304",+ "span": "L560-L569","signature": "function hitFiles(hits: AskHit[]): Set<string>","exported": false,"origin": "ast",@@ -1526,17 +1644,31 @@"summary": null,"crux": null},+ {+ "id": "src/ask/ask.ts#idfFromDf",+ "name": "idfFromDf",+ "kind": "function",+ "path": "src/ask/ask.ts",+ "span": "L134-L138",+ "signature": "function idfFromDf(df: Map<string, number>, n: number): Map<string, number>",+ "exported": false,+ "origin": "ast",+ "body_hash": "6e08a73cec05cbac1943acd2d2c588c901fb1e84327aced754012931f7bc5ed1",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },{"id": "src/ask/ask.ts#inlineSource","name": "inlineSource","kind": "function","path": "src/ask/ask.ts",- "span": "L284-L291",- "signature": "function inlineSource(root: string, hits: AskHit[]): void",+ "span": "L539-L556",+ "signature": "function inlineSource(root: string, hits: AskHit[], graph: GraphV1 | null, full: boolean): void","exported": false,"origin": "ast",- "body_hash": "1956881d9722274712b026fa4baf87b7c571977d49e2176dad9b93d849f946b5",- "summary_state": "ready",+ "body_hash": "41579c388276225af6b3ceab098eb0d7817f706b0885aeb1a82c4fb27624e9dd",+ "summary_state": "stale","summary": "Attaches inlined source code to query hits, enhancing the context provided to the user.","crux": {"code": "function inlineSource(root: string, hits: AskHit[]): void {\n for (const h of hits) {\n const s = parseSpan(h.pointer);\n if (!s) continue;\n const code = sliceSpan(root, s.path, s.from, s.to);\n if (code) h.code = code;\n }",@@ -1548,41 +1680,69 @@"name": "lexical","kind": "function","path": "src/ask/ask.ts",- "span": "L202-L246",- "signature": "function lexical(query: string, corpus: Corpus, limit: number): AskResult",+ "span": "L325-L487",+ "signature": "function lexical(query: string, corpus: Corpus, limit: number, graphRank: boolean): AskResult","exported": false,"origin": "ast",- "body_hash": "e0bc699f1554d18d6384e1b5be7f042880937e06b973b93ff5ed38167c4bb84c",- "summary_state": "ready",+ "body_hash": "407d174feaf3c69d35c15459e96cb9c0e184097237970ecf6ec87b0e2a4e6fdd",+ "summary_state": "stale","summary": "Ranks concepts and symbols based on lexical matching with the query, returning the most relevant results.","crux": {"code": "function lexical(query: string, corpus: Corpus, limit: number): AskResult {\n const q = counts(tokenize(query));\n const scored: AskHit[] = [];\n\n for (const c of corpus.concepts) {\n const nameScore = score(q, counts(tokenize(c.name))) * 3;\n const bodyScore = score(q, counts(tokenize(c.text)));\n const total = nameScore + bodyScore;\n if (total > 0) {\n scored.push({\n kind: \"concept\",\n title: c.name || c.slug,","span": "L190-L201"}},+ {+ "id": "src/ask/ask.ts#lexical.bodyLen",+ "name": "bodyLen",+ "kind": "function",+ "path": "src/ask/ask.ts",+ "span": "L416-L420",+ "signature": "bodyLen = (m: Map<string, number>)",+ "exported": false,+ "origin": "ast",+ "body_hash": "79442ce15d0955c8c21add8fdebb6c22462136c2b241e8e60ea75313d1097259",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },{"id": "src/ask/ask.ts#loadCorpus","name": "loadCorpus","kind": "function","path": "src/ask/ask.ts",- "span": "L92-L117",+ "span": "L83-L108","signature": "function loadCorpus(outDir: string): Corpus","exported": false,"origin": "ast",- "body_hash": "f786c06a38416a071db52498f73fc733ac330d19e507c5127f83992f61a6900f",- "summary_state": "ready",+ "body_hash": "af968cfe7454eca7769fa907cf30435ab4e4d9a38b1df4a924c3e261b1ea058d",+ "summary_state": "stale","summary": "Loads a corpus from a specified directory, extracting concepts and building a graph for query processing.","crux": {"code": " const snippet = firstProse(parsed.content);\n concepts.push({\n slug: String(fm.slug ?? entry.replace(/\\.md$/, \"\")),\n name: String(fm.name ?? \"\"),\n sources,\n related,\n snippet,\n text: `${fm.name ?? \"\"} ${snippet} ${sources.join(\" \")}`,\n });","span": "L93-L101"}},+ {+ "id": "src/ask/ask.ts#matchedIdfShare",+ "name": "matchedIdfShare",+ "kind": "function",+ "path": "src/ask/ask.ts",+ "span": "L309-L323",+ "signature": "function matchedIdfShare( q: Map<string, number>, fields: Array<Map<string, number>>, idf: Map<string, number>, dfltIdf: number, ): number",+ "exported": false,+ "origin": "ast",+ "body_hash": "93bb9c0ed85fc1574471b01dd1590d29f56829f7f848725be080ff45865f5477",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },{"id": "src/ask/ask.ts#parseSpan","name": "parseSpan","kind": "function","path": "src/ask/ask.ts",- "span": "L258-L262",+ "span": "L509-L513","signature": "function parseSpan(pointer: string): { path: string; from: number; to: number } | null","exported": false,"origin": "ast",@@ -1599,7 +1759,7 @@"name": "savingsFooter","kind": "function","path": "src/ask/ask.ts",- "span": "L384-L396",+ "span": "L736-L748","signature": "function savingsFooter(r: AskResult, body: string): string","exported": false,"origin": "ast",@@ -1613,24 +1773,80 @@"name": "score","kind": "function","path": "src/ask/ask.ts",- "span": "L120-L127",- "signature": "function score(query: Map<string, number>, doc: Map<string, number>): number",+ "span": "L117-L128",+ "signature": "function score( query: Map<string, number>, doc: Map<string, number>, idf: Map<string, number>, ): number","exported": false,"origin": "ast",- "body_hash": "54f8b9f6a5d14966e01000fe77bd71e2f1898431946f12653203351c5be39a80",- "summary_state": "ready",+ "body_hash": "2072a594183410910a338bd797387b8e6f7d832270aea7037ffad9b397e150d8",+ "summary_state": "stale","summary": "Calculates a score for a document's token counts against a query, facilitating relevance ranking.","crux": {"code": "function score(query: Map<string, number>, doc: Map<string, number>): number {\n let s = 0;\n for (const [t, qn] of query) {\n const dn = doc.get(t);\n if (dn) s += qn * dn;\n }\n return s;","span": "L108-L114"}},+ {+ "id": "src/ask/ask.ts#skeleton",+ "name": "skeleton",+ "kind": "function",+ "path": "src/ask/ask.ts",+ "span": "L644-L673",+ "signature": "function skeleton(dir: string, file: string, opts: { contextDir?: string } = {}): SkeletonResult",+ "exported": true,+ "origin": "ast",+ "body_hash": "dce0b973c651c9f800712f6a2ab2fb09cb21f9fb943d36f0b15bc6286c02b8f7",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/ask/ask.ts#skeleton.startLine",+ "name": "startLine",+ "kind": "function",+ "path": "src/ask/ask.ts",+ "span": "L661-L661",+ "signature": "startLine = (span: string)",+ "exported": true,+ "origin": "ast",+ "body_hash": "84d2fbc9874f1ef387f00598a55b3d677f8cb91f237fd7763887375557cbde35",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/ask/ask.ts#SkeletonEntry",+ "name": "SkeletonEntry",+ "kind": "interface",+ "path": "src/ask/ask.ts",+ "span": "L626-L633",+ "signature": "interface SkeletonEntry",+ "exported": true,+ "origin": "ast",+ "body_hash": "97e65aa8f777a7c35743f802f99b11c49914bb5d94d43fe15bd643fb7ac7c776",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/ask/ask.ts#SkeletonResult",+ "name": "SkeletonResult",+ "kind": "interface",+ "path": "src/ask/ask.ts",+ "span": "L635-L639",+ "signature": "interface SkeletonResult",+ "exported": true,+ "origin": "ast",+ "body_hash": "852555fd408bd54eca9e183234e6d6d89e02e58efa4f3c180e93d1641febe36c",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },{"id": "src/ask/ask.ts#sliceSpan","name": "sliceSpan","kind": "function","path": "src/ask/ask.ts",- "span": "L266-L281",+ "span": "L517-L532","signature": "function sliceSpan(root: string, path: string, from: number, to: number): string | null","exported": false,"origin": "ast",@@ -1647,12 +1863,12 @@"name": "structural","kind": "function","path": "src/ask/ask.ts",- "span": "L157-L198",- "signature": "function structural(query: string, graph: GraphV1, limit: number): AskResult | null",+ "span": "L230-L279",+ "signature": "function structural(query: string, graph: GraphV1, limit: number): StructuralOutcome","exported": false,"origin": "ast",- "body_hash": "c45c0934ab5e0b17ed1fefd0855cb0fe293ee2ff106308599f4d218172a91652",- "summary_state": "ready",+ "body_hash": "882a1b72a392c807907ef0e0f699a41d2f69dacacb713a0597b310d964f5fd30",+ "summary_state": "stale","summary": "Processes a structural query to find and return relevant callers or callees from the graph based on the query.","crux": {"code": " if (!wantsIn && !wantsOut) return null;\n\n const subjects = findSubject(query, graph);\n if (subjects.length === 0) return null;\n\n const ids = new Set(subjects.map((n) => n.id));\n const byId = new Map(graph.nodes.map((n) => [n.id, n]));\n const outgoing = wantsOut && !wantsIn; // \"what does X call / import\" — else default to callers\n const rels = new Set(outgoing ? OUTGOING_RELS : INCOMING_RELS);\n\n const hits: AskHit[] = [];\n const seen = new Set<string>();",@@ -1660,28 +1876,39 @@}},{- "id": "src/ask/ask.ts#tokenize",- "name": "tokenize",+ "id": "src/ask/ask.ts#StructuralOutcome",+ "name": "StructuralOutcome",+ "kind": "type",+ "path": "src/ask/ask.ts",+ "span": "L221-L221",+ "signature": "type StructuralOutcome = { result: AskResult } | { fallthroughNote: string } | null;",+ "exported": false,+ "origin": "ast",+ "body_hash": "628e17efd7be8fc7e319d1f0a5a1284ead0b1630ed037560382c6b21e362720f",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/ask/ask.ts#subjectWords",+ "name": "subjectWords","kind": "function","path": "src/ask/ask.ts",- "span": "L62-L68",- "signature": "function tokenize(text: string): string[]",+ "span": "L194-L196",+ "signature": "function subjectWords(query: string): string[]","exported": false,"origin": "ast",- "body_hash": "d97d4f8b5422d7b236c0966ab1b1b82002c4691a389eff29fd97e93460269f21",- "summary_state": "ready",- "summary": "Transforms a string of text into an array of lowercased subword tokens, filtering out common stop words.",- "crux": {- "code": " return text\n .replace(/([a-z0-9])([A-Z])/g, \"$1 $2\") // camelCase → camel Case\n .toLowerCase()\n .split(/[^a-z0-9]+/)\n .filter((t) => t.length > 1 && !STOP.has(t));",- "span": "L51-L55"- }+ "body_hash": "18d4993f0e015fe413d7acd6650f40c85effd40e22ed376b19223c939c6a9d0b",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{"id": "src/ask/ask.ts#toTokens","name": "toTokens","kind": "function","path": "src/ask/ask.ts",- "span": "L350-L352",+ "span": "L688-L690","signature": "function toTokens(chars: number): number","exported": false,"origin": "ast",@@ -1691,30 +1918,228 @@"crux": null},{- "id": "src/claude/format.ts",- "name": "format.ts",+ "id": "src/ask/graphrank.ts",+ "name": "graphrank.ts","kind": "file",- "path": "src/claude/format.ts",- "span": "L1-L134",+ "path": "src/ask/graphrank.ts",+ "span": "L1-L115","signature": null,"exported": true,"origin": "ast",- "body_hash": "014b4077fa11ce2a07b1d7eb7b08c4fbcee9b08c3d06e4489d0c86f196930609",- "chars": 5479,+ "body_hash": "a3cb6bf186d9ba96aa8706c2e04c957e8826139766d46a3adb0fe23d994cf1c6",+ "chars": 4513,"summary_state": "pending","summary": null,"crux": null},{- "id": "src/claude/format.ts#AskJson",+ "id": "src/ask/graphrank.ts#PageRankOptions",+ "name": "PageRankOptions",+ "kind": "interface",+ "path": "src/ask/graphrank.ts",+ "span": "L33-L39",+ "signature": "interface PageRankOptions",+ "exported": true,+ "origin": "ast",+ "body_hash": "214701bc4bff2de310654c772007fffb60595fa79289cec6d08de2bd084e6ebc",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/ask/graphrank.ts#personalizedPageRank",+ "name": "personalizedPageRank",+ "kind": "function",+ "path": "src/ask/graphrank.ts",+ "span": "L52-L114",+ "signature": "function personalizedPageRank( graph: GraphV1, seeds: Map<string, number>, opts: PageRankOptions = {}, ): Map<string, number>",+ "exported": true,+ "origin": "ast",+ "body_hash": "9047817eb293e393448f4c82571e0ac123573245583ec00ede7f9c621cda982d",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/ask/graphrank.ts#personalizedPageRank.link",+ "name": "link",+ "kind": "function",+ "path": "src/ask/graphrank.ts",+ "span": "L64-L66",+ "signature": "link = (a: string, b: string)",+ "exported": true,+ "origin": "ast",+ "body_hash": "b76de11ee0fe0076e0901d2e5abc1ac27dfd56c3a8902d3314b7408902316269",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/ask/index-file.ts",+ "name": "index-file.ts",+ "kind": "file",+ "path": "src/ask/index-file.ts",+ "span": "L1-L160",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "8250b5189d515c4e4bf1573c4c44c96563e121c944951c5f16029c62da62d854",+ "chars": 5977,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/ask/index-file.ts#AskIndex",+ "name": "AskIndex",+ "kind": "interface",+ "path": "src/ask/index-file.ts",+ "span": "L63-L69",+ "signature": "interface AskIndex",+ "exported": true,+ "origin": "ast",+ "body_hash": "a6e5978285b47baf6dc2f857106f65dccb472c8262d8c673600206666af5f7ed",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/ask/index-file.ts#AskIndexDoc",+ "name": "AskIndexDoc",+ "kind": "interface",+ "path": "src/ask/index-file.ts",+ "span": "L54-L59",+ "signature": "interface AskIndexDoc",+ "exported": true,+ "origin": "ast",+ "body_hash": "4e6b189863bc6614aef60491ea5931414251bad599c5c38783ad4c875a080dda",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/ask/index-file.ts#askIndexPath",+ "name": "askIndexPath",+ "kind": "function",+ "path": "src/ask/index-file.ts",+ "span": "L76-L78",+ "signature": "function askIndexPath(outDir: string): string",+ "exported": true,+ "origin": "ast",+ "body_hash": "b16433d7a4366a73ec33bb76fb8e13cdd0039de0c6a783a8b9605f355a7c0dfb",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/ask/index-file.ts#bagLen",+ "name": "bagLen",+ "kind": "function",+ "path": "src/ask/index-file.ts",+ "span": "L85-L89",+ "signature": "function bagLen(p: [string, number][]): number",+ "exported": false,+ "origin": "ast",+ "body_hash": "fa14c4dc1e7bf2f6a06307dbb18890b7973992df221f4b26c67d04db640beb0c",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/ask/index-file.ts#counts",+ "name": "counts",+ "kind": "function",+ "path": "src/ask/index-file.ts",+ "span": "L47-L51",+ "signature": "function counts(tokens: string[]): Map<string, number>",+ "exported": true,+ "origin": "ast",+ "body_hash": "55edb54385b8591bd6442f62f998d9d774eda8c15abd3e368e4b3a8086c84112",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/ask/index-file.ts#pairs",+ "name": "pairs",+ "kind": "function",+ "path": "src/ask/index-file.ts",+ "span": "L80-L82",+ "signature": "function pairs(m: Map<string, number>): [string, number][]",+ "exported": false,+ "origin": "ast",+ "body_hash": "0b366a6cb13cf1c9f4cdc8bcccf3bc270b8793f08059c793dbd93ccf1dbf5fe6",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/ask/index-file.ts#readAskIndex",+ "name": "readAskIndex",+ "kind": "function",+ "path": "src/ask/index-file.ts",+ "span": "L138-L159",+ "signature": "function readAskIndex(outDir: string): AskIndex | null",+ "exported": true,+ "origin": "ast",+ "body_hash": "4aa57e86253c4dd7399383853778796baa43ba33801164808b86841d16d7612d",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/ask/index-file.ts#tokenize",+ "name": "tokenize",+ "kind": "function",+ "path": "src/ask/index-file.ts",+ "span": "L38-L44",+ "signature": "function tokenize(text: string): string[]",+ "exported": true,+ "origin": "ast",+ "body_hash": "d97d4f8b5422d7b236c0966ab1b1b82002c4691a389eff29fd97e93460269f21",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/ask/index-file.ts#writeAskIndex",+ "name": "writeAskIndex",+ "kind": "function",+ "path": "src/ask/index-file.ts",+ "span": "L98-L131",+ "signature": "function writeAskIndex(outDir: string, graph: GraphV1): string",+ "exported": true,+ "origin": "ast",+ "body_hash": "9e974a952bf81fe17aa6371841f24af344d8d32ceb67eee3dd6a19d85125e0cb",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/format.ts",+ "name": "format.ts",+ "kind": "file",+ "path": "src/claude/format.ts",+ "span": "L1-L174",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "de278daec7071243ac381603d43817c6589406a1c8d03cef4d0bcf58b4b1d902",+ "chars": 7803,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/format.ts#AskJson","name": "AskJson","kind": "interface","path": "src/claude/format.ts",- "span": "L77-L82",+ "span": "L77-L84","signature": "interface AskJson","exported": true,"origin": "ast",- "body_hash": "b399ef3e1787b48619f044578ea2cf3cf63cd92876015d55979db78ee6f9e643",+ "body_hash": "5758ae8e52d077f5662df3a37af9e59745a3b1b16a7e4bb50a2e62d047bff2fc","summary_state": "pending","summary": null,"crux": null@@ -1752,7 +2177,7 @@"name": "formatOrientation","kind": "function","path": "src/claude/format.ts",- "span": "L125-L127",+ "span": "L165-L167","signature": "function formatOrientation(indexMd: string, budgetBytes = 1500): string","exported": true,"origin": "ast",@@ -1766,7 +2191,7 @@"name": "formatRetrieval","kind": "function","path": "src/claude/format.ts",- "span": "L110-L123",+ "span": "L119-L132","signature": "function formatRetrieval(ask: AskJson, cap = 5): string | null","exported": true,"origin": "ast",@@ -1817,6 +2242,20 @@"summary": null,"crux": null},+ {+ "id": "src/claude/format.ts#relevantRetrieval",+ "name": "relevantRetrieval",+ "kind": "function",+ "path": "src/claude/format.ts",+ "span": "L152-L163",+ "signature": "function relevantRetrieval(ask: AskJson, s: SessionState, cap = 3): string | null",+ "exported": true,+ "origin": "ast",+ "body_hash": "117b69b5bb5a2058d37856fe1429241e2e5b0e00dd3bc87ad2adbb52286f1f4e",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },{"id": "src/claude/format.ts#renderStatusline","name": "renderStatusline",@@ -1836,7 +2275,7 @@"name": "renderSubagent","kind": "function","path": "src/claude/format.ts",- "span": "L129-L133",+ "span": "L169-L173","signature": "function renderSubagent(agentName: string, session: SessionState | null): string","exported": true,"origin": "ast",@@ -1850,11 +2289,11 @@"name": "retrievalBody","kind": "function","path": "src/claude/format.ts",- "span": "L89-L99",+ "span": "L91-L108","signature": "function retrievalBody(hits: AskJson['hits']): string","exported": false,"origin": "ast",- "body_hash": "2a965bab71b652325c4faf1974b0f4d148e49eb26b7e137156e0f573266bcb5d",+ "body_hash": "2e68851469a8165204e9fbaf2dab76cbb78d5671cd5437b3a40498acc95a92fd","summary_state": "pending","summary": null,"crux": null@@ -1864,7 +2303,7 @@"name": "retrievalTokensSaved","kind": "function","path": "src/claude/format.ts",- "span": "L102-L108",+ "span": "L111-L117","signature": "function retrievalTokensSaved(ask: AskJson, cap = 5): number","exported": true,"origin": "ast",@@ -1878,7 +2317,7 @@"name": "tokensOf","kind": "function","path": "src/claude/format.ts",- "span": "L84-L84",+ "span": "L86-L86","signature": "function tokensOf(chars: number): number","exported": false,"origin": "ast",@@ -1892,12 +2331,12 @@"name": "hooks.ts","kind": "file","path": "src/claude/hooks.ts",- "span": "L1-L111",+ "span": "L1-L114","signature": null,"exported": true,"origin": "ast",- "body_hash": "6505b9c22c766aa21c6b2bb50f029fec483fda0b0974afa0e8d8e6248b4f6862",- "chars": 4842,+ "body_hash": "efe4393aec6f4ab0854042b1300e8e1af899d820e6819fd0ad2d2374d321ffee",+ "chars": 5118,"summary_state": "pending","summary": null,"crux": null@@ -1907,7 +2346,7 @@"name": "checkStaleCount","kind": "function","path": "src/claude/hooks.ts",- "span": "L43-L47",+ "span": "L42-L46","signature": "function checkStaleCount(dir: string): number","exported": false,"origin": "ast",@@ -1921,7 +2360,7 @@"name": "emit","kind": "function","path": "src/claude/hooks.ts",- "span": "L48-L50",+ "span": "L47-L49","signature": "function emit(eventName: string, additionalContext: string): void","exported": false,"origin": "ast",@@ -1931,29 +2370,43 @@"crux": null},{- "id": "src/claude/hooks.ts#graftCli",- "name": "graftCli",+ "id": "src/claude/hooks.ts#graftJson",+ "name": "graftJson","kind": "function","path": "src/claude/hooks.ts",- "span": "L24-L27",- "signature": "function graftCli(dir: string): { cmd: string; pre: string[] }",+ "span": "L28-L41",+ "signature": "function graftJson(dir: string, args: string[]): any | null","exported": false,"origin": "ast",- "body_hash": "4617c7080204c5f47d35e9051f44df0440c30fc4035003573e7a575fde6e6aa7",+ "body_hash": "baa979b59d9ba8afbfe243a41e387c5833b409120746db26dc3ad30ff9eb9bd6","summary_state": "pending","summary": null,"crux": null},{- "id": "src/claude/hooks.ts#graftJson",- "name": "graftJson",+ "id": "src/claude/hooks.ts#handlePostEdit",+ "name": "handlePostEdit","kind": "function","path": "src/claude/hooks.ts",- "span": "L28-L42",- "signature": "function graftJson(dir: string, args: string[]): any | null",+ "span": "L51-L57",+ "signature": "async function handlePostEdit(input: any, dir: string): Promise<void>",+ "exported": false,+ "origin": "ast",+ "body_hash": "afa0ad391dd4412cd4df9af9ce59983fa67796d316afeabef1275abc9889284d",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/hooks.ts#handleStop",+ "name": "handleStop",+ "kind": "function",+ "path": "src/claude/hooks.ts",+ "span": "L59-L73",+ "signature": "function handleStop(dir: string): void","exported": false,"origin": "ast",- "body_hash": "fb91f1d1a251edf20793ce914435d1c3857b6fcda91fc3e26645ba848b8a6dbc",+ "body_hash": "ef731173b05a469942f641ab924f540a6fdfede444916092a16464150b10bd7b","summary_state": "pending","summary": null,"crux": null@@ -1963,11 +2416,11 @@"name": "main","kind": "function","path": "src/claude/hooks.ts",- "span": "L52-L110",+ "span": "L75-L113","signature": "async function main(event: string): Promise<void>","exported": true,"origin": "ast",- "body_hash": "703ca99c2fd552472f099f0dd2784427a3c3ec7d1b62b31d39a6d7f6536d2fd4",+ "body_hash": "901ece3648f4b605795b2ce8281dddfa50fa719fa435ee878522505fea74991c","summary_state": "pending","summary": null,"crux": null@@ -1977,7 +2430,7 @@"name": "projectDir","kind": "function","path": "src/claude/hooks.ts",- "span": "L15-L17",+ "span": "L21-L23","signature": "function projectDir(input: any): string","exported": false,"origin": "ast",@@ -1991,7 +2444,7 @@"name": "readStdin","kind": "function","path": "src/claude/hooks.ts",- "span": "L8-L12",+ "span": "L14-L18","signature": "function readStdin(): any","exported": false,"origin": "ast",@@ -2005,7 +2458,7 @@"name": "safeReadFd0","kind": "function","path": "src/claude/hooks.ts",- "span": "L13-L13",+ "span": "L19-L19","signature": "function safeReadFd0(): string","exported": false,"origin": "ast",@@ -2019,7 +2472,7 @@"name": "underGraft","kind": "function","path": "src/claude/hooks.ts",- "span": "L18-L21",+ "span": "L24-L27","signature": "function underGraft(dir: string, file: string): boolean","exported": true,"origin": "ast",@@ -2029,193 +2482,464 @@"crux": null},{- "id": "src/claude/state.ts",- "name": "state.ts",+ "id": "src/claude/init.ts",+ "name": "init.ts","kind": "file",- "path": "src/claude/state.ts",- "span": "L1-L77",+ "path": "src/claude/init.ts",+ "span": "L1-L50","signature": null,"exported": true,"origin": "ast",- "body_hash": "fa12661d1253f24bff684f6c9c3197ba5ebde17f7291acd67408165e5a2823f3",- "chars": 3385,+ "body_hash": "7a686f132722453ee18c4715e4ab563f1577ac41811b01cced574de075a452ee",+ "chars": 2251,"summary_state": "pending","summary": null,"crux": null},{- "id": "src/claude/state.ts#acquireLock",- "name": "acquireLock",- "kind": "function",- "path": "src/claude/state.ts",- "span": "L59-L75",- "signature": "function acquireLock(d: string): boolean",+ "id": "src/claude/init.ts#InitResult",+ "name": "InitResult",+ "kind": "interface",+ "path": "src/claude/init.ts",+ "span": "L9-L15",+ "signature": "interface InitResult","exported": true,"origin": "ast",- "body_hash": "d10ac8134d1cc35d9bd14414ba7608b48646c70492b96b624f1e140f86dbd4b6",+ "body_hash": "452d62ae1f5e60a539835b2fe9892f24cb79cb4b002808473397cfd0f3e729cc","summary_state": "pending","summary": null,"crux": null},{- "id": "src/claude/state.ts#cacheDir",- "name": "cacheDir",+ "id": "src/claude/init.ts#runInit",+ "name": "runInit","kind": "function",- "path": "src/claude/state.ts",- "span": "L28-L28",- "signature": "function cacheDir(projectDir: string): string",+ "path": "src/claude/init.ts",+ "span": "L17-L49",+ "signature": "function runInit(dir: string, opts: { build?: boolean; cliPath?: string } = {}): InitResult","exported": true,"origin": "ast",- "body_hash": "c5b57c650fe2af36c19b2cad9b398f6c77e16046d173394d0710edde24c516f2",+ "body_hash": "8b5756f072c04e6fcef32d10f1a29a8b5c0d4f5e68d7642cfcb1ab43aef61fb0","summary_state": "pending","summary": null,"crux": null},{- "id": "src/claude/state.ts#emptySession",- "name": "emptySession",- "kind": "function",- "path": "src/claude/state.ts",- "span": "L24-L26",- "signature": "function emptySession(): SessionState",- "exported": false,+ "id": "src/claude/paths.ts",+ "name": "paths.ts",+ "kind": "file",+ "path": "src/claude/paths.ts",+ "span": "L1-L26",+ "signature": null,+ "exported": true,"origin": "ast",- "body_hash": "fa6db80cab3fefe96f4cd2d65fe554e2d925a1ec82734d40e883c0ad79fdc542",+ "body_hash": "d4bde8a45859c88921abd6fd06c700199bf1feaf2e5487e8e0e217cf9dab5026",+ "chars": 1188,"summary_state": "pending","summary": null,"crux": null},{- "id": "src/claude/state.ts#emptyStats",- "name": "emptyStats",+ "id": "src/claude/paths.ts#claudeDistDir",+ "name": "claudeDistDir","kind": "function",- "path": "src/claude/state.ts",- "span": "L20-L23",- "signature": "function emptyStats(): Stats",+ "path": "src/claude/paths.ts",+ "span": "L18-L20",+ "signature": "function claudeDistDir(): string","exported": true,"origin": "ast",- "body_hash": "f507d8c6bb5222d97af97220bed44ebab58221672fe4c0f1e43c410c7ad6f03f",+ "body_hash": "fa79e92f3473e4dc31dd9f505b0f76a76d1e8ba6820f39e1ebd23c217569fd64","summary_state": "pending","summary": null,"crux": null},{- "id": "src/claude/state.ts#lockPath",- "name": "lockPath",+ "id": "src/claude/paths.ts#claudeScriptPath",+ "name": "claudeScriptPath","kind": "function",- "path": "src/claude/state.ts",- "span": "L31-L31",- "signature": "function lockPath(d: string): string",- "exported": false,+ "path": "src/claude/paths.ts",+ "span": "L23-L25",+ "signature": "function claudeScriptPath(name: string): string",+ "exported": true,"origin": "ast",- "body_hash": "d9e771038564b59c8e77023262cf3b4cb19cb67a11bdffd03596b55ba16abd19",+ "body_hash": "168a58f498382a3a3b70191e87465ccd36d98fe67c050aedefa722e4601a4233","summary_state": "pending","summary": null,"crux": null},{- "id": "src/claude/state.ts#patchStats",- "name": "patchStats",+ "id": "src/claude/paths.ts#graftCliPath",+ "name": "graftCliPath","kind": "function",- "path": "src/claude/state.ts",- "span": "L47-L51",- "signature": "function patchStats(d: string, patch: Partial<Stats>): Stats",+ "path": "src/claude/paths.ts",+ "span": "L11-L13",+ "signature": "function graftCliPath(): string","exported": true,"origin": "ast",- "body_hash": "44a7279d2463dc0c60b5992a1bbf3ca152a81fbf281ba3181f66306ea47bac0b",+ "body_hash": "a89543a44c198c7ed91348d71ac004dae93303828aa241c0950ff982e7e14324","summary_state": "pending","summary": null,"crux": null},{- "id": "src/claude/state.ts#readJson",- "name": "readJson",- "kind": "function",- "path": "src/claude/state.ts",- "span": "L33-L35",- "signature": "function readJson<T>(p: string): T | null",- "exported": false,+ "id": "src/claude/settings-merge.ts",+ "name": "settings-merge.ts",+ "kind": "file",+ "path": "src/claude/settings-merge.ts",+ "span": "L1-L56",+ "signature": null,+ "exported": true,"origin": "ast",- "body_hash": "70bcbc68383bedc607095d101f70d8bf5a7c0bfa84d2fec3b9583674646386e0",+ "body_hash": "eda59409ff8c470e7d3726a6740ba19e36e511ab40c67234aa794fabd9eacb8d",+ "chars": 2653,"summary_state": "pending","summary": null,"crux": null},{- "id": "src/claude/state.ts#readSession",- "name": "readSession",+ "id": "src/claude/settings-merge.ts#graftBlocks",+ "name": "graftBlocks","kind": "function",- "path": "src/claude/state.ts",- "span": "L52-L54",- "signature": "function readSession(d: string, id: string): SessionState",- "exported": true,+ "path": "src/claude/settings-merge.ts",+ "span": "L10-L17",+ "signature": "function graftBlocks(): Record<string, Json>",+ "exported": false,"origin": "ast",- "body_hash": "9c9ff7506f27585bde3a8218144cc25959b1b5a460f65eedbec712dce641f391",+ "body_hash": "b63b7e0ffcf1d915291072b9cef941ddc0f0a242052a955287c2c49bd21d38ed","summary_state": "pending","summary": null,"crux": null},{- "id": "src/claude/state.ts#readStats",- "name": "readStats",+ "id": "src/claude/settings-merge.ts#hookCmd",+ "name": "hookCmd","kind": "function",- "path": "src/claude/state.ts",- "span": "L43-L43",- "signature": "function readStats(d: string): Stats | null",- "exported": true,+ "path": "src/claude/settings-merge.ts",+ "span": "L7-L9",+ "signature": "function hookCmd(arg: string): string",+ "exported": false,"origin": "ast",- "body_hash": "0fc71d400d255e986f4914c0a59304ed5b6d39684e7ddbae7e72fa4edd56a633",+ "body_hash": "e9298ddcd47ce700591a4d358b92ada2ac0b935b5830b3f73352c9de90fee469","summary_state": "pending","summary": null,"crux": null},{- "id": "src/claude/state.ts#releaseLock",- "name": "releaseLock",+ "id": "src/claude/settings-merge.ts#isGraftHookEntry",+ "name": "isGraftHookEntry","kind": "function",- "path": "src/claude/state.ts",- "span": "L76-L76",- "signature": "function releaseLock(d: string): void",- "exported": true,+ "path": "src/claude/settings-merge.ts",+ "span": "L18-L20",+ "signature": "function isGraftHookEntry(entry: Json): boolean",+ "exported": false,"origin": "ast",- "body_hash": "0e65162ca2e768f56fcd08d222fb831dc50e2c8f69bf8e3a4b568178d3efb7bb",+ "body_hash": "99d3b618293eccfb74c0e88c5671c484a54355792596c8b6c2856f8cb432814e","summary_state": "pending","summary": null,"crux": null},{- "id": "src/claude/state.ts#sessionPath",- "name": "sessionPath",- "kind": "function",- "path": "src/claude/state.ts",- "span": "L30-L30",- "signature": "function sessionPath(d: string, id: string): string",+ "id": "src/claude/settings-merge.ts#Json",+ "name": "Json",+ "kind": "type",+ "path": "src/claude/settings-merge.ts",+ "span": "L1-L1",+ "signature": "type Json = Record<string, any>;","exported": false,"origin": "ast",- "body_hash": "2cb9cb73fc21b0857099f40d2df6a5b62657b5464ba8830cda3edd015ef1ccc3",+ "body_hash": "0c2b997e71a6ecf28fd3f46a0f9d4799bef1615b247ca3e471aad6b57e73189c","summary_state": "pending","summary": null,"crux": null},{- "id": "src/claude/state.ts#SessionState",- "name": "SessionState",- "kind": "interface",- "path": "src/claude/state.ts",- "span": "L10-L16",- "signature": "interface SessionState",+ "id": "src/claude/settings-merge.ts#mergeGraftSettings",+ "name": "mergeGraftSettings",+ "kind": "function",+ "path": "src/claude/settings-merge.ts",+ "span": "L22-L55",+ "signature": "function mergeGraftSettings(existing: Json): { merged: Json; warnings: string[] }","exported": true,"origin": "ast",- "body_hash": "8a88a78a3d3bd8120988cf348422bf7ce8214d1b6715cb1f5d4059413e6d9ca8",+ "body_hash": "ea1e86633976a209debc5f9a83ac8ef1e7fd74f5327e196617b64ae8849ff8c5","summary_state": "pending","summary": null,"crux": null},{- "id": "src/claude/state.ts#Stats",- "name": "Stats",- "kind": "interface",- "path": "src/claude/state.ts",+ "id": "src/claude/shim-template.ts",+ "name": "shim-template.ts",+ "kind": "file",+ "path": "src/claude/shim-template.ts",+ "span": "L1-L64",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "53c468c5de89b06fb76439c756932592409eba5fc19ba07ff6a37403912033a9",+ "chars": 3141,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/shim-template.ts#hooksShim",+ "name": "hooksShim",+ "kind": "function",+ "path": "src/claude/shim-template.ts",+ "span": "L63-L63",+ "signature": "function hooksShim(bakedDir: string): string",+ "exported": true,+ "origin": "ast",+ "body_hash": "8ea2753059a8ae115b10aaa971482641a2462ad97d8c79dbd7a78cbe94c9213a",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/shim-template.ts#shim",+ "name": "shim",+ "kind": "function",+ "path": "src/claude/shim-template.ts",+ "span": "L16-L60",+ "signature": "function shim(entryFile: string, call: string, bakedDir: string): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "bc007e4fd1420dea4e01d8ae1c8994ea3e04c75b62ddc76b8a5fd671bab71dd3",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/shim-template.ts#statuslineShim",+ "name": "statuslineShim",+ "kind": "function",+ "path": "src/claude/shim-template.ts",+ "span": "L62-L62",+ "signature": "function statuslineShim(bakedDir: string): string",+ "exported": true,+ "origin": "ast",+ "body_hash": "1923650d5135a05cad7f41616e3c1e7c5d8af844798ad9fa9cbcb77299de5a3c",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/skill-template.ts",+ "name": "skill-template.ts",+ "kind": "file",+ "path": "src/claude/skill-template.ts",+ "span": "L1-L71",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "56d89c215e3ba0175d9f1ae2cf8baabe104c45d2b5bf2c18557ba29a4e97520b",+ "chars": 3725,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/skill-template.ts#skillTemplate",+ "name": "skillTemplate",+ "kind": "function",+ "path": "src/claude/skill-template.ts",+ "span": "L6-L70",+ "signature": "function skillTemplate(): string",+ "exported": true,+ "origin": "ast",+ "body_hash": "687db45aebaf068cd90725a5fb01283394e6a3dc84be034fc828e8a11b1f4e48",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/state.ts",+ "name": "state.ts",+ "kind": "file",+ "path": "src/claude/state.ts",+ "span": "L1-L81",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "f8b8d93b534be15a3d71565e63a63caa302f036348d20dcd645fb49f25db3f61",+ "chars": 3650,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/state.ts#acquireLock",+ "name": "acquireLock",+ "kind": "function",+ "path": "src/claude/state.ts",+ "span": "L63-L79",+ "signature": "function acquireLock(d: string): boolean",+ "exported": true,+ "origin": "ast",+ "body_hash": "d10ac8134d1cc35d9bd14414ba7608b48646c70492b96b624f1e140f86dbd4b6",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/state.ts#cacheDir",+ "name": "cacheDir",+ "kind": "function",+ "path": "src/claude/state.ts",+ "span": "L32-L32",+ "signature": "function cacheDir(projectDir: string): string",+ "exported": true,+ "origin": "ast",+ "body_hash": "c5b57c650fe2af36c19b2cad9b398f6c77e16046d173394d0710edde24c516f2",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/state.ts#emptySession",+ "name": "emptySession",+ "kind": "function",+ "path": "src/claude/state.ts",+ "span": "L28-L30",+ "signature": "function emptySession(): SessionState",+ "exported": false,+ "origin": "ast",+ "body_hash": "b08d2c899575a022887655dd89d27362e526c5f66dc5c41b0766da5f918c7b31",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/state.ts#emptyStats",+ "name": "emptyStats",+ "kind": "function",+ "path": "src/claude/state.ts",+ "span": "L24-L27",+ "signature": "function emptyStats(): Stats",+ "exported": true,+ "origin": "ast",+ "body_hash": "f507d8c6bb5222d97af97220bed44ebab58221672fe4c0f1e43c410c7ad6f03f",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/state.ts#lockPath",+ "name": "lockPath",+ "kind": "function",+ "path": "src/claude/state.ts",+ "span": "L35-L35",+ "signature": "function lockPath(d: string): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "d9e771038564b59c8e77023262cf3b4cb19cb67a11bdffd03596b55ba16abd19",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/state.ts#patchStats",+ "name": "patchStats",+ "kind": "function",+ "path": "src/claude/state.ts",+ "span": "L51-L55",+ "signature": "function patchStats(d: string, patch: Partial<Stats>): Stats",+ "exported": true,+ "origin": "ast",+ "body_hash": "44a7279d2463dc0c60b5992a1bbf3ca152a81fbf281ba3181f66306ea47bac0b",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/state.ts#readJson",+ "name": "readJson",+ "kind": "function",+ "path": "src/claude/state.ts",+ "span": "L37-L39",+ "signature": "function readJson<T>(p: string): T | null",+ "exported": false,+ "origin": "ast",+ "body_hash": "70bcbc68383bedc607095d101f70d8bf5a7c0bfa84d2fec3b9583674646386e0",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/state.ts#readSession",+ "name": "readSession",+ "kind": "function",+ "path": "src/claude/state.ts",+ "span": "L56-L58",+ "signature": "function readSession(d: string, id: string): SessionState",+ "exported": true,+ "origin": "ast",+ "body_hash": "9c9ff7506f27585bde3a8218144cc25959b1b5a460f65eedbec712dce641f391",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/state.ts#readStats",+ "name": "readStats",+ "kind": "function",+ "path": "src/claude/state.ts",+ "span": "L47-L47",+ "signature": "function readStats(d: string): Stats | null",+ "exported": true,+ "origin": "ast",+ "body_hash": "0fc71d400d255e986f4914c0a59304ed5b6d39684e7ddbae7e72fa4edd56a633",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/state.ts#releaseLock",+ "name": "releaseLock",+ "kind": "function",+ "path": "src/claude/state.ts",+ "span": "L80-L80",+ "signature": "function releaseLock(d: string): void",+ "exported": true,+ "origin": "ast",+ "body_hash": "0e65162ca2e768f56fcd08d222fb831dc50e2c8f69bf8e3a4b568178d3efb7bb",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/state.ts#sessionPath",+ "name": "sessionPath",+ "kind": "function",+ "path": "src/claude/state.ts",+ "span": "L34-L34",+ "signature": "function sessionPath(d: string, id: string): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "2cb9cb73fc21b0857099f40d2df6a5b62657b5464ba8830cda3edd015ef1ccc3",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/state.ts#SessionState",+ "name": "SessionState",+ "kind": "interface",+ "path": "src/claude/state.ts",+ "span": "L10-L20",+ "signature": "interface SessionState",+ "exported": true,+ "origin": "ast",+ "body_hash": "71b7141bbad2edaaeb5de514b603e2f56d62428dfe0da720818a505a19b96c52",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/claude/state.ts#Stats",+ "name": "Stats",+ "kind": "interface",+ "path": "src/claude/state.ts","span": "L4-L9","signature": "interface Stats","exported": true,@@ -2230,7 +2954,7 @@"name": "statsPath","kind": "function","path": "src/claude/state.ts",- "span": "L29-L29",+ "span": "L33-L33","signature": "function statsPath(d: string): string","exported": false,"origin": "ast",@@ -2244,7 +2968,7 @@"name": "writeJsonAtomic","kind": "function","path": "src/claude/state.ts",- "span": "L36-L41",+ "span": "L40-L45","signature": "function writeJsonAtomic(p: string, value: unknown): void","exported": false,"origin": "ast",@@ -2258,7 +2982,7 @@"name": "writeSession","kind": "function","path": "src/claude/state.ts",- "span": "L55-L57",+ "span": "L59-L61","signature": "function writeSession(d: string, id: string, s: SessionState): void","exported": true,"origin": "ast",@@ -2272,7 +2996,7 @@"name": "writeStats","kind": "function","path": "src/claude/state.ts",- "span": "L44-L44",+ "span": "L48-L48","signature": "function writeStats(d: string, s: Stats): void","exported": true,"origin": "ast",@@ -2376,8 +3100,8 @@"signature": null,"exported": true,"origin": "ast",- "body_hash": "faec4572d1c6d8803dc90ae5c19498dd7a7f85661ae979980504c626de5bdf6e",- "chars": 1295,+ "body_hash": "7ee672e67d3167a38e9577a673656f7958c69b48e62ec715850a9b14599a1d2a",+ "chars": 1291,"summary_state": "pending","summary": null,"crux": null@@ -2405,7 +3129,7 @@"signature": "function realBuild(dir: string): void","exported": false,"origin": "ast",- "body_hash": "5acdf6616ad5ea5e32990f2868c92bc807bbb7dc75d6348d208acb5719237415",+ "body_hash": "9138acc16457c5ba012c6a206acc5e406dd226657f7915e57d6a215aa138a4e6","summary_state": "pending","summary": null,"crux": null@@ -2425,50 +3149,304 @@"crux": null},{- "id": "src/cli.ts",- "name": "cli.ts",+ "id": "src/cli-epilogue.ts",+ "name": "cli-epilogue.ts","kind": "file",- "path": "src/cli.ts",- "span": "L1-L187",+ "path": "src/cli-epilogue.ts",+ "span": "L1-L86","signature": null,"exported": true,"origin": "ast",- "body_hash": "ba1d90ee4c0f7b5000fa4239461c19d54fdedcad12b8592589312f163e1357dc",- "chars": 8003,- "summary_state": "ready",- "summary": "This file implements the `graft` CLI tool for building and maintaining a context graph from code, ensuring it stays in sync with the repository.",- "crux": {- "code": "program\n .name(\"graft\")\n .description(\"Build a repo's context graph as linked markdown, and keep it in sync with the code.\")",- "span": "L22-L24"- }+ "body_hash": "a4534c83c0a600020421be92882a83db7fda3e1626a38702fc372bb3c523a232",+ "chars": 3220,+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/cli.ts#engineFrom",- "name": "engineFrom",+ "id": "src/cli-epilogue.ts#formatInitEpilogue",+ "name": "formatInitEpilogue","kind": "function",- "path": "src/cli.ts",- "span": "L27-L30",- "signature": "function engineFrom(): Graft",- "exported": false,+ "path": "src/cli-epilogue.ts",+ "span": "L44-L85",+ "signature": "function formatInitEpilogue(opts: InitEpilogueOptions): string",+ "exported": true,"origin": "ast",- "body_hash": "ddbb4f4e57bee5d05b95dc81f034e26183495162d84c6a290e12c6fda6c92ee8",- "summary_state": "ready",- "summary": "Creates an instance of the Graft engine configured with the specified context directory.",- "crux": {- "code": " return new Graft({ contextDir: opts.dir });",- "span": "L28-L28"- }+ "body_hash": "9d5c62edd17deaccdf340662903164b7d3d4d3d641a2de63e4d724d5c5414eae",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/cli.ts#fmt",- "name": "fmt",+ "id": "src/cli-epilogue.ts#indigo",+ "name": "indigo","kind": "function",- "path": "src/cli.ts",- "span": "L49-L53",- "signature": "fmt = (o: Record<string, number>)",+ "path": "src/cli-epilogue.ts",+ "span": "L23-L23",+ "signature": "indigo = (s: string)","exported": false,"origin": "ast",- "body_hash": "31c01b913d716a1932fff4c3a0e4a82dfa745d73f488f05b3d71910145bf98ad",+ "body_hash": "c8106154914b8f7b5e0f082446550f686fb2e88b53c90f669c27ee0fee6a09d8",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/cli-epilogue.ts#InitEpilogueOptions",+ "name": "InitEpilogueOptions",+ "kind": "interface",+ "path": "src/cli-epilogue.ts",+ "span": "L33-L40",+ "signature": "interface InitEpilogueOptions",+ "exported": true,+ "origin": "ast",+ "body_hash": "5cf812b2bbf455f2e65e722c3d550f588c328a471edf9578bdc6d9b897b770d8",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/cli-epilogue.ts#muted",+ "name": "muted",+ "kind": "function",+ "path": "src/cli-epilogue.ts",+ "span": "L24-L24",+ "signature": "muted = (s: string)",+ "exported": false,+ "origin": "ast",+ "body_hash": "8e2dfbf259448165613a7d727cf2a32d4f097985d48e67393b809379fb3bb0d7",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/cli-epilogue.ts#Step",+ "name": "Step",+ "kind": "interface",+ "path": "src/cli-epilogue.ts",+ "span": "L26-L31",+ "signature": "interface Step",+ "exported": false,+ "origin": "ast",+ "body_hash": "a968435c9dfdf66413f2465053633289b8ec0b3be46d92eae9616521b0ec3873",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/cli-meta.ts",+ "name": "cli-meta.ts",+ "kind": "file",+ "path": "src/cli-meta.ts",+ "span": "L1-L144",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "95ee44a152ed1936f0461b2452d9902fbf422555da9f01e8f5ff57fbb84a2f00",+ "chars": 5427,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/cli-meta.ts#formatUpgradeReport",+ "name": "formatUpgradeReport",+ "kind": "function",+ "path": "src/cli-meta.ts",+ "span": "L116-L127",+ "signature": "function formatUpgradeReport(result: UpgradeResult): string",+ "exported": true,+ "origin": "ast",+ "body_hash": "55b6aaadead32c8dda3ff65edf58270fa52b937ae45c1c8c8067c416a3923c86",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/cli-meta.ts#formatVersionReport",+ "name": "formatVersionReport",+ "kind": "function",+ "path": "src/cli-meta.ts",+ "span": "L63-L73",+ "signature": "function formatVersionReport(current: string, latest: NpmViewResult): string",+ "exported": true,+ "origin": "ast",+ "body_hash": "2bd4c8400f266d189b191ed9ec76a804b8bedf30e0cb2d3cb9d087a3da3001a9",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/cli-meta.ts#getNpmViewVersion",+ "name": "getNpmViewVersion",+ "kind": "function",+ "path": "src/cli-meta.ts",+ "span": "L46-L60",+ "signature": "function getNpmViewVersion(pkgName: string = PKG_NAME, timeoutMs = 2000): NpmViewResult",+ "exported": true,+ "origin": "ast",+ "body_hash": "7f899924ef65d988bcc484d526263978178eeb1df18c3f4e189a7b5553cdf346",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/cli-meta.ts#globalRoot",+ "name": "globalRoot",+ "kind": "function",+ "path": "src/cli-meta.ts",+ "span": "L76-L87",+ "signature": "function globalRoot(): string | null",+ "exported": false,+ "origin": "ast",+ "body_hash": "5296e6bdbdafb80632f1587a2815e89717ae7eeaa7b5d384cbf164d6e73ffb45",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/cli-meta.ts#isRunningViaNpx",+ "name": "isRunningViaNpx",+ "kind": "function",+ "path": "src/cli-meta.ts",+ "span": "L35-L37",+ "signature": "function isRunningViaNpx(moduleUrl: string): boolean",+ "exported": true,+ "origin": "ast",+ "body_hash": "da893b35a5ddbd2d55bf3d9e0eb76737586227d1c80ca3ab3dba8b88a2357781",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/cli-meta.ts#NpmViewResult",+ "name": "NpmViewResult",+ "kind": "interface",+ "path": "src/cli-meta.ts",+ "span": "L39-L42",+ "signature": "interface NpmViewResult",+ "exported": true,+ "origin": "ast",+ "body_hash": "90ac467dca193bc177b9a38002fc19687935fe93dee82c7f0667b7355905126e",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/cli-meta.ts#readCurrentVersion",+ "name": "readCurrentVersion",+ "kind": "function",+ "path": "src/cli-meta.ts",+ "span": "L27-L31",+ "signature": "function readCurrentVersion(moduleUrl: string): string",+ "exported": true,+ "origin": "ast",+ "body_hash": "2853fef726b29eba13de30dd028e6e1f2eff130828dc1b0ba8278d408e112b68",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/cli-meta.ts#readGlobalInstalledVersion",+ "name": "readGlobalInstalledVersion",+ "kind": "function",+ "path": "src/cli-meta.ts",+ "span": "L92-L103",+ "signature": "function readGlobalInstalledVersion(pkgName: string = PKG_NAME): string | null",+ "exported": true,+ "origin": "ast",+ "body_hash": "8d5197a36519f93e72ca3694601f4b7f8e4986badda334b6a58fd62faf02e456",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/cli-meta.ts#resolvePackageJsonPath",+ "name": "resolvePackageJsonPath",+ "kind": "function",+ "path": "src/cli-meta.ts",+ "span": "L17-L24",+ "signature": "function resolvePackageJsonPath(moduleUrl: string): string",+ "exported": true,+ "origin": "ast",+ "body_hash": "1f7a429abe093ad617757a954aac19d08c678691a5ecb54332b81fe0bb375752",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/cli-meta.ts#runUpgrade",+ "name": "runUpgrade",+ "kind": "function",+ "path": "src/cli-meta.ts",+ "span": "L132-L143",+ "signature": "function runUpgrade(moduleUrl: string): UpgradeResult",+ "exported": true,+ "origin": "ast",+ "body_hash": "e97acdffcbf87e0d54489080b688476ec3b4ae5ecf0b76dd0e418c754e053e5c",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/cli-meta.ts#UpgradeResult",+ "name": "UpgradeResult",+ "kind": "interface",+ "path": "src/cli-meta.ts",+ "span": "L105-L113",+ "signature": "interface UpgradeResult",+ "exported": true,+ "origin": "ast",+ "body_hash": "c9bb4b9900b362a7a657417bd3b0ffb018623634cff10a318332c4d1bb83654e",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/cli.ts",+ "name": "cli.ts",+ "kind": "file",+ "path": "src/cli.ts",+ "span": "L1-L363",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "305a20f34e586f22be7eee9b5d3084586d96e1edfec50a819deb4c83978ee265",+ "chars": 16131,+ "summary_state": "stale",+ "summary": "This file implements the `graft` CLI tool for building and maintaining a context graph from code, ensuring it stays in sync with the repository.",+ "crux": {+ "code": "program\n .name(\"graft\")\n .description(\"Build a repo's context graph as linked markdown, and keep it in sync with the code.\")",+ "span": "L22-L24"+ }+ },+ {+ "id": "src/cli.ts#engineFrom",+ "name": "engineFrom",+ "kind": "function",+ "path": "src/cli.ts",+ "span": "L41-L44",+ "signature": "function engineFrom(): Graft",+ "exported": false,+ "origin": "ast",+ "body_hash": "ddbb4f4e57bee5d05b95dc81f034e26183495162d84c6a290e12c6fda6c92ee8",+ "summary_state": "ready",+ "summary": "Creates an instance of the Graft engine configured with the specified context directory.",+ "crux": {+ "code": " return new Graft({ contextDir: opts.dir });",+ "span": "L28-L28"+ }+ },+ {+ "id": "src/cli.ts#fmt",+ "name": "fmt",+ "kind": "function",+ "path": "src/cli.ts",+ "span": "L80-L84",+ "signature": "fmt = (o: Record<string, number>)",+ "exported": false,+ "origin": "ast",+ "body_hash": "31c01b913d716a1932fff4c3a0e4a82dfa745d73f488f05b3d71910145bf98ad","summary_state": "ready","summary": "Formats a record of counts into a human-readable string for console output.","crux": {@@ -2476,6 +3454,20 @@"span": "L42-L46"}},+ {+ "id": "src/cli.ts#traverseAction",+ "name": "traverseAction",+ "kind": "function",+ "path": "src/cli.ts",+ "span": "L254-L260",+ "signature": "function traverseAction(kind: import(\"./graph/traverse-cli.js\").TraverseKind)",+ "exported": false,+ "origin": "ast",+ "body_hash": "22a87797c4d09df4b6dcf4876910653663d7e7968bc0c19e90dc77a9a3d675b4",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },{"id": "src/context/build.ts","name": "build.ts",@@ -3196,9 +4188,9 @@"signature": null,"exported": true,"origin": "ast",- "body_hash": "e237ef6555d8bd2001eccfc32e314ef3881cef1c79d537ee701515a357f87d16",- "chars": 5112,- "summary_state": "ready",+ "body_hash": "68b18392490544224b551743dcf524ad370a34ec5f84ba443b1bf8a1d1476f9f",+ "chars": 5145,+ "summary_state": "stale","summary": "The Context Graph Engine builds and checks a code context graph from a repository without a database.","crux": {"code": " * - {@link Graft.init} build `.context/` from a code repo.\n * - {@link Graft.check} report whether `.context/` is still in\n * sync with the code (for CI).\n *\n * The graph is a folder of linked markdown files committed to the repo; git is\n * the sync. This class wires the OpenRouter LLM providers into the build/check\n * pipelines; an API key is required for any LLM-backed operation.",@@ -3228,8 +4220,8 @@"signature": "class Graft","exported": true,"origin": "ast",- "body_hash": "fb35e77789763532926013366fd1fc5027bd02cac2356512d8a5813f6b409009",- "summary_state": "ready",+ "body_hash": "77ee468ac84c61f0fbb143c6010c5fb04bb9948421092680d53a33e7c8388530",+ "summary_state": "stale","summary": "Encapsulates methods for building and checking a context graph from a code repository.","crux": null},@@ -3239,11 +4231,11 @@"kind": "method","path": "src/engine.ts","span": "L93-L95",- "signature": "ask(dir: string, query: string, opts: { limit?: number; source?: boolean } = {}): AskResult",+ "signature": "ask(dir: string, query: string, opts: { limit?: number; source?: boolean; full?: boolean } = {}): AskResult","exported": true,"origin": "ast",- "body_hash": "d076ef89fe91fba4be041009db20e1ff2c709af57fb09103720cb2384f5693c7",- "summary_state": "ready",+ "body_hash": "f06a9cfee7165c009dc1154af3d19c72286f5e59f5df7fd0fd096836bbc1cf90",+ "summary_state": "stale","summary": "Processes a query against the committed graph to return relevant information based on structural and lexical ranking.","crux": {"code": " ask(dir: string, query: string, opts: { limit?: number; source?: boolean } = {}): AskResult {",@@ -3453,13 +4445,13 @@"name": "build.ts","kind": "file","path": "src/graph/build.ts",- "span": "L1-L147",+ "span": "L1-L184","signature": null,"exported": true,"origin": "ast",- "body_hash": "b18f5fc18dffd77771f39722eb19963c1188fd298cbb5cfd5d71ef8dc45658c6",- "chars": 5027,- "summary_state": "ready",+ "body_hash": "10ae2a085b299a56cb90d41289a956065dd8eef358ae2abbc39db59b82a12dc9",+ "chars": 6887,+ "summary_state": "stale","summary": "This file defines the logic to build a graph representation from source code files in a repository.","crux": {"code": "export async function buildGraph(\n dir: string,\n opts: GraphBuildOptions = {},\n): Promise<GraphBuildResult> {\n const root = resolve(dir);\n const outDir = contextDirFor(root, opts.contextDir);\n const files = listSourceFiles(root, outDir);\n\n const nodes: NodeV1[] = [];\n const rawEdges: RawEdge[] = [];\n const sources = new Map<string, string>();\n const langs = new Set<Language>();",@@ -3471,12 +4463,12 @@"name": "buildGraph","kind": "function","path": "src/graph/build.ts",- "span": "L57-L146",+ "span": "L78-L183","signature": "async function buildGraph( dir: string, opts: GraphBuildOptions = {}, ): Promise<GraphBuildResult>","exported": true,"origin": "ast",- "body_hash": "aa7152b35e0503aee7e9e7fdb56a5354e737f7b2c41313487906817be90776a2",- "summary_state": "ready",+ "body_hash": "d1af486578fcbf56fba090f509e508dd3643f0b735167a7277b055e3cf16e450",+ "summary_state": "stale","summary": "This function orchestrates the process of reading source files, extracting nodes and edges, and writing the resulting graph to a file.","crux": {"code": " const edges = resolveEdges(nodes, rawEdges);\n\n // graph.json is its own Tier-2 cache: fold in the prior meaning layer so an\n // unchanged body is never re-summarized (and a Tier-1-only run never wipes it).\n const prior = readGraph(wiringPath(outDir));\n const priorById = new Map((prior?.nodes ?? []).map((n) => [n.id, n]));\n const meaning = await enrichGraph(nodes, priorById, sources, {\n summarizer: opts.summarizer,\n concurrency: opts.concurrency,\n onProgress: ({ index, total, node }) =>\n opts.onProgress?.({ phase: \"enrich\", index, total, file: node }),\n });",@@ -3488,7 +4480,7 @@"name": "GraphBuildOptions","kind": "interface","path": "src/graph/build.ts",- "span": "L22-L35",+ "span": "L23-L36","signature": "interface GraphBuildOptions","exported": true,"origin": "ast",@@ -3502,7 +4494,7 @@"name": "GraphBuildResult","kind": "interface","path": "src/graph/build.ts",- "span": "L37-L50",+ "span": "L38-L51","signature": "interface GraphBuildResult","exported": true,"origin": "ast",@@ -3516,7 +4508,7 @@"name": "listSourceFiles","kind": "function","path": "src/graph/build.ts",- "span": "L53-L55",+ "span": "L54-L56","signature": "function listSourceFiles(root: string, outDir: string): string[]","exported": true,"origin": "ast",@@ -3528,6 +4520,20 @@"span": "L52-L52"}},+ {+ "id": "src/graph/build.ts#readGoModules",+ "name": "readGoModules",+ "kind": "function",+ "path": "src/graph/build.ts",+ "span": "L62-L76",+ "signature": "function readGoModules(root: string): GoModule[]",+ "exported": false,+ "origin": "ast",+ "body_hash": "02cadfa0e94721ec1c8de1ff70b9b2b3e1ce1c54086c49d5163d3a7f3b266982",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },{"id": "src/graph/cards.ts","name": "cards.ts",@@ -3999,12 +5005,12 @@"name": "extract.ts","kind": "file","path": "src/graph/extract.ts",- "span": "L1-L299",+ "span": "L1-L455","signature": null,"exported": true,"origin": "ast",- "body_hash": "484f87a70563ab769ac185cd9737cce928ba5a7599cbdae1b7e1b1c6343f32d6",- "chars": 9927,+ "body_hash": "cfbe6f2a88cd29ecec4ad32ef6305cca2acf75d27f593f8fecbc782aad4a04df",+ "chars": 17529,"summary_state": "stale","summary": "This module extracts structured data from source files into a normalized format for further processing.","crux": {@@ -4017,12 +5023,12 @@"name": "calleeName","kind": "function","path": "src/graph/extract.ts",- "span": "L245-L261",+ "span": "L388-L409","signature": "function calleeName( node: Parser.SyntaxNode, lang: Language, ): { name: string; viaMember: boolean } | null","exported": false,"origin": "ast",- "body_hash": "06353b6cf0a05cf60bad712082837f52c169e6db9209488f1ee04ea22bef8082",- "summary_state": "ready",+ "body_hash": "32d5efcb66e35b69c40a9d98811d67f9f75c74f9e181bdc46d85902bd8a13acf",+ "summary_state": "stale","summary": "Extracts the name of a function or method being called in the syntax tree.","crux": {"code": " if (fn.type === \"identifier\") return { name: fn.text, viaMember: false };\n if (lang === \"python\" && fn.type === \"attribute\") {\n const a = fn.childForFieldName(\"attribute\") ?? fn.namedChildren.at(-1);\n return a ? { name: a.text, viaMember: true } : null;\n }\n if (lang !== \"python\" && fn.type === \"member_expression\") {\n const p = fn.childForFieldName(\"property\") ?? fn.namedChildren.at(-1);\n return p ? { name: p.text, viaMember: true } : null;",@@ -4034,7 +5040,7 @@"name": "clean","kind": "function","path": "src/graph/extract.ts",- "span": "L281-L288",+ "span": "L437-L444","signature": "function clean(raw: string): string | null","exported": false,"origin": "ast",@@ -4051,12 +5057,12 @@"name": "DefDescriptor","kind": "interface","path": "src/graph/extract.ts",- "span": "L87-L92",+ "span": "L143-L149","signature": "interface DefDescriptor","exported": false,"origin": "ast",- "body_hash": "414875473c4cf1728483558f5354b6f37c279d2bc49393b3b93322a9573a7f00",- "summary_state": "ready",+ "body_hash": "ed38eee7d2f573a31deea6ef15de2d05409f8ecf4f39ab4234c0bbcc14c66198",+ "summary_state": "stale","summary": "Describes a definition in the syntax tree, including its name and type.","crux": null},@@ -4065,28 +5071,42 @@"name": "describe","kind": "function","path": "src/graph/extract.ts",- "span": "L185-L214",+ "span": "L265-L296","signature": "function describe(node: Parser.SyntaxNode, ctx: WalkCtx): DefDescriptor | null","exported": false,"origin": "ast",- "body_hash": "9a6919ff2bed807cf790adcea3b0d423db94baa10fc2069514e0c20c1b5f7117",- "summary_state": "ready",+ "body_hash": "724ba386be23031ee221f1721155296b86dce3c9908c26bdd68848e0e6a37a1b",+ "summary_state": "stale","summary": "Identifies and describes definitions in the syntax tree based on their node types.","crux": {"code": " if (mapped) {\n const name = node.childForFieldName(\"name\")?.text;\n if (!name) return null;\n let kind = mapped;\n if (ctx.lang === \"python\" && mapped === \"function\" && ctx.enclosingKind === \"class\") {\n kind = \"method\";\n }\n const body = node.childForFieldName(\"body\");\n return { name, kind, headerEnd: body ? body.startIndex : node.endIndex, hashNode: node };\n }","span": "L186-L195"}},+ {+ "id": "src/graph/extract.ts#describeGo",+ "name": "describeGo",+ "kind": "function",+ "path": "src/graph/extract.ts",+ "span": "L301-L339",+ "signature": "function describeGo(node: Parser.SyntaxNode, _ctx: WalkCtx): DefDescriptor | null",+ "exported": false,+ "origin": "ast",+ "body_hash": "4e7f1a5f6681729c6592b514762ab354ecf0bf9b2a8cd86bfea5415d75b6c56d",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },{"id": "src/graph/extract.ts#extractFile","name": "extractFile","kind": "function","path": "src/graph/extract.ts",- "span": "L94-L128",+ "span": "L161-L198","signature": "function extractFile(rel: string, source: string, lang: Language): ExtractResult","exported": true,"origin": "ast",- "body_hash": "691c4b4b02509177b75788a5a3dea7d46267db90702e092349e43a99bb37d9b4",+ "body_hash": "311600e6e40d4ac933d007d1f50795362b53062f9e2a6286cf4bc0cc7e9afeec","summary_state": "stale","summary": "Extracts nodes and edges from a source file based on its syntax tree.","crux": {@@ -4099,7 +5119,7 @@"name": "ExtractResult","kind": "interface","path": "src/graph/extract.ts",- "span": "L41-L44",+ "span": "L43-L46","signature": "interface ExtractResult","exported": true,"origin": "ast",@@ -4108,12 +5128,54 @@"summary": "Holds the result of the extraction process, containing nodes and raw edges.","crux": null},+ {+ "id": "src/graph/extract.ts#fileResidual",+ "name": "fileResidual",+ "kind": "function",+ "path": "src/graph/extract.ts",+ "span": "L74-L85",+ "signature": "function fileResidual(source: string, symbols: NodeV1[]): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "fc01f952b2cff13ab8af6748f1ad94168e5cef0015a100f090331cd428d09f4b",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/graph/extract.ts#goExported",+ "name": "goExported",+ "kind": "function",+ "path": "src/graph/extract.ts",+ "span": "L353-L357",+ "signature": "function goExported(name: string): boolean",+ "exported": false,+ "origin": "ast",+ "body_hash": "d63372a3436b530577ba2055e6ea2ba440d16206d299c19a81e6f9d11fbb857e",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/graph/extract.ts#goReceiverType",+ "name": "goReceiverType",+ "kind": "function",+ "path": "src/graph/extract.ts",+ "span": "L343-L349",+ "signature": "function goReceiverType(node: Parser.SyntaxNode): string | null",+ "exported": false,+ "origin": "ast",+ "body_hash": "1487f5274066918e95fd92b382636fe3ead06f927349744bde2289a732c5c7ae",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },{"id": "src/graph/extract.ts#heritageEdges","name": "heritageEdges","kind": "function","path": "src/graph/extract.ts",- "span": "L216-L243",+ "span": "L359-L386","signature": "function heritageEdges(node: Parser.SyntaxNode, classId: string, ctx: WalkCtx): RawEdge[]","exported": false,"origin": "ast",@@ -4130,12 +5192,12 @@"name": "importSpecifier","kind": "function","path": "src/graph/extract.ts",- "span": "L267-L278",+ "span": "L418-L434","signature": "function importSpecifier(node: Parser.SyntaxNode, lang: Language): string | null","exported": false,"origin": "ast",- "body_hash": "edf2e115d4815ca2b2c480f6ab6ec254114fdb5fa329439fb1092449c6222ff5",- "summary_state": "ready",+ "body_hash": "0a0b7079eca209656048651dc132aa4dd7ed735b2ee04bc63e3a887e5aa0a1e8",+ "summary_state": "stale","summary": "Extracts the module name from an import statement in the syntax tree.","crux": {"code": "function importSpecifier(node: Parser.SyntaxNode, lang: Language): string | null {\n if (lang === \"python\") {\n const m =\n node.childForFieldName(\"module_name\") ??\n node.namedChildren.find((c) => c.type === \"dotted_name\" || c.type === \"relative_import\");\n return m?.text ?? null;\n }\n const str = node.namedChildren.find((c) => c.type === \"string\");\n if (!str) return null;\n const frag = str.namedChildren.find((c) => c.type === \"string_fragment\");\n return frag?.text ?? str.text.replace(/^['\"]|['\"]$/g, \"\");",@@ -4147,12 +5209,12 @@"name": "isImport","kind": "function","path": "src/graph/extract.ts",- "span": "L263-L265",- "signature": "function isImport(node: Parser.SyntaxNode): boolean",+ "span": "L411-L416",+ "signature": "function isImport(node: Parser.SyntaxNode, lang: Language): boolean","exported": false,"origin": "ast",- "body_hash": "70722311d982f2fa892674266eddfe75b20ad22c62a323448a86a29044a6b7f6",- "summary_state": "ready",+ "body_hash": "dd3cad276b6f4a2258722865073f7cde28f74612df009ea697b0ce6d599257b1",+ "summary_state": "stale","summary": "Determines if a node represents an import statement in the syntax tree.","crux": null},@@ -4161,12 +5223,12 @@"name": "Language","kind": "type","path": "src/graph/extract.ts",- "span": "L16-L16",- "signature": "type Language = \"typescript\" | \"tsx\" | \"python\";",+ "span": "L17-L17",+ "signature": "type Language = \"typescript\" | \"tsx\" | \"python\" | \"go\";","exported": true,"origin": "ast",- "body_hash": "5a7c4ffe69a0058e67f6150fd6d7a941265322ef73669c6fae36bdd9a92af5c6",- "summary_state": "ready",+ "body_hash": "4a8375e329e48af90b91a0dd802628af5549f46d771302e53de74dbde006ebc2",+ "summary_state": "stale","summary": "Defines the supported programming languages for extraction.","crux": null},@@ -4175,12 +5237,12 @@"name": "languageOf","kind": "function","path": "src/graph/extract.ts",- "span": "L19-L25",+ "span": "L20-L27","signature": "function languageOf(path: string): Language | null","exported": true,"origin": "ast",- "body_hash": "d68b32ad7c9702e80d148c718d03ef4d64d44805d4294c2503426ea9143e9e1d",- "summary_state": "ready",+ "body_hash": "bee30bc0236b0322b93537a0f778f70b33a0fa9df86ad4413c6ef71ee088a733",+ "summary_state": "stale","summary": "Determines the programming language of a given file path.","crux": {"code": " if (p.endsWith(\".tsx\") || p.endsWith(\".jsx\")) return \"tsx\";\n if (/\\.(ts|mts|cts|js|mjs|cjs)$/.test(p)) return \"typescript\";\n if (p.endsWith(\".py\") || p.endsWith(\".pyi\")) return \"python\";",@@ -4188,25 +5250,53 @@}},{- "id": "src/graph/extract.ts#RawEdge",- "name": "RawEdge",- "kind": "interface",+ "id": "src/graph/extract.ts#parseSource",+ "name": "parseSource",+ "kind": "function","path": "src/graph/extract.ts",- "span": "L31-L39",- "signature": "interface RawEdge",- "exported": true,+ "span": "L157-L159",+ "signature": "function parseSource(source: string): Parser.SyntaxNode",+ "exported": false,+ "origin": "ast",+ "body_hash": "213c9aa0ad691d3ceb1ad5f59d083930b3db690225b344bb24cf024d96181cdb",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/graph/extract.ts#RawEdge",+ "name": "RawEdge",+ "kind": "interface",+ "path": "src/graph/extract.ts",+ "span": "L33-L41",+ "signature": "interface RawEdge",+ "exported": true,"origin": "ast","body_hash": "707c4b43d565711035439d2541197427ac0d4da52241d33cf63dd3fb3ac98754","summary_state": "ready","summary": "Represents an unresolved edge in the extraction process, linking nodes in the graph.","crux": null},+ {+ "id": "src/graph/extract.ts#searchBody",+ "name": "searchBody",+ "kind": "function",+ "path": "src/graph/extract.ts",+ "span": "L63-L66",+ "signature": "function searchBody(text: string, max = MAX_BODY_CHARS): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "8ec6ac10c60767f9a430043e8d62d03fa463664677d35afd08916c65aadd2ae7",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },{"id": "src/graph/extract.ts#tsExported","name": "tsExported","kind": "function","path": "src/graph/extract.ts",- "span": "L291-L298",+ "span": "L447-L454","signature": "function tsExported(node: Parser.SyntaxNode): boolean","exported": false,"origin": "ast",@@ -4223,12 +5313,12 @@"name": "walk","kind": "function","path": "src/graph/extract.ts",- "span": "L130-L182",+ "span": "L200-L261","signature": "function walk(node: Parser.SyntaxNode, ctx: WalkCtx, out: NodeV1[], edges: RawEdge[]): void","exported": false,"origin": "ast",- "body_hash": "7cd315e50d1665cc130f049e5b655ac09f3e87f406fd7eba2b3fd6a4aca1c749",- "summary_state": "ready",+ "body_hash": "7f6896b513a5618956530ce6a127fde1bdeeb9b69b1e9500ad19820bee85a2c3",+ "summary_state": "stale","summary": "Recursively traverses the syntax tree to collect definitions and their relationships.","crux": {"code": " const desc = describe(node, ctx);\n if (desc) {\n const id = `${ctx.rel}#${[...ctx.scope, desc.name].join(\".\")}`;\n out.push({\n id,\n name: desc.name,\n kind: desc.kind,\n path: ctx.rel,\n span: `L${desc.hashNode.startPosition.row + 1}-L${desc.hashNode.endPosition.row + 1}`,\n signature: clean(ctx.source.slice(desc.hashNode.startIndex, desc.headerEnd)),\n exported: ctx.lang === \"python\" ? !desc.name.startsWith(\"_\") : tsExported(node),\n origin: \"ast\",",@@ -4240,7 +5330,7 @@"name": "WalkCtx","kind": "interface","path": "src/graph/extract.ts",- "span": "L76-L84",+ "span": "L132-L140","signature": "interface WalkCtx","exported": false,"origin": "ast",@@ -4249,30 +5339,143 @@"summary": "Context for walking through the syntax tree during extraction, maintaining state and scope.","crux": null},+ {+ "id": "src/graph/load.ts",+ "name": "load.ts",+ "kind": "file",+ "path": "src/graph/load.ts",+ "span": "L1-L101",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "115b75e947618be7755ac59310f898943cb4c1d8266bdf5a4a30fdca4956914a",+ "chars": 4000,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/graph/load.ts#__resetParseCounts",+ "name": "__resetParseCounts",+ "kind": "function",+ "path": "src/graph/load.ts",+ "span": "L45-L48",+ "signature": "function __resetParseCounts(): void",+ "exported": true,+ "origin": "ast",+ "body_hash": "28ab92cf6abb38e1d4de7cc6ddc03e68cb6acb34aabc4d0553264118a856676f",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/graph/load.ts#CacheEntry",+ "name": "CacheEntry",+ "kind": "interface",+ "path": "src/graph/load.ts",+ "span": "L31-L35",+ "signature": "interface CacheEntry<T>",+ "exported": false,+ "origin": "ast",+ "body_hash": "7b772fc4a0a866aa5269e023f8eae6c328a7c3f2e6108c498c231326d7e344f7",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/graph/load.ts#loadAskIndexCached",+ "name": "loadAskIndexCached",+ "kind": "function",+ "path": "src/graph/load.ts",+ "span": "L95-L100",+ "signature": "function loadAskIndexCached(outDir: string): AskIndex | null",+ "exported": true,+ "origin": "ast",+ "body_hash": "63af14b09b6d8f7534ccbb2eb58a5e80acfc526b67371bf46acad0de46aa6f07",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/graph/load.ts#loadCached",+ "name": "loadCached",+ "kind": "function",+ "path": "src/graph/load.ts",+ "span": "L59-L81",+ "signature": "function loadCached<T>( cache: Map<string, CacheEntry<T>>, path: string, parse: () => T | null, onParse: () => void, ): T | null",+ "exported": false,+ "origin": "ast",+ "body_hash": "68385d5b28bc28f8be320bc279f74823f8bba12c26c0938152ff332102572035",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/graph/load.ts#loadGraphCached",+ "name": "loadGraphCached",+ "kind": "function",+ "path": "src/graph/load.ts",+ "span": "L86-L91",+ "signature": "function loadGraphCached(outDir: string): GraphV1 | null",+ "exported": true,+ "origin": "ast",+ "body_hash": "d7c103b7e1115f04dcd8713d605dc9955ed0098e746f30bcd7f6f288e78ac257",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/graph/load.ts#statOf",+ "name": "statOf",+ "kind": "function",+ "path": "src/graph/load.ts",+ "span": "L50-L57",+ "signature": "function statOf(path: string): { mtimeMs: number; size: number } | null",+ "exported": false,+ "origin": "ast",+ "body_hash": "acb9f673ef79f4c554be70b06fc65d7f2c7501eb029a590c4a0df65470d3677d",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },{"id": "src/graph/resolve.ts","name": "resolve.ts","kind": "file","path": "src/graph/resolve.ts",- "span": "L1-L101",+ "span": "L1-L160","signature": null,"exported": true,"origin": "ast",- "body_hash": "dad41f73d773c45f5237b85e10a36ae45331cd5959df578816ee8ab47622cffe",- "chars": 4289,- "summary_state": "ready",+ "body_hash": "e3f2fc39bd95a3654eb62d3ef8defcefb88d998a0b95ae4a8f2cbaf783eca3db",+ "chars": 6870,+ "summary_state": "stale","summary": "This file resolves raw edge intents into concrete edges by matching names against a node index, ensuring accurate relationships between nodes.","crux": {"code": "export function resolveEdges(nodes: NodeV1[], rawEdges: RawEdge[]): EdgeV1[] {\n const byId = new Map(nodes.map((n) => [n.id, n]));\n const globalName = new Map<string, NodeV1[]>();\n const perFileName = new Map<string, Map<string, NodeV1[]>>();\n for (const n of nodes) {\n if (n.kind === \"file\") continue;\n push(globalName, n.name, n);\n let fileMap = perFileName.get(n.path);\n if (!fileMap) perFileName.set(n.path, (fileMap = new Map()));\n push(fileMap, n.name, n);\n }\n","span": "L20-L31"}},+ {+ "id": "src/graph/resolve.ts#GoModule",+ "name": "GoModule",+ "kind": "interface",+ "path": "src/graph/resolve.ts",+ "span": "L23-L26",+ "signature": "interface GoModule",+ "exported": true,+ "origin": "ast",+ "body_hash": "52dff1265ffff874843c00b1425c7af639b28683dd0866e48a25e8b406543ec5",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },{"id": "src/graph/resolve.ts#push","name": "push","kind": "function","path": "src/graph/resolve.ts",- "span": "L60-L64",+ "span": "L92-L96","signature": "function push<T>(map: Map<string, T[]>, key: string, val: T): void","exported": false,"origin": "ast",@@ -4286,12 +5489,12 @@"name": "resolveEdges","kind": "function","path": "src/graph/resolve.ts",- "span": "L20-L58",- "signature": "function resolveEdges(nodes: NodeV1[], rawEdges: RawEdge[]): EdgeV1[]",+ "span": "L35-L90",+ "signature": "function resolveEdges( nodes: NodeV1[], rawEdges: RawEdge[], opts: ResolveOptions = {}, ): EdgeV1[]","exported": true,"origin": "ast",- "body_hash": "ace9e1eb0f3e9bc400f1341e0c23209b13d3c4f2b004e55a2397ebf4902cb41e",- "summary_state": "ready",+ "body_hash": "c7fab32fb75f0fe905bff4328499358349d85cc8a8e5a57a032b1457fd2e9f56",+ "summary_state": "stale","summary": "This function processes raw edges and establishes relationships between nodes based on their types and specified relations.","crux": {"code": " for (const e of rawEdges) {\n if (e.relation === \"contains\" && e.targetId) {\n add(e.source, e.targetId, \"contains\", \"extracted\");\n } else if (e.relation === \"imports\" && e.specifier) {\n add(e.source, resolveImport(e.specifier, e.file, byId), \"imports\", \"extracted\");\n } else if (e.relation === \"extends\" || e.relation === \"implements\") {\n const kinds: Kind[] = e.relation === \"implements\" ? [\"interface\"] : [\"class\", \"interface\"];\n const hit = resolveName(e.name!, e.file, kinds, perFileName, globalName);\n // an unresolved base is usually an external/imported type — keep the name.\n add(e.source, hit?.id ?? e.name!, e.relation, hit?.confidence ?? \"inferred\");\n } else if (e.relation === \"calls\") {\n const kinds: Kind[] = e.viaMember ? [\"method\"] : [\"function\"];",@@ -4303,7 +5506,7 @@"name": "add","kind": "function","path": "src/graph/resolve.ts",- "span": "L34-L39",+ "span": "L62-L67","signature": "add = (source: string, target: string, relation: Relation, confidence: EdgeV1[\"confidence\"])","exported": true,"origin": "ast",@@ -4315,12 +5518,26 @@"span": "L34-L39"}},+ {+ "id": "src/graph/resolve.ts#resolveGoImport",+ "name": "resolveGoImport",+ "kind": "function",+ "path": "src/graph/resolve.ts",+ "span": "L144-L159",+ "signature": "function resolveGoImport(spec: string, modules: GoModule[], filesByDir: Map<string, string[]>): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "c23e15aab9607316b1fe167acca80ba6c6fe19fc0b1fcd01f37000b7e8d20635",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },{"id": "src/graph/resolve.ts#resolveImport","name": "resolveImport","kind": "function","path": "src/graph/resolve.ts",- "span": "L88-L100",+ "span": "L120-L132","signature": "function resolveImport(spec: string, file: string, byId: Map<string, NodeV1>): string","exported": false,"origin": "ast",@@ -4337,7 +5554,7 @@"name": "resolveName","kind": "function","path": "src/graph/resolve.ts",- "span": "L70-L82",+ "span": "L102-L114","signature": "function resolveName( name: string, file: string, kinds: Kind[], perFileName: Map<string, Map<string, NodeV1[]>>, globalName: Map<string, NodeV1[]>, ): { id: string; confidence: EdgeV1[\"confidence\"] } | null","exported": false,"origin": "ast",@@ -4350,6846 +5567,12583 @@}},{- "id": "src/graph/types.ts",- "name": "types.ts",+ "id": "src/graph/resolve.ts#ResolveOptions",+ "name": "ResolveOptions",+ "kind": "interface",+ "path": "src/graph/resolve.ts",+ "span": "L28-L33",+ "signature": "interface ResolveOptions",+ "exported": true,+ "origin": "ast",+ "body_hash": "e17c6299def742bdf54acc75fc234fd89ca3ae31fd45bf599cbe5a928a9af359",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/graph/traverse-cli.ts",+ "name": "traverse-cli.ts","kind": "file",- "path": "src/graph/types.ts",- "span": "L1-L84",+ "path": "src/graph/traverse-cli.ts",+ "span": "L1-L156","signature": null,"exported": true,"origin": "ast",- "body_hash": "a7bc780be6180ddf19de4a520a6b83749d6f4503e39df86322990d5fe283d035",- "chars": 2692,- "summary_state": "stale",- "summary": "Defines the schema for a code graph, outlining nodes and edges for code structure representation.",- "crux": {- "code": "/**\n * `graph.json` — the code graph schema (v1).\n *\n * One node per definition (file, class, function, method, interface, type, enum),\n * wired by edges (contains, imports, calls, ...). Field names follow the LSP /\n * SCIP vocabulary (`name`, `kind`, ...) rather than any one tool's conventions.\n *\n * Two tiers of data live on a node:\n * - Tier-1 (deterministic, $0): everything from the AST. Rebuilt on every run.\n * - Tier-2 (one LLM call, cached on `body_hash`): `summary` + `crux`.\n * M1 populates Tier-1 only; Tier-2 fields ship as `pending`/null.\n */",- "span": "L1-L12"- }+ "body_hash": "080714fc91e5caefe4548e87c071b2010fdc593a670366db941d9fd2907b08e2",+ "chars": 5487,+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/graph/types.ts#Confidence",- "name": "Confidence",- "kind": "type",- "path": "src/graph/types.ts",- "span": "L25-L25",- "signature": "type Confidence = \"extracted\" | \"inferred\";",- "exported": true,+ "id": "src/graph/traverse-cli.ts#edgesFor",+ "name": "edgesFor",+ "kind": "function",+ "path": "src/graph/traverse-cli.ts",+ "span": "L31-L35",+ "signature": "function edgesFor(kind: TraverseKind, graph: GraphV1, node: NodeV1, depth: number): EdgeHit[]",+ "exported": false,"origin": "ast",- "body_hash": "305d107dc8cea0d8fcf2e42c13eef23345a53cd6a24672d8a017d5c8d393d46c",- "summary_state": "ready",- "summary": "Specifies the confidence levels for the truth of edges in the graph, aiding in the assessment of relationships.",- "crux": {- "code": "export type Confidence = \"extracted\" | \"inferred\";",- "span": "L25-L25"- }+ "body_hash": "0cba9677135c955d5db241232c49e8a076f471de306cbbe19cc540c3c02255a5",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/graph/types.ts#Crux",- "name": "Crux",- "kind": "interface",- "path": "src/graph/types.ts",- "span": "L32-L35",- "signature": "interface Crux",+ "id": "src/graph/traverse-cli.ts#headerOf",+ "name": "headerOf",+ "kind": "function",+ "path": "src/graph/traverse-cli.ts",+ "span": "L41-L43",+ "signature": "function headerOf(n: NodeV1): string","exported": true,"origin": "ast",- "body_hash": "157f97611f592b25b78af3bd626d10c866b4aa23344a96823de466eb1ecbe28d",- "summary_state": "ready",- "summary": "Holds the LLM-chosen business-logic excerpt for a node, providing a source of truth for code interpretation.",- "crux": {- "code": "export interface Crux {\n code: string;\n span: string; // e.g. \"L189-L196\"\n}",- "span": "L32-L35"- }+ "body_hash": "cf66c3da70d4f8f16119a88148580dc66acba7d47a6c37e24480581733e44f48",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/graph/types.ts#EdgeV1",- "name": "EdgeV1",- "kind": "interface",- "path": "src/graph/types.ts",- "span": "L67-L72",- "signature": "interface EdgeV1",- "exported": true,+ "id": "src/graph/traverse-cli.ts#hitJson",+ "name": "hitJson",+ "kind": "function",+ "path": "src/graph/traverse-cli.ts",+ "span": "L88-L97",+ "signature": "function hitJson(hit: EdgeHit): HitJson",+ "exported": false,"origin": "ast",- "body_hash": "ab2ffb1ba27a286985e517d71d7866d2d389e585d1584647a90fb520b4d92628",- "summary_state": "ready",- "summary": "Describes the edges connecting nodes in the graph, detailing the source, target, and relationship type.",- "crux": {- "code": "export interface EdgeV1 {\n source: string; // node id\n target: string; // node id, or an unresolved module string for imports\n relation: Relation;\n confidence: Confidence;\n}",- "span": "L65-L70"- }+ "body_hash": "aeb2e815cc9892b59d1d815123cf824d7a3d11ccd4a031b92a779047885c70c7",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/graph/types.ts#GraphV1",- "name": "GraphV1",+ "id": "src/graph/traverse-cli.ts#HitJson",+ "name": "HitJson","kind": "interface",- "path": "src/graph/types.ts",- "span": "L74-L83",- "signature": "interface GraphV1",- "exported": true,+ "path": "src/graph/traverse-cli.ts",+ "span": "L74-L82",+ "signature": "interface HitJson",+ "exported": false,"origin": "ast",- "body_hash": "fa588451b38bfa2c1ea17eeabb5cd4d18769ecbf75ba79fb160d59d2d2666e8e",- "summary_state": "ready",- "summary": "Encapsulates the entire graph structure, including metadata and collections of nodes and edges.",- "crux": {- "code": "export interface GraphV1 {\n meta: {\n version: 1;\n nodeCount: number;\n edgeCount: number;\n languages: string[];\n };\n nodes: NodeV1[];\n edges: EdgeV1[];\n}",- "span": "L72-L81"- }+ "body_hash": "e30ba67c87b04404964f6fc197fbe1a5f31f00a74662498406e311388b72e416",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/graph/types.ts#Kind",- "name": "Kind",- "kind": "type",- "path": "src/graph/types.ts",- "span": "L15-L22",- "signature": "type Kind = | \"file\" | \"class\" | \"function\" | \"method\" | \"interface\" // TS only | \"type\" // TS only (type alias) | \"enum\";",+ "id": "src/graph/traverse-cli.ts#hitLine",+ "name": "hitLine",+ "kind": "function",+ "path": "src/graph/traverse-cli.ts",+ "span": "L45-L50",+ "signature": "function hitLine(kind: TraverseKind, hit: EdgeHit): string","exported": true,"origin": "ast",- "body_hash": "b233aa721b3c652dd7f3b4de6e3410e0f44a1da079cbb90df6d8e05eb4cc49f0",- "summary_state": "ready",- "summary": "Enumerates the types of symbols that can exist in the code graph, facilitating type identification.",- "crux": {- "code": "export type Kind =\n | \"file\"\n | \"class\"\n | \"function\"\n | \"method\"\n | \"interface\" // TS only\n | \"type\" // TS only (type alias)\n | \"enum\"; // TS only",- "span": "L15-L22"- }+ "body_hash": "76918dc9bd348cc7c19fdf778ccb604a9d1e9123167d71979c83c477df61d026",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/graph/types.ts#NodeV1",- "name": "NodeV1",- "kind": "interface",- "path": "src/graph/types.ts",- "span": "L37-L57",- "signature": "interface NodeV1",+ "id": "src/graph/traverse-cli.ts#looseNoteFor",+ "name": "looseNoteFor",+ "kind": "function",+ "path": "src/graph/traverse-cli.ts",+ "span": "L54-L58",+ "signature": "function looseNoteFor(kind: TraverseKind, name: string): string","exported": true,"origin": "ast",- "body_hash": "ed212ae4313b6fd9d229e646a67253b90a959f0546af1a2e7d7216b5fd9051f4",- "summary_state": "stale",- "summary": "Represents a node in the graph with its identity, location, and meaning, essential for graph construction.",- "crux": {- "code": "export interface NodeV1 {\n // identity\n id: string; // path-scoped: \"src/cache.ts#Cache.get\"\n name: string; // the symbol's own name: \"get\"\n kind: Kind;\n\n // location (Tier-1, deterministic)\n path: string; // repo-relative: \"src/cache.ts\"\n span: string; // whole definition: \"L165-L222\"\n signature: string | null; // \"get(k: string): number\" — null for kind:\"file\"\n exported: boolean;\n origin: \"ast\";",- "span": "L37-L48"- }+ "body_hash": "7b7f3eefe60c81c8c2e4026e5c3237c9a33ff5ce6076535787d52b45dd3adcd5",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/graph/types.ts#Relation",- "name": "Relation",- "kind": "type",- "path": "src/graph/types.ts",- "span": "L59-L65",- "signature": "type Relation = | \"contains\" // file → symbol, class → method (structural) | \"calls\" // function → function it invokes | \"imports\" // file → module | \"references\" // symbol → symbol it names but doesn't call | \"implements\" // TS: class → interface | \"extends\";",- "exported": true,+ "id": "src/graph/traverse-cli.ts#MatchJson",+ "name": "MatchJson",+ "kind": "interface",+ "path": "src/graph/traverse-cli.ts",+ "span": "L68-L72",+ "signature": "interface MatchJson",+ "exported": false,"origin": "ast",- "body_hash": "226fd93c673f4bfa583e44e3be8c2ca8e0957bf1b95771f067e4999b1e89d145",- "summary_state": "ready",- "summary": "Defines the types of relationships between nodes in the graph, clarifying how symbols interact.",- "crux": {- "code": "export type Relation =\n | \"contains\" // file → symbol, class → method (structural)\n | \"calls\" // function → function it invokes\n | \"imports\" // file → module\n | \"references\" // symbol → symbol it names but doesn't call\n | \"implements\" // TS: class → interface\n | \"extends\"; // class → base class",- "span": "L57-L63"- }+ "body_hash": "6d323182fe81c0462020fa7bbb67d2feb5a214b25ec176e5d2f109106079d09a",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/graph/types.ts#SummaryState",- "name": "SummaryState",- "kind": "type",- "path": "src/graph/types.ts",- "span": "L28-L28",- "signature": "type SummaryState = \"pending\" | \"ready\" | \"stale\";",+ "id": "src/graph/traverse-cli.ts#runTraverseCommand",+ "name": "runTraverseCommand",+ "kind": "function",+ "path": "src/graph/traverse-cli.ts",+ "span": "L105-L155",+ "signature": "function runTraverseCommand(kind: TraverseKind, query: string, dir: string, opts: TraverseCliOptions): void","exported": true,"origin": "ast",- "body_hash": "0689b3a76aa3ee3553bec1bccff2817cac613e747d317688f296748e8c929e0e",- "summary_state": "ready",- "summary": "Indicates whether the meaning-layer has been computed for a node, managing the state of node summaries.",- "crux": {- "code": "export type SummaryState = \"pending\" | \"ready\" | \"stale\";",- "span": "L28-L28"- }+ "body_hash": "166ca03408bcfd5c0f8deac25be0afbf85b3ea1f99d143ab3e0c012f48599bb1",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/graph/write.ts",- "name": "write.ts",+ "id": "src/graph/traverse-cli.ts#symbolJson",+ "name": "symbolJson",+ "kind": "function",+ "path": "src/graph/traverse-cli.ts",+ "span": "L84-L86",+ "signature": "function symbolJson(n: NodeV1): SymbolJson",+ "exported": false,+ "origin": "ast",+ "body_hash": "8ae58a388e66eb07e52378d530705f1f2c7f5bfcec085c17480cbde4170ef689",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/graph/traverse-cli.ts#SymbolJson",+ "name": "SymbolJson",+ "kind": "interface",+ "path": "src/graph/traverse-cli.ts",+ "span": "L60-L66",+ "signature": "interface SymbolJson",+ "exported": false,+ "origin": "ast",+ "body_hash": "576f5963f808dc7657213b6d61ed08efff33b0e48aef2b768986e1e9dff85c00",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/graph/traverse-cli.ts#TraverseCliOptions",+ "name": "TraverseCliOptions",+ "kind": "interface",+ "path": "src/graph/traverse-cli.ts",+ "span": "L19-L26",+ "signature": "interface TraverseCliOptions",+ "exported": true,+ "origin": "ast",+ "body_hash": "81222f4fc4c9c9d285bd325a0e77f451c77b0f8465314cab9438111230c4d997",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/graph/traverse-cli.ts#TraverseKind",+ "name": "TraverseKind",+ "kind": "type",+ "path": "src/graph/traverse-cli.ts",+ "span": "L17-L17",+ "signature": "type TraverseKind = \"callers\" | \"callees\" | \"impact\";",+ "exported": true,+ "origin": "ast",+ "body_hash": "324cf2d7939c64ad6d957bf858d25acb5b665dbe40de99d3a22e5c4741d309c4",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/graph/traverse.ts",+ "name": "traverse.ts","kind": "file",- "path": "src/graph/write.ts",- "span": "L1-L55",+ "path": "src/graph/traverse.ts",+ "span": "L1-L204","signature": null,"exported": true,"origin": "ast",- "body_hash": "55dd6ea840135ade4db7f49042234bee0db07a9c8c959ab57767deb8bebc6345",- "chars": 1940,- "summary_state": "ready",- "summary": "This file contains functions for managing the serialization and deserialization of a wiring graph used in a context directory.",+ "body_hash": "024fa4484f176042272230256f30bbb69100a910e28173f6bb665029041127b8",+ "chars": 8300,+ "summary_state": "pending",+ "summary": null,"crux": null},{- "id": "src/graph/write.ts#edgeOrder",- "name": "edgeOrder",+ "id": "src/graph/traverse.ts#calleesOf",+ "name": "calleesOf","kind": "function",- "path": "src/graph/write.ts",- "span": "L48-L54",- "signature": "function edgeOrder(a: EdgeV1, b: EdgeV1): number",- "exported": false,+ "path": "src/graph/traverse.ts",+ "span": "L119-L127",+ "signature": "function calleesOf(graph: GraphV1, symbol: NodeV1): EdgeHit[]",+ "exported": true,"origin": "ast",- "body_hash": "1c2665c44f094c37f510a0ca5befc63bf67ae59c52d77dfdcbe15611d2e5abbe",- "summary_state": "ready",- "summary": "Defines the sorting order for edges in the wiring graph based on source, relation, and target.",- "crux": {- "code": " a.source.localeCompare(b.source) ||\n a.relation.localeCompare(b.relation) ||\n a.target.localeCompare(b.target)",- "span": "L50-L52"- }+ "body_hash": "001e16cf23b57798f48070d4e11375c2810748138337667eb68dea5926d076c2",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/graph/write.ts#readGraph",- "name": "readGraph",+ "id": "src/graph/traverse.ts#callersOf",+ "name": "callersOf","kind": "function",- "path": "src/graph/write.ts",- "span": "L28-L34",- "signature": "function readGraph(path: string): GraphV1 | null",+ "path": "src/graph/traverse.ts",+ "span": "L108-L116",+ "signature": "function callersOf(graph: GraphV1, symbol: NodeV1): EdgeHit[]","exported": true,"origin": "ast",- "body_hash": "a68ca7cd48652a99a350b76c387a19462cc984c42bbc9b00a30e629af5fda52e",- "summary_state": "ready",- "summary": "Reads and parses an existing wiring graph from a file, returning null if the file is absent or unparseable.",- "crux": {- "code": " return JSON.parse(readFileSync(path, \"utf8\")) as GraphV1;\n } catch {\n return null;",- "span": "L30-L32"- }+ "body_hash": "777f6d8e8beaf3605809ad8a9622b1b232531ac27b729fb1f210ea28f24729f9",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/graph/write.ts#wiringPath",- "name": "wiringPath",- "kind": "function",- "path": "src/graph/write.ts",- "span": "L20-L22",- "signature": "function wiringPath(outDir: string): string",+ "id": "src/graph/traverse.ts#EdgeHit",+ "name": "EdgeHit",+ "kind": "interface",+ "path": "src/graph/traverse.ts",+ "span": "L100-L105",+ "signature": "interface EdgeHit","exported": true,"origin": "ast",- "body_hash": "4a454f03e0aa7289fbc47e6493079ab7f8b353b6133b4362158857eda98bb544",- "summary_state": "ready",- "summary": "Generates the absolute path for the wiring graph file in a specified output directory.",- "crux": {- "code": " return join(outDir, GRAPH_DIR, GRAPH_FILE);",- "span": "L21-L21"- }+ "body_hash": "73c31bb7b1eb001536307926e08135697bac347ffb2d3444d5e8d6b0aac7d538",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/graph/write.ts#writeGraph",- "name": "writeGraph",+ "id": "src/graph/traverse.ts#impactOf",+ "name": "impactOf","kind": "function",- "path": "src/graph/write.ts",- "span": "L36-L46",- "signature": "function writeGraph(graph: GraphV1, outDir: string): string",+ "path": "src/graph/traverse.ts",+ "span": "L135-L137",+ "signature": "function impactOf(graph: GraphV1, symbol: NodeV1, maxDepth = 2): EdgeHit[]","exported": true,"origin": "ast",- "body_hash": "1c7e1c1674a049208f245753f107cf9fb4dceea8ec5c19c8086df2f8af1b7aeb",- "summary_state": "ready",- "summary": "Writes a sorted representation of the wiring graph to a specified output directory, ensuring the directory structure exists.",- "crux": {- "code": " nodes: [...graph.nodes].sort((a, b) => a.id.localeCompare(b.id)),\n edges: [...graph.edges].sort(edgeOrder),\n };\n const path = wiringPath(outDir);\n mkdirSync(dirname(path), { recursive: true });\n writeFileSync(path, JSON.stringify(sorted, null, 2) + \"\\n\");",- "span": "L39-L44"- }+ "body_hash": "45561c34c5e0037acb3147d064ca3097df2bfd0da1bf34603b30ae61f00ac590",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/index.ts",- "name": "index.ts",- "kind": "file",- "path": "src/index.ts",- "span": "L1-L37",- "signature": null,+ "id": "src/graph/traverse.ts#impactOfFile",+ "name": "impactOfFile",+ "kind": "function",+ "path": "src/graph/traverse.ts",+ "span": "L201-L203",+ "signature": "function impactOfFile(graph: GraphV1, fileNode: NodeV1, maxDepth = 2): EdgeHit[]","exported": true,"origin": "ast",- "body_hash": "e56e74612514fd45665b27e3c47b4a685b503a533b38e1674d256344511107fc",- "chars": 1542,- "summary_state": "ready",- "summary": "This file serves as the public API for the Graft library, facilitating the management and synchronization of linked markdown files in a repository.",- "crux": {- "code": " * await engine.init(\".\"); // writes .context/*.md + manifest.json\n *\n * const result = engine.check(\".\"); // { ok: boolean, ...drift }\n * if (!result.ok) process.exitCode = 1;",- "span": "L12-L15"- }+ "body_hash": "37bb8999dd4c8486366d90c974d9d7161a40dc6a42508927b5befbc19a1b923d",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/ingest/fs.ts",- "name": "fs.ts",- "kind": "file",- "path": "src/ingest/fs.ts",- "span": "L1-L46",- "signature": null,+ "id": "src/graph/traverse.ts#impactOfMany",+ "name": "impactOfMany",+ "kind": "function",+ "path": "src/graph/traverse.ts",+ "span": "L153-L184",+ "signature": "function impactOfMany(graph: GraphV1, seeds: NodeV1[], maxDepth = 2): EdgeHit[]","exported": true,"origin": "ast",- "body_hash": "a8339532da34b44d35eb9ad16e7106adb1262d73d9895b1bd94574337fb2019f",- "chars": 1218,- "summary_state": "ready",- "summary": "This file provides utilities for walking through a filesystem to identify source files while excluding certain directories and large files.",+ "body_hash": "bd8d064833fa0679633b8c4d662761e243c0d78a5dd31c60d3f49c613000353a",+ "summary_state": "pending",+ "summary": null,"crux": null},{- "id": "src/ingest/fs.ts#walkDir",- "name": "walkDir",+ "id": "src/graph/traverse.ts#resolveSymbol",+ "name": "resolveSymbol","kind": "function",- "path": "src/ingest/fs.ts",- "span": "L27-L45",- "signature": "function walkDir(dir: string): string[]",+ "path": "src/graph/traverse.ts",+ "span": "L59-L84",+ "signature": "function resolveSymbol(graph: GraphV1, query: string, opts: ResolveSymbolOptions = {}): NodeV1[]","exported": true,"origin": "ast",- "body_hash": "001f6c9f648af0620ed90c55a132464ab87da3ad74b6711df716e9f9493333c4",- "summary_state": "ready",- "summary": "The walkDir function recursively collects paths of files in a directory while skipping specified directories and files larger than 1 MB.",- "crux": {- "code": " if (entry.name.startsWith(\".\")) continue;\n const full = join(dir, entry.name);\n if (entry.isDirectory()) {\n if (SKIP_DIRS.has(entry.name)) continue;\n out.push(...walkDir(full));\n } else if (entry.isFile()) {\n try {\n if (statSync(full).size > MAX_FILE_BYTES) continue;\n } catch {\n continue;\n }\n out.push(full);",- "span": "L30-L41"- }+ "body_hash": "16417bb8ff31274a793c3224197aa5fde4299a18bc9b7bb26f950cb326a86978",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/util/id.ts",- "name": "id.ts",- "kind": "file",- "path": "src/util/id.ts",- "span": "L1-L17",- "signature": null,+ "id": "src/graph/traverse.ts#ResolveSymbolOptions",+ "name": "ResolveSymbolOptions",+ "kind": "interface",+ "path": "src/graph/traverse.ts",+ "span": "L22-L25",+ "signature": "interface ResolveSymbolOptions","exported": true,"origin": "ast",- "body_hash": "5fabc8ddcc3abc907ce69f04ad2ebe51933262cf44aa2dfd40589f71f1926e8a",- "chars": 626,- "summary_state": "ready",- "summary": "This file provides utility functions for generating unique identifiers, creating content hashes, and normalizing names for consistent matching.",+ "body_hash": "96b7318d8119016aed9f8227251f25db2278e7a943d3b1eb2fe9a0c934f09004",+ "summary_state": "pending",+ "summary": null,"crux": null},{- "id": "src/util/id.ts#contentHash",- "name": "contentHash",- "kind": "function",- "path": "src/util/id.ts",- "span": "L9-L11",- "signature": "function contentHash(input: string): string",+ "id": "src/graph/traverse.ts#SymbolMatch",+ "name": "SymbolMatch",+ "kind": "interface",+ "path": "src/graph/traverse.ts",+ "span": "L18-L20",+ "signature": "interface SymbolMatch","exported": true,"origin": "ast",- "body_hash": "d83ce720108cb9ea3b0c7b1e7034657603640647ca00283905fcd099ac3fe2ed",- "summary_state": "ready",- "summary": "This function creates a stable hash of the input content, which is essential for deduplication of documents.",- "crux": {- "code": " return createHash(\"sha256\").update(input).digest(\"hex\");",- "span": "L10-L10"- }+ "body_hash": "e5aecaaa624e92197121baf03e995fd17c765a9d5aa9ebf5d0b5720ad07cc57f",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/util/id.ts#newId",- "name": "newId",+ "id": "src/graph/traverse.ts#symbolMatches",+ "name": "symbolMatches","kind": "function",- "path": "src/util/id.ts",- "span": "L4-L6",- "signature": "function newId(prefix: string): string",- "exported": true,+ "path": "src/graph/traverse.ts",+ "span": "L86-L95",+ "signature": "function symbolMatches(nodes: NodeV1[], lowerQuery: string): NodeV1[]",+ "exported": false,"origin": "ast",- "body_hash": "55062dee898e1edb76d65f7daf785b67e998a57a7dfd6f78c7eb17f39e3e1dc0",- "summary_state": "ready",- "summary": "This function generates a unique identifier with a specified prefix, solving the need for easily identifiable and unique keys.",- "crux": {- "code": " return `${prefix}_${randomUUID().replace(/-/g, \"\").slice(0, 20)}`;",- "span": "L5-L5"- }+ "body_hash": "d579fefa0302961e7b0bc5935016c6ab9f9f39da13d4f05667820ec0e33955d0",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/util/id.ts#normalizeName",- "name": "normalizeName",+ "id": "src/graph/traverse.ts#symbolsInFile",+ "name": "symbolsInFile","kind": "function",- "path": "src/util/id.ts",- "span": "L14-L16",- "signature": "function normalizeName(name: string): string",- "exported": true,+ "path": "src/graph/traverse.ts",+ "span": "L188-L190",+ "signature": "function symbolsInFile(graph: GraphV1, fileNode: NodeV1): NodeV1[]",+ "exported": false,"origin": "ast",- "body_hash": "bac0e298462067a441b2b76566ed29c3787280585b956f84b81d7a766cd7211a",- "summary_state": "ready",- "summary": "This function normalizes names for case- and whitespace-insensitive matching, ensuring consistency in name comparisons.",- "crux": {- "code": " return name.trim().toLowerCase().replace(/\\s+/g, \" \");",- "span": "L15-L15"- }+ "body_hash": "ff4bea79b1a8c5565a8d6de8abcaa08f594400577551fe1fa3c7ed2b73142249",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/viz/assemble.ts",- "name": "assemble.ts",+ "id": "src/graph/types.ts",+ "name": "types.ts","kind": "file",- "path": "src/viz/assemble.ts",- "span": "L1-L131",+ "path": "src/graph/types.ts",+ "span": "L1-L90","signature": null,"exported": true,"origin": "ast",- "body_hash": "58ad5caed087bd7b929f5b625501a607e79e0476f998636bec241e0296706ece",- "chars": 4233,- "summary_state": "ready",- "summary": "Assembles a comprehensive graph document from markdown files in a context directory, ensuring that only valid nodes and edges are included.",+ "body_hash": "27a9bdbef7783e5da94c860bc83525ef788e38a2176bc1184c8adbee539b1b51",+ "chars": 3148,+ "summary_state": "stale",+ "summary": "Defines the schema for a code graph, outlining nodes and edges for code structure representation.","crux": {- "code": "/** Read a context dir and assemble the render-ready graph document. */\nexport function assembleContextGraph(contextDir: string): VizGraph {\n const nodes: VizNode[] = [];\n const rawEdges: VizEdge[] = [];\n let skippedFiles = 0;\n\n if (existsSync(contextDir)) {\n for (const entry of readdirSync(contextDir).sort()) {\n if (!entry.endsWith(\".md\")) continue;\n let parsed: matter.GrayMatterFile<string>;\n try {\n parsed = matter(readFileSync(join(contextDir, entry), \"utf8\"));",- "span": "L78-L89"+ "code": "/**\n * `graph.json` — the code graph schema (v1).\n *\n * One node per definition (file, class, function, method, interface, type, enum),\n * wired by edges (contains, imports, calls, ...). Field names follow the LSP /\n * SCIP vocabulary (`name`, `kind`, ...) rather than any one tool's conventions.\n *\n * Two tiers of data live on a node:\n * - Tier-1 (deterministic, $0): everything from the AST. Rebuilt on every run.\n * - Tier-2 (one LLM call, cached on `body_hash`): `summary` + `crux`.\n * M1 populates Tier-1 only; Tier-2 fields ship as `pending`/null.\n */",+ "span": "L1-L12"}},{- "id": "src/viz/assemble.ts#assembleContextGraph",- "name": "assembleContextGraph",- "kind": "function",- "path": "src/viz/assemble.ts",- "span": "L79-L130",- "signature": "function assembleContextGraph(contextDir: string): VizGraph",+ "id": "src/graph/types.ts#Confidence",+ "name": "Confidence",+ "kind": "type",+ "path": "src/graph/types.ts",+ "span": "L26-L26",+ "signature": "type Confidence = \"extracted\" | \"inferred\";","exported": true,"origin": "ast",- "body_hash": "8529626bef8abf2e1a326d601cf5a6a4972e0a1b801d6b653ba8227a27b9dbbd",+ "body_hash": "305d107dc8cea0d8fcf2e42c13eef23345a53cd6a24672d8a017d5c8d393d46c","summary_state": "ready",- "summary": "Processes markdown files in a specified directory to create a structured visualization graph, handling errors gracefully.",+ "summary": "Specifies the confidence levels for the truth of edges in the graph, aiding in the assessment of relationships.","crux": {- "code": " if (existsSync(contextDir)) {\n for (const entry of readdirSync(contextDir).sort()) {\n if (!entry.endsWith(\".md\")) continue;\n let parsed: matter.GrayMatterFile<string>;\n try {\n parsed = matter(readFileSync(join(contextDir, entry), \"utf8\"));\n } catch {\n skippedFiles++;\n continue;\n }\n const fm = parsed.data as Record<string, unknown>;\n const id = String(fm.slug ?? entry.replace(/\\.md$/, \"\"));",- "span": "L84-L95"+ "code": "export type Confidence = \"extracted\" | \"inferred\";",+ "span": "L25-L25"}},{- "id": "src/viz/assemble.ts#extractSummary",- "name": "extractSummary",- "kind": "function",- "path": "src/viz/assemble.ts",- "span": "L65-L76",- "signature": "function extractSummary(body: string): string",- "exported": false,+ "id": "src/graph/types.ts#Crux",+ "name": "Crux",+ "kind": "interface",+ "path": "src/graph/types.ts",+ "span": "L33-L36",+ "signature": "interface Crux",+ "exported": true,"origin": "ast",- "body_hash": "1857e477bdb012672fa843cfca8d43eb543e7cfba2cc496692a65ebe8c0fa6c5",+ "body_hash": "157f97611f592b25b78af3bd626d10c866b4aa23344a96823de466eb1ecbe28d","summary_state": "ready",- "summary": "Extracts and cleans the summary text from a markdown node's content, ensuring it adheres to length constraints.",+ "summary": "Holds the LLM-chosen business-logic excerpt for a node, providing a source of truth for code interpretation.","crux": {- "code": "function extractSummary(body: string): string {\n let text = body;\n const start = text.indexOf(GEN_START);\n const end = text.indexOf(GEN_END);\n if (start >= 0 && end > start) text = text.slice(start + GEN_START.length, end);\n // Keep only the Summary section if headings are present.\n const related = text.indexOf(\"## Related\");\n if (related >= 0) text = text.slice(0, related);\n text = text.replace(/^##\\s+Summary\\s*$/m, \"\");\n text = text.trim();\n return text.length > SUMMARY_MAX ? text.slice(0, SUMMARY_MAX).trimEnd() + \"…\" : text;",- "span": "L65-L75"+ "code": "export interface Crux {\n code: string;\n span: string; // e.g. \"L189-L196\"\n}",+ "span": "L32-L35"}},{- "id": "src/viz/assemble.ts#normalizeRelation",- "name": "normalizeRelation",- "kind": "function",- "path": "src/viz/assemble.ts",- "span": "L56-L58",- "signature": "function normalizeRelation(rel: string): string",+ "id": "src/graph/types.ts#EdgeV1",+ "name": "EdgeV1",+ "kind": "interface",+ "path": "src/graph/types.ts",+ "span": "L73-L78",+ "signature": "interface EdgeV1","exported": true,"origin": "ast",- "body_hash": "adfaae55d1d21718adbedaa294194517aa7abdddeb95433642fd358137e48909",+ "body_hash": "ab2ffb1ba27a286985e517d71d7866d2d389e585d1584647a90fb520b4d92628","summary_state": "ready",- "summary": "Maps legacy vague verbs to concrete verbs to maintain consistency in the graph's relationships.",+ "summary": "Describes the edges connecting nodes in the graph, detailing the source, target, and relationship type.","crux": {- "code": "export function normalizeRelation(rel: string): string {\n return NORMALIZE_RELATION[rel] ?? rel;\n}",- "span": "L56-L58"+ "code": "export interface EdgeV1 {\n source: string; // node id\n target: string; // node id, or an unresolved module string for imports\n relation: Relation;\n confidence: Confidence;\n}",+ "span": "L65-L70"}},{- "id": "src/viz/assemble.ts#VizEdge",- "name": "VizEdge",+ "id": "src/graph/types.ts#GraphV1",+ "name": "GraphV1","kind": "interface",- "path": "src/viz/assemble.ts",- "span": "L26-L31",- "signature": "interface VizEdge",+ "path": "src/graph/types.ts",+ "span": "L80-L89",+ "signature": "interface GraphV1","exported": true,"origin": "ast",- "body_hash": "bef3aefe267d463b0d4cf617f379adadd4fffb539e9a0a5e240520be60a191cb",+ "body_hash": "fa588451b38bfa2c1ea17eeabb5cd4d18769ecbf75ba79fb160d59d2d2666e8e","summary_state": "ready",- "summary": "Defines the structure of an edge in the visualization graph, representing relationships between nodes.",- "crux": null+ "summary": "Encapsulates the entire graph structure, including metadata and collections of nodes and edges.",+ "crux": {+ "code": "export interface GraphV1 {\n meta: {\n version: 1;\n nodeCount: number;\n edgeCount: number;\n languages: string[];\n };\n nodes: NodeV1[];\n edges: EdgeV1[];\n}",+ "span": "L72-L81"+ }},{- "id": "src/viz/assemble.ts#VizGraph",- "name": "VizGraph",- "kind": "interface",- "path": "src/viz/assemble.ts",- "span": "L33-L42",- "signature": "interface VizGraph",+ "id": "src/graph/types.ts#Kind",+ "name": "Kind",+ "kind": "type",+ "path": "src/graph/types.ts",+ "span": "L15-L23",+ "signature": "type Kind = | \"file\" | \"class\" | \"function\" | \"method\" | \"interface\" // TS + Go | \"type\" // TS + Go (type alias / named type) | \"enum\" // TS only | \"struct\";","exported": true,"origin": "ast",- "body_hash": "7edd9c49c11acc8e90963256a92ee2f27415c50446334924e2e260b715b56427",- "summary_state": "ready",- "summary": "Encapsulates the complete visualization graph, including metadata about nodes and edges.",- "crux": null+ "body_hash": "cbc16d65aefa07ebb6e28cd90ff587681249a4762ab8d10fcb56788adc902a97",+ "summary_state": "stale",+ "summary": "Enumerates the types of symbols that can exist in the code graph, facilitating type identification.",+ "crux": {+ "code": "export type Kind =\n | \"file\"\n | \"class\"\n | \"function\"\n | \"method\"\n | \"interface\" // TS only\n | \"type\" // TS only (type alias)\n | \"enum\"; // TS only",+ "span": "L15-L22"+ }},{- "id": "src/viz/assemble.ts#VizNode",- "name": "VizNode",+ "id": "src/graph/types.ts#NodeV1",+ "name": "NodeV1","kind": "interface",- "path": "src/viz/assemble.ts",- "span": "L18-L24",- "signature": "interface VizNode",+ "path": "src/graph/types.ts",+ "span": "L38-L63",+ "signature": "interface NodeV1","exported": true,"origin": "ast",- "body_hash": "ec19a79898c594e5afc405cab037fcc0c43144c5766af8a955dccda7df733ba6",- "summary_state": "ready",- "summary": "Defines the structure of a node in the visualization graph, encapsulating its identity and attributes.",- "crux": null+ "body_hash": "6b0321068a3be9495509962011da101ea4730e74376e2568a237d4d6d736f1fc",+ "summary_state": "stale",+ "summary": "Represents a node in the graph with its identity, location, and meaning, essential for graph construction.",+ "crux": {+ "code": "export interface NodeV1 {\n // identity\n id: string; // path-scoped: \"src/cache.ts#Cache.get\"\n name: string; // the symbol's own name: \"get\"\n kind: Kind;\n\n // location (Tier-1, deterministic)\n path: string; // repo-relative: \"src/cache.ts\"\n span: string; // whole definition: \"L165-L222\"\n signature: string | null; // \"get(k: string): number\" — null for kind:\"file\"\n exported: boolean;\n origin: \"ast\";",+ "span": "L37-L48"+ }},{- "id": "src/viz/serve.ts",- "name": "serve.ts",- "kind": "file",- "path": "src/viz/serve.ts",- "span": "L1-L149",- "signature": null,+ "id": "src/graph/types.ts#Relation",+ "name": "Relation",+ "kind": "type",+ "path": "src/graph/types.ts",+ "span": "L65-L71",+ "signature": "type Relation = | \"contains\" // file → symbol, class → method (structural) | \"calls\" // function → function it invokes | \"imports\" // file → module | \"references\" // symbol → symbol it names but doesn't call | \"implements\" // TS: class → interface | \"extends\";","exported": true,"origin": "ast",- "body_hash": "14283762f454c01fc95cfbe9c2b41ef063fc17c4c3e5d120b5dc7f66f541fc1c",- "chars": 4909,+ "body_hash": "226fd93c673f4bfa583e44e3be8c2ca8e0957bf1b95771f067e4999b1e89d145","summary_state": "ready",- "summary": "This file implements a local server for serving a viewer and handling API requests related to context and code graphs.",+ "summary": "Defines the types of relationships between nodes in the graph, clarifying how symbols interact.","crux": {- "code": " const server = createServer((req, res) => {\n const path = (req.url ?? \"/\").split(\"?\")[0];\n\n const asset = STATIC_FILES[path];\n if (asset) {\n const file = join(opts.viewerDir, asset.file);\n if (!existsSync(file)) {\n res.writeHead(404, { \"content-type\": \"text/plain\" });\n res.end(\"viewer bundle missing — run the package build\");\n return;\n }\n res.writeHead(200, { \"content-type\": asset.type });",- "span": "L60-L71"+ "code": "export type Relation =\n | \"contains\" // file → symbol, class → method (structural)\n | \"calls\" // function → function it invokes\n | \"imports\" // file → module\n | \"references\" // symbol → symbol it names but doesn't call\n | \"implements\" // TS: class → interface\n | \"extends\"; // class → base class",+ "span": "L57-L63"}},{- "id": "src/viz/serve.ts#listen",- "name": "listen",- "kind": "function",- "path": "src/viz/serve.ts",- "span": "L43-L55",- "signature": "function listen(server: Server, port: number): Promise<boolean>",- "exported": false,+ "id": "src/graph/types.ts#SummaryState",+ "name": "SummaryState",+ "kind": "type",+ "path": "src/graph/types.ts",+ "span": "L29-L29",+ "signature": "type SummaryState = \"pending\" | \"ready\" | \"stale\";",+ "exported": true,"origin": "ast",- "body_hash": "b43a357dceb98a6eb6676409503021e6e38f13d7d442d44ba819dda0c0ea6246",+ "body_hash": "0689b3a76aa3ee3553bec1bccff2817cac613e747d317688f296748e8c929e0e","summary_state": "ready",- "summary": "Attempts to bind the server to a specified port, handling errors if the port is in use.",+ "summary": "Indicates whether the meaning-layer has been computed for a node, managing the state of node summaries.","crux": {- "code": " return new Promise((resolve, reject) => {\n const onError = (err: NodeJS.ErrnoException) => {\n if (err.code === \"EADDRINUSE\") resolve(false);\n else reject(err);\n };\n server.once(\"error\", onError);\n server.listen(port, \"127.0.0.1\", () => {\n server.removeListener(\"error\", onError);\n resolve(true);\n });",- "span": "L44-L53"+ "code": "export type SummaryState = \"pending\" | \"ready\" | \"stale\";",+ "span": "L28-L28"}},{- "id": "src/viz/serve.ts#listen.onError",- "name": "onError",- "kind": "function",- "path": "src/viz/serve.ts",- "span": "L45-L48",- "signature": "onError = (err: NodeJS.ErrnoException)",- "exported": false,+ "id": "src/graph/write.ts",+ "name": "write.ts",+ "kind": "file",+ "path": "src/graph/write.ts",+ "span": "L1-L70",+ "signature": null,+ "exported": true,"origin": "ast",- "body_hash": "6643919e3ea413fc58afe100fe65dc3beccadb7aa66bf5d3247e072c83d9d000",- "summary_state": "ready",- "summary": "Handles errors that occur when trying to bind the server to a port.",+ "body_hash": "a8f0d1b3efed9ca1ac3c22175c46c7a737b91bf632930ebb4437ebf52326ed69",+ "chars": 2665,+ "summary_state": "stale",+ "summary": "This file contains functions for managing the serialization and deserialization of a wiring graph used in a context directory.","crux": null},{- "id": "src/viz/serve.ts#sendJson",- "name": "sendJson",+ "id": "src/graph/write.ts#edgeOrder",+ "name": "edgeOrder","kind": "function",- "path": "src/viz/serve.ts",- "span": "L38-L41",- "signature": "function sendJson(res: ServerResponse, status: number, body: unknown): void",+ "path": "src/graph/write.ts",+ "span": "L63-L69",+ "signature": "function edgeOrder(a: EdgeV1, b: EdgeV1): number","exported": false,"origin": "ast",- "body_hash": "a2b33c898c929db2715116f964722f5e438e61a58fdfa4607d21c4365df5da6a",+ "body_hash": "1c2665c44f094c37f510a0ca5befc63bf67ae59c52d77dfdcbe15611d2e5abbe","summary_state": "ready",- "summary": "Sends a JSON response with the specified status and body to the client.",+ "summary": "Defines the sorting order for edges in the wiring graph based on source, relation, and target.","crux": {- "code": " res.writeHead(status, { \"content-type\": \"application/json; charset=utf-8\" });\n res.end(JSON.stringify(body));\n}",- "span": "L39-L41"+ "code": " a.source.localeCompare(b.source) ||\n a.relation.localeCompare(b.relation) ||\n a.target.localeCompare(b.target)",+ "span": "L50-L52"}},{- "id": "src/viz/serve.ts#startVizServer",- "name": "startVizServer",+ "id": "src/graph/write.ts#readGraph",+ "name": "readGraph","kind": "function",- "path": "src/viz/serve.ts",- "span": "L57-L148",- "signature": "async function startVizServer(opts: VizServerOptions): Promise<VizServer>",+ "path": "src/graph/write.ts",+ "span": "L28-L34",+ "signature": "function readGraph(path: string): GraphV1 | null","exported": true,"origin": "ast",- "body_hash": "d652f8a8b5ea738a1ff68592d9644525dee438568c9158e5edffe536b1f1aa16",+ "body_hash": "a68ca7cd48652a99a350b76c387a19462cc984c42bbc9b00a30e629af5fda52e","summary_state": "ready",- "summary": "Initializes and starts the visualization server, setting up routes and handling requests.",+ "summary": "Reads and parses an existing wiring graph from a file, returning null if the file is absent or unparseable.","crux": {- "code": " const server = createServer((req, res) => {\n const path = (req.url ?? \"/\").split(\"?\")[0];\n\n const asset = STATIC_FILES[path];\n if (asset) {\n const file = join(opts.viewerDir, asset.file);\n if (!existsSync(file)) {\n res.writeHead(404, { \"content-type\": \"text/plain\" });\n res.end(\"viewer bundle missing — run the package build\");\n return;\n }\n res.writeHead(200, { \"content-type\": asset.type });",- "span": "L60-L71"+ "code": " return JSON.parse(readFileSync(path, \"utf8\")) as GraphV1;\n } catch {\n return null;",+ "span": "L30-L32"}},{- "id": "src/viz/serve.ts#startVizServer.close",- "name": "close",- "kind": "method",- "path": "src/viz/serve.ts",- "span": "L140-L146",- "signature": "close(): Promise<void>",- "exported": true,+ "id": "src/graph/write.ts#stripBodyText",+ "name": "stripBodyText",+ "kind": "function",+ "path": "src/graph/write.ts",+ "span": "L57-L61",+ "signature": "function stripBodyText(node: NodeV1): NodeV1",+ "exported": false,"origin": "ast",- "body_hash": "69dc0089d8f1d6e843c8add8fabf2e120fd1045505f9c15632ba93bdc58c01d4",- "summary_state": "ready",- "summary": "Closes the visualization server and cleans up resources.",- "crux": {- "code": " close(): Promise<void> {\n clearTimeout(debounce);\n watcher?.close();\n for (const client of sseClients) client.end();\n sseClients.clear();\n return new Promise((resolve, reject) => server.close((err) => (err ? reject(err) : resolve())));\n },",- "span": "L140-L146"- }+ "body_hash": "066abd2d7e9f13c6df67c4ba9100acdba5518e271bbc326536475e8610ae24cf",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "src/viz/serve.ts#VizServer",- "name": "VizServer",- "kind": "interface",- "path": "src/viz/serve.ts",- "span": "L23-L26",- "signature": "interface VizServer",+ "id": "src/graph/write.ts#wiringPath",+ "name": "wiringPath",+ "kind": "function",+ "path": "src/graph/write.ts",+ "span": "L20-L22",+ "signature": "function wiringPath(outDir: string): string","exported": true,"origin": "ast",- "body_hash": "9c56587daccba8982a5f5da3a0ea5f185becea8c4f4927331b15117f5d456214",+ "body_hash": "4a454f03e0aa7289fbc47e6493079ab7f8b353b6133b4362158857eda98bb544","summary_state": "ready",- "summary": "Represents the visualization server with its URL and a method to close it.",- "crux": null+ "summary": "Generates the absolute path for the wiring graph file in a specified output directory.",+ "crux": {+ "code": " return join(outDir, GRAPH_DIR, GRAPH_FILE);",+ "span": "L21-L21"+ }},{- "id": "src/viz/serve.ts#VizServerOptions",- "name": "VizServerOptions",- "kind": "interface",- "path": "src/viz/serve.ts",- "span": "L16-L21",- "signature": "interface VizServerOptions",+ "id": "src/graph/write.ts#writeGraph",+ "name": "writeGraph",+ "kind": "function",+ "path": "src/graph/write.ts",+ "span": "L36-L46",+ "signature": "function writeGraph(graph: GraphV1, outDir: string): string","exported": true,"origin": "ast",- "body_hash": "0b439484269a73c19df0d658113fbdc889c2214d1081e08d92bc86ae99e0c795",- "summary_state": "ready",- "summary": "Defines the configuration options required to start the visualization server.",- "crux": null+ "body_hash": "13647ca6eab5d041c45b3ef6efb6b851a3991c63742c94c88f4d05ecfc944354",+ "summary_state": "stale",+ "summary": "Writes a sorted representation of the wiring graph to a specified output directory, ensuring the directory structure exists.",+ "crux": {+ "code": " nodes: [...graph.nodes].sort((a, b) => a.id.localeCompare(b.id)),\n edges: [...graph.edges].sort(edgeOrder),\n };\n const path = wiringPath(outDir);\n mkdirSync(dirname(path), { recursive: true });\n writeFileSync(path, JSON.stringify(sorted, null, 2) + \"\\n\");",+ "span": "L39-L44"+ }},{- "id": "test/ask.test.ts",- "name": "ask.test.ts",+ "id": "src/hosts/codex-hooks.ts",+ "name": "codex-hooks.ts","kind": "file",- "path": "test/ask.test.ts",- "span": "L1-L55",+ "path": "src/hosts/codex-hooks.ts",+ "span": "L1-L75","signature": null,"exported": true,"origin": "ast",- "body_hash": "b2d9beeea01fd6faab6225ea3b3a735d5dd808e8358ffe37bb82a2a5f5da3dce",- "chars": 2123,- "summary_state": "ready",- "summary": "This file contains tests for the `graft ask` functionality, ensuring that the source option correctly inlines code from disk when requested.",- "crux": {- "code": "test(\"ask without source returns pointers but no inlined code\", async () => {\n const dir = makeFixture();\n try {\n await buildGraph(dir); // $0, structure-only — cards + wiring.json\n const r = ask(dir, \"addNumbers\");\n const hit = r.hits.find((h) => h.title.startsWith(\"addNumbers\"));\n assert.ok(hit, \"should locate the addNumbers symbol\");\n assert.match(hit.pointer, /^math\\.ts:L\\d+-L\\d+$/);\n assert.equal(hit.code, undefined, \"no source inlined without the option\");\n } finally {\n rmSync(dir, { recursive: true, force: true });\n }",- "span": "L26-L37"- }+ "body_hash": "0b9ba9ba677876d1adf4ce8d05aa534cddfbdeb7060ed11a92111a41a76d1512",+ "chars": 3168,+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "test/ask.test.ts#makeFixture",- "name": "makeFixture",+ "id": "src/hosts/codex-hooks.ts#dirExists",+ "name": "dirExists","kind": "function",- "path": "test/ask.test.ts",- "span": "L15-L24",- "signature": "function makeFixture(): string",+ "path": "src/hosts/codex-hooks.ts",+ "span": "L17-L19",+ "signature": "function dirExists(p: string): boolean","exported": false,"origin": "ast",- "body_hash": "2782fc6b3f2efa27b0c0195482a4b138e1ec02bd16da279313966e96a6d807e8",- "summary_state": "ready",- "summary": "Creates a temporary directory with a sample TypeScript file for testing purposes.",- "crux": {- "code": " const dir = mkdtempSync(join(tmpdir(), \"graft-ask-\"));\n writeFileSync(\n join(dir, \"math.ts\"),\n `export function addNumbers(a: number, b: number): number {\\n` +\n ` return a + b;\\n` +\n `}\\n`,\n );\n return dir;",- "span": "L16-L23"- }+ "body_hash": "3cb56ff33de328b88ab53b8b869149394e3f46919184cc3d9c7bebed9fb4dcc7",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "test/claude-format.test.ts",- "name": "claude-format.test.ts",- "kind": "file",- "path": "test/claude-format.test.ts",- "span": "L1-L106",- "signature": null,+ "id": "src/hosts/codex-hooks.ts#HookWrite",+ "name": "HookWrite",+ "kind": "interface",+ "path": "src/hosts/codex-hooks.ts",+ "span": "L11-L15",+ "signature": "interface HookWrite","exported": true,"origin": "ast",- "body_hash": "bbbb252bb379e8a18ae263f277438c5dc31047374fc6d66ddc7dff206d64bb71",- "chars": 4810,+ "body_hash": "87f37fccd34dabd662b284ad06e364c60173827b1eef5170714b232943a22693","summary_state": "pending","summary": null,"crux": null},{- "id": "test/claude-format.test.ts#strip",- "name": "strip",+ "id": "src/hosts/codex-hooks.ts#installCodexHooks",+ "name": "installCodexHooks","kind": "function",- "path": "test/claude-format.test.ts",- "span": "L6-L6",- "signature": "strip = (s: string)",+ "path": "src/hosts/codex-hooks.ts",+ "span": "L37-L74",+ "signature": "function installCodexHooks(home: string): HookWrite[]",+ "exported": true,+ "origin": "ast",+ "body_hash": "ed7ea45d024b73cc41550f0b5f3edcebc2555fbc1db0aba5437ded0b2c869d52",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/hosts/codex-hooks.ts#isGraftEntry",+ "name": "isGraftEntry",+ "kind": "function",+ "path": "src/hosts/codex-hooks.ts",+ "span": "L33-L35",+ "signature": "function isGraftEntry(entry: unknown): boolean","exported": false,"origin": "ast",- "body_hash": "6381d72b2af2fa01d40d5fa8e463da782c5fe5655ad06caec8a3184ee6546edc",+ "body_hash": "628b0f417080f2b63d9928d37116e818fc0d2c50c5d1319fdf1cb4ec7ef6e9f3","summary_state": "pending","summary": null,"crux": null},{- "id": "test/claude-hooks.test.ts",- "name": "claude-hooks.test.ts",+ "id": "src/hosts/codex-hooks.ts#writeOwned",+ "name": "writeOwned",+ "kind": "function",+ "path": "src/hosts/codex-hooks.ts",+ "span": "L21-L31",+ "signature": "function writeOwned(id: string, path: string, content: string, mode?: number): HookWrite",+ "exported": false,+ "origin": "ast",+ "body_hash": "0e2c5fcb677016e7114466756f114b05de75fd91cca3829607c528461e02edb1",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/hosts/init.ts",+ "name": "init.ts","kind": "file",- "path": "test/claude-hooks.test.ts",- "span": "L1-L105",+ "path": "src/hosts/init.ts",+ "span": "L1-L73","signature": null,"exported": true,"origin": "ast",- "body_hash": "2ce3f50d2a9908fa73baa41aea07f7b4e547ff803ae2167f48b4169617296599",- "chars": 4933,+ "body_hash": "cd3ef307f207a48b82fa81ea55e34fdc97b8663612ad639a3256336d5531afa0",+ "chars": 2627,"summary_state": "pending","summary": null,"crux": null},{- "id": "test/claude-hooks.test.ts#fakeBuild",- "name": "fakeBuild",- "kind": "function",- "path": "test/claude-hooks.test.ts",- "span": "L49-L52",- "signature": "fakeBuild = (dir: string)",- "exported": false,+ "id": "src/hosts/init.ts#HostsInitResult",+ "name": "HostsInitResult",+ "kind": "interface",+ "path": "src/hosts/init.ts",+ "span": "L14-L20",+ "signature": "interface HostsInitResult",+ "exported": true,"origin": "ast",- "body_hash": "0eb606c28f6d7ec57d7fe9a9824b87942c0682ddb75d37fd911508366e5ac9e5",+ "body_hash": "c643482048fe39520f2fc0aaee0c8761e9f13ed7f7bf5fcfc8ef404cd2f0e98f","summary_state": "pending","summary": null,"crux": null},{- "id": "test/claude-hooks.test.ts#runWithStdin",- "name": "runWithStdin",+ "id": "src/hosts/init.ts#probeFor",+ "name": "probeFor","kind": "function",- "path": "test/claude-hooks.test.ts",- "span": "L38-L41",- "signature": "async function runWithStdin(text: string, fn: () => Promise<void>): Promise<void>",+ "path": "src/hosts/init.ts",+ "span": "L22-L27",+ "signature": "function probeFor(home: string, repo: string): DetectProbe","exported": false,"origin": "ast",- "body_hash": "6bf4b171a46fcfcceccaedd45a273ed78fac5a1b4ae47bbd881df4e54c33b912",+ "body_hash": "7653739002fda057d1517f18bfe77dfb0dcf78ab6cb9716ceb7624601eec1f7f","summary_state": "pending","summary": null,"crux": null},{- "id": "test/claude-state.test.ts",- "name": "claude-state.test.ts",- "kind": "file",- "path": "test/claude-state.test.ts",- "span": "L1-L51",- "signature": null,+ "id": "src/hosts/init.ts#runHostsInit",+ "name": "runHostsInit",+ "kind": "function",+ "path": "src/hosts/init.ts",+ "span": "L37-L72",+ "signature": "function runHostsInit( repo: string, opts: { agents?: string[]; all?: boolean; home?: string; mcp?: boolean; hooks?: boolean } = {}, ): HostsInitResult","exported": true,"origin": "ast",- "body_hash": "eb26e78fa237e15f579019a2f9de75ed029e0f081b7175d83ce79367515fb164",- "chars": 1969,+ "body_hash": "8b9a15d05dcd9a43c414b8c27e34f565538950d578ed452568d9c61f08bb9dbd","summary_state": "pending","summary": null,"crux": null},{- "id": "test/claude-state.test.ts#fresh",- "name": "fresh",+ "id": "src/hosts/init.ts#writeOwned",+ "name": "writeOwned","kind": "function",- "path": "test/claude-state.test.ts",- "span": "L11-L11",- "signature": "function fresh(): string",+ "path": "src/hosts/init.ts",+ "span": "L29-L35",+ "signature": "function writeOwned(path: string, content: string): string","exported": false,"origin": "ast",- "body_hash": "49e9f70f3b52532360521760ee5e0e5c907bdf3f55d1ed2c90bb3c3e48d93cda",+ "body_hash": "f25633ece4c0cfb7a956003dd26ad8e1b095e7955d13d796c24ac389d75a4f09","summary_state": "pending","summary": null,"crux": null},{- "id": "test/claude-stats.test.ts",- "name": "claude-stats.test.ts",+ "id": "src/hosts/instructions.ts",+ "name": "instructions.ts","kind": "file",- "path": "test/claude-stats.test.ts",- "span": "L1-L30",+ "path": "src/hosts/instructions.ts",+ "span": "L1-L62","signature": null,"exported": true,"origin": "ast",- "body_hash": "f625d026d152a65017699e37e27534043dc0af0f43ba2d3ea778bac8ddab82c3",- "chars": 983,+ "body_hash": "b86b1f2dcc4d0b1e393c89f39cb772f76d5c592393f758603cfc20373fd98821",+ "chars": 2427,"summary_state": "pending","summary": null,"crux": null},{- "id": "test/claude-statusline.test.ts",- "name": "claude-statusline.test.ts",- "kind": "file",- "path": "test/claude-statusline.test.ts",- "span": "L1-L48",- "signature": null,+ "id": "src/hosts/instructions.ts#cursorRule",+ "name": "cursorRule",+ "kind": "function",+ "path": "src/hosts/instructions.ts",+ "span": "L41-L48",+ "signature": "function cursorRule(): string","exported": true,"origin": "ast",- "body_hash": "07128b5b195af3a37c1e170a35c18378e36160d1a6f8e17be362bac315811cac",- "chars": 2137,+ "body_hash": "697397dc5e04836b10f9f9b6c4dfb5df6d95c5f89317ce9a77bb838a7e71e929","summary_state": "pending","summary": null,"crux": null},{- "id": "test/claude-statusline.test.ts#repo",- "name": "repo",+ "id": "src/hosts/instructions.ts#instructionBody",+ "name": "instructionBody","kind": "function",- "path": "test/claude-statusline.test.ts",- "span": "L9-L9",- "signature": "function repo(): string",- "exported": false,+ "path": "src/hosts/instructions.ts",+ "span": "L6-L39",+ "signature": "function instructionBody(): string",+ "exported": true,"origin": "ast",- "body_hash": "121eb027efad697b8021b3a994a7f977441a0a34c0e92fd9a1792851368850e5",+ "body_hash": "8cc2c40fcc950972a65305ce9773fa1e2bd0e99af84531af60f6ab1420b76697","summary_state": "pending","summary": null,"crux": null},{- "id": "test/claude-statusline.test.ts#writeWiring",- "name": "writeWiring",+ "id": "src/hosts/instructions.ts#kiroSteering",+ "name": "kiroSteering","kind": "function",- "path": "test/claude-statusline.test.ts",- "span": "L10-L13",- "signature": "function writeWiring(dir: string, obj: unknown): void",- "exported": false,+ "path": "src/hosts/instructions.ts",+ "span": "L50-L56",+ "signature": "function kiroSteering(): string",+ "exported": true,"origin": "ast",- "body_hash": "2e1f37e4395b142a5e04d343c3d72366ed3c3245acc13afc8eef46df21b1df21",+ "body_hash": "a3fea9a2ad9ee6488338f60825284e55bc5cd09cee354e9554efb2d90e2be20f","summary_state": "pending","summary": null,"crux": null},{- "id": "test/context.test.ts",- "name": "context.test.ts",+ "id": "src/hosts/instructions.ts#windsurfRule",+ "name": "windsurfRule",+ "kind": "function",+ "path": "src/hosts/instructions.ts",+ "span": "L58-L61",+ "signature": "function windsurfRule(): string",+ "exported": true,+ "origin": "ast",+ "body_hash": "a30d7b9ed58bdcfc402576d4a79e3643691145a92c521402e594243533cb4aed",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/hosts/mcp-config.ts",+ "name": "mcp-config.ts","kind": "file",- "path": "test/context.test.ts",- "span": "L1-L137",+ "path": "src/hosts/mcp-config.ts",+ "span": "L1-L88","signature": null,"exported": true,"origin": "ast",- "body_hash": "7c1242872b127117c7cc50404895d7ffcf286a51b611cd23c4ffabd5db8d43f3",- "chars": 4632,- "summary_state": "ready",- "summary": "This file contains end-to-end tests for the markdown-graph pipeline to ensure proper functionality and integrity of the context building and checking processes.",- "crux": {- "code": "test(\"init builds one markdown node per entity, with links and a manifest\", async () => {\n const dir = makeFixture();\n try {\n const r = await buildContext(dir, buildOpts());\n // Auth Service, Token Store, Billing.\n assert.equal(r.nodes, 3);\n assert.equal(r.links, 2);\n assert.equal(r.files, 2);\n\n const ctx = join(dir, \"graft\");\n assert.ok(existsSync(join(ctx, \"auth-service.md\")));\n assert.ok(existsSync(join(ctx, \"token-store.md\")));",- "span": "L31-L42"- }+ "body_hash": "c3a3dea18371806ed352e7cab582265db2341b7d4ea5797578e495b512a9b0b3",+ "chars": 3338,+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "test/context.test.ts#buildOpts",- "name": "buildOpts",+ "id": "src/hosts/mcp-config.ts#dirExists",+ "name": "dirExists","kind": "function",- "path": "test/context.test.ts",- "span": "L27-L29",- "signature": "function buildOpts()",+ "path": "src/hosts/mcp-config.ts",+ "span": "L19-L21",+ "signature": "function dirExists(p: string): boolean","exported": false,"origin": "ast",- "body_hash": "20ec093d8fa9dadc46af8980d9440b6824597f4cdeb74529d4d62ee38d27e52d",- "summary_state": "ready",- "summary": "This function generates options for building the context, including a fake model and providers.",+ "body_hash": "3cb56ff33de328b88ab53b8b869149394e3f46919184cc3d9c7bebed9fb4dcc7",+ "summary_state": "pending",+ "summary": null,"crux": null},{- "id": "test/context.test.ts#makeFixture",- "name": "makeFixture",+ "id": "src/hosts/mcp-config.ts#McpWrite",+ "name": "McpWrite",+ "kind": "interface",+ "path": "src/hosts/mcp-config.ts",+ "span": "L10-L14",+ "signature": "interface McpWrite",+ "exported": true,+ "origin": "ast",+ "body_hash": "9c185f100ff537beef3b464e5c8969c84b257c9897a30596b210f5534c8173c7",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/hosts/mcp-config.ts#mergeJsonKey",+ "name": "mergeJsonKey","kind": "function",- "path": "test/context.test.ts",- "span": "L14-L25",- "signature": "function makeFixture(): string",+ "path": "src/hosts/mcp-config.ts",+ "span": "L23-L43",+ "signature": "function mergeJsonKey(id: string, path: string, topKey: string, entry: object): McpWrite","exported": false,"origin": "ast",- "body_hash": "515198ac732683d4da4b920e53a0eb439ea8e0107afb22af65cc29c0e702192c",- "summary_state": "ready",- "summary": "This function creates a temporary directory with mock service files for testing the context building process.",- "crux": {- "code": " const dir = mkdtempSync(join(tmpdir(), \"ctxgraph-\"));\n writeFileSync(\n join(dir, \"auth.ts\"),\n `// [[Auth Service]] ==depends_on==> [[Token Store]]\\nexport const auth = 1;\\n`,\n );\n writeFileSync(\n join(dir, \"billing.ts\"),\n `// [[Billing]] ==uses==> [[Auth Service]]\\nexport const billing = 2;\\n`,\n );\n return dir;",- "span": "L15-L24"- }+ "body_hash": "e399dc21ae5ece8ec15889555e73360fb028691ac71f96255de36ae942b6707d",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "test/covers.test.ts",- "name": "covers.test.ts",- "kind": "file",- "path": "test/covers.test.ts",- "span": "L1-L77",- "signature": null,+ "id": "src/hosts/mcp-config.ts#registerMcpConfigs",+ "name": "registerMcpConfigs",+ "kind": "function",+ "path": "src/hosts/mcp-config.ts",+ "span": "L56-L87",+ "signature": "function registerMcpConfigs( repo: string, ids: string[], opts: { home?: string } = {}, ): McpWrite[]","exported": true,"origin": "ast",- "body_hash": "f5a75f405be1a01ad43fc806588858df3a8988fee62ad4ec024440d3f5e0fc0c",- "chars": 3059,- "summary_state": "ready",- "summary": "This test suite verifies that the wiring build correctly populates the 'covers' field in concept nodes and maintains stability across builds.",- "crux": {- "code": "test(\"wiring build backfills covers: onto concept nodes\", async () => {\n const dir = makeFixture();\n try {\n await buildContext(dir, { model: \"fake\", ...fakeProviders() });\n await buildGraph(dir); // $0, no LLM — still writes cards + covers\n\n const fm = matter(readFileSync(join(dir, \"graft\", \"auth-service.md\"), \"utf8\")).data;\n assert.ok(Array.isArray(fm.covers), \"covers should be an array\");\n const login = fm.covers.find((c: { symbol: string }) => c.symbol === \"login\");\n assert.ok(login, \"covers should include the login function\");\n assert.equal(login.kind, \"function\");\n assert.match(login.at, /^auth\\.ts:L\\d+-L\\d+$/);",- "span": "L26-L37"- }+ "body_hash": "13f7e325e26de9e426d475d1ff63fe06af411ca36b4d3c0fca7b2c2eb11fb45f",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "test/covers.test.ts#makeFixture",- "name": "makeFixture",+ "id": "src/hosts/mcp-config.ts#upsertCodexToml",+ "name": "upsertCodexToml","kind": "function",- "path": "test/covers.test.ts",- "span": "L16-L24",- "signature": "function makeFixture(): string",+ "path": "src/hosts/mcp-config.ts",+ "span": "L45-L54",+ "signature": "function upsertCodexToml(id: string, path: string): McpWrite","exported": false,"origin": "ast",- "body_hash": "c50f4905cfffe46da829a42a2bcab6838f96a17497009a9efe7a64a98729540f",- "summary_state": "ready",- "summary": "Creates a temporary directory with a sample TypeScript file for testing the wiring build.",- "crux": {- "code": " const dir = mkdtempSync(join(tmpdir(), \"graft-covers-\"));\n writeFileSync(\n join(dir, \"auth.ts\"),\n `// [[Auth Service]] ==depends_on==> [[Token Store]]\\n` +\n `export function login(user: string): boolean {\\n return user.length > 0;\\n}\\n`,\n );\n return dir;",- "span": "L17-L23"- }+ "body_hash": "2dd6f4be2733f7bbd211b3ba2c6a8ceda215a135a9606a33fb7b1654ab320f9a",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "test/helpers.ts",- "name": "helpers.ts",+ "id": "src/hosts/registry.ts",+ "name": "registry.ts","kind": "file",- "path": "test/helpers.ts",- "span": "L1-L55",+ "path": "src/hosts/registry.ts",+ "span": "L1-L89","signature": null,"exported": true,"origin": "ast",- "body_hash": "e45af1d38d7c6d4abc804fc74e9ae4c3373cf78769c17b16b185c3ee0e2c3228",- "chars": 2012,- "summary_state": "ready",- "summary": "This file provides test doubles for offline, deterministic testing of components without external dependencies.",+ "body_hash": "0a8a2b82f0e4e1010943eb69d2eee7d9c4549f884967d5af1b8317c38ef99c18",+ "chars": 2496,+ "summary_state": "pending",+ "summary": null,"crux": null},{- "id": "test/helpers.ts#BracketSynthesizer",- "name": "BracketSynthesizer",- "kind": "class",- "path": "test/helpers.ts",- "span": "L21-L50",- "signature": "class BracketSynthesizer implements Synthesizer",+ "id": "src/hosts/registry.ts#detectHosts",+ "name": "detectHosts",+ "kind": "function",+ "path": "src/hosts/registry.ts",+ "span": "L86-L88",+ "signature": "function detectHosts(probe: DetectProbe): HostTarget[]","exported": true,"origin": "ast",- "body_hash": "6a30b1293990bb2dce95f1f1f77219dbcdc54eef7e6a01d0db03403f4d344bcc",- "summary_state": "ready",- "summary": "This class synthesizes a graph structure from simple markup, enabling tests to define the relationships between nodes explicitly.",- "crux": {- "code": " async synthesize(files: FileSummary[]): Promise<SynthNode[]> {\n const byName = new Map<string, { sources: Set<string>; links: Map<string, SynthLink> }>();\n const ensure = (name: string) => {\n let e = byName.get(name);\n if (!e) {\n e = { sources: new Set(), links: new Map() };\n byName.set(name, e);\n }\n return e;\n };\n for (const f of files) {\n for (const m of f.summary.matchAll(/\\[\\[([^\\]]+)\\]\\]/g)) {",- "span": "L22-L33"- }+ "body_hash": "3e698dbf2457932d7a8713477813adac3b143152cafeb164aef5daf4fce398e5",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "test/helpers.ts#BracketSynthesizer.synthesize",- "name": "synthesize",- "kind": "method",- "path": "test/helpers.ts",- "span": "L22-L49",- "signature": "async synthesize(files: FileSummary[]): Promise<SynthNode[]>",+ "id": "src/hosts/registry.ts#DetectProbe",+ "name": "DetectProbe",+ "kind": "interface",+ "path": "src/hosts/registry.ts",+ "span": "L12-L16",+ "signature": "interface DetectProbe","exported": true,"origin": "ast",- "body_hash": "b42a19064389576a02ba334fcab8bfb5d8d985a46f995be864095e770d47e26d",- "summary_state": "ready",- "summary": "This method processes file summaries to create a structured representation of nodes and their relationships based on markup.",- "crux": {- "code": " for (const m of f.summary.matchAll(/\\[\\[([^\\]]+)\\]\\]\\s*==([a-z_]+)==>\\s*\\[\\[([^\\]]+)\\]\\]/g)) {\n const [, from, relation, to] = m;\n ensure(to.trim()).sources.add(f.path);\n ensure(from.trim()).links.set(`${to}|${relation}`, { to: to.trim(), relation });\n }",- "span": "L36-L40"- }+ "body_hash": "b9f830f4861e96bdce7f7bf638175022642738bd7155f68167eb50a879f7a525",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "test/helpers.ts#BracketSynthesizer.synthesize.ensure",- "name": "ensure",+ "id": "src/hosts/registry.ts#hostIds",+ "name": "hostIds","kind": "function",- "path": "test/helpers.ts",- "span": "L24-L31",- "signature": "ensure = (name: string)",+ "path": "src/hosts/registry.ts",+ "span": "L82-L84",+ "signature": "function hostIds(): string[]","exported": true,"origin": "ast",- "body_hash": "3b8cc65a6170766e70a5b038f9f27176e60114ce70e0e2dc1463f720ed384c4c",- "summary_state": "ready",- "summary": "This function ensures that a node exists in the map, creating it if necessary, to maintain the graph structure.",- "crux": {- "code": " const ensure = (name: string) => {\n let e = byName.get(name);\n if (!e) {\n e = { sources: new Set(), links: new Map() };\n byName.set(name, e);\n }\n return e;\n };",- "span": "L24-L31"- }+ "body_hash": "4f4ec61bb5cdc94d5a40965c4bd6757b2e888811bb63fba7368f5f606d055ada",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "test/helpers.ts#fakeProviders",- "name": "fakeProviders",- "kind": "function",- "path": "test/helpers.ts",- "span": "L52-L54",- "signature": "function fakeProviders()",+ "id": "src/hosts/registry.ts#HostTarget",+ "name": "HostTarget",+ "kind": "interface",+ "path": "src/hosts/registry.ts",+ "span": "L18-L26",+ "signature": "interface HostTarget","exported": true,"origin": "ast",- "body_hash": "0395bc21ba030a5d0e1fc9e5fdd0d8780c4309c87d899bedbc940f1bdcd2864f",- "summary_state": "ready",- "summary": "This function creates and returns instances of the test doubles for summarization and synthesis.",+ "body_hash": "061c7862838ab4494e485220f52fea2202e0db5be2d2ff0e34d8e5fba4bb4b14",+ "summary_state": "pending",+ "summary": null,"crux": null},{- "id": "test/helpers.ts#PassthroughSummarizer",- "name": "PassthroughSummarizer",- "kind": "class",- "path": "test/helpers.ts",- "span": "L9-L13",- "signature": "class PassthroughSummarizer implements Summarizer",+ "id": "src/hosts/sections.ts",+ "name": "sections.ts",+ "kind": "file",+ "path": "src/hosts/sections.ts",+ "span": "L1-L68",+ "signature": null,"exported": true,"origin": "ast",- "body_hash": "43c71f9e449859d657d6cef17b80d2bb650734751530e8401c356fc963f7b012",- "summary_state": "ready",- "summary": "This class serves as a no-op summarizer that returns the input code unchanged for controlled testing.",- "crux": {- "code": " async summarize(code: string): Promise<string> {\n return code;\n }",- "span": "L10-L12"- }+ "body_hash": "f172618889d5a02683032df8c69dd85b71c00c72a8b76958305ade22d6cda714",+ "chars": 2879,+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "test/helpers.ts#PassthroughSummarizer.summarize",- "name": "summarize",- "kind": "method",- "path": "test/helpers.ts",- "span": "L10-L12",- "signature": "async summarize(code: string): Promise<string>",- "exported": true,+ "id": "src/hosts/sections.ts#detectEol",+ "name": "detectEol",+ "kind": "function",+ "path": "src/hosts/sections.ts",+ "span": "L24-L26",+ "signature": "function detectEol(text: string): LineEnding",+ "exported": false,"origin": "ast",- "body_hash": "8836e78c4875dee01aeae5cb976c217cd347554542e387996b7c190b1a73af18",- "summary_state": "ready",- "summary": "This method returns the input code as-is, allowing tests to control the output precisely.",- "crux": {- "code": " async summarize(code: string): Promise<string> {\n return code;\n }",- "span": "L10-L12"- }+ "body_hash": "902fbd2b08830cb32450b0a84ba8f76f1fd34d4fe8345b28fadba29a682c4b43",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "test/viz-assemble.test.ts",- "name": "viz-assemble.test.ts",- "kind": "file",- "path": "test/viz-assemble.test.ts",- "span": "L1-L106",- "signature": null,+ "id": "src/hosts/sections.ts#fencedBlock",+ "name": "fencedBlock",+ "kind": "function",+ "path": "src/hosts/sections.ts",+ "span": "L15-L21",+ "signature": "function fencedBlock(body: string, eol: LineEnding = '\\n'): string","exported": true,"origin": "ast",- "body_hash": "89a2a9f11f459a8110f9d89b2de780dfd164504f3b4c7dc61953a6c83c5911cb",- "chars": 3118,- "summary_state": "ready",- "summary": "This file contains tests that validate the assembly of a context graph from markdown frontmatter, ensuring proper relation normalization and error handling for malformed files.",- "crux": {- "code": "test(\"assembleContextGraph builds nodes and edges from frontmatter\", () => {\n const dir = makeContextDir();\n try {\n const g = assembleContextGraph(dir);\n\n assert.equal(g.nodes.length, 2);\n assert.deepEqual(g.nodes.map((n) => n.id).sort(), [\"alpha\", \"beta\"]);\n\n const alpha = g.nodes.find((n) => n.id === \"alpha\")!;\n assert.equal(alpha.name, \"Alpha\");\n assert.equal(alpha.type, \"system\");\n assert.deepEqual(alpha.sources, [\"src/a.ts\"]);",- "span": "L62-L73"- }+ "body_hash": "cfc11a2e95b5d0866b455dfff3cd2e1f98f13e3dc5dad5fe47b8f624cb93b6bd",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "test/viz-assemble.test.ts#makeContextDir",- "name": "makeContextDir",+ "id": "src/hosts/sections.ts#LineEnding",+ "name": "LineEnding",+ "kind": "type",+ "path": "src/hosts/sections.ts",+ "span": "L13-L13",+ "signature": "type LineEnding = '\\n' | '\\r\\n';",+ "exported": false,+ "origin": "ast",+ "body_hash": "e49b9a5218efdfb100f47552da255afff2e24a84ab10c02564adb1e72892a229",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/hosts/sections.ts#markerLineIndex",+ "name": "markerLineIndex","kind": "function",- "path": "test/viz-assemble.test.ts",- "span": "L12-L60",- "signature": "function makeContextDir(): string",+ "path": "src/hosts/sections.ts",+ "span": "L29-L34",+ "signature": "function markerLineIndex(lines: string[], marker: string, from = 0): number","exported": false,"origin": "ast",- "body_hash": "4fab7dd2dc5bc7c0b9d575f8396bdca67e8d2d5a9f337aa14ef7740dd87b2119",+ "body_hash": "b090a3b83b05f46da8f10b2c37a8f0a5c1522280f786fe4263f161294e0ffbd3",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/hosts/sections.ts#UpsertAction",+ "name": "UpsertAction",+ "kind": "type",+ "path": "src/hosts/sections.ts",+ "span": "L11-L11",+ "signature": "type UpsertAction = 'created' | 'appended' | 'replaced' | 'unchanged';",+ "exported": true,+ "origin": "ast",+ "body_hash": "53d24b330d60564589d8a07882c099e9fc964a43b0523536ea03cc430551452f",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/hosts/sections.ts#upsertSection",+ "name": "upsertSection",+ "kind": "function",+ "path": "src/hosts/sections.ts",+ "span": "L36-L67",+ "signature": "function upsertSection(filePath: string, body: string): { action: UpsertAction }",+ "exported": true,+ "origin": "ast",+ "body_hash": "552b5cf28b36f1e019f183739f266aa59b8af6bbf691056507639ce5633c2dd0",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/index.ts",+ "name": "index.ts",+ "kind": "file",+ "path": "src/index.ts",+ "span": "L1-L37",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "e56e74612514fd45665b27e3c47b4a685b503a533b38e1674d256344511107fc",+ "chars": 1542,"summary_state": "ready",- "summary": "This function creates a temporary directory with markdown files to simulate context data for testing the graph assembly.",+ "summary": "This file serves as the public API for the Graft library, facilitating the management and synchronization of linked markdown files in a repository.","crux": {- "code": " const dir = mkdtempSync(join(tmpdir(), \"graftviz-\"));\n writeFileSync(\n join(dir, \"alpha.md\"),\n `---\nname: Alpha\nslug: alpha\ntype: system\nsources:\n - path: src/a.ts\n hash: abc123\nlinks:\n - to: beta",- "span": "L13-L24"+ "code": " * await engine.init(\".\"); // writes .context/*.md + manifest.json\n *\n * const result = engine.check(\".\"); // { ok: boolean, ...drift }\n * if (!result.ok) process.exitCode = 1;",+ "span": "L12-L15"}},{- "id": "test/viz-serve.test.ts",- "name": "viz-serve.test.ts",+ "id": "src/ingest/fs.ts",+ "name": "fs.ts","kind": "file",- "path": "test/viz-serve.test.ts",- "span": "L1-L101",+ "path": "src/ingest/fs.ts",+ "span": "L1-L46","signature": null,"exported": true,"origin": "ast",- "body_hash": "d22168054844e83bc5257271c4cc80a6e3eb1315e600c03b48fe6b54afd5c243",- "chars": 4004,+ "body_hash": "a8339532da34b44d35eb9ad16e7106adb1262d73d9895b1bd94574337fb2019f",+ "chars": 1218,"summary_state": "ready",- "summary": "This file contains tests for the viz server, ensuring it serves the correct endpoints and handles various scenarios like port fallback and context directory changes.",- "crux": {- "code": "test(\"viz server serves viewer, context graph, and gates code graph\", async () => {\n const { contextDir, viewerDir, root } = makeDirs();\n const srv = await startVizServer({ contextDir, viewerDir, port: 4831, repoName: \"fixture\" });\n try {\n const html = await fetch(`${srv.url}/`).then((r) => r.text());\n assert.match(html, /stub/);\n\n const graph = await fetch(`${srv.url}/api/context-graph`).then((r) => r.json());\n assert.equal(graph.meta.nodeCount, 1);\n assert.equal(graph.meta.repoName, \"fixture\");\n assert.equal(graph.nodes[0].id, \"alpha\");\n",- "span": "L29-L40"- }+ "summary": "This file provides utilities for walking through a filesystem to identify source files while excluding certain directories and large files.",+ "crux": null},{- "id": "test/viz-serve.test.ts#makeDirs",- "name": "makeDirs",+ "id": "src/ingest/fs.ts#walkDir",+ "name": "walkDir","kind": "function",- "path": "test/viz-serve.test.ts",- "span": "L13-L27",- "signature": "function makeDirs(): { contextDir: string; viewerDir: string; root: string }",- "exported": false,+ "path": "src/ingest/fs.ts",+ "span": "L27-L45",+ "signature": "function walkDir(dir: string): string[]",+ "exported": true,"origin": "ast",- "body_hash": "cff2ec95e868528eec2623a2907ab4c4e3e4a55224d0551b1fb8a63e8bbc124d",+ "body_hash": "001f6c9f648af0620ed90c55a132464ab87da3ad74b6711df716e9f9493333c4","summary_state": "ready",- "summary": "This function creates necessary directory structures and files for testing the viz server.",+ "summary": "The walkDir function recursively collects paths of files in a directory while skipping specified directories and files larger than 1 MB.","crux": {- "code": " const root = mkdtempSync(join(tmpdir(), \"graftviz-srv-\"));\n const contextDir = join(root, \".context\");\n const viewerDir = join(root, \"viewer\");\n mkdirSync(contextDir);\n mkdirSync(viewerDir);\n writeFileSync(join(viewerDir, \"index.html\"), \"<title>stub</title>\\n\");\n writeFileSync(join(viewerDir, \"app.js\"), \"// stub\\n\");\n writeFileSync(join(viewerDir, \"style.css\"), \"/* stub */\\n\");\n writeFileSync(\n join(contextDir, \"alpha.md\"),\n `---\\nname: Alpha\\nslug: alpha\\ntype: system\\nsources: []\\nlinks: []\\n---\\nbody\\n`,\n );",- "span": "L14-L25"+ "code": " if (entry.name.startsWith(\".\")) continue;\n const full = join(dir, entry.name);\n if (entry.isDirectory()) {\n if (SKIP_DIRS.has(entry.name)) continue;\n out.push(...walkDir(full));\n } else if (entry.isFile()) {\n try {\n if (statSync(full).size > MAX_FILE_BYTES) continue;\n } catch {\n continue;\n }\n out.push(full);",+ "span": "L30-L41"}},{- "id": "viewer/data.ts",- "name": "data.ts",+ "id": "src/mcp/server.ts",+ "name": "server.ts","kind": "file",- "path": "viewer/data.ts",- "span": "L1-L122",+ "path": "src/mcp/server.ts",+ "span": "L1-L67","signature": null,"exported": true,"origin": "ast",- "body_hash": "e9c5c89ad933e06004cbeddc1b1d7b60a6057726a463c66f9673ba20a3c61afd",- "chars": 4708,- "summary_state": "ready",- "summary": "This file defines data structures and functions for managing and visualizing graph data from a server.",+ "body_hash": "1f2cf661e0294571d81c31fa69a570c46389f09f5d37226f133398ae315bc6c8",+ "chars": 2223,+ "summary_state": "pending",+ "summary": null,"crux": null},{- "id": "viewer/data.ts#chipKey",- "name": "chipKey",+ "id": "src/mcp/server.ts#reply",+ "name": "reply","kind": "function",- "path": "viewer/data.ts",- "span": "L47-L51",- "signature": "function chipKey(rel: string): string",- "exported": true,+ "path": "src/mcp/server.ts",+ "span": "L12-L14",+ "signature": "function reply(id: unknown, result: object): void",+ "exported": false,"origin": "ast",- "body_hash": "85dd128b9f3bf028efaeac2428474b0d70ac47e8e94bcba80c111d59a6006df9",- "summary_state": "ready",- "summary": "Generates a key for chip grouping based on the relation verb, simplifying the visualization of relationships.",- "crux": {- "code": " if (famOf(rel) === \"structure\") return \"part of\";\n if (rel === \"calls\" || rel === \"uses\" || rel === \"depends_on\" || rel === \"imports\") return \"uses\";\n return rel.replace(/_/g, \" \");",- "span": "L48-L50"- }+ "body_hash": "ebf863d2db4e0898846deff35e6a0d581dae06f6e402592309f8c6742a3abe59",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/data.ts#CodeGraphV1",- "name": "CodeGraphV1",- "kind": "interface",- "path": "viewer/data.ts",- "span": "L86-L93",- "signature": "interface CodeGraphV1",+ "id": "src/mcp/server.ts#replyError",+ "name": "replyError",+ "kind": "function",+ "path": "src/mcp/server.ts",+ "span": "L16-L18",+ "signature": "function replyError(id: unknown, code: number, message: string): void","exported": false,"origin": "ast",- "body_hash": "e494a9a322973f3bc8af2017764ac546a8e9cb7b03cae5aeb730f48ad2521d90",- "summary_state": "ready",- "summary": "Defines the structure of the code graph data received from the server, including nodes and edges.",+ "body_hash": "540611464bba68e3e678870e748cde38aa6790c52ca10dfda8f891dcf0d59717",+ "summary_state": "pending",+ "summary": null,"crux": null},{- "id": "viewer/data.ts#colorToken",- "name": "colorToken",+ "id": "src/mcp/server.ts#send",+ "name": "send","kind": "function",- "path": "viewer/data.ts",- "span": "L72-L75",- "signature": "function colorToken(tab: \"context\" | \"code\", type: string): string",- "exported": true,+ "path": "src/mcp/server.ts",+ "span": "L8-L10",+ "signature": "function send(msg: object): void",+ "exported": false,"origin": "ast",- "body_hash": "dc48f14294140f474d97fdedf0bdbbbe487d5f0bcdeda6ae84f87251ab24b007",- "summary_state": "ready",- "summary": "Maps a type to its corresponding CSS custom property for styling in the visualization.",- "crux": {- "code": " return m[type] ?? \"--edge\";",- "span": "L74-L74"- }+ "body_hash": "7446435a2fc268ad8d76124c2e66f957d5de51730babfc38d8cb4dff5fc80c58",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/data.ts#cvar",- "name": "cvar",+ "id": "src/mcp/server.ts#startMcpServer",+ "name": "startMcpServer","kind": "function",- "path": "viewer/data.ts",- "span": "L77-L79",- "signature": "function cvar(name: string): string",+ "path": "src/mcp/server.ts",+ "span": "L20-L66",+ "signature": "function startMcpServer(root: string): void","exported": true,"origin": "ast",- "body_hash": "89e6f3b44e0dd358542573894691c925266e88da9160b79be00d043ae17245e8",- "summary_state": "ready",- "summary": "Retrieves the value of a CSS custom property from the document's root element.",+ "body_hash": "1efd50effb9cbf838928fd074313e48a18c8de25e1c87c83496c724112d85695",+ "summary_state": "pending",+ "summary": null,"crux": null},{- "id": "viewer/data.ts#Family",- "name": "Family",- "kind": "type",- "path": "viewer/data.ts",- "span": "L29-L29",- "signature": "type Family = \"structure\" | \"dependency\" | \"contract\" | \"association\";",+ "id": "src/mcp/tools.ts",+ "name": "tools.ts",+ "kind": "file",+ "path": "src/mcp/tools.ts",+ "span": "L1-L193",+ "signature": null,"exported": true,"origin": "ast",- "body_hash": "324db0cd1c7f2eebbda194734b2a8db880eb835949f0325780ea5ae75308ef05",- "summary_state": "ready",- "summary": "Categorizes relation verbs into families to enforce consistent semantics in graph relationships.",+ "body_hash": "2f134f9db2767f3595dbd3db26849ef5fb6e23bf58c3019d73e1f716c9eef7db",+ "chars": 8152,+ "summary_state": "pending",+ "summary": null,"crux": null},{- "id": "viewer/data.ts#famOf",- "name": "famOf",+ "id": "src/mcp/tools.ts#callTool",+ "name": "callTool","kind": "function",- "path": "viewer/data.ts",- "span": "L39-L41",- "signature": "function famOf(rel: string): Family",+ "path": "src/mcp/tools.ts",+ "span": "L120-L192",+ "signature": "function callTool( root: string, name: string, args: Record<string, unknown>, ): { text: string; isError: boolean }","exported": true,"origin": "ast",- "body_hash": "faed31084ad49496d754f589593081a76a4cd98e714ff10a10c07d5cd476738d",+ "body_hash": "5001ab4af1ff126fc4c0361469b41b8a7c3e44f1c26fb64d103d0a0fb3ec55be",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/mcp/tools.ts#renderMatches",+ "name": "renderMatches",+ "kind": "function",+ "path": "src/mcp/tools.ts",+ "span": "L108-L118",+ "signature": "function renderMatches(kind: TraverseKind, matches: NodeV1[], hitsFor: (n: NodeV1) => EdgeHit[]): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "b1fb04cdcb7c8aef1225f590bb7147d80d211ffa478c2f0eec54b33028045d66",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/mcp/tools.ts#ToolDef",+ "name": "ToolDef",+ "kind": "interface",+ "path": "src/mcp/tools.ts",+ "span": "L15-L19",+ "signature": "interface ToolDef",+ "exported": true,+ "origin": "ast",+ "body_hash": "66213a2ab8c0b58ddbf6e632f4ac26e643f00ff02eef696f9b321c2236b45365",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/mcp/tools.ts#unknownSymbolText",+ "name": "unknownSymbolText",+ "kind": "function",+ "path": "src/mcp/tools.ts",+ "span": "L26-L28",+ "signature": "function unknownSymbolText(query: string): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "ea43b6a930c9fe3d67aa2e40b6d1d7dc2ebdb0e55a23c1f42047c0089bc2917e",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "src/util/id.ts",+ "name": "id.ts",+ "kind": "file",+ "path": "src/util/id.ts",+ "span": "L1-L17",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "5fabc8ddcc3abc907ce69f04ad2ebe51933262cf44aa2dfd40589f71f1926e8a",+ "chars": 626,"summary_state": "ready",- "summary": "Determines the family category of a given relation verb, defaulting to 'association' if unknown.",+ "summary": "This file provides utility functions for generating unique identifiers, creating content hashes, and normalizing names for consistent matching.",+ "crux": null+ },+ {+ "id": "src/util/id.ts#contentHash",+ "name": "contentHash",+ "kind": "function",+ "path": "src/util/id.ts",+ "span": "L9-L11",+ "signature": "function contentHash(input: string): string",+ "exported": true,+ "origin": "ast",+ "body_hash": "d83ce720108cb9ea3b0c7b1e7034657603640647ca00283905fcd099ac3fe2ed",+ "summary_state": "ready",+ "summary": "This function creates a stable hash of the input content, which is essential for deduplication of documents.","crux": {- "code": " return FAMILY[rel] ?? \"association\";",- "span": "L40-L40"+ "code": " return createHash(\"sha256\").update(input).digest(\"hex\");",+ "span": "L10-L10"}},{- "id": "viewer/data.ts#loadCodeGraph",- "name": "loadCodeGraph",+ "id": "src/util/id.ts#newId",+ "name": "newId","kind": "function",- "path": "viewer/data.ts",- "span": "L96-L113",- "signature": "async function loadCodeGraph(): Promise<VizGraph | null>",+ "path": "src/util/id.ts",+ "span": "L4-L6",+ "signature": "function newId(prefix: string): string","exported": true,"origin": "ast",- "body_hash": "343a1a01362fa33345082eb6cd5a04cfc1b7a1411de7bc23422c5ac5ebb1fae1",+ "body_hash": "55062dee898e1edb76d65f7daf785b67e998a57a7dfd6f78c7eb17f39e3e1dc0","summary_state": "ready",- "summary": "Loads the code graph from the server, filtering out unresolved edges and returning a structured graph.",+ "summary": "This function generates a unique identifier with a specified prefix, solving the need for easily identifiable and unique keys.","crux": {- "code": " if (!res.ok) return null;\n const raw = (await res.json()) as CodeGraphV1;\n const nodes: VizNode[] = raw.nodes.map((n) => ({\n id: n.id,\n name: n.name,\n type: n.kind,\n summary: n.summary ?? n.signature ?? \"\",\n sources: [`${n.path} · ${n.span}`],\n }));\n const known = new Set(nodes.map((n) => n.id));\n // imports edges may point at unresolved module strings — drop those for rendering\n const edges: VizEdge[] = raw.edges",- "span": "L98-L109"+ "code": " return `${prefix}_${randomUUID().replace(/-/g, \"\").slice(0, 20)}`;",+ "span": "L5-L5"}},{- "id": "viewer/data.ts#loadContextGraph",- "name": "loadContextGraph",+ "id": "src/util/id.ts#normalizeName",+ "name": "normalizeName","kind": "function",- "path": "viewer/data.ts",- "span": "L81-L84",- "signature": "async function loadContextGraph(): Promise<VizGraph>",+ "path": "src/util/id.ts",+ "span": "L14-L16",+ "signature": "function normalizeName(name: string): string","exported": true,"origin": "ast",- "body_hash": "c65d9227bea8ceceffd49b4eb8475677aef8ca8820b966d9228a31875a6589e1",+ "body_hash": "bac0e298462067a441b2b76566ed29c3787280585b956f84b81d7a766cd7211a","summary_state": "ready",- "summary": "Fetches the context graph data from the server and returns it in a structured format.",+ "summary": "This function normalizes names for case- and whitespace-insensitive matching, ensuring consistency in name comparisons.","crux": {- "code": " const res = await fetch(\"/api/context-graph\");\n return (await res.json()) as VizGraph;",- "span": "L82-L83"+ "code": " return name.trim().toLowerCase().replace(/\\s+/g, \" \");",+ "span": "L15-L15"}},{- "id": "viewer/data.ts#onServerChange",- "name": "onServerChange",+ "id": "src/viz/assemble.ts",+ "name": "assemble.ts",+ "kind": "file",+ "path": "src/viz/assemble.ts",+ "span": "L1-L131",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "58ad5caed087bd7b929f5b625501a607e79e0476f998636bec241e0296706ece",+ "chars": 4233,+ "summary_state": "ready",+ "summary": "Assembles a comprehensive graph document from markdown files in a context directory, ensuring that only valid nodes and edges are included.",+ "crux": {+ "code": "/** Read a context dir and assemble the render-ready graph document. */\nexport function assembleContextGraph(contextDir: string): VizGraph {\n const nodes: VizNode[] = [];\n const rawEdges: VizEdge[] = [];\n let skippedFiles = 0;\n\n if (existsSync(contextDir)) {\n for (const entry of readdirSync(contextDir).sort()) {\n if (!entry.endsWith(\".md\")) continue;\n let parsed: matter.GrayMatterFile<string>;\n try {\n parsed = matter(readFileSync(join(contextDir, entry), \"utf8\"));",+ "span": "L78-L89"+ }+ },+ {+ "id": "src/viz/assemble.ts#assembleContextGraph",+ "name": "assembleContextGraph","kind": "function",- "path": "viewer/data.ts",- "span": "L116-L121",- "signature": "function onServerChange(handler: () => void): void",+ "path": "src/viz/assemble.ts",+ "span": "L79-L130",+ "signature": "function assembleContextGraph(contextDir: string): VizGraph","exported": true,"origin": "ast",- "body_hash": "d864a1d7995232ad54351830e5963a2c6fc8c64cc5a941cf9cfea74d688514c9",+ "body_hash": "8529626bef8abf2e1a326d601cf5a6a4972e0a1b801d6b653ba8227a27b9dbbd","summary_state": "ready",- "summary": "Subscribes to server events to trigger updates in the application when changes occur.",+ "summary": "Processes markdown files in a specified directory to create a structured visualization graph, handling errors gracefully.","crux": {- "code": " if (ev.data === \"change\") handler();",- "span": "L119-L119"+ "code": " if (existsSync(contextDir)) {\n for (const entry of readdirSync(contextDir).sort()) {\n if (!entry.endsWith(\".md\")) continue;\n let parsed: matter.GrayMatterFile<string>;\n try {\n parsed = matter(readFileSync(join(contextDir, entry), \"utf8\"));\n } catch {\n skippedFiles++;\n continue;\n }\n const fm = parsed.data as Record<string, unknown>;\n const id = String(fm.slug ?? entry.replace(/\\.md$/, \"\"));",+ "span": "L84-L95"}},{- "id": "viewer/data.ts#VizEdge",+ "id": "src/viz/assemble.ts#extractSummary",+ "name": "extractSummary",+ "kind": "function",+ "path": "src/viz/assemble.ts",+ "span": "L65-L76",+ "signature": "function extractSummary(body: string): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "1857e477bdb012672fa843cfca8d43eb543e7cfba2cc496692a65ebe8c0fa6c5",+ "summary_state": "ready",+ "summary": "Extracts and cleans the summary text from a markdown node's content, ensuring it adheres to length constraints.",+ "crux": {+ "code": "function extractSummary(body: string): string {\n let text = body;\n const start = text.indexOf(GEN_START);\n const end = text.indexOf(GEN_END);\n if (start >= 0 && end > start) text = text.slice(start + GEN_START.length, end);\n // Keep only the Summary section if headings are present.\n const related = text.indexOf(\"## Related\");\n if (related >= 0) text = text.slice(0, related);\n text = text.replace(/^##\\s+Summary\\s*$/m, \"\");\n text = text.trim();\n return text.length > SUMMARY_MAX ? text.slice(0, SUMMARY_MAX).trimEnd() + \"…\" : text;",+ "span": "L65-L75"+ }+ },+ {+ "id": "src/viz/assemble.ts#normalizeRelation",+ "name": "normalizeRelation",+ "kind": "function",+ "path": "src/viz/assemble.ts",+ "span": "L56-L58",+ "signature": "function normalizeRelation(rel: string): string",+ "exported": true,+ "origin": "ast",+ "body_hash": "adfaae55d1d21718adbedaa294194517aa7abdddeb95433642fd358137e48909",+ "summary_state": "ready",+ "summary": "Maps legacy vague verbs to concrete verbs to maintain consistency in the graph's relationships.",+ "crux": {+ "code": "export function normalizeRelation(rel: string): string {\n return NORMALIZE_RELATION[rel] ?? rel;\n}",+ "span": "L56-L58"+ }+ },+ {+ "id": "src/viz/assemble.ts#VizEdge","name": "VizEdge","kind": "interface",- "path": "viewer/data.ts",- "span": "L14-L20",+ "path": "src/viz/assemble.ts",+ "span": "L26-L31","signature": "interface VizEdge","exported": true,"origin": "ast",- "body_hash": "13baa6c9acc4c78eec36835e02fd49df79e869f836880341a959be134ceaabb1",+ "body_hash": "bef3aefe267d463b0d4cf617f379adadd4fffb539e9a0a5e240520be60a191cb","summary_state": "ready",- "summary": "Defines the relationship between two nodes in the visualization graph, including its type and description.",+ "summary": "Defines the structure of an edge in the visualization graph, representing relationships between nodes.","crux": null},{- "id": "viewer/data.ts#VizGraph",+ "id": "src/viz/assemble.ts#VizGraph","name": "VizGraph","kind": "interface",- "path": "viewer/data.ts",- "span": "L22-L26",+ "path": "src/viz/assemble.ts",+ "span": "L33-L42","signature": "interface VizGraph","exported": true,"origin": "ast",- "body_hash": "6448a4bb9c71c7932dce92d9d8a452f99a0a100041bd30c5b6759c5784b0f098",+ "body_hash": "7edd9c49c11acc8e90963256a92ee2f27415c50446334924e2e260b715b56427","summary_state": "ready",- "summary": "Encapsulates the entire visualization graph structure, including its nodes and edges.",+ "summary": "Encapsulates the complete visualization graph, including metadata about nodes and edges.","crux": null},{- "id": "viewer/data.ts#VizNode",+ "id": "src/viz/assemble.ts#VizNode","name": "VizNode","kind": "interface",- "path": "viewer/data.ts",- "span": "L6-L12",+ "path": "src/viz/assemble.ts",+ "span": "L18-L24","signature": "interface VizNode","exported": true,"origin": "ast","body_hash": "ec19a79898c594e5afc405cab037fcc0c43144c5766af8a955dccda7df733ba6","summary_state": "ready",- "summary": "Represents a node in the visualization graph, encapsulating its identity and metadata.",+ "summary": "Defines the structure of a node in the visualization graph, encapsulating its identity and attributes.","crux": null},{- "id": "viewer/detail.ts",- "name": "detail.ts",+ "id": "src/viz/serve.ts",+ "name": "serve.ts","kind": "file",- "path": "viewer/detail.ts",- "span": "L1-L59",+ "path": "src/viz/serve.ts",+ "span": "L1-L149","signature": null,"exported": true,"origin": "ast",- "body_hash": "fe8df7c5561f2a8588cf4e1ecb367d19cb6b480fe4855f05e4f96137d8078884",- "chars": 2421,+ "body_hash": "14283762f454c01fc95cfbe9c2b41ef063fc17c4c3e5d120b5dc7f66f541fc1c",+ "chars": 4909,"summary_state": "ready",- "summary": "This file provides the logic to render a detailed view of a selected node in a graph, including its properties and relationships.",+ "summary": "This file implements a local server for serving a viewer and handling API requests related to context and code graphs.","crux": {- "code": " if (!id || !graph) {\n host.innerHTML = '<div class=\"empty\">Select a node to view details</div>';\n return;\n }\n const node = graph.nodes.find((n) => n.id === id);\n if (!node) {\n host.innerHTML = '<div class=\"empty\">Select a node to view details</div>';\n return;\n }\n const color = cvar(colorToken(tab, node.type));\n const name = (nid: string) => graph.nodes.find((n) => n.id === nid)?.name ?? nid;\n const out = graph.edges.filter((e) => e.source === id);",- "span": "L19-L30"+ "code": " const server = createServer((req, res) => {\n const path = (req.url ?? \"/\").split(\"?\")[0];\n\n const asset = STATIC_FILES[path];\n if (asset) {\n const file = join(opts.viewerDir, asset.file);\n if (!existsSync(file)) {\n res.writeHead(404, { \"content-type\": \"text/plain\" });\n res.end(\"viewer bundle missing — run the package build\");\n return;\n }\n res.writeHead(200, { \"content-type\": asset.type });",+ "span": "L60-L71"}},{- "id": "viewer/detail.ts#esc",- "name": "esc",+ "id": "src/viz/serve.ts#listen",+ "name": "listen","kind": "function",- "path": "viewer/detail.ts",- "span": "L8-L10",- "signature": "function esc(s: string): string",+ "path": "src/viz/serve.ts",+ "span": "L43-L55",+ "signature": "function listen(server: Server, port: number): Promise<boolean>","exported": false,"origin": "ast",- "body_hash": "9fb927f7f1c881ee1fe325c0dc8a25b8c5cdb2c101b08ae935a35bb428f5bbdb",+ "body_hash": "b43a357dceb98a6eb6676409503021e6e38f13d7d442d44ba819dda0c0ea6246","summary_state": "ready",- "summary": "This function sanitizes a string for safe HTML rendering by escaping special characters.",+ "summary": "Attempts to bind the server to a specified port, handling errors if the port is in use.","crux": {- "code": " return s.replace(/&/g, \"&\").replace(/</g, \"<\");\n}",- "span": "L9-L10"+ "code": " return new Promise((resolve, reject) => {\n const onError = (err: NodeJS.ErrnoException) => {\n if (err.code === \"EADDRINUSE\") resolve(false);\n else reject(err);\n };\n server.once(\"error\", onError);\n server.listen(port, \"127.0.0.1\", () => {\n server.removeListener(\"error\", onError);\n resolve(true);\n });",+ "span": "L44-L53"}},{- "id": "viewer/detail.ts#renderDetail",- "name": "renderDetail",+ "id": "src/viz/serve.ts#listen.onError",+ "name": "onError","kind": "function",- "path": "viewer/detail.ts",- "span": "L12-L58",- "signature": "function renderDetail( host: HTMLElement, graph: VizGraph | null, tab: \"context\" | \"code\", id: string | null, onNavigate: (id: string) => void, ): void",- "exported": true,+ "path": "src/viz/serve.ts",+ "span": "L45-L48",+ "signature": "onError = (err: NodeJS.ErrnoException)",+ "exported": false,"origin": "ast",- "body_hash": "bbd0db0a7f39cbfbd9b0ca31f88118c9a2cd037d394ad47bff7203a6f399f5ca",+ "body_hash": "6643919e3ea413fc58afe100fe65dc3beccadb7aa66bf5d3247e072c83d9d000","summary_state": "ready",- "summary": "This function renders the details of a selected node, including its type, name, summary, sources, and relationships.",- "crux": {- "code": " const color = cvar(colorToken(tab, node.type));\n const name = (nid: string) => graph.nodes.find((n) => n.id === nid)?.name ?? nid;\n const out = graph.edges.filter((e) => e.source === id);\n const inn = graph.edges.filter((e) => e.target === id);\n\n let html = `<span class=\"d-type\"><span class=\"sw\" style=\"background:${color}\"></span>${esc(node.type)}</span>`;\n html += `<h3>${esc(node.name)}</h3>`;\n if (node.summary) html += `<p class=\"summary\">${esc(node.summary)}</p>`;\n if (node.sources.length) {\n html += `<div class=\"d-label\">Sources · ${node.sources.length}</div>`;\n for (const s of node.sources) html += `<div class=\"src mono\">${esc(s)}</div>`;\n }",- "span": "L28-L39"- }+ "summary": "Handles errors that occur when trying to bind the server to a port.",+ "crux": null},{- "id": "viewer/detail.ts#renderDetail.linkList",- "name": "linkList",+ "id": "src/viz/serve.ts#sendJson",+ "name": "sendJson","kind": "function",- "path": "viewer/detail.ts",- "span": "L40-L50",- "signature": "linkList = (edges: typeof out, dotColor: string, title: string, other: (e: (typeof out)[number]) => string)",- "exported": true,+ "path": "src/viz/serve.ts",+ "span": "L38-L41",+ "signature": "function sendJson(res: ServerResponse, status: number, body: unknown): void",+ "exported": false,"origin": "ast",- "body_hash": "f103fe554602f3315706280d7eba1016c647c77fa6af27e9a4ec0442d6cf1d89",+ "body_hash": "a2b33c898c929db2715116f964722f5e438e61a58fdfa4607d21c4365df5da6a","summary_state": "ready",- "summary": "This function generates HTML for displaying a list of links related to a node, categorized by their relationship type.",+ "summary": "Sends a JSON response with the specified status and body to the client.","crux": {- "code": " if (!edges.length) return;\n html += `<div class=\"d-label\"><span class=\"dot\" style=\"background:${dotColor}\"></span>${title} · ${edges.length}</div>`;\n for (const e of edges) {\n html += `<button class=\"lnk\" data-go=\"${esc(other(e))}\">` +\n `<span class=\"rel\">${esc(e.relation.replace(/_/g, \" \"))}</span> ` +\n `<span class=\"to\">${esc(name(other(e)))}</span>` +\n (e.description ? `<div class=\"desc\">${esc(e.description)}</div>` : \"\") +\n `</button>`;\n }\n };",- "span": "L41-L50"+ "code": " res.writeHead(status, { \"content-type\": \"application/json; charset=utf-8\" });\n res.end(JSON.stringify(body));\n}",+ "span": "L39-L41"}},{- "id": "viewer/detail.ts#renderDetail.name",- "name": "name",+ "id": "src/viz/serve.ts#startVizServer",+ "name": "startVizServer","kind": "function",- "path": "viewer/detail.ts",- "span": "L29-L29",- "signature": "name = (nid: string)",+ "path": "src/viz/serve.ts",+ "span": "L57-L148",+ "signature": "async function startVizServer(opts: VizServerOptions): Promise<VizServer>","exported": true,"origin": "ast",- "body_hash": "617c48812e0f0520b45da770cf91aeea5330b7e690c6d93defd4da77edf11b8a",+ "body_hash": "d652f8a8b5ea738a1ff68592d9644525dee438568c9158e5edffe536b1f1aa16","summary_state": "ready",- "summary": "This function retrieves the name of a node by its ID, providing a fallback if not found.",+ "summary": "Initializes and starts the visualization server, setting up routes and handling requests.","crux": {- "code": " const name = (nid: string) => graph.nodes.find((n) => n.id === nid)?.name ?? nid;",- "span": "L29-L29"+ "code": " const server = createServer((req, res) => {\n const path = (req.url ?? \"/\").split(\"?\")[0];\n\n const asset = STATIC_FILES[path];\n if (asset) {\n const file = join(opts.viewerDir, asset.file);\n if (!existsSync(file)) {\n res.writeHead(404, { \"content-type\": \"text/plain\" });\n res.end(\"viewer bundle missing — run the package build\");\n return;\n }\n res.writeHead(200, { \"content-type\": asset.type });",+ "span": "L60-L71"}},{- "id": "viewer/graph.ts",- "name": "graph.ts",- "kind": "file",- "path": "viewer/graph.ts",- "span": "L1-L335",- "signature": null,+ "id": "src/viz/serve.ts#startVizServer.close",+ "name": "close",+ "kind": "method",+ "path": "src/viz/serve.ts",+ "span": "L140-L146",+ "signature": "close(): Promise<void>","exported": true,"origin": "ast",- "body_hash": "192a59b16da8327457de6723893fd9207dd9570a35cd664f96534a7b85e73e01",- "chars": 14262,+ "body_hash": "69dc0089d8f1d6e843c8add8fabf2e120fd1045505f9c15632ba93bdc58c01d4","summary_state": "ready",- "summary": "This file implements a force-directed graph visualization using D3.js, allowing interactive exploration of nodes and edges.",+ "summary": "Closes the visualization server and cleans up resources.","crux": {- "code": " setData(graph: VizGraph, tab: \"context\" | \"code\"): void {\n this.tab = tab;\n const prev = new Map(this.nodes.map((n) => [n.id, n]));\n const deg: Record<string, number> = {};\n for (const e of graph.edges) {\n deg[e.source] = (deg[e.source] ?? 0) + 1;\n deg[e.target] = (deg[e.target] ?? 0) + 1;\n }\n const W = this.svg.clientWidth || 800;\n const H = this.svg.clientHeight || 600;\n this.nodes = graph.nodes.map((n, i) => {\n const p = prev.get(n.id);",- "span": "L94-L105"+ "code": " close(): Promise<void> {\n clearTimeout(debounce);\n watcher?.close();\n for (const client of sseClients) client.end();\n sseClients.clear();\n return new Promise((resolve, reject) => server.close((err) => (err ? reject(err) : resolve())));\n },",+ "span": "L140-L146"}},{- "id": "viewer/graph.ts#el",- "name": "el",- "kind": "function",- "path": "viewer/graph.ts",- "span": "L42-L46",- "signature": "function el<K extends keyof SVGElementTagNameMap>(tag: K, attrs: Record<string, string | number>): SVGElementTagNameMap[K]",- "exported": false,+ "id": "src/viz/serve.ts#VizServer",+ "name": "VizServer",+ "kind": "interface",+ "path": "src/viz/serve.ts",+ "span": "L23-L26",+ "signature": "interface VizServer",+ "exported": true,"origin": "ast",- "body_hash": "de7f696c06af5d771e8e661f398d9d275ca2cc06d86f4e91458d671480e346b7",+ "body_hash": "9c56587daccba8982a5f5da3a0ea5f185becea8c4f4927331b15117f5d456214","summary_state": "ready",- "summary": "Creates and returns an SVG element with specified attributes, facilitating dynamic SVG generation.",+ "summary": "Represents the visualization server with its URL and a method to close it.","crux": null},{- "id": "viewer/graph.ts#GraphView",- "name": "GraphView",- "kind": "class",- "path": "viewer/graph.ts",- "span": "L48-L334",- "signature": "class GraphView",+ "id": "src/viz/serve.ts#VizServerOptions",+ "name": "VizServerOptions",+ "kind": "interface",+ "path": "src/viz/serve.ts",+ "span": "L16-L21",+ "signature": "interface VizServerOptions","exported": true,"origin": "ast",- "body_hash": "1405c1f292294538c45794740adf01c59c83d3fd7047b6efa8c04c90a4409310",+ "body_hash": "0b439484269a73c19df0d658113fbdc889c2214d1081e08d92bc86ae99e0c795","summary_state": "ready",- "summary": "Manages the rendering and interaction of the graph view, including node and edge updates.",- "crux": {- "code": " setData(graph: VizGraph, tab: \"context\" | \"code\"): void {\n this.tab = tab;\n const prev = new Map(this.nodes.map((n) => [n.id, n]));\n const deg: Record<string, number> = {};\n for (const e of graph.edges) {\n deg[e.source] = (deg[e.source] ?? 0) + 1;\n deg[e.target] = (deg[e.target] ?? 0) + 1;\n }\n const W = this.svg.clientWidth || 800;\n const H = this.svg.clientHeight || 600;\n this.nodes = graph.nodes.map((n, i) => {\n const p = prev.get(n.id);",- "span": "L94-L105"- }+ "summary": "Defines the configuration options required to start the visualization server.",+ "crux": null},{- "id": "viewer/graph.ts#GraphView.applyView",- "name": "applyView",- "kind": "method",- "path": "viewer/graph.ts",- "span": "L268-L270",- "signature": "private applyView(): void",+ "id": "test/ask-index.test.ts",+ "name": "ask-index.test.ts",+ "kind": "file",+ "path": "test/ask-index.test.ts",+ "span": "L1-L378",+ "signature": null,"exported": true,"origin": "ast",- "body_hash": "2adb54996d6ef9272cd69144b4b6c4bb92236506a3f5bf2d589faffd5218554b",- "summary_state": "ready",- "summary": "Applies the current view transformation to the graph, adjusting the viewport accordingly.",- "crux": {- "code": " private applyView(): void {\n this.viewport.setAttribute(\"transform\", `translate(${this.view.x},${this.view.y}) scale(${this.view.k})`);\n }",- "span": "L268-L270"- }+ "body_hash": "c9cd7c011ebd661f35488c59dcd34801079f2786d56e96833f4da7c45dfa37d7",+ "chars": 16112,+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/graph.ts#GraphView.bindDrag",- "name": "bindDrag",- "kind": "method",- "path": "viewer/graph.ts",- "span": "L290-L309",- "signature": "private bindDrag(group: SVGGElement, node: SimNode): void",- "exported": true,+ "id": "test/ask-index.test.ts#makeFixture",+ "name": "makeFixture",+ "kind": "function",+ "path": "test/ask-index.test.ts",+ "span": "L26-L50",+ "signature": "function makeFixture(): string",+ "exported": false,"origin": "ast",- "body_hash": "00e851d11e1029516256411b627b60e78d781cdc62ada046a0eb93c55c2dd009",- "summary_state": "ready",- "summary": "Enables dragging functionality for nodes, allowing users to reposition them interactively.",- "crux": {- "code": " private bindDrag(group: SVGGElement, node: SimNode): void {\n group.addEventListener(\"pointerdown\", (ev) => {\n ev.stopPropagation();\n group.setPointerCapture(ev.pointerId);\n const move = (mv: PointerEvent) => {\n const rect = this.svg.getBoundingClientRect();\n node.fx = (mv.clientX - rect.left - this.view.x) / this.view.k;\n node.fy = (mv.clientY - rect.top - this.view.y) / this.view.k;\n this.sim?.alphaTarget(0.25).restart();\n };\n const up = () => {\n node.fx = null; node.fy = null;",- "span": "L290-L301"- }+ "body_hash": "c90c21864f82921d79c49a3ab3b523d234323a0850a634de37d08abced8fd0f8",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/graph.ts#GraphView.bindDrag.move",- "name": "move",+ "id": "test/ask-index.test.ts#reinjectBodyText",+ "name": "reinjectBodyText","kind": "function",- "path": "viewer/graph.ts",- "span": "L294-L299",- "signature": "move = (mv: PointerEvent)",- "exported": true,+ "path": "test/ask-index.test.ts",+ "span": "L69-L85",+ "signature": "function reinjectBodyText(dir: string, outDir: string): void",+ "exported": false,"origin": "ast",- "body_hash": "656f371efff6a0eed7868895a4044e4fdf1dc88840de21376c388ba03149fbd0",- "summary_state": "ready",- "summary": "Handles the movement of a node during drag events, updating its fixed position.",- "crux": {- "code": " const move = (mv: PointerEvent) => {\n const rect = this.svg.getBoundingClientRect();\n node.fx = (mv.clientX - rect.left - this.view.x) / this.view.k;\n node.fy = (mv.clientY - rect.top - this.view.y) / this.view.k;\n this.sim?.alphaTarget(0.25).restart();\n };",- "span": "L294-L299"- }+ "body_hash": "dd2e01921c74775b79f94544f814554415656ca604983fbcd14b10a0fea1a6b0",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/graph.ts#GraphView.bindDrag.up",- "name": "up",+ "id": "test/ask-index.test.ts#sortPairs",+ "name": "sortPairs","kind": "function",- "path": "viewer/graph.ts",- "span": "L300-L305",- "signature": "up = ()",- "exported": true,+ "path": "test/ask-index.test.ts",+ "span": "L106-L106",+ "signature": "sortPairs = (p: [string, number][])",+ "exported": false,"origin": "ast",- "body_hash": "a935b15e42eefdf45da528afe3172b559d3e9ee97fe4be67f682dedccaac64c2",- "summary_state": "ready",- "summary": "Finalizes the drag operation by releasing the node's fixed position.",- "crux": {- "code": " const up = () => {\n node.fx = null; node.fy = null;\n this.sim?.alphaTarget(0);\n group.removeEventListener(\"pointermove\", move);\n group.removeEventListener(\"pointerup\", up);\n };",- "span": "L300-L305"- }+ "body_hash": "67de2733865dd8e5d635892fb085c3781a9a541c49ad2d112c8c150aaef655b6",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/graph.ts#GraphView.bindPanZoom",- "name": "bindPanZoom",- "kind": "method",- "path": "viewer/graph.ts",- "span": "L311-L333",- "signature": "private bindPanZoom(): void",+ "id": "test/ask.test.ts",+ "name": "ask.test.ts",+ "kind": "file",+ "path": "test/ask.test.ts",+ "span": "L1-L284",+ "signature": null,"exported": true,"origin": "ast",- "body_hash": "737e5f69bc32913d3b061a4a878b61245d242e217f451a81d72d21e1d28fae30",- "summary_state": "ready",- "summary": "Sets up event listeners for panning and zooming the graph view based on user interactions.",+ "body_hash": "3445f8b156ba6b2f0e9123e9fc45781da352ec6d5baeb985ee144fe5aecaafb3",+ "chars": 11713,+ "summary_state": "stale",+ "summary": "This file contains tests for the `graft ask` functionality, ensuring that the source option correctly inlines code from disk when requested.","crux": {- "code": " private bindPanZoom(): void {\n let panStart: { x: number; y: number } | null = null;\n this.svg.addEventListener(\"pointerdown\", (ev) => {\n panStart = { x: ev.clientX - this.view.x, y: ev.clientY - this.view.y };\n });\n this.svg.addEventListener(\"pointermove\", (ev) => {\n if (!panStart) return;\n this.view.x = ev.clientX - panStart.x;\n this.view.y = ev.clientY - panStart.y;\n this.applyView();\n });\n window.addEventListener(\"pointerup\", () => { panStart = null; });",- "span": "L311-L322"+ "code": "test(\"ask without source returns pointers but no inlined code\", async () => {\n const dir = makeFixture();\n try {\n await buildGraph(dir); // $0, structure-only — cards + wiring.json\n const r = ask(dir, \"addNumbers\");\n const hit = r.hits.find((h) => h.title.startsWith(\"addNumbers\"));\n assert.ok(hit, \"should locate the addNumbers symbol\");\n assert.match(hit.pointer, /^math\\.ts:L\\d+-L\\d+$/);\n assert.equal(hit.code, undefined, \"no source inlined without the option\");\n } finally {\n rmSync(dir, { recursive: true, force: true });\n }",+ "span": "L26-L37"}},{- "id": "viewer/graph.ts#GraphView.buildChrome",- "name": "buildChrome",- "kind": "method",- "path": "viewer/graph.ts",- "span": "L71-L78",- "signature": "private buildChrome(): void",- "exported": true,+ "id": "test/ask.test.ts#makeFixture",+ "name": "makeFixture",+ "kind": "function",+ "path": "test/ask.test.ts",+ "span": "L16-L25",+ "signature": "function makeFixture(): string",+ "exported": false,"origin": "ast",- "body_hash": "592cef68d76f99ad8da470cc3c8b4eda64701c02b8740a21e659fdd5e5325def",+ "body_hash": "2782fc6b3f2efa27b0c0195482a4b138e1ec02bd16da279313966e96a6d807e8","summary_state": "ready",- "summary": "Sets up the initial SVG structure for the graph, including definitions and viewport.",+ "summary": "Creates a temporary directory with a sample TypeScript file for testing purposes.","crux": {- "code": " this.svg.textContent = \"\";\n this.defs = el(\"defs\", {});\n this.svg.appendChild(this.defs);\n this.viewport = el(\"g\", {});\n this.svg.appendChild(this.viewport);\n this.svg.addEventListener(\"click\", () => this.select(null));\n }",- "span": "L72-L78"+ "code": " const dir = mkdtempSync(join(tmpdir(), \"graft-ask-\"));\n writeFileSync(\n join(dir, \"math.ts\"),\n `export function addNumbers(a: number, b: number): number {\\n` +\n ` return a + b;\\n` +\n `}\\n`,\n );\n return dir;",+ "span": "L16-L23"}},{- "id": "viewer/graph.ts#GraphView.buildElements",- "name": "buildElements",- "kind": "method",- "path": "viewer/graph.ts",- "span": "L138-L164",- "signature": "private buildElements(): void",- "exported": true,+ "id": "test/ask.test.ts#qualifiedFixture",+ "name": "qualifiedFixture",+ "kind": "function",+ "path": "test/ask.test.ts",+ "span": "L189-L207",+ "signature": "function qualifiedFixture(): string",+ "exported": false,"origin": "ast",- "body_hash": "a608a77fab16447bd9ef9c465a192abc0cb7167807f7c1718d961d730d7f055d",- "summary_state": "ready",- "summary": "Constructs the SVG elements for nodes and edges based on the current dataset.",- "crux": {- "code": " private buildElements(): void {\n this.ensureMarkers();\n this.viewport.textContent = \"\";\n this.edgeEls = this.edges.map((edge) => {\n const path = el(\"path\", { fill: \"none\", \"stroke-linecap\": \"round\" });\n const title = el(\"title\", {});\n title.textContent = edge.relation.replace(/_/g, \" \") + (edge.description ? ` — ${edge.description}` : \"\");\n path.appendChild(title);\n const label = el(\"text\", { \"text-anchor\": \"middle\", \"font-size\": 9.5, \"font-weight\": 700, \"stroke-width\": 3, \"paint-order\": \"stroke\", display: \"none\" });\n label.textContent = edge.relation.replace(/_/g, \" \");\n this.viewport.appendChild(path);\n this.viewport.appendChild(label);",- "span": "L138-L149"- }+ "body_hash": "9d1086ae8f0a6226d68cdbf7006c21e891972897ebe7510d188f913958306ca2",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/graph.ts#GraphView.constructor",- "name": "constructor",- "kind": "method",- "path": "viewer/graph.ts",- "span": "L65-L69",- "signature": "constructor(svg: SVGSVGElement)",- "exported": true,+ "id": "test/ask.test.ts#stampCrux",+ "name": "stampCrux",+ "kind": "function",+ "path": "test/ask.test.ts",+ "span": "L43-L49",+ "signature": "function stampCrux(dir: string, code: string): void",+ "exported": false,"origin": "ast",- "body_hash": "27abb788d7de0ece37719a0a23d4fed7778c02dda10700bbfb4f110ea8c16984",- "summary_state": "ready",- "summary": "Initializes the GraphView instance and sets up the SVG environment for rendering.",+ "body_hash": "88e65ff2cd0c7e96135c81d1072a15b210a7b2ddad022394ea8f59f6842dcbf4",+ "summary_state": "pending",+ "summary": null,"crux": null},{- "id": "viewer/graph.ts#GraphView.ensureMarkers",- "name": "ensureMarkers",- "kind": "method",- "path": "viewer/graph.ts",- "span": "L80-L91",- "signature": "private ensureMarkers(): void",+ "id": "test/claude-format.test.ts",+ "name": "claude-format.test.ts",+ "kind": "file",+ "path": "test/claude-format.test.ts",+ "span": "L1-L155",+ "signature": null,"exported": true,"origin": "ast",- "body_hash": "9517cfdb2ccb4ce235405356f6ff9b2fb3fcd2f7d687689bde33cf5df9bd6906",- "summary_state": "ready",- "summary": "Ensures that the necessary SVG markers for edges are created and available for rendering.",- "crux": {- "code": " this.defs.textContent = \"\";\n const chevron = el(\"marker\", { id: \"arr\", viewBox: \"0 0 10 10\", refX: 8, refY: 5, markerWidth: 4.5, markerHeight: 4.5, orient: \"auto-start-reverse\" });\n chevron.appendChild(el(\"path\", { d: \"M2,1.5L8.5,5L2,8.5\", fill: \"none\", stroke: cvar(\"--edge\"), \"stroke-width\": 1.8, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\", opacity: 0.75 }));\n const hollow = el(\"marker\", { id: \"arrH\", viewBox: \"0 0 12 12\", refX: 10, refY: 6, markerWidth: 6.5, markerHeight: 6.5, orient: \"auto-start-reverse\" });\n hollow.appendChild(el(\"path\", { d: \"M1.5,1.5L10.5,6L1.5,10.5z\", fill: cvar(\"--canvas\"), stroke: cvar(\"--edge\"), \"stroke-width\": 1.4 }));\n const out = el(\"marker\", { id: \"arrOut\", viewBox: \"0 0 10 10\", refX: 8, refY: 5, markerWidth: 5, markerHeight: 5, orient: \"auto-start-reverse\" });\n out.appendChild(el(\"path\", { d: \"M1,1L9,5L1,9z\", fill: cvar(\"--fil\") }));\n const inn = el(\"marker\", { id: \"arrIn\", viewBox: \"0 0 10 10\", refX: 8, refY: 5, markerWidth: 5, markerHeight: 5, orient: \"auto-start-reverse\" });\n inn.appendChild(el(\"path\", { d: \"M1,1L9,5L1,9z\", fill: cvar(\"--accent\") }));\n for (const m of [chevron, hollow, out, inn]) this.defs.appendChild(m);",- "span": "L81-L90"- }+ "body_hash": "cfaa9f489dd95956e3c9917ebe29a46992dfdbab943b5971eecbd98f18b3268c",+ "chars": 7267,+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/graph.ts#GraphView.firstMatch",- "name": "firstMatch",- "kind": "method",- "path": "viewer/graph.ts",- "span": "L263-L266",- "signature": "firstMatch(): SimNode | undefined",- "exported": true,+ "id": "test/claude-format.test.ts#freshSession",+ "name": "freshSession",+ "kind": "function",+ "path": "test/claude-format.test.ts",+ "span": "L105-L105",+ "signature": "freshSession = ()",+ "exported": false,"origin": "ast",- "body_hash": "d43343323ad49732d473f46773ac41a0ee7472f6289d324eb369d739e8cb0352",- "summary_state": "ready",- "summary": "Finds the first node that matches the current query, facilitating search functionality.",- "crux": {- "code": " firstMatch(): SimNode | undefined {\n const q = this.query.toLowerCase();\n return this.nodes.find((n) => !this.hiddenTypes[n.type] && n.name.toLowerCase().includes(q));\n }",- "span": "L263-L266"- }+ "body_hash": "61509362f702d01df4dfd7777521ae04e30c0dbc1656070024e4712c763314ee",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/graph.ts#GraphView.focus",- "name": "focus",- "kind": "method",- "path": "viewer/graph.ts",- "span": "L252-L261",- "signature": "focus(id: string): void",- "exported": true,+ "id": "test/claude-format.test.ts#gateAsk",+ "name": "gateAsk",+ "kind": "function",+ "path": "test/claude-format.test.ts",+ "span": "L97-L104",+ "signature": "gateAsk = (over: Record<string, unknown> = {})",+ "exported": false,"origin": "ast",- "body_hash": "a64691876d1786ccdb2027028d00210b8cb56557c65c1afa81a886b506d7b459",- "summary_state": "ready",- "summary": "Centers the view on a specified node, enhancing its visibility and selection.",- "crux": {- "code": " focus(id: string): void {\n const node = this.nodes.find((n) => n.id === id);\n if (!node) return;\n const W = this.svg.clientWidth, H = this.svg.clientHeight;\n this.view.k = Math.max(this.view.k, 1.4);\n this.view.x = W / 2 - (node.x ?? 0) * this.view.k;\n this.view.y = H / 2 - (node.y ?? 0) * this.view.k;\n this.applyView();\n this.select(id);\n }",- "span": "L252-L261"- }+ "body_hash": "34d03c21985709ffe94de675b861d213c0d38d4794d221e1dd41f634f1837117",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/graph.ts#GraphView.reheat",- "name": "reheat",- "kind": "method",- "path": "viewer/graph.ts",- "span": "L286-L288",- "signature": "reheat(): void",- "exported": true,+ "id": "test/claude-format.test.ts#strip",+ "name": "strip",+ "kind": "function",+ "path": "test/claude-format.test.ts",+ "span": "L6-L6",+ "signature": "strip = (s: string)",+ "exported": false,"origin": "ast",- "body_hash": "ca57d7cb11e71985bcd27b937b4f6d0a62428a0ae84f5a297cb1147861032a59",- "summary_state": "ready",- "summary": "Restarts the simulation with increased alpha, making the graph more dynamic.",- "crux": {- "code": " reheat(): void {\n this.sim?.alpha(0.6).restart();\n }",- "span": "L286-L288"- }+ "body_hash": "6381d72b2af2fa01d40d5fa8e463da782c5fe5655ad06caec8a3184ee6546edc",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/graph.ts#GraphView.resetView",- "name": "resetView",- "kind": "method",- "path": "viewer/graph.ts",- "span": "L281-L284",- "signature": "resetView(): void",+ "id": "test/claude-hooks.test.ts",+ "name": "claude-hooks.test.ts",+ "kind": "file",+ "path": "test/claude-hooks.test.ts",+ "span": "L1-L140",+ "signature": null,"exported": true,"origin": "ast",- "body_hash": "ae1f1ee82c804ff145b1f4aa9de70cad49a5287735aa9825f6accbe21591794c",- "summary_state": "ready",- "summary": "Resets the graph view to its initial state, centering and scaling the view.",- "crux": {- "code": " resetView(): void {\n this.view = { x: 0, y: 0, k: 1 };\n this.applyView();\n }",- "span": "L281-L284"- }+ "body_hash": "875c10776da455499b58ebe861b3cb0ae797f751e4e838812cd0b4f3c13587c2",+ "chars": 6930,+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/graph.ts#GraphView.restyle",- "name": "restyle",- "kind": "method",- "path": "viewer/graph.ts",- "span": "L185-L243",- "signature": "restyle(): void",- "exported": true,+ "id": "test/claude-hooks.test.ts#fakeBuild",+ "name": "fakeBuild",+ "kind": "function",+ "path": "test/claude-hooks.test.ts",+ "span": "L84-L87",+ "signature": "fakeBuild = (dir: string)",+ "exported": false,"origin": "ast",- "body_hash": "a928dd40f55ad9a091ba969afdf370f2a265bf30fb94efdc6879fcc0fb01edda",- "summary_state": "ready",- "summary": "Applies styles to nodes and edges based on their visibility and selection state.",- "crux": {- "code": " restyle(): void {\n this.ensureMarkers();\n const neighbors = new Set<string>();\n if (this.selected) {\n for (const e of this.edges) {\n if (e.source.id === this.selected) neighbors.add(e.target.id);\n if (e.target.id === this.selected) neighbors.add(e.source.id);\n }\n }\n const q = this.query.toLowerCase();\n const nodeShown = (n: SimNode) => !this.hiddenTypes[n.type];\n",- "span": "L185-L196"- }+ "body_hash": "0eb606c28f6d7ec57d7fe9a9824b87942c0682ddb75d37fd911508366e5ac9e5",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/graph.ts#GraphView.restyle.nodeShown",- "name": "nodeShown",+ "id": "test/claude-hooks.test.ts#runWithStdin",+ "name": "runWithStdin","kind": "function",- "path": "viewer/graph.ts",- "span": "L195-L195",- "signature": "nodeShown = (n: SimNode)",- "exported": true,+ "path": "test/claude-hooks.test.ts",+ "span": "L38-L41",+ "signature": "async function runWithStdin(text: string, fn: () => Promise<void>): Promise<void>",+ "exported": false,"origin": "ast",- "body_hash": "a598aac16da1955aecc62f39590f30d0c7e780d99429b1657c1bbba7d157ddea",- "summary_state": "ready",- "summary": "Determines if a node should be displayed based on its type and visibility settings.",+ "body_hash": "6bf4b171a46fcfcceccaedd45a273ed78fac5a1b4ae47bbd881df4e54c33b912",+ "summary_state": "pending",+ "summary": null,"crux": null},{- "id": "viewer/graph.ts#GraphView.select",- "name": "select",- "kind": "method",- "path": "viewer/graph.ts",- "span": "L245-L249",- "signature": "select(id: string | null): void",+ "id": "test/claude-init.test.ts",+ "name": "claude-init.test.ts",+ "kind": "file",+ "path": "test/claude-init.test.ts",+ "span": "L1-L137",+ "signature": null,"exported": true,"origin": "ast",- "body_hash": "7ba52874ad2ddda2bc80c3442e011c9d2b464fb8851a3ba527d3dba8ac6061c2",- "summary_state": "ready",- "summary": "Selects a node in the graph and updates the visual representation accordingly.",- "crux": {- "code": " select(id: string | null): void {\n this.selected = id;\n this.restyle();\n this.onSelect(id);\n }",- "span": "L245-L249"- }+ "body_hash": "b582cd79b2a1e4952ff83ac1b2e85f742756443c2896e08d96a75dc76e2971a5",+ "chars": 6213,+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/graph.ts#GraphView.setData",- "name": "setData",- "kind": "method",- "path": "viewer/graph.ts",- "span": "L94-L136",- "signature": "setData(graph: VizGraph, tab: \"context\" | \"code\"): void",- "exported": true,+ "id": "test/claude-init.test.ts#col",+ "name": "col",+ "kind": "function",+ "path": "test/claude-init.test.ts",+ "span": "L116-L116",+ "signature": "col = (text: string, marker: string)",+ "exported": false,"origin": "ast",- "body_hash": "d8063d2226148959298ca10074e09f00b7530c0b6a87f023502c4bd1c02041a6",- "summary_state": "ready",- "summary": "Loads a new dataset into the graph, updating node positions and relationships accordingly.",- "crux": {- "code": " setData(graph: VizGraph, tab: \"context\" | \"code\"): void {\n this.tab = tab;\n const prev = new Map(this.nodes.map((n) => [n.id, n]));\n const deg: Record<string, number> = {};\n for (const e of graph.edges) {\n deg[e.source] = (deg[e.source] ?? 0) + 1;\n deg[e.target] = (deg[e.target] ?? 0) + 1;\n }\n const W = this.svg.clientWidth || 800;\n const H = this.svg.clientHeight || 600;\n this.nodes = graph.nodes.map((n, i) => {\n const p = prev.get(n.id);",- "span": "L94-L105"- }+ "body_hash": "0b37f9523b6cb61e19981676c6eea4c39d624029fbc06e88392bb90dec866d68",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/graph.ts#GraphView.tick",- "name": "tick",- "kind": "method",- "path": "viewer/graph.ts",- "span": "L166-L182",- "signature": "private tick(): void",- "exported": true,+ "id": "test/claude-init.test.ts#fresh",+ "name": "fresh",+ "kind": "function",+ "path": "test/claude-init.test.ts",+ "span": "L10-L10",+ "signature": "function fresh(): string",+ "exported": false,"origin": "ast",- "body_hash": "0fbefdd43e29e9d5134e756074fe1fa190fa23cf6afaa72a52d27f098ac8e6bb",- "summary_state": "ready",- "summary": "Updates the positions of nodes and edges on each simulation tick, ensuring the graph remains interactive.",- "crux": {- "code": " private tick(): void {\n for (const { path, label, edge } of this.edgeEls) {\n const a = edge.source, b = edge.target;\n const dx = (b.x ?? 0) - (a.x ?? 0), dy = (b.y ?? 0) - (a.y ?? 0);\n const d = Math.sqrt(dx * dx + dy * dy) || 1;\n const ux = dx / d, uy = dy / d;\n const sx = (a.x ?? 0) + ux * (a.r + 2), sy = (a.y ?? 0) + uy * (a.r + 2);\n const tx = (b.x ?? 0) - ux * (b.r + 6), ty = (b.y ?? 0) - uy * (b.r + 6);\n const mx = (sx + tx) / 2 - uy * 10, my = (sy + ty) / 2 + ux * 10;\n path.setAttribute(\"d\", `M${sx},${sy} Q${mx},${my} ${tx},${ty}`);\n label.setAttribute(\"x\", String((sx + tx) / 2 - uy * 14));\n label.setAttribute(\"y\", String((sy + ty) / 2 + ux * 14));",- "span": "L166-L177"- }+ "body_hash": "e730884fcd6a9cadcca1e8a2f33564442c1ea4a2d1589c56af4b51b6de23d940",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/graph.ts#GraphView.zoomBy",- "name": "zoomBy",- "kind": "method",- "path": "viewer/graph.ts",- "span": "L272-L279",- "signature": "zoomBy(factor: number): void",- "exported": true,+ "id": "test/claude-init.test.ts#runPostinstall",+ "name": "runPostinstall",+ "kind": "function",+ "path": "test/claude-init.test.ts",+ "span": "L12-L17",+ "signature": "function runPostinstall(env: Record<string, string>): string",+ "exported": false,"origin": "ast",- "body_hash": "2dd28ba55cc461ab1f950d582e10b63c6862804f17d518ef346fe4e3f49af289",- "summary_state": "ready",- "summary": "Adjusts the zoom level of the graph view based on user input, allowing for detailed exploration.",- "crux": {- "code": " zoomBy(factor: number): void {\n const W = this.svg.clientWidth / 2, H = this.svg.clientHeight / 2;\n const k = Math.max(0.35, Math.min(3, this.view.k * factor));\n this.view.x = W - (W - this.view.x) * (k / this.view.k);\n this.view.y = H - (H - this.view.y) * (k / this.view.k);\n this.view.k = k;\n this.applyView();\n }",- "span": "L272-L279"- }+ "body_hash": "a9ee9b51b2acd9ee930e28e5c0968dc94c648d848eac513230143d3acadae7e7",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/graph.ts#SimEdge",- "name": "SimEdge",- "kind": "interface",- "path": "viewer/graph.ts",- "span": "L32-L38",- "signature": "interface SimEdge",- "exported": false,+ "id": "test/claude-paths.test.ts",+ "name": "claude-paths.test.ts",+ "kind": "file",+ "path": "test/claude-paths.test.ts",+ "span": "L1-L24",+ "signature": null,+ "exported": true,"origin": "ast",- "body_hash": "06690141adf5c47ffc6dd6b55a3cf9f041a4750f0b512cf49d3596928485fca8",- "summary_state": "ready",- "summary": "Defines the structure of an edge in the simulation, representing the relationship between two nodes.",+ "body_hash": "205740f8110e72e4cb24652c09f763fad5e056dc77776bcfa95a1953731ed2c8",+ "chars": 1063,+ "summary_state": "pending",+ "summary": null,"crux": null},{- "id": "viewer/graph.ts#SimNode",- "name": "SimNode",- "kind": "interface",- "path": "viewer/graph.ts",- "span": "L22-L30",- "signature": "interface SimNode extends SimulationNodeDatum",- "exported": false,+ "id": "test/claude-settings-merge.test.ts",+ "name": "claude-settings-merge.test.ts",+ "kind": "file",+ "path": "test/claude-settings-merge.test.ts",+ "span": "L1-L84",+ "signature": null,+ "exported": true,"origin": "ast",- "body_hash": "b000c5412e66a114ce7349ebddb8f536c040a6c6f158c641a8370ea049b6a69d",- "summary_state": "ready",- "summary": "Defines the structure of a node in the simulation, including its position and properties.",+ "body_hash": "4c8b800f02d1b72050082bdbcdcda0878e5d9760563d2e1ca4a31cb06ffaaabb",+ "chars": 4109,+ "summary_state": "pending",+ "summary": null,"crux": null},{- "id": "viewer/main.ts",- "name": "main.ts",+ "id": "test/claude-shim-template.test.ts",+ "name": "claude-shim-template.test.ts","kind": "file",- "path": "viewer/main.ts",- "span": "L1-L233",+ "path": "test/claude-shim-template.test.ts",+ "span": "L1-L34","signature": null,"exported": true,"origin": "ast",- "body_hash": "ab45ce4dfe66aafbe779b71d49d6370b3fe64482307b994e857ce34d3f317325",- "chars": 8654,- "summary_state": "ready",- "summary": "This file serves as the entry point for the graft visualization viewer, managing the user interface and interactions for displaying graphs.",- "crux": {- "code": "const view = new GraphView($(\"graphSvg\") as unknown as SVGSVGElement);",- "span": "L21-L21"- }+ "body_hash": "f787f99fef2dc6a5ed366419fc470e8e4f825e0bc590cf3550d39e01995e7619",+ "chars": 1585,+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/main.ts#$",- "name": "$",- "kind": "function",- "path": "viewer/main.ts",- "span": "L12-L12",- "signature": "$ = <T extends HTMLElement>(id: string): T",- "exported": false,+ "id": "test/claude-skill-template.test.ts",+ "name": "claude-skill-template.test.ts",+ "kind": "file",+ "path": "test/claude-skill-template.test.ts",+ "span": "L1-L19",+ "signature": null,+ "exported": true,"origin": "ast",- "body_hash": "e46dd7aa9ed3186876ec11a8520b5af609af327108e045bce175d535aa9ed0e5",- "summary_state": "ready",- "summary": "Provides a type-safe way to retrieve HTML elements by their ID, enhancing code readability and reducing errors.",+ "body_hash": "89f6cacf4ddee378df2d460dcf8e0ab0f4c6e76517966e934c6b5930ab05f6b8",+ "chars": 1015,+ "summary_state": "pending",+ "summary": null,"crux": null},{- "id": "viewer/main.ts#activeGraph",- "name": "activeGraph",- "kind": "function",- "path": "viewer/main.ts",- "span": "L23-L25",- "signature": "function activeGraph(): VizGraph | null",- "exported": false,+ "id": "test/claude-state.test.ts",+ "name": "claude-state.test.ts",+ "kind": "file",+ "path": "test/claude-state.test.ts",+ "span": "L1-L51",+ "signature": null,+ "exported": true,"origin": "ast",- "body_hash": "71591b2a66c0aa4d34f5b96cb2f1293248bdf02f55f6a73c2ee48258f6e2c445",- "summary_state": "ready",- "summary": "Determines which graph is currently active based on the selected tab, facilitating the correct data display.",- "crux": {- "code": " return state.tab === \"context\" ? state.context : state.code;",- "span": "L24-L24"- }+ "body_hash": "78e6a81af7642ea788072457ea181bc626c7a8a898cfebb882ab42fed7e9dd2e",+ "chars": 1991,+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/main.ts#glyphFor",- "name": "glyphFor",+ "id": "test/claude-state.test.ts#fresh",+ "name": "fresh","kind": "function",- "path": "viewer/main.ts",- "span": "L62-L71",- "signature": "function glyphFor(key: string): string",+ "path": "test/claude-state.test.ts",+ "span": "L11-L11",+ "signature": "function fresh(): string","exported": false,"origin": "ast",- "body_hash": "bd36f5f7c09e4d09ac342de7015c4cbda2ec86e36ab0c22716dd37b006444581",- "summary_state": "ready",- "summary": "Maps edge types to their corresponding visual glyphs, enhancing the graphical representation of relationships.",- "crux": {- "code": " const fam = key === \"part of\" ? \"structure\" : key === \"uses\" ? \"dependency\" : famOf(key.replace(/ /g, \"_\"));\n const glyphs: Record<string, string> = {\n structure: '<svg width=\"20\" height=\"8\" aria-hidden=\"true\"><line x1=\"1\" y1=\"4\" x2=\"19\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"3\" opacity=\".5\"/></svg>',\n dependency: '<svg width=\"20\" height=\"8\" aria-hidden=\"true\"><line x1=\"1\" y1=\"4\" x2=\"14\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.6\"/><path d=\"M14,1 L19,4 L14,7 z\" fill=\"currentColor\"/></svg>',\n contract: '<svg width=\"20\" height=\"8\" aria-hidden=\"true\"><line x1=\"1\" y1=\"4\" x2=\"13\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\"/><path d=\"M13,1 L19,4 L13,7 z\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\"/></svg>',\n association: '<svg width=\"20\" height=\"8\" aria-hidden=\"true\"><line x1=\"1\" y1=\"4\" x2=\"19\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-dasharray=\"2 4\" opacity=\".7\"/></svg>',\n };\n return glyphs[fam];",- "span": "L63-L70"- }+ "body_hash": "49e9f70f3b52532360521760ee5e0e5c907bdf3f55d1ed2c90bb3c3e48d93cda",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/main.ts#graphTab",- "name": "graphTab",- "kind": "function",- "path": "viewer/main.ts",- "span": "L27-L29",- "signature": "function graphTab(): \"context\" | \"code\"",- "exported": false,+ "id": "test/claude-stats.test.ts",+ "name": "claude-stats.test.ts",+ "kind": "file",+ "path": "test/claude-stats.test.ts",+ "span": "L1-L30",+ "signature": null,+ "exported": true,"origin": "ast",- "body_hash": "8bf89d024fe38470c469c719795eaf902c0e903157cf7ed24fe58a85db40cea4",- "summary_state": "ready",- "summary": "Identifies the current graph tab, ensuring the correct context is used for rendering and interactions.",- "crux": {- "code": " return state.tab === \"code\" || state.tab === \"outline\" ? \"code\" : \"context\";",- "span": "L28-L28"- }+ "body_hash": "f625d026d152a65017699e37e27534043dc0af0f43ba2d3ea778bac8ddab82c3",+ "chars": 983,+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/main.ts#loadAll",- "name": "loadAll",+ "id": "test/claude-statusline.test.ts",+ "name": "claude-statusline.test.ts",+ "kind": "file",+ "path": "test/claude-statusline.test.ts",+ "span": "L1-L48",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "07128b5b195af3a37c1e170a35c18378e36160d1a6f8e17be362bac315811cac",+ "chars": 2137,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/claude-statusline.test.ts#repo",+ "name": "repo","kind": "function",- "path": "viewer/main.ts",- "span": "L216-L223",- "signature": "async function loadAll(): Promise<void>",+ "path": "test/claude-statusline.test.ts",+ "span": "L9-L9",+ "signature": "function repo(): string","exported": false,"origin": "ast",- "body_hash": "c896b70116fce23a9b9846a95ed257835d18d1368d091a56cec01674e36bc480",- "summary_state": "ready",- "summary": "Loads the context and code graphs asynchronously, ensuring the viewer is populated with the latest data.",- "crux": {- "code": " state.context = context;\n state.code = code;\n $(\"repoName\").textContent = context.meta.repoName ?? \"\";\n document.title = `graft viz — ${context.meta.repoName ?? \"\"}`;\n setTab(state.tab);",- "span": "L218-L222"- }+ "body_hash": "121eb027efad697b8021b3a994a7f977441a0a34c0e92fd9a1792851368850e5",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/main.ts#renderChips",- "name": "renderChips",+ "id": "test/claude-statusline.test.ts#writeWiring",+ "name": "writeWiring","kind": "function",- "path": "viewer/main.ts",- "span": "L32-L60",- "signature": "function renderChips(): void",+ "path": "test/claude-statusline.test.ts",+ "span": "L10-L13",+ "signature": "function writeWiring(dir: string, obj: unknown): void","exported": false,"origin": "ast",- "body_hash": "1ef41cd967e509d6342b72755564e0975cb6b87edfcc2911fe79404f906eddcb",- "summary_state": "ready",- "summary": "Generates and displays interactive chips for graph edges, allowing users to filter and manage edge visibility.",+ "body_hash": "2e1f37e4395b142a5e04d343c3d72366ed3c3245acc13afc8eef46df21b1df21",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/cli-meta.test.ts",+ "name": "cli-meta.test.ts",+ "kind": "file",+ "path": "test/cli-meta.test.ts",+ "span": "L1-L81",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "e7a05bf838e876a317276f94a26d92b0b1526e1ea7eabda4e68b804bdb0334e5",+ "chars": 3338,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/context.test.ts",+ "name": "context.test.ts",+ "kind": "file",+ "path": "test/context.test.ts",+ "span": "L1-L213",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "126861c136d48ed6a148e50226c96ec2935c52cf83ef56fbd43392e0d271db1f",+ "chars": 7976,+ "summary_state": "stale",+ "summary": "This file contains end-to-end tests for the markdown-graph pipeline to ensure proper functionality and integrity of the context building and checking processes.","crux": {- "code": " const graph = activeGraph();\n if (!graph) return;\n const counts = new Map<string, number>();\n for (const e of graph.edges) {\n const key = chipKey(e.relation);\n counts.set(key, (counts.get(key) ?? 0) + 1);\n }\n const keys = [...counts.keys()].sort((a, b) => {\n const rank = (k: string) => (k === \"part of\" ? 0 : k === \"uses\" ? 1 : 2);\n return rank(a) - rank(b) || a.localeCompare(b);\n });\n for (const key of keys) {",- "span": "L35-L46"+ "code": "test(\"init builds one markdown node per entity, with links and a manifest\", async () => {\n const dir = makeFixture();\n try {\n const r = await buildContext(dir, buildOpts());\n // Auth Service, Token Store, Billing.\n assert.equal(r.nodes, 3);\n assert.equal(r.links, 2);\n assert.equal(r.files, 2);\n\n const ctx = join(dir, \"graft\");\n assert.ok(existsSync(join(ctx, \"auth-service.md\")));\n assert.ok(existsSync(join(ctx, \"token-store.md\")));",+ "span": "L31-L42"}},{- "id": "viewer/main.ts#renderChips.rank",- "name": "rank",+ "id": "test/context.test.ts#buildOpts",+ "name": "buildOpts","kind": "function",- "path": "viewer/main.ts",- "span": "L43-L43",- "signature": "rank = (k: string)",+ "path": "test/context.test.ts",+ "span": "L45-L47",+ "signature": "function buildOpts()","exported": false,"origin": "ast",- "body_hash": "2b14b986fe4648076445602ac03c0f7c788760e8910fa9322617251aa60af5ce",+ "body_hash": "20ec093d8fa9dadc46af8980d9440b6824597f4cdeb74529d4d62ee38d27e52d","summary_state": "ready",- "summary": "Establishes a ranking system for edge types to ensure they are displayed in a meaningful order.",- "crux": {- "code": " const rank = (k: string) => (k === \"part of\" ? 0 : k === \"uses\" ? 1 : 2);",- "span": "L43-L43"- }+ "summary": "This function generates options for building the context, including a fake model and providers.",+ "crux": null},{- "id": "viewer/main.ts#renderLegend",- "name": "renderLegend",+ "id": "test/context.test.ts#makeFixture",+ "name": "makeFixture","kind": "function",- "path": "viewer/main.ts",- "span": "L74-L94",- "signature": "function renderLegend(): void",+ "path": "test/context.test.ts",+ "span": "L32-L43",+ "signature": "function makeFixture(): string","exported": false,"origin": "ast",- "body_hash": "ec1a1aba1d086d035890c60aadf98d7418c018c5488f106100102deaf0eafc01",+ "body_hash": "515198ac732683d4da4b920e53a0eb439ea8e0107afb22af65cc29c0e702192c","summary_state": "ready",- "summary": "Creates a legend for node types in the graph, providing users with context about the displayed data.",+ "summary": "This function creates a temporary directory with mock service files for testing the context building process.","crux": {- "code": " const graph = activeGraph();\n if (!graph) return;\n const counts = new Map<string, number>();\n for (const n of graph.nodes) counts.set(n.type, (counts.get(n.type) ?? 0) + 1);\n for (const [type, count] of counts) {\n const chip = document.createElement(\"button\");\n chip.type = \"button\";\n chip.className = \"lchip\" + (view.hiddenTypes[type] ? \" off\" : \"\");\n chip.innerHTML = `<span class=\"sw\" style=\"background:${cvar(colorToken(graphTab(), type))}\"></span>${type} <span style=\"color:var(--muted);font-weight:500\">${count}</span>`;\n chip.addEventListener(\"click\", () => {\n view.hiddenTypes[type] = !view.hiddenTypes[type];\n renderLegend();",- "span": "L77-L88"+ "code": " const dir = mkdtempSync(join(tmpdir(), \"ctxgraph-\"));\n writeFileSync(\n join(dir, \"auth.ts\"),\n `// [[Auth Service]] ==depends_on==> [[Token Store]]\\nexport const auth = 1;\\n`,\n );\n writeFileSync(\n join(dir, \"billing.ts\"),\n `// [[Billing]] ==uses==> [[Auth Service]]\\nexport const billing = 2;\\n`,\n );\n return dir;",+ "span": "L15-L24"}},{- "id": "viewer/main.ts#setTab",- "name": "setTab",+ "id": "test/context.test.ts#runCli",+ "name": "runCli","kind": "function",- "path": "viewer/main.ts",- "span": "L129-L167",- "signature": "function setTab(tab: Tab): void",+ "path": "test/context.test.ts",+ "span": "L19-L30",+ "signature": "function runCli(args: string[]): { stdout: string; stderr: string; status: number }","exported": false,"origin": "ast",- "body_hash": "c269ec25c7011b7343bdcec22729b23b0c65a57255598ac5145a46397809b321",+ "body_hash": "f6727f675d8cb599692eabff8675faa168c515b6cfe5d91fbc1092f31371e31f",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/covers.test.ts",+ "name": "covers.test.ts",+ "kind": "file",+ "path": "test/covers.test.ts",+ "span": "L1-L77",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "f5a75f405be1a01ad43fc806588858df3a8988fee62ad4ec024440d3f5e0fc0c",+ "chars": 3059,"summary_state": "ready",- "summary": "Handles the logic for switching between different graph views, ensuring the UI reflects the current context accurately.",+ "summary": "This test suite verifies that the wiring build correctly populates the 'covers' field in concept nodes and maintains stability across builds.","crux": {- "code": " state.tab = tab;\n document.querySelectorAll<HTMLButtonElement>(\".tab\").forEach((b) => {\n b.setAttribute(\"aria-selected\", b.dataset.tab === tab ? \"true\" : \"false\");\n });\n const isOutline = tab === \"outline\";\n $(\"canvasWrap\").hidden = isOutline;\n $(\"outlineView\").hidden = !isOutline;\n view.hiddenRels = {};\n view.hiddenTypes = {};\n view.selected = null;\n showDetail(null);\n",- "span": "L130-L141"+ "code": "test(\"wiring build backfills covers: onto concept nodes\", async () => {\n const dir = makeFixture();\n try {\n await buildContext(dir, { model: \"fake\", ...fakeProviders() });\n await buildGraph(dir); // $0, no LLM — still writes cards + covers\n\n const fm = matter(readFileSync(join(dir, \"graft\", \"auth-service.md\"), \"utf8\")).data;\n assert.ok(Array.isArray(fm.covers), \"covers should be an array\");\n const login = fm.covers.find((c: { symbol: string }) => c.symbol === \"login\");\n assert.ok(login, \"covers should include the login function\");\n assert.equal(login.kind, \"function\");\n assert.match(login.at, /^auth\\.ts:L\\d+-L\\d+$/);",+ "span": "L26-L37"}},{- "id": "viewer/main.ts#showDetail",- "name": "showDetail",+ "id": "test/covers.test.ts#makeFixture",+ "name": "makeFixture","kind": "function",- "path": "viewer/main.ts",- "span": "L115-L124",- "signature": "function showDetail(id: string | null): void",+ "path": "test/covers.test.ts",+ "span": "L16-L24",+ "signature": "function makeFixture(): string","exported": false,"origin": "ast",- "body_hash": "e2b6f6a27ee1e3bac515ec8140678caa7c6cff3baab943cf43f8fdbdd7ab2e62",+ "body_hash": "c50f4905cfffe46da829a42a2bcab6838f96a17497009a9efe7a64a98729540f","summary_state": "ready",- "summary": "Displays detailed information about a selected graph element, enhancing user interaction and understanding.",+ "summary": "Creates a temporary directory with a sample TypeScript file for testing the wiring build.","crux": {- "code": " view.focus(next);\n }\n });",- "span": "L121-L123"+ "code": " const dir = mkdtempSync(join(tmpdir(), \"graft-covers-\"));\n writeFileSync(\n join(dir, \"auth.ts\"),\n `// [[Auth Service]] ==depends_on==> [[Token Store]]\\n` +\n `export function login(user: string): boolean {\\n return user.length > 0;\\n}\\n`,\n );\n return dir;",+ "span": "L17-L23"}},{- "id": "viewer/main.ts#showEmpty",- "name": "showEmpty",- "kind": "function",- "path": "viewer/main.ts",- "span": "L169-L173",- "signature": "function showEmpty(html: string): void",+ "id": "test/graph-go.test.ts",+ "name": "graph-go.test.ts",+ "kind": "file",+ "path": "test/graph-go.test.ts",+ "span": "L1-L168",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "bf11085a7edb03c00d52dca090af9c1ca4eb3cb34bb88904bbdd478171d3483d",+ "chars": 5664,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/graph-go.test.ts#makeFixture",+ "name": "makeFixture",+ "kind": "function",+ "path": "test/graph-go.test.ts",+ "span": "L53-L60",+ "signature": "function makeFixture(): string","exported": false,"origin": "ast",- "body_hash": "981ef1b3d68cfcc89b2804a326c87ce023df618bfee612f158fa72291fe7a6d1",- "summary_state": "ready",- "summary": "Displays a message when no graph data is available, guiding users on how to generate the necessary data.",- "crux": {- "code": " empty.innerHTML = html;\n empty.hidden = false;",- "span": "L171-L172"- }+ "body_hash": "76b9a9cf518c965694990ed9cbfa55da12a5eb1bdc5b662c6b0550fb038dbb04",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/main.ts#Tab",- "name": "Tab",- "kind": "type",- "path": "viewer/main.ts",- "span": "L10-L10",- "signature": "type Tab = \"context\" | \"code\" | \"outline\";",+ "id": "test/graph-go.test.ts#nodeById",+ "name": "nodeById",+ "kind": "function",+ "path": "test/graph-go.test.ts",+ "span": "L62-L64",+ "signature": "function nodeById(graph: GraphV1, id: string): NodeV1 | undefined","exported": false,"origin": "ast",- "body_hash": "4cd3b4afb6647f09ba09efccca7c53a333edbebe109fb1e24db04aa24df610de",- "summary_state": "ready",- "summary": "Defines the possible tab types for the viewer, ensuring that only valid tab selections are made.",+ "body_hash": "7d35f3037365876a2bedd0af5973ec5cc0b3871e3bce7f310993d907ae378c67",+ "summary_state": "pending",+ "summary": null,"crux": null},{- "id": "viewer/main.ts#updateCounts",- "name": "updateCounts",+ "id": "test/graph-load.test.ts",+ "name": "graph-load.test.ts",+ "kind": "file",+ "path": "test/graph-load.test.ts",+ "span": "L1-L153",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "8df11988d049b5243d8c7a0d55045163b714965897448797b40c8ef458b0896b",+ "chars": 5524,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/graph-load.test.ts#bump",+ "name": "bump","kind": "function",- "path": "viewer/main.ts",- "span": "L103-L112",- "signature": "function updateCounts(): void",+ "path": "test/graph-load.test.ts",+ "span": "L46-L50",+ "signature": "function bump(path: string): void","exported": false,"origin": "ast",- "body_hash": "170a2eec2d377c150839d170cd45a244584ecc9fdbd44ad194e8cac97fdfafb6",- "summary_state": "ready",- "summary": "Refreshes the displayed counts of nodes and edges based on the active graph, ensuring accurate information is presented.",- "crux": {- "code": " el.textContent = graph ? `${graph.meta.nodeCount} nodes · ${graph.meta.edgeCount} links` : \"\";",- "span": "L110-L110"- }+ "body_hash": "8779dc90b4ac3a22fe19faeeb81277a8a6b3cfa975a943ea81eaae7057c8ff91",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/main.ts#updateShownCount",- "name": "updateShownCount",+ "id": "test/graph-load.test.ts#fixtureDir",+ "name": "fixtureDir","kind": "function",- "path": "viewer/main.ts",- "span": "L96-L101",- "signature": "function updateShownCount(): void",+ "path": "test/graph-load.test.ts",+ "span": "L40-L42",+ "signature": "function fixtureDir(): string","exported": false,"origin": "ast",- "body_hash": "11ab0ffa5da9e8d010f80cb1f95962900b0649019b7876e2b5213b85605d75ee",- "summary_state": "ready",- "summary": "Updates the displayed count of visible nodes in the graph, helping users understand the current view's scope.",- "crux": {- "code": " const shown = graph.nodes.filter((n) => !view.hiddenTypes[n.type]).length;\n $(\"lcount\").textContent = `${shown} / ${graph.nodes.length} nodes shown`;",- "span": "L99-L100"- }+ "body_hash": "3f567c59fa24284eaa46cfde4904ae179e1dae786288df2256d80d65721c95c9",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/tree.ts",- "name": "tree.ts",+ "id": "test/graph-load.test.ts#node",+ "name": "node",+ "kind": "function",+ "path": "test/graph-load.test.ts",+ "span": "L23-L38",+ "signature": "function node(id: string): NodeV1",+ "exported": false,+ "origin": "ast",+ "body_hash": "50c83e997e60e662392960d89cc6c5b421a65cfd8c166084e4c5f3c8ea9a9bd6",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/graph-traverse-cli.test.ts",+ "name": "graph-traverse-cli.test.ts","kind": "file",- "path": "viewer/tree.ts",- "span": "L1-L67",+ "path": "test/graph-traverse-cli.test.ts",+ "span": "L1-L126","signature": null,"exported": true,"origin": "ast",- "body_hash": "d66e0157f4c2a1525c16505306eb3aabce82565c3d0e56199ea5b7a860290b01",- "chars": 2750,- "summary_state": "ready",- "summary": "Generates a collapsible tree view of a code graph's hierarchy, allowing users to navigate through files, classes, and methods.",- "crux": {- "code": " host.innerHTML =\n '<div class=\"tree-tools\"><button data-tool=\"expand\">Expand all</button><button data-tool=\"collapse\">Collapse all</button></div>' +\n files.map(row).join(\"\");",- "span": "L44-L46"- }+ "body_hash": "d79347b0640178631235552105c0518029305ead4990726470d3adf5a1b52f09",+ "chars": 5030,+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/tree.ts#esc",- "name": "esc",+ "id": "test/graph-traverse-cli.test.ts#builtRepo",+ "name": "builtRepo","kind": "function",- "path": "viewer/tree.ts",- "span": "L7-L9",- "signature": "function esc(s: string): string",+ "path": "test/graph-traverse-cli.test.ts",+ "span": "L16-L27",+ "signature": "function builtRepo(): string","exported": false,"origin": "ast",- "body_hash": "9fb927f7f1c881ee1fe325c0dc8a25b8c5cdb2c101b08ae935a35bb428f5bbdb",- "summary_state": "ready",- "summary": "Escapes special HTML characters in a string to prevent rendering issues in the tree view.",- "crux": {- "code": " return s.replace(/&/g, \"&\").replace(/</g, \"<\");\n}",- "span": "L8-L9"- }+ "body_hash": "8c3de9f35f0d7a39cf5bd38c0462e92cb65cb762d5285e6cd637ef423631ea43",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/tree.ts#renderOutline",- "name": "renderOutline",+ "id": "test/graph-traverse-cli.test.ts#runCli",+ "name": "runCli","kind": "function",- "path": "viewer/tree.ts",- "span": "L11-L66",- "signature": "function renderOutline( host: HTMLElement, graph: VizGraph, selected: string | null, openState: Record<string, boolean>, onSelect: (id: string) => void, ): void",+ "path": "test/graph-traverse-cli.test.ts",+ "span": "L29-L40",+ "signature": "function runCli(args: string[]): { stdout: string; stderr: string; status: number }",+ "exported": false,+ "origin": "ast",+ "body_hash": "3aae0bf33b1d771d8677050168cec54ed0b21cf245a4c04c715f6a520b61a7b0",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/graph-traverse.test.ts",+ "name": "graph-traverse.test.ts",+ "kind": "file",+ "path": "test/graph-traverse.test.ts",+ "span": "L1-L277",+ "signature": null,"exported": true,"origin": "ast",- "body_hash": "1448ed396d7ec6d8adc0e375aba7be5465c4e4db6d4184c6b5b01ac5a0788591",- "summary_state": "ready",- "summary": "Renders the outline view of the code graph, managing the display of files and their hierarchical relationships.",- "crux": {- "code": " const kids = (pid: string) =>\n graph.edges\n .filter((e) => e.relation === \"contains\" && e.source === pid)\n .map((e) => graph.nodes.find((n) => n.id === e.target))\n .filter((n): n is NonNullable<typeof n> => Boolean(n));",- "span": "L18-L22"- }+ "body_hash": "9683b55f739af4afbb3840cee333eed0b1869494b66fe9cddfae1153df246947",+ "chars": 10972,+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/tree.ts#renderOutline.countDesc",- "name": "countDesc",+ "id": "test/graph-traverse.test.ts#baseGraph",+ "name": "baseGraph","kind": "function",- "path": "viewer/tree.ts",- "span": "L23-L26",- "signature": "countDesc = (pid: string): number",- "exported": true,+ "path": "test/graph-traverse.test.ts",+ "span": "L57-L66",+ "signature": "function baseGraph(): GraphV1",+ "exported": false,"origin": "ast",- "body_hash": "1054af458d2de230dfb45cea7a5a0141f2f4d12521ee04f0919e7defdea719dd",- "summary_state": "ready",- "summary": "Counts the total number of descendant nodes for a given parent node, including its children and their descendants.",- "crux": {- "code": " return k.length + k.reduce((sum, c) => sum + countDesc(c.id), 0);\n };",- "span": "L25-L26"- }+ "body_hash": "6d809e9b571f2f9529bce4e42392b36e09b8bb9050633f2daaa90f202ff47bab",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/tree.ts#renderOutline.kids",- "name": "kids",+ "id": "test/graph-traverse.test.ts#diamondGraph",+ "name": "diamondGraph","kind": "function",- "path": "viewer/tree.ts",- "span": "L18-L22",- "signature": "kids = (pid: string)",- "exported": true,+ "path": "test/graph-traverse.test.ts",+ "span": "L167-L179",+ "signature": "function diamondGraph(): GraphV1",+ "exported": false,"origin": "ast",- "body_hash": "67a4d31f225a0006966aa2a39bdf245c514475f777082275626585879ce9b867",- "summary_state": "ready",- "summary": "Retrieves the child nodes of a given parent node in the graph based on the 'contains' relationship.",- "crux": {- "code": " .filter((e) => e.relation === \"contains\" && e.source === pid)\n .map((e) => graph.nodes.find((n) => n.id === e.target))",- "span": "L20-L21"- }+ "body_hash": "5f778e8292d09729865a06efd50026df15ba7da5a5fb6980e3dd814036db0aca",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "id": "viewer/tree.ts#renderOutline.row",- "name": "row",+ "id": "test/graph-traverse.test.ts#edge",+ "name": "edge","kind": "function",- "path": "viewer/tree.ts",- "span": "L29-L42",- "signature": "row = (node: (typeof files)[number]): string",+ "path": "test/graph-traverse.test.ts",+ "span": "L32-L34",+ "signature": "function edge(source: string, target: string, relation: Relation = \"calls\"): EdgeV1",+ "exported": false,+ "origin": "ast",+ "body_hash": "123ba52d4dfdf593b1dd056eb9c949165a0ba7fd06eaf374cf1bf1bd797baee8",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/graph-traverse.test.ts#fileAndSymbolGraph",+ "name": "fileAndSymbolGraph",+ "kind": "function",+ "path": "test/graph-traverse.test.ts",+ "span": "L221-L231",+ "signature": "function fileAndSymbolGraph()",+ "exported": false,+ "origin": "ast",+ "body_hash": "8d46dcd8a65e23d4490137683c72016c5380080da91bc2cdb643dec3df6a637b",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/graph-traverse.test.ts#graphOf",+ "name": "graphOf",+ "kind": "function",+ "path": "test/graph-traverse.test.ts",+ "span": "L36-L42",+ "signature": "function graphOf(nodes: NodeV1[], edges: EdgeV1[]): GraphV1",+ "exported": false,+ "origin": "ast",+ "body_hash": "3e1c1fd8cd1838095c47e9e0e80c0dac69a49091787a166d61858315c7ee4c63",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/graph-traverse.test.ts#nodeStub",+ "name": "nodeStub",+ "kind": "function",+ "path": "test/graph-traverse.test.ts",+ "span": "L15-L30",+ "signature": "function nodeStub(partial: Partial<NodeV1> & { id: string }): NodeV1",+ "exported": false,+ "origin": "ast",+ "body_hash": "7e4a8788936b6b4d198eb93113a428318b00f2276e01fd31d89f8c9cf3f81ccb",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/graph-write.test.ts",+ "name": "graph-write.test.ts",+ "kind": "file",+ "path": "test/graph-write.test.ts",+ "span": "L1-L128",+ "signature": null,"exported": true,"origin": "ast",- "body_hash": "a62af44af8ff57bd1307237e130956ce85cb42fc0c2fc4889907fd4e87e75ab2",- "summary_state": "ready",- "summary": "Constructs the HTML representation of a tree row for a given node, including its children and symbol count.",- "crux": {- "code": " const children = kids(node.id);\n const open = openState[node.id] !== false;\n let html = `<button class=\"tree-row${open ? \" open\" : \"\"}${selected === node.id ? \" sel\" : \"\"}\"` +\n ` data-id=\"${esc(node.id)}\" data-haskids=\"${children.length ? 1 : 0}\">` +\n `<span class=\"chev\">${children.length ? \"▶\" : \"\"}</span>` +\n `<span class=\"k\" style=\"background:${cvar(colorToken(\"code\", node.type))}\"></span>` +\n `<span class=\"t${node.type === \"file\" ? \" mono\" : \"\"}\">${esc(node.name)}</span>` +\n `<span class=\"badge\">${children.length ? countDesc(node.id) + \" sym\" : esc(node.type)}</span></button>`;\n if (children.length && open) {\n html += `<div class=\"tree-kids\">${children.map(row).join(\"\")}</div>`;\n }\n return html;",- "span": "L30-L41"- }- }- ],- "edges": [+ "body_hash": "cbbf9c3591519993ec89298444d34732f08eb16f90ba1c1cd33bd39d5512f9ff",+ "chars": 4839,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },{- "source": "bench/agent.ts",- "target": "bench/agent.ts#AgentResult",- "relation": "contains",- "confidence": "extracted"+ "id": "test/graph-write.test.ts#makeNode",+ "name": "makeNode",+ "kind": "function",+ "path": "test/graph-write.test.ts",+ "span": "L19-L35",+ "signature": "function makeNode(overrides: Partial<NodeV1> = {}): NodeV1",+ "exported": false,+ "origin": "ast",+ "body_hash": "41ebbf74745569c7f08bdc2d7a852617987e439975ac045b640252aa0684fc7e",+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "source": "bench/agent.ts",- "target": "bench/agent.ts#globToRegExp",- "relation": "contains",- "confidence": "extracted"+ "id": "test/graphrank.test.ts",+ "name": "graphrank.test.ts",+ "kind": "file",+ "path": "test/graphrank.test.ts",+ "span": "L1-L203",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "9b6450a705fd5bbe7ddead7ae29f87fcb839599d34b6bd0c8ebcb0091ee70c47",+ "chars": 8780,+ "summary_state": "pending",+ "summary": null,+ "crux": null},{- "source": "bench/agent.ts",- "target": "bench/agent.ts#listFiles",+ "id": "test/graphrank.test.ts#edge",+ "name": "edge",+ "kind": "function",+ "path": "test/graphrank.test.ts",+ "span": "L39-L41",+ "signature": "function edge(source: string, target: string, relation: Relation = \"calls\"): EdgeV1",+ "exported": false,+ "origin": "ast",+ "body_hash": "123ba52d4dfdf593b1dd056eb9c949165a0ba7fd06eaf374cf1bf1bd797baee8",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/graphrank.test.ts#graphOf",+ "name": "graphOf",+ "kind": "function",+ "path": "test/graphrank.test.ts",+ "span": "L42-L48",+ "signature": "function graphOf(nodes: string[], edges: EdgeV1[]): GraphV1",+ "exported": false,+ "origin": "ast",+ "body_hash": "bf3b5a40bcc1fa81ff40b720adeff034d332bbbb831f3e2f7528e2f667146ce1",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/graphrank.test.ts#makeCollisionFixture",+ "name": "makeCollisionFixture",+ "kind": "function",+ "path": "test/graphrank.test.ts",+ "span": "L128-L138",+ "signature": "function makeCollisionFixture(): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "2177edb69c1857665ec38d0fadebf5147cc7c3e71b39d026ee7f33e0c07865f8",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/graphrank.test.ts#node",+ "name": "node",+ "kind": "function",+ "path": "test/graphrank.test.ts",+ "span": "L23-L38",+ "signature": "function node(id: string): NodeV1",+ "exported": false,+ "origin": "ast",+ "body_hash": "50c83e997e60e662392960d89cc6c5b421a65cfd8c166084e4c5f3c8ea9a9bd6",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/graphrank.test.ts#rank",+ "name": "rank",+ "kind": "function",+ "path": "test/graphrank.test.ts",+ "span": "L140-L141",+ "signature": "rank = (dir: string, gr: boolean)",+ "exported": false,+ "origin": "ast",+ "body_hash": "5bf6fb6a4dc37b257683b4ab9b24ff4838cf94cd3404123bb383861163c4bbec",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/helpers.ts",+ "name": "helpers.ts",+ "kind": "file",+ "path": "test/helpers.ts",+ "span": "L1-L55",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "e45af1d38d7c6d4abc804fc74e9ae4c3373cf78769c17b16b185c3ee0e2c3228",+ "chars": 2012,+ "summary_state": "ready",+ "summary": "This file provides test doubles for offline, deterministic testing of components without external dependencies.",+ "crux": null+ },+ {+ "id": "test/helpers.ts#BracketSynthesizer",+ "name": "BracketSynthesizer",+ "kind": "class",+ "path": "test/helpers.ts",+ "span": "L21-L50",+ "signature": "class BracketSynthesizer implements Synthesizer",+ "exported": true,+ "origin": "ast",+ "body_hash": "6a30b1293990bb2dce95f1f1f77219dbcdc54eef7e6a01d0db03403f4d344bcc",+ "summary_state": "ready",+ "summary": "This class synthesizes a graph structure from simple markup, enabling tests to define the relationships between nodes explicitly.",+ "crux": {+ "code": " async synthesize(files: FileSummary[]): Promise<SynthNode[]> {\n const byName = new Map<string, { sources: Set<string>; links: Map<string, SynthLink> }>();\n const ensure = (name: string) => {\n let e = byName.get(name);\n if (!e) {\n e = { sources: new Set(), links: new Map() };\n byName.set(name, e);\n }\n return e;\n };\n for (const f of files) {\n for (const m of f.summary.matchAll(/\\[\\[([^\\]]+)\\]\\]/g)) {",+ "span": "L22-L33"+ }+ },+ {+ "id": "test/helpers.ts#BracketSynthesizer.synthesize",+ "name": "synthesize",+ "kind": "method",+ "path": "test/helpers.ts",+ "span": "L22-L49",+ "signature": "async synthesize(files: FileSummary[]): Promise<SynthNode[]>",+ "exported": true,+ "origin": "ast",+ "body_hash": "b42a19064389576a02ba334fcab8bfb5d8d985a46f995be864095e770d47e26d",+ "summary_state": "ready",+ "summary": "This method processes file summaries to create a structured representation of nodes and their relationships based on markup.",+ "crux": {+ "code": " for (const m of f.summary.matchAll(/\\[\\[([^\\]]+)\\]\\]\\s*==([a-z_]+)==>\\s*\\[\\[([^\\]]+)\\]\\]/g)) {\n const [, from, relation, to] = m;\n ensure(to.trim()).sources.add(f.path);\n ensure(from.trim()).links.set(`${to}|${relation}`, { to: to.trim(), relation });\n }",+ "span": "L36-L40"+ }+ },+ {+ "id": "test/helpers.ts#BracketSynthesizer.synthesize.ensure",+ "name": "ensure",+ "kind": "function",+ "path": "test/helpers.ts",+ "span": "L24-L31",+ "signature": "ensure = (name: string)",+ "exported": true,+ "origin": "ast",+ "body_hash": "3b8cc65a6170766e70a5b038f9f27176e60114ce70e0e2dc1463f720ed384c4c",+ "summary_state": "ready",+ "summary": "This function ensures that a node exists in the map, creating it if necessary, to maintain the graph structure.",+ "crux": {+ "code": " const ensure = (name: string) => {\n let e = byName.get(name);\n if (!e) {\n e = { sources: new Set(), links: new Map() };\n byName.set(name, e);\n }\n return e;\n };",+ "span": "L24-L31"+ }+ },+ {+ "id": "test/helpers.ts#fakeProviders",+ "name": "fakeProviders",+ "kind": "function",+ "path": "test/helpers.ts",+ "span": "L52-L54",+ "signature": "function fakeProviders()",+ "exported": true,+ "origin": "ast",+ "body_hash": "0395bc21ba030a5d0e1fc9e5fdd0d8780c4309c87d899bedbc940f1bdcd2864f",+ "summary_state": "ready",+ "summary": "This function creates and returns instances of the test doubles for summarization and synthesis.",+ "crux": null+ },+ {+ "id": "test/helpers.ts#PassthroughSummarizer",+ "name": "PassthroughSummarizer",+ "kind": "class",+ "path": "test/helpers.ts",+ "span": "L9-L13",+ "signature": "class PassthroughSummarizer implements Summarizer",+ "exported": true,+ "origin": "ast",+ "body_hash": "43c71f9e449859d657d6cef17b80d2bb650734751530e8401c356fc963f7b012",+ "summary_state": "ready",+ "summary": "This class serves as a no-op summarizer that returns the input code unchanged for controlled testing.",+ "crux": {+ "code": " async summarize(code: string): Promise<string> {\n return code;\n }",+ "span": "L10-L12"+ }+ },+ {+ "id": "test/helpers.ts#PassthroughSummarizer.summarize",+ "name": "summarize",+ "kind": "method",+ "path": "test/helpers.ts",+ "span": "L10-L12",+ "signature": "async summarize(code: string): Promise<string>",+ "exported": true,+ "origin": "ast",+ "body_hash": "8836e78c4875dee01aeae5cb976c217cd347554542e387996b7c190b1a73af18",+ "summary_state": "ready",+ "summary": "This method returns the input code as-is, allowing tests to control the output precisely.",+ "crux": {+ "code": " async summarize(code: string): Promise<string> {\n return code;\n }",+ "span": "L10-L12"+ }+ },+ {+ "id": "test/hosts-codex-hooks.test.ts",+ "name": "hosts-codex-hooks.test.ts",+ "kind": "file",+ "path": "test/hosts-codex-hooks.test.ts",+ "span": "L1-L80",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "ed49a8a106eeb458ad2dd071071cefae17dd4d0eabd1b74006047feadef9a89a",+ "chars": 3738,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/hosts-codex-hooks.test.ts#fresh",+ "name": "fresh",+ "kind": "function",+ "path": "test/hosts-codex-hooks.test.ts",+ "span": "L8-L8",+ "signature": "function fresh(): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "c75405ab5617c9e32684bf0530549edf2833d88ee5e6c955308b46c9f4e14c46",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/hosts-init.test.ts",+ "name": "hosts-init.test.ts",+ "kind": "file",+ "path": "test/hosts-init.test.ts",+ "span": "L1-L139",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "56f8988468cb716296b40c939bf58d079015d135fcb3f2c1481e64bce7f67324",+ "chars": 5922,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/hosts-init.test.ts#fresh",+ "name": "fresh",+ "kind": "function",+ "path": "test/hosts-init.test.ts",+ "span": "L9-L9",+ "signature": "function fresh(): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "9da796af39ee7c44e2c780ded8bc297fc37f854834c5ecdab7819298b3df9cce",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/hosts-instructions.test.ts",+ "name": "hosts-instructions.test.ts",+ "kind": "file",+ "path": "test/hosts-instructions.test.ts",+ "span": "L1-L32",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "5156da27988217e47f43ba4e856679ea6e99a268def6d6f13591b926506ca1fb",+ "chars": 1322,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/hosts-mcp-config.test.ts",+ "name": "hosts-mcp-config.test.ts",+ "kind": "file",+ "path": "test/hosts-mcp-config.test.ts",+ "span": "L1-L77",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "5b3ec5afd61079f051d8063f06701ddac608f48b706e72f9ee607e8da673fb06",+ "chars": 3982,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/hosts-mcp-config.test.ts#fresh",+ "name": "fresh",+ "kind": "function",+ "path": "test/hosts-mcp-config.test.ts",+ "span": "L8-L8",+ "signature": "function fresh(): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "5d57935fd93aed6bacff9481af82c74f353c4928d0c3cf15efbfa038c85dad5a",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/hosts-registry.test.ts",+ "name": "hosts-registry.test.ts",+ "kind": "file",+ "path": "test/hosts-registry.test.ts",+ "span": "L1-L45",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "6490cbdc54b870d670adf28b5b469e07360a474073b08d692601ef1c4b7ea47e",+ "chars": 1632,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/hosts-registry.test.ts#fresh",+ "name": "fresh",+ "kind": "function",+ "path": "test/hosts-registry.test.ts",+ "span": "L15-L15",+ "signature": "function fresh(): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "4b7e71149dfcf083709a98bd3f04eb92af9a722c7d567dcd4288be6119afc6ea",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/hosts-registry.test.ts#probeFor",+ "name": "probeFor",+ "kind": "function",+ "path": "test/hosts-registry.test.ts",+ "span": "L9-L14",+ "signature": "function probeFor(home: string, repo: string): DetectProbe",+ "exported": false,+ "origin": "ast",+ "body_hash": "7653739002fda057d1517f18bfe77dfb0dcf78ab6cb9716ceb7624601eec1f7f",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/hosts-sections.test.ts",+ "name": "hosts-sections.test.ts",+ "kind": "file",+ "path": "test/hosts-sections.test.ts",+ "span": "L1-L112",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "a780abe63074737d40bcd556df06b7b541d2694df75c307daabd280f64f9dba4",+ "chars": 4777,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/hosts-sections.test.ts#fresh",+ "name": "fresh",+ "kind": "function",+ "path": "test/hosts-sections.test.ts",+ "span": "L8-L8",+ "signature": "function fresh(): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "5fbf8aed98c1fd26d88217061c491d534e161b32a06df5c80d376de4eb1171a3",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/mcp-server.test.ts",+ "name": "mcp-server.test.ts",+ "kind": "file",+ "path": "test/mcp-server.test.ts",+ "span": "L1-L66",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "7cd0e518acabc53f7285a65502a76331813da3ed224b70795ce39801b666c2ee",+ "chars": 2569,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/mcp-server.test.ts#rpc",+ "name": "rpc",+ "kind": "function",+ "path": "test/mcp-server.test.ts",+ "span": "L9-L28",+ "signature": "async function rpc(messages: object[], dir: string, expected: number): Promise<any[]>",+ "exported": false,+ "origin": "ast",+ "body_hash": "a83e1cfe6b7af8f6c87c6c9756d4ca8d61c0122c956f24b5b80a2249b2e950b1",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/mcp-tools.test.ts",+ "name": "mcp-tools.test.ts",+ "kind": "file",+ "path": "test/mcp-tools.test.ts",+ "span": "L1-L188",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "36116ac8d25d8e7aa0dc185bc4171041602523889d693ee1f25f532c397446f0",+ "chars": 8150,+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/mcp-tools.test.ts#builtRepo",+ "name": "builtRepo",+ "kind": "function",+ "path": "test/mcp-tools.test.ts",+ "span": "L9-L16",+ "signature": "function builtRepo(): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "2e8d1ef9e31662a9e1a2e64630378d64979be157310df30d3e97900015426178",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/mcp-tools.test.ts#chainRepo",+ "name": "chainRepo",+ "kind": "function",+ "path": "test/mcp-tools.test.ts",+ "span": "L22-L33",+ "signature": "function chainRepo(): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "15d62ff8440102dce21a2647a706a4307c540acecc930810e29307b72defe3b6",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/mcp-tools.test.ts#fileScopeRepo",+ "name": "fileScopeRepo",+ "kind": "function",+ "path": "test/mcp-tools.test.ts",+ "span": "L38-L48",+ "signature": "function fileScopeRepo(): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "c3e730fb2a68c37167f29ebcf6a14eab2650fde246b3b2fd611cf96b58c55cbd",+ "summary_state": "pending",+ "summary": null,+ "crux": null+ },+ {+ "id": "test/viz-assemble.test.ts",+ "name": "viz-assemble.test.ts",+ "kind": "file",+ "path": "test/viz-assemble.test.ts",+ "span": "L1-L106",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "89a2a9f11f459a8110f9d89b2de780dfd164504f3b4c7dc61953a6c83c5911cb",+ "chars": 3118,+ "summary_state": "ready",+ "summary": "This file contains tests that validate the assembly of a context graph from markdown frontmatter, ensuring proper relation normalization and error handling for malformed files.",+ "crux": {+ "code": "test(\"assembleContextGraph builds nodes and edges from frontmatter\", () => {\n const dir = makeContextDir();\n try {\n const g = assembleContextGraph(dir);\n\n assert.equal(g.nodes.length, 2);\n assert.deepEqual(g.nodes.map((n) => n.id).sort(), [\"alpha\", \"beta\"]);\n\n const alpha = g.nodes.find((n) => n.id === \"alpha\")!;\n assert.equal(alpha.name, \"Alpha\");\n assert.equal(alpha.type, \"system\");\n assert.deepEqual(alpha.sources, [\"src/a.ts\"]);",+ "span": "L62-L73"+ }+ },+ {+ "id": "test/viz-assemble.test.ts#makeContextDir",+ "name": "makeContextDir",+ "kind": "function",+ "path": "test/viz-assemble.test.ts",+ "span": "L12-L60",+ "signature": "function makeContextDir(): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "4fab7dd2dc5bc7c0b9d575f8396bdca67e8d2d5a9f337aa14ef7740dd87b2119",+ "summary_state": "ready",+ "summary": "This function creates a temporary directory with markdown files to simulate context data for testing the graph assembly.",+ "crux": {+ "code": " const dir = mkdtempSync(join(tmpdir(), \"graftviz-\"));\n writeFileSync(\n join(dir, \"alpha.md\"),\n `---\nname: Alpha\nslug: alpha\ntype: system\nsources:\n - path: src/a.ts\n hash: abc123\nlinks:\n - to: beta",+ "span": "L13-L24"+ }+ },+ {+ "id": "test/viz-serve.test.ts",+ "name": "viz-serve.test.ts",+ "kind": "file",+ "path": "test/viz-serve.test.ts",+ "span": "L1-L101",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "d22168054844e83bc5257271c4cc80a6e3eb1315e600c03b48fe6b54afd5c243",+ "chars": 4004,+ "summary_state": "ready",+ "summary": "This file contains tests for the viz server, ensuring it serves the correct endpoints and handles various scenarios like port fallback and context directory changes.",+ "crux": {+ "code": "test(\"viz server serves viewer, context graph, and gates code graph\", async () => {\n const { contextDir, viewerDir, root } = makeDirs();\n const srv = await startVizServer({ contextDir, viewerDir, port: 4831, repoName: \"fixture\" });\n try {\n const html = await fetch(`${srv.url}/`).then((r) => r.text());\n assert.match(html, /stub/);\n\n const graph = await fetch(`${srv.url}/api/context-graph`).then((r) => r.json());\n assert.equal(graph.meta.nodeCount, 1);\n assert.equal(graph.meta.repoName, \"fixture\");\n assert.equal(graph.nodes[0].id, \"alpha\");\n",+ "span": "L29-L40"+ }+ },+ {+ "id": "test/viz-serve.test.ts#makeDirs",+ "name": "makeDirs",+ "kind": "function",+ "path": "test/viz-serve.test.ts",+ "span": "L13-L27",+ "signature": "function makeDirs(): { contextDir: string; viewerDir: string; root: string }",+ "exported": false,+ "origin": "ast",+ "body_hash": "cff2ec95e868528eec2623a2907ab4c4e3e4a55224d0551b1fb8a63e8bbc124d",+ "summary_state": "ready",+ "summary": "This function creates necessary directory structures and files for testing the viz server.",+ "crux": {+ "code": " const root = mkdtempSync(join(tmpdir(), \"graftviz-srv-\"));\n const contextDir = join(root, \".context\");\n const viewerDir = join(root, \"viewer\");\n mkdirSync(contextDir);\n mkdirSync(viewerDir);\n writeFileSync(join(viewerDir, \"index.html\"), \"<title>stub</title>\\n\");\n writeFileSync(join(viewerDir, \"app.js\"), \"// stub\\n\");\n writeFileSync(join(viewerDir, \"style.css\"), \"/* stub */\\n\");\n writeFileSync(\n join(contextDir, \"alpha.md\"),\n `---\\nname: Alpha\\nslug: alpha\\ntype: system\\nsources: []\\nlinks: []\\n---\\nbody\\n`,\n );",+ "span": "L14-L25"+ }+ },+ {+ "id": "viewer/data.ts",+ "name": "data.ts",+ "kind": "file",+ "path": "viewer/data.ts",+ "span": "L1-L122",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "e9c5c89ad933e06004cbeddc1b1d7b60a6057726a463c66f9673ba20a3c61afd",+ "chars": 4708,+ "summary_state": "ready",+ "summary": "This file defines data structures and functions for managing and visualizing graph data from a server.",+ "crux": null+ },+ {+ "id": "viewer/data.ts#chipKey",+ "name": "chipKey",+ "kind": "function",+ "path": "viewer/data.ts",+ "span": "L47-L51",+ "signature": "function chipKey(rel: string): string",+ "exported": true,+ "origin": "ast",+ "body_hash": "85dd128b9f3bf028efaeac2428474b0d70ac47e8e94bcba80c111d59a6006df9",+ "summary_state": "ready",+ "summary": "Generates a key for chip grouping based on the relation verb, simplifying the visualization of relationships.",+ "crux": {+ "code": " if (famOf(rel) === \"structure\") return \"part of\";\n if (rel === \"calls\" || rel === \"uses\" || rel === \"depends_on\" || rel === \"imports\") return \"uses\";\n return rel.replace(/_/g, \" \");",+ "span": "L48-L50"+ }+ },+ {+ "id": "viewer/data.ts#CodeGraphV1",+ "name": "CodeGraphV1",+ "kind": "interface",+ "path": "viewer/data.ts",+ "span": "L86-L93",+ "signature": "interface CodeGraphV1",+ "exported": false,+ "origin": "ast",+ "body_hash": "e494a9a322973f3bc8af2017764ac546a8e9cb7b03cae5aeb730f48ad2521d90",+ "summary_state": "ready",+ "summary": "Defines the structure of the code graph data received from the server, including nodes and edges.",+ "crux": null+ },+ {+ "id": "viewer/data.ts#colorToken",+ "name": "colorToken",+ "kind": "function",+ "path": "viewer/data.ts",+ "span": "L72-L75",+ "signature": "function colorToken(tab: \"context\" | \"code\", type: string): string",+ "exported": true,+ "origin": "ast",+ "body_hash": "dc48f14294140f474d97fdedf0bdbbbe487d5f0bcdeda6ae84f87251ab24b007",+ "summary_state": "ready",+ "summary": "Maps a type to its corresponding CSS custom property for styling in the visualization.",+ "crux": {+ "code": " return m[type] ?? \"--edge\";",+ "span": "L74-L74"+ }+ },+ {+ "id": "viewer/data.ts#cvar",+ "name": "cvar",+ "kind": "function",+ "path": "viewer/data.ts",+ "span": "L77-L79",+ "signature": "function cvar(name: string): string",+ "exported": true,+ "origin": "ast",+ "body_hash": "89e6f3b44e0dd358542573894691c925266e88da9160b79be00d043ae17245e8",+ "summary_state": "ready",+ "summary": "Retrieves the value of a CSS custom property from the document's root element.",+ "crux": null+ },+ {+ "id": "viewer/data.ts#Family",+ "name": "Family",+ "kind": "type",+ "path": "viewer/data.ts",+ "span": "L29-L29",+ "signature": "type Family = \"structure\" | \"dependency\" | \"contract\" | \"association\";",+ "exported": true,+ "origin": "ast",+ "body_hash": "324db0cd1c7f2eebbda194734b2a8db880eb835949f0325780ea5ae75308ef05",+ "summary_state": "ready",+ "summary": "Categorizes relation verbs into families to enforce consistent semantics in graph relationships.",+ "crux": null+ },+ {+ "id": "viewer/data.ts#famOf",+ "name": "famOf",+ "kind": "function",+ "path": "viewer/data.ts",+ "span": "L39-L41",+ "signature": "function famOf(rel: string): Family",+ "exported": true,+ "origin": "ast",+ "body_hash": "faed31084ad49496d754f589593081a76a4cd98e714ff10a10c07d5cd476738d",+ "summary_state": "ready",+ "summary": "Determines the family category of a given relation verb, defaulting to 'association' if unknown.",+ "crux": {+ "code": " return FAMILY[rel] ?? \"association\";",+ "span": "L40-L40"+ }+ },+ {+ "id": "viewer/data.ts#loadCodeGraph",+ "name": "loadCodeGraph",+ "kind": "function",+ "path": "viewer/data.ts",+ "span": "L96-L113",+ "signature": "async function loadCodeGraph(): Promise<VizGraph | null>",+ "exported": true,+ "origin": "ast",+ "body_hash": "343a1a01362fa33345082eb6cd5a04cfc1b7a1411de7bc23422c5ac5ebb1fae1",+ "summary_state": "ready",+ "summary": "Loads the code graph from the server, filtering out unresolved edges and returning a structured graph.",+ "crux": {+ "code": " if (!res.ok) return null;\n const raw = (await res.json()) as CodeGraphV1;\n const nodes: VizNode[] = raw.nodes.map((n) => ({\n id: n.id,\n name: n.name,\n type: n.kind,\n summary: n.summary ?? n.signature ?? \"\",\n sources: [`${n.path} · ${n.span}`],\n }));\n const known = new Set(nodes.map((n) => n.id));\n // imports edges may point at unresolved module strings — drop those for rendering\n const edges: VizEdge[] = raw.edges",+ "span": "L98-L109"+ }+ },+ {+ "id": "viewer/data.ts#loadContextGraph",+ "name": "loadContextGraph",+ "kind": "function",+ "path": "viewer/data.ts",+ "span": "L81-L84",+ "signature": "async function loadContextGraph(): Promise<VizGraph>",+ "exported": true,+ "origin": "ast",+ "body_hash": "c65d9227bea8ceceffd49b4eb8475677aef8ca8820b966d9228a31875a6589e1",+ "summary_state": "ready",+ "summary": "Fetches the context graph data from the server and returns it in a structured format.",+ "crux": {+ "code": " const res = await fetch(\"/api/context-graph\");\n return (await res.json()) as VizGraph;",+ "span": "L82-L83"+ }+ },+ {+ "id": "viewer/data.ts#onServerChange",+ "name": "onServerChange",+ "kind": "function",+ "path": "viewer/data.ts",+ "span": "L116-L121",+ "signature": "function onServerChange(handler: () => void): void",+ "exported": true,+ "origin": "ast",+ "body_hash": "d864a1d7995232ad54351830e5963a2c6fc8c64cc5a941cf9cfea74d688514c9",+ "summary_state": "ready",+ "summary": "Subscribes to server events to trigger updates in the application when changes occur.",+ "crux": {+ "code": " if (ev.data === \"change\") handler();",+ "span": "L119-L119"+ }+ },+ {+ "id": "viewer/data.ts#VizEdge",+ "name": "VizEdge",+ "kind": "interface",+ "path": "viewer/data.ts",+ "span": "L14-L20",+ "signature": "interface VizEdge",+ "exported": true,+ "origin": "ast",+ "body_hash": "13baa6c9acc4c78eec36835e02fd49df79e869f836880341a959be134ceaabb1",+ "summary_state": "ready",+ "summary": "Defines the relationship between two nodes in the visualization graph, including its type and description.",+ "crux": null+ },+ {+ "id": "viewer/data.ts#VizGraph",+ "name": "VizGraph",+ "kind": "interface",+ "path": "viewer/data.ts",+ "span": "L22-L26",+ "signature": "interface VizGraph",+ "exported": true,+ "origin": "ast",+ "body_hash": "6448a4bb9c71c7932dce92d9d8a452f99a0a100041bd30c5b6759c5784b0f098",+ "summary_state": "ready",+ "summary": "Encapsulates the entire visualization graph structure, including its nodes and edges.",+ "crux": null+ },+ {+ "id": "viewer/data.ts#VizNode",+ "name": "VizNode",+ "kind": "interface",+ "path": "viewer/data.ts",+ "span": "L6-L12",+ "signature": "interface VizNode",+ "exported": true,+ "origin": "ast",+ "body_hash": "ec19a79898c594e5afc405cab037fcc0c43144c5766af8a955dccda7df733ba6",+ "summary_state": "ready",+ "summary": "Represents a node in the visualization graph, encapsulating its identity and metadata.",+ "crux": null+ },+ {+ "id": "viewer/detail.ts",+ "name": "detail.ts",+ "kind": "file",+ "path": "viewer/detail.ts",+ "span": "L1-L59",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "fe8df7c5561f2a8588cf4e1ecb367d19cb6b480fe4855f05e4f96137d8078884",+ "chars": 2421,+ "summary_state": "ready",+ "summary": "This file provides the logic to render a detailed view of a selected node in a graph, including its properties and relationships.",+ "crux": {+ "code": " if (!id || !graph) {\n host.innerHTML = '<div class=\"empty\">Select a node to view details</div>';\n return;\n }\n const node = graph.nodes.find((n) => n.id === id);\n if (!node) {\n host.innerHTML = '<div class=\"empty\">Select a node to view details</div>';\n return;\n }\n const color = cvar(colorToken(tab, node.type));\n const name = (nid: string) => graph.nodes.find((n) => n.id === nid)?.name ?? nid;\n const out = graph.edges.filter((e) => e.source === id);",+ "span": "L19-L30"+ }+ },+ {+ "id": "viewer/detail.ts#esc",+ "name": "esc",+ "kind": "function",+ "path": "viewer/detail.ts",+ "span": "L8-L10",+ "signature": "function esc(s: string): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "9fb927f7f1c881ee1fe325c0dc8a25b8c5cdb2c101b08ae935a35bb428f5bbdb",+ "summary_state": "ready",+ "summary": "This function sanitizes a string for safe HTML rendering by escaping special characters.",+ "crux": {+ "code": " return s.replace(/&/g, \"&\").replace(/</g, \"<\");\n}",+ "span": "L9-L10"+ }+ },+ {+ "id": "viewer/detail.ts#renderDetail",+ "name": "renderDetail",+ "kind": "function",+ "path": "viewer/detail.ts",+ "span": "L12-L58",+ "signature": "function renderDetail( host: HTMLElement, graph: VizGraph | null, tab: \"context\" | \"code\", id: string | null, onNavigate: (id: string) => void, ): void",+ "exported": true,+ "origin": "ast",+ "body_hash": "bbd0db0a7f39cbfbd9b0ca31f88118c9a2cd037d394ad47bff7203a6f399f5ca",+ "summary_state": "ready",+ "summary": "This function renders the details of a selected node, including its type, name, summary, sources, and relationships.",+ "crux": {+ "code": " const color = cvar(colorToken(tab, node.type));\n const name = (nid: string) => graph.nodes.find((n) => n.id === nid)?.name ?? nid;\n const out = graph.edges.filter((e) => e.source === id);\n const inn = graph.edges.filter((e) => e.target === id);\n\n let html = `<span class=\"d-type\"><span class=\"sw\" style=\"background:${color}\"></span>${esc(node.type)}</span>`;\n html += `<h3>${esc(node.name)}</h3>`;\n if (node.summary) html += `<p class=\"summary\">${esc(node.summary)}</p>`;\n if (node.sources.length) {\n html += `<div class=\"d-label\">Sources · ${node.sources.length}</div>`;\n for (const s of node.sources) html += `<div class=\"src mono\">${esc(s)}</div>`;\n }",+ "span": "L28-L39"+ }+ },+ {+ "id": "viewer/detail.ts#renderDetail.linkList",+ "name": "linkList",+ "kind": "function",+ "path": "viewer/detail.ts",+ "span": "L40-L50",+ "signature": "linkList = (edges: typeof out, dotColor: string, title: string, other: (e: (typeof out)[number]) => string)",+ "exported": true,+ "origin": "ast",+ "body_hash": "f103fe554602f3315706280d7eba1016c647c77fa6af27e9a4ec0442d6cf1d89",+ "summary_state": "ready",+ "summary": "This function generates HTML for displaying a list of links related to a node, categorized by their relationship type.",+ "crux": {+ "code": " if (!edges.length) return;\n html += `<div class=\"d-label\"><span class=\"dot\" style=\"background:${dotColor}\"></span>${title} · ${edges.length}</div>`;\n for (const e of edges) {\n html += `<button class=\"lnk\" data-go=\"${esc(other(e))}\">` +\n `<span class=\"rel\">${esc(e.relation.replace(/_/g, \" \"))}</span> ` +\n `<span class=\"to\">${esc(name(other(e)))}</span>` +\n (e.description ? `<div class=\"desc\">${esc(e.description)}</div>` : \"\") +\n `</button>`;\n }\n };",+ "span": "L41-L50"+ }+ },+ {+ "id": "viewer/detail.ts#renderDetail.name",+ "name": "name",+ "kind": "function",+ "path": "viewer/detail.ts",+ "span": "L29-L29",+ "signature": "name = (nid: string)",+ "exported": true,+ "origin": "ast",+ "body_hash": "617c48812e0f0520b45da770cf91aeea5330b7e690c6d93defd4da77edf11b8a",+ "summary_state": "ready",+ "summary": "This function retrieves the name of a node by its ID, providing a fallback if not found.",+ "crux": {+ "code": " const name = (nid: string) => graph.nodes.find((n) => n.id === nid)?.name ?? nid;",+ "span": "L29-L29"+ }+ },+ {+ "id": "viewer/graph.ts",+ "name": "graph.ts",+ "kind": "file",+ "path": "viewer/graph.ts",+ "span": "L1-L335",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "192a59b16da8327457de6723893fd9207dd9570a35cd664f96534a7b85e73e01",+ "chars": 14262,+ "summary_state": "ready",+ "summary": "This file implements a force-directed graph visualization using D3.js, allowing interactive exploration of nodes and edges.",+ "crux": {+ "code": " setData(graph: VizGraph, tab: \"context\" | \"code\"): void {\n this.tab = tab;\n const prev = new Map(this.nodes.map((n) => [n.id, n]));\n const deg: Record<string, number> = {};\n for (const e of graph.edges) {\n deg[e.source] = (deg[e.source] ?? 0) + 1;\n deg[e.target] = (deg[e.target] ?? 0) + 1;\n }\n const W = this.svg.clientWidth || 800;\n const H = this.svg.clientHeight || 600;\n this.nodes = graph.nodes.map((n, i) => {\n const p = prev.get(n.id);",+ "span": "L94-L105"+ }+ },+ {+ "id": "viewer/graph.ts#el",+ "name": "el",+ "kind": "function",+ "path": "viewer/graph.ts",+ "span": "L42-L46",+ "signature": "function el<K extends keyof SVGElementTagNameMap>(tag: K, attrs: Record<string, string | number>): SVGElementTagNameMap[K]",+ "exported": false,+ "origin": "ast",+ "body_hash": "de7f696c06af5d771e8e661f398d9d275ca2cc06d86f4e91458d671480e346b7",+ "summary_state": "ready",+ "summary": "Creates and returns an SVG element with specified attributes, facilitating dynamic SVG generation.",+ "crux": null+ },+ {+ "id": "viewer/graph.ts#GraphView",+ "name": "GraphView",+ "kind": "class",+ "path": "viewer/graph.ts",+ "span": "L48-L334",+ "signature": "class GraphView",+ "exported": true,+ "origin": "ast",+ "body_hash": "1405c1f292294538c45794740adf01c59c83d3fd7047b6efa8c04c90a4409310",+ "summary_state": "ready",+ "summary": "Manages the rendering and interaction of the graph view, including node and edge updates.",+ "crux": {+ "code": " setData(graph: VizGraph, tab: \"context\" | \"code\"): void {\n this.tab = tab;\n const prev = new Map(this.nodes.map((n) => [n.id, n]));\n const deg: Record<string, number> = {};\n for (const e of graph.edges) {\n deg[e.source] = (deg[e.source] ?? 0) + 1;\n deg[e.target] = (deg[e.target] ?? 0) + 1;\n }\n const W = this.svg.clientWidth || 800;\n const H = this.svg.clientHeight || 600;\n this.nodes = graph.nodes.map((n, i) => {\n const p = prev.get(n.id);",+ "span": "L94-L105"+ }+ },+ {+ "id": "viewer/graph.ts#GraphView.applyView",+ "name": "applyView",+ "kind": "method",+ "path": "viewer/graph.ts",+ "span": "L268-L270",+ "signature": "private applyView(): void",+ "exported": true,+ "origin": "ast",+ "body_hash": "2adb54996d6ef9272cd69144b4b6c4bb92236506a3f5bf2d589faffd5218554b",+ "summary_state": "ready",+ "summary": "Applies the current view transformation to the graph, adjusting the viewport accordingly.",+ "crux": {+ "code": " private applyView(): void {\n this.viewport.setAttribute(\"transform\", `translate(${this.view.x},${this.view.y}) scale(${this.view.k})`);\n }",+ "span": "L268-L270"+ }+ },+ {+ "id": "viewer/graph.ts#GraphView.bindDrag",+ "name": "bindDrag",+ "kind": "method",+ "path": "viewer/graph.ts",+ "span": "L290-L309",+ "signature": "private bindDrag(group: SVGGElement, node: SimNode): void",+ "exported": true,+ "origin": "ast",+ "body_hash": "00e851d11e1029516256411b627b60e78d781cdc62ada046a0eb93c55c2dd009",+ "summary_state": "ready",+ "summary": "Enables dragging functionality for nodes, allowing users to reposition them interactively.",+ "crux": {+ "code": " private bindDrag(group: SVGGElement, node: SimNode): void {\n group.addEventListener(\"pointerdown\", (ev) => {\n ev.stopPropagation();\n group.setPointerCapture(ev.pointerId);\n const move = (mv: PointerEvent) => {\n const rect = this.svg.getBoundingClientRect();\n node.fx = (mv.clientX - rect.left - this.view.x) / this.view.k;\n node.fy = (mv.clientY - rect.top - this.view.y) / this.view.k;\n this.sim?.alphaTarget(0.25).restart();\n };\n const up = () => {\n node.fx = null; node.fy = null;",+ "span": "L290-L301"+ }+ },+ {+ "id": "viewer/graph.ts#GraphView.bindDrag.move",+ "name": "move",+ "kind": "function",+ "path": "viewer/graph.ts",+ "span": "L294-L299",+ "signature": "move = (mv: PointerEvent)",+ "exported": true,+ "origin": "ast",+ "body_hash": "656f371efff6a0eed7868895a4044e4fdf1dc88840de21376c388ba03149fbd0",+ "summary_state": "ready",+ "summary": "Handles the movement of a node during drag events, updating its fixed position.",+ "crux": {+ "code": " const move = (mv: PointerEvent) => {\n const rect = this.svg.getBoundingClientRect();\n node.fx = (mv.clientX - rect.left - this.view.x) / this.view.k;\n node.fy = (mv.clientY - rect.top - this.view.y) / this.view.k;\n this.sim?.alphaTarget(0.25).restart();\n };",+ "span": "L294-L299"+ }+ },+ {+ "id": "viewer/graph.ts#GraphView.bindDrag.up",+ "name": "up",+ "kind": "function",+ "path": "viewer/graph.ts",+ "span": "L300-L305",+ "signature": "up = ()",+ "exported": true,+ "origin": "ast",+ "body_hash": "a935b15e42eefdf45da528afe3172b559d3e9ee97fe4be67f682dedccaac64c2",+ "summary_state": "ready",+ "summary": "Finalizes the drag operation by releasing the node's fixed position.",+ "crux": {+ "code": " const up = () => {\n node.fx = null; node.fy = null;\n this.sim?.alphaTarget(0);\n group.removeEventListener(\"pointermove\", move);\n group.removeEventListener(\"pointerup\", up);\n };",+ "span": "L300-L305"+ }+ },+ {+ "id": "viewer/graph.ts#GraphView.bindPanZoom",+ "name": "bindPanZoom",+ "kind": "method",+ "path": "viewer/graph.ts",+ "span": "L311-L333",+ "signature": "private bindPanZoom(): void",+ "exported": true,+ "origin": "ast",+ "body_hash": "737e5f69bc32913d3b061a4a878b61245d242e217f451a81d72d21e1d28fae30",+ "summary_state": "ready",+ "summary": "Sets up event listeners for panning and zooming the graph view based on user interactions.",+ "crux": {+ "code": " private bindPanZoom(): void {\n let panStart: { x: number; y: number } | null = null;\n this.svg.addEventListener(\"pointerdown\", (ev) => {\n panStart = { x: ev.clientX - this.view.x, y: ev.clientY - this.view.y };\n });\n this.svg.addEventListener(\"pointermove\", (ev) => {\n if (!panStart) return;\n this.view.x = ev.clientX - panStart.x;\n this.view.y = ev.clientY - panStart.y;\n this.applyView();\n });\n window.addEventListener(\"pointerup\", () => { panStart = null; });",+ "span": "L311-L322"+ }+ },+ {+ "id": "viewer/graph.ts#GraphView.buildChrome",+ "name": "buildChrome",+ "kind": "method",+ "path": "viewer/graph.ts",+ "span": "L71-L78",+ "signature": "private buildChrome(): void",+ "exported": true,+ "origin": "ast",+ "body_hash": "592cef68d76f99ad8da470cc3c8b4eda64701c02b8740a21e659fdd5e5325def",+ "summary_state": "ready",+ "summary": "Sets up the initial SVG structure for the graph, including definitions and viewport.",+ "crux": {+ "code": " this.svg.textContent = \"\";\n this.defs = el(\"defs\", {});\n this.svg.appendChild(this.defs);\n this.viewport = el(\"g\", {});\n this.svg.appendChild(this.viewport);\n this.svg.addEventListener(\"click\", () => this.select(null));\n }",+ "span": "L72-L78"+ }+ },+ {+ "id": "viewer/graph.ts#GraphView.buildElements",+ "name": "buildElements",+ "kind": "method",+ "path": "viewer/graph.ts",+ "span": "L138-L164",+ "signature": "private buildElements(): void",+ "exported": true,+ "origin": "ast",+ "body_hash": "a608a77fab16447bd9ef9c465a192abc0cb7167807f7c1718d961d730d7f055d",+ "summary_state": "ready",+ "summary": "Constructs the SVG elements for nodes and edges based on the current dataset.",+ "crux": {+ "code": " private buildElements(): void {\n this.ensureMarkers();\n this.viewport.textContent = \"\";\n this.edgeEls = this.edges.map((edge) => {\n const path = el(\"path\", { fill: \"none\", \"stroke-linecap\": \"round\" });\n const title = el(\"title\", {});\n title.textContent = edge.relation.replace(/_/g, \" \") + (edge.description ? ` — ${edge.description}` : \"\");\n path.appendChild(title);\n const label = el(\"text\", { \"text-anchor\": \"middle\", \"font-size\": 9.5, \"font-weight\": 700, \"stroke-width\": 3, \"paint-order\": \"stroke\", display: \"none\" });\n label.textContent = edge.relation.replace(/_/g, \" \");\n this.viewport.appendChild(path);\n this.viewport.appendChild(label);",+ "span": "L138-L149"+ }+ },+ {+ "id": "viewer/graph.ts#GraphView.constructor",+ "name": "constructor",+ "kind": "method",+ "path": "viewer/graph.ts",+ "span": "L65-L69",+ "signature": "constructor(svg: SVGSVGElement)",+ "exported": true,+ "origin": "ast",+ "body_hash": "27abb788d7de0ece37719a0a23d4fed7778c02dda10700bbfb4f110ea8c16984",+ "summary_state": "ready",+ "summary": "Initializes the GraphView instance and sets up the SVG environment for rendering.",+ "crux": null+ },+ {+ "id": "viewer/graph.ts#GraphView.ensureMarkers",+ "name": "ensureMarkers",+ "kind": "method",+ "path": "viewer/graph.ts",+ "span": "L80-L91",+ "signature": "private ensureMarkers(): void",+ "exported": true,+ "origin": "ast",+ "body_hash": "9517cfdb2ccb4ce235405356f6ff9b2fb3fcd2f7d687689bde33cf5df9bd6906",+ "summary_state": "ready",+ "summary": "Ensures that the necessary SVG markers for edges are created and available for rendering.",+ "crux": {+ "code": " this.defs.textContent = \"\";\n const chevron = el(\"marker\", { id: \"arr\", viewBox: \"0 0 10 10\", refX: 8, refY: 5, markerWidth: 4.5, markerHeight: 4.5, orient: \"auto-start-reverse\" });\n chevron.appendChild(el(\"path\", { d: \"M2,1.5L8.5,5L2,8.5\", fill: \"none\", stroke: cvar(\"--edge\"), \"stroke-width\": 1.8, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\", opacity: 0.75 }));\n const hollow = el(\"marker\", { id: \"arrH\", viewBox: \"0 0 12 12\", refX: 10, refY: 6, markerWidth: 6.5, markerHeight: 6.5, orient: \"auto-start-reverse\" });\n hollow.appendChild(el(\"path\", { d: \"M1.5,1.5L10.5,6L1.5,10.5z\", fill: cvar(\"--canvas\"), stroke: cvar(\"--edge\"), \"stroke-width\": 1.4 }));\n const out = el(\"marker\", { id: \"arrOut\", viewBox: \"0 0 10 10\", refX: 8, refY: 5, markerWidth: 5, markerHeight: 5, orient: \"auto-start-reverse\" });\n out.appendChild(el(\"path\", { d: \"M1,1L9,5L1,9z\", fill: cvar(\"--fil\") }));\n const inn = el(\"marker\", { id: \"arrIn\", viewBox: \"0 0 10 10\", refX: 8, refY: 5, markerWidth: 5, markerHeight: 5, orient: \"auto-start-reverse\" });\n inn.appendChild(el(\"path\", { d: \"M1,1L9,5L1,9z\", fill: cvar(\"--accent\") }));\n for (const m of [chevron, hollow, out, inn]) this.defs.appendChild(m);",+ "span": "L81-L90"+ }+ },+ {+ "id": "viewer/graph.ts#GraphView.firstMatch",+ "name": "firstMatch",+ "kind": "method",+ "path": "viewer/graph.ts",+ "span": "L263-L266",+ "signature": "firstMatch(): SimNode | undefined",+ "exported": true,+ "origin": "ast",+ "body_hash": "d43343323ad49732d473f46773ac41a0ee7472f6289d324eb369d739e8cb0352",+ "summary_state": "ready",+ "summary": "Finds the first node that matches the current query, facilitating search functionality.",+ "crux": {+ "code": " firstMatch(): SimNode | undefined {\n const q = this.query.toLowerCase();\n return this.nodes.find((n) => !this.hiddenTypes[n.type] && n.name.toLowerCase().includes(q));\n }",+ "span": "L263-L266"+ }+ },+ {+ "id": "viewer/graph.ts#GraphView.focus",+ "name": "focus",+ "kind": "method",+ "path": "viewer/graph.ts",+ "span": "L252-L261",+ "signature": "focus(id: string): void",+ "exported": true,+ "origin": "ast",+ "body_hash": "a64691876d1786ccdb2027028d00210b8cb56557c65c1afa81a886b506d7b459",+ "summary_state": "ready",+ "summary": "Centers the view on a specified node, enhancing its visibility and selection.",+ "crux": {+ "code": " focus(id: string): void {\n const node = this.nodes.find((n) => n.id === id);\n if (!node) return;\n const W = this.svg.clientWidth, H = this.svg.clientHeight;\n this.view.k = Math.max(this.view.k, 1.4);\n this.view.x = W / 2 - (node.x ?? 0) * this.view.k;\n this.view.y = H / 2 - (node.y ?? 0) * this.view.k;\n this.applyView();\n this.select(id);\n }",+ "span": "L252-L261"+ }+ },+ {+ "id": "viewer/graph.ts#GraphView.reheat",+ "name": "reheat",+ "kind": "method",+ "path": "viewer/graph.ts",+ "span": "L286-L288",+ "signature": "reheat(): void",+ "exported": true,+ "origin": "ast",+ "body_hash": "ca57d7cb11e71985bcd27b937b4f6d0a62428a0ae84f5a297cb1147861032a59",+ "summary_state": "ready",+ "summary": "Restarts the simulation with increased alpha, making the graph more dynamic.",+ "crux": {+ "code": " reheat(): void {\n this.sim?.alpha(0.6).restart();\n }",+ "span": "L286-L288"+ }+ },+ {+ "id": "viewer/graph.ts#GraphView.resetView",+ "name": "resetView",+ "kind": "method",+ "path": "viewer/graph.ts",+ "span": "L281-L284",+ "signature": "resetView(): void",+ "exported": true,+ "origin": "ast",+ "body_hash": "ae1f1ee82c804ff145b1f4aa9de70cad49a5287735aa9825f6accbe21591794c",+ "summary_state": "ready",+ "summary": "Resets the graph view to its initial state, centering and scaling the view.",+ "crux": {+ "code": " resetView(): void {\n this.view = { x: 0, y: 0, k: 1 };\n this.applyView();\n }",+ "span": "L281-L284"+ }+ },+ {+ "id": "viewer/graph.ts#GraphView.restyle",+ "name": "restyle",+ "kind": "method",+ "path": "viewer/graph.ts",+ "span": "L185-L243",+ "signature": "restyle(): void",+ "exported": true,+ "origin": "ast",+ "body_hash": "a928dd40f55ad9a091ba969afdf370f2a265bf30fb94efdc6879fcc0fb01edda",+ "summary_state": "ready",+ "summary": "Applies styles to nodes and edges based on their visibility and selection state.",+ "crux": {+ "code": " restyle(): void {\n this.ensureMarkers();\n const neighbors = new Set<string>();\n if (this.selected) {\n for (const e of this.edges) {\n if (e.source.id === this.selected) neighbors.add(e.target.id);\n if (e.target.id === this.selected) neighbors.add(e.source.id);\n }\n }\n const q = this.query.toLowerCase();\n const nodeShown = (n: SimNode) => !this.hiddenTypes[n.type];\n",+ "span": "L185-L196"+ }+ },+ {+ "id": "viewer/graph.ts#GraphView.restyle.nodeShown",+ "name": "nodeShown",+ "kind": "function",+ "path": "viewer/graph.ts",+ "span": "L195-L195",+ "signature": "nodeShown = (n: SimNode)",+ "exported": true,+ "origin": "ast",+ "body_hash": "a598aac16da1955aecc62f39590f30d0c7e780d99429b1657c1bbba7d157ddea",+ "summary_state": "ready",+ "summary": "Determines if a node should be displayed based on its type and visibility settings.",+ "crux": null+ },+ {+ "id": "viewer/graph.ts#GraphView.select",+ "name": "select",+ "kind": "method",+ "path": "viewer/graph.ts",+ "span": "L245-L249",+ "signature": "select(id: string | null): void",+ "exported": true,+ "origin": "ast",+ "body_hash": "7ba52874ad2ddda2bc80c3442e011c9d2b464fb8851a3ba527d3dba8ac6061c2",+ "summary_state": "ready",+ "summary": "Selects a node in the graph and updates the visual representation accordingly.",+ "crux": {+ "code": " select(id: string | null): void {\n this.selected = id;\n this.restyle();\n this.onSelect(id);\n }",+ "span": "L245-L249"+ }+ },+ {+ "id": "viewer/graph.ts#GraphView.setData",+ "name": "setData",+ "kind": "method",+ "path": "viewer/graph.ts",+ "span": "L94-L136",+ "signature": "setData(graph: VizGraph, tab: \"context\" | \"code\"): void",+ "exported": true,+ "origin": "ast",+ "body_hash": "d8063d2226148959298ca10074e09f00b7530c0b6a87f023502c4bd1c02041a6",+ "summary_state": "ready",+ "summary": "Loads a new dataset into the graph, updating node positions and relationships accordingly.",+ "crux": {+ "code": " setData(graph: VizGraph, tab: \"context\" | \"code\"): void {\n this.tab = tab;\n const prev = new Map(this.nodes.map((n) => [n.id, n]));\n const deg: Record<string, number> = {};\n for (const e of graph.edges) {\n deg[e.source] = (deg[e.source] ?? 0) + 1;\n deg[e.target] = (deg[e.target] ?? 0) + 1;\n }\n const W = this.svg.clientWidth || 800;\n const H = this.svg.clientHeight || 600;\n this.nodes = graph.nodes.map((n, i) => {\n const p = prev.get(n.id);",+ "span": "L94-L105"+ }+ },+ {+ "id": "viewer/graph.ts#GraphView.tick",+ "name": "tick",+ "kind": "method",+ "path": "viewer/graph.ts",+ "span": "L166-L182",+ "signature": "private tick(): void",+ "exported": true,+ "origin": "ast",+ "body_hash": "0fbefdd43e29e9d5134e756074fe1fa190fa23cf6afaa72a52d27f098ac8e6bb",+ "summary_state": "ready",+ "summary": "Updates the positions of nodes and edges on each simulation tick, ensuring the graph remains interactive.",+ "crux": {+ "code": " private tick(): void {\n for (const { path, label, edge } of this.edgeEls) {\n const a = edge.source, b = edge.target;\n const dx = (b.x ?? 0) - (a.x ?? 0), dy = (b.y ?? 0) - (a.y ?? 0);\n const d = Math.sqrt(dx * dx + dy * dy) || 1;\n const ux = dx / d, uy = dy / d;\n const sx = (a.x ?? 0) + ux * (a.r + 2), sy = (a.y ?? 0) + uy * (a.r + 2);\n const tx = (b.x ?? 0) - ux * (b.r + 6), ty = (b.y ?? 0) - uy * (b.r + 6);\n const mx = (sx + tx) / 2 - uy * 10, my = (sy + ty) / 2 + ux * 10;\n path.setAttribute(\"d\", `M${sx},${sy} Q${mx},${my} ${tx},${ty}`);\n label.setAttribute(\"x\", String((sx + tx) / 2 - uy * 14));\n label.setAttribute(\"y\", String((sy + ty) / 2 + ux * 14));",+ "span": "L166-L177"+ }+ },+ {+ "id": "viewer/graph.ts#GraphView.zoomBy",+ "name": "zoomBy",+ "kind": "method",+ "path": "viewer/graph.ts",+ "span": "L272-L279",+ "signature": "zoomBy(factor: number): void",+ "exported": true,+ "origin": "ast",+ "body_hash": "2dd28ba55cc461ab1f950d582e10b63c6862804f17d518ef346fe4e3f49af289",+ "summary_state": "ready",+ "summary": "Adjusts the zoom level of the graph view based on user input, allowing for detailed exploration.",+ "crux": {+ "code": " zoomBy(factor: number): void {\n const W = this.svg.clientWidth / 2, H = this.svg.clientHeight / 2;\n const k = Math.max(0.35, Math.min(3, this.view.k * factor));\n this.view.x = W - (W - this.view.x) * (k / this.view.k);\n this.view.y = H - (H - this.view.y) * (k / this.view.k);\n this.view.k = k;\n this.applyView();\n }",+ "span": "L272-L279"+ }+ },+ {+ "id": "viewer/graph.ts#SimEdge",+ "name": "SimEdge",+ "kind": "interface",+ "path": "viewer/graph.ts",+ "span": "L32-L38",+ "signature": "interface SimEdge",+ "exported": false,+ "origin": "ast",+ "body_hash": "06690141adf5c47ffc6dd6b55a3cf9f041a4750f0b512cf49d3596928485fca8",+ "summary_state": "ready",+ "summary": "Defines the structure of an edge in the simulation, representing the relationship between two nodes.",+ "crux": null+ },+ {+ "id": "viewer/graph.ts#SimNode",+ "name": "SimNode",+ "kind": "interface",+ "path": "viewer/graph.ts",+ "span": "L22-L30",+ "signature": "interface SimNode extends SimulationNodeDatum",+ "exported": false,+ "origin": "ast",+ "body_hash": "b000c5412e66a114ce7349ebddb8f536c040a6c6f158c641a8370ea049b6a69d",+ "summary_state": "ready",+ "summary": "Defines the structure of a node in the simulation, including its position and properties.",+ "crux": null+ },+ {+ "id": "viewer/main.ts",+ "name": "main.ts",+ "kind": "file",+ "path": "viewer/main.ts",+ "span": "L1-L233",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "ab45ce4dfe66aafbe779b71d49d6370b3fe64482307b994e857ce34d3f317325",+ "chars": 8654,+ "summary_state": "ready",+ "summary": "This file serves as the entry point for the graft visualization viewer, managing the user interface and interactions for displaying graphs.",+ "crux": {+ "code": "const view = new GraphView($(\"graphSvg\") as unknown as SVGSVGElement);",+ "span": "L21-L21"+ }+ },+ {+ "id": "viewer/main.ts#$",+ "name": "$",+ "kind": "function",+ "path": "viewer/main.ts",+ "span": "L12-L12",+ "signature": "$ = <T extends HTMLElement>(id: string): T",+ "exported": false,+ "origin": "ast",+ "body_hash": "e46dd7aa9ed3186876ec11a8520b5af609af327108e045bce175d535aa9ed0e5",+ "summary_state": "ready",+ "summary": "Provides a type-safe way to retrieve HTML elements by their ID, enhancing code readability and reducing errors.",+ "crux": null+ },+ {+ "id": "viewer/main.ts#activeGraph",+ "name": "activeGraph",+ "kind": "function",+ "path": "viewer/main.ts",+ "span": "L23-L25",+ "signature": "function activeGraph(): VizGraph | null",+ "exported": false,+ "origin": "ast",+ "body_hash": "71591b2a66c0aa4d34f5b96cb2f1293248bdf02f55f6a73c2ee48258f6e2c445",+ "summary_state": "ready",+ "summary": "Determines which graph is currently active based on the selected tab, facilitating the correct data display.",+ "crux": {+ "code": " return state.tab === \"context\" ? state.context : state.code;",+ "span": "L24-L24"+ }+ },+ {+ "id": "viewer/main.ts#glyphFor",+ "name": "glyphFor",+ "kind": "function",+ "path": "viewer/main.ts",+ "span": "L62-L71",+ "signature": "function glyphFor(key: string): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "bd36f5f7c09e4d09ac342de7015c4cbda2ec86e36ab0c22716dd37b006444581",+ "summary_state": "ready",+ "summary": "Maps edge types to their corresponding visual glyphs, enhancing the graphical representation of relationships.",+ "crux": {+ "code": " const fam = key === \"part of\" ? \"structure\" : key === \"uses\" ? \"dependency\" : famOf(key.replace(/ /g, \"_\"));\n const glyphs: Record<string, string> = {\n structure: '<svg width=\"20\" height=\"8\" aria-hidden=\"true\"><line x1=\"1\" y1=\"4\" x2=\"19\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"3\" opacity=\".5\"/></svg>',\n dependency: '<svg width=\"20\" height=\"8\" aria-hidden=\"true\"><line x1=\"1\" y1=\"4\" x2=\"14\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.6\"/><path d=\"M14,1 L19,4 L14,7 z\" fill=\"currentColor\"/></svg>',\n contract: '<svg width=\"20\" height=\"8\" aria-hidden=\"true\"><line x1=\"1\" y1=\"4\" x2=\"13\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\"/><path d=\"M13,1 L19,4 L13,7 z\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\"/></svg>',\n association: '<svg width=\"20\" height=\"8\" aria-hidden=\"true\"><line x1=\"1\" y1=\"4\" x2=\"19\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-dasharray=\"2 4\" opacity=\".7\"/></svg>',\n };\n return glyphs[fam];",+ "span": "L63-L70"+ }+ },+ {+ "id": "viewer/main.ts#graphTab",+ "name": "graphTab",+ "kind": "function",+ "path": "viewer/main.ts",+ "span": "L27-L29",+ "signature": "function graphTab(): \"context\" | \"code\"",+ "exported": false,+ "origin": "ast",+ "body_hash": "8bf89d024fe38470c469c719795eaf902c0e903157cf7ed24fe58a85db40cea4",+ "summary_state": "ready",+ "summary": "Identifies the current graph tab, ensuring the correct context is used for rendering and interactions.",+ "crux": {+ "code": " return state.tab === \"code\" || state.tab === \"outline\" ? \"code\" : \"context\";",+ "span": "L28-L28"+ }+ },+ {+ "id": "viewer/main.ts#loadAll",+ "name": "loadAll",+ "kind": "function",+ "path": "viewer/main.ts",+ "span": "L216-L223",+ "signature": "async function loadAll(): Promise<void>",+ "exported": false,+ "origin": "ast",+ "body_hash": "c896b70116fce23a9b9846a95ed257835d18d1368d091a56cec01674e36bc480",+ "summary_state": "ready",+ "summary": "Loads the context and code graphs asynchronously, ensuring the viewer is populated with the latest data.",+ "crux": {+ "code": " state.context = context;\n state.code = code;\n $(\"repoName\").textContent = context.meta.repoName ?? \"\";\n document.title = `graft viz — ${context.meta.repoName ?? \"\"}`;\n setTab(state.tab);",+ "span": "L218-L222"+ }+ },+ {+ "id": "viewer/main.ts#renderChips",+ "name": "renderChips",+ "kind": "function",+ "path": "viewer/main.ts",+ "span": "L32-L60",+ "signature": "function renderChips(): void",+ "exported": false,+ "origin": "ast",+ "body_hash": "1ef41cd967e509d6342b72755564e0975cb6b87edfcc2911fe79404f906eddcb",+ "summary_state": "ready",+ "summary": "Generates and displays interactive chips for graph edges, allowing users to filter and manage edge visibility.",+ "crux": {+ "code": " const graph = activeGraph();\n if (!graph) return;\n const counts = new Map<string, number>();\n for (const e of graph.edges) {\n const key = chipKey(e.relation);\n counts.set(key, (counts.get(key) ?? 0) + 1);\n }\n const keys = [...counts.keys()].sort((a, b) => {\n const rank = (k: string) => (k === \"part of\" ? 0 : k === \"uses\" ? 1 : 2);\n return rank(a) - rank(b) || a.localeCompare(b);\n });\n for (const key of keys) {",+ "span": "L35-L46"+ }+ },+ {+ "id": "viewer/main.ts#renderChips.rank",+ "name": "rank",+ "kind": "function",+ "path": "viewer/main.ts",+ "span": "L43-L43",+ "signature": "rank = (k: string)",+ "exported": false,+ "origin": "ast",+ "body_hash": "2b14b986fe4648076445602ac03c0f7c788760e8910fa9322617251aa60af5ce",+ "summary_state": "ready",+ "summary": "Establishes a ranking system for edge types to ensure they are displayed in a meaningful order.",+ "crux": {+ "code": " const rank = (k: string) => (k === \"part of\" ? 0 : k === \"uses\" ? 1 : 2);",+ "span": "L43-L43"+ }+ },+ {+ "id": "viewer/main.ts#renderLegend",+ "name": "renderLegend",+ "kind": "function",+ "path": "viewer/main.ts",+ "span": "L74-L94",+ "signature": "function renderLegend(): void",+ "exported": false,+ "origin": "ast",+ "body_hash": "ec1a1aba1d086d035890c60aadf98d7418c018c5488f106100102deaf0eafc01",+ "summary_state": "ready",+ "summary": "Creates a legend for node types in the graph, providing users with context about the displayed data.",+ "crux": {+ "code": " const graph = activeGraph();\n if (!graph) return;\n const counts = new Map<string, number>();\n for (const n of graph.nodes) counts.set(n.type, (counts.get(n.type) ?? 0) + 1);\n for (const [type, count] of counts) {\n const chip = document.createElement(\"button\");\n chip.type = \"button\";\n chip.className = \"lchip\" + (view.hiddenTypes[type] ? \" off\" : \"\");\n chip.innerHTML = `<span class=\"sw\" style=\"background:${cvar(colorToken(graphTab(), type))}\"></span>${type} <span style=\"color:var(--muted);font-weight:500\">${count}</span>`;\n chip.addEventListener(\"click\", () => {\n view.hiddenTypes[type] = !view.hiddenTypes[type];\n renderLegend();",+ "span": "L77-L88"+ }+ },+ {+ "id": "viewer/main.ts#setTab",+ "name": "setTab",+ "kind": "function",+ "path": "viewer/main.ts",+ "span": "L129-L167",+ "signature": "function setTab(tab: Tab): void",+ "exported": false,+ "origin": "ast",+ "body_hash": "c269ec25c7011b7343bdcec22729b23b0c65a57255598ac5145a46397809b321",+ "summary_state": "ready",+ "summary": "Handles the logic for switching between different graph views, ensuring the UI reflects the current context accurately.",+ "crux": {+ "code": " state.tab = tab;\n document.querySelectorAll<HTMLButtonElement>(\".tab\").forEach((b) => {\n b.setAttribute(\"aria-selected\", b.dataset.tab === tab ? \"true\" : \"false\");\n });\n const isOutline = tab === \"outline\";\n $(\"canvasWrap\").hidden = isOutline;\n $(\"outlineView\").hidden = !isOutline;\n view.hiddenRels = {};\n view.hiddenTypes = {};\n view.selected = null;\n showDetail(null);\n",+ "span": "L130-L141"+ }+ },+ {+ "id": "viewer/main.ts#showDetail",+ "name": "showDetail",+ "kind": "function",+ "path": "viewer/main.ts",+ "span": "L115-L124",+ "signature": "function showDetail(id: string | null): void",+ "exported": false,+ "origin": "ast",+ "body_hash": "e2b6f6a27ee1e3bac515ec8140678caa7c6cff3baab943cf43f8fdbdd7ab2e62",+ "summary_state": "ready",+ "summary": "Displays detailed information about a selected graph element, enhancing user interaction and understanding.",+ "crux": {+ "code": " view.focus(next);\n }\n });",+ "span": "L121-L123"+ }+ },+ {+ "id": "viewer/main.ts#showEmpty",+ "name": "showEmpty",+ "kind": "function",+ "path": "viewer/main.ts",+ "span": "L169-L173",+ "signature": "function showEmpty(html: string): void",+ "exported": false,+ "origin": "ast",+ "body_hash": "981ef1b3d68cfcc89b2804a326c87ce023df618bfee612f158fa72291fe7a6d1",+ "summary_state": "ready",+ "summary": "Displays a message when no graph data is available, guiding users on how to generate the necessary data.",+ "crux": {+ "code": " empty.innerHTML = html;\n empty.hidden = false;",+ "span": "L171-L172"+ }+ },+ {+ "id": "viewer/main.ts#Tab",+ "name": "Tab",+ "kind": "type",+ "path": "viewer/main.ts",+ "span": "L10-L10",+ "signature": "type Tab = \"context\" | \"code\" | \"outline\";",+ "exported": false,+ "origin": "ast",+ "body_hash": "4cd3b4afb6647f09ba09efccca7c53a333edbebe109fb1e24db04aa24df610de",+ "summary_state": "ready",+ "summary": "Defines the possible tab types for the viewer, ensuring that only valid tab selections are made.",+ "crux": null+ },+ {+ "id": "viewer/main.ts#updateCounts",+ "name": "updateCounts",+ "kind": "function",+ "path": "viewer/main.ts",+ "span": "L103-L112",+ "signature": "function updateCounts(): void",+ "exported": false,+ "origin": "ast",+ "body_hash": "170a2eec2d377c150839d170cd45a244584ecc9fdbd44ad194e8cac97fdfafb6",+ "summary_state": "ready",+ "summary": "Refreshes the displayed counts of nodes and edges based on the active graph, ensuring accurate information is presented.",+ "crux": {+ "code": " el.textContent = graph ? `${graph.meta.nodeCount} nodes · ${graph.meta.edgeCount} links` : \"\";",+ "span": "L110-L110"+ }+ },+ {+ "id": "viewer/main.ts#updateShownCount",+ "name": "updateShownCount",+ "kind": "function",+ "path": "viewer/main.ts",+ "span": "L96-L101",+ "signature": "function updateShownCount(): void",+ "exported": false,+ "origin": "ast",+ "body_hash": "11ab0ffa5da9e8d010f80cb1f95962900b0649019b7876e2b5213b85605d75ee",+ "summary_state": "ready",+ "summary": "Updates the displayed count of visible nodes in the graph, helping users understand the current view's scope.",+ "crux": {+ "code": " const shown = graph.nodes.filter((n) => !view.hiddenTypes[n.type]).length;\n $(\"lcount\").textContent = `${shown} / ${graph.nodes.length} nodes shown`;",+ "span": "L99-L100"+ }+ },+ {+ "id": "viewer/tree.ts",+ "name": "tree.ts",+ "kind": "file",+ "path": "viewer/tree.ts",+ "span": "L1-L67",+ "signature": null,+ "exported": true,+ "origin": "ast",+ "body_hash": "d66e0157f4c2a1525c16505306eb3aabce82565c3d0e56199ea5b7a860290b01",+ "chars": 2750,+ "summary_state": "ready",+ "summary": "Generates a collapsible tree view of a code graph's hierarchy, allowing users to navigate through files, classes, and methods.",+ "crux": {+ "code": " host.innerHTML =\n '<div class=\"tree-tools\"><button data-tool=\"expand\">Expand all</button><button data-tool=\"collapse\">Collapse all</button></div>' +\n files.map(row).join(\"\");",+ "span": "L44-L46"+ }+ },+ {+ "id": "viewer/tree.ts#esc",+ "name": "esc",+ "kind": "function",+ "path": "viewer/tree.ts",+ "span": "L7-L9",+ "signature": "function esc(s: string): string",+ "exported": false,+ "origin": "ast",+ "body_hash": "9fb927f7f1c881ee1fe325c0dc8a25b8c5cdb2c101b08ae935a35bb428f5bbdb",+ "summary_state": "ready",+ "summary": "Escapes special HTML characters in a string to prevent rendering issues in the tree view.",+ "crux": {+ "code": " return s.replace(/&/g, \"&\").replace(/</g, \"<\");\n}",+ "span": "L8-L9"+ }+ },+ {+ "id": "viewer/tree.ts#renderOutline",+ "name": "renderOutline",+ "kind": "function",+ "path": "viewer/tree.ts",+ "span": "L11-L66",+ "signature": "function renderOutline( host: HTMLElement, graph: VizGraph, selected: string | null, openState: Record<string, boolean>, onSelect: (id: string) => void, ): void",+ "exported": true,+ "origin": "ast",+ "body_hash": "1448ed396d7ec6d8adc0e375aba7be5465c4e4db6d4184c6b5b01ac5a0788591",+ "summary_state": "ready",+ "summary": "Renders the outline view of the code graph, managing the display of files and their hierarchical relationships.",+ "crux": {+ "code": " const kids = (pid: string) =>\n graph.edges\n .filter((e) => e.relation === \"contains\" && e.source === pid)\n .map((e) => graph.nodes.find((n) => n.id === e.target))\n .filter((n): n is NonNullable<typeof n> => Boolean(n));",+ "span": "L18-L22"+ }+ },+ {+ "id": "viewer/tree.ts#renderOutline.countDesc",+ "name": "countDesc",+ "kind": "function",+ "path": "viewer/tree.ts",+ "span": "L23-L26",+ "signature": "countDesc = (pid: string): number",+ "exported": true,+ "origin": "ast",+ "body_hash": "1054af458d2de230dfb45cea7a5a0141f2f4d12521ee04f0919e7defdea719dd",+ "summary_state": "ready",+ "summary": "Counts the total number of descendant nodes for a given parent node, including its children and their descendants.",+ "crux": {+ "code": " return k.length + k.reduce((sum, c) => sum + countDesc(c.id), 0);\n };",+ "span": "L25-L26"+ }+ },+ {+ "id": "viewer/tree.ts#renderOutline.kids",+ "name": "kids",+ "kind": "function",+ "path": "viewer/tree.ts",+ "span": "L18-L22",+ "signature": "kids = (pid: string)",+ "exported": true,+ "origin": "ast",+ "body_hash": "67a4d31f225a0006966aa2a39bdf245c514475f777082275626585879ce9b867",+ "summary_state": "ready",+ "summary": "Retrieves the child nodes of a given parent node in the graph based on the 'contains' relationship.",+ "crux": {+ "code": " .filter((e) => e.relation === \"contains\" && e.source === pid)\n .map((e) => graph.nodes.find((n) => n.id === e.target))",+ "span": "L20-L21"+ }+ },+ {+ "id": "viewer/tree.ts#renderOutline.row",+ "name": "row",+ "kind": "function",+ "path": "viewer/tree.ts",+ "span": "L29-L42",+ "signature": "row = (node: (typeof files)[number]): string",+ "exported": true,+ "origin": "ast",+ "body_hash": "a62af44af8ff57bd1307237e130956ce85cb42fc0c2fc4889907fd4e87e75ab2",+ "summary_state": "ready",+ "summary": "Constructs the HTML representation of a tree row for a given node, including its children and symbol count.",+ "crux": {+ "code": " const children = kids(node.id);\n const open = openState[node.id] !== false;\n let html = `<button class=\"tree-row${open ? \" open\" : \"\"}${selected === node.id ? \" sel\" : \"\"}\"` +\n ` data-id=\"${esc(node.id)}\" data-haskids=\"${children.length ? 1 : 0}\">` +\n `<span class=\"chev\">${children.length ? \"▶\" : \"\"}</span>` +\n `<span class=\"k\" style=\"background:${cvar(colorToken(\"code\", node.type))}\"></span>` +\n `<span class=\"t${node.type === \"file\" ? \" mono\" : \"\"}\">${esc(node.name)}</span>` +\n `<span class=\"badge\">${children.length ? countDesc(node.id) + \" sym\" : esc(node.type)}</span></button>`;\n if (children.length && open) {\n html += `<div class=\"tree-kids\">${children.map(row).join(\"\")}</div>`;\n }\n return html;",+ "span": "L30-L41"+ }+ }+ ],+ "edges": [+ {+ "source": "bench/agent.ts",+ "target": "bench/agent.ts#AgentResult",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts",+ "target": "bench/agent.ts#globToRegExp",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts",+ "target": "bench/agent.ts#listFiles",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts",+ "target": "bench/agent.ts#runAgent",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts",+ "target": "bench/agent.ts#RunAgentOptions",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts",+ "target": "bench/agent.ts#runTool",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts",+ "target": "bench/agent.ts#safePath",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts",+ "target": "bench/llm.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts",+ "target": "node:fs",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts",+ "target": "openai",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts",+ "target": "src/ask/ask.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts",+ "target": "src/ingest/fs.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts#listFiles",+ "target": "bench/agent.ts#listFiles.walk",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts#listFiles",+ "target": "bench/agent.ts#listFiles.walk",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts#listFiles.walk",+ "target": "bench/agent.ts#listFiles.walk",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts#runAgent",+ "target": "bench/agent.ts#runAgent.slideCacheBreakpoint",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts#runAgent",+ "target": "bench/agent.ts#runTool",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts#runAgent",+ "target": "bench/llm.ts#makeClient",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "bench/agent.ts#runAgent",+ "target": "bench/agent.ts#runAgent.slideCacheBreakpoint",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts#runTool",+ "target": "bench/agent.ts#globToRegExp",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts#runTool",+ "target": "bench/agent.ts#listFiles",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts#runTool",+ "target": "bench/agent.ts#safePath",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/agent.ts#runTool",+ "target": "src/ask/ask.ts#ask",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "bench/agent.ts#runTool",+ "target": "src/ask/ask.ts#formatAsk",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "bench/agent.ts#runTool",+ "target": "src/ask/ask.ts#formatSkeleton",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "bench/agent.ts#runTool",+ "target": "src/ask/ask.ts#skeleton",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "bench/judge.ts",+ "target": "bench/judge.ts#extractJson",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/judge.ts",+ "target": "bench/judge.ts#judge",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/judge.ts",+ "target": "bench/judge.ts#JudgeInput",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/judge.ts",+ "target": "bench/judge.ts#Verdict",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/judge.ts",+ "target": "bench/llm.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/judge.ts",+ "target": "openai",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/judge.ts#judge",+ "target": "bench/judge.ts#extractJson",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/judge.ts#judge",+ "target": "bench/llm.ts#makeClient",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "bench/llm.ts",+ "target": "bench/llm.ts#makeClient",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/llm.ts",+ "target": "openai",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/report.ts",+ "target": "bench/report.ts#aggregate",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/report.ts",+ "target": "bench/report.ts#Arm",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/report.ts",+ "target": "bench/report.ts#ArmAgg",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/report.ts",+ "target": "bench/report.ts#buildMarkdown",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/report.ts",+ "target": "bench/report.ts#costOf",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/report.ts",+ "target": "bench/report.ts#fmt",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/report.ts",+ "target": "bench/report.ts#mean",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/report.ts",+ "target": "bench/report.ts#metricTable",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/report.ts",+ "target": "bench/report.ts#pctDelta",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/report.ts",+ "target": "bench/report.ts#Row",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/report.ts",+ "target": "bench/report.ts#verdictFor",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/report.ts#aggregate",+ "target": "bench/report.ts#costOf",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/report.ts#aggregate",+ "target": "bench/report.ts#mean",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/report.ts#buildMarkdown",+ "target": "bench/report.ts#aggregate",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/report.ts#buildMarkdown",+ "target": "bench/report.ts#metricTable",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/report.ts#buildMarkdown",+ "target": "bench/report.ts#verdictFor",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/report.ts#metricTable",+ "target": "bench/report.ts#aggregate",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/report.ts#metricTable",+ "target": "bench/report.ts#metricTable.cells",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/report.ts#metricTable",+ "target": "bench/report.ts#metricTable.cells",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/report.ts#verdictFor",+ "target": "bench/report.ts#pctDelta",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/run.ts",+ "target": "bench/run.ts#main",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/run.ts",+ "target": "bench/run.ts#Args",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/run.ts",+ "target": "bench/run.ts#main",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/run.ts",+ "target": "bench/run.ts#parseArgs",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/run.ts",+ "target": "bench/run.ts#pool",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/run.ts",+ "target": "bench/agent.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/run.ts",+ "target": "bench/judge.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/run.ts",+ "target": "bench/llm.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/run.ts",+ "target": "bench/report.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/run.ts",+ "target": "bench/tasks.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/run.ts",+ "target": "dotenv/config",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/run.ts",+ "target": "node:fs",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/run.ts",+ "target": "node:os",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/run.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/run.ts",+ "target": "node:url",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/run.ts",+ "target": "src/ask/ask.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/run.ts",+ "target": "src/graph/build.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/run.ts#main",+ "target": "bench/judge.ts#judge",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "bench/run.ts#main",+ "target": "bench/llm.ts#makeClient",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "bench/run.ts#main",+ "target": "bench/report.ts#buildMarkdown",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "bench/run.ts#main",+ "target": "bench/run.ts#parseArgs",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/run.ts#main",+ "target": "bench/run.ts#pool",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/run.ts#main",+ "target": "src/ask/ask.ts#ask",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "bench/run.ts#main",+ "target": "src/ask/ask.ts#formatAsk",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "bench/run.ts#main",+ "target": "src/graph/build.ts#buildGraph",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "bench/run.ts#pool",+ "target": "bench/run.ts#pool.worker",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/selfcheck.ts",+ "target": "bench/selfcheck.ts#main",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/selfcheck.ts",+ "target": "bench/selfcheck.ts#main",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/selfcheck.ts",+ "target": "bench/selfcheck.ts#makeStubClient",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/selfcheck.ts",+ "target": "bench/agent.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/selfcheck.ts",+ "target": "bench/judge.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/selfcheck.ts",+ "target": "bench/report.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/selfcheck.ts",+ "target": "node:assert/strict",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/selfcheck.ts",+ "target": "node:fs",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/selfcheck.ts",+ "target": "node:os",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/selfcheck.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/selfcheck.ts#main",+ "target": "bench/judge.ts#judge",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "bench/selfcheck.ts#main",+ "target": "bench/report.ts#buildMarkdown",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "bench/selfcheck.ts#main",+ "target": "bench/selfcheck.ts#makeStubClient",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/tasks.ts",+ "target": "bench/tasks.ts#repoPath",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/tasks.ts",+ "target": "bench/tasks.ts#Corpus",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/tasks.ts",+ "target": "bench/tasks.ts#repoPath",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/tasks.ts",+ "target": "bench/tasks.ts#Task",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/tasks.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/tasks.ts",+ "target": "node:url",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts",+ "target": "bench/token-ab.ts#main",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts",+ "target": "bench/token-ab.ts#cost",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts",+ "target": "bench/token-ab.ts#graftPack",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts",+ "target": "bench/token-ab.ts#main",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts",+ "target": "bench/token-ab.ts#Metrics",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts",+ "target": "bench/token-ab.ts#row",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts",+ "target": "bench/token-ab.ts#runAgent",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts",+ "target": "bench/token-ab.ts#runRead",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts",+ "target": "bench/token-ab.ts#runSearch",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts",+ "target": "dotenv/config",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts",+ "target": "node:child_process",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts",+ "target": "node:fs",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts",+ "target": "openai",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts#main",+ "target": "bench/token-ab.ts#cost",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts#main",+ "target": "bench/token-ab.ts#graftPack",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts#main",+ "target": "bench/token-ab.ts#main.pct",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts#main",+ "target": "bench/token-ab.ts#row",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts#main",+ "target": "bench/token-ab.ts#runAgent",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts#main",+ "target": "bench/token-ab.ts#main.pct",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts#runAgent",+ "target": "bench/token-ab.ts#runRead",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "bench/token-ab.ts#runAgent",+ "target": "bench/token-ab.ts#runSearch",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "scripts/build-viewer.mjs",+ "target": "esbuild",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "scripts/build-viewer.mjs",+ "target": "node:fs",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "scripts/build-viewer.mjs",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "scripts/build-viewer.mjs",+ "target": "node:url",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/crux.ts",+ "target": "src/ai/crux.ts#CruxSummarizer",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/crux.ts",+ "target": "src/ai/crux.ts#FileCruxInput",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/crux.ts",+ "target": "src/ai/crux.ts#NodeCrux",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/crux.ts",+ "target": "src/ai/crux.ts#NodeRef",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/crux.ts",+ "target": "src/ai/crux.ts#numberLines",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/crux.ts",+ "target": "src/ai/crux.ts#OpenRouterCruxSummarizer",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/crux.ts",+ "target": "src/ai/crux.ts#parseResults",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/crux.ts",+ "target": "src/ai/crux.ts#userContent",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/crux.ts",+ "target": "openai",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/crux.ts",+ "target": "src/graph/types.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/crux.ts#OpenRouterCruxSummarizer",+ "target": "src/ai/crux.ts#OpenRouterCruxSummarizer.constructor",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/crux.ts#OpenRouterCruxSummarizer",+ "target": "src/ai/crux.ts#OpenRouterCruxSummarizer.describeFile",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/crux.ts#OpenRouterCruxSummarizer",+ "target": "src/ai/crux.ts#CruxSummarizer",+ "relation": "implements",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/crux.ts#OpenRouterCruxSummarizer.describeFile",+ "target": "src/ai/crux.ts#parseResults",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/crux.ts#OpenRouterCruxSummarizer.describeFile",+ "target": "src/ai/crux.ts#userContent",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/crux.ts#parseResults",+ "target": "src/ai/crux.ts#parseResults.num",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/crux.ts#parseResults",+ "target": "src/ai/crux.ts#parseResults.num",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/crux.ts#userContent",+ "target": "src/ai/crux.ts#numberLines",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/providers.ts",+ "target": "src/ai/providers.ts#EngineConfig",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/providers.ts",+ "target": "src/ai/providers.ts#resolveConfig",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/providers.ts",+ "target": "src/ai/providers.ts#ResolvedConfig",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/providers.ts",+ "target": "src/ai/summarize.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/providers.ts",+ "target": "src/ai/synthesize.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/summarize.ts",+ "target": "src/ai/summarize.ts#OpenRouterSummarizer",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/summarize.ts",+ "target": "src/ai/summarize.ts#Summarizer",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/summarize.ts",+ "target": "src/ai/summarize.ts#userContent",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/summarize.ts",+ "target": "openai",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/summarize.ts#OpenRouterSummarizer",+ "target": "src/ai/summarize.ts#OpenRouterSummarizer.constructor",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/summarize.ts#OpenRouterSummarizer",+ "target": "src/ai/summarize.ts#OpenRouterSummarizer.summarize",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/summarize.ts#OpenRouterSummarizer",+ "target": "src/ai/summarize.ts#Summarizer",+ "relation": "implements",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/summarize.ts#OpenRouterSummarizer.summarize",+ "target": "src/ai/summarize.ts#userContent",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/synthesize.ts",+ "target": "src/ai/synthesize.ts#clean",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/synthesize.ts",+ "target": "src/ai/synthesize.ts#FileSummary",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/synthesize.ts",+ "target": "src/ai/synthesize.ts#OpenRouterSynthesizer",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/synthesize.ts",+ "target": "src/ai/synthesize.ts#Synthesizer",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/synthesize.ts",+ "target": "src/ai/synthesize.ts#SynthLink",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/synthesize.ts",+ "target": "src/ai/synthesize.ts#SynthNode",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/synthesize.ts",+ "target": "src/ai/synthesize.ts#userContent",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/synthesize.ts",+ "target": "openai",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/synthesize.ts#OpenRouterSynthesizer",+ "target": "src/ai/synthesize.ts#OpenRouterSynthesizer.constructor",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/synthesize.ts#OpenRouterSynthesizer",+ "target": "src/ai/synthesize.ts#OpenRouterSynthesizer.synthesize",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/synthesize.ts#OpenRouterSynthesizer",+ "target": "src/ai/synthesize.ts#Synthesizer",+ "relation": "implements",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/synthesize.ts#OpenRouterSynthesizer.synthesize",+ "target": "src/ai/synthesize.ts#clean",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ai/synthesize.ts#OpenRouterSynthesizer.synthesize",+ "target": "src/ai/synthesize.ts#userContent",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#ask",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#AskHit",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#AskOptions",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#AskResult",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#baselineFor",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#bm25",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#computeIdf",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#computeIdfFromIndex",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#Corpus",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#fallthroughNoteFor",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#findSubjectNodes",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#firstProse",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#formatAsk",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#formatSkeleton",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#hasTerm",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#hitFiles",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#idfFromDf",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#inlineSource",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#lexical",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#loadCorpus",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#matchedIdfShare",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#parseSpan",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#savingsFooter",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#score",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#skeleton",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#SkeletonEntry",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#SkeletonResult",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#sliceSpan",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#structural",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#StructuralOutcome",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#subjectWords",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/ask.ts#toTokens",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "gray-matter",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "node:fs",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/graphrank.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/ask/index-file.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/context/node-file.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/graph/load.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/graph/traverse.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts",+ "target": "src/graph/types.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#ask",+ "target": "src/ask/ask.ts#baselineFor",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#ask",+ "target": "src/ask/ask.ts#inlineSource",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#ask",+ "target": "src/ask/ask.ts#lexical",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#ask",+ "target": "src/ask/ask.ts#loadCorpus",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#ask",+ "target": "src/ask/ask.ts#structural",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#ask",+ "target": "src/context/node-file.ts#contextDirFor",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/ask/ask.ts#baselineFor",+ "target": "src/ask/ask.ts#hitFiles",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#computeIdf",+ "target": "src/ask/ask.ts#idfFromDf",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#computeIdfFromIndex",+ "target": "src/ask/ask.ts#idfFromDf",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#findSubjectNodes",+ "target": "src/ask/ask.ts#subjectWords",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#findSubjectNodes",+ "target": "src/graph/traverse.ts#resolveSymbol",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/ask/ask.ts#formatAsk",+ "target": "src/ask/ask.ts#savingsFooter",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#hitFiles",+ "target": "src/ask/ask.ts#parseSpan",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#inlineSource",+ "target": "src/ask/ask.ts#parseSpan",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#inlineSource",+ "target": "src/ask/ask.ts#sliceSpan",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#lexical",+ "target": "src/ask/ask.ts#bm25",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#lexical",+ "target": "src/ask/ask.ts#computeIdf",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#lexical",+ "target": "src/ask/ask.ts#computeIdfFromIndex",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#lexical",+ "target": "src/ask/ask.ts#lexical.bodyLen",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#lexical",+ "target": "src/ask/ask.ts#matchedIdfShare",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#lexical",+ "target": "src/ask/ask.ts#score",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#lexical",+ "target": "src/ask/graphrank.ts#personalizedPageRank",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/ask/ask.ts#lexical",+ "target": "src/ask/index-file.ts#counts",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/ask/ask.ts#lexical",+ "target": "src/ask/index-file.ts#tokenize",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/ask/ask.ts#lexical",+ "target": "src/ask/ask.ts#lexical.bodyLen",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#loadCorpus",+ "target": "src/ask/ask.ts#firstProse",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#loadCorpus",+ "target": "src/graph/load.ts#loadAskIndexCached",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/ask/ask.ts#loadCorpus",+ "target": "src/graph/load.ts#loadGraphCached",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/ask/ask.ts#matchedIdfShare",+ "target": "src/ask/ask.ts#hasTerm",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#savingsFooter",+ "target": "src/ask/ask.ts#toTokens",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#skeleton",+ "target": "src/ask/ask.ts#skeleton.startLine",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#skeleton",+ "target": "src/context/node-file.ts#contextDirFor",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/ask/ask.ts#skeleton",+ "target": "src/graph/load.ts#loadGraphCached",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/ask/ask.ts#skeleton",+ "target": "src/ask/ask.ts#skeleton.startLine",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#structural",+ "target": "src/ask/ask.ts#fallthroughNoteFor",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/ask.ts#structural",+ "target": "src/ask/ask.ts#findSubjectNodes",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/graphrank.ts",+ "target": "src/ask/graphrank.ts#PageRankOptions",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/graphrank.ts",+ "target": "src/ask/graphrank.ts#personalizedPageRank",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/graphrank.ts",+ "target": "src/graph/types.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/graphrank.ts#personalizedPageRank",+ "target": "src/ask/graphrank.ts#personalizedPageRank.link",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/graphrank.ts#personalizedPageRank",+ "target": "src/ask/graphrank.ts#personalizedPageRank.link",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/index-file.ts",+ "target": "src/ask/index-file.ts#AskIndex",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/index-file.ts",+ "target": "src/ask/index-file.ts#AskIndexDoc",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/index-file.ts",+ "target": "src/ask/index-file.ts#askIndexPath",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/index-file.ts",+ "target": "src/ask/index-file.ts#bagLen",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/index-file.ts",+ "target": "src/ask/index-file.ts#counts",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/index-file.ts",+ "target": "src/ask/index-file.ts#pairs",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/index-file.ts",+ "target": "src/ask/index-file.ts#readAskIndex",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/index-file.ts",+ "target": "src/ask/index-file.ts#tokenize",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/index-file.ts",+ "target": "src/ask/index-file.ts#writeAskIndex",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/index-file.ts",+ "target": "node:fs",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/index-file.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/index-file.ts",+ "target": "src/context/node-file.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/index-file.ts",+ "target": "src/graph/types.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/index-file.ts#readAskIndex",+ "target": "src/ask/index-file.ts#askIndexPath",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/index-file.ts#writeAskIndex",+ "target": "src/ask/index-file.ts#askIndexPath",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/index-file.ts#writeAskIndex",+ "target": "src/ask/index-file.ts#bagLen",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/index-file.ts#writeAskIndex",+ "target": "src/ask/index-file.ts#counts",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/index-file.ts#writeAskIndex",+ "target": "src/ask/index-file.ts#pairs",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ask/index-file.ts#writeAskIndex",+ "target": "src/ask/index-file.ts#tokenize",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts",+ "target": "src/claude/format.ts#AskJson",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts",+ "target": "src/claude/format.ts#enrichedSegment",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts",+ "target": "src/claude/format.ts#formatBlastRadius",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts",+ "target": "src/claude/format.ts#formatOrientation",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts",+ "target": "src/claude/format.ts#formatRetrieval",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts",+ "target": "src/claude/format.ts#freshnessSegment",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts",+ "target": "src/claude/format.ts#incomingEdges",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts",+ "target": "src/claude/format.ts#nodeIdsInFile",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts",+ "target": "src/claude/format.ts#relevantRetrieval",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts",+ "target": "src/claude/format.ts#renderStatusline",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts",+ "target": "src/claude/format.ts#renderSubagent",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts",+ "target": "src/claude/format.ts#retrievalBody",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts",+ "target": "src/claude/format.ts#retrievalTokensSaved",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts",+ "target": "src/claude/format.ts#tokensOf",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts",+ "target": "src/claude/state.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts",+ "target": "src/graph/types.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts#formatBlastRadius",+ "target": "src/claude/format.ts#incomingEdges",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts#formatRetrieval",+ "target": "src/claude/format.ts#retrievalBody",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts#formatRetrieval",+ "target": "src/claude/format.ts#retrievalTokensSaved",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts#formatRetrieval",+ "target": "src/claude/format.ts#tokensOf",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts#incomingEdges",+ "target": "src/claude/format.ts#nodeIdsInFile",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts#relevantRetrieval",+ "target": "src/claude/format.ts#formatRetrieval",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts#renderStatusline",+ "target": "src/claude/format.ts#enrichedSegment",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts#renderStatusline",+ "target": "src/claude/format.ts#freshnessSegment",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts#retrievalTokensSaved",+ "target": "src/claude/format.ts#retrievalBody",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/format.ts#retrievalTokensSaved",+ "target": "src/claude/format.ts#tokensOf",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts",+ "target": "src/claude/hooks.ts#checkStaleCount",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts",+ "target": "src/claude/hooks.ts#emit",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts",+ "target": "src/claude/hooks.ts#graftJson",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts",+ "target": "src/claude/hooks.ts#handlePostEdit",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts",+ "target": "src/claude/hooks.ts#handleStop",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts",+ "target": "src/claude/hooks.ts#main",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts",+ "target": "src/claude/hooks.ts#projectDir",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts",+ "target": "src/claude/hooks.ts#readStdin",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts",+ "target": "src/claude/hooks.ts#safeReadFd0",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts",+ "target": "src/claude/hooks.ts#underGraft",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts",+ "target": "node:child_process",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts",+ "target": "node:fs",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts",+ "target": "src/claude/format.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts",+ "target": "src/claude/paths.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts",+ "target": "src/claude/state.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts",+ "target": "src/claude/stats.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts#checkStaleCount",+ "target": "src/claude/hooks.ts#graftJson",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts#graftJson",+ "target": "src/claude/paths.ts#graftCliPath",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/hooks.ts#handlePostEdit",+ "target": "src/claude/format.ts#formatBlastRadius",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/hooks.ts#handlePostEdit",+ "target": "src/claude/hooks.ts#checkStaleCount",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts#handlePostEdit",+ "target": "src/claude/hooks.ts#emit",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts#handlePostEdit",+ "target": "src/claude/hooks.ts#underGraft",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts#handlePostEdit",+ "target": "src/claude/state.ts#patchStats",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/hooks.ts#handlePostEdit",+ "target": "src/claude/stats.ts#readWiring",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/hooks.ts#handleStop",+ "target": "src/claude/paths.ts#claudeScriptPath",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/hooks.ts#handleStop",+ "target": "src/claude/state.ts#acquireLock",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/hooks.ts#handleStop",+ "target": "src/claude/state.ts#patchStats",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/hooks.ts#handleStop",+ "target": "src/claude/state.ts#readStats",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/hooks.ts#main",+ "target": "src/claude/format.ts#formatOrientation",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/hooks.ts#main",+ "target": "src/claude/format.ts#relevantRetrieval",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/hooks.ts#main",+ "target": "src/claude/hooks.ts#emit",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts#main",+ "target": "src/claude/hooks.ts#graftJson",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts#main",+ "target": "src/claude/hooks.ts#handlePostEdit",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts#main",+ "target": "src/claude/hooks.ts#handleStop",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts#main",+ "target": "src/claude/hooks.ts#projectDir",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts#main",+ "target": "src/claude/hooks.ts#readStdin",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/hooks.ts#main",+ "target": "src/claude/state.ts#readSession",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/hooks.ts#main",+ "target": "src/claude/state.ts#writeSession",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/hooks.ts#readStdin",+ "target": "src/claude/hooks.ts#safeReadFd0",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/init.ts",+ "target": "src/claude/init.ts#InitResult",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/init.ts",+ "target": "src/claude/init.ts#runInit",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/init.ts",+ "target": "node:child_process",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/init.ts",+ "target": "node:fs",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/init.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/init.ts",+ "target": "src/claude/paths.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/init.ts",+ "target": "src/claude/settings-merge.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/init.ts",+ "target": "src/claude/shim-template.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/init.ts",+ "target": "src/claude/skill-template.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/init.ts#runInit",+ "target": "src/claude/paths.ts#claudeDistDir",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/init.ts#runInit",+ "target": "src/claude/settings-merge.ts#mergeGraftSettings",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/init.ts#runInit",+ "target": "src/claude/shim-template.ts#hooksShim",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/init.ts#runInit",+ "target": "src/claude/shim-template.ts#statuslineShim",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/init.ts#runInit",+ "target": "src/claude/skill-template.ts#skillTemplate",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/paths.ts",+ "target": "src/claude/paths.ts#claudeDistDir",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/paths.ts",+ "target": "src/claude/paths.ts#claudeScriptPath",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/paths.ts",+ "target": "src/claude/paths.ts#graftCliPath",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/paths.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/paths.ts",+ "target": "node:url",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/settings-merge.ts",+ "target": "src/claude/settings-merge.ts#graftBlocks",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/settings-merge.ts",+ "target": "src/claude/settings-merge.ts#hookCmd",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/settings-merge.ts",+ "target": "src/claude/settings-merge.ts#isGraftHookEntry",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/settings-merge.ts",+ "target": "src/claude/settings-merge.ts#Json",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/settings-merge.ts",+ "target": "src/claude/settings-merge.ts#mergeGraftSettings",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/settings-merge.ts#graftBlocks",+ "target": "src/claude/settings-merge.ts#hookCmd",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/settings-merge.ts#mergeGraftSettings",+ "target": "src/claude/settings-merge.ts#graftBlocks",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/settings-merge.ts#mergeGraftSettings",+ "target": "src/claude/settings-merge.ts#isGraftHookEntry",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/shim-template.ts",+ "target": "src/claude/shim-template.ts#hooksShim",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/shim-template.ts",+ "target": "src/claude/shim-template.ts#shim",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/shim-template.ts",+ "target": "src/claude/shim-template.ts#statuslineShim",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/shim-template.ts#hooksShim",+ "target": "src/claude/shim-template.ts#shim",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/shim-template.ts#statuslineShim",+ "target": "src/claude/shim-template.ts#shim",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/skill-template.ts",+ "target": "src/claude/skill-template.ts#skillTemplate",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts",+ "target": "src/claude/state.ts#acquireLock",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts",+ "target": "src/claude/state.ts#cacheDir",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts",+ "target": "src/claude/state.ts#emptySession",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts",+ "target": "src/claude/state.ts#emptyStats",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts",+ "target": "src/claude/state.ts#lockPath",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts",+ "target": "src/claude/state.ts#patchStats",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts",+ "target": "src/claude/state.ts#readJson",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts",+ "target": "src/claude/state.ts#readSession",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts",+ "target": "src/claude/state.ts#readStats",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts",+ "target": "src/claude/state.ts#releaseLock",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts",+ "target": "src/claude/state.ts#sessionPath",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts",+ "target": "src/claude/state.ts#SessionState",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts",+ "target": "src/claude/state.ts#Stats",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts",+ "target": "src/claude/state.ts#statsPath",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts",+ "target": "src/claude/state.ts#writeJsonAtomic",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts",+ "target": "src/claude/state.ts#writeSession",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts",+ "target": "src/claude/state.ts#writeStats",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts",+ "target": "node:fs",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts#acquireLock",+ "target": "src/claude/state.ts#cacheDir",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts#acquireLock",+ "target": "src/claude/state.ts#lockPath",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts#lockPath",+ "target": "src/claude/state.ts#cacheDir",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts#patchStats",+ "target": "src/claude/state.ts#emptyStats",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts#patchStats",+ "target": "src/claude/state.ts#readStats",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts#patchStats",+ "target": "src/claude/state.ts#writeStats",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts#readSession",+ "target": "src/claude/state.ts#emptySession",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts#readSession",+ "target": "src/claude/state.ts#readJson",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts#readSession",+ "target": "src/claude/state.ts#sessionPath",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts#readStats",+ "target": "src/claude/state.ts#readJson",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts#readStats",+ "target": "src/claude/state.ts#statsPath",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts#releaseLock",+ "target": "src/claude/state.ts#lockPath",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts#sessionPath",+ "target": "src/claude/state.ts#cacheDir",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts#statsPath",+ "target": "src/claude/state.ts#cacheDir",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts#writeSession",+ "target": "src/claude/state.ts#sessionPath",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts#writeSession",+ "target": "src/claude/state.ts#writeJsonAtomic",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts#writeStats",+ "target": "src/claude/state.ts#statsPath",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/state.ts#writeStats",+ "target": "src/claude/state.ts#writeJsonAtomic",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/stats.ts",+ "target": "src/claude/stats.ts#computeStats",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/stats.ts",+ "target": "src/claude/stats.ts#readWiring",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/stats.ts",+ "target": "node:fs",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/stats.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/stats.ts",+ "target": "src/claude/state.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/stats.ts",+ "target": "src/graph/types.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/statusline.ts",+ "target": "src/claude/statusline.ts#main",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/statusline.ts",+ "target": "src/claude/statusline.ts#resolveStats",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/statusline.ts",+ "target": "node:fs",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/statusline.ts",+ "target": "src/claude/format.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/statusline.ts",+ "target": "src/claude/state.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/statusline.ts",+ "target": "src/claude/stats.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/statusline.ts#main",+ "target": "src/claude/format.ts#renderStatusline",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/statusline.ts#main",+ "target": "src/claude/format.ts#renderSubagent",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/statusline.ts#main",+ "target": "src/claude/state.ts#readSession",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/statusline.ts#main",+ "target": "src/claude/statusline.ts#resolveStats",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/statusline.ts#resolveStats",+ "target": "src/claude/state.ts#emptyStats",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/statusline.ts#resolveStats",+ "target": "src/claude/state.ts#readStats",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/statusline.ts#resolveStats",+ "target": "src/claude/stats.ts#computeStats",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/statusline.ts#resolveStats",+ "target": "src/claude/stats.ts#readWiring",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/sync-run.ts",+ "target": "src/claude/sync-run.ts#main",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/sync-run.ts",+ "target": "src/claude/sync-run.ts#main",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/sync-run.ts",+ "target": "src/claude/sync-run.ts#realBuild",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/sync-run.ts",+ "target": "src/claude/sync-run.ts#runSync",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/sync-run.ts",+ "target": "node:child_process",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/sync-run.ts",+ "target": "node:url",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/sync-run.ts",+ "target": "src/claude/paths.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/sync-run.ts",+ "target": "src/claude/state.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/sync-run.ts",+ "target": "src/claude/stats.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/sync-run.ts#main",+ "target": "src/claude/sync-run.ts#runSync",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/claude/sync-run.ts#realBuild",+ "target": "src/claude/paths.ts#graftCliPath",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/sync-run.ts#runSync",+ "target": "src/claude/state.ts#patchStats",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/sync-run.ts#runSync",+ "target": "src/claude/state.ts#releaseLock",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/sync-run.ts#runSync",+ "target": "src/claude/stats.ts#computeStats",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/claude/sync-run.ts#runSync",+ "target": "src/claude/stats.ts#readWiring",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli-epilogue.ts",+ "target": "src/cli-epilogue.ts#formatInitEpilogue",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-epilogue.ts",+ "target": "src/cli-epilogue.ts#indigo",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-epilogue.ts",+ "target": "src/cli-epilogue.ts#InitEpilogueOptions",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-epilogue.ts",+ "target": "src/cli-epilogue.ts#muted",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-epilogue.ts",+ "target": "src/cli-epilogue.ts#Step",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-epilogue.ts#formatInitEpilogue",+ "target": "src/cli-epilogue.ts#indigo",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-epilogue.ts#formatInitEpilogue",+ "target": "src/cli-epilogue.ts#muted",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts",+ "target": "src/cli-meta.ts#formatUpgradeReport",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts",+ "target": "src/cli-meta.ts#formatVersionReport",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts",+ "target": "src/cli-meta.ts#getNpmViewVersion",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts",+ "target": "src/cli-meta.ts#globalRoot",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts",+ "target": "src/cli-meta.ts#isRunningViaNpx",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts",+ "target": "src/cli-meta.ts#NpmViewResult",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts",+ "target": "src/cli-meta.ts#readCurrentVersion",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts",+ "target": "src/cli-meta.ts#readGlobalInstalledVersion",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts",+ "target": "src/cli-meta.ts#resolvePackageJsonPath",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts",+ "target": "src/cli-meta.ts#runUpgrade",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts",+ "target": "src/cli-meta.ts#UpgradeResult",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts",+ "target": "node:child_process",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts",+ "target": "node:fs",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts",+ "target": "node:url",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts#readCurrentVersion",+ "target": "src/cli-meta.ts#resolvePackageJsonPath",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts#readGlobalInstalledVersion",+ "target": "src/cli-meta.ts#globalRoot",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts#runUpgrade",+ "target": "src/cli-meta.ts#getNpmViewVersion",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts#runUpgrade",+ "target": "src/cli-meta.ts#isRunningViaNpx",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts#runUpgrade",+ "target": "src/cli-meta.ts#readCurrentVersion",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/cli-meta.ts#runUpgrade",+ "target": "src/cli-meta.ts#readGlobalInstalledVersion",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "src/ai/providers.ts#resolveConfig",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/ask/ask.ts#formatAsk",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/ask/ask.ts#formatSkeleton",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/ask/ask.ts#skeleton",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/claude/init.ts#runInit",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/cli-epilogue.ts#formatInitEpilogue",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/cli-meta.ts#formatUpgradeReport",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/cli-meta.ts#formatVersionReport",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/cli-meta.ts#getNpmViewVersion",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/cli-meta.ts#readCurrentVersion",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/cli-meta.ts#runUpgrade",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/cli.ts#engineFrom",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "src/cli.ts#fmt",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "src/cli.ts#traverseAction",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "src/context/check.ts#formatCheckReport",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/context/node-file.ts#contextDirFor",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/engine.ts#Graft.ask",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/engine.ts#Graft.check",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/engine.ts#Graft.checkGraph",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/engine.ts#Graft.graph",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/engine.ts#Graft.init",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/graph/check.ts#formatGraphCheckReport",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/graph/load.ts#loadGraphCached",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/hosts/init.ts#runHostsInit",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/hosts/registry.ts#hostIds",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/mcp/server.ts#startMcpServer",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/viz/serve.ts#startVizServer",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/cli.ts",+ "target": "src/cli.ts#engineFrom",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "src/cli.ts#fmt",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "src/cli.ts#traverseAction",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "commander",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "dotenv/config",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "node:url",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "src/ai/providers.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "src/claude/init.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "src/cli-epilogue.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "src/cli-meta.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "src/context/check.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "src/context/node-file.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "src/engine.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "src/graph/check.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "src/graph/load.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "src/hosts/init.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts",+ "target": "src/hosts/registry.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/cli.ts#traverseAction",+ "target": "src/graph/traverse-cli.ts#runTraverseCommand",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/context/build.ts#batchBySize",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/context/build.ts#batchKey",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/context/build.ts#BuildCache",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/context/build.ts#buildContext",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/context/build.ts#BuildOptions",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/context/build.ts#BuildProgress",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/context/build.ts#BuildResult",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/context/build.ts#cachePath",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/context/build.ts#errMsg",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/context/build.ts#FileWork",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/context/build.ts#loadCache",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/context/build.ts#mapWithConcurrency",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/context/build.ts#NodeDraft",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/context/build.ts#registerName",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/context/build.ts#resolveSlug",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/context/build.ts#saveCache",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "node:fs",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/ai/summarize.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/ai/synthesize.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/context/node-file.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/ingest/fs.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts",+ "target": "src/util/id.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts#batchKey",+ "target": "src/util/id.ts#contentHash",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/context/build.ts#buildContext",+ "target": "src/context/build.ts#batchBySize",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts#buildContext",+ "target": "src/context/build.ts#batchKey",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts#buildContext",+ "target": "src/context/build.ts#errMsg",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts#buildContext",+ "target": "src/context/build.ts#loadCache",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts#buildContext",+ "target": "src/context/build.ts#mapWithConcurrency",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts#buildContext",+ "target": "src/context/build.ts#registerName",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts#buildContext",+ "target": "src/context/build.ts#resolveSlug",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts#buildContext",+ "target": "src/context/build.ts#saveCache",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts#buildContext",+ "target": "src/context/node-file.ts#contextDirFor",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/context/build.ts#buildContext",+ "target": "src/context/node-file.ts#deleteNode",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/context/build.ts#buildContext",+ "target": "src/context/node-file.ts#digestSources",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/context/build.ts#buildContext",+ "target": "src/context/node-file.ts#existingNodeSlugs",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/context/build.ts#buildContext",+ "target": "src/context/node-file.ts#slugify",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/context/build.ts#buildContext",+ "target": "src/context/node-file.ts#writeManifest",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/context/build.ts#buildContext",+ "target": "src/context/node-file.ts#writeNode",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/context/build.ts#buildContext",+ "target": "src/ingest/fs.ts#walkDir",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/context/build.ts#buildContext",+ "target": "src/util/id.ts#contentHash",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/context/build.ts#loadCache",+ "target": "src/context/build.ts#cachePath",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/context/build.ts#saveCache",+ "target": "src/context/build.ts#cachePath",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/context/check.ts",+ "target": "src/context/check.ts#checkContext","relation": "contains","confidence": "extracted"},{- "source": "bench/agent.ts",- "target": "bench/agent.ts#runAgent",+ "source": "src/context/check.ts",+ "target": "src/context/check.ts#CheckOptions","relation": "contains","confidence": "extracted"},{- "source": "bench/agent.ts",- "target": "bench/agent.ts#RunAgentOptions",+ "source": "src/context/check.ts",+ "target": "src/context/check.ts#CheckResult","relation": "contains","confidence": "extracted"},{- "source": "bench/agent.ts",- "target": "bench/agent.ts#runTool",+ "source": "src/context/check.ts",+ "target": "src/context/check.ts#formatCheckReport","relation": "contains","confidence": "extracted"},{- "source": "bench/agent.ts",- "target": "bench/agent.ts#safePath",+ "source": "src/context/check.ts",+ "target": "src/context/check.ts#short","relation": "contains","confidence": "extracted"},{- "source": "bench/agent.ts",- "target": "bench/llm.ts",+ "source": "src/context/check.ts",+ "target": "node:fs","relation": "imports","confidence": "extracted"},{- "source": "bench/agent.ts",- "target": "node:fs",+ "source": "src/context/check.ts",+ "target": "node:path","relation": "imports","confidence": "extracted"},{- "source": "bench/agent.ts",- "target": "node:path",+ "source": "src/context/check.ts",+ "target": "src/context/build.ts","relation": "imports","confidence": "extracted"},{- "source": "bench/agent.ts",- "target": "openai",+ "source": "src/context/check.ts",+ "target": "src/context/node-file.ts","relation": "imports","confidence": "extracted"},{- "source": "bench/agent.ts",+ "source": "src/context/check.ts","target": "src/ingest/fs.ts","relation": "imports","confidence": "extracted"},{- "source": "bench/agent.ts#listFiles",- "target": "bench/agent.ts#listFiles.walk",- "relation": "calls",+ "source": "src/context/check.ts",+ "target": "src/util/id.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "bench/agent.ts#listFiles",- "target": "bench/agent.ts#listFiles.walk",- "relation": "contains",+ "source": "src/context/check.ts#checkContext",+ "target": "src/context/check.ts#short",+ "relation": "calls","confidence": "extracted"},{- "source": "bench/agent.ts#listFiles.walk",- "target": "bench/agent.ts#listFiles.walk",+ "source": "src/context/check.ts#checkContext",+ "target": "src/context/node-file.ts#contextDirFor","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "bench/agent.ts#runAgent",- "target": "bench/agent.ts#runAgent.slideCacheBreakpoint",+ "source": "src/context/check.ts#checkContext",+ "target": "src/context/node-file.ts#readManifest","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "bench/agent.ts#runAgent",- "target": "bench/agent.ts#runTool",+ "source": "src/context/check.ts#checkContext",+ "target": "src/context/node-file.ts#readNodes","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "bench/agent.ts#runAgent",- "target": "bench/llm.ts#makeClient",+ "source": "src/context/check.ts#checkContext",+ "target": "src/ingest/fs.ts#walkDir","relation": "calls","confidence": "inferred"},{- "source": "bench/agent.ts#runAgent",- "target": "bench/agent.ts#runAgent.slideCacheBreakpoint",+ "source": "src/context/check.ts#checkContext",+ "target": "src/util/id.ts#contentHash",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/context/node-file.ts",+ "target": "src/context/node-file.ts#contextDirFor","relation": "contains","confidence": "extracted"},{- "source": "bench/agent.ts#runTool",- "target": "bench/agent.ts#globToRegExp",- "relation": "calls",+ "source": "src/context/node-file.ts",+ "target": "src/context/node-file.ts#ContextNode",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/agent.ts#runTool",- "target": "bench/agent.ts#listFiles",- "relation": "calls",+ "source": "src/context/node-file.ts",+ "target": "src/context/node-file.ts#defaultHuman",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/agent.ts#runTool",- "target": "bench/agent.ts#safePath",- "relation": "calls",+ "source": "src/context/node-file.ts",+ "target": "src/context/node-file.ts#deleteNode",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/judge.ts",- "target": "bench/judge.ts#extractJson",+ "source": "src/context/node-file.ts",+ "target": "src/context/node-file.ts#digestSources","relation": "contains","confidence": "extracted"},{- "source": "bench/judge.ts",- "target": "bench/judge.ts#judge",+ "source": "src/context/node-file.ts",+ "target": "src/context/node-file.ts#existingNodeSlugs","relation": "contains","confidence": "extracted"},{- "source": "bench/judge.ts",- "target": "bench/judge.ts#JudgeInput",+ "source": "src/context/node-file.ts",+ "target": "src/context/node-file.ts#Manifest","relation": "contains","confidence": "extracted"},{- "source": "bench/judge.ts",- "target": "bench/judge.ts#Verdict",+ "source": "src/context/node-file.ts",+ "target": "src/context/node-file.ts#NodeLink","relation": "contains","confidence": "extracted"},{- "source": "bench/judge.ts",- "target": "bench/llm.ts",- "relation": "imports",+ "source": "src/context/node-file.ts",+ "target": "src/context/node-file.ts#ParsedNode",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/judge.ts",- "target": "openai",- "relation": "imports",+ "source": "src/context/node-file.ts",+ "target": "src/context/node-file.ts#preserveHuman",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/judge.ts#judge",- "target": "bench/judge.ts#extractJson",- "relation": "calls",+ "source": "src/context/node-file.ts",+ "target": "src/context/node-file.ts#readManifest",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/judge.ts#judge",- "target": "bench/llm.ts#makeClient",- "relation": "calls",- "confidence": "inferred"+ "source": "src/context/node-file.ts",+ "target": "src/context/node-file.ts#readNodes",+ "relation": "contains",+ "confidence": "extracted"},{- "source": "bench/llm.ts",- "target": "bench/llm.ts#makeClient",+ "source": "src/context/node-file.ts",+ "target": "src/context/node-file.ts#renderGenerated","relation": "contains","confidence": "extracted"},{- "source": "bench/llm.ts",- "target": "openai",- "relation": "imports",+ "source": "src/context/node-file.ts",+ "target": "src/context/node-file.ts#renderNodeFile",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/report.ts",- "target": "bench/report.ts#aggregate",+ "source": "src/context/node-file.ts",+ "target": "src/context/node-file.ts#slugify","relation": "contains","confidence": "extracted"},{- "source": "bench/report.ts",- "target": "bench/report.ts#ArmAgg",+ "source": "src/context/node-file.ts",+ "target": "src/context/node-file.ts#SourceRef","relation": "contains","confidence": "extracted"},{- "source": "bench/report.ts",- "target": "bench/report.ts#buildMarkdown",+ "source": "src/context/node-file.ts",+ "target": "src/context/node-file.ts#writeManifest","relation": "contains","confidence": "extracted"},{- "source": "bench/report.ts",- "target": "bench/report.ts#costOf",+ "source": "src/context/node-file.ts",+ "target": "src/context/node-file.ts#writeNode","relation": "contains","confidence": "extracted"},{- "source": "bench/report.ts",- "target": "bench/report.ts#fmt",+ "source": "src/context/node-file.ts",+ "target": "gray-matter",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/context/node-file.ts",+ "target": "node:fs",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/context/node-file.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/context/node-file.ts",+ "target": "src/util/id.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/context/node-file.ts#digestSources",+ "target": "src/util/id.ts#contentHash",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/context/node-file.ts#preserveHuman",+ "target": "src/context/node-file.ts#defaultHuman",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/context/node-file.ts#renderNodeFile",+ "target": "src/context/node-file.ts#renderGenerated",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/context/node-file.ts#slugify",+ "target": "src/util/id.ts#normalizeName",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/context/node-file.ts#writeNode",+ "target": "src/context/node-file.ts#defaultHuman",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/context/node-file.ts#writeNode",+ "target": "src/context/node-file.ts#preserveHuman",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/context/node-file.ts#writeNode",+ "target": "src/context/node-file.ts#renderNodeFile",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/engine.ts",+ "target": "src/engine.ts#CheckRunOptions","relation": "contains","confidence": "extracted"},{- "source": "bench/report.ts",- "target": "bench/report.ts#mean",+ "source": "src/engine.ts",+ "target": "src/engine.ts#Graft","relation": "contains","confidence": "extracted"},{- "source": "bench/report.ts",- "target": "bench/report.ts#pctDelta",+ "source": "src/engine.ts",+ "target": "src/engine.ts#GraphRunOptions","relation": "contains","confidence": "extracted"},{- "source": "bench/report.ts",- "target": "bench/report.ts#Row",+ "source": "src/engine.ts",+ "target": "src/engine.ts#InitOptions","relation": "contains","confidence": "extracted"},{- "source": "bench/report.ts#aggregate",- "target": "bench/report.ts#costOf",- "relation": "calls",+ "source": "src/engine.ts",+ "target": "src/ai/crux.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/engine.ts",+ "target": "src/ai/providers.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/engine.ts",+ "target": "src/ai/summarize.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "bench/report.ts#aggregate",- "target": "bench/report.ts#mean",- "relation": "calls",+ "source": "src/engine.ts",+ "target": "src/ai/synthesize.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "bench/report.ts#buildMarkdown",- "target": "bench/report.ts#aggregate",- "relation": "calls",+ "source": "src/engine.ts",+ "target": "src/ask/ask.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "bench/report.ts#buildMarkdown",- "target": "bench/report.ts#fmt",- "relation": "calls",+ "source": "src/engine.ts",+ "target": "src/context/build.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "bench/report.ts#buildMarkdown",- "target": "bench/report.ts#pctDelta",- "relation": "calls",+ "source": "src/engine.ts",+ "target": "src/context/check.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "bench/run.ts",- "target": "bench/run.ts#main",- "relation": "calls",+ "source": "src/engine.ts",+ "target": "src/graph/build.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "bench/run.ts",- "target": "bench/run.ts#Args",- "relation": "contains",+ "source": "src/engine.ts",+ "target": "src/graph/check.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "bench/run.ts",- "target": "bench/run.ts#main",+ "source": "src/engine.ts#Graft",+ "target": "src/engine.ts#Graft.ask","relation": "contains","confidence": "extracted"},{- "source": "bench/run.ts",- "target": "bench/run.ts#makeDocsWorkdir",+ "source": "src/engine.ts#Graft",+ "target": "src/engine.ts#Graft.check","relation": "contains","confidence": "extracted"},{- "source": "bench/run.ts",- "target": "bench/run.ts#parseArgs",+ "source": "src/engine.ts#Graft",+ "target": "src/engine.ts#Graft.checkGraph","relation": "contains","confidence": "extracted"},{- "source": "bench/run.ts",- "target": "bench/run.ts#pool",+ "source": "src/engine.ts#Graft",+ "target": "src/engine.ts#Graft.constructor","relation": "contains","confidence": "extracted"},{- "source": "bench/run.ts",- "target": "../src/ingest/pdf.js",- "relation": "imports",+ "source": "src/engine.ts#Graft",+ "target": "src/engine.ts#Graft.cruxSummarizer",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/run.ts",- "target": "bench/agent.ts",- "relation": "imports",+ "source": "src/engine.ts#Graft",+ "target": "src/engine.ts#Graft.graph",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/run.ts",- "target": "bench/judge.ts",- "relation": "imports",+ "source": "src/engine.ts#Graft",+ "target": "src/engine.ts#Graft.init",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/run.ts",- "target": "bench/llm.ts",- "relation": "imports",+ "source": "src/engine.ts#Graft",+ "target": "src/engine.ts#Graft.modelLabel",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/run.ts",- "target": "bench/report.ts",- "relation": "imports",+ "source": "src/engine.ts#Graft",+ "target": "src/engine.ts#Graft.requireKey",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/run.ts",- "target": "bench/tasks.ts",- "relation": "imports",+ "source": "src/engine.ts#Graft",+ "target": "src/engine.ts#Graft.summarizer",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/run.ts",- "target": "dotenv/config",- "relation": "imports",+ "source": "src/engine.ts#Graft",+ "target": "src/engine.ts#Graft.synthesizer",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/run.ts",- "target": "node:fs",- "relation": "imports",- "confidence": "extracted"+ "source": "src/engine.ts#Graft.ask",+ "target": "src/ask/ask.ts#ask",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "bench/run.ts",- "target": "node:os",- "relation": "imports",- "confidence": "extracted"+ "source": "src/engine.ts#Graft.check",+ "target": "src/context/check.ts#checkContext",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "bench/run.ts",- "target": "node:path",- "relation": "imports",- "confidence": "extracted"+ "source": "src/engine.ts#Graft.checkGraph",+ "target": "src/graph/check.ts#checkGraph",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "bench/run.ts",- "target": "node:url",- "relation": "imports",- "confidence": "extracted"+ "source": "src/engine.ts#Graft.constructor",+ "target": "src/ai/providers.ts#resolveConfig",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "bench/run.ts",- "target": "src/index.ts",- "relation": "imports",+ "source": "src/engine.ts#Graft.cruxSummarizer",+ "target": "src/engine.ts#Graft.requireKey",+ "relation": "calls","confidence": "extracted"},{- "source": "bench/run.ts",- "target": "src/ingest/fs.ts",- "relation": "imports",+ "source": "src/engine.ts#Graft.graph",+ "target": "src/engine.ts#Graft.cruxSummarizer",+ "relation": "calls","confidence": "extracted"},{- "source": "bench/run.ts#main",- "target": "bench/judge.ts#judge",+ "source": "src/engine.ts#Graft.graph",+ "target": "src/graph/build.ts#buildGraph","relation": "calls","confidence": "inferred"},{- "source": "bench/run.ts#main",- "target": "bench/llm.ts#makeClient",+ "source": "src/engine.ts#Graft.init",+ "target": "src/context/build.ts#buildContext","relation": "calls","confidence": "inferred"},{- "source": "bench/run.ts#main",- "target": "bench/report.ts#buildMarkdown",+ "source": "src/engine.ts#Graft.init",+ "target": "src/engine.ts#Graft.modelLabel","relation": "calls",- "confidence": "inferred"+ "confidence": "extracted"},{- "source": "bench/run.ts#main",- "target": "bench/run.ts#makeDocsWorkdir",+ "source": "src/engine.ts#Graft.init",+ "target": "src/engine.ts#Graft.summarizer","relation": "calls","confidence": "extracted"},{- "source": "bench/run.ts#main",- "target": "bench/run.ts#parseArgs",+ "source": "src/engine.ts#Graft.init",+ "target": "src/engine.ts#Graft.synthesizer","relation": "calls","confidence": "extracted"},{- "source": "bench/run.ts#main",- "target": "bench/run.ts#pool",+ "source": "src/engine.ts#Graft.summarizer",+ "target": "src/engine.ts#Graft.requireKey","relation": "calls","confidence": "extracted"},{- "source": "bench/run.ts#main",- "target": "src/viz/serve.ts#startVizServer.close",+ "source": "src/engine.ts#Graft.synthesizer",+ "target": "src/engine.ts#Graft.requireKey","relation": "calls",- "confidence": "inferred"+ "confidence": "extracted"},{- "source": "bench/run.ts#pool",- "target": "bench/run.ts#pool.worker",+ "source": "src/graph/build.ts",+ "target": "src/graph/build.ts#buildGraph","relation": "contains","confidence": "extracted"},{- "source": "bench/selfcheck.ts",- "target": "bench/selfcheck.ts#main",- "relation": "calls",+ "source": "src/graph/build.ts",+ "target": "src/graph/build.ts#GraphBuildOptions",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/selfcheck.ts",- "target": "bench/selfcheck.ts#main",+ "source": "src/graph/build.ts",+ "target": "src/graph/build.ts#GraphBuildResult","relation": "contains","confidence": "extracted"},{- "source": "bench/selfcheck.ts",- "target": "bench/selfcheck.ts#makeStubClient",+ "source": "src/graph/build.ts",+ "target": "src/graph/build.ts#listSourceFiles","relation": "contains","confidence": "extracted"},{- "source": "bench/selfcheck.ts",- "target": "bench/agent.ts",+ "source": "src/graph/build.ts",+ "target": "src/graph/build.ts#readGoModules",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/graph/build.ts",+ "target": "node:fs","relation": "imports","confidence": "extracted"},{- "source": "bench/selfcheck.ts",- "target": "bench/judge.ts",+ "source": "src/graph/build.ts",+ "target": "node:path","relation": "imports","confidence": "extracted"},{- "source": "bench/selfcheck.ts",- "target": "bench/report.ts",+ "source": "src/graph/build.ts",+ "target": "src/ai/crux.ts","relation": "imports","confidence": "extracted"},{- "source": "bench/selfcheck.ts",- "target": "node:assert/strict",+ "source": "src/graph/build.ts",+ "target": "src/ask/index-file.ts","relation": "imports","confidence": "extracted"},{- "source": "bench/selfcheck.ts",- "target": "node:fs",+ "source": "src/graph/build.ts",+ "target": "src/context/node-file.ts","relation": "imports","confidence": "extracted"},{- "source": "bench/selfcheck.ts",- "target": "node:os",+ "source": "src/graph/build.ts",+ "target": "src/graph/cards.ts","relation": "imports","confidence": "extracted"},{- "source": "bench/selfcheck.ts",- "target": "node:path",+ "source": "src/graph/build.ts",+ "target": "src/graph/enrich.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/graph/build.ts",+ "target": "src/graph/extract.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/graph/build.ts",+ "target": "src/graph/resolve.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/graph/build.ts",+ "target": "src/graph/types.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/graph/build.ts",+ "target": "src/graph/write.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/graph/build.ts",+ "target": "src/ingest/fs.ts","relation": "imports","confidence": "extracted"},{- "source": "bench/selfcheck.ts#main",- "target": "bench/judge.ts#judge",+ "source": "src/graph/build.ts#buildGraph",+ "target": "src/ask/index-file.ts#writeAskIndex","relation": "calls","confidence": "inferred"},{- "source": "bench/selfcheck.ts#main",- "target": "bench/report.ts#buildMarkdown",+ "source": "src/graph/build.ts#buildGraph",+ "target": "src/context/node-file.ts#contextDirFor","relation": "calls","confidence": "inferred"},{- "source": "bench/selfcheck.ts#main",- "target": "bench/selfcheck.ts#makeStubClient",+ "source": "src/graph/build.ts#buildGraph",+ "target": "src/graph/build.ts#listSourceFiles","relation": "calls","confidence": "extracted"},{- "source": "bench/tasks.ts",- "target": "bench/tasks.ts#repoPath",+ "source": "src/graph/build.ts#buildGraph",+ "target": "src/graph/build.ts#readGoModules","relation": "calls","confidence": "extracted"},{- "source": "bench/tasks.ts",- "target": "bench/tasks.ts#Corpus",- "relation": "contains",- "confidence": "extracted"+ "source": "src/graph/build.ts#buildGraph",+ "target": "src/graph/cards.ts#writeCards",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "bench/tasks.ts",- "target": "bench/tasks.ts#repoPath",- "relation": "contains",- "confidence": "extracted"+ "source": "src/graph/build.ts#buildGraph",+ "target": "src/graph/cards.ts#writeCovers",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "bench/tasks.ts",- "target": "bench/tasks.ts#Task",- "relation": "contains",- "confidence": "extracted"+ "source": "src/graph/build.ts#buildGraph",+ "target": "src/graph/cards.ts#writeIndex",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "bench/tasks.ts",- "target": "node:path",- "relation": "imports",- "confidence": "extracted"+ "source": "src/graph/build.ts#buildGraph",+ "target": "src/graph/enrich.ts#enrichGraph",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "bench/tasks.ts",- "target": "node:url",- "relation": "imports",- "confidence": "extracted"+ "source": "src/graph/build.ts#buildGraph",+ "target": "src/graph/extract.ts#extractFile",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "bench/token-ab.ts",- "target": "bench/token-ab.ts#main",+ "source": "src/graph/build.ts#buildGraph",+ "target": "src/graph/extract.ts#languageOf","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "bench/token-ab.ts",- "target": "bench/token-ab.ts#cost",- "relation": "contains",- "confidence": "extracted"+ "source": "src/graph/build.ts#buildGraph",+ "target": "src/graph/resolve.ts#resolveEdges",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "bench/token-ab.ts",- "target": "bench/token-ab.ts#graftPack",- "relation": "contains",- "confidence": "extracted"+ "source": "src/graph/build.ts#buildGraph",+ "target": "src/graph/write.ts#readGraph",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "bench/token-ab.ts",- "target": "bench/token-ab.ts#main",- "relation": "contains",- "confidence": "extracted"+ "source": "src/graph/build.ts#buildGraph",+ "target": "src/graph/write.ts#wiringPath",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "bench/token-ab.ts",- "target": "bench/token-ab.ts#Metrics",- "relation": "contains",- "confidence": "extracted"+ "source": "src/graph/build.ts#buildGraph",+ "target": "src/graph/write.ts#writeGraph",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "bench/token-ab.ts",- "target": "bench/token-ab.ts#row",- "relation": "contains",- "confidence": "extracted"+ "source": "src/graph/build.ts#listSourceFiles",+ "target": "src/graph/extract.ts#languageOf",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "bench/token-ab.ts",- "target": "bench/token-ab.ts#runAgent",- "relation": "contains",- "confidence": "extracted"+ "source": "src/graph/build.ts#listSourceFiles",+ "target": "src/ingest/fs.ts#walkDir",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "bench/token-ab.ts",- "target": "bench/token-ab.ts#runRead",- "relation": "contains",- "confidence": "extracted"+ "source": "src/graph/build.ts#readGoModules",+ "target": "src/ingest/fs.ts#walkDir",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "bench/token-ab.ts",- "target": "bench/token-ab.ts#runSearch",+ "source": "src/graph/cards.ts",+ "target": "src/graph/cards.ts#CardFileInfo","relation": "contains","confidence": "extracted"},{- "source": "bench/token-ab.ts",- "target": "dotenv/config",- "relation": "imports",- "confidence": "extracted"- },- {- "source": "bench/token-ab.ts",- "target": "node:child_process",- "relation": "imports",+ "source": "src/graph/cards.ts",+ "target": "src/graph/cards.ts#cardPathFor",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/token-ab.ts",- "target": "node:fs",- "relation": "imports",+ "source": "src/graph/cards.ts",+ "target": "src/graph/cards.ts#CardStats",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/token-ab.ts",- "target": "node:path",- "relation": "imports",+ "source": "src/graph/cards.ts",+ "target": "src/graph/cards.ts#conceptsByPath",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/token-ab.ts",- "target": "openai",- "relation": "imports",+ "source": "src/graph/cards.ts",+ "target": "src/graph/cards.ts#CoverRef",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/token-ab.ts#main",- "target": "bench/token-ab.ts#cost",- "relation": "calls",+ "source": "src/graph/cards.ts",+ "target": "src/graph/cards.ts#listExistingCards",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/token-ab.ts#main",- "target": "bench/token-ab.ts#graftPack",- "relation": "calls",+ "source": "src/graph/cards.ts",+ "target": "src/graph/cards.ts#oneLiner",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/token-ab.ts#main",- "target": "bench/token-ab.ts#main.pct",- "relation": "calls",+ "source": "src/graph/cards.ts",+ "target": "src/graph/cards.ts#pruneEmptyDirs",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/token-ab.ts#main",- "target": "bench/token-ab.ts#row",- "relation": "calls",+ "source": "src/graph/cards.ts",+ "target": "src/graph/cards.ts#renderCard",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/token-ab.ts#main",- "target": "bench/token-ab.ts#runAgent",- "relation": "calls",+ "source": "src/graph/cards.ts",+ "target": "src/graph/cards.ts#spanStart",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/token-ab.ts#main",- "target": "bench/token-ab.ts#main.pct",+ "source": "src/graph/cards.ts",+ "target": "src/graph/cards.ts#writeCards","relation": "contains","confidence": "extracted"},{- "source": "bench/token-ab.ts#runAgent",- "target": "bench/token-ab.ts#runRead",- "relation": "calls",+ "source": "src/graph/cards.ts",+ "target": "src/graph/cards.ts#writeCovers",+ "relation": "contains","confidence": "extracted"},{- "source": "bench/token-ab.ts#runAgent",- "target": "bench/token-ab.ts#runSearch",- "relation": "calls",+ "source": "src/graph/cards.ts",+ "target": "src/graph/cards.ts#writeIndex",+ "relation": "contains","confidence": "extracted"},{- "source": "scripts/build-viewer.mjs",- "target": "esbuild",+ "source": "src/graph/cards.ts",+ "target": "gray-matter","relation": "imports","confidence": "extracted"},{- "source": "scripts/build-viewer.mjs",+ "source": "src/graph/cards.ts","target": "node:fs","relation": "imports","confidence": "extracted"},{- "source": "scripts/build-viewer.mjs",+ "source": "src/graph/cards.ts","target": "node:path","relation": "imports","confidence": "extracted"},{- "source": "scripts/build-viewer.mjs",- "target": "node:url",+ "source": "src/graph/cards.ts",+ "target": "src/context/node-file.ts","relation": "imports","confidence": "extracted"},{- "source": "src/ai/crux.ts",- "target": "src/ai/crux.ts#CruxSummarizer",- "relation": "contains",+ "source": "src/graph/cards.ts",+ "target": "src/graph/types.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/ai/crux.ts",- "target": "src/ai/crux.ts#FileCruxInput",- "relation": "contains",+ "source": "src/graph/cards.ts",+ "target": "src/graph/write.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/ai/crux.ts",- "target": "src/ai/crux.ts#NodeCrux",- "relation": "contains",- "confidence": "extracted"+ "source": "src/graph/cards.ts#conceptsByPath",+ "target": "src/context/node-file.ts#readNodes",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/ai/crux.ts",- "target": "src/ai/crux.ts#NodeRef",- "relation": "contains",+ "source": "src/graph/cards.ts#listExistingCards",+ "target": "src/graph/cards.ts#listExistingCards.walk",+ "relation": "calls","confidence": "extracted"},{- "source": "src/ai/crux.ts",- "target": "src/ai/crux.ts#numberLines",+ "source": "src/graph/cards.ts#listExistingCards",+ "target": "src/graph/cards.ts#listExistingCards.walk","relation": "contains","confidence": "extracted"},{- "source": "src/ai/crux.ts",- "target": "src/ai/crux.ts#OpenRouterCruxSummarizer",- "relation": "contains",+ "source": "src/graph/cards.ts#listExistingCards.walk",+ "target": "src/graph/cards.ts#listExistingCards.walk",+ "relation": "calls","confidence": "extracted"},{- "source": "src/ai/crux.ts",- "target": "src/ai/crux.ts#parseResults",- "relation": "contains",+ "source": "src/graph/cards.ts#pruneEmptyDirs",+ "target": "src/graph/cards.ts#pruneEmptyDirs.visit",+ "relation": "calls","confidence": "extracted"},{- "source": "src/ai/crux.ts",- "target": "src/ai/crux.ts#userContent",+ "source": "src/graph/cards.ts#pruneEmptyDirs",+ "target": "src/graph/cards.ts#pruneEmptyDirs.visit","relation": "contains","confidence": "extracted"},{- "source": "src/ai/crux.ts",- "target": "openai",- "relation": "imports",+ "source": "src/graph/cards.ts#pruneEmptyDirs.visit",+ "target": "src/graph/cards.ts#pruneEmptyDirs.visit",+ "relation": "calls","confidence": "extracted"},{- "source": "src/ai/crux.ts",- "target": "src/graph/types.ts",- "relation": "imports",+ "source": "src/graph/cards.ts#renderCard",+ "target": "src/graph/cards.ts#oneLiner",+ "relation": "calls","confidence": "extracted"},{- "source": "src/ai/crux.ts#OpenRouterCruxSummarizer",- "target": "src/ai/crux.ts#OpenRouterCruxSummarizer.constructor",- "relation": "contains",+ "source": "src/graph/cards.ts#renderCard",+ "target": "src/graph/cards.ts#spanStart",+ "relation": "calls","confidence": "extracted"},{- "source": "src/ai/crux.ts#OpenRouterCruxSummarizer",- "target": "src/ai/crux.ts#OpenRouterCruxSummarizer.describeFile",- "relation": "contains",+ "source": "src/graph/cards.ts#writeCards",+ "target": "src/graph/cards.ts#cardPathFor",+ "relation": "calls","confidence": "extracted"},{- "source": "src/ai/crux.ts#OpenRouterCruxSummarizer",- "target": "src/ai/crux.ts#CruxSummarizer",- "relation": "implements",+ "source": "src/graph/cards.ts#writeCards",+ "target": "src/graph/cards.ts#conceptsByPath",+ "relation": "calls","confidence": "extracted"},{- "source": "src/ai/crux.ts#OpenRouterCruxSummarizer.describeFile",- "target": "src/ai/crux.ts#parseResults",+ "source": "src/graph/cards.ts#writeCards",+ "target": "src/graph/cards.ts#listExistingCards","relation": "calls","confidence": "extracted"},{- "source": "src/ai/crux.ts#OpenRouterCruxSummarizer.describeFile",- "target": "src/ai/crux.ts#userContent",+ "source": "src/graph/cards.ts#writeCards",+ "target": "src/graph/cards.ts#pruneEmptyDirs","relation": "calls","confidence": "extracted"},{- "source": "src/ai/crux.ts#parseResults",- "target": "src/ai/crux.ts#parseResults.num",+ "source": "src/graph/cards.ts#writeCards",+ "target": "src/graph/cards.ts#renderCard","relation": "calls","confidence": "extracted"},{- "source": "src/ai/crux.ts#parseResults",- "target": "src/ai/crux.ts#parseResults.num",- "relation": "contains",+ "source": "src/graph/cards.ts#writeCovers",+ "target": "src/graph/cards.ts#spanStart",+ "relation": "calls","confidence": "extracted"},{- "source": "src/ai/crux.ts#userContent",- "target": "src/ai/crux.ts#numberLines",+ "source": "src/graph/cards.ts#writeIndex",+ "target": "src/context/node-file.ts#readNodes","relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/graph/check.ts",+ "target": "src/graph/check.ts#checkGraph",+ "relation": "contains","confidence": "extracted"},{- "source": "src/ai/providers.ts",- "target": "src/ai/providers.ts#EngineConfig",+ "source": "src/graph/check.ts",+ "target": "src/graph/check.ts#formatGraphCheckReport","relation": "contains","confidence": "extracted"},{- "source": "src/ai/providers.ts",- "target": "src/ai/providers.ts#resolveConfig",+ "source": "src/graph/check.ts",+ "target": "src/graph/check.ts#GraphCheckOptions","relation": "contains","confidence": "extracted"},{- "source": "src/ai/providers.ts",- "target": "src/ai/providers.ts#ResolvedConfig",+ "source": "src/graph/check.ts",+ "target": "src/graph/check.ts#GraphCheckResult","relation": "contains","confidence": "extracted"},{- "source": "src/ai/providers.ts",- "target": "src/ai/summarize.ts",+ "source": "src/graph/check.ts",+ "target": "node:fs","relation": "imports","confidence": "extracted"},{- "source": "src/ai/providers.ts",- "target": "src/ai/synthesize.ts",+ "source": "src/graph/check.ts",+ "target": "node:path","relation": "imports","confidence": "extracted"},{- "source": "src/ai/summarize.ts",- "target": "src/ai/summarize.ts#OpenRouterSummarizer",- "relation": "contains",+ "source": "src/graph/check.ts",+ "target": "src/context/node-file.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/ai/summarize.ts",- "target": "src/ai/summarize.ts#Summarizer",- "relation": "contains",+ "source": "src/graph/check.ts",+ "target": "src/graph/build.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/ai/summarize.ts",- "target": "src/ai/summarize.ts#userContent",- "relation": "contains",+ "source": "src/graph/check.ts",+ "target": "src/graph/extract.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/ai/summarize.ts",- "target": "openai",+ "source": "src/graph/check.ts",+ "target": "src/graph/write.ts","relation": "imports","confidence": "extracted"},{- "source": "src/ai/summarize.ts#OpenRouterSummarizer",- "target": "src/ai/summarize.ts#OpenRouterSummarizer.constructor",- "relation": "contains",- "confidence": "extracted"+ "source": "src/graph/check.ts#checkGraph",+ "target": "src/context/node-file.ts#contextDirFor",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/ai/summarize.ts#OpenRouterSummarizer",- "target": "src/ai/summarize.ts#OpenRouterSummarizer.summarize",- "relation": "contains",- "confidence": "extracted"+ "source": "src/graph/check.ts#checkGraph",+ "target": "src/graph/build.ts#listSourceFiles",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/ai/summarize.ts#OpenRouterSummarizer",- "target": "src/ai/summarize.ts#Summarizer",- "relation": "implements",- "confidence": "extracted"+ "source": "src/graph/check.ts#checkGraph",+ "target": "src/graph/extract.ts#extractFile",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/ai/summarize.ts#OpenRouterSummarizer.summarize",- "target": "src/ai/summarize.ts#userContent",+ "source": "src/graph/check.ts#checkGraph",+ "target": "src/graph/extract.ts#languageOf","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/ai/synthesize.ts",- "target": "src/ai/synthesize.ts#clean",+ "source": "src/graph/check.ts#checkGraph",+ "target": "src/graph/write.ts#readGraph",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/graph/check.ts#checkGraph",+ "target": "src/graph/write.ts#wiringPath",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/graph/enrich.ts",+ "target": "src/graph/enrich.ts#buildCrux","relation": "contains","confidence": "extracted"},{- "source": "src/ai/synthesize.ts",- "target": "src/ai/synthesize.ts#FileSummary",+ "source": "src/graph/enrich.ts",+ "target": "src/graph/enrich.ts#collectFileCrux","relation": "contains","confidence": "extracted"},{- "source": "src/ai/synthesize.ts",- "target": "src/ai/synthesize.ts#OpenRouterSynthesizer",+ "source": "src/graph/enrich.ts",+ "target": "src/graph/enrich.ts#enrichGraph","relation": "contains","confidence": "extracted"},{- "source": "src/ai/synthesize.ts",- "target": "src/ai/synthesize.ts#Synthesizer",+ "source": "src/graph/enrich.ts",+ "target": "src/graph/enrich.ts#EnrichOptions","relation": "contains","confidence": "extracted"},{- "source": "src/ai/synthesize.ts",- "target": "src/ai/synthesize.ts#SynthLink",+ "source": "src/graph/enrich.ts",+ "target": "src/graph/enrich.ts#EnrichStats","relation": "contains","confidence": "extracted"},{- "source": "src/ai/synthesize.ts",- "target": "src/ai/synthesize.ts#SynthNode",+ "source": "src/graph/enrich.ts",+ "target": "src/graph/enrich.ts#mapWithConcurrency","relation": "contains","confidence": "extracted"},{- "source": "src/ai/synthesize.ts",- "target": "src/ai/synthesize.ts#userContent",+ "source": "src/graph/enrich.ts",+ "target": "src/graph/enrich.ts#spanLines","relation": "contains","confidence": "extracted"},{- "source": "src/ai/synthesize.ts",- "target": "openai",+ "source": "src/graph/enrich.ts",+ "target": "src/ai/crux.ts","relation": "imports","confidence": "extracted"},{- "source": "src/ai/synthesize.ts#OpenRouterSynthesizer",- "target": "src/ai/synthesize.ts#OpenRouterSynthesizer.constructor",- "relation": "contains",+ "source": "src/graph/enrich.ts",+ "target": "src/graph/types.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/ai/synthesize.ts#OpenRouterSynthesizer",- "target": "src/ai/synthesize.ts#OpenRouterSynthesizer.synthesize",- "relation": "contains",+ "source": "src/graph/enrich.ts#buildCrux",+ "target": "src/graph/enrich.ts#spanLines",+ "relation": "calls","confidence": "extracted"},{- "source": "src/ai/synthesize.ts#OpenRouterSynthesizer",- "target": "src/ai/synthesize.ts#Synthesizer",- "relation": "implements",+ "source": "src/graph/enrich.ts#collectFileCrux",+ "target": "src/ai/crux.ts#OpenRouterCruxSummarizer.describeFile",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/graph/enrich.ts#enrichGraph",+ "target": "src/graph/enrich.ts#buildCrux",+ "relation": "calls","confidence": "extracted"},{- "source": "src/ai/synthesize.ts#OpenRouterSynthesizer.synthesize",- "target": "src/ai/synthesize.ts#clean",+ "source": "src/graph/enrich.ts#enrichGraph",+ "target": "src/graph/enrich.ts#collectFileCrux","relation": "calls","confidence": "extracted"},{- "source": "src/ai/synthesize.ts#OpenRouterSynthesizer.synthesize",- "target": "src/ai/synthesize.ts#userContent",+ "source": "src/graph/enrich.ts#enrichGraph",+ "target": "src/graph/enrich.ts#mapWithConcurrency","relation": "calls","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#ask",+ "source": "src/graph/enrich.ts#enrichGraph",+ "target": "src/graph/enrich.ts#spanLines",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#calleeName","relation": "contains","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#AskHit",+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#clean","relation": "contains","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#AskOptions",+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#DefDescriptor","relation": "contains","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#AskResult",+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#describe","relation": "contains","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#baselineFor",+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#describeGo","relation": "contains","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#Corpus",+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#extractFile","relation": "contains","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#counts",+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#ExtractResult","relation": "contains","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#findSubject",+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#fileResidual","relation": "contains","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#firstProse",+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#goExported","relation": "contains","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#formatAsk",+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#goReceiverType","relation": "contains","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#hitFiles",+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#heritageEdges","relation": "contains","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#inlineSource",+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#importSpecifier",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#isImport","relation": "contains","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#lexical",+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#Language","relation": "contains","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#loadCorpus",+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#languageOf","relation": "contains","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#parseSpan",+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#parseSource","relation": "contains","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#savingsFooter",+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#RawEdge","relation": "contains","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#score",+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#searchBody","relation": "contains","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#sliceSpan",+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#tsExported","relation": "contains","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#structural",+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#walk","relation": "contains","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#tokenize",+ "source": "src/graph/extract.ts",+ "target": "src/graph/extract.ts#WalkCtx","relation": "contains","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/ask/ask.ts#toTokens",- "relation": "contains",+ "source": "src/graph/extract.ts",+ "target": "node:path",+ "relation": "imports","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "gray-matter",+ "source": "src/graph/extract.ts",+ "target": "src/graph/types.ts","relation": "imports","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "node:fs",+ "source": "src/graph/extract.ts",+ "target": "src/util/id.ts","relation": "imports","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "node:path",+ "source": "src/graph/extract.ts",+ "target": "tree-sitter","relation": "imports","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/context/node-file.ts",+ "source": "src/graph/extract.ts",+ "target": "tree-sitter-go","relation": "imports","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/graph/types.ts",+ "source": "src/graph/extract.ts",+ "target": "tree-sitter-python","relation": "imports","confidence": "extracted"},{- "source": "src/ask/ask.ts",- "target": "src/graph/write.ts",+ "source": "src/graph/extract.ts",+ "target": "tree-sitter-typescript","relation": "imports","confidence": "extracted"},{- "source": "src/ask/ask.ts#ask",- "target": "src/ask/ask.ts#baselineFor",+ "source": "src/graph/extract.ts#describe",+ "target": "src/graph/extract.ts#describeGo","relation": "calls","confidence": "extracted"},{- "source": "src/ask/ask.ts#ask",- "target": "src/ask/ask.ts#inlineSource",+ "source": "src/graph/extract.ts#describeGo",+ "target": "src/graph/extract.ts#goReceiverType","relation": "calls","confidence": "extracted"},{- "source": "src/ask/ask.ts#ask",- "target": "src/ask/ask.ts#lexical",+ "source": "src/graph/extract.ts#extractFile",+ "target": "src/graph/extract.ts#fileResidual","relation": "calls","confidence": "extracted"},{- "source": "src/ask/ask.ts#ask",- "target": "src/ask/ask.ts#loadCorpus",+ "source": "src/graph/extract.ts#extractFile",+ "target": "src/graph/extract.ts#parseSource","relation": "calls","confidence": "extracted"},{- "source": "src/ask/ask.ts#ask",- "target": "src/ask/ask.ts#structural",+ "source": "src/graph/extract.ts#extractFile",+ "target": "src/graph/extract.ts#walk","relation": "calls","confidence": "extracted"},{- "source": "src/ask/ask.ts#ask",- "target": "src/context/node-file.ts#contextDirFor",+ "source": "src/graph/extract.ts#extractFile",+ "target": "src/util/id.ts#contentHash","relation": "calls","confidence": "inferred"},{- "source": "src/ask/ask.ts#baselineFor",- "target": "src/ask/ask.ts#hitFiles",+ "source": "src/graph/extract.ts#fileResidual",+ "target": "src/graph/extract.ts#searchBody","relation": "calls","confidence": "extracted"},{- "source": "src/ask/ask.ts#formatAsk",- "target": "src/ask/ask.ts#savingsFooter",+ "source": "src/graph/extract.ts#walk",+ "target": "src/graph/extract.ts#calleeName","relation": "calls","confidence": "extracted"},{- "source": "src/ask/ask.ts#hitFiles",- "target": "src/ask/ask.ts#parseSpan",+ "source": "src/graph/extract.ts#walk",+ "target": "src/graph/extract.ts#clean","relation": "calls","confidence": "extracted"},{- "source": "src/ask/ask.ts#inlineSource",- "target": "src/ask/ask.ts#parseSpan",+ "source": "src/graph/extract.ts#walk",+ "target": "src/graph/extract.ts#describe","relation": "calls","confidence": "extracted"},{- "source": "src/ask/ask.ts#inlineSource",- "target": "src/ask/ask.ts#sliceSpan",+ "source": "src/graph/extract.ts#walk",+ "target": "src/graph/extract.ts#goExported","relation": "calls","confidence": "extracted"},{- "source": "src/ask/ask.ts#lexical",- "target": "src/ask/ask.ts#counts",+ "source": "src/graph/extract.ts#walk",+ "target": "src/graph/extract.ts#heritageEdges","relation": "calls","confidence": "extracted"},{- "source": "src/ask/ask.ts#lexical",- "target": "src/ask/ask.ts#score",+ "source": "src/graph/extract.ts#walk",+ "target": "src/graph/extract.ts#importSpecifier","relation": "calls","confidence": "extracted"},{- "source": "src/ask/ask.ts#lexical",- "target": "src/ask/ask.ts#tokenize",+ "source": "src/graph/extract.ts#walk",+ "target": "src/graph/extract.ts#isImport","relation": "calls","confidence": "extracted"},{- "source": "src/ask/ask.ts#loadCorpus",- "target": "src/ask/ask.ts#firstProse",+ "source": "src/graph/extract.ts#walk",+ "target": "src/graph/extract.ts#searchBody","relation": "calls","confidence": "extracted"},{- "source": "src/ask/ask.ts#loadCorpus",- "target": "src/graph/write.ts#readGraph",+ "source": "src/graph/extract.ts#walk",+ "target": "src/graph/extract.ts#tsExported","relation": "calls",- "confidence": "inferred"+ "confidence": "extracted"},{- "source": "src/ask/ask.ts#loadCorpus",- "target": "src/graph/write.ts#wiringPath",+ "source": "src/graph/extract.ts#walk",+ "target": "src/graph/extract.ts#walk","relation": "calls",- "confidence": "inferred"+ "confidence": "extracted"},{- "source": "src/ask/ask.ts#savingsFooter",- "target": "src/ask/ask.ts#toTokens",+ "source": "src/graph/extract.ts#walk",+ "target": "src/util/id.ts#contentHash","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/ask/ask.ts#structural",- "target": "src/ask/ask.ts#findSubject",- "relation": "calls",+ "source": "src/graph/load.ts",+ "target": "src/graph/load.ts#__resetParseCounts",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/format.ts",- "target": "src/claude/format.ts#AskJson",+ "source": "src/graph/load.ts",+ "target": "src/graph/load.ts#CacheEntry","relation": "contains","confidence": "extracted"},{- "source": "src/claude/format.ts",- "target": "src/claude/format.ts#enrichedSegment",+ "source": "src/graph/load.ts",+ "target": "src/graph/load.ts#loadAskIndexCached","relation": "contains","confidence": "extracted"},{- "source": "src/claude/format.ts",- "target": "src/claude/format.ts#formatBlastRadius",+ "source": "src/graph/load.ts",+ "target": "src/graph/load.ts#loadCached","relation": "contains","confidence": "extracted"},{- "source": "src/claude/format.ts",- "target": "src/claude/format.ts#formatOrientation",+ "source": "src/graph/load.ts",+ "target": "src/graph/load.ts#loadGraphCached","relation": "contains","confidence": "extracted"},{- "source": "src/claude/format.ts",- "target": "src/claude/format.ts#formatRetrieval",+ "source": "src/graph/load.ts",+ "target": "src/graph/load.ts#statOf","relation": "contains","confidence": "extracted"},{- "source": "src/claude/format.ts",- "target": "src/claude/format.ts#freshnessSegment",- "relation": "contains",+ "source": "src/graph/load.ts",+ "target": "node:fs",+ "relation": "imports","confidence": "extracted"},{- "source": "src/claude/format.ts",- "target": "src/claude/format.ts#incomingEdges",- "relation": "contains",+ "source": "src/graph/load.ts",+ "target": "src/ask/index-file.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/claude/format.ts",- "target": "src/claude/format.ts#nodeIdsInFile",- "relation": "contains",+ "source": "src/graph/load.ts",+ "target": "src/graph/types.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/claude/format.ts",- "target": "src/claude/format.ts#renderStatusline",+ "source": "src/graph/load.ts",+ "target": "src/graph/write.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "src/graph/load.ts#loadAskIndexCached",+ "target": "src/ask/index-file.ts#askIndexPath",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/graph/load.ts#loadAskIndexCached",+ "target": "src/ask/index-file.ts#readAskIndex",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/graph/load.ts#loadAskIndexCached",+ "target": "src/graph/load.ts#loadCached",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/graph/load.ts#loadCached",+ "target": "src/graph/load.ts#statOf",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/graph/load.ts#loadGraphCached",+ "target": "src/graph/load.ts#loadCached",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/graph/load.ts#loadGraphCached",+ "target": "src/graph/write.ts#readGraph",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/graph/load.ts#loadGraphCached",+ "target": "src/graph/write.ts#wiringPath",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/graph/resolve.ts",+ "target": "src/graph/resolve.ts#GoModule","relation": "contains","confidence": "extracted"},{- "source": "src/claude/format.ts",- "target": "src/claude/format.ts#renderSubagent",+ "source": "src/graph/resolve.ts",+ "target": "src/graph/resolve.ts#push","relation": "contains","confidence": "extracted"},{- "source": "src/claude/format.ts",- "target": "src/claude/format.ts#retrievalBody",+ "source": "src/graph/resolve.ts",+ "target": "src/graph/resolve.ts#resolveEdges","relation": "contains","confidence": "extracted"},{- "source": "src/claude/format.ts",- "target": "src/claude/format.ts#retrievalTokensSaved",+ "source": "src/graph/resolve.ts",+ "target": "src/graph/resolve.ts#resolveGoImport","relation": "contains","confidence": "extracted"},{- "source": "src/claude/format.ts",- "target": "src/claude/format.ts#tokensOf",+ "source": "src/graph/resolve.ts",+ "target": "src/graph/resolve.ts#resolveImport","relation": "contains","confidence": "extracted"},{- "source": "src/claude/format.ts",- "target": "node:path",- "relation": "imports",+ "source": "src/graph/resolve.ts",+ "target": "src/graph/resolve.ts#resolveName",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/format.ts",- "target": "src/claude/state.ts",- "relation": "imports",+ "source": "src/graph/resolve.ts",+ "target": "src/graph/resolve.ts#ResolveOptions",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/format.ts",- "target": "src/graph/types.ts",+ "source": "src/graph/resolve.ts",+ "target": "node:path","relation": "imports","confidence": "extracted"},{- "source": "src/claude/format.ts#formatBlastRadius",- "target": "src/claude/format.ts#incomingEdges",- "relation": "calls",+ "source": "src/graph/resolve.ts",+ "target": "src/graph/extract.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/claude/format.ts#formatRetrieval",- "target": "src/claude/format.ts#retrievalBody",- "relation": "calls",+ "source": "src/graph/resolve.ts",+ "target": "src/graph/types.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/claude/format.ts#formatRetrieval",- "target": "src/claude/format.ts#retrievalTokensSaved",+ "source": "src/graph/resolve.ts#resolveEdges",+ "target": "src/graph/resolve.ts#push","relation": "calls","confidence": "extracted"},{- "source": "src/claude/format.ts#formatRetrieval",- "target": "src/claude/format.ts#tokensOf",+ "source": "src/graph/resolve.ts#resolveEdges",+ "target": "src/graph/resolve.ts#resolveEdges.add","relation": "calls","confidence": "extracted"},{- "source": "src/claude/format.ts#incomingEdges",- "target": "src/claude/format.ts#nodeIdsInFile",+ "source": "src/graph/resolve.ts#resolveEdges",+ "target": "src/graph/resolve.ts#resolveGoImport","relation": "calls","confidence": "extracted"},{- "source": "src/claude/format.ts#renderStatusline",- "target": "src/claude/format.ts#enrichedSegment",+ "source": "src/graph/resolve.ts#resolveEdges",+ "target": "src/graph/resolve.ts#resolveImport","relation": "calls","confidence": "extracted"},{- "source": "src/claude/format.ts#renderStatusline",- "target": "src/claude/format.ts#freshnessSegment",+ "source": "src/graph/resolve.ts#resolveEdges",+ "target": "src/graph/resolve.ts#resolveName","relation": "calls","confidence": "extracted"},{- "source": "src/claude/format.ts#retrievalTokensSaved",- "target": "src/claude/format.ts#retrievalBody",- "relation": "calls",+ "source": "src/graph/resolve.ts#resolveEdges",+ "target": "src/graph/resolve.ts#resolveEdges.add",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/format.ts#retrievalTokensSaved",- "target": "src/claude/format.ts#tokensOf",- "relation": "calls",+ "source": "src/graph/traverse-cli.ts",+ "target": "src/graph/traverse-cli.ts#edgesFor",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/hooks.ts",- "target": "src/claude/hooks.ts#checkStaleCount",+ "source": "src/graph/traverse-cli.ts",+ "target": "src/graph/traverse-cli.ts#headerOf","relation": "contains","confidence": "extracted"},{- "source": "src/claude/hooks.ts",- "target": "src/claude/hooks.ts#emit",+ "source": "src/graph/traverse-cli.ts",+ "target": "src/graph/traverse-cli.ts#hitJson","relation": "contains","confidence": "extracted"},{- "source": "src/claude/hooks.ts",- "target": "src/claude/hooks.ts#graftCli",+ "source": "src/graph/traverse-cli.ts",+ "target": "src/graph/traverse-cli.ts#HitJson","relation": "contains","confidence": "extracted"},{- "source": "src/claude/hooks.ts",- "target": "src/claude/hooks.ts#graftJson",+ "source": "src/graph/traverse-cli.ts",+ "target": "src/graph/traverse-cli.ts#hitLine","relation": "contains","confidence": "extracted"},{- "source": "src/claude/hooks.ts",- "target": "src/claude/hooks.ts#main",+ "source": "src/graph/traverse-cli.ts",+ "target": "src/graph/traverse-cli.ts#looseNoteFor","relation": "contains","confidence": "extracted"},{- "source": "src/claude/hooks.ts",- "target": "src/claude/hooks.ts#projectDir",+ "source": "src/graph/traverse-cli.ts",+ "target": "src/graph/traverse-cli.ts#MatchJson","relation": "contains","confidence": "extracted"},{- "source": "src/claude/hooks.ts",- "target": "src/claude/hooks.ts#readStdin",+ "source": "src/graph/traverse-cli.ts",+ "target": "src/graph/traverse-cli.ts#runTraverseCommand","relation": "contains","confidence": "extracted"},{- "source": "src/claude/hooks.ts",- "target": "src/claude/hooks.ts#safeReadFd0",+ "source": "src/graph/traverse-cli.ts",+ "target": "src/graph/traverse-cli.ts#symbolJson","relation": "contains","confidence": "extracted"},{- "source": "src/claude/hooks.ts",- "target": "src/claude/hooks.ts#underGraft",+ "source": "src/graph/traverse-cli.ts",+ "target": "src/graph/traverse-cli.ts#SymbolJson","relation": "contains","confidence": "extracted"},{- "source": "src/claude/hooks.ts",- "target": "node:child_process",- "relation": "imports",+ "source": "src/graph/traverse-cli.ts",+ "target": "src/graph/traverse-cli.ts#TraverseCliOptions",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/hooks.ts",- "target": "node:fs",- "relation": "imports",+ "source": "src/graph/traverse-cli.ts",+ "target": "src/graph/traverse-cli.ts#TraverseKind",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/hooks.ts",+ "source": "src/graph/traverse-cli.ts","target": "node:path","relation": "imports","confidence": "extracted"},{- "source": "src/claude/hooks.ts",- "target": "src/claude/format.ts",+ "source": "src/graph/traverse-cli.ts",+ "target": "src/context/node-file.ts","relation": "imports","confidence": "extracted"},{- "source": "src/claude/hooks.ts",- "target": "src/claude/state.ts",+ "source": "src/graph/traverse-cli.ts",+ "target": "src/graph/load.ts","relation": "imports","confidence": "extracted"},{- "source": "src/claude/hooks.ts",- "target": "src/claude/stats.ts",+ "source": "src/graph/traverse-cli.ts",+ "target": "src/graph/traverse.ts","relation": "imports","confidence": "extracted"},{- "source": "src/claude/hooks.ts#checkStaleCount",- "target": "src/claude/hooks.ts#graftJson",- "relation": "calls",- "confidence": "extracted"- },- {- "source": "src/claude/hooks.ts#graftJson",- "target": "src/claude/hooks.ts#graftCli",- "relation": "calls",+ "source": "src/graph/traverse-cli.ts",+ "target": "src/graph/types.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/claude/hooks.ts#main",- "target": "src/claude/format.ts#formatBlastRadius",+ "source": "src/graph/traverse-cli.ts#edgesFor",+ "target": "src/graph/traverse.ts#calleesOf","relation": "calls","confidence": "inferred"},{- "source": "src/claude/hooks.ts#main",- "target": "src/claude/format.ts#formatOrientation",+ "source": "src/graph/traverse-cli.ts#edgesFor",+ "target": "src/graph/traverse.ts#callersOf","relation": "calls","confidence": "inferred"},{- "source": "src/claude/hooks.ts#main",- "target": "src/claude/format.ts#formatRetrieval",+ "source": "src/graph/traverse-cli.ts#edgesFor",+ "target": "src/graph/traverse.ts#impactOf","relation": "calls","confidence": "inferred"},{- "source": "src/claude/hooks.ts#main",- "target": "src/claude/format.ts#retrievalTokensSaved",+ "source": "src/graph/traverse-cli.ts#runTraverseCommand",+ "target": "src/context/node-file.ts#contextDirFor","relation": "calls","confidence": "inferred"},{- "source": "src/claude/hooks.ts#main",- "target": "src/claude/hooks.ts#checkStaleCount",+ "source": "src/graph/traverse-cli.ts#runTraverseCommand",+ "target": "src/graph/load.ts#loadGraphCached","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/claude/hooks.ts#main",- "target": "src/claude/hooks.ts#emit",+ "source": "src/graph/traverse-cli.ts#runTraverseCommand",+ "target": "src/graph/traverse-cli.ts#edgesFor","relation": "calls","confidence": "extracted"},{- "source": "src/claude/hooks.ts#main",- "target": "src/claude/hooks.ts#graftJson",+ "source": "src/graph/traverse-cli.ts#runTraverseCommand",+ "target": "src/graph/traverse-cli.ts#headerOf","relation": "calls","confidence": "extracted"},{- "source": "src/claude/hooks.ts#main",- "target": "src/claude/hooks.ts#projectDir",+ "source": "src/graph/traverse-cli.ts#runTraverseCommand",+ "target": "src/graph/traverse-cli.ts#hitLine","relation": "calls","confidence": "extracted"},{- "source": "src/claude/hooks.ts#main",- "target": "src/claude/hooks.ts#readStdin",+ "source": "src/graph/traverse-cli.ts#runTraverseCommand",+ "target": "src/graph/traverse-cli.ts#looseNoteFor","relation": "calls","confidence": "extracted"},{- "source": "src/claude/hooks.ts#main",- "target": "src/claude/hooks.ts#underGraft",+ "source": "src/graph/traverse-cli.ts#runTraverseCommand",+ "target": "src/graph/traverse-cli.ts#symbolJson","relation": "calls","confidence": "extracted"},{- "source": "src/claude/hooks.ts#main",- "target": "src/claude/state.ts#acquireLock",+ "source": "src/graph/traverse-cli.ts#runTraverseCommand",+ "target": "src/graph/traverse.ts#resolveSymbol","relation": "calls","confidence": "inferred"},{- "source": "src/claude/hooks.ts#main",- "target": "src/claude/state.ts#patchStats",- "relation": "calls",- "confidence": "inferred"+ "source": "src/graph/traverse.ts",+ "target": "src/graph/traverse.ts#calleesOf",+ "relation": "contains",+ "confidence": "extracted"},{- "source": "src/claude/hooks.ts#main",- "target": "src/claude/state.ts#readSession",- "relation": "calls",- "confidence": "inferred"+ "source": "src/graph/traverse.ts",+ "target": "src/graph/traverse.ts#callersOf",+ "relation": "contains",+ "confidence": "extracted"},{- "source": "src/claude/hooks.ts#main",- "target": "src/claude/state.ts#readStats",- "relation": "calls",- "confidence": "inferred"+ "source": "src/graph/traverse.ts",+ "target": "src/graph/traverse.ts#EdgeHit",+ "relation": "contains",+ "confidence": "extracted"},{- "source": "src/claude/hooks.ts#main",- "target": "src/claude/state.ts#writeSession",- "relation": "calls",- "confidence": "inferred"+ "source": "src/graph/traverse.ts",+ "target": "src/graph/traverse.ts#impactOf",+ "relation": "contains",+ "confidence": "extracted"},{- "source": "src/claude/hooks.ts#main",- "target": "src/claude/stats.ts#readWiring",- "relation": "calls",- "confidence": "inferred"+ "source": "src/graph/traverse.ts",+ "target": "src/graph/traverse.ts#impactOfFile",+ "relation": "contains",+ "confidence": "extracted"},{- "source": "src/claude/hooks.ts#readStdin",- "target": "src/claude/hooks.ts#safeReadFd0",- "relation": "calls",+ "source": "src/graph/traverse.ts",+ "target": "src/graph/traverse.ts#impactOfMany",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts",- "target": "src/claude/state.ts#acquireLock",+ "source": "src/graph/traverse.ts",+ "target": "src/graph/traverse.ts#resolveSymbol","relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts",- "target": "src/claude/state.ts#cacheDir",+ "source": "src/graph/traverse.ts",+ "target": "src/graph/traverse.ts#ResolveSymbolOptions","relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts",- "target": "src/claude/state.ts#emptySession",+ "source": "src/graph/traverse.ts",+ "target": "src/graph/traverse.ts#SymbolMatch","relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts",- "target": "src/claude/state.ts#emptyStats",+ "source": "src/graph/traverse.ts",+ "target": "src/graph/traverse.ts#symbolMatches","relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts",- "target": "src/claude/state.ts#lockPath",+ "source": "src/graph/traverse.ts",+ "target": "src/graph/traverse.ts#symbolsInFile","relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts",- "target": "src/claude/state.ts#patchStats",- "relation": "contains",+ "source": "src/graph/traverse.ts",+ "target": "src/graph/types.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/claude/state.ts",- "target": "src/claude/state.ts#readJson",+ "source": "src/graph/traverse.ts#impactOf",+ "target": "src/graph/traverse.ts#impactOfMany",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/graph/traverse.ts#impactOfFile",+ "target": "src/graph/traverse.ts#impactOfMany",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/graph/traverse.ts#impactOfFile",+ "target": "src/graph/traverse.ts#symbolsInFile",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/graph/traverse.ts#resolveSymbol",+ "target": "src/graph/traverse.ts#symbolMatches",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/graph/types.ts",+ "target": "src/graph/types.ts#Confidence","relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts",- "target": "src/claude/state.ts#readSession",+ "source": "src/graph/types.ts",+ "target": "src/graph/types.ts#Crux","relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts",- "target": "src/claude/state.ts#readStats",+ "source": "src/graph/types.ts",+ "target": "src/graph/types.ts#EdgeV1","relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts",- "target": "src/claude/state.ts#releaseLock",+ "source": "src/graph/types.ts",+ "target": "src/graph/types.ts#GraphV1","relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts",- "target": "src/claude/state.ts#sessionPath",+ "source": "src/graph/types.ts",+ "target": "src/graph/types.ts#Kind","relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts",- "target": "src/claude/state.ts#SessionState",+ "source": "src/graph/types.ts",+ "target": "src/graph/types.ts#NodeV1","relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts",- "target": "src/claude/state.ts#Stats",+ "source": "src/graph/types.ts",+ "target": "src/graph/types.ts#Relation","relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts",- "target": "src/claude/state.ts#statsPath",+ "source": "src/graph/types.ts",+ "target": "src/graph/types.ts#SummaryState","relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts",- "target": "src/claude/state.ts#writeJsonAtomic",+ "source": "src/graph/write.ts",+ "target": "src/graph/write.ts#edgeOrder","relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts",- "target": "src/claude/state.ts#writeSession",+ "source": "src/graph/write.ts",+ "target": "src/graph/write.ts#readGraph","relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts",- "target": "src/claude/state.ts#writeStats",+ "source": "src/graph/write.ts",+ "target": "src/graph/write.ts#stripBodyText","relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts",- "target": "node:fs",- "relation": "imports",+ "source": "src/graph/write.ts",+ "target": "src/graph/write.ts#wiringPath",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts",- "target": "node:path",- "relation": "imports",+ "source": "src/graph/write.ts",+ "target": "src/graph/write.ts#writeGraph",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts#acquireLock",- "target": "src/claude/state.ts#cacheDir",- "relation": "calls",+ "source": "src/graph/write.ts",+ "target": "node:fs",+ "relation": "imports","confidence": "extracted"},{- "source": "src/claude/state.ts#acquireLock",- "target": "src/claude/state.ts#lockPath",- "relation": "calls",+ "source": "src/graph/write.ts",+ "target": "node:path",+ "relation": "imports","confidence": "extracted"},{- "source": "src/claude/state.ts#lockPath",- "target": "src/claude/state.ts#cacheDir",- "relation": "calls",+ "source": "src/graph/write.ts",+ "target": "src/graph/types.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/claude/state.ts#patchStats",- "target": "src/claude/state.ts#emptyStats",+ "source": "src/graph/write.ts#writeGraph",+ "target": "src/graph/write.ts#wiringPath","relation": "calls","confidence": "extracted"},{- "source": "src/claude/state.ts#patchStats",- "target": "src/claude/state.ts#readStats",- "relation": "calls",+ "source": "src/hosts/codex-hooks.ts",+ "target": "src/hosts/codex-hooks.ts#dirExists",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts#patchStats",- "target": "src/claude/state.ts#writeStats",- "relation": "calls",+ "source": "src/hosts/codex-hooks.ts",+ "target": "src/hosts/codex-hooks.ts#HookWrite",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts#readSession",- "target": "src/claude/state.ts#emptySession",- "relation": "calls",+ "source": "src/hosts/codex-hooks.ts",+ "target": "src/hosts/codex-hooks.ts#installCodexHooks",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts#readSession",- "target": "src/claude/state.ts#readJson",- "relation": "calls",+ "source": "src/hosts/codex-hooks.ts",+ "target": "src/hosts/codex-hooks.ts#isGraftEntry",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts#readSession",- "target": "src/claude/state.ts#sessionPath",- "relation": "calls",+ "source": "src/hosts/codex-hooks.ts",+ "target": "src/hosts/codex-hooks.ts#writeOwned",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/state.ts#readStats",- "target": "src/claude/state.ts#readJson",- "relation": "calls",+ "source": "src/hosts/codex-hooks.ts",+ "target": "node:fs",+ "relation": "imports","confidence": "extracted"},{- "source": "src/claude/state.ts#readStats",- "target": "src/claude/state.ts#statsPath",- "relation": "calls",+ "source": "src/hosts/codex-hooks.ts",+ "target": "node:path",+ "relation": "imports","confidence": "extracted"},{- "source": "src/claude/state.ts#releaseLock",- "target": "src/claude/state.ts#lockPath",- "relation": "calls",+ "source": "src/hosts/codex-hooks.ts",+ "target": "src/claude/paths.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/claude/state.ts#sessionPath",- "target": "src/claude/state.ts#cacheDir",- "relation": "calls",+ "source": "src/hosts/codex-hooks.ts",+ "target": "src/claude/shim-template.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/claude/state.ts#statsPath",- "target": "src/claude/state.ts#cacheDir",+ "source": "src/hosts/codex-hooks.ts#installCodexHooks",+ "target": "src/claude/paths.ts#claudeDistDir","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/claude/state.ts#writeSession",- "target": "src/claude/state.ts#sessionPath",+ "source": "src/hosts/codex-hooks.ts#installCodexHooks",+ "target": "src/claude/shim-template.ts#hooksShim","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/claude/state.ts#writeSession",- "target": "src/claude/state.ts#writeJsonAtomic",+ "source": "src/hosts/codex-hooks.ts#installCodexHooks",+ "target": "src/hosts/codex-hooks.ts#dirExists","relation": "calls","confidence": "extracted"},{- "source": "src/claude/state.ts#writeStats",- "target": "src/claude/state.ts#statsPath",+ "source": "src/hosts/codex-hooks.ts#installCodexHooks",+ "target": "src/hosts/codex-hooks.ts#isGraftEntry","relation": "calls","confidence": "extracted"},{- "source": "src/claude/state.ts#writeStats",- "target": "src/claude/state.ts#writeJsonAtomic",+ "source": "src/hosts/codex-hooks.ts#installCodexHooks",+ "target": "src/hosts/codex-hooks.ts#writeOwned","relation": "calls","confidence": "extracted"},{- "source": "src/claude/stats.ts",- "target": "src/claude/stats.ts#computeStats",+ "source": "src/hosts/init.ts",+ "target": "src/hosts/init.ts#HostsInitResult","relation": "contains","confidence": "extracted"},{- "source": "src/claude/stats.ts",- "target": "src/claude/stats.ts#readWiring",+ "source": "src/hosts/init.ts",+ "target": "src/hosts/init.ts#probeFor","relation": "contains","confidence": "extracted"},{- "source": "src/claude/stats.ts",- "target": "node:fs",- "relation": "imports",+ "source": "src/hosts/init.ts",+ "target": "src/hosts/init.ts#runHostsInit",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/stats.ts",- "target": "node:path",- "relation": "imports",+ "source": "src/hosts/init.ts",+ "target": "src/hosts/init.ts#writeOwned",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/stats.ts",- "target": "src/claude/state.ts",+ "source": "src/hosts/init.ts",+ "target": "node:fs","relation": "imports","confidence": "extracted"},{- "source": "src/claude/stats.ts",- "target": "src/graph/types.ts",+ "source": "src/hosts/init.ts",+ "target": "node:os","relation": "imports","confidence": "extracted"},{- "source": "src/claude/statusline.ts",- "target": "src/claude/statusline.ts#main",- "relation": "contains",- "confidence": "extracted"- },- {- "source": "src/claude/statusline.ts",- "target": "src/claude/statusline.ts#resolveStats",- "relation": "contains",+ "source": "src/hosts/init.ts",+ "target": "node:path",+ "relation": "imports","confidence": "extracted"},{- "source": "src/claude/statusline.ts",- "target": "node:fs",+ "source": "src/hosts/init.ts",+ "target": "src/hosts/codex-hooks.ts","relation": "imports","confidence": "extracted"},{- "source": "src/claude/statusline.ts",- "target": "src/claude/format.ts",+ "source": "src/hosts/init.ts",+ "target": "src/hosts/mcp-config.ts","relation": "imports","confidence": "extracted"},{- "source": "src/claude/statusline.ts",- "target": "src/claude/state.ts",+ "source": "src/hosts/init.ts",+ "target": "src/hosts/registry.ts","relation": "imports","confidence": "extracted"},{- "source": "src/claude/statusline.ts",- "target": "src/claude/stats.ts",+ "source": "src/hosts/init.ts",+ "target": "src/hosts/sections.ts","relation": "imports","confidence": "extracted"},{- "source": "src/claude/statusline.ts#main",- "target": "src/claude/format.ts#renderStatusline",- "relation": "calls",- "confidence": "inferred"- },- {- "source": "src/claude/statusline.ts#main",- "target": "src/claude/format.ts#renderSubagent",+ "source": "src/hosts/init.ts#runHostsInit",+ "target": "src/hosts/codex-hooks.ts#installCodexHooks","relation": "calls","confidence": "inferred"},{- "source": "src/claude/statusline.ts#main",- "target": "src/claude/state.ts#readSession",- "relation": "calls",- "confidence": "inferred"- },- {- "source": "src/claude/statusline.ts#main",- "target": "src/claude/statusline.ts#resolveStats",+ "source": "src/hosts/init.ts#runHostsInit",+ "target": "src/hosts/init.ts#probeFor","relation": "calls","confidence": "extracted"},{- "source": "src/claude/statusline.ts#resolveStats",- "target": "src/claude/state.ts#emptyStats",+ "source": "src/hosts/init.ts#runHostsInit",+ "target": "src/hosts/init.ts#writeOwned","relation": "calls",- "confidence": "inferred"+ "confidence": "extracted"},{- "source": "src/claude/statusline.ts#resolveStats",- "target": "src/claude/state.ts#readStats",+ "source": "src/hosts/init.ts#runHostsInit",+ "target": "src/hosts/mcp-config.ts#registerMcpConfigs","relation": "calls","confidence": "inferred"},{- "source": "src/claude/statusline.ts#resolveStats",- "target": "src/claude/stats.ts#computeStats",+ "source": "src/hosts/init.ts#runHostsInit",+ "target": "src/hosts/registry.ts#detectHosts","relation": "calls","confidence": "inferred"},{- "source": "src/claude/statusline.ts#resolveStats",- "target": "src/claude/stats.ts#readWiring",+ "source": "src/hosts/init.ts#runHostsInit",+ "target": "src/hosts/sections.ts#upsertSection","relation": "calls","confidence": "inferred"},{- "source": "src/claude/sync-run.ts",- "target": "src/claude/sync-run.ts#main",- "relation": "calls",+ "source": "src/hosts/instructions.ts",+ "target": "src/hosts/instructions.ts#cursorRule",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/sync-run.ts",- "target": "src/claude/sync-run.ts#main",+ "source": "src/hosts/instructions.ts",+ "target": "src/hosts/instructions.ts#instructionBody","relation": "contains","confidence": "extracted"},{- "source": "src/claude/sync-run.ts",- "target": "src/claude/sync-run.ts#realBuild",+ "source": "src/hosts/instructions.ts",+ "target": "src/hosts/instructions.ts#kiroSteering","relation": "contains","confidence": "extracted"},{- "source": "src/claude/sync-run.ts",- "target": "src/claude/sync-run.ts#runSync",+ "source": "src/hosts/instructions.ts",+ "target": "src/hosts/instructions.ts#windsurfRule","relation": "contains","confidence": "extracted"},{- "source": "src/claude/sync-run.ts",- "target": "node:child_process",- "relation": "imports",+ "source": "src/hosts/instructions.ts#cursorRule",+ "target": "src/hosts/instructions.ts#instructionBody",+ "relation": "calls","confidence": "extracted"},{- "source": "src/claude/sync-run.ts",- "target": "node:path",- "relation": "imports",+ "source": "src/hosts/instructions.ts#kiroSteering",+ "target": "src/hosts/instructions.ts#instructionBody",+ "relation": "calls","confidence": "extracted"},{- "source": "src/claude/sync-run.ts",- "target": "node:url",- "relation": "imports",+ "source": "src/hosts/instructions.ts#windsurfRule",+ "target": "src/hosts/instructions.ts#instructionBody",+ "relation": "calls","confidence": "extracted"},{- "source": "src/claude/sync-run.ts",- "target": "src/claude/state.ts",- "relation": "imports",+ "source": "src/hosts/mcp-config.ts",+ "target": "src/hosts/mcp-config.ts#dirExists",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/sync-run.ts",- "target": "src/claude/stats.ts",- "relation": "imports",+ "source": "src/hosts/mcp-config.ts",+ "target": "src/hosts/mcp-config.ts#McpWrite",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/sync-run.ts#main",- "target": "src/claude/sync-run.ts#runSync",- "relation": "calls",+ "source": "src/hosts/mcp-config.ts",+ "target": "src/hosts/mcp-config.ts#mergeJsonKey",+ "relation": "contains","confidence": "extracted"},{- "source": "src/claude/sync-run.ts#runSync",- "target": "src/claude/state.ts#patchStats",- "relation": "calls",- "confidence": "inferred"+ "source": "src/hosts/mcp-config.ts",+ "target": "src/hosts/mcp-config.ts#registerMcpConfigs",+ "relation": "contains",+ "confidence": "extracted"},{- "source": "src/claude/sync-run.ts#runSync",- "target": "src/claude/state.ts#releaseLock",- "relation": "calls",- "confidence": "inferred"+ "source": "src/hosts/mcp-config.ts",+ "target": "src/hosts/mcp-config.ts#upsertCodexToml",+ "relation": "contains",+ "confidence": "extracted"},{- "source": "src/claude/sync-run.ts#runSync",- "target": "src/claude/stats.ts#computeStats",- "relation": "calls",- "confidence": "inferred"+ "source": "src/hosts/mcp-config.ts",+ "target": "node:fs",+ "relation": "imports",+ "confidence": "extracted"},{- "source": "src/claude/sync-run.ts#runSync",- "target": "src/claude/stats.ts#readWiring",- "relation": "calls",- "confidence": "inferred"+ "source": "src/hosts/mcp-config.ts",+ "target": "node:os",+ "relation": "imports",+ "confidence": "extracted"},{- "source": "src/cli.ts",- "target": "src/ai/providers.ts#resolveConfig",- "relation": "calls",- "confidence": "inferred"+ "source": "src/hosts/mcp-config.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"},{- "source": "src/cli.ts",- "target": "src/ask/ask.ts#formatAsk",+ "source": "src/hosts/mcp-config.ts#registerMcpConfigs",+ "target": "src/hosts/mcp-config.ts#dirExists","relation": "calls",- "confidence": "inferred"+ "confidence": "extracted"},{- "source": "src/cli.ts",- "target": "src/cli.ts#engineFrom",+ "source": "src/hosts/mcp-config.ts#registerMcpConfigs",+ "target": "src/hosts/mcp-config.ts#mergeJsonKey","relation": "calls","confidence": "extracted"},{- "source": "src/cli.ts",- "target": "src/cli.ts#fmt",+ "source": "src/hosts/mcp-config.ts#registerMcpConfigs",+ "target": "src/hosts/mcp-config.ts#upsertCodexToml","relation": "calls","confidence": "extracted"},{- "source": "src/cli.ts",- "target": "src/context/check.ts#formatCheckReport",- "relation": "calls",- "confidence": "inferred"+ "source": "src/hosts/registry.ts",+ "target": "src/hosts/registry.ts#detectHosts",+ "relation": "contains",+ "confidence": "extracted"},{- "source": "src/cli.ts",- "target": "src/context/node-file.ts#contextDirFor",- "relation": "calls",- "confidence": "inferred"+ "source": "src/hosts/registry.ts",+ "target": "src/hosts/registry.ts#DetectProbe",+ "relation": "contains",+ "confidence": "extracted"},{- "source": "src/cli.ts",- "target": "src/engine.ts#Graft.ask",- "relation": "calls",- "confidence": "inferred"+ "source": "src/hosts/registry.ts",+ "target": "src/hosts/registry.ts#hostIds",+ "relation": "contains",+ "confidence": "extracted"},{- "source": "src/cli.ts",- "target": "src/engine.ts#Graft.check",- "relation": "calls",- "confidence": "inferred"+ "source": "src/hosts/registry.ts",+ "target": "src/hosts/registry.ts#HostTarget",+ "relation": "contains",+ "confidence": "extracted"},{- "source": "src/cli.ts",- "target": "src/engine.ts#Graft.checkGraph",- "relation": "calls",- "confidence": "inferred"+ "source": "src/hosts/registry.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"},{- "source": "src/cli.ts",- "target": "src/engine.ts#Graft.graph",- "relation": "calls",- "confidence": "inferred"+ "source": "src/hosts/registry.ts",+ "target": "src/hosts/instructions.ts",+ "relation": "imports",+ "confidence": "extracted"},{- "source": "src/cli.ts",- "target": "src/engine.ts#Graft.init",- "relation": "calls",- "confidence": "inferred"+ "source": "src/hosts/sections.ts",+ "target": "src/hosts/sections.ts#detectEol",+ "relation": "contains",+ "confidence": "extracted"},{- "source": "src/cli.ts",- "target": "src/graph/check.ts#formatGraphCheckReport",- "relation": "calls",- "confidence": "inferred"+ "source": "src/hosts/sections.ts",+ "target": "src/hosts/sections.ts#fencedBlock",+ "relation": "contains",+ "confidence": "extracted"},{- "source": "src/cli.ts",- "target": "src/viz/serve.ts#startVizServer",- "relation": "calls",- "confidence": "inferred"+ "source": "src/hosts/sections.ts",+ "target": "src/hosts/sections.ts#LineEnding",+ "relation": "contains",+ "confidence": "extracted"},{- "source": "src/cli.ts",- "target": "src/cli.ts#engineFrom",+ "source": "src/hosts/sections.ts",+ "target": "src/hosts/sections.ts#markerLineIndex","relation": "contains","confidence": "extracted"},{- "source": "src/cli.ts",- "target": "src/cli.ts#fmt",+ "source": "src/hosts/sections.ts",+ "target": "src/hosts/sections.ts#UpsertAction","relation": "contains","confidence": "extracted"},{- "source": "src/cli.ts",- "target": "commander",- "relation": "imports",+ "source": "src/hosts/sections.ts",+ "target": "src/hosts/sections.ts#upsertSection",+ "relation": "contains","confidence": "extracted"},{- "source": "src/cli.ts",- "target": "dotenv/config",+ "source": "src/hosts/sections.ts",+ "target": "node:fs","relation": "imports","confidence": "extracted"},{- "source": "src/cli.ts",+ "source": "src/hosts/sections.ts","target": "node:path","relation": "imports","confidence": "extracted"},{- "source": "src/cli.ts",- "target": "src/ai/providers.ts",- "relation": "imports",+ "source": "src/hosts/sections.ts#upsertSection",+ "target": "src/hosts/sections.ts#detectEol",+ "relation": "calls","confidence": "extracted"},{- "source": "src/cli.ts",- "target": "src/context/check.ts",- "relation": "imports",+ "source": "src/hosts/sections.ts#upsertSection",+ "target": "src/hosts/sections.ts#fencedBlock",+ "relation": "calls","confidence": "extracted"},{- "source": "src/cli.ts",- "target": "src/engine.ts",+ "source": "src/hosts/sections.ts#upsertSection",+ "target": "src/hosts/sections.ts#markerLineIndex",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/ingest/fs.ts",+ "target": "src/ingest/fs.ts#walkDir",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "src/ingest/fs.ts",+ "target": "node:fs","relation": "imports","confidence": "extracted"},{- "source": "src/cli.ts",- "target": "src/graph/check.ts",+ "source": "src/ingest/fs.ts",+ "target": "node:path","relation": "imports","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/context/build.ts#batchBySize",+ "source": "src/ingest/fs.ts#walkDir",+ "target": "src/ingest/fs.ts#walkDir",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "src/mcp/server.ts",+ "target": "src/mcp/server.ts#reply","relation": "contains","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/context/build.ts#batchKey",+ "source": "src/mcp/server.ts",+ "target": "src/mcp/server.ts#replyError","relation": "contains","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/context/build.ts#BuildCache",+ "source": "src/mcp/server.ts",+ "target": "src/mcp/server.ts#send","relation": "contains","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/context/build.ts#buildContext",+ "source": "src/mcp/server.ts",+ "target": "src/mcp/server.ts#startMcpServer","relation": "contains","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/context/build.ts#BuildOptions",- "relation": "contains",+ "source": "src/mcp/server.ts",+ "target": "node:readline",+ "relation": "imports","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/context/build.ts#BuildProgress",- "relation": "contains",+ "source": "src/mcp/server.ts",+ "target": "src/mcp/tools.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/context/build.ts#BuildResult",- "relation": "contains",+ "source": "src/mcp/server.ts#reply",+ "target": "src/mcp/server.ts#send",+ "relation": "calls","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/context/build.ts#cachePath",- "relation": "contains",+ "source": "src/mcp/server.ts#replyError",+ "target": "src/mcp/server.ts#send",+ "relation": "calls","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/context/build.ts#errMsg",- "relation": "contains",+ "source": "src/mcp/server.ts#startMcpServer",+ "target": "src/mcp/server.ts#reply",+ "relation": "calls","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/context/build.ts#FileWork",- "relation": "contains",+ "source": "src/mcp/server.ts#startMcpServer",+ "target": "src/mcp/server.ts#replyError",+ "relation": "calls","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/context/build.ts#loadCache",+ "source": "src/mcp/server.ts#startMcpServer",+ "target": "src/mcp/tools.ts#callTool",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "src/mcp/tools.ts",+ "target": "src/mcp/tools.ts#callTool","relation": "contains","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/context/build.ts#mapWithConcurrency",+ "source": "src/mcp/tools.ts",+ "target": "src/mcp/tools.ts#renderMatches","relation": "contains","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/context/build.ts#NodeDraft",+ "source": "src/mcp/tools.ts",+ "target": "src/mcp/tools.ts#ToolDef","relation": "contains","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/context/build.ts#registerName",+ "source": "src/mcp/tools.ts",+ "target": "src/mcp/tools.ts#unknownSymbolText","relation": "contains","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/context/build.ts#resolveSlug",- "relation": "contains",+ "source": "src/mcp/tools.ts",+ "target": "src/ask/ask.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/context/build.ts#saveCache",- "relation": "contains",+ "source": "src/mcp/tools.ts",+ "target": "src/context/check.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "node:fs",+ "source": "src/mcp/tools.ts",+ "target": "src/context/node-file.ts","relation": "imports","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "node:path",+ "source": "src/mcp/tools.ts",+ "target": "src/engine.ts","relation": "imports","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/ai/summarize.ts",+ "source": "src/mcp/tools.ts",+ "target": "src/graph/check.ts","relation": "imports","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/ai/synthesize.ts",+ "source": "src/mcp/tools.ts",+ "target": "src/graph/load.ts","relation": "imports","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/context/node-file.ts",+ "source": "src/mcp/tools.ts",+ "target": "src/graph/traverse-cli.ts","relation": "imports","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/ingest/fs.ts",+ "source": "src/mcp/tools.ts",+ "target": "src/graph/traverse.ts","relation": "imports","confidence": "extracted"},{- "source": "src/context/build.ts",- "target": "src/util/id.ts",+ "source": "src/mcp/tools.ts",+ "target": "src/graph/types.ts","relation": "imports","confidence": "extracted"},{- "source": "src/context/build.ts#batchKey",- "target": "src/util/id.ts#contentHash",+ "source": "src/mcp/tools.ts#callTool",+ "target": "src/ask/ask.ts#formatAsk","relation": "calls","confidence": "inferred"},{- "source": "src/context/build.ts#buildContext",- "target": "src/context/build.ts#batchBySize",+ "source": "src/mcp/tools.ts#callTool",+ "target": "src/ask/ask.ts#formatSkeleton","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/context/build.ts#buildContext",- "target": "src/context/build.ts#batchKey",+ "source": "src/mcp/tools.ts#callTool",+ "target": "src/ask/ask.ts#skeleton","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/context/build.ts#buildContext",- "target": "src/context/build.ts#errMsg",+ "source": "src/mcp/tools.ts#callTool",+ "target": "src/context/check.ts#formatCheckReport","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/context/build.ts#buildContext",- "target": "src/context/build.ts#loadCache",+ "source": "src/mcp/tools.ts#callTool",+ "target": "src/context/node-file.ts#contextDirFor","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/context/build.ts#buildContext",- "target": "src/context/build.ts#mapWithConcurrency",+ "source": "src/mcp/tools.ts#callTool",+ "target": "src/engine.ts#Graft.ask","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/context/build.ts#buildContext",- "target": "src/context/build.ts#registerName",+ "source": "src/mcp/tools.ts#callTool",+ "target": "src/engine.ts#Graft.check","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/context/build.ts#buildContext",- "target": "src/context/build.ts#resolveSlug",+ "source": "src/mcp/tools.ts#callTool",+ "target": "src/engine.ts#Graft.checkGraph","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/context/build.ts#buildContext",- "target": "src/context/build.ts#saveCache",+ "source": "src/mcp/tools.ts#callTool",+ "target": "src/graph/check.ts#formatGraphCheckReport","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/context/build.ts#buildContext",- "target": "src/context/node-file.ts#contextDirFor",+ "source": "src/mcp/tools.ts#callTool",+ "target": "src/graph/load.ts#loadGraphCached","relation": "calls","confidence": "inferred"},{- "source": "src/context/build.ts#buildContext",- "target": "src/context/node-file.ts#deleteNode",+ "source": "src/mcp/tools.ts#callTool",+ "target": "src/graph/traverse.ts#impactOf","relation": "calls","confidence": "inferred"},{- "source": "src/context/build.ts#buildContext",- "target": "src/context/node-file.ts#digestSources",+ "source": "src/mcp/tools.ts#callTool",+ "target": "src/graph/traverse.ts#impactOfFile","relation": "calls","confidence": "inferred"},{- "source": "src/context/build.ts#buildContext",- "target": "src/context/node-file.ts#existingNodeSlugs",+ "source": "src/mcp/tools.ts#callTool",+ "target": "src/graph/traverse.ts#resolveSymbol","relation": "calls","confidence": "inferred"},{- "source": "src/context/build.ts#buildContext",- "target": "src/context/node-file.ts#slugify",+ "source": "src/mcp/tools.ts#callTool",+ "target": "src/mcp/tools.ts#renderMatches","relation": "calls",- "confidence": "inferred"+ "confidence": "extracted"},{- "source": "src/context/build.ts#buildContext",- "target": "src/context/node-file.ts#writeManifest",+ "source": "src/mcp/tools.ts#callTool",+ "target": "src/mcp/tools.ts#unknownSymbolText","relation": "calls",- "confidence": "inferred"+ "confidence": "extracted"},{- "source": "src/context/build.ts#buildContext",- "target": "src/context/node-file.ts#writeNode",+ "source": "src/mcp/tools.ts#renderMatches",+ "target": "src/graph/traverse-cli.ts#headerOf","relation": "calls","confidence": "inferred"},{- "source": "src/context/build.ts#buildContext",- "target": "src/ingest/fs.ts#walkDir",+ "source": "src/mcp/tools.ts#renderMatches",+ "target": "src/graph/traverse-cli.ts#hitLine","relation": "calls","confidence": "inferred"},{- "source": "src/context/build.ts#buildContext",- "target": "src/util/id.ts#contentHash",+ "source": "src/mcp/tools.ts#renderMatches",+ "target": "src/graph/traverse-cli.ts#looseNoteFor","relation": "calls","confidence": "inferred"},{- "source": "src/context/build.ts#loadCache",- "target": "src/context/build.ts#cachePath",- "relation": "calls",+ "source": "src/util/id.ts",+ "target": "src/util/id.ts#contentHash",+ "relation": "contains","confidence": "extracted"},{- "source": "src/context/build.ts#saveCache",- "target": "src/context/build.ts#cachePath",- "relation": "calls",+ "source": "src/util/id.ts",+ "target": "src/util/id.ts#newId",+ "relation": "contains","confidence": "extracted"},{- "source": "src/context/check.ts",- "target": "src/context/check.ts#checkContext",+ "source": "src/util/id.ts",+ "target": "src/util/id.ts#normalizeName","relation": "contains","confidence": "extracted"},{- "source": "src/context/check.ts",- "target": "src/context/check.ts#CheckOptions",- "relation": "contains",+ "source": "src/util/id.ts",+ "target": "node:crypto",+ "relation": "imports","confidence": "extracted"},{- "source": "src/context/check.ts",- "target": "src/context/check.ts#CheckResult",+ "source": "src/viz/assemble.ts",+ "target": "src/viz/assemble.ts#assembleContextGraph","relation": "contains","confidence": "extracted"},{- "source": "src/context/check.ts",- "target": "src/context/check.ts#formatCheckReport",+ "source": "src/viz/assemble.ts",+ "target": "src/viz/assemble.ts#extractSummary","relation": "contains","confidence": "extracted"},{- "source": "src/context/check.ts",- "target": "src/context/check.ts#short",+ "source": "src/viz/assemble.ts",+ "target": "src/viz/assemble.ts#normalizeRelation","relation": "contains","confidence": "extracted"},{- "source": "src/context/check.ts",- "target": "node:fs",- "relation": "imports",+ "source": "src/viz/assemble.ts",+ "target": "src/viz/assemble.ts#VizEdge",+ "relation": "contains","confidence": "extracted"},{- "source": "src/context/check.ts",- "target": "node:path",- "relation": "imports",+ "source": "src/viz/assemble.ts",+ "target": "src/viz/assemble.ts#VizGraph",+ "relation": "contains","confidence": "extracted"},{- "source": "src/context/check.ts",- "target": "src/context/build.ts",- "relation": "imports",+ "source": "src/viz/assemble.ts",+ "target": "src/viz/assemble.ts#VizNode",+ "relation": "contains","confidence": "extracted"},{- "source": "src/context/check.ts",- "target": "src/context/node-file.ts",+ "source": "src/viz/assemble.ts",+ "target": "gray-matter","relation": "imports","confidence": "extracted"},{- "source": "src/context/check.ts",- "target": "src/ingest/fs.ts",+ "source": "src/viz/assemble.ts",+ "target": "node:fs","relation": "imports","confidence": "extracted"},{- "source": "src/context/check.ts",- "target": "src/util/id.ts",+ "source": "src/viz/assemble.ts",+ "target": "node:path","relation": "imports","confidence": "extracted"},{- "source": "src/context/check.ts#checkContext",- "target": "src/context/check.ts#short",- "relation": "calls",+ "source": "src/viz/assemble.ts",+ "target": "src/context/node-file.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/context/check.ts#checkContext",- "target": "src/context/node-file.ts#contextDirFor",- "relation": "calls",- "confidence": "inferred"- },- {- "source": "src/context/check.ts#checkContext",- "target": "src/context/node-file.ts#readManifest",- "relation": "calls",- "confidence": "inferred"- },- {- "source": "src/context/check.ts#checkContext",- "target": "src/context/node-file.ts#readNodes",- "relation": "calls",- "confidence": "inferred"- },- {- "source": "src/context/check.ts#checkContext",- "target": "src/ingest/fs.ts#walkDir",- "relation": "calls",- "confidence": "inferred"- },- {- "source": "src/context/check.ts#checkContext",- "target": "src/util/id.ts#contentHash",+ "source": "src/viz/assemble.ts#assembleContextGraph",+ "target": "src/viz/assemble.ts#extractSummary","relation": "calls",- "confidence": "inferred"- },- {- "source": "src/context/node-file.ts",- "target": "src/context/node-file.ts#contextDirFor",- "relation": "contains",- "confidence": "extracted"- },- {- "source": "src/context/node-file.ts",- "target": "src/context/node-file.ts#ContextNode",- "relation": "contains",- "confidence": "extracted"- },- {- "source": "src/context/node-file.ts",- "target": "src/context/node-file.ts#defaultHuman",- "relation": "contains","confidence": "extracted"},{- "source": "src/context/node-file.ts",- "target": "src/context/node-file.ts#deleteNode",- "relation": "contains",+ "source": "src/viz/assemble.ts#assembleContextGraph",+ "target": "src/viz/assemble.ts#normalizeRelation",+ "relation": "calls","confidence": "extracted"},{- "source": "src/context/node-file.ts",- "target": "src/context/node-file.ts#digestSources",+ "source": "src/viz/serve.ts",+ "target": "src/viz/serve.ts#listen","relation": "contains","confidence": "extracted"},{- "source": "src/context/node-file.ts",- "target": "src/context/node-file.ts#existingNodeSlugs",+ "source": "src/viz/serve.ts",+ "target": "src/viz/serve.ts#sendJson","relation": "contains","confidence": "extracted"},{- "source": "src/context/node-file.ts",- "target": "src/context/node-file.ts#Manifest",+ "source": "src/viz/serve.ts",+ "target": "src/viz/serve.ts#startVizServer","relation": "contains","confidence": "extracted"},{- "source": "src/context/node-file.ts",- "target": "src/context/node-file.ts#NodeLink",+ "source": "src/viz/serve.ts",+ "target": "src/viz/serve.ts#VizServer","relation": "contains","confidence": "extracted"},{- "source": "src/context/node-file.ts",- "target": "src/context/node-file.ts#ParsedNode",+ "source": "src/viz/serve.ts",+ "target": "src/viz/serve.ts#VizServerOptions","relation": "contains","confidence": "extracted"},{- "source": "src/context/node-file.ts",- "target": "src/context/node-file.ts#preserveHuman",- "relation": "contains",+ "source": "src/viz/serve.ts",+ "target": "node:fs",+ "relation": "imports","confidence": "extracted"},{- "source": "src/context/node-file.ts",- "target": "src/context/node-file.ts#readManifest",- "relation": "contains",+ "source": "src/viz/serve.ts",+ "target": "node:http",+ "relation": "imports","confidence": "extracted"},{- "source": "src/context/node-file.ts",- "target": "src/context/node-file.ts#readNodes",- "relation": "contains",+ "source": "src/viz/serve.ts",+ "target": "node:path",+ "relation": "imports","confidence": "extracted"},{- "source": "src/context/node-file.ts",- "target": "src/context/node-file.ts#renderGenerated",- "relation": "contains",+ "source": "src/viz/serve.ts",+ "target": "src/viz/assemble.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/context/node-file.ts",- "target": "src/context/node-file.ts#renderNodeFile",+ "source": "src/viz/serve.ts#listen",+ "target": "src/viz/serve.ts#listen.onError","relation": "contains","confidence": "extracted"},{- "source": "src/context/node-file.ts",- "target": "src/context/node-file.ts#slugify",- "relation": "contains",- "confidence": "extracted"+ "source": "src/viz/serve.ts#startVizServer",+ "target": "src/viz/assemble.ts#assembleContextGraph",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/context/node-file.ts",- "target": "src/context/node-file.ts#SourceRef",- "relation": "contains",+ "source": "src/viz/serve.ts#startVizServer",+ "target": "src/viz/serve.ts#listen",+ "relation": "calls","confidence": "extracted"},{- "source": "src/context/node-file.ts",- "target": "src/context/node-file.ts#writeManifest",- "relation": "contains",+ "source": "src/viz/serve.ts#startVizServer",+ "target": "src/viz/serve.ts#sendJson",+ "relation": "calls","confidence": "extracted"},{- "source": "src/context/node-file.ts",- "target": "src/context/node-file.ts#writeNode",+ "source": "src/viz/serve.ts#startVizServer",+ "target": "src/viz/serve.ts#startVizServer.close","relation": "contains","confidence": "extracted"},{- "source": "src/context/node-file.ts",- "target": "gray-matter",- "relation": "imports",+ "source": "src/viz/serve.ts#startVizServer.close",+ "target": "src/viz/serve.ts#startVizServer.close",+ "relation": "calls","confidence": "extracted"},{- "source": "src/context/node-file.ts",- "target": "node:fs",- "relation": "imports",- "confidence": "extracted"+ "source": "test/ask-index.test.ts",+ "target": "src/ask/ask.ts#ask",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/context/node-file.ts",- "target": "node:path",- "relation": "imports",- "confidence": "extracted"+ "source": "test/ask-index.test.ts",+ "target": "src/ask/index-file.ts#askIndexPath",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/context/node-file.ts",- "target": "src/util/id.ts",- "relation": "imports",- "confidence": "extracted"+ "source": "test/ask-index.test.ts",+ "target": "src/ask/index-file.ts#counts",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/context/node-file.ts#digestSources",- "target": "src/util/id.ts#contentHash",+ "source": "test/ask-index.test.ts",+ "target": "src/ask/index-file.ts#readAskIndex","relation": "calls","confidence": "inferred"},{- "source": "src/context/node-file.ts#preserveHuman",- "target": "src/context/node-file.ts#defaultHuman",+ "source": "test/ask-index.test.ts",+ "target": "src/ask/index-file.ts#tokenize","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/context/node-file.ts#renderNodeFile",- "target": "src/context/node-file.ts#renderGenerated",+ "source": "test/ask-index.test.ts",+ "target": "src/ask/index-file.ts#writeAskIndex","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/context/node-file.ts#slugify",- "target": "src/util/id.ts#normalizeName",+ "source": "test/ask-index.test.ts",+ "target": "src/context/node-file.ts#contextDirFor","relation": "calls","confidence": "inferred"},{- "source": "src/context/node-file.ts#writeNode",- "target": "src/context/node-file.ts#defaultHuman",+ "source": "test/ask-index.test.ts",+ "target": "src/graph/build.ts#buildGraph",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/ask-index.test.ts",+ "target": "src/graph/extract.ts#extractFile",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/ask-index.test.ts",+ "target": "src/graph/write.ts#readGraph",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/ask-index.test.ts",+ "target": "src/graph/write.ts#wiringPath",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/ask-index.test.ts",+ "target": "test/ask-index.test.ts#makeFixture","relation": "calls","confidence": "extracted"},{- "source": "src/context/node-file.ts#writeNode",- "target": "src/context/node-file.ts#preserveHuman",+ "source": "test/ask-index.test.ts",+ "target": "test/ask-index.test.ts#reinjectBodyText","relation": "calls","confidence": "extracted"},{- "source": "src/context/node-file.ts#writeNode",- "target": "src/context/node-file.ts#renderNodeFile",+ "source": "test/ask-index.test.ts",+ "target": "test/ask-index.test.ts#sortPairs","relation": "calls","confidence": "extracted"},{- "source": "src/engine.ts",- "target": "src/engine.ts#CheckRunOptions",+ "source": "test/ask-index.test.ts",+ "target": "test/ask-index.test.ts#makeFixture","relation": "contains","confidence": "extracted"},{- "source": "src/engine.ts",- "target": "src/engine.ts#Graft",+ "source": "test/ask-index.test.ts",+ "target": "test/ask-index.test.ts#reinjectBodyText","relation": "contains","confidence": "extracted"},{- "source": "src/engine.ts",- "target": "src/engine.ts#GraphRunOptions",+ "source": "test/ask-index.test.ts",+ "target": "test/ask-index.test.ts#sortPairs","relation": "contains","confidence": "extracted"},{- "source": "src/engine.ts",- "target": "src/engine.ts#InitOptions",- "relation": "contains",+ "source": "test/ask-index.test.ts",+ "target": "node:assert/strict",+ "relation": "imports","confidence": "extracted"},{- "source": "src/engine.ts",- "target": "src/ai/crux.ts",+ "source": "test/ask-index.test.ts",+ "target": "node:fs","relation": "imports","confidence": "extracted"},{- "source": "src/engine.ts",- "target": "src/ai/providers.ts",+ "source": "test/ask-index.test.ts",+ "target": "node:os","relation": "imports","confidence": "extracted"},{- "source": "src/engine.ts",- "target": "src/ai/summarize.ts",+ "source": "test/ask-index.test.ts",+ "target": "node:path","relation": "imports","confidence": "extracted"},{- "source": "src/engine.ts",- "target": "src/ai/synthesize.ts",+ "source": "test/ask-index.test.ts",+ "target": "node:test","relation": "imports","confidence": "extracted"},{- "source": "src/engine.ts",+ "source": "test/ask-index.test.ts","target": "src/ask/ask.ts","relation": "imports","confidence": "extracted"},{- "source": "src/engine.ts",- "target": "src/context/build.ts",+ "source": "test/ask-index.test.ts",+ "target": "src/ask/index-file.ts","relation": "imports","confidence": "extracted"},{- "source": "src/engine.ts",- "target": "src/context/check.ts",+ "source": "test/ask-index.test.ts",+ "target": "src/context/node-file.ts","relation": "imports","confidence": "extracted"},{- "source": "src/engine.ts",+ "source": "test/ask-index.test.ts","target": "src/graph/build.ts","relation": "imports","confidence": "extracted"},{- "source": "src/engine.ts",- "target": "src/graph/check.ts",+ "source": "test/ask-index.test.ts",+ "target": "src/graph/extract.ts","relation": "imports","confidence": "extracted"},{- "source": "src/engine.ts#Graft",- "target": "src/engine.ts#Graft.ask",- "relation": "contains",+ "source": "test/ask-index.test.ts",+ "target": "src/graph/types.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/engine.ts#Graft",- "target": "src/engine.ts#Graft.check",- "relation": "contains",+ "source": "test/ask-index.test.ts",+ "target": "src/graph/write.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/engine.ts#Graft",- "target": "src/engine.ts#Graft.checkGraph",- "relation": "contains",+ "source": "test/ask-index.test.ts#reinjectBodyText",+ "target": "src/graph/extract.ts#extractFile",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/ask-index.test.ts#reinjectBodyText",+ "target": "src/graph/extract.ts#languageOf",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/ask-index.test.ts#reinjectBodyText",+ "target": "src/graph/write.ts#wiringPath",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/ask.test.ts",+ "target": "src/ask/ask.ts#ask",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/ask.test.ts",+ "target": "src/ask/ask.ts#formatAsk",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/ask.test.ts",+ "target": "src/ask/ask.ts#formatSkeleton",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/ask.test.ts",+ "target": "src/ask/ask.ts#skeleton",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/ask.test.ts",+ "target": "src/graph/build.ts#buildGraph",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/ask.test.ts",+ "target": "test/ask.test.ts#makeFixture",+ "relation": "calls","confidence": "extracted"},{- "source": "src/engine.ts#Graft",- "target": "src/engine.ts#Graft.constructor",- "relation": "contains",+ "source": "test/ask.test.ts",+ "target": "test/ask.test.ts#qualifiedFixture",+ "relation": "calls","confidence": "extracted"},{- "source": "src/engine.ts#Graft",- "target": "src/engine.ts#Graft.cruxSummarizer",+ "source": "test/ask.test.ts",+ "target": "test/ask.test.ts#stampCrux",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "test/ask.test.ts",+ "target": "test/ask.test.ts#makeFixture","relation": "contains","confidence": "extracted"},{- "source": "src/engine.ts#Graft",- "target": "src/engine.ts#Graft.graph",+ "source": "test/ask.test.ts",+ "target": "test/ask.test.ts#qualifiedFixture","relation": "contains","confidence": "extracted"},{- "source": "src/engine.ts#Graft",- "target": "src/engine.ts#Graft.init",+ "source": "test/ask.test.ts",+ "target": "test/ask.test.ts#stampCrux","relation": "contains","confidence": "extracted"},{- "source": "src/engine.ts#Graft",- "target": "src/engine.ts#Graft.modelLabel",- "relation": "contains",+ "source": "test/ask.test.ts",+ "target": "node:assert/strict",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "test/ask.test.ts",+ "target": "node:fs",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "test/ask.test.ts",+ "target": "node:os",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "test/ask.test.ts",+ "target": "node:path",+ "relation": "imports","confidence": "extracted"},{- "source": "src/engine.ts#Graft",- "target": "src/engine.ts#Graft.requireKey",- "relation": "contains",+ "source": "test/ask.test.ts",+ "target": "node:test",+ "relation": "imports","confidence": "extracted"},{- "source": "src/engine.ts#Graft",- "target": "src/engine.ts#Graft.summarizer",- "relation": "contains",+ "source": "test/ask.test.ts",+ "target": "src/ask/ask.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/engine.ts#Graft",- "target": "src/engine.ts#Graft.synthesizer",- "relation": "contains",+ "source": "test/ask.test.ts",+ "target": "src/graph/build.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/engine.ts#Graft.ask",- "target": "src/ask/ask.ts#ask",+ "source": "test/claude-format.test.ts",+ "target": "src/claude/format.ts#enrichedSegment","relation": "calls","confidence": "inferred"},{- "source": "src/engine.ts#Graft.check",- "target": "src/context/check.ts#checkContext",+ "source": "test/claude-format.test.ts",+ "target": "src/claude/format.ts#formatBlastRadius","relation": "calls","confidence": "inferred"},{- "source": "src/engine.ts#Graft.checkGraph",- "target": "src/graph/check.ts#checkGraph",+ "source": "test/claude-format.test.ts",+ "target": "src/claude/format.ts#formatOrientation","relation": "calls","confidence": "inferred"},{- "source": "src/engine.ts#Graft.constructor",- "target": "src/ai/providers.ts#resolveConfig",+ "source": "test/claude-format.test.ts",+ "target": "src/claude/format.ts#formatRetrieval","relation": "calls","confidence": "inferred"},{- "source": "src/engine.ts#Graft.cruxSummarizer",- "target": "src/engine.ts#Graft.requireKey",+ "source": "test/claude-format.test.ts",+ "target": "src/claude/format.ts#incomingEdges","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/engine.ts#Graft.graph",- "target": "src/engine.ts#Graft.cruxSummarizer",+ "source": "test/claude-format.test.ts",+ "target": "src/claude/format.ts#relevantRetrieval","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/engine.ts#Graft.graph",- "target": "src/graph/build.ts#buildGraph",+ "source": "test/claude-format.test.ts",+ "target": "src/claude/format.ts#renderStatusline","relation": "calls","confidence": "inferred"},{- "source": "src/engine.ts#Graft.init",- "target": "src/context/build.ts#buildContext",+ "source": "test/claude-format.test.ts",+ "target": "src/claude/format.ts#renderSubagent","relation": "calls","confidence": "inferred"},{- "source": "src/engine.ts#Graft.init",- "target": "src/engine.ts#Graft.modelLabel",+ "source": "test/claude-format.test.ts",+ "target": "src/claude/state.ts#emptyStats","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/engine.ts#Graft.init",- "target": "src/engine.ts#Graft.summarizer",+ "source": "test/claude-format.test.ts",+ "target": "test/claude-format.test.ts#freshSession","relation": "calls","confidence": "extracted"},{- "source": "src/engine.ts#Graft.init",- "target": "src/engine.ts#Graft.synthesizer",+ "source": "test/claude-format.test.ts",+ "target": "test/claude-format.test.ts#gateAsk","relation": "calls","confidence": "extracted"},{- "source": "src/engine.ts#Graft.summarizer",- "target": "src/engine.ts#Graft.requireKey",+ "source": "test/claude-format.test.ts",+ "target": "test/claude-format.test.ts#strip","relation": "calls","confidence": "extracted"},{- "source": "src/engine.ts#Graft.synthesizer",- "target": "src/engine.ts#Graft.requireKey",- "relation": "calls",+ "source": "test/claude-format.test.ts",+ "target": "test/claude-format.test.ts#freshSession",+ "relation": "contains","confidence": "extracted"},{- "source": "src/graph/build.ts",- "target": "src/graph/build.ts#buildGraph",+ "source": "test/claude-format.test.ts",+ "target": "test/claude-format.test.ts#gateAsk","relation": "contains","confidence": "extracted"},{- "source": "src/graph/build.ts",- "target": "src/graph/build.ts#GraphBuildOptions",+ "source": "test/claude-format.test.ts",+ "target": "test/claude-format.test.ts#strip","relation": "contains","confidence": "extracted"},{- "source": "src/graph/build.ts",- "target": "src/graph/build.ts#GraphBuildResult",- "relation": "contains",+ "source": "test/claude-format.test.ts",+ "target": "node:assert/strict",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/build.ts",- "target": "src/graph/build.ts#listSourceFiles",- "relation": "contains",+ "source": "test/claude-format.test.ts",+ "target": "node:test",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/build.ts",- "target": "node:fs",+ "source": "test/claude-format.test.ts",+ "target": "src/claude/format.ts","relation": "imports","confidence": "extracted"},{- "source": "src/graph/build.ts",- "target": "node:path",+ "source": "test/claude-format.test.ts",+ "target": "src/claude/state.ts","relation": "imports","confidence": "extracted"},{- "source": "src/graph/build.ts",- "target": "src/ai/crux.ts",- "relation": "imports",+ "source": "test/claude-hooks.test.ts",+ "target": "src/claude/hooks.ts#underGraft",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/claude-hooks.test.ts",+ "target": "src/claude/state.ts#acquireLock",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/claude-hooks.test.ts",+ "target": "src/claude/state.ts#emptyStats",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/claude-hooks.test.ts",+ "target": "src/claude/state.ts#readStats",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/claude-hooks.test.ts",+ "target": "src/claude/state.ts#writeStats",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/claude-hooks.test.ts",+ "target": "src/claude/sync-run.ts#runSync",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/claude-hooks.test.ts",+ "target": "test/claude-hooks.test.ts#runWithStdin",+ "relation": "calls","confidence": "extracted"},{- "source": "src/graph/build.ts",- "target": "src/context/node-file.ts",- "relation": "imports",+ "source": "test/claude-hooks.test.ts",+ "target": "test/claude-hooks.test.ts#fakeBuild",+ "relation": "contains","confidence": "extracted"},{- "source": "src/graph/build.ts",- "target": "src/graph/cards.ts",- "relation": "imports",+ "source": "test/claude-hooks.test.ts",+ "target": "test/claude-hooks.test.ts#runWithStdin",+ "relation": "contains","confidence": "extracted"},{- "source": "src/graph/build.ts",- "target": "src/graph/enrich.ts",+ "source": "test/claude-hooks.test.ts",+ "target": "node:assert/strict","relation": "imports","confidence": "extracted"},{- "source": "src/graph/build.ts",- "target": "src/graph/extract.ts",+ "source": "test/claude-hooks.test.ts",+ "target": "node:fs","relation": "imports","confidence": "extracted"},{- "source": "src/graph/build.ts",- "target": "src/graph/resolve.ts",+ "source": "test/claude-hooks.test.ts",+ "target": "node:os","relation": "imports","confidence": "extracted"},{- "source": "src/graph/build.ts",- "target": "src/graph/types.ts",+ "source": "test/claude-hooks.test.ts",+ "target": "node:path","relation": "imports","confidence": "extracted"},{- "source": "src/graph/build.ts",- "target": "src/graph/write.ts",+ "source": "test/claude-hooks.test.ts",+ "target": "node:test","relation": "imports","confidence": "extracted"},{- "source": "src/graph/build.ts",- "target": "src/ingest/fs.ts",+ "source": "test/claude-hooks.test.ts",+ "target": "src/claude/hooks.ts","relation": "imports","confidence": "extracted"},{- "source": "src/graph/build.ts#buildGraph",- "target": "src/context/node-file.ts#contextDirFor",- "relation": "calls",- "confidence": "inferred"+ "source": "test/claude-hooks.test.ts",+ "target": "src/claude/state.ts",+ "relation": "imports",+ "confidence": "extracted"},{- "source": "src/graph/build.ts#buildGraph",- "target": "src/graph/build.ts#listSourceFiles",- "relation": "calls",+ "source": "test/claude-hooks.test.ts",+ "target": "src/claude/sync-run.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/build.ts#buildGraph",- "target": "src/graph/cards.ts#writeCards",+ "source": "test/claude-init.test.ts",+ "target": "src/claude/init.ts#runInit","relation": "calls","confidence": "inferred"},{- "source": "src/graph/build.ts#buildGraph",- "target": "src/graph/cards.ts#writeCovers",+ "source": "test/claude-init.test.ts",+ "target": "src/cli-epilogue.ts#formatInitEpilogue","relation": "calls","confidence": "inferred"},{- "source": "src/graph/build.ts#buildGraph",- "target": "src/graph/cards.ts#writeIndex",+ "source": "test/claude-init.test.ts",+ "target": "test/claude-init.test.ts#col","relation": "calls",- "confidence": "inferred"+ "confidence": "extracted"},{- "source": "src/graph/build.ts#buildGraph",- "target": "src/graph/enrich.ts#enrichGraph",+ "source": "test/claude-init.test.ts",+ "target": "test/claude-init.test.ts#fresh","relation": "calls",- "confidence": "inferred"+ "confidence": "extracted"},{- "source": "src/graph/build.ts#buildGraph",- "target": "src/graph/extract.ts#extractFile",+ "source": "test/claude-init.test.ts",+ "target": "test/claude-init.test.ts#runPostinstall","relation": "calls",- "confidence": "inferred"+ "confidence": "extracted"},{- "source": "src/graph/build.ts#buildGraph",- "target": "src/graph/extract.ts#languageOf",- "relation": "calls",- "confidence": "inferred"+ "source": "test/claude-init.test.ts",+ "target": "test/claude-init.test.ts#col",+ "relation": "contains",+ "confidence": "extracted"},{- "source": "src/graph/build.ts#buildGraph",- "target": "src/graph/resolve.ts#resolveEdges",- "relation": "calls",- "confidence": "inferred"+ "source": "test/claude-init.test.ts",+ "target": "test/claude-init.test.ts#fresh",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "test/claude-init.test.ts",+ "target": "test/claude-init.test.ts#runPostinstall",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "test/claude-init.test.ts",+ "target": "node:assert/strict",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "test/claude-init.test.ts",+ "target": "node:child_process",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "test/claude-init.test.ts",+ "target": "node:fs",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "test/claude-init.test.ts",+ "target": "node:os",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "test/claude-init.test.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"},{- "source": "src/graph/build.ts#buildGraph",- "target": "src/graph/write.ts#readGraph",- "relation": "calls",- "confidence": "inferred"+ "source": "test/claude-init.test.ts",+ "target": "node:test",+ "relation": "imports",+ "confidence": "extracted"},{- "source": "src/graph/build.ts#buildGraph",- "target": "src/graph/write.ts#wiringPath",- "relation": "calls",- "confidence": "inferred"+ "source": "test/claude-init.test.ts",+ "target": "src/claude/init.ts",+ "relation": "imports",+ "confidence": "extracted"},{- "source": "src/graph/build.ts#buildGraph",- "target": "src/graph/write.ts#writeGraph",- "relation": "calls",- "confidence": "inferred"+ "source": "test/claude-init.test.ts",+ "target": "src/cli-epilogue.ts",+ "relation": "imports",+ "confidence": "extracted"},{- "source": "src/graph/build.ts#listSourceFiles",- "target": "src/graph/extract.ts#languageOf",+ "source": "test/claude-paths.test.ts",+ "target": "src/claude/paths.ts#claudeScriptPath","relation": "calls","confidence": "inferred"},{- "source": "src/graph/build.ts#listSourceFiles",- "target": "src/ingest/fs.ts#walkDir",+ "source": "test/claude-paths.test.ts",+ "target": "src/claude/paths.ts#graftCliPath","relation": "calls","confidence": "inferred"},{- "source": "src/graph/cards.ts",- "target": "src/graph/cards.ts#CardFileInfo",- "relation": "contains",+ "source": "test/claude-paths.test.ts",+ "target": "node:assert/strict",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts",- "target": "src/graph/cards.ts#cardPathFor",- "relation": "contains",+ "source": "test/claude-paths.test.ts",+ "target": "node:path",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts",- "target": "src/graph/cards.ts#CardStats",- "relation": "contains",+ "source": "test/claude-paths.test.ts",+ "target": "node:test",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts",- "target": "src/graph/cards.ts#conceptsByPath",- "relation": "contains",+ "source": "test/claude-paths.test.ts",+ "target": "src/claude/paths.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts",- "target": "src/graph/cards.ts#CoverRef",- "relation": "contains",- "confidence": "extracted"+ "source": "test/claude-settings-merge.test.ts",+ "target": "src/claude/settings-merge.ts#mergeGraftSettings",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/graph/cards.ts",- "target": "src/graph/cards.ts#listExistingCards",- "relation": "contains",+ "source": "test/claude-settings-merge.test.ts",+ "target": "node:assert/strict",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts",- "target": "src/graph/cards.ts#oneLiner",- "relation": "contains",+ "source": "test/claude-settings-merge.test.ts",+ "target": "node:test",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts",- "target": "src/graph/cards.ts#pruneEmptyDirs",- "relation": "contains",+ "source": "test/claude-settings-merge.test.ts",+ "target": "src/claude/settings-merge.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts",- "target": "src/graph/cards.ts#renderCard",- "relation": "contains",- "confidence": "extracted"+ "source": "test/claude-shim-template.test.ts",+ "target": "src/claude/shim-template.ts#hooksShim",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/graph/cards.ts",- "target": "src/graph/cards.ts#spanStart",- "relation": "contains",- "confidence": "extracted"+ "source": "test/claude-shim-template.test.ts",+ "target": "src/claude/shim-template.ts#statuslineShim",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/graph/cards.ts",- "target": "src/graph/cards.ts#writeCards",- "relation": "contains",+ "source": "test/claude-shim-template.test.ts",+ "target": "node:assert/strict",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts",- "target": "src/graph/cards.ts#writeCovers",- "relation": "contains",+ "source": "test/claude-shim-template.test.ts",+ "target": "node:test",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts",- "target": "src/graph/cards.ts#writeIndex",- "relation": "contains",+ "source": "test/claude-shim-template.test.ts",+ "target": "node:vm",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts",- "target": "gray-matter",+ "source": "test/claude-shim-template.test.ts",+ "target": "src/claude/shim-template.ts","relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts",- "target": "node:fs",- "relation": "imports",- "confidence": "extracted"+ "source": "test/claude-skill-template.test.ts",+ "target": "src/claude/skill-template.ts#skillTemplate",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/graph/cards.ts",- "target": "node:path",+ "source": "test/claude-skill-template.test.ts",+ "target": "node:assert/strict","relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts",- "target": "src/context/node-file.ts",+ "source": "test/claude-skill-template.test.ts",+ "target": "node:test","relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts",- "target": "src/graph/types.ts",+ "source": "test/claude-skill-template.test.ts",+ "target": "src/claude/skill-template.ts","relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts",- "target": "src/graph/write.ts",- "relation": "imports",- "confidence": "extracted"+ "source": "test/claude-state.test.ts",+ "target": "src/claude/state.ts#acquireLock",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/graph/cards.ts#conceptsByPath",- "target": "src/context/node-file.ts#readNodes",+ "source": "test/claude-state.test.ts",+ "target": "src/claude/state.ts#cacheDir","relation": "calls","confidence": "inferred"},{- "source": "src/graph/cards.ts#listExistingCards",- "target": "src/graph/cards.ts#listExistingCards.walk",+ "source": "test/claude-state.test.ts",+ "target": "src/claude/state.ts#emptyStats","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/graph/cards.ts#listExistingCards",- "target": "src/graph/cards.ts#listExistingCards.walk",- "relation": "contains",- "confidence": "extracted"+ "source": "test/claude-state.test.ts",+ "target": "src/claude/state.ts#patchStats",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/graph/cards.ts#listExistingCards.walk",- "target": "src/graph/cards.ts#listExistingCards.walk",+ "source": "test/claude-state.test.ts",+ "target": "src/claude/state.ts#readSession","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/graph/cards.ts#pruneEmptyDirs",- "target": "src/graph/cards.ts#pruneEmptyDirs.visit",+ "source": "test/claude-state.test.ts",+ "target": "src/claude/state.ts#readStats",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/claude-state.test.ts",+ "target": "src/claude/state.ts#releaseLock",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/claude-state.test.ts",+ "target": "src/claude/state.ts#writeSession",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/claude-state.test.ts",+ "target": "src/claude/state.ts#writeStats",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/claude-state.test.ts",+ "target": "test/claude-state.test.ts#fresh","relation": "calls","confidence": "extracted"},{- "source": "src/graph/cards.ts#pruneEmptyDirs",- "target": "src/graph/cards.ts#pruneEmptyDirs.visit",+ "source": "test/claude-state.test.ts",+ "target": "test/claude-state.test.ts#fresh","relation": "contains","confidence": "extracted"},{- "source": "src/graph/cards.ts#pruneEmptyDirs.visit",- "target": "src/graph/cards.ts#pruneEmptyDirs.visit",- "relation": "calls",+ "source": "test/claude-state.test.ts",+ "target": "node:assert/strict",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts#renderCard",- "target": "src/graph/cards.ts#oneLiner",- "relation": "calls",+ "source": "test/claude-state.test.ts",+ "target": "node:fs",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts#renderCard",- "target": "src/graph/cards.ts#spanStart",- "relation": "calls",+ "source": "test/claude-state.test.ts",+ "target": "node:os",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts#writeCards",- "target": "src/graph/cards.ts#cardPathFor",- "relation": "calls",+ "source": "test/claude-state.test.ts",+ "target": "node:path",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts#writeCards",- "target": "src/graph/cards.ts#conceptsByPath",- "relation": "calls",+ "source": "test/claude-state.test.ts",+ "target": "node:test",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts#writeCards",- "target": "src/graph/cards.ts#listExistingCards",- "relation": "calls",+ "source": "test/claude-state.test.ts",+ "target": "src/claude/state.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts#writeCards",- "target": "src/graph/cards.ts#pruneEmptyDirs",+ "source": "test/claude-stats.test.ts",+ "target": "src/claude/stats.ts#computeStats","relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/claude-stats.test.ts",+ "target": "node:assert/strict",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts#writeCards",- "target": "src/graph/cards.ts#renderCard",- "relation": "calls",+ "source": "test/claude-stats.test.ts",+ "target": "node:test",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts#writeCovers",- "target": "src/graph/cards.ts#spanStart",- "relation": "calls",+ "source": "test/claude-stats.test.ts",+ "target": "src/claude/stats.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/cards.ts#writeIndex",- "target": "src/context/node-file.ts#readNodes",+ "source": "test/claude-statusline.test.ts",+ "target": "src/claude/state.ts#emptyStats","relation": "calls","confidence": "inferred"},{- "source": "src/graph/check.ts",- "target": "src/graph/check.ts#checkGraph",- "relation": "contains",+ "source": "test/claude-statusline.test.ts",+ "target": "src/claude/state.ts#writeStats",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/claude-statusline.test.ts",+ "target": "src/claude/statusline.ts#resolveStats",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/claude-statusline.test.ts",+ "target": "test/claude-statusline.test.ts#repo",+ "relation": "calls","confidence": "extracted"},{- "source": "src/graph/check.ts",- "target": "src/graph/check.ts#formatGraphCheckReport",- "relation": "contains",+ "source": "test/claude-statusline.test.ts",+ "target": "test/claude-statusline.test.ts#writeWiring",+ "relation": "calls","confidence": "extracted"},{- "source": "src/graph/check.ts",- "target": "src/graph/check.ts#GraphCheckOptions",+ "source": "test/claude-statusline.test.ts",+ "target": "test/claude-statusline.test.ts#repo","relation": "contains","confidence": "extracted"},{- "source": "src/graph/check.ts",- "target": "src/graph/check.ts#GraphCheckResult",+ "source": "test/claude-statusline.test.ts",+ "target": "test/claude-statusline.test.ts#writeWiring","relation": "contains","confidence": "extracted"},{- "source": "src/graph/check.ts",- "target": "node:fs",+ "source": "test/claude-statusline.test.ts",+ "target": "node:assert/strict","relation": "imports","confidence": "extracted"},{- "source": "src/graph/check.ts",- "target": "node:path",+ "source": "test/claude-statusline.test.ts",+ "target": "node:fs","relation": "imports","confidence": "extracted"},{- "source": "src/graph/check.ts",- "target": "src/context/node-file.ts",+ "source": "test/claude-statusline.test.ts",+ "target": "node:os","relation": "imports","confidence": "extracted"},{- "source": "src/graph/check.ts",- "target": "src/graph/build.ts",+ "source": "test/claude-statusline.test.ts",+ "target": "node:path","relation": "imports","confidence": "extracted"},{- "source": "src/graph/check.ts",- "target": "src/graph/extract.ts",+ "source": "test/claude-statusline.test.ts",+ "target": "node:test","relation": "imports","confidence": "extracted"},{- "source": "src/graph/check.ts",- "target": "src/graph/write.ts",+ "source": "test/claude-statusline.test.ts",+ "target": "src/claude/state.ts","relation": "imports","confidence": "extracted"},{- "source": "src/graph/check.ts#checkGraph",- "target": "src/context/node-file.ts#contextDirFor",- "relation": "calls",- "confidence": "inferred"+ "source": "test/claude-statusline.test.ts",+ "target": "src/claude/statusline.ts",+ "relation": "imports",+ "confidence": "extracted"},{- "source": "src/graph/check.ts#checkGraph",- "target": "src/graph/build.ts#listSourceFiles",+ "source": "test/cli-meta.test.ts",+ "target": "src/cli-meta.ts#formatUpgradeReport","relation": "calls","confidence": "inferred"},{- "source": "src/graph/check.ts#checkGraph",- "target": "src/graph/extract.ts#extractFile",+ "source": "test/cli-meta.test.ts",+ "target": "src/cli-meta.ts#formatVersionReport","relation": "calls","confidence": "inferred"},{- "source": "src/graph/check.ts#checkGraph",- "target": "src/graph/extract.ts#languageOf",+ "source": "test/cli-meta.test.ts",+ "target": "src/cli-meta.ts#isRunningViaNpx","relation": "calls","confidence": "inferred"},{- "source": "src/graph/check.ts#checkGraph",- "target": "src/graph/write.ts#readGraph",+ "source": "test/cli-meta.test.ts",+ "target": "src/cli-meta.ts#readCurrentVersion","relation": "calls","confidence": "inferred"},{- "source": "src/graph/check.ts#checkGraph",- "target": "src/graph/write.ts#wiringPath",+ "source": "test/cli-meta.test.ts",+ "target": "src/cli-meta.ts#resolvePackageJsonPath","relation": "calls","confidence": "inferred"},{- "source": "src/graph/enrich.ts",- "target": "src/graph/enrich.ts#buildCrux",- "relation": "contains",- "confidence": "extracted"- },- {- "source": "src/graph/enrich.ts",- "target": "src/graph/enrich.ts#collectFileCrux",- "relation": "contains",- "confidence": "extracted"- },- {- "source": "src/graph/enrich.ts",- "target": "src/graph/enrich.ts#enrichGraph",- "relation": "contains",- "confidence": "extracted"- },- {- "source": "src/graph/enrich.ts",- "target": "src/graph/enrich.ts#EnrichOptions",- "relation": "contains",+ "source": "test/cli-meta.test.ts",+ "target": "node:assert/strict",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/enrich.ts",- "target": "src/graph/enrich.ts#EnrichStats",- "relation": "contains",+ "source": "test/cli-meta.test.ts",+ "target": "node:fs",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/enrich.ts",- "target": "src/graph/enrich.ts#mapWithConcurrency",- "relation": "contains",+ "source": "test/cli-meta.test.ts",+ "target": "node:path",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/enrich.ts",- "target": "src/graph/enrich.ts#spanLines",- "relation": "contains",+ "source": "test/cli-meta.test.ts",+ "target": "node:test",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/enrich.ts",- "target": "src/ai/crux.ts",+ "source": "test/cli-meta.test.ts",+ "target": "node:url","relation": "imports","confidence": "extracted"},{- "source": "src/graph/enrich.ts",- "target": "src/graph/types.ts",+ "source": "test/cli-meta.test.ts",+ "target": "src/cli-meta.ts","relation": "imports","confidence": "extracted"},{- "source": "src/graph/enrich.ts#buildCrux",- "target": "src/graph/enrich.ts#spanLines",+ "source": "test/context.test.ts",+ "target": "src/context/build.ts#buildContext","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/graph/enrich.ts#collectFileCrux",- "target": "src/ai/crux.ts#OpenRouterCruxSummarizer.describeFile",+ "source": "test/context.test.ts",+ "target": "src/context/check.ts#checkContext","relation": "calls","confidence": "inferred"},{- "source": "src/graph/enrich.ts#enrichGraph",- "target": "src/graph/enrich.ts#buildCrux",+ "source": "test/context.test.ts",+ "target": "test/context.test.ts#buildOpts","relation": "calls","confidence": "extracted"},{- "source": "src/graph/enrich.ts#enrichGraph",- "target": "src/graph/enrich.ts#collectFileCrux",+ "source": "test/context.test.ts",+ "target": "test/context.test.ts#makeFixture","relation": "calls","confidence": "extracted"},{- "source": "src/graph/enrich.ts#enrichGraph",- "target": "src/graph/enrich.ts#mapWithConcurrency",+ "source": "test/context.test.ts",+ "target": "test/context.test.ts#runCli","relation": "calls","confidence": "extracted"},{- "source": "src/graph/enrich.ts#enrichGraph",- "target": "src/graph/enrich.ts#spanLines",- "relation": "calls",+ "source": "test/context.test.ts",+ "target": "test/context.test.ts#buildOpts",+ "relation": "contains","confidence": "extracted"},{- "source": "src/graph/extract.ts",- "target": "src/graph/extract.ts#calleeName",+ "source": "test/context.test.ts",+ "target": "test/context.test.ts#makeFixture","relation": "contains","confidence": "extracted"},{- "source": "src/graph/extract.ts",- "target": "src/graph/extract.ts#clean",+ "source": "test/context.test.ts",+ "target": "test/context.test.ts#runCli","relation": "contains","confidence": "extracted"},{- "source": "src/graph/extract.ts",- "target": "src/graph/extract.ts#DefDescriptor",- "relation": "contains",+ "source": "test/context.test.ts",+ "target": "node:assert/strict",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/extract.ts",- "target": "src/graph/extract.ts#describe",- "relation": "contains",+ "source": "test/context.test.ts",+ "target": "node:child_process",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/extract.ts",- "target": "src/graph/extract.ts#extractFile",- "relation": "contains",+ "source": "test/context.test.ts",+ "target": "node:fs",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/extract.ts",- "target": "src/graph/extract.ts#ExtractResult",- "relation": "contains",+ "source": "test/context.test.ts",+ "target": "node:os",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/extract.ts",- "target": "src/graph/extract.ts#heritageEdges",- "relation": "contains",+ "source": "test/context.test.ts",+ "target": "node:path",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/extract.ts",- "target": "src/graph/extract.ts#importSpecifier",- "relation": "contains",+ "source": "test/context.test.ts",+ "target": "node:test",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/extract.ts",- "target": "src/graph/extract.ts#isImport",- "relation": "contains",+ "source": "test/context.test.ts",+ "target": "src/context/build.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/extract.ts",- "target": "src/graph/extract.ts#Language",- "relation": "contains",+ "source": "test/context.test.ts",+ "target": "src/context/check.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/extract.ts",- "target": "src/graph/extract.ts#languageOf",- "relation": "contains",+ "source": "test/context.test.ts",+ "target": "test/helpers.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/extract.ts",- "target": "src/graph/extract.ts#RawEdge",- "relation": "contains",- "confidence": "extracted"+ "source": "test/context.test.ts#buildOpts",+ "target": "test/helpers.ts#fakeProviders",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/graph/extract.ts",- "target": "src/graph/extract.ts#tsExported",- "relation": "contains",- "confidence": "extracted"+ "source": "test/covers.test.ts",+ "target": "src/context/build.ts#buildContext",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/graph/extract.ts",- "target": "src/graph/extract.ts#walk",- "relation": "contains",- "confidence": "extracted"+ "source": "test/covers.test.ts",+ "target": "src/graph/build.ts#buildGraph",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/graph/extract.ts",- "target": "src/graph/extract.ts#WalkCtx",- "relation": "contains",+ "source": "test/covers.test.ts",+ "target": "test/covers.test.ts#makeFixture",+ "relation": "calls","confidence": "extracted"},{- "source": "src/graph/extract.ts",- "target": "node:path",- "relation": "imports",- "confidence": "extracted"+ "source": "test/covers.test.ts",+ "target": "test/helpers.ts#fakeProviders",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/graph/extract.ts",- "target": "src/graph/types.ts",- "relation": "imports",+ "source": "test/covers.test.ts",+ "target": "test/covers.test.ts#makeFixture",+ "relation": "contains","confidence": "extracted"},{- "source": "src/graph/extract.ts",- "target": "src/util/id.ts",+ "source": "test/covers.test.ts",+ "target": "gray-matter","relation": "imports","confidence": "extracted"},{- "source": "src/graph/extract.ts",- "target": "tree-sitter",+ "source": "test/covers.test.ts",+ "target": "node:assert/strict","relation": "imports","confidence": "extracted"},{- "source": "src/graph/extract.ts",- "target": "tree-sitter-python",+ "source": "test/covers.test.ts",+ "target": "node:fs","relation": "imports","confidence": "extracted"},{- "source": "src/graph/extract.ts",- "target": "tree-sitter-typescript",+ "source": "test/covers.test.ts",+ "target": "node:os","relation": "imports","confidence": "extracted"},{- "source": "src/graph/extract.ts#extractFile",- "target": "src/graph/extract.ts#walk",- "relation": "calls",+ "source": "test/covers.test.ts",+ "target": "node:path",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/extract.ts#extractFile",- "target": "src/util/id.ts#contentHash",- "relation": "calls",- "confidence": "inferred"+ "source": "test/covers.test.ts",+ "target": "node:test",+ "relation": "imports",+ "confidence": "extracted"},{- "source": "src/graph/extract.ts#walk",- "target": "src/graph/extract.ts#calleeName",- "relation": "calls",+ "source": "test/covers.test.ts",+ "target": "src/context/build.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/extract.ts#walk",- "target": "src/graph/extract.ts#clean",- "relation": "calls",+ "source": "test/covers.test.ts",+ "target": "src/graph/build.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/extract.ts#walk",- "target": "src/graph/extract.ts#describe",- "relation": "calls",+ "source": "test/covers.test.ts",+ "target": "test/helpers.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/extract.ts#walk",- "target": "src/graph/extract.ts#heritageEdges",+ "source": "test/graph-go.test.ts",+ "target": "src/graph/build.ts#buildGraph","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/graph/extract.ts#walk",- "target": "src/graph/extract.ts#importSpecifier",+ "source": "test/graph-go.test.ts",+ "target": "src/graph/write.ts#readGraph","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/graph/extract.ts#walk",- "target": "src/graph/extract.ts#isImport",+ "source": "test/graph-go.test.ts",+ "target": "src/graph/write.ts#wiringPath","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/graph/extract.ts#walk",- "target": "src/graph/extract.ts#tsExported",+ "source": "test/graph-go.test.ts",+ "target": "test/graph-go.test.ts#makeFixture","relation": "calls","confidence": "extracted"},{- "source": "src/graph/extract.ts#walk",- "target": "src/graph/extract.ts#walk",+ "source": "test/graph-go.test.ts",+ "target": "test/graph-go.test.ts#nodeById","relation": "calls","confidence": "extracted"},{- "source": "src/graph/extract.ts#walk",- "target": "src/util/id.ts#contentHash",- "relation": "calls",- "confidence": "inferred"+ "source": "test/graph-go.test.ts",+ "target": "test/graph-go.test.ts#makeFixture",+ "relation": "contains",+ "confidence": "extracted"},{- "source": "src/graph/resolve.ts",- "target": "src/graph/resolve.ts#push",+ "source": "test/graph-go.test.ts",+ "target": "test/graph-go.test.ts#nodeById","relation": "contains","confidence": "extracted"},{- "source": "src/graph/resolve.ts",- "target": "src/graph/resolve.ts#resolveEdges",- "relation": "contains",+ "source": "test/graph-go.test.ts",+ "target": "node:assert/strict",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/resolve.ts",- "target": "src/graph/resolve.ts#resolveImport",- "relation": "contains",+ "source": "test/graph-go.test.ts",+ "target": "node:fs",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/resolve.ts",- "target": "src/graph/resolve.ts#resolveName",- "relation": "contains",+ "source": "test/graph-go.test.ts",+ "target": "node:os",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/resolve.ts",+ "source": "test/graph-go.test.ts","target": "node:path","relation": "imports","confidence": "extracted"},{- "source": "src/graph/resolve.ts",- "target": "src/graph/extract.ts",+ "source": "test/graph-go.test.ts",+ "target": "node:test","relation": "imports","confidence": "extracted"},{- "source": "src/graph/resolve.ts",+ "source": "test/graph-go.test.ts",+ "target": "src/graph/build.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "test/graph-go.test.ts","target": "src/graph/types.ts","relation": "imports","confidence": "extracted"},{- "source": "src/graph/resolve.ts#resolveEdges",- "target": "src/graph/resolve.ts#push",- "relation": "calls",+ "source": "test/graph-go.test.ts",+ "target": "src/graph/write.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/resolve.ts#resolveEdges",- "target": "src/graph/resolve.ts#resolveEdges.add",+ "source": "test/graph-load.test.ts",+ "target": "src/ask/index-file.ts#askIndexPath","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/graph/resolve.ts#resolveEdges",- "target": "src/graph/resolve.ts#resolveImport",+ "source": "test/graph-load.test.ts",+ "target": "src/ask/index-file.ts#writeAskIndex","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/graph/resolve.ts#resolveEdges",- "target": "src/graph/resolve.ts#resolveName",+ "source": "test/graph-load.test.ts",+ "target": "src/graph/load.ts#__resetParseCounts","relation": "calls",- "confidence": "extracted"+ "confidence": "inferred"},{- "source": "src/graph/resolve.ts#resolveEdges",- "target": "src/graph/resolve.ts#resolveEdges.add",- "relation": "contains",- "confidence": "extracted"+ "source": "test/graph-load.test.ts",+ "target": "src/graph/load.ts#loadAskIndexCached",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/graph/types.ts",- "target": "src/graph/types.ts#Confidence",- "relation": "contains",- "confidence": "extracted"+ "source": "test/graph-load.test.ts",+ "target": "src/graph/load.ts#loadGraphCached",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/graph/types.ts",- "target": "src/graph/types.ts#Crux",- "relation": "contains",- "confidence": "extracted"+ "source": "test/graph-load.test.ts",+ "target": "src/graph/write.ts#wiringPath",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/graph/types.ts",- "target": "src/graph/types.ts#EdgeV1",- "relation": "contains",- "confidence": "extracted"+ "source": "test/graph-load.test.ts",+ "target": "src/graph/write.ts#writeGraph",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/graph/types.ts",- "target": "src/graph/types.ts#GraphV1",- "relation": "contains",- "confidence": "extracted"+ "source": "test/graph-load.test.ts",+ "target": "src/mcp/tools.ts#callTool",+ "relation": "calls",+ "confidence": "inferred"},{- "source": "src/graph/types.ts",- "target": "src/graph/types.ts#Kind",- "relation": "contains",+ "source": "test/graph-load.test.ts",+ "target": "test/graph-load.test.ts#bump",+ "relation": "calls","confidence": "extracted"},{- "source": "src/graph/types.ts",- "target": "src/graph/types.ts#NodeV1",- "relation": "contains",+ "source": "test/graph-load.test.ts",+ "target": "test/graph-load.test.ts#fixtureDir",+ "relation": "calls","confidence": "extracted"},{- "source": "src/graph/types.ts",- "target": "src/graph/types.ts#Relation",- "relation": "contains",+ "source": "test/graph-load.test.ts",+ "target": "test/graph-load.test.ts#node",+ "relation": "calls","confidence": "extracted"},{- "source": "src/graph/types.ts",- "target": "src/graph/types.ts#SummaryState",+ "source": "test/graph-load.test.ts",+ "target": "test/graph-load.test.ts#bump","relation": "contains","confidence": "extracted"},{- "source": "src/graph/write.ts",- "target": "src/graph/write.ts#edgeOrder",+ "source": "test/graph-load.test.ts",+ "target": "test/graph-load.test.ts#fixtureDir","relation": "contains","confidence": "extracted"},{- "source": "src/graph/write.ts",- "target": "src/graph/write.ts#readGraph",+ "source": "test/graph-load.test.ts",+ "target": "test/graph-load.test.ts#node","relation": "contains","confidence": "extracted"},{- "source": "src/graph/write.ts",- "target": "src/graph/write.ts#wiringPath",- "relation": "contains",+ "source": "test/graph-load.test.ts",+ "target": "node:assert/strict",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/write.ts",- "target": "src/graph/write.ts#writeGraph",- "relation": "contains",+ "source": "test/graph-load.test.ts",+ "target": "node:fs",+ "relation": "imports","confidence": "extracted"},{- "source": "src/graph/write.ts",- "target": "node:fs",+ "source": "test/graph-load.test.ts",+ "target": "node:os","relation": "imports","confidence": "extracted"},{- "source": "src/graph/write.ts",+ "source": "test/graph-load.test.ts","target": "node:path","relation": "imports","confidence": "extracted"},{- "source": "src/graph/write.ts",- "target": "src/graph/types.ts",+ "source": "test/graph-load.test.ts",+ "target": "node:test","relation": "imports","confidence": "extracted"},{- "source": "src/graph/write.ts#writeGraph",- "target": "src/graph/write.ts#wiringPath",- "relation": "calls",+ "source": "test/graph-load.test.ts",+ "target": "src/ask/index-file.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/ingest/fs.ts",- "target": "src/ingest/fs.ts#walkDir",- "relation": "contains",+ "source": "test/graph-load.test.ts",+ "target": "src/graph/load.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "src/ingest/fs.ts",- "target": "node:fs",+ "source": "test/graph-load.test.ts",+ "target": "src/graph/types.ts","relation": "imports","confidence": "extracted"},{- "source": "src/ingest/fs.ts",- "target": "node:path",+ "source": "test/graph-load.test.ts",+ "target": "src/graph/write.ts","relation": "imports","confidence": "extracted"},{- "source": "src/ingest/fs.ts#walkDir",- "target": "src/ingest/fs.ts#walkDir",+ "source": "test/graph-load.test.ts",+ "target": "src/mcp/tools.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "test/graph-traverse-cli.test.ts",+ "target": "test/graph-traverse-cli.test.ts#builtRepo","relation": "calls","confidence": "extracted"},{- "source": "src/util/id.ts",- "target": "src/util/id.ts#contentHash",- "relation": "contains",+ "source": "test/graph-traverse-cli.test.ts",+ "target": "test/graph-traverse-cli.test.ts#runCli",+ "relation": "calls","confidence": "extracted"},{- "source": "src/util/id.ts",- "target": "src/util/id.ts#newId",+ "source": "test/graph-traverse-cli.test.ts",+ "target": "test/graph-traverse-cli.test.ts#builtRepo","relation": "contains","confidence": "extracted"},{- "source": "src/util/id.ts",- "target": "src/util/id.ts#normalizeName",+ "source": "test/graph-traverse-cli.test.ts",+ "target": "test/graph-traverse-cli.test.ts#runCli","relation": "contains","confidence": "extracted"},{- "source": "src/util/id.ts",- "target": "node:crypto",+ "source": "test/graph-traverse-cli.test.ts",+ "target": "node:assert/strict","relation": "imports","confidence": "extracted"},{- "source": "src/viz/assemble.ts",- "target": "src/viz/assemble.ts#assembleContextGraph",- "relation": "contains",+ "source": "test/graph-traverse-cli.test.ts",+ "target": "node:child_process",+ "relation": "imports","confidence": "extracted"},{- "source": "src/viz/assemble.ts",- "target": "src/viz/assemble.ts#extractSummary",- "relation": "contains",+ "source": "test/graph-traverse-cli.test.ts",+ "target": "node:fs",+ "relation": "imports","confidence": "extracted"},{- "source": "src/viz/assemble.ts",- "target": "src/viz/assemble.ts#normalizeRelation",- "relation": "contains",+ "source": "test/graph-traverse-cli.test.ts",+ "target": "node:os",+ "relation": "imports","confidence": "extracted"},{- "source": "src/viz/assemble.ts",- "target": "src/viz/assemble.ts#VizEdge",- "relation": "contains",+ "source": "test/graph-traverse-cli.test.ts",+ "target": "node:path",+ "relation": "imports","confidence": "extracted"},{- "source": "src/viz/assemble.ts",- "target": "src/viz/assemble.ts#VizGraph",- "relation": "contains",+ "source": "test/graph-traverse-cli.test.ts",+ "target": "node:test",+ "relation": "imports","confidence": "extracted"},{- "source": "src/viz/assemble.ts",- "target": "src/viz/assemble.ts#VizNode",- "relation": "contains",+ "source": "test/graph-traverse.test.ts",+ "target": "src/graph/traverse.ts#calleesOf",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/graph-traverse.test.ts",+ "target": "src/graph/traverse.ts#callersOf",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/graph-traverse.test.ts",+ "target": "src/graph/traverse.ts#impactOf",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/graph-traverse.test.ts",+ "target": "src/graph/traverse.ts#impactOfFile",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/graph-traverse.test.ts",+ "target": "src/graph/traverse.ts#impactOfMany",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/graph-traverse.test.ts",+ "target": "src/graph/traverse.ts#resolveSymbol",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/graph-traverse.test.ts",+ "target": "test/graph-traverse.test.ts#baseGraph",+ "relation": "calls","confidence": "extracted"},{- "source": "src/viz/assemble.ts",- "target": "gray-matter",- "relation": "imports",+ "source": "test/graph-traverse.test.ts",+ "target": "test/graph-traverse.test.ts#diamondGraph",+ "relation": "calls","confidence": "extracted"},{- "source": "src/viz/assemble.ts",- "target": "node:fs",- "relation": "imports",+ "source": "test/graph-traverse.test.ts",+ "target": "test/graph-traverse.test.ts#edge",+ "relation": "calls","confidence": "extracted"},{- "source": "src/viz/assemble.ts",- "target": "node:path",- "relation": "imports",+ "source": "test/graph-traverse.test.ts",+ "target": "test/graph-traverse.test.ts#fileAndSymbolGraph",+ "relation": "calls","confidence": "extracted"},{- "source": "src/viz/assemble.ts",- "target": "src/context/node-file.ts",- "relation": "imports",+ "source": "test/graph-traverse.test.ts",+ "target": "test/graph-traverse.test.ts#graphOf",+ "relation": "calls","confidence": "extracted"},{- "source": "src/viz/assemble.ts#assembleContextGraph",- "target": "src/viz/assemble.ts#extractSummary",+ "source": "test/graph-traverse.test.ts",+ "target": "test/graph-traverse.test.ts#nodeStub","relation": "calls","confidence": "extracted"},{- "source": "src/viz/assemble.ts#assembleContextGraph",- "target": "src/viz/assemble.ts#normalizeRelation",- "relation": "calls",+ "source": "test/graph-traverse.test.ts",+ "target": "test/graph-traverse.test.ts#baseGraph",+ "relation": "contains","confidence": "extracted"},{- "source": "src/viz/serve.ts",- "target": "src/viz/serve.ts#listen",+ "source": "test/graph-traverse.test.ts",+ "target": "test/graph-traverse.test.ts#diamondGraph","relation": "contains","confidence": "extracted"},{- "source": "src/viz/serve.ts",- "target": "src/viz/serve.ts#sendJson",+ "source": "test/graph-traverse.test.ts",+ "target": "test/graph-traverse.test.ts#edge","relation": "contains","confidence": "extracted"},{- "source": "src/viz/serve.ts",- "target": "src/viz/serve.ts#startVizServer",+ "source": "test/graph-traverse.test.ts",+ "target": "test/graph-traverse.test.ts#fileAndSymbolGraph","relation": "contains","confidence": "extracted"},{- "source": "src/viz/serve.ts",- "target": "src/viz/serve.ts#VizServer",+ "source": "test/graph-traverse.test.ts",+ "target": "test/graph-traverse.test.ts#graphOf","relation": "contains","confidence": "extracted"},{- "source": "src/viz/serve.ts",- "target": "src/viz/serve.ts#VizServerOptions",+ "source": "test/graph-traverse.test.ts",+ "target": "test/graph-traverse.test.ts#nodeStub","relation": "contains","confidence": "extracted"},{- "source": "src/viz/serve.ts",- "target": "node:fs",+ "source": "test/graph-traverse.test.ts",+ "target": "node:assert/strict","relation": "imports","confidence": "extracted"},{- "source": "src/viz/serve.ts",- "target": "node:http",+ "source": "test/graph-traverse.test.ts",+ "target": "node:test","relation": "imports","confidence": "extracted"},{- "source": "src/viz/serve.ts",- "target": "node:path",+ "source": "test/graph-traverse.test.ts",+ "target": "src/graph/traverse.ts","relation": "imports","confidence": "extracted"},{- "source": "src/viz/serve.ts",- "target": "src/viz/assemble.ts",+ "source": "test/graph-traverse.test.ts",+ "target": "src/graph/types.ts","relation": "imports","confidence": "extracted"},{- "source": "src/viz/serve.ts#listen",- "target": "src/viz/serve.ts#listen.onError",- "relation": "contains",+ "source": "test/graph-traverse.test.ts#baseGraph",+ "target": "test/graph-traverse.test.ts#edge",+ "relation": "calls","confidence": "extracted"},{- "source": "src/viz/serve.ts#startVizServer",- "target": "src/viz/assemble.ts#assembleContextGraph",+ "source": "test/graph-traverse.test.ts#baseGraph",+ "target": "test/graph-traverse.test.ts#graphOf","relation": "calls",- "confidence": "inferred"+ "confidence": "extracted"},{- "source": "src/viz/serve.ts#startVizServer",- "target": "src/viz/serve.ts#listen",+ "source": "test/graph-traverse.test.ts#diamondGraph",+ "target": "test/graph-traverse.test.ts#edge","relation": "calls","confidence": "extracted"},{- "source": "src/viz/serve.ts#startVizServer",- "target": "src/viz/serve.ts#sendJson",+ "source": "test/graph-traverse.test.ts#diamondGraph",+ "target": "test/graph-traverse.test.ts#graphOf","relation": "calls","confidence": "extracted"},{- "source": "src/viz/serve.ts#startVizServer",- "target": "src/viz/serve.ts#startVizServer.close",- "relation": "contains",+ "source": "test/graph-traverse.test.ts#diamondGraph",+ "target": "test/graph-traverse.test.ts#nodeStub",+ "relation": "calls","confidence": "extracted"},{- "source": "src/viz/serve.ts#startVizServer.close",- "target": "src/viz/serve.ts#startVizServer.close",+ "source": "test/graph-traverse.test.ts#fileAndSymbolGraph",+ "target": "test/graph-traverse.test.ts#edge","relation": "calls","confidence": "extracted"},{- "source": "test/ask.test.ts",- "target": "src/ask/ask.ts#ask",+ "source": "test/graph-traverse.test.ts#fileAndSymbolGraph",+ "target": "test/graph-traverse.test.ts#graphOf","relation": "calls",- "confidence": "inferred"+ "confidence": "extracted"},{- "source": "test/ask.test.ts",- "target": "src/ask/ask.ts#formatAsk",+ "source": "test/graph-traverse.test.ts#fileAndSymbolGraph",+ "target": "test/graph-traverse.test.ts#nodeStub",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "test/graph-write.test.ts",+ "target": "src/context/node-file.ts#contextDirFor","relation": "calls","confidence": "inferred"},{- "source": "test/ask.test.ts",+ "source": "test/graph-write.test.ts","target": "src/graph/build.ts#buildGraph","relation": "calls","confidence": "inferred"},{- "source": "test/ask.test.ts",- "target": "test/ask.test.ts#makeFixture",+ "source": "test/graph-write.test.ts",+ "target": "src/graph/write.ts#readGraph",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/graph-write.test.ts",+ "target": "src/graph/write.ts#wiringPath",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/graph-write.test.ts",+ "target": "src/graph/write.ts#writeGraph",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/graph-write.test.ts",+ "target": "test/graph-write.test.ts#makeNode","relation": "calls","confidence": "extracted"},{- "source": "test/ask.test.ts",- "target": "test/ask.test.ts#makeFixture",+ "source": "test/graph-write.test.ts",+ "target": "test/graph-write.test.ts#makeNode","relation": "contains","confidence": "extracted"},{- "source": "test/ask.test.ts",+ "source": "test/graph-write.test.ts","target": "node:assert/strict","relation": "imports","confidence": "extracted"},{- "source": "test/ask.test.ts",+ "source": "test/graph-write.test.ts","target": "node:fs","relation": "imports","confidence": "extracted"},{- "source": "test/ask.test.ts",+ "source": "test/graph-write.test.ts","target": "node:os","relation": "imports","confidence": "extracted"},{- "source": "test/ask.test.ts",+ "source": "test/graph-write.test.ts","target": "node:path","relation": "imports","confidence": "extracted"},{- "source": "test/ask.test.ts",+ "source": "test/graph-write.test.ts","target": "node:test","relation": "imports","confidence": "extracted"},{- "source": "test/ask.test.ts",- "target": "src/ask/ask.ts",+ "source": "test/graph-write.test.ts",+ "target": "src/context/node-file.ts","relation": "imports","confidence": "extracted"},{- "source": "test/ask.test.ts",+ "source": "test/graph-write.test.ts","target": "src/graph/build.ts","relation": "imports","confidence": "extracted"},{- "source": "test/claude-format.test.ts",- "target": "src/claude/format.ts#enrichedSegment",- "relation": "calls",- "confidence": "inferred"+ "source": "test/graph-write.test.ts",+ "target": "src/graph/types.ts",+ "relation": "imports",+ "confidence": "extracted"},{- "source": "test/claude-format.test.ts",- "target": "src/claude/format.ts#formatBlastRadius",- "relation": "calls",- "confidence": "inferred"+ "source": "test/graph-write.test.ts",+ "target": "src/graph/write.ts",+ "relation": "imports",+ "confidence": "extracted"},{- "source": "test/claude-format.test.ts",- "target": "src/claude/format.ts#formatOrientation",+ "source": "test/graphrank.test.ts",+ "target": "src/ask/ask.ts#ask","relation": "calls","confidence": "inferred"},{- "source": "test/claude-format.test.ts",- "target": "src/claude/format.ts#formatRetrieval",+ "source": "test/graphrank.test.ts",+ "target": "src/ask/graphrank.ts#personalizedPageRank","relation": "calls","confidence": "inferred"},{- "source": "test/claude-format.test.ts",- "target": "src/claude/format.ts#incomingEdges",+ "source": "test/graphrank.test.ts",+ "target": "src/graph/build.ts#buildGraph","relation": "calls","confidence": "inferred"},{- "source": "test/claude-format.test.ts",- "target": "src/claude/format.ts#renderStatusline",+ "source": "test/graphrank.test.ts",+ "target": "test/graphrank.test.ts#edge","relation": "calls",- "confidence": "inferred"+ "confidence": "extracted"},{- "source": "test/claude-format.test.ts",- "target": "src/claude/format.ts#renderSubagent",+ "source": "test/graphrank.test.ts",+ "target": "test/graphrank.test.ts#graphOf","relation": "calls",- "confidence": "inferred"+ "confidence": "extracted"},{- "source": "test/claude-format.test.ts",- "target": "src/claude/state.ts#emptyStats",+ "source": "test/graphrank.test.ts",+ "target": "test/graphrank.test.ts#makeCollisionFixture","relation": "calls",- "confidence": "inferred"+ "confidence": "extracted"},{- "source": "test/claude-format.test.ts",- "target": "test/claude-format.test.ts#strip",+ "source": "test/graphrank.test.ts",+ "target": "test/graphrank.test.ts#rank","relation": "calls","confidence": "extracted"},{- "source": "test/claude-format.test.ts",- "target": "test/claude-format.test.ts#strip",+ "source": "test/graphrank.test.ts",+ "target": "test/graphrank.test.ts#edge","relation": "contains","confidence": "extracted"},{- "source": "test/claude-format.test.ts",- "target": "node:assert/strict",- "relation": "imports",- "confidence": "extracted"- },- {- "source": "test/claude-format.test.ts",- "target": "node:test",- "relation": "imports",- "confidence": "extracted"- },- {- "source": "test/claude-format.test.ts",- "target": "src/claude/format.ts",- "relation": "imports",- "confidence": "extracted"- },- {- "source": "test/claude-format.test.ts",- "target": "src/claude/state.ts",- "relation": "imports",+ "source": "test/graphrank.test.ts",+ "target": "test/graphrank.test.ts#graphOf",+ "relation": "contains","confidence": "extracted"},{- "source": "test/claude-hooks.test.ts",- "target": "src/claude/hooks.ts#underGraft",- "relation": "calls",- "confidence": "inferred"- },- {- "source": "test/claude-hooks.test.ts",- "target": "src/claude/state.ts#acquireLock",- "relation": "calls",- "confidence": "inferred"- },- {- "source": "test/claude-hooks.test.ts",- "target": "src/claude/state.ts#emptyStats",- "relation": "calls",- "confidence": "inferred"- },- {- "source": "test/claude-hooks.test.ts",- "target": "src/claude/state.ts#readStats",- "relation": "calls",- "confidence": "inferred"- },- {- "source": "test/claude-hooks.test.ts",- "target": "src/claude/state.ts#writeStats",- "relation": "calls",- "confidence": "inferred"- },- {- "source": "test/claude-hooks.test.ts",- "target": "src/claude/sync-run.ts#runSync",- "relation": "calls",- "confidence": "inferred"- },- {- "source": "test/claude-hooks.test.ts",- "target": "test/claude-hooks.test.ts#runWithStdin",- "relation": "calls",+ "source": "test/graphrank.test.ts",+ "target": "test/graphrank.test.ts#makeCollisionFixture",+ "relation": "contains","confidence": "extracted"},{- "source": "test/claude-hooks.test.ts",- "target": "test/claude-hooks.test.ts#fakeBuild",+ "source": "test/graphrank.test.ts",+ "target": "test/graphrank.test.ts#node","relation": "contains","confidence": "extracted"},{- "source": "test/claude-hooks.test.ts",- "target": "test/claude-hooks.test.ts#runWithStdin",+ "source": "test/graphrank.test.ts",+ "target": "test/graphrank.test.ts#rank","relation": "contains","confidence": "extracted"},{- "source": "test/claude-hooks.test.ts",+ "source": "test/graphrank.test.ts","target": "node:assert/strict","relation": "imports","confidence": "extracted"},{- "source": "test/claude-hooks.test.ts",+ "source": "test/graphrank.test.ts","target": "node:fs","relation": "imports","confidence": "extracted"},{- "source": "test/claude-hooks.test.ts",+ "source": "test/graphrank.test.ts","target": "node:os","relation": "imports","confidence": "extracted"},{- "source": "test/claude-hooks.test.ts",+ "source": "test/graphrank.test.ts","target": "node:path","relation": "imports","confidence": "extracted"},{- "source": "test/claude-hooks.test.ts",+ "source": "test/graphrank.test.ts","target": "node:test","relation": "imports","confidence": "extracted"},{- "source": "test/claude-hooks.test.ts",- "target": "src/claude/hooks.ts",+ "source": "test/graphrank.test.ts",+ "target": "src/ask/ask.ts","relation": "imports","confidence": "extracted"},{- "source": "test/claude-hooks.test.ts",- "target": "src/claude/state.ts",+ "source": "test/graphrank.test.ts",+ "target": "src/ask/graphrank.ts","relation": "imports","confidence": "extracted"},{- "source": "test/claude-hooks.test.ts",- "target": "src/claude/sync-run.ts",+ "source": "test/graphrank.test.ts",+ "target": "src/graph/build.ts","relation": "imports","confidence": "extracted"},{- "source": "test/claude-state.test.ts",- "target": "src/claude/state.ts#acquireLock",- "relation": "calls",- "confidence": "inferred"+ "source": "test/graphrank.test.ts",+ "target": "src/graph/types.ts",+ "relation": "imports",+ "confidence": "extracted"},{- "source": "test/claude-state.test.ts",- "target": "src/claude/state.ts#cacheDir",+ "source": "test/graphrank.test.ts#rank",+ "target": "src/ask/ask.ts#ask","relation": "calls","confidence": "inferred"},{- "source": "test/claude-state.test.ts",- "target": "src/claude/state.ts#emptyStats",- "relation": "calls",- "confidence": "inferred"+ "source": "test/helpers.ts",+ "target": "test/helpers.ts#BracketSynthesizer",+ "relation": "contains",+ "confidence": "extracted"},{- "source": "test/claude-state.test.ts",- "target": "src/claude/state.ts#patchStats",- "relation": "calls",- "confidence": "inferred"+ "source": "test/helpers.ts",+ "target": "test/helpers.ts#fakeProviders",+ "relation": "contains",+ "confidence": "extracted"},{- "source": "test/claude-state.test.ts",- "target": "src/claude/state.ts#readSession",- "relation": "calls",+ "source": "test/helpers.ts",+ "target": "test/helpers.ts#PassthroughSummarizer",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "test/helpers.ts",+ "target": "src/index.ts",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "test/helpers.ts#BracketSynthesizer",+ "target": "test/helpers.ts#BracketSynthesizer.synthesize",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "test/helpers.ts#BracketSynthesizer",+ "target": "src/ai/synthesize.ts#Synthesizer",+ "relation": "implements","confidence": "inferred"},{- "source": "test/claude-state.test.ts",- "target": "src/claude/state.ts#readStats",+ "source": "test/helpers.ts#BracketSynthesizer.synthesize",+ "target": "test/helpers.ts#BracketSynthesizer.synthesize.ensure","relation": "calls",- "confidence": "inferred"+ "confidence": "extracted"},{- "source": "test/claude-state.test.ts",- "target": "src/claude/state.ts#releaseLock",- "relation": "calls",- "confidence": "inferred"+ "source": "test/helpers.ts#BracketSynthesizer.synthesize",+ "target": "test/helpers.ts#BracketSynthesizer.synthesize.ensure",+ "relation": "contains",+ "confidence": "extracted"},{- "source": "test/claude-state.test.ts",- "target": "src/claude/state.ts#writeSession",- "relation": "calls",+ "source": "test/helpers.ts#PassthroughSummarizer",+ "target": "test/helpers.ts#PassthroughSummarizer.summarize",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "test/helpers.ts#PassthroughSummarizer",+ "target": "src/ai/summarize.ts#Summarizer",+ "relation": "implements","confidence": "inferred"},{- "source": "test/claude-state.test.ts",- "target": "src/claude/state.ts#writeStats",+ "source": "test/hosts-codex-hooks.test.ts",+ "target": "src/hosts/codex-hooks.ts#installCodexHooks","relation": "calls","confidence": "inferred"},{- "source": "test/claude-state.test.ts",- "target": "test/claude-state.test.ts#fresh",+ "source": "test/hosts-codex-hooks.test.ts",+ "target": "test/hosts-codex-hooks.test.ts#fresh","relation": "calls","confidence": "extracted"},{- "source": "test/claude-state.test.ts",- "target": "test/claude-state.test.ts#fresh",+ "source": "test/hosts-codex-hooks.test.ts",+ "target": "test/hosts-codex-hooks.test.ts#fresh","relation": "contains","confidence": "extracted"},{- "source": "test/claude-state.test.ts",+ "source": "test/hosts-codex-hooks.test.ts","target": "node:assert/strict","relation": "imports","confidence": "extracted"},{- "source": "test/claude-state.test.ts",+ "source": "test/hosts-codex-hooks.test.ts","target": "node:fs","relation": "imports","confidence": "extracted"},{- "source": "test/claude-state.test.ts",+ "source": "test/hosts-codex-hooks.test.ts","target": "node:os","relation": "imports","confidence": "extracted"},{- "source": "test/claude-state.test.ts",+ "source": "test/hosts-codex-hooks.test.ts","target": "node:path","relation": "imports","confidence": "extracted"},{- "source": "test/claude-state.test.ts",+ "source": "test/hosts-codex-hooks.test.ts","target": "node:test","relation": "imports","confidence": "extracted"},{- "source": "test/claude-state.test.ts",- "target": "src/claude/state.ts",+ "source": "test/hosts-codex-hooks.test.ts",+ "target": "src/hosts/codex-hooks.ts","relation": "imports","confidence": "extracted"},{- "source": "test/claude-stats.test.ts",- "target": "src/claude/stats.ts#computeStats",+ "source": "test/hosts-init.test.ts",+ "target": "src/hosts/init.ts#runHostsInit","relation": "calls","confidence": "inferred"},{- "source": "test/claude-stats.test.ts",+ "source": "test/hosts-init.test.ts",+ "target": "test/hosts-init.test.ts#fresh",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "test/hosts-init.test.ts",+ "target": "test/hosts-init.test.ts#fresh",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "test/hosts-init.test.ts","target": "node:assert/strict","relation": "imports","confidence": "extracted"},{- "source": "test/claude-stats.test.ts",+ "source": "test/hosts-init.test.ts",+ "target": "node:child_process",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "test/hosts-init.test.ts",+ "target": "node:fs",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "test/hosts-init.test.ts",+ "target": "node:os",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "test/hosts-init.test.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "test/hosts-init.test.ts","target": "node:test","relation": "imports","confidence": "extracted"},{- "source": "test/claude-stats.test.ts",- "target": "src/claude/stats.ts",+ "source": "test/hosts-init.test.ts",+ "target": "src/hosts/init.ts","relation": "imports","confidence": "extracted"},{- "source": "test/claude-statusline.test.ts",- "target": "src/claude/state.ts#emptyStats",+ "source": "test/hosts-instructions.test.ts",+ "target": "src/hosts/instructions.ts#cursorRule","relation": "calls","confidence": "inferred"},{- "source": "test/claude-statusline.test.ts",- "target": "src/claude/state.ts#writeStats",+ "source": "test/hosts-instructions.test.ts",+ "target": "src/hosts/instructions.ts#instructionBody","relation": "calls","confidence": "inferred"},{- "source": "test/claude-statusline.test.ts",- "target": "src/claude/statusline.ts#resolveStats",+ "source": "test/hosts-instructions.test.ts",+ "target": "src/hosts/instructions.ts#kiroSteering","relation": "calls","confidence": "inferred"},{- "source": "test/claude-statusline.test.ts",- "target": "test/claude-statusline.test.ts#repo",+ "source": "test/hosts-instructions.test.ts",+ "target": "src/hosts/instructions.ts#windsurfRule","relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/hosts-instructions.test.ts",+ "target": "node:assert/strict",+ "relation": "imports","confidence": "extracted"},{- "source": "test/claude-statusline.test.ts",- "target": "test/claude-statusline.test.ts#writeWiring",- "relation": "calls",+ "source": "test/hosts-instructions.test.ts",+ "target": "node:test",+ "relation": "imports","confidence": "extracted"},{- "source": "test/claude-statusline.test.ts",- "target": "test/claude-statusline.test.ts#repo",- "relation": "contains",+ "source": "test/hosts-instructions.test.ts",+ "target": "src/hosts/instructions.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "test/claude-statusline.test.ts",- "target": "test/claude-statusline.test.ts#writeWiring",+ "source": "test/hosts-mcp-config.test.ts",+ "target": "src/hosts/mcp-config.ts#registerMcpConfigs",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/hosts-mcp-config.test.ts",+ "target": "test/hosts-mcp-config.test.ts#fresh",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "test/hosts-mcp-config.test.ts",+ "target": "test/hosts-mcp-config.test.ts#fresh","relation": "contains","confidence": "extracted"},{- "source": "test/claude-statusline.test.ts",+ "source": "test/hosts-mcp-config.test.ts","target": "node:assert/strict","relation": "imports","confidence": "extracted"},{- "source": "test/claude-statusline.test.ts",+ "source": "test/hosts-mcp-config.test.ts","target": "node:fs","relation": "imports","confidence": "extracted"},{- "source": "test/claude-statusline.test.ts",+ "source": "test/hosts-mcp-config.test.ts","target": "node:os","relation": "imports","confidence": "extracted"},{- "source": "test/claude-statusline.test.ts",+ "source": "test/hosts-mcp-config.test.ts","target": "node:path","relation": "imports","confidence": "extracted"},{- "source": "test/claude-statusline.test.ts",+ "source": "test/hosts-mcp-config.test.ts","target": "node:test","relation": "imports","confidence": "extracted"},{- "source": "test/claude-statusline.test.ts",- "target": "src/claude/state.ts",- "relation": "imports",- "confidence": "extracted"- },- {- "source": "test/claude-statusline.test.ts",- "target": "src/claude/statusline.ts",+ "source": "test/hosts-mcp-config.test.ts",+ "target": "src/hosts/mcp-config.ts","relation": "imports","confidence": "extracted"},{- "source": "test/context.test.ts",- "target": "src/context/build.ts#buildContext",+ "source": "test/hosts-registry.test.ts",+ "target": "src/hosts/registry.ts#detectHosts","relation": "calls","confidence": "inferred"},{- "source": "test/context.test.ts",- "target": "src/context/check.ts#checkContext",+ "source": "test/hosts-registry.test.ts",+ "target": "src/hosts/registry.ts#hostIds","relation": "calls","confidence": "inferred"},{- "source": "test/context.test.ts",- "target": "test/context.test.ts#buildOpts",+ "source": "test/hosts-registry.test.ts",+ "target": "test/hosts-registry.test.ts#fresh","relation": "calls","confidence": "extracted"},{- "source": "test/context.test.ts",- "target": "test/context.test.ts#makeFixture",+ "source": "test/hosts-registry.test.ts",+ "target": "test/hosts-registry.test.ts#probeFor","relation": "calls","confidence": "extracted"},{- "source": "test/context.test.ts",- "target": "test/context.test.ts#buildOpts",+ "source": "test/hosts-registry.test.ts",+ "target": "test/hosts-registry.test.ts#fresh","relation": "contains","confidence": "extracted"},{- "source": "test/context.test.ts",- "target": "test/context.test.ts#makeFixture",+ "source": "test/hosts-registry.test.ts",+ "target": "test/hosts-registry.test.ts#probeFor","relation": "contains","confidence": "extracted"},{- "source": "test/context.test.ts",+ "source": "test/hosts-registry.test.ts","target": "node:assert/strict","relation": "imports","confidence": "extracted"},{- "source": "test/context.test.ts",+ "source": "test/hosts-registry.test.ts","target": "node:fs","relation": "imports","confidence": "extracted"},{- "source": "test/context.test.ts",+ "source": "test/hosts-registry.test.ts","target": "node:os","relation": "imports","confidence": "extracted"},{- "source": "test/context.test.ts",+ "source": "test/hosts-registry.test.ts","target": "node:path","relation": "imports","confidence": "extracted"},{- "source": "test/context.test.ts",+ "source": "test/hosts-registry.test.ts","target": "node:test","relation": "imports","confidence": "extracted"},{- "source": "test/context.test.ts",- "target": "src/context/build.ts",+ "source": "test/hosts-registry.test.ts",+ "target": "src/hosts/registry.ts","relation": "imports","confidence": "extracted"},{- "source": "test/context.test.ts",- "target": "src/context/check.ts",+ "source": "test/hosts-sections.test.ts",+ "target": "src/hosts/sections.ts#fencedBlock",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/hosts-sections.test.ts",+ "target": "src/hosts/sections.ts#upsertSection",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/hosts-sections.test.ts",+ "target": "test/hosts-sections.test.ts#fresh",+ "relation": "calls",+ "confidence": "extracted"+ },+ {+ "source": "test/hosts-sections.test.ts",+ "target": "test/hosts-sections.test.ts#fresh",+ "relation": "contains",+ "confidence": "extracted"+ },+ {+ "source": "test/hosts-sections.test.ts",+ "target": "node:assert/strict","relation": "imports","confidence": "extracted"},{- "source": "test/context.test.ts",- "target": "test/helpers.ts",+ "source": "test/hosts-sections.test.ts",+ "target": "node:fs","relation": "imports","confidence": "extracted"},{- "source": "test/context.test.ts#buildOpts",- "target": "test/helpers.ts#fakeProviders",- "relation": "calls",- "confidence": "inferred"+ "source": "test/hosts-sections.test.ts",+ "target": "node:os",+ "relation": "imports",+ "confidence": "extracted"},{- "source": "test/covers.test.ts",- "target": "src/context/build.ts#buildContext",- "relation": "calls",- "confidence": "inferred"+ "source": "test/hosts-sections.test.ts",+ "target": "node:path",+ "relation": "imports",+ "confidence": "extracted"},{- "source": "test/covers.test.ts",- "target": "src/graph/build.ts#buildGraph",- "relation": "calls",- "confidence": "inferred"+ "source": "test/hosts-sections.test.ts",+ "target": "node:test",+ "relation": "imports",+ "confidence": "extracted"},{- "source": "test/covers.test.ts",- "target": "test/covers.test.ts#makeFixture",- "relation": "calls",+ "source": "test/hosts-sections.test.ts",+ "target": "src/hosts/sections.ts",+ "relation": "imports","confidence": "extracted"},{- "source": "test/covers.test.ts",- "target": "test/helpers.ts#fakeProviders",+ "source": "test/mcp-server.test.ts",+ "target": "test/mcp-server.test.ts#rpc","relation": "calls",- "confidence": "inferred"+ "confidence": "extracted"},{- "source": "test/covers.test.ts",- "target": "test/covers.test.ts#makeFixture",+ "source": "test/mcp-server.test.ts",+ "target": "test/mcp-server.test.ts#rpc","relation": "contains","confidence": "extracted"},{- "source": "test/covers.test.ts",- "target": "gray-matter",+ "source": "test/mcp-server.test.ts",+ "target": "node:assert/strict","relation": "imports","confidence": "extracted"},{- "source": "test/covers.test.ts",- "target": "node:assert/strict",+ "source": "test/mcp-server.test.ts",+ "target": "node:child_process","relation": "imports","confidence": "extracted"},{- "source": "test/covers.test.ts",+ "source": "test/mcp-server.test.ts",+ "target": "node:events",+ "relation": "imports",+ "confidence": "extracted"+ },+ {+ "source": "test/mcp-server.test.ts","target": "node:fs","relation": "imports","confidence": "extracted"},{- "source": "test/covers.test.ts",+ "source": "test/mcp-server.test.ts","target": "node:os","relation": "imports","confidence": "extracted"},{- "source": "test/covers.test.ts",+ "source": "test/mcp-server.test.ts","target": "node:path","relation": "imports","confidence": "extracted"},{- "source": "test/covers.test.ts",+ "source": "test/mcp-server.test.ts","target": "node:test","relation": "imports","confidence": "extracted"},{- "source": "test/covers.test.ts",- "target": "src/context/build.ts",- "relation": "imports",+ "source": "test/mcp-tools.test.ts",+ "target": "src/mcp/tools.ts#callTool",+ "relation": "calls",+ "confidence": "inferred"+ },+ {+ "source": "test/mcp-tools.test.ts",+ "target": "test/mcp-tools.test.ts#builtRepo",+ "relation": "calls","confidence": "extracted"},{- "source": "test/covers.test.ts",- "target": "src/graph/build.ts",- "relation": "imports",+ "source": "test/mcp-tools.test.ts",+ "target": "test/mcp-tools.test.ts#chainRepo",+ "relation": "calls","confidence": "extracted"},{- "source": "test/covers.test.ts",- "target": "test/helpers.ts",- "relation": "imports",+ "source": "test/mcp-tools.test.ts",+ "target": "test/mcp-tools.test.ts#fileScopeRepo",+ "relation": "calls","confidence": "extracted"},{- "source": "test/helpers.ts",- "target": "test/helpers.ts#BracketSynthesizer",+ "source": "test/mcp-tools.test.ts",+ "target": "test/mcp-tools.test.ts#builtRepo","relation": "contains","confidence": "extracted"},{- "source": "test/helpers.ts",- "target": "test/helpers.ts#fakeProviders",+ "source": "test/mcp-tools.test.ts",+ "target": "test/mcp-tools.test.ts#chainRepo","relation": "contains","confidence": "extracted"},{- "source": "test/helpers.ts",- "target": "test/helpers.ts#PassthroughSummarizer",+ "source": "test/mcp-tools.test.ts",+ "target": "test/mcp-tools.test.ts#fileScopeRepo","relation": "contains","confidence": "extracted"},{- "source": "test/helpers.ts",- "target": "src/index.ts",+ "source": "test/mcp-tools.test.ts",+ "target": "node:assert/strict","relation": "imports","confidence": "extracted"},{- "source": "test/helpers.ts#BracketSynthesizer",- "target": "test/helpers.ts#BracketSynthesizer.synthesize",- "relation": "contains",+ "source": "test/mcp-tools.test.ts",+ "target": "node:child_process",+ "relation": "imports","confidence": "extracted"},{- "source": "test/helpers.ts#BracketSynthesizer",- "target": "src/ai/synthesize.ts#Synthesizer",- "relation": "implements",- "confidence": "inferred"+ "source": "test/mcp-tools.test.ts",+ "target": "node:fs",+ "relation": "imports",+ "confidence": "extracted"},{- "source": "test/helpers.ts#BracketSynthesizer.synthesize",- "target": "test/helpers.ts#BracketSynthesizer.synthesize.ensure",- "relation": "calls",+ "source": "test/mcp-tools.test.ts",+ "target": "node:os",+ "relation": "imports","confidence": "extracted"},{- "source": "test/helpers.ts#BracketSynthesizer.synthesize",- "target": "test/helpers.ts#BracketSynthesizer.synthesize.ensure",- "relation": "contains",+ "source": "test/mcp-tools.test.ts",+ "target": "node:path",+ "relation": "imports","confidence": "extracted"},{- "source": "test/helpers.ts#PassthroughSummarizer",- "target": "test/helpers.ts#PassthroughSummarizer.summarize",- "relation": "contains",+ "source": "test/mcp-tools.test.ts",+ "target": "node:test",+ "relation": "imports","confidence": "extracted"},{- "source": "test/helpers.ts#PassthroughSummarizer",- "target": "src/ai/summarize.ts#Summarizer",- "relation": "implements",- "confidence": "inferred"+ "source": "test/mcp-tools.test.ts",+ "target": "src/mcp/tools.ts",+ "relation": "imports",+ "confidence": "extracted"},{"source": "test/viz-assemble.test.ts",diff --git a/graft/INDEX.md b/graft/INDEX.mdindex 758eb640..7995bca3 100644--- a/graft/INDEX.md+++ b/graft/INDEX.md@@ -21,5 +21,5 @@ filename here, or run `graft ask "<task>"`. Each node carries prose plus exact## Files-54 per-file wiring cards mirror the source tree under `graft/` (51 carry extracted symbols). They are deliberately not enumerated here —+96 per-file wiring cards mirror the source tree under `graft/` (86 carry extracted symbols). They are deliberately not enumerated here —`grep` a symbol or `find`/`ls` a filename under `graft/` to land on the card for that file.diff --git a/graft/bench/agent.md b/graft/bench/agent.mdindex 513e770a..e1649152 100644--- a/graft/bench/agent.md+++ b/graft/bench/agent.md@@ -2,12 +2,12 @@This file implements a benchmark agent that processes questions about a codebase using filesystem tools and a language model.-- AgentResult · interface · L19-L27 — Defines the structure of the result returned by the agent, encapsulating the answer and various metrics.-- RunAgentOptions · interface · L29-L37 — Specifies the options for running the agent, including the root directory and the question to be answered.-- safePath · function · L46-L60 — Ensures that a given path is safely resolved within a specified root directory, preventing directory traversal attacks.-- listFiles · function · L62-L89 — Recursively lists all files in a directory while respecting size limits and skipping specified directories.-- walk · function · L64-L86 — A helper function that traverses a directory to collect file paths, avoiding hidden files and skipped directories.-- globToRegExp · function · L92-L106 — Converts a glob pattern into a regular expression for matching file paths.-- runTool · function · L168-L228 — Executes a specified tool (like reading a file or listing a directory) based on the provided input parameters.-- runAgent · function · L230-L322 — Manages the execution of the agent's logic, including handling user questions and tool interactions.-- slideCacheBreakpoint · function · L254-L260 — Maintains the cache state by updating the cache control for the most recent tool result in the message history.+- AgentResult · interface · L20-L28 — Defines the structure of the result returned by the agent, encapsulating the answer and various metrics.+- RunAgentOptions · interface · L30-L42 — Specifies the options for running the agent, including the root directory and the question to be answered.+- safePath · function · L51-L65 — Ensures that a given path is safely resolved within a specified root directory, preventing directory traversal attacks.+- listFiles · function · L67-L94 — Recursively lists all files in a directory while respecting size limits and skipping specified directories.+- walk · function · L69-L91 — A helper function that traverses a directory to collect file paths, avoiding hidden files and skipped directories.+- globToRegExp · function · L97-L111 — Converts a glob pattern into a regular expression for matching file paths.+- runTool · function · L207-L277 — Executes a specified tool (like reading a file or listing a directory) based on the provided input parameters.+- runAgent · function · L279-L376 — Manages the execution of the agent's logic, including handling user questions and tool interactions.+- slideCacheBreakpoint · function · L308-L314 — Maintains the cache state by updating the cache control for the most recent tool result in the message history.diff --git a/graft/bench/report.md b/graft/bench/report.mdindex 351dc40c..86e66daf 100644--- a/graft/bench/report.md+++ b/graft/bench/report.md@@ -2,11 +2,15 @@This file provides functionality for aggregating and reporting benchmark results for different agent configurations.-- Row · interface · L6-L26 — Defines the structure of a benchmark trial row, capturing various metrics related to agent performance.-- costOf · function · L33-L38 — Calculates the approximate cost of running an agent based on input and output tokens and cache operations.-- mean · function · L40-L42 — Computes the mean of an array of numbers, returning zero for an empty array.-- ArmAgg · interface · L44-L54 — Represents aggregated metrics for a specific arm of the benchmark, including totals and averages.-- aggregate · function · L56-L68 — Aggregates multiple benchmark rows into a single ArmAgg object, calculating averages for various metrics.-- pctDelta · function · L70-L74 — Calculates the percentage delta between two values, handling the case where the first value is zero.-- fmt · function · L76-L78 — Formats a number for display, adjusting for thousands and decimal precision.-- buildMarkdown · function · L80-L125 — Generates a markdown report summarizing benchmark results across different corpora and arms.+- Arm · type · L6-L6 — type Arm = "cold" | "graph" | "pull";+- Row · interface · L8-L30 — Defines the structure of a benchmark trial row, capturing various metrics related to agent performance.+- costOf · function · L37-L42 — Calculates the approximate cost of running an agent based on input and output tokens and cache operations.+- mean · function · L44-L46 — Computes the mean of an array of numbers, returning zero for an empty array.+- ArmAgg · interface · L48-L58 — Represents aggregated metrics for a specific arm of the benchmark, including totals and averages.+- aggregate · function · L60-L72 — Aggregates multiple benchmark rows into a single ArmAgg object, calculating averages for various metrics.+- pctDelta · function · L74-L78 — Calculates the percentage delta between two values, handling the case where the first value is zero.+- fmt · function · L80-L82 — Formats a number for display, adjusting for thousands and decimal precision.+- metricTable · function · L88-L114 — function metricTable(rows: Row[], arms: Arm[]): string[]+- cells · function · L93-L102 — cells = (label: string, value: (a: ArmAgg) => number, render: (v: number) => string, delta?: (c: number, x: number) => string)+- verdictFor · function · L117-L127 — function verdictFor(label: string, c: ArmAgg, g: ArmAgg): string+- buildMarkdown · function · L129-L175 — Generates a markdown report summarizing benchmark results across different corpora and arms.diff --git a/graft/bench/run.md b/graft/bench/run.mdindex 5e5af8e7..4c3805c5 100644--- a/graft/bench/run.md+++ b/graft/bench/run.md@@ -2,9 +2,8 @@This file orchestrates the benchmarking process for various corpora and tasks, managing the execution and reporting of results.-- Args · interface · L29-L35 — Defines the structure for command-line arguments used to configure the benchmarking run.-- parseArgs · function · L37-L52 — Parses command-line arguments to extract configuration options for the benchmarking process.-- pool · function · L55-L66 — Executes a function on a set of items concurrently, limiting the number of simultaneous operations.-- worker · function · L58-L63 — Processes items in the pool function, handling each item asynchronously.-- makeDocsWorkdir · function · L69-L82 — Creates a temporary working directory for processing documents in a specified corpus.-- main · function · L84-L201 — Coordinates the overall benchmarking process, including argument parsing, corpus ingestion, and result reporting.+- Args · interface · L38-L44 — Defines the structure for command-line arguments used to configure the benchmarking run.+- parseArgs · function · L46-L66 — Parses command-line arguments to extract configuration options for the benchmarking process.+- pool · function · L69-L80 — Executes a function on a set of items concurrently, limiting the number of simultaneous operations.+- worker · function · L72-L77 — Processes items in the pool function, handling each item asynchronously.+- main · function · L82-L202 — Coordinates the overall benchmarking process, including argument parsing, corpus ingestion, and result reporting.diff --git a/graft/bench/tasks.md b/graft/bench/tasks.mdindex be516b04..3079954b 100644--- a/graft/bench/tasks.md+++ b/graft/bench/tasks.md@@ -2,6 +2,6 @@This file defines benchmark tasks and their corresponding reference answers for validating code understanding across multiple repositories.-- repoPath · function · L26-L29 — This function determines the file path for sibling repositories, allowing for environment variable overrides.-- Task · interface · L31-L37 — This interface outlines the structure of a benchmark task, including its ID, question, reference answer, and required keywords.-- Corpus · interface · L39-L45 — This interface defines a corpus of benchmark tasks, specifying its ID, type, path, and associated tasks.+- repoPath · function · L30-L33 — This function determines the file path for sibling repositories, allowing for environment variable overrides.+- Task · interface · L35-L45 — This interface outlines the structure of a benchmark task, including its ID, question, reference answer, and required keywords.+- Corpus · interface · L47-L53 — This interface defines a corpus of benchmark tasks, specifying its ID, type, path, and associated tasks.diff --git a/graft/benchmarking-framework.md b/graft/benchmarking-framework.mdindex d9595852..3a9ec84b 100644--- a/graft/benchmarking-framework.md+++ b/graft/benchmarking-framework.md@@ -33,31 +33,31 @@ generator:covers:- symbol: AgentResultkind: interface- at: 'bench/agent.ts:L19-L27'+ at: 'bench/agent.ts:L20-L28'- symbol: RunAgentOptionskind: interface- at: 'bench/agent.ts:L29-L37'+ at: 'bench/agent.ts:L30-L42'- symbol: safePathkind: function- at: 'bench/agent.ts:L46-L60'+ at: 'bench/agent.ts:L51-L65'- symbol: listFileskind: function- at: 'bench/agent.ts:L62-L89'+ at: 'bench/agent.ts:L67-L94'- symbol: walkkind: function- at: 'bench/agent.ts:L64-L86'+ at: 'bench/agent.ts:L69-L91'- symbol: globToRegExpkind: function- at: 'bench/agent.ts:L92-L106'+ at: 'bench/agent.ts:L97-L111'- symbol: runToolkind: function- at: 'bench/agent.ts:L168-L228'+ at: 'bench/agent.ts:L207-L277'- symbol: runAgentkind: function- at: 'bench/agent.ts:L230-L322'+ at: 'bench/agent.ts:L279-L376'- symbol: slideCacheBreakpointkind: function- at: 'bench/agent.ts:L254-L260'+ at: 'bench/agent.ts:L308-L314'- symbol: Verdictkind: interfaceat: 'bench/judge.ts:L18-L24'@@ -73,48 +73,57 @@ covers:- symbol: makeClientkind: functionat: 'bench/llm.ts:L14-L18'+ - symbol: Arm+ kind: type+ at: 'bench/report.ts:L6-L6'- symbol: Rowkind: interface- at: 'bench/report.ts:L6-L26'+ at: 'bench/report.ts:L8-L30'- symbol: costOfkind: function- at: 'bench/report.ts:L33-L38'+ at: 'bench/report.ts:L37-L42'- symbol: meankind: function- at: 'bench/report.ts:L40-L42'+ at: 'bench/report.ts:L44-L46'- symbol: ArmAggkind: interface- at: 'bench/report.ts:L44-L54'+ at: 'bench/report.ts:L48-L58'- symbol: aggregatekind: function- at: 'bench/report.ts:L56-L68'+ at: 'bench/report.ts:L60-L72'- symbol: pctDeltakind: function- at: 'bench/report.ts:L70-L74'+ at: 'bench/report.ts:L74-L78'- symbol: fmtkind: function- at: 'bench/report.ts:L76-L78'+ at: 'bench/report.ts:L80-L82'+ - symbol: metricTable+ kind: function+ at: 'bench/report.ts:L88-L114'+ - symbol: cells+ kind: function+ at: 'bench/report.ts:L93-L102'+ - symbol: verdictFor+ kind: function+ at: 'bench/report.ts:L117-L127'- symbol: buildMarkdownkind: function- at: 'bench/report.ts:L80-L125'+ at: 'bench/report.ts:L129-L175'- symbol: Argskind: interface- at: 'bench/run.ts:L29-L35'+ at: 'bench/run.ts:L38-L44'- symbol: parseArgskind: function- at: 'bench/run.ts:L37-L52'+ at: 'bench/run.ts:L46-L66'- symbol: poolkind: function- at: 'bench/run.ts:L55-L66'+ at: 'bench/run.ts:L69-L80'- symbol: workerkind: function- at: 'bench/run.ts:L58-L63'- - symbol: makeDocsWorkdir- kind: function- at: 'bench/run.ts:L69-L82'+ at: 'bench/run.ts:L72-L77'- symbol: mainkind: function- at: 'bench/run.ts:L84-L201'+ at: 'bench/run.ts:L82-L202'- symbol: makeStubClientkind: functionat: 'bench/selfcheck.ts:L19-L48'@@ -123,13 +132,13 @@ covers:at: 'bench/selfcheck.ts:L50-L114'- symbol: repoPathkind: function- at: 'bench/tasks.ts:L26-L29'+ at: 'bench/tasks.ts:L30-L33'- symbol: Taskkind: interface- at: 'bench/tasks.ts:L31-L37'+ at: 'bench/tasks.ts:L35-L45'- symbol: Corpuskind: interface- at: 'bench/tasks.ts:L39-L45'+ at: 'bench/tasks.ts:L47-L53'---<!-- context:generated:start -->## Summarydiff --git a/graft/benchmarking-results-reporting.md b/graft/benchmarking-results-reporting.mdindex 93879687..b8f159a8 100644--- a/graft/benchmarking-results-reporting.md+++ b/graft/benchmarking-results-reporting.md@@ -13,30 +13,42 @@ links:generator:version: 1covers:+ - symbol: Arm+ kind: type+ at: 'bench/report.ts:L6-L6'- symbol: Rowkind: interface- at: 'bench/report.ts:L6-L26'+ at: 'bench/report.ts:L8-L30'- symbol: costOfkind: function- at: 'bench/report.ts:L33-L38'+ at: 'bench/report.ts:L37-L42'- symbol: meankind: function- at: 'bench/report.ts:L40-L42'+ at: 'bench/report.ts:L44-L46'- symbol: ArmAggkind: interface- at: 'bench/report.ts:L44-L54'+ at: 'bench/report.ts:L48-L58'- symbol: aggregatekind: function- at: 'bench/report.ts:L56-L68'+ at: 'bench/report.ts:L60-L72'- symbol: pctDeltakind: function- at: 'bench/report.ts:L70-L74'+ at: 'bench/report.ts:L74-L78'- symbol: fmtkind: function- at: 'bench/report.ts:L76-L78'+ at: 'bench/report.ts:L80-L82'+ - symbol: metricTable+ kind: function+ at: 'bench/report.ts:L88-L114'+ - symbol: cells+ kind: function+ at: 'bench/report.ts:L93-L102'+ - symbol: verdictFor+ kind: function+ at: 'bench/report.ts:L117-L127'- symbol: buildMarkdownkind: function- at: 'bench/report.ts:L80-L125'+ at: 'bench/report.ts:L129-L175'---<!-- context:generated:start -->## Summarydiff --git a/graft/caching-mechanism.md b/graft/caching-mechanism.mdindex 7173a16e..f4b0ef4a 100644--- a/graft/caching-mechanism.md+++ b/graft/caching-mechanism.md@@ -19,55 +19,67 @@ generator:covers:- symbol: AgentResultkind: interface- at: 'bench/agent.ts:L19-L27'+ at: 'bench/agent.ts:L20-L28'- symbol: RunAgentOptionskind: interface- at: 'bench/agent.ts:L29-L37'+ at: 'bench/agent.ts:L30-L42'- symbol: safePathkind: function- at: 'bench/agent.ts:L46-L60'+ at: 'bench/agent.ts:L51-L65'- symbol: listFileskind: function- at: 'bench/agent.ts:L62-L89'+ at: 'bench/agent.ts:L67-L94'- symbol: walkkind: function- at: 'bench/agent.ts:L64-L86'+ at: 'bench/agent.ts:L69-L91'- symbol: globToRegExpkind: function- at: 'bench/agent.ts:L92-L106'+ at: 'bench/agent.ts:L97-L111'- symbol: runToolkind: function- at: 'bench/agent.ts:L168-L228'+ at: 'bench/agent.ts:L207-L277'- symbol: runAgentkind: function- at: 'bench/agent.ts:L230-L322'+ at: 'bench/agent.ts:L279-L376'- symbol: slideCacheBreakpointkind: function- at: 'bench/agent.ts:L254-L260'+ at: 'bench/agent.ts:L308-L314'+ - symbol: Arm+ kind: type+ at: 'bench/report.ts:L6-L6'- symbol: Rowkind: interface- at: 'bench/report.ts:L6-L26'+ at: 'bench/report.ts:L8-L30'- symbol: costOfkind: function- at: 'bench/report.ts:L33-L38'+ at: 'bench/report.ts:L37-L42'- symbol: meankind: function- at: 'bench/report.ts:L40-L42'+ at: 'bench/report.ts:L44-L46'- symbol: ArmAggkind: interface- at: 'bench/report.ts:L44-L54'+ at: 'bench/report.ts:L48-L58'- symbol: aggregatekind: function- at: 'bench/report.ts:L56-L68'+ at: 'bench/report.ts:L60-L72'- symbol: pctDeltakind: function- at: 'bench/report.ts:L70-L74'+ at: 'bench/report.ts:L74-L78'- symbol: fmtkind: function- at: 'bench/report.ts:L76-L78'+ at: 'bench/report.ts:L80-L82'+ - symbol: metricTable+ kind: function+ at: 'bench/report.ts:L88-L114'+ - symbol: cells+ kind: function+ at: 'bench/report.ts:L93-L102'+ - symbol: verdictFor+ kind: function+ at: 'bench/report.ts:L117-L127'- symbol: buildMarkdownkind: function- at: 'bench/report.ts:L80-L125'+ at: 'bench/report.ts:L129-L175'- symbol: BuildProgresskind: interfaceat: 'src/context/build.ts:L47-L52'diff --git a/graft/code-summarization-and-synthesis.md b/graft/code-summarization-and-synthesis.mdindex d517ad0d..12cdb4f6 100644--- a/graft/code-summarization-and-synthesis.md+++ b/graft/code-summarization-and-synthesis.md@@ -79,19 +79,19 @@ covers:at: 'src/ai/synthesize.ts:L35-L37'- symbol: userContentkind: function- at: 'src/ai/synthesize.ts:L92-L97'+ at: 'src/ai/synthesize.ts:L93-L98'- symbol: cleankind: function- at: 'src/ai/synthesize.ts:L100-L122'+ at: 'src/ai/synthesize.ts:L101-L123'- symbol: OpenRouterSynthesizerkind: class- at: 'src/ai/synthesize.ts:L134-L163'+ at: 'src/ai/synthesize.ts:L135-L164'- symbol: constructorkind: method- at: 'src/ai/synthesize.ts:L138-L141'+ at: 'src/ai/synthesize.ts:L139-L142'- symbol: synthesizekind: method- at: 'src/ai/synthesize.ts:L143-L162'+ at: 'src/ai/synthesize.ts:L144-L163'---<!-- context:generated:start -->## Summarydiff --git a/graft/error-handling-and-reporting.md b/graft/error-handling-and-reporting.mdindex 886dc9d7..9ab842b3 100644--- a/graft/error-handling-and-reporting.md+++ b/graft/error-handling-and-reporting.md@@ -19,34 +19,34 @@ generator:covers:- symbol: Argskind: interface- at: 'bench/run.ts:L29-L35'+ at: 'bench/run.ts:L38-L44'- symbol: parseArgskind: function- at: 'bench/run.ts:L37-L52'+ at: 'bench/run.ts:L46-L66'- symbol: poolkind: function- at: 'bench/run.ts:L55-L66'+ at: 'bench/run.ts:L69-L80'- symbol: workerkind: function- at: 'bench/run.ts:L58-L63'- - symbol: makeDocsWorkdir- kind: function- at: 'bench/run.ts:L69-L82'+ at: 'bench/run.ts:L72-L77'- symbol: mainkind: function- at: 'bench/run.ts:L84-L201'+ at: 'bench/run.ts:L82-L202'- symbol: GraphBuildOptionskind: interface- at: 'src/graph/build.ts:L22-L35'+ at: 'src/graph/build.ts:L23-L36'- symbol: GraphBuildResultkind: interface- at: 'src/graph/build.ts:L37-L50'+ at: 'src/graph/build.ts:L38-L51'- symbol: listSourceFileskind: function- at: 'src/graph/build.ts:L53-L55'+ at: 'src/graph/build.ts:L54-L56'+ - symbol: readGoModules+ kind: function+ at: 'src/graph/build.ts:L62-L76'- symbol: buildGraphkind: function- at: 'src/graph/build.ts:L57-L146'+ at: 'src/graph/build.ts:L78-L183'- symbol: GraphCheckResultkind: interfaceat: 'src/graph/check.ts:L27-L37'diff --git a/graft/graph-construction.md b/graft/graph-construction.mdindex fb41e7b5..a0607b72 100644--- a/graft/graph-construction.md+++ b/graft/graph-construction.md@@ -87,16 +87,19 @@ covers:at: 'src/context/check.ts:L137-L139'- symbol: GraphBuildOptionskind: interface- at: 'src/graph/build.ts:L22-L35'+ at: 'src/graph/build.ts:L23-L36'- symbol: GraphBuildResultkind: interface- at: 'src/graph/build.ts:L37-L50'+ at: 'src/graph/build.ts:L38-L51'- symbol: listSourceFileskind: function- at: 'src/graph/build.ts:L53-L55'+ at: 'src/graph/build.ts:L54-L56'+ - symbol: readGoModules+ kind: function+ at: 'src/graph/build.ts:L62-L76'- symbol: buildGraphkind: function- at: 'src/graph/build.ts:L57-L146'+ at: 'src/graph/build.ts:L78-L183'- symbol: GraphCheckResultkind: interfaceat: 'src/graph/check.ts:L27-L37'diff --git a/graft/graph-management.md b/graft/graph-management.mdindex bdc9f92e..ac04a166 100644--- a/graft/graph-management.md+++ b/graft/graph-management.md@@ -22,9 +22,12 @@ covers:- symbol: writeGraphkind: functionat: 'src/graph/write.ts:L36-L46'+ - symbol: stripBodyText+ kind: function+ at: 'src/graph/write.ts:L57-L61'- symbol: edgeOrderkind: function- at: 'src/graph/write.ts:L48-L54'+ at: 'src/graph/write.ts:L63-L69'---<!-- context:generated:start -->## Summarydiff --git a/graft/scripts/postinstall.md b/graft/scripts/postinstall.mdnew file mode 100644index 00000000..0e44a530--- /dev/null+++ b/graft/scripts/postinstall.md@@ -0,0 +1,3 @@+# scripts/postinstall.mjs++_No extracted symbols in this file._diff --git a/graft/src/ai/synthesize.md b/graft/src/ai/synthesize.mdindex 67041ce0..3e98d8aa 100644--- a/graft/src/ai/synthesize.md+++ b/graft/src/ai/synthesize.md@@ -6,8 +6,8 @@ This file defines the architecture for synthesizing a graph of nodes from file s- SynthNode · interface · L19-L27 — Represents a node in the synthesized graph, encapsulating its name, type, summary, sources, and links to other nodes.- FileSummary · interface · L30-L33 — Holds the summary information for a single file, including its path and a descriptive summary.- Synthesizer · interface · L35-L37 — Defines the interface for synthesizers that convert file summaries into structured nodes.-- userContent · function · L92-L97 — Constructs a formatted string from an array of file summaries, ensuring it does not exceed a specified character limit.-- clean · function · L100-L122 — Normalizes and cleans a raw model response into a structured array of SynthNode objects.-- OpenRouterSynthesizer · class · L134-L163 — Implements the Synthesizer interface using OpenRouter's API to generate nodes from file summaries.-- constructor · method · L138-L141 — Initializes the OpenRouterSynthesizer with API key, model, and optional base URL for the OpenAI client.-- synthesize · method · L143-L162 — Processes an array of file summaries to produce a structured array of SynthNode objects by interacting with the OpenAI API.+- userContent · function · L93-L98 — Constructs a formatted string from an array of file summaries, ensuring it does not exceed a specified character limit.+- clean · function · L101-L123 — Normalizes and cleans a raw model response into a structured array of SynthNode objects.+- OpenRouterSynthesizer · class · L135-L164 — Implements the Synthesizer interface using OpenRouter's API to generate nodes from file summaries.+- constructor · method · L139-L142 — Initializes the OpenRouterSynthesizer with API key, model, and optional base URL for the OpenAI client.+- synthesize · method · L144-L163 — Processes an array of file summaries to produce a structured array of SynthNode objects by interacting with the OpenAI API.diff --git a/graft/src/ask/ask.md b/graft/src/ask/ask.mdindex 265748aa..bc0547a5 100644--- a/graft/src/ask/ask.md+++ b/graft/src/ask/ask.md@@ -2,24 +2,37 @@This file implements a query tool that routes natural language queries to relevant code symbols and returns structured context information.-- AskHit · interface · L23-L36 — Represents a hit in the query results, encapsulating details about a code symbol and its context.-- AskResult · interface · L42-L53 — Encapsulates the result of a query, including the query string, mode of operation, and the hits found.-- tokenize · function · L62-L68 — Transforms a string of text into an array of lowercased subword tokens, filtering out common stop words.-- counts · function · L71-L75 — Creates a frequency count map of tokens, allowing for analysis of term occurrences in a document.-- firstProse · function · L78-L85 — Extracts the first meaningful prose line from a body of text, ignoring headings and blank lines.-- Corpus · interface · L87-L90 — Defines the structure for a corpus containing concepts and a graph, used for processing queries.-- loadCorpus · function · L92-L117 — Loads a corpus from a specified directory, extracting concepts and building a graph for query processing.-- score · function · L120-L127 — Calculates a score for a document's token counts against a query, facilitating relevance ranking.-- findSubject · function · L137-L155 — Identifies the most relevant symbols in the graph that match the query, prioritizing exact name matches.-- structural · function · L157-L198 — Processes a structural query to find and return relevant callers or callees from the graph based on the query.-- lexical · function · L202-L246 — Ranks concepts and symbols based on lexical matching with the query, returning the most relevant results.-- AskOptions · interface · L248-L254 — Defines options for customizing the behavior of the ask function, such as context directory and result limits.-- parseSpan · function · L258-L262 — Parses a string pointer into its file path and line range components, facilitating source code navigation.-- sliceSpan · function · L266-L281 — Reads a specified range of lines from a source file, allowing for inlined code snippets in query results.-- inlineSource · function · L284-L291 — Attaches inlined source code to query hits, enhancing the context provided to the user.-- hitFiles · function · L295-L304 — function hitFiles(hits: AskHit[]): Set<string>-- baselineFor · function · L309-L324 — function baselineFor(hits: AskHit[], graph: GraphV1 | null): AskResult["saved"] | undefined-- ask · function · L327-L347 — Processes a query against a code graph, returning structured results based on the query type and context.-- toTokens · function · L350-L352 — function toTokens(chars: number): number-- formatAsk · function · L355-L379 — Formats the results of a query into a markdown context pack for easy readability and presentation.-- savingsFooter · function · L384-L396 — function savingsFooter(r: AskResult, body: string): string+- AskHit · interface · L26-L39 — Represents a hit in the query results, encapsulating details about a code symbol and its context.+- AskResult · interface · L45-L62 — Encapsulates the result of a query, including the query string, mode of operation, and the hits found.+- firstProse · function · L65-L72 — Extracts the first meaningful prose line from a body of text, ignoring headings and blank lines.+- Corpus · interface · L74-L81 — Defines the structure for a corpus containing concepts and a graph, used for processing queries.+- loadCorpus · function · L83-L108 — Loads a corpus from a specified directory, extracting concepts and building a graph for query processing.+- score · function · L117-L128 — Calculates a score for a document's token counts against a query, facilitating relevance ranking.+- idfFromDf · function · L134-L138 — function idfFromDf(df: Map<string, number>, n: number): Map<string, number>+- computeIdf · function · L140-L145 — function computeIdf(docBags: Array<Set<string>>): Map<string, number>+- computeIdfFromIndex · function · L154-L159 — function computeIdfFromIndex(index: AskIndex, conceptBags: Array<Set<string>>): Map<string, number>+- bm25 · function · L166-L182 — function bm25( query: Map<string, number>, doc: Map<string, number>, idf: Map<string, number>, dl: number, avgdl: number, ): number+- subjectWords · function · L194-L196 — function subjectWords(query: string): string[]+- findSubjectNodes · function · L206-L213 — function findSubjectNodes(query: string, graph: GraphV1): { nodes: NodeV1[]; tried: string }+- StructuralOutcome · type · L221-L221 — type StructuralOutcome = { result: AskResult } | { fallthroughNote: string } | null;+- fallthroughNoteFor · function · L223-L228 — function fallthroughNoteFor(subject: string): string+- structural · function · L230-L279 — Processes a structural query to find and return relevant callers or callees from the graph based on the query.+- hasTerm · function · L298-L300 — function hasTerm(f: Map<string, number>, t: string): boolean+- matchedIdfShare · function · L309-L323 — function matchedIdfShare( q: Map<string, number>, fields: Array<Map<string, number>>, idf: Map<string, number>, dfltIdf: number, ): number+- lexical · function · L325-L487 — Ranks concepts and symbols based on lexical matching with the query, returning the most relevant results.+- bodyLen · function · L416-L420 — bodyLen = (m: Map<string, number>)+- AskOptions · interface · L489-L505 — Defines options for customizing the behavior of the ask function, such as context directory and result limits.+- parseSpan · function · L509-L513 — Parses a string pointer into its file path and line range components, facilitating source code navigation.+- sliceSpan · function · L517-L532 — Reads a specified range of lines from a source file, allowing for inlined code snippets in query results.+- inlineSource · function · L539-L556 — Attaches inlined source code to query hits, enhancing the context provided to the user.+- hitFiles · function · L560-L569 — function hitFiles(hits: AskHit[]): Set<string>+- baselineFor · function · L574-L589 — function baselineFor(hits: AskHit[], graph: GraphV1 | null): AskResult["saved"] | undefined+- ask · function · L592-L622 — Processes a query against a code graph, returning structured results based on the query type and context.+- SkeletonEntry · interface · L626-L633 — interface SkeletonEntry+- SkeletonResult · interface · L635-L639 — interface SkeletonResult+- skeleton · function · L644-L673 — function skeleton(dir: string, file: string, opts: { contextDir?: string } = {}): SkeletonResult+- startLine · function · L661-L661 — startLine = (span: string)+- formatSkeleton · function · L676-L685 — function formatSkeleton(r: SkeletonResult): string+- toTokens · function · L688-L690 — function toTokens(chars: number): number+- formatAsk · function · L693-L731 — Formats the results of a query into a markdown context pack for easy readability and presentation.+- savingsFooter · function · L736-L748 — function savingsFooter(r: AskResult, body: string): stringdiff --git a/graft/src/ask/graphrank.md b/graft/src/ask/graphrank.mdnew file mode 100644index 00000000..143b63d1--- /dev/null+++ b/graft/src/ask/graphrank.md@@ -0,0 +1,5 @@+# src/ask/graphrank.ts++- PageRankOptions · interface · L33-L39 — interface PageRankOptions+- personalizedPageRank · function · L52-L114 — function personalizedPageRank( graph: GraphV1, seeds: Map<string, number>, opts: PageRankOptions = {}, ): Map<string, number>+- link · function · L64-L66 — link = (a: string, b: string)diff --git a/graft/src/ask/index-file.md b/graft/src/ask/index-file.mdnew file mode 100644index 00000000..42f59842--- /dev/null+++ b/graft/src/ask/index-file.md@@ -0,0 +1,11 @@+# src/ask/index-file.ts++- tokenize · function · L38-L44 — function tokenize(text: string): string[]+- counts · function · L47-L51 — function counts(tokens: string[]): Map<string, number>+- AskIndexDoc · interface · L54-L59 — interface AskIndexDoc+- AskIndex · interface · L63-L69 — interface AskIndex+- askIndexPath · function · L76-L78 — function askIndexPath(outDir: string): string+- pairs · function · L80-L82 — function pairs(m: Map<string, number>): [string, number][]+- bagLen · function · L85-L89 — function bagLen(p: [string, number][]): number+- writeAskIndex · function · L98-L131 — function writeAskIndex(outDir: string, graph: GraphV1): string+- readAskIndex · function · L138-L159 — function readAskIndex(outDir: string): AskIndex | nulldiff --git a/graft/src/claude/format.md b/graft/src/claude/format.mdindex 030b3e99..c6b34c13 100644--- a/graft/src/claude/format.md+++ b/graft/src/claude/format.md@@ -6,10 +6,11 @@- nodeIdsInFile · function · L50-L56 — function nodeIdsInFile(w: GraphV1, filePath: string): Set<string>- incomingEdges · function · L58-L62 — function incomingEdges(w: GraphV1, filePath: string): EdgeV1[]- formatBlastRadius · function · L64-L75 — function formatBlastRadius(w: GraphV1, filePath: string, cap = 8): string | null-- AskJson · interface · L77-L82 — interface AskJson-- tokensOf · function · L84-L84 — function tokensOf(chars: number): number-- retrievalBody · function · L89-L99 — function retrievalBody(hits: AskJson['hits']): string-- retrievalTokensSaved · function · L102-L108 — function retrievalTokensSaved(ask: AskJson, cap = 5): number-- formatRetrieval · function · L110-L123 — function formatRetrieval(ask: AskJson, cap = 5): string | null-- formatOrientation · function · L125-L127 — function formatOrientation(indexMd: string, budgetBytes = 1500): string-- renderSubagent · function · L129-L133 — function renderSubagent(agentName: string, session: SessionState | null): string+- AskJson · interface · L77-L84 — interface AskJson+- tokensOf · function · L86-L86 — function tokensOf(chars: number): number+- retrievalBody · function · L91-L108 — function retrievalBody(hits: AskJson['hits']): string+- retrievalTokensSaved · function · L111-L117 — function retrievalTokensSaved(ask: AskJson, cap = 5): number+- formatRetrieval · function · L119-L132 — function formatRetrieval(ask: AskJson, cap = 5): string | null+- relevantRetrieval · function · L152-L163 — function relevantRetrieval(ask: AskJson, s: SessionState, cap = 3): string | null+- formatOrientation · function · L165-L167 — function formatOrientation(indexMd: string, budgetBytes = 1500): string+- renderSubagent · function · L169-L173 — function renderSubagent(agentName: string, session: SessionState | null): stringdiff --git a/graft/src/claude/hooks.md b/graft/src/claude/hooks.mdindex 3a3b783f..5c638eec 100644--- a/graft/src/claude/hooks.md+++ b/graft/src/claude/hooks.md@@ -1,11 +1,12 @@# src/claude/hooks.ts-- readStdin · function · L8-L12 — function readStdin(): any-- safeReadFd0 · function · L13-L13 — function safeReadFd0(): string-- projectDir · function · L15-L17 — function projectDir(input: any): string-- underGraft · function · L18-L21 — function underGraft(dir: string, file: string): boolean-- graftCli · function · L24-L27 — function graftCli(dir: string): { cmd: string; pre: string[] }-- graftJson · function · L28-L42 — function graftJson(dir: string, args: string[]): any | null-- checkStaleCount · function · L43-L47 — function checkStaleCount(dir: string): number-- emit · function · L48-L50 — function emit(eventName: string, additionalContext: string): void-- main · function · L52-L110 — async function main(event: string): Promise<void>+- readStdin · function · L14-L18 — function readStdin(): any+- safeReadFd0 · function · L19-L19 — function safeReadFd0(): string+- projectDir · function · L21-L23 — function projectDir(input: any): string+- underGraft · function · L24-L27 — function underGraft(dir: string, file: string): boolean+- graftJson · function · L28-L41 — function graftJson(dir: string, args: string[]): any | null+- checkStaleCount · function · L42-L46 — function checkStaleCount(dir: string): number+- emit · function · L47-L49 — function emit(eventName: string, additionalContext: string): void+- handlePostEdit · function · L51-L57 — async function handlePostEdit(input: any, dir: string): Promise<void>+- handleStop · function · L59-L73 — function handleStop(dir: string): void+- main · function · L75-L113 — async function main(event: string): Promise<void>diff --git a/graft/src/claude/init.md b/graft/src/claude/init.mdnew file mode 100644index 00000000..5a598067--- /dev/null+++ b/graft/src/claude/init.md@@ -0,0 +1,4 @@+# src/claude/init.ts++- InitResult · interface · L9-L15 — interface InitResult+- runInit · function · L17-L49 — function runInit(dir: string, opts: { build?: boolean; cliPath?: string } = {}): InitResultdiff --git a/graft/src/claude/paths.md b/graft/src/claude/paths.mdnew file mode 100644index 00000000..2cb74329--- /dev/null+++ b/graft/src/claude/paths.md@@ -0,0 +1,5 @@+# src/claude/paths.ts++- graftCliPath · function · L11-L13 — function graftCliPath(): string+- claudeDistDir · function · L18-L20 — function claudeDistDir(): string+- claudeScriptPath · function · L23-L25 — function claudeScriptPath(name: string): stringdiff --git a/graft/src/claude/settings-merge.md b/graft/src/claude/settings-merge.mdnew file mode 100644index 00000000..bc63fd01--- /dev/null+++ b/graft/src/claude/settings-merge.md@@ -0,0 +1,7 @@+# src/claude/settings-merge.ts++- Json · type · L1-L1 — type Json = Record<string, any>;+- hookCmd · function · L7-L9 — function hookCmd(arg: string): string+- graftBlocks · function · L10-L17 — function graftBlocks(): Record<string, Json>+- isGraftHookEntry · function · L18-L20 — function isGraftHookEntry(entry: Json): boolean+- mergeGraftSettings · function · L22-L55 — function mergeGraftSettings(existing: Json): { merged: Json; warnings: string[] }diff --git a/graft/src/claude/shim-template.md b/graft/src/claude/shim-template.mdnew file mode 100644index 00000000..54b2a047--- /dev/null+++ b/graft/src/claude/shim-template.md@@ -0,0 +1,5 @@+# src/claude/shim-template.ts++- shim · function · L16-L60 — function shim(entryFile: string, call: string, bakedDir: string): string+- statuslineShim · function · L62-L62 — function statuslineShim(bakedDir: string): string+- hooksShim · function · L63-L63 — function hooksShim(bakedDir: string): stringdiff --git a/graft/src/claude/skill-template.md b/graft/src/claude/skill-template.mdnew file mode 100644index 00000000..bb11a369--- /dev/null+++ b/graft/src/claude/skill-template.md@@ -0,0 +1,3 @@+# src/claude/skill-template.ts++- skillTemplate · function · L6-L70 — function skillTemplate(): stringdiff --git a/graft/src/claude/state.md b/graft/src/claude/state.mdindex 8ee9e904..18219c72 100644--- a/graft/src/claude/state.md+++ b/graft/src/claude/state.md@@ -1,19 +1,19 @@# src/claude/state.ts- Stats · interface · L4-L9 — interface Stats-- SessionState · interface · L10-L16 — interface SessionState-- emptyStats · function · L20-L23 — function emptyStats(): Stats-- emptySession · function · L24-L26 — function emptySession(): SessionState-- cacheDir · function · L28-L28 — function cacheDir(projectDir: string): string-- statsPath · function · L29-L29 — function statsPath(d: string): string-- sessionPath · function · L30-L30 — function sessionPath(d: string, id: string): string-- lockPath · function · L31-L31 — function lockPath(d: string): string-- readJson · function · L33-L35 — function readJson<T>(p: string): T | null-- writeJsonAtomic · function · L36-L41 — function writeJsonAtomic(p: string, value: unknown): void-- readStats · function · L43-L43 — function readStats(d: string): Stats | null-- writeStats · function · L44-L44 — function writeStats(d: string, s: Stats): void-- patchStats · function · L47-L51 — function patchStats(d: string, patch: Partial<Stats>): Stats-- readSession · function · L52-L54 — function readSession(d: string, id: string): SessionState-- writeSession · function · L55-L57 — function writeSession(d: string, id: string, s: SessionState): void-- acquireLock · function · L59-L75 — function acquireLock(d: string): boolean-- releaseLock · function · L76-L76 — function releaseLock(d: string): void+- SessionState · interface · L10-L20 — interface SessionState+- emptyStats · function · L24-L27 — function emptyStats(): Stats+- emptySession · function · L28-L30 — function emptySession(): SessionState+- cacheDir · function · L32-L32 — function cacheDir(projectDir: string): string+- statsPath · function · L33-L33 — function statsPath(d: string): string+- sessionPath · function · L34-L34 — function sessionPath(d: string, id: string): string+- lockPath · function · L35-L35 — function lockPath(d: string): string+- readJson · function · L37-L39 — function readJson<T>(p: string): T | null+- writeJsonAtomic · function · L40-L45 — function writeJsonAtomic(p: string, value: unknown): void+- readStats · function · L47-L47 — function readStats(d: string): Stats | null+- writeStats · function · L48-L48 — function writeStats(d: string, s: Stats): void+- patchStats · function · L51-L55 — function patchStats(d: string, patch: Partial<Stats>): Stats+- readSession · function · L56-L58 — function readSession(d: string, id: string): SessionState+- writeSession · function · L59-L61 — function writeSession(d: string, id: string, s: SessionState): void+- acquireLock · function · L63-L79 — function acquireLock(d: string): boolean+- releaseLock · function · L80-L80 — function releaseLock(d: string): voiddiff --git a/graft/src/cli-epilogue.md b/graft/src/cli-epilogue.mdnew file mode 100644index 00000000..6e9e7e91--- /dev/null+++ b/graft/src/cli-epilogue.md@@ -0,0 +1,7 @@+# src/cli-epilogue.ts++- indigo · function · L23-L23 — indigo = (s: string)+- muted · function · L24-L24 — muted = (s: string)+- Step · interface · L26-L31 — interface Step+- InitEpilogueOptions · interface · L33-L40 — interface InitEpilogueOptions+- formatInitEpilogue · function · L44-L85 — function formatInitEpilogue(opts: InitEpilogueOptions): stringdiff --git a/graft/src/cli-meta.md b/graft/src/cli-meta.mdnew file mode 100644index 00000000..fe56c3fb--- /dev/null+++ b/graft/src/cli-meta.md@@ -0,0 +1,13 @@+# src/cli-meta.ts++- resolvePackageJsonPath · function · L17-L24 — function resolvePackageJsonPath(moduleUrl: string): string+- readCurrentVersion · function · L27-L31 — function readCurrentVersion(moduleUrl: string): string+- isRunningViaNpx · function · L35-L37 — function isRunningViaNpx(moduleUrl: string): boolean+- NpmViewResult · interface · L39-L42 — interface NpmViewResult+- getNpmViewVersion · function · L46-L60 — function getNpmViewVersion(pkgName: string = PKG_NAME, timeoutMs = 2000): NpmViewResult+- formatVersionReport · function · L63-L73 — function formatVersionReport(current: string, latest: NpmViewResult): string+- globalRoot · function · L76-L87 — function globalRoot(): string | null+- readGlobalInstalledVersion · function · L92-L103 — function readGlobalInstalledVersion(pkgName: string = PKG_NAME): string | null+- UpgradeResult · interface · L105-L113 — interface UpgradeResult+- formatUpgradeReport · function · L116-L127 — function formatUpgradeReport(result: UpgradeResult): string+- runUpgrade · function · L132-L143 — function runUpgrade(moduleUrl: string): UpgradeResultdiff --git a/graft/src/cli.md b/graft/src/cli.mdindex 9363d110..dc1ff14d 100644--- a/graft/src/cli.md+++ b/graft/src/cli.md@@ -2,5 +2,6 @@This file implements the `graft` CLI tool for building and maintaining a context graph from code, ensuring it stays in sync with the repository.-- engineFrom · function · L27-L30 — Creates an instance of the Graft engine configured with the specified context directory.-- fmt · function · L49-L53 — Formats a record of counts into a human-readable string for console output.+- engineFrom · function · L41-L44 — Creates an instance of the Graft engine configured with the specified context directory.+- fmt · function · L80-L84 — Formats a record of counts into a human-readable string for console output.+- traverseAction · function · L254-L260 — function traverseAction(kind: import("./graph/traverse-cli.js").TraverseKind)diff --git a/graft/src/graph/build.md b/graft/src/graph/build.mdindex b3b3043c..15198999 100644--- a/graft/src/graph/build.md+++ b/graft/src/graph/build.md@@ -2,7 +2,8 @@This file defines the logic to build a graph representation from source code files in a repository.-- GraphBuildOptions · interface · L22-L35 — This interface specifies options for customizing the graph build process, including output directory and summarization settings.-- GraphBuildResult · interface · L37-L50 — This interface outlines the structure of the result returned from the graph build process, detailing the generated graph's metadata and statistics.-- listSourceFiles · function · L53-L55 — This function retrieves a list of source files from a given directory, excluding the output directory and unsupported languages.-- buildGraph · function · L57-L146 — This function orchestrates the process of reading source files, extracting nodes and edges, and writing the resulting graph to a file.+- GraphBuildOptions · interface · L23-L36 — This interface specifies options for customizing the graph build process, including output directory and summarization settings.+- GraphBuildResult · interface · L38-L51 — This interface outlines the structure of the result returned from the graph build process, detailing the generated graph's metadata and statistics.+- listSourceFiles · function · L54-L56 — This function retrieves a list of source files from a given directory, excluding the output directory and unsupported languages.+- readGoModules · function · L62-L76 — function readGoModules(root: string): GoModule[]+- buildGraph · function · L78-L183 — This function orchestrates the process of reading source files, extracting nodes and edges, and writing the resulting graph to a file.diff --git a/graft/src/graph/extract.md b/graft/src/graph/extract.mdindex 98ada92f..141c4ecf 100644--- a/graft/src/graph/extract.md+++ b/graft/src/graph/extract.md@@ -2,18 +2,24 @@This module extracts structured data from source files into a normalized format for further processing.-- Language · type · L16-L16 — Defines the supported programming languages for extraction.-- languageOf · function · L19-L25 — Determines the programming language of a given file path.-- RawEdge · interface · L31-L39 — Represents an unresolved edge in the extraction process, linking nodes in the graph.-- ExtractResult · interface · L41-L44 — Holds the result of the extraction process, containing nodes and raw edges.-- WalkCtx · interface · L76-L84 — Context for walking through the syntax tree during extraction, maintaining state and scope.-- DefDescriptor · interface · L87-L92 — Describes a definition in the syntax tree, including its name and type.-- extractFile · function · L94-L128 — Extracts nodes and edges from a source file based on its syntax tree.-- walk · function · L130-L182 — Recursively traverses the syntax tree to collect definitions and their relationships.-- describe · function · L185-L214 — Identifies and describes definitions in the syntax tree based on their node types.-- heritageEdges · function · L216-L243 — Generates edges representing class inheritance and implementation relationships.-- calleeName · function · L245-L261 — Extracts the name of a function or method being called in the syntax tree.-- isImport · function · L263-L265 — Determines if a node represents an import statement in the syntax tree.-- importSpecifier · function · L267-L278 — Extracts the module name from an import statement in the syntax tree.-- clean · function · L281-L288 — Cleans and normalizes a function signature by removing unnecessary whitespace and punctuation.-- tsExported · function · L291-L298 — Checks if a node is exported based on its ancestor nodes in the syntax tree.+- Language · type · L17-L17 — Defines the supported programming languages for extraction.+- languageOf · function · L20-L27 — Determines the programming language of a given file path.+- RawEdge · interface · L33-L41 — Represents an unresolved edge in the extraction process, linking nodes in the graph.+- ExtractResult · interface · L43-L46 — Holds the result of the extraction process, containing nodes and raw edges.+- searchBody · function · L63-L66 — function searchBody(text: string, max = MAX_BODY_CHARS): string+- fileResidual · function · L74-L85 — function fileResidual(source: string, symbols: NodeV1[]): string+- WalkCtx · interface · L132-L140 — Context for walking through the syntax tree during extraction, maintaining state and scope.+- DefDescriptor · interface · L143-L149 — Describes a definition in the syntax tree, including its name and type.+- parseSource · function · L157-L159 — function parseSource(source: string): Parser.SyntaxNode+- extractFile · function · L161-L198 — Extracts nodes and edges from a source file based on its syntax tree.+- walk · function · L200-L261 — Recursively traverses the syntax tree to collect definitions and their relationships.+- describe · function · L265-L296 — Identifies and describes definitions in the syntax tree based on their node types.+- describeGo · function · L301-L339 — function describeGo(node: Parser.SyntaxNode, _ctx: WalkCtx): DefDescriptor | null+- goReceiverType · function · L343-L349 — function goReceiverType(node: Parser.SyntaxNode): string | null+- goExported · function · L353-L357 — function goExported(name: string): boolean+- heritageEdges · function · L359-L386 — Generates edges representing class inheritance and implementation relationships.+- calleeName · function · L388-L409 — Extracts the name of a function or method being called in the syntax tree.+- isImport · function · L411-L416 — Determines if a node represents an import statement in the syntax tree.+- importSpecifier · function · L418-L434 — Extracts the module name from an import statement in the syntax tree.+- clean · function · L437-L444 — Cleans and normalizes a function signature by removing unnecessary whitespace and punctuation.+- tsExported · function · L447-L454 — Checks if a node is exported based on its ancestor nodes in the syntax tree.diff --git a/graft/src/graph/load.md b/graft/src/graph/load.mdnew file mode 100644index 00000000..bf4e4f85--- /dev/null+++ b/graft/src/graph/load.md@@ -0,0 +1,8 @@+# src/graph/load.ts++- CacheEntry · interface · L31-L35 — interface CacheEntry<T>+- __resetParseCounts · function · L45-L48 — function __resetParseCounts(): void+- statOf · function · L50-L57 — function statOf(path: string): { mtimeMs: number; size: number } | null+- loadCached · function · L59-L81 — function loadCached<T>( cache: Map<string, CacheEntry<T>>, path: string, parse: () => T | null, onParse: () => void, ): T | null+- loadGraphCached · function · L86-L91 — function loadGraphCached(outDir: string): GraphV1 | null+- loadAskIndexCached · function · L95-L100 — function loadAskIndexCached(outDir: string): AskIndex | nulldiff --git a/graft/src/graph/resolve.md b/graft/src/graph/resolve.mdindex 1a8dbe8d..df9b921a 100644--- a/graft/src/graph/resolve.md+++ b/graft/src/graph/resolve.md@@ -2,8 +2,11 @@This file resolves raw edge intents into concrete edges by matching names against a node index, ensuring accurate relationships between nodes.-- resolveEdges · function · L20-L58 — This function processes raw edges and establishes relationships between nodes based on their types and specified relations.-- add · function · L34-L39 — This function adds a new edge to the output if it hasn't been seen before, preventing duplicate edges in the result.-- push · function · L60-L64 — This function adds a value to an array in a map, creating the array if it doesn't exist, facilitating grouped storage of nodes.-- resolveName · function · L70-L82 — This function resolves a symbol name to its corresponding node ID, prioritizing local matches and handling ambiguities appropriately.-- resolveImport · function · L88-L100 — This function resolves a module specifier to a file node ID if it points within the repository, ensuring correct imports.+- GoModule · interface · L23-L26 — interface GoModule+- ResolveOptions · interface · L28-L33 — interface ResolveOptions+- resolveEdges · function · L35-L90 — This function processes raw edges and establishes relationships between nodes based on their types and specified relations.+- add · function · L62-L67 — This function adds a new edge to the output if it hasn't been seen before, preventing duplicate edges in the result.+- push · function · L92-L96 — This function adds a value to an array in a map, creating the array if it doesn't exist, facilitating grouped storage of nodes.+- resolveName · function · L102-L114 — This function resolves a symbol name to its corresponding node ID, prioritizing local matches and handling ambiguities appropriately.+- resolveImport · function · L120-L132 — This function resolves a module specifier to a file node ID if it points within the repository, ensuring correct imports.+- resolveGoImport · function · L144-L159 — function resolveGoImport(spec: string, modules: GoModule[], filesByDir: Map<string, string[]>): stringdiff --git a/graft/src/graph/traverse-cli.md b/graft/src/graph/traverse-cli.mdnew file mode 100644index 00000000..ba10b935--- /dev/null+++ b/graft/src/graph/traverse-cli.md@@ -0,0 +1,14 @@+# src/graph/traverse-cli.ts++- TraverseKind · type · L17-L17 — type TraverseKind = "callers" | "callees" | "impact";+- TraverseCliOptions · interface · L19-L26 — interface TraverseCliOptions+- edgesFor · function · L31-L35 — function edgesFor(kind: TraverseKind, graph: GraphV1, node: NodeV1, depth: number): EdgeHit[]+- headerOf · function · L41-L43 — function headerOf(n: NodeV1): string+- hitLine · function · L45-L50 — function hitLine(kind: TraverseKind, hit: EdgeHit): string+- looseNoteFor · function · L54-L58 — function looseNoteFor(kind: TraverseKind, name: string): string+- SymbolJson · interface · L60-L66 — interface SymbolJson+- MatchJson · interface · L68-L72 — interface MatchJson+- HitJson · interface · L74-L82 — interface HitJson+- symbolJson · function · L84-L86 — function symbolJson(n: NodeV1): SymbolJson+- hitJson · function · L88-L97 — function hitJson(hit: EdgeHit): HitJson+- runTraverseCommand · function · L105-L155 — function runTraverseCommand(kind: TraverseKind, query: string, dir: string, opts: TraverseCliOptions): voiddiff --git a/graft/src/graph/traverse.md b/graft/src/graph/traverse.mdnew file mode 100644index 00000000..278a0520--- /dev/null+++ b/graft/src/graph/traverse.md@@ -0,0 +1,13 @@+# src/graph/traverse.ts++- SymbolMatch · interface · L18-L20 — interface SymbolMatch+- ResolveSymbolOptions · interface · L22-L25 — interface ResolveSymbolOptions+- resolveSymbol · function · L59-L84 — function resolveSymbol(graph: GraphV1, query: string, opts: ResolveSymbolOptions = {}): NodeV1[]+- symbolMatches · function · L86-L95 — function symbolMatches(nodes: NodeV1[], lowerQuery: string): NodeV1[]+- EdgeHit · interface · L100-L105 — interface EdgeHit+- callersOf · function · L108-L116 — function callersOf(graph: GraphV1, symbol: NodeV1): EdgeHit[]+- calleesOf · function · L119-L127 — function calleesOf(graph: GraphV1, symbol: NodeV1): EdgeHit[]+- impactOf · function · L135-L137 — function impactOf(graph: GraphV1, symbol: NodeV1, maxDepth = 2): EdgeHit[]+- impactOfMany · function · L153-L184 — function impactOfMany(graph: GraphV1, seeds: NodeV1[], maxDepth = 2): EdgeHit[]+- symbolsInFile · function · L188-L190 — function symbolsInFile(graph: GraphV1, fileNode: NodeV1): NodeV1[]+- impactOfFile · function · L201-L203 — function impactOfFile(graph: GraphV1, fileNode: NodeV1, maxDepth = 2): EdgeHit[]diff --git a/graft/src/graph/types.md b/graft/src/graph/types.mdindex bced4b25..ce7db024 100644--- a/graft/src/graph/types.md+++ b/graft/src/graph/types.md@@ -2,11 +2,11 @@Defines the schema for a code graph, outlining nodes and edges for code structure representation.-- Kind · type · L15-L22 — Enumerates the types of symbols that can exist in the code graph, facilitating type identification.-- Confidence · type · L25-L25 — Specifies the confidence levels for the truth of edges in the graph, aiding in the assessment of relationships.-- SummaryState · type · L28-L28 — Indicates whether the meaning-layer has been computed for a node, managing the state of node summaries.-- Crux · interface · L32-L35 — Holds the LLM-chosen business-logic excerpt for a node, providing a source of truth for code interpretation.-- NodeV1 · interface · L37-L57 — Represents a node in the graph with its identity, location, and meaning, essential for graph construction.-- Relation · type · L59-L65 — Defines the types of relationships between nodes in the graph, clarifying how symbols interact.-- EdgeV1 · interface · L67-L72 — Describes the edges connecting nodes in the graph, detailing the source, target, and relationship type.-- GraphV1 · interface · L74-L83 — Encapsulates the entire graph structure, including metadata and collections of nodes and edges.+- Kind · type · L15-L23 — Enumerates the types of symbols that can exist in the code graph, facilitating type identification.+- Confidence · type · L26-L26 — Specifies the confidence levels for the truth of edges in the graph, aiding in the assessment of relationships.+- SummaryState · type · L29-L29 — Indicates whether the meaning-layer has been computed for a node, managing the state of node summaries.+- Crux · interface · L33-L36 — Holds the LLM-chosen business-logic excerpt for a node, providing a source of truth for code interpretation.+- NodeV1 · interface · L38-L63 — Represents a node in the graph with its identity, location, and meaning, essential for graph construction.+- Relation · type · L65-L71 — Defines the types of relationships between nodes in the graph, clarifying how symbols interact.+- EdgeV1 · interface · L73-L78 — Describes the edges connecting nodes in the graph, detailing the source, target, and relationship type.+- GraphV1 · interface · L80-L89 — Encapsulates the entire graph structure, including metadata and collections of nodes and edges.diff --git a/graft/src/graph/write.md b/graft/src/graph/write.mdindex f56afb9a..7d2a94b9 100644--- a/graft/src/graph/write.md+++ b/graft/src/graph/write.md@@ -5,4 +5,5 @@ This file contains functions for managing the serialization and deserialization- wiringPath · function · L20-L22 — Generates the absolute path for the wiring graph file in a specified output directory.- readGraph · function · L28-L34 — Reads and parses an existing wiring graph from a file, returning null if the file is absent or unparseable.- writeGraph · function · L36-L46 — Writes a sorted representation of the wiring graph to a specified output directory, ensuring the directory structure exists.-- edgeOrder · function · L48-L54 — Defines the sorting order for edges in the wiring graph based on source, relation, and target.+- stripBodyText · function · L57-L61 — function stripBodyText(node: NodeV1): NodeV1+- edgeOrder · function · L63-L69 — Defines the sorting order for edges in the wiring graph based on source, relation, and target.diff --git a/graft/src/hosts/codex-hooks.md b/graft/src/hosts/codex-hooks.mdnew file mode 100644index 00000000..ce092165--- /dev/null+++ b/graft/src/hosts/codex-hooks.md@@ -0,0 +1,7 @@+# src/hosts/codex-hooks.ts++- HookWrite · interface · L11-L15 — interface HookWrite+- dirExists · function · L17-L19 — function dirExists(p: string): boolean+- writeOwned · function · L21-L31 — function writeOwned(id: string, path: string, content: string, mode?: number): HookWrite+- isGraftEntry · function · L33-L35 — function isGraftEntry(entry: unknown): boolean+- installCodexHooks · function · L37-L74 — function installCodexHooks(home: string): HookWrite[]diff --git a/graft/src/hosts/init.md b/graft/src/hosts/init.mdnew file mode 100644index 00000000..b0b4cb04--- /dev/null+++ b/graft/src/hosts/init.md@@ -0,0 +1,6 @@+# src/hosts/init.ts++- HostsInitResult · interface · L14-L20 — interface HostsInitResult+- probeFor · function · L22-L27 — function probeFor(home: string, repo: string): DetectProbe+- writeOwned · function · L29-L35 — function writeOwned(path: string, content: string): string+- runHostsInit · function · L37-L72 — function runHostsInit( repo: string, opts: { agents?: string[]; all?: boolean; home?: string; mcp?: boolean; hooks?: boolean } = {}, ): HostsInitResultdiff --git a/graft/src/hosts/instructions.md b/graft/src/hosts/instructions.mdnew file mode 100644index 00000000..f63ea87f--- /dev/null+++ b/graft/src/hosts/instructions.md@@ -0,0 +1,6 @@+# src/hosts/instructions.ts++- instructionBody · function · L6-L39 — function instructionBody(): string+- cursorRule · function · L41-L48 — function cursorRule(): string+- kiroSteering · function · L50-L56 — function kiroSteering(): string+- windsurfRule · function · L58-L61 — function windsurfRule(): stringdiff --git a/graft/src/hosts/mcp-config.md b/graft/src/hosts/mcp-config.mdnew file mode 100644index 00000000..d9d4ba88--- /dev/null+++ b/graft/src/hosts/mcp-config.md@@ -0,0 +1,7 @@+# src/hosts/mcp-config.ts++- McpWrite · interface · L10-L14 — interface McpWrite+- dirExists · function · L19-L21 — function dirExists(p: string): boolean+- mergeJsonKey · function · L23-L43 — function mergeJsonKey(id: string, path: string, topKey: string, entry: object): McpWrite+- upsertCodexToml · function · L45-L54 — function upsertCodexToml(id: string, path: string): McpWrite+- registerMcpConfigs · function · L56-L87 — function registerMcpConfigs( repo: string, ids: string[], opts: { home?: string } = {}, ): McpWrite[]diff --git a/graft/src/hosts/registry.md b/graft/src/hosts/registry.mdnew file mode 100644index 00000000..d9faef88--- /dev/null+++ b/graft/src/hosts/registry.md@@ -0,0 +1,6 @@+# src/hosts/registry.ts++- DetectProbe · interface · L12-L16 — interface DetectProbe+- HostTarget · interface · L18-L26 — interface HostTarget+- hostIds · function · L82-L84 — function hostIds(): string[]+- detectHosts · function · L86-L88 — function detectHosts(probe: DetectProbe): HostTarget[]diff --git a/graft/src/hosts/sections.md b/graft/src/hosts/sections.mdnew file mode 100644index 00000000..a2780caa--- /dev/null+++ b/graft/src/hosts/sections.md@@ -0,0 +1,8 @@+# src/hosts/sections.ts++- UpsertAction · type · L11-L11 — type UpsertAction = 'created' | 'appended' | 'replaced' | 'unchanged';+- LineEnding · type · L13-L13 — type LineEnding = '\n' | '\r\n';+- fencedBlock · function · L15-L21 — function fencedBlock(body: string, eol: LineEnding = '\n'): string+- detectEol · function · L24-L26 — function detectEol(text: string): LineEnding+- markerLineIndex · function · L29-L34 — function markerLineIndex(lines: string[], marker: string, from = 0): number+- upsertSection · function · L36-L67 — function upsertSection(filePath: string, body: string): { action: UpsertAction }diff --git a/graft/src/mcp/server.md b/graft/src/mcp/server.mdnew file mode 100644index 00000000..b73a39fb--- /dev/null+++ b/graft/src/mcp/server.md@@ -0,0 +1,6 @@+# src/mcp/server.ts++- send · function · L8-L10 — function send(msg: object): void+- reply · function · L12-L14 — function reply(id: unknown, result: object): void+- replyError · function · L16-L18 — function replyError(id: unknown, code: number, message: string): void+- startMcpServer · function · L20-L66 — function startMcpServer(root: string): voiddiff --git a/graft/src/mcp/tools.md b/graft/src/mcp/tools.mdnew file mode 100644index 00000000..5c6e5de5--- /dev/null+++ b/graft/src/mcp/tools.md@@ -0,0 +1,6 @@+# src/mcp/tools.ts++- ToolDef · interface · L15-L19 — interface ToolDef+- unknownSymbolText · function · L26-L28 — function unknownSymbolText(query: string): string+- renderMatches · function · L108-L118 — function renderMatches(kind: TraverseKind, matches: NodeV1[], hitsFor: (n: NodeV1) => EdgeHit[]): string+- callTool · function · L120-L192 — function callTool( root: string, name: string, args: Record<string, unknown>, ): { text: string; isError: boolean }diff --git a/graft/task-management.md b/graft/task-management.mdindex 24ee078b..65ed8e3a 100644--- a/graft/task-management.md+++ b/graft/task-management.md@@ -15,13 +15,13 @@ generator:covers:- symbol: repoPathkind: function- at: 'bench/tasks.ts:L26-L29'+ at: 'bench/tasks.ts:L30-L33'- symbol: Taskkind: interface- at: 'bench/tasks.ts:L31-L37'+ at: 'bench/tasks.ts:L35-L45'- symbol: Corpuskind: interface- at: 'bench/tasks.ts:L39-L45'+ at: 'bench/tasks.ts:L47-L53'---<!-- context:generated:start -->## Summarydiff --git a/graft/test/ask-index.test.md b/graft/test/ask-index.test.mdnew file mode 100644index 00000000..900b09be--- /dev/null+++ b/graft/test/ask-index.test.md@@ -0,0 +1,5 @@+# test/ask-index.test.ts++- makeFixture · function · L26-L50 — function makeFixture(): string+- reinjectBodyText · function · L69-L85 — function reinjectBodyText(dir: string, outDir: string): void+- sortPairs · function · L106-L106 — sortPairs = (p: [string, number][])diff --git a/graft/test/ask.test.md b/graft/test/ask.test.mdindex 74762825..652d8d1c 100644--- a/graft/test/ask.test.md+++ b/graft/test/ask.test.md@@ -2,4 +2,6 @@This file contains tests for the `graft ask` functionality, ensuring that the source option correctly inlines code from disk when requested.-- makeFixture · function · L15-L24 — Creates a temporary directory with a sample TypeScript file for testing purposes.+- makeFixture · function · L16-L25 — Creates a temporary directory with a sample TypeScript file for testing purposes.+- stampCrux · function · L43-L49 — function stampCrux(dir: string, code: string): void+- qualifiedFixture · function · L189-L207 — function qualifiedFixture(): stringdiff --git a/graft/test/claude-format.test.md b/graft/test/claude-format.test.mdindex be26263e..22d20a7e 100644--- a/graft/test/claude-format.test.md+++ b/graft/test/claude-format.test.md@@ -1,3 +1,5 @@# test/claude-format.test.ts- strip · function · L6-L6 — strip = (s: string)+- gateAsk · function · L97-L104 — gateAsk = (over: Record<string, unknown> = {})+- freshSession · function · L105-L105 — freshSession = ()diff --git a/graft/test/claude-hooks.test.md b/graft/test/claude-hooks.test.mdindex 939c280a..fb521e37 100644--- a/graft/test/claude-hooks.test.md+++ b/graft/test/claude-hooks.test.md@@ -1,4 +1,4 @@# test/claude-hooks.test.ts- runWithStdin · function · L38-L41 — async function runWithStdin(text: string, fn: () => Promise<void>): Promise<void>-- fakeBuild · function · L49-L52 — fakeBuild = (dir: string)+- fakeBuild · function · L84-L87 — fakeBuild = (dir: string)diff --git a/graft/test/claude-init.test.md b/graft/test/claude-init.test.mdnew file mode 100644index 00000000..75b25936--- /dev/null+++ b/graft/test/claude-init.test.md@@ -0,0 +1,5 @@+# test/claude-init.test.ts++- fresh · function · L10-L10 — function fresh(): string+- runPostinstall · function · L12-L17 — function runPostinstall(env: Record<string, string>): string+- col · function · L116-L116 — col = (text: string, marker: string)diff --git a/graft/test/claude-paths.test.md b/graft/test/claude-paths.test.mdnew file mode 100644index 00000000..e696267e--- /dev/null+++ b/graft/test/claude-paths.test.md@@ -0,0 +1,3 @@+# test/claude-paths.test.ts++_No extracted symbols in this file._diff --git a/graft/test/claude-settings-merge.test.md b/graft/test/claude-settings-merge.test.mdnew file mode 100644index 00000000..84b2869b--- /dev/null+++ b/graft/test/claude-settings-merge.test.md@@ -0,0 +1,3 @@+# test/claude-settings-merge.test.ts++_No extracted symbols in this file._diff --git a/graft/test/claude-shim-template.test.md b/graft/test/claude-shim-template.test.mdnew file mode 100644index 00000000..2d4ecc1b--- /dev/null+++ b/graft/test/claude-shim-template.test.md@@ -0,0 +1,3 @@+# test/claude-shim-template.test.ts++_No extracted symbols in this file._diff --git a/graft/test/claude-skill-template.test.md b/graft/test/claude-skill-template.test.mdnew file mode 100644index 00000000..3faf4073--- /dev/null+++ b/graft/test/claude-skill-template.test.md@@ -0,0 +1,3 @@+# test/claude-skill-template.test.ts++_No extracted symbols in this file._diff --git a/graft/test/cli-meta.test.md b/graft/test/cli-meta.test.mdnew file mode 100644index 00000000..4574c46d--- /dev/null+++ b/graft/test/cli-meta.test.md@@ -0,0 +1,3 @@+# test/cli-meta.test.ts++_No extracted symbols in this file._diff --git a/graft/test/context.test.md b/graft/test/context.test.mdindex 2a06d83e..50d54362 100644--- a/graft/test/context.test.md+++ b/graft/test/context.test.md@@ -2,5 +2,6 @@This file contains end-to-end tests for the markdown-graph pipeline to ensure proper functionality and integrity of the context building and checking processes.-- makeFixture · function · L14-L25 — This function creates a temporary directory with mock service files for testing the context building process.-- buildOpts · function · L27-L29 — This function generates options for building the context, including a fake model and providers.+- runCli · function · L19-L30 — function runCli(args: string[]): { stdout: string; stderr: string; status: number }+- makeFixture · function · L32-L43 — This function creates a temporary directory with mock service files for testing the context building process.+- buildOpts · function · L45-L47 — This function generates options for building the context, including a fake model and providers.diff --git a/graft/test/graph-go.test.md b/graft/test/graph-go.test.mdnew file mode 100644index 00000000..e576c389--- /dev/null+++ b/graft/test/graph-go.test.md@@ -0,0 +1,4 @@+# test/graph-go.test.ts++- makeFixture · function · L53-L60 — function makeFixture(): string+- nodeById · function · L62-L64 — function nodeById(graph: GraphV1, id: string): NodeV1 | undefineddiff --git a/graft/test/graph-load.test.md b/graft/test/graph-load.test.mdnew file mode 100644index 00000000..db0617df--- /dev/null+++ b/graft/test/graph-load.test.md@@ -0,0 +1,5 @@+# test/graph-load.test.ts++- node · function · L23-L38 — function node(id: string): NodeV1+- fixtureDir · function · L40-L42 — function fixtureDir(): string+- bump · function · L46-L50 — function bump(path: string): voiddiff --git a/graft/test/graph-traverse-cli.test.md b/graft/test/graph-traverse-cli.test.mdnew file mode 100644index 00000000..944e74ed--- /dev/null+++ b/graft/test/graph-traverse-cli.test.md@@ -0,0 +1,4 @@+# test/graph-traverse-cli.test.ts++- builtRepo · function · L16-L27 — function builtRepo(): string+- runCli · function · L29-L40 — function runCli(args: string[]): { stdout: string; stderr: string; status: number }diff --git a/graft/test/graph-traverse.test.md b/graft/test/graph-traverse.test.mdnew file mode 100644index 00000000..65cd9ee1--- /dev/null+++ b/graft/test/graph-traverse.test.md@@ -0,0 +1,8 @@+# test/graph-traverse.test.ts++- nodeStub · function · L15-L30 — function nodeStub(partial: Partial<NodeV1> & { id: string }): NodeV1+- edge · function · L32-L34 — function edge(source: string, target: string, relation: Relation = "calls"): EdgeV1+- graphOf · function · L36-L42 — function graphOf(nodes: NodeV1[], edges: EdgeV1[]): GraphV1+- baseGraph · function · L57-L66 — function baseGraph(): GraphV1+- diamondGraph · function · L167-L179 — function diamondGraph(): GraphV1+- fileAndSymbolGraph · function · L221-L231 — function fileAndSymbolGraph()diff --git a/graft/test/graph-write.test.md b/graft/test/graph-write.test.mdnew file mode 100644index 00000000..c830669a--- /dev/null+++ b/graft/test/graph-write.test.md@@ -0,0 +1,3 @@+# test/graph-write.test.ts++- makeNode · function · L19-L35 — function makeNode(overrides: Partial<NodeV1> = {}): NodeV1diff --git a/graft/test/graphrank.test.md b/graft/test/graphrank.test.mdnew file mode 100644index 00000000..3d08a6ba--- /dev/null+++ b/graft/test/graphrank.test.md@@ -0,0 +1,7 @@+# test/graphrank.test.ts++- node · function · L23-L38 — function node(id: string): NodeV1+- edge · function · L39-L41 — function edge(source: string, target: string, relation: Relation = "calls"): EdgeV1+- graphOf · function · L42-L48 — function graphOf(nodes: string[], edges: EdgeV1[]): GraphV1+- makeCollisionFixture · function · L128-L138 — function makeCollisionFixture(): string+- rank · function · L140-L141 — rank = (dir: string, gr: boolean)diff --git a/graft/test/hosts-codex-hooks.test.md b/graft/test/hosts-codex-hooks.test.mdnew file mode 100644index 00000000..250e1429--- /dev/null+++ b/graft/test/hosts-codex-hooks.test.md@@ -0,0 +1,3 @@+# test/hosts-codex-hooks.test.ts++- fresh · function · L8-L8 — function fresh(): stringdiff --git a/graft/test/hosts-init.test.md b/graft/test/hosts-init.test.mdnew file mode 100644index 00000000..f4ee7d5f--- /dev/null+++ b/graft/test/hosts-init.test.md@@ -0,0 +1,3 @@+# test/hosts-init.test.ts++- fresh · function · L9-L9 — function fresh(): stringdiff --git a/graft/test/hosts-instructions.test.md b/graft/test/hosts-instructions.test.mdnew file mode 100644index 00000000..ce524364--- /dev/null+++ b/graft/test/hosts-instructions.test.md@@ -0,0 +1,3 @@+# test/hosts-instructions.test.ts++_No extracted symbols in this file._diff --git a/graft/test/hosts-mcp-config.test.md b/graft/test/hosts-mcp-config.test.mdnew file mode 100644index 00000000..03774c69--- /dev/null+++ b/graft/test/hosts-mcp-config.test.md@@ -0,0 +1,3 @@+# test/hosts-mcp-config.test.ts++- fresh · function · L8-L8 — function fresh(): stringdiff --git a/graft/test/hosts-registry.test.md b/graft/test/hosts-registry.test.mdnew file mode 100644index 00000000..facd6ad2--- /dev/null+++ b/graft/test/hosts-registry.test.md@@ -0,0 +1,4 @@+# test/hosts-registry.test.ts++- probeFor · function · L9-L14 — function probeFor(home: string, repo: string): DetectProbe+- fresh · function · L15-L15 — function fresh(): stringdiff --git a/graft/test/hosts-sections.test.md b/graft/test/hosts-sections.test.mdnew file mode 100644index 00000000..dd13905c--- /dev/null+++ b/graft/test/hosts-sections.test.md@@ -0,0 +1,3 @@+# test/hosts-sections.test.ts++- fresh · function · L8-L8 — function fresh(): stringdiff --git a/graft/test/mcp-server.test.md b/graft/test/mcp-server.test.mdnew file mode 100644index 00000000..07b2e1b6--- /dev/null+++ b/graft/test/mcp-server.test.md@@ -0,0 +1,3 @@+# test/mcp-server.test.ts++- rpc · function · L9-L28 — async function rpc(messages: object[], dir: string, expected: number): Promise<any[]>diff --git a/graft/test/mcp-tools.test.md b/graft/test/mcp-tools.test.mdnew file mode 100644index 00000000..c8a16a34--- /dev/null+++ b/graft/test/mcp-tools.test.md@@ -0,0 +1,5 @@+# test/mcp-tools.test.ts++- builtRepo · function · L9-L16 — function builtRepo(): string+- chainRepo · function · L22-L33 — function chainRepo(): string+- fileScopeRepo · function · L38-L48 — function fileScopeRepo(): stringdiff --git a/src/ai/synthesize.ts b/src/ai/synthesize.tsindex d6e4287a..96e73f7c 100644--- a/src/ai/synthesize.ts+++ b/src/ai/synthesize.ts@@ -44,6 +44,7 @@ Produce a CURATED set of nodes of mixed granularity:- "concept" nodes: cross-cutting ideas, design decisions, or invariants that span multiple files (e.g. "local-first provider fallback", "staleness checking", "content-hash provenance"). Include several — they are the most valuable nodes for an agent.Rules:+- Every summary must earn its tokens with NON-OBVIOUS information: invariants, ordering constraints, conventions, failure modes, "X must never happen after Y" facts, and the WHY behind a design. Never restate what a README says or what a directory listing already makes obvious ("src/api contains the API code" is worthless); an agent reading the node already sees the file paths. If all you can say about a group of files is what their names say, fold them into a larger node instead.- Strongly prefer FEWER, larger, meaningful nodes. For a repo of N files, aim for well under N nodes. Do NOT emit one node per file, and never a node per incidental identifier (a local interface, helper, or third-party symbol).- Merge duplicates and surface-form variants into one node.- For each node give: a canonical human-readable name; a type ("system" | "file" | "concept"); a 1-3 sentence summary of its ROLE in the system; "sources" = the exact file paths (from the input) it is grounded in (a system lists all its files; a concept lists the files that motivate it); and "links" to other nodes you define, each with a relation and a short description of what concretely happens in the code.diff --git a/src/ask/ask.ts b/src/ask/ask.tsindex 12cadfe8..ac6a82b0 100644--- a/src/ask/ask.ts+++ b/src/ask/ask.ts@@ -53,6 +53,12 @@ export interface AskResult {* size of the distinct files these hits point into, i.e. the baseline cost of* reading them instead of this pack. Computed from file sizes stored at build. */saved?: { files: number; baselineChars: number };+ /** Lexical mode only: share (0..1) of the query's distinct terms the TOP hit+ * matched. A relevance signal for callers that inject packs unprompted (the+ * Claude prompt hook): a low share means the query's words barely overlap the+ * best result, i.e. the pack is probably noise for this prompt. Absent in+ * structural mode — a resolved "who calls X" is itself the relevance signal. */+ coverage?: number;}/** First real prose line of a node body (skips headings, markers, blanks). */@@ -287,6 +293,35 @@ const GRAPH_WEIGHT = 0.5;* what surfaces the config/helper a task depends on but didn't name. */const RESCUE_FLOOR = 0.15;+/** Term presence with plural folding — "packs" finds "pack" and vice versa, so+ * a natural-language plural doesn't read as a miss against identifier tokens. */+function hasTerm(f: Map<string, number>, t: string): boolean {+ return f.has(t) || f.has(`${t}s`) || (t.endsWith("s") && f.has(t.slice(0, -1)));+}++/** Idf-weighted share (0..1) of the query a document matches: each query term+ * counts by its rarity, so this separates task prompts from chatter in a way a+ * raw term count can't. A conversational prompt's words are either off-corpus+ * (rare → heavy, unmatched → sinks the ratio) or generic code words ("list",+ * "write": common → near-weightless even when they collide with a symbol name);+ * a task prompt matches exactly its rare, discriminating identifiers. Terms the+ * corpus has never seen take `dfltIdf` (the df=0 weight). */+function matchedIdfShare(+ q: Map<string, number>,+ fields: Array<Map<string, number>>,+ idf: Map<string, number>,+ dfltIdf: number,+): number {+ let matched = 0;+ let total = 0;+ for (const t of q.keys()) {+ const w = idf.get(t) ?? dfltIdf;+ total += w;+ if (fields.some((f) => hasTerm(f, t))) matched += w;+ }+ return total > 0 ? matched / total : 0;+}+function lexical(query: string, corpus: Corpus, limit: number, graphRank: boolean): AskResult {// Binary query terms: a word repeated in a pasted issue body counts once, so a// ranty description can't linearly amplify an incidental word.@@ -346,6 +381,16 @@ function lexical(query: string, corpus: Corpus, limit: number, graphRank: boolea? computeIdfFromIndex(askIndex, conceptBags): computeIdf([...conceptBags, ...symbolDocs.map((d) => new Set([...d.name.keys(), ...d.path.keys(), ...d.body.keys()]))]);+ // Per-hit idf-weighted coverage, kept out of the public AskHit shape; only+ // the top hit's value survives, as `coverage` on the result. The df=0 weight+ // mirrors idfFromDf's formula at df=0 for whichever corpus size idf was+ // computed from.+ const nDocs = askIndex+ ? askIndex.docCount + conceptBags.length+ : conceptBags.length + symbolDocs.length;+ const dfltIdf = Math.log(1 + nDocs);+ const matchedOf = new Map<AskHit, number>();+// ── Concepts (prose nodes; not in the wiring graph) ──const conceptHits: AskHit[] = [];let maxConcept = 0;@@ -353,14 +398,16 @@ function lexical(query: string, corpus: Corpus, limit: number, graphRank: booleaconst total = score(q, name, idf) * 3 + score(q, body, idf);if (total > 0) {maxConcept = Math.max(maxConcept, total);- conceptHits.push({+ const hit: AskHit = {kind: "concept",title: c.name || c.slug,pointer: c.sources.join(", ") || c.slug,snippet: c.snippet,related: c.related,score: total,- });+ };+ matchedOf.set(hit, matchedIdfShare(q, [name, body], idf, dfltIdf));+ conceptHits.push(hit);}}@@ -401,6 +448,7 @@ function lexical(query: string, corpus: Corpus, limit: number, graphRank: booleaconst candidates = new Set<string>(lex.keys());for (const [id, p] of pr) if (p >= RESCUE_FLOOR) candidates.add(id);+ const docsById = new Map(symbolDocs.map((d) => [d.n.id, d]));const symbolHits: AskHit[] = [];for (const id of candidates) {const n = byId.get(id);@@ -408,7 +456,7 @@ function lexical(query: string, corpus: Corpus, limit: number, graphRank: booleaconst lexN = maxLex > 0 ? (lex.get(id) ?? 0) / maxLex : 0;const blended = lexN + GRAPH_WEIGHT * (pr.get(id) ?? 0);if (blended <= 0) continue;- symbolHits.push({+ const hit: AskHit = {kind: "symbol",title: `${n.name} · ${n.kind}`,// A file node points at the whole file (locator, no span) so `--source`@@ -416,7 +464,10 @@ function lexical(query: string, corpus: Corpus, limit: number, graphRank: booleapointer: n.kind === "file" ? n.path : `${n.path}:${n.span}`,snippet: n.summary?.split("\n")[0].trim() ?? n.signature ?? "",score: blended,- });+ };+ const d = docsById.get(id);+ matchedOf.set(hit, d ? matchedIdfShare(q, [d.name, d.path, d.body], idf, dfltIdf) : 0);+ symbolHits.push(hit);}// Concepts and symbols live on comparable 0..~1.5 scales so they merge fairly:@@ -430,6 +481,7 @@ function lexical(query: string, corpus: Corpus, limit: number, graphRank: booleaquery,mode: scored.length ? "lexical" : "empty",hits: scored.slice(0, limit),+ coverage: scored.length && q.size > 0 ? matchedOf.get(scored[0]) ?? 0 : undefined,note: scored.length ? undefined : "no matching nodes — try different words, or `graft build` if graft/ is empty",};}@@ -444,6 +496,12 @@ export interface AskOptions {* wiring edges), demoting same-word collisions and rescuing strongly-connected* neighbours the query didn't name. On by default; set false for pure lexical. */graphRank?: boolean;+ /** With `source`: inline each hit's WHOLE definition span (capped at+ * {@link MAX_SPAN_LINES}) instead of the default crux-first slice. The+ * default inlines the ≤8-line LLM-chosen crux when a node has one — the+ * decision point, ~10× cheaper than the full span — and the pack marks each+ * crux so the agent knows `--full` (or the file itself) has the rest. */+ full?: boolean;}/** Parse a `path:Lx-Ly` pointer into its parts, or null if it isn't one@@ -473,11 +531,25 @@ function sliceSpan(root: string, path: string, from: number, to: number): string}}-/** Attach inlined source to every hit whose pointer is a real `path:span`. */-function inlineSource(root: string, hits: AskHit[]): void {+/** Attach inlined source to every hit whose pointer is a real `path:span`.+ * Crux-first: when the graph carries an LLM-chosen crux for the hit's node and+ * `full` is off, inline that ≤8-line excerpt (with an escalation marker) rather+ * than the whole definition — most hits only need the decision point, and the+ * marker tells the agent exactly how to get the rest when this one doesn't. */+function inlineSource(root: string, hits: AskHit[], graph: GraphV1 | null, full: boolean): void {+ const cruxByPointer = new Map<string, string>();+ if (!full && graph) {+ for (const n of graph.nodes)+ if (n.crux?.code) cruxByPointer.set(`${n.path}:${n.span}`, n.crux.code);+ }for (const h of hits) {const s = parseSpan(h.pointer);if (!s) continue;+ const crux = cruxByPointer.get(h.pointer);+ if (crux) {+ h.code = `${crux}\n… (crux — full definition at ${h.pointer}; rerun with --full)`;+ continue;+ }const code = sliceSpan(root, s.path, s.from, s.to);if (code) h.code = code;}@@ -541,7 +613,7 @@ export function ask(dir: string, query: string, opts: AskOptions = {}): AskResulresult = lexical(query, corpus, limit, graphRank);}if (opts.source) {- inlineSource(root, result.hits);+ inlineSource(root, result.hits, corpus.graph, opts.full ?? false);// The pack is truly substitutive only in retriever mode (spans inlined), so// the "vs reading whole files" estimate is only honest here.result.saved = baselineFor(result.hits, corpus.graph);@@ -549,6 +621,69 @@ export function ask(dir: string, query: string, opts: AskOptions = {}): AskResulreturn result;}+// ── Skeleton view ────────────────────────────────────────────────────────────++export interface SkeletonEntry {+ name: string;+ kind: string;+ span: string;+ signature: string | null;+ /** First line of the Tier-2 summary, when the node has one. */+ summary?: string;+}++export interface SkeletonResult {+ file: string;+ entries: SkeletonEntry[];+ note?: string;+}++/** Signatures-only view of one file, straight from the wiring graph — the+ * cheapest way to understand a file's API surface (~10× less than reading it).+ * `file` is matched as an exact repo-relative path, then as a basename. */+export function skeleton(dir: string, file: string, opts: { contextDir?: string } = {}): SkeletonResult {+ const outDir = contextDirFor(resolve(dir), opts.contextDir);+ const graph = loadGraphCached(outDir);+ if (!graph) return { file, entries: [], note: "no wiring graph — run `graft build` first" };++ let defs = graph.nodes.filter((n) => n.kind !== "file" && n.path === file);+ if (!defs.length) {+ const matches = new Set(+ graph.nodes.filter((n) => n.path === file || n.path.endsWith(`/${file}`)).map((n) => n.path),+ );+ if (matches.size > 1)+ return { file, entries: [], note: `ambiguous — matches: ${[...matches].sort().join(", ")}` };+ const [path] = matches;+ if (path) defs = graph.nodes.filter((n) => n.kind !== "file" && n.path === path);+ }+ if (!defs.length) return { file, entries: [], note: "no definitions indexed for this file" };++ const startLine = (span: string) => Number(span.match(/^L(\d+)/)?.[1] ?? 0);+ defs.sort((a, b) => startLine(a.span) - startLine(b.span));+ return {+ file: defs[0].path,+ entries: defs.map((n) => ({+ name: n.name,+ kind: n.kind,+ span: n.span,+ signature: n.signature,+ summary: n.summary?.split("\n")[0].trim() || undefined,+ })),+ };+}++/** Render a {@link SkeletonResult} as compact markdown. */+export function formatSkeleton(r: SkeletonResult): string {+ const head = `graft skeleton — ${r.file}`;+ if (!r.entries.length) return `${head}\n\n${r.note ?? "no definitions."}\n`;+ const lines = r.entries.map((e) => {+ const sig = e.signature ? ` ${e.signature}` : "";+ const sum = e.summary ? ` — ${e.summary}` : "";+ return `- ${e.span} ${e.kind} ${e.name}${sig}${sum}`;+ });+ return `${head}\n${lines.join("\n")}\n`;+}+/** Rough tokens for a byte length (≈ 4 chars/token; good enough for an estimate). */function toTokens(chars: number): number {return Math.round(chars / 4);diff --git a/src/claude/format.ts b/src/claude/format.tsindex 0fe852b4..569e1a08 100644--- a/src/claude/format.ts+++ b/src/claude/format.ts@@ -79,6 +79,8 @@ export interface AskJson {hits: { kind: string; title: string; pointer: string; snippet: string; score: number; code?: string }[];/** Set by `ask --source`: whole size of the files these hits cover (baseline). */saved?: { files: number; baselineChars: number };+ /** Lexical mode: share (0..1) of the query's distinct terms the top hit matched. */+ coverage?: number;}function tokensOf(chars: number): number { return Math.round(chars / 4); }@@ -95,7 +97,14 @@ function retrievalBody(hits: AskJson['hits']): string {if (h.code) b += `\n\`\`\`\n${h.code}\n\`\`\``;return b;});- return `[graft] retrieved context — read these spans, do not re-open the files:\n${blocks.join('\n')}`;+ // Two pack shapes: with inlined code the pack is substitutive (read here, don't+ // re-open); without code it is pointers-only — locators the agent may follow,+ // pulling spans itself via `graft ask --source` (push→pull: per-prompt injected+ // tokens are always fresh full-price input, so the pack stays tiny).+ const header = hits.some((h) => h.code)+ ? '[graft] retrieved context — read these spans, do not re-open the files:'+ : '[graft] likely starting points — if relevant, open the pointer or run `graft ask "<task>" --source` for the code:';+ return `${header}\n${blocks.join('\n')}`;}/** Tokens saved (baseline − this pack), or 0 when no honest estimate applies. */@@ -122,6 +131,37 @@ export function formatRetrieval(ask: AskJson, cap = 5): string | null {);}+/** Coverage below this → skip the pack. A floor, not a classifier: lexical+ * coverage can't reliably rank mid-range prompts, so the floor sits where it+ * only rejects flagrantly off-repo prompts (chatter, greetings, unrelated+ * asks — these probe well under 0.1) and never a genuinely on-repo task. The+ * cost asymmetry justifies leaning low: a wrongly-skipped pack is recoverable+ * (the agent pulls with `graft ask`), a wrongly-injected one is pure noise. */+export const INJECT_MIN_COVERAGE = 0.15;++/** How many recently-injected pointers the novelty gate remembers per session. */+const INJECTED_POINTERS_CAP = 40;++/** The per-prompt injection gate. Returns the pack text to inject, or null to+ * stay silent. Mutates `s` to remember what was shown (caller persists it).+ * Gates, in order:+ * 1. relevance — lexical coverage below {@link INJECT_MIN_COVERAGE} → skip+ * (structural results carry no coverage; the intent match is the signal);+ * 2. novelty — hits whose pointer was already injected this session are+ * dropped, and if none remain the whole pack is skipped. */+export function relevantRetrieval(ask: AskJson, s: SessionState, cap = 3): string | null {+ if (!(ask.hits ?? []).length) return null;+ if (typeof ask.coverage === 'number' && ask.coverage < INJECT_MIN_COVERAGE) return null;+ const seen = new Set(s.injectedPointers ?? []);+ const fresh = ask.hits.filter((h) => !seen.has(h.pointer));+ if (!fresh.length) return null;+ const txt = formatRetrieval({ ...ask, hits: fresh }, cap);+ if (!txt) return null;+ s.injectedPointers = [...(s.injectedPointers ?? []), ...fresh.slice(0, cap).map((h) => h.pointer)]+ .slice(-INJECTED_POINTERS_CAP);+ return txt;+}+export function formatOrientation(indexMd: string, budgetBytes = 1500): string {return `[graft] repo map (graft/INDEX.md):\n${indexMd.slice(0, budgetBytes)}`;}diff --git a/src/claude/hooks.ts b/src/claude/hooks.tsindex 399b4539..289171e8 100644--- a/src/claude/hooks.ts+++ b/src/claude/hooks.ts@@ -2,10 +2,15 @@ import { readFileSync, existsSync } from 'node:fs';import { execFileSync, spawn } from 'node:child_process';import { join, basename } from 'node:path';import { readWiring } from './stats.js';-import { formatBlastRadius, formatRetrieval, retrievalTokensSaved, formatOrientation } from './format.js';+import { formatBlastRadius, relevantRetrieval, formatOrientation } from './format.js';import { patchStats, readStats, acquireLock, readSession, writeSession } from './state.js';import { graftCliPath, claudeScriptPath } from './paths.js';+/** Prompts shorter than this never trigger retrieval — they are almost always+ * conversational ("yes go ahead", "thanks") and the coverage gate can't judge+ * them reliably with so few terms. */+const MIN_PROMPT_CHARS = 12;+function readStdin(): any {const seam = process.env.GRAFT_TEST_STDIN;const raw = seam !== undefined ? seam : safeReadFd0();@@ -87,24 +92,22 @@ export async function main(event: string): Promise<void> {if (event === 'prompt') {const prompt = String(input?.prompt ?? '').trim();- if (prompt.length < 8) return;- // --source: inline the actual code spans so the injected pack is substitutive- // (the agent reads the span here instead of opening the file), and so `ask`- // returns the `saved` baseline used for the tokens-saved line.- const ask = graftJson(dir, ['ask', prompt, '.', '--json', '--source', '-n', '5']);+ if (prompt.length < MIN_PROMPT_CHARS) return;+ // Pointers-only, small, gated. No --source: per-prompt injected tokens are+ // fresh full-price input on every turn (unlike the cached SessionStart+ // orientation), so the pack carries locators, never inlined code — the agent+ // pulls spans itself via `graft ask --source` when a pointer looks right.+ // relevantRetrieval then drops the pack entirely when the prompt barely+ // overlaps the top hit or when every hit was already injected this session.+ const ask = graftJson(dir, ['ask', prompt, '.', '--json', '-n', '3']);if (!ask) return;- const txt = formatRetrieval(ask);- if (!txt) return;- emit('UserPromptSubmit', txt);const id = input.session_id || 'default';const s = readSession(dir, id);s.lastQuery = prompt;- // Accumulate tokens saved this session (baseline − pack), so the statusline- // can show a running total. Guarded: only when `ask` returned a baseline.- const saved = retrievalTokensSaved(ask);- if (saved > 0) s.savedTokens = (s.savedTokens ?? 0) + saved;const agent = input?.agent?.name;if (agent) s.perAgentQuery[agent] = prompt;+ const txt = relevantRetrieval(ask, s);+ if (txt) emit('UserPromptSubmit', txt);writeSession(dir, id, s);}}diff --git a/src/claude/skill-template.ts b/src/claude/skill-template.tsindex 0bf2a2d3..6eba3639 100644--- a/src/claude/skill-template.ts+++ b/src/claude/skill-template.ts@@ -22,9 +22,13 @@ same understanding costs thousands.- Ask: \`graft ask "<your task, in plain words>"\` — returns the relevant nodes,ranked, with file:line pointers. Add \`--source\` to inline the actual code at- each span, so the result IS the code you need — no separate file read.+ each span, so the result IS the code you need — no separate file read. By+ default \`--source\` inlines each hit's crux (the ≤8-line core of the+ definition, marked as such); add \`--full\` only when the crux isn't enough.Ask is cheap (<1s) — re-ask with different phrasings for each sub-question,and use structural forms too: \`graft ask "who calls <symbol>"\`.+- Skim a file's API without reading it: \`graft skeleton <file>\` — every+ definition's signature + span in ~200 tokens, ~10× cheaper than the file.- Or explore as usual: grep / ls / cat inside \`graft/\`. A grep for any concept,symbol, or filename hits the node that covers it; \`graft/INDEX.md\` lists themall.diff --git a/src/claude/state.ts b/src/claude/state.tsindex 363e14e4..a7b5f353 100644--- a/src/claude/state.ts+++ b/src/claude/state.ts@@ -13,6 +13,10 @@ export interface SessionState {graftReads: number; sourceReads: number;/** Cumulative tokens saved this session via `ask --source` retrieval (est.). */savedTokens: number;+ /** Pointers the prompt hook already injected this session (novelty gate:+ * a hit whose pointer was shown once is never re-injected). Optional so+ * session files written before this field still parse. */+ injectedPointers?: string[];}export const LOCK_STALE_MS = 300000;@@ -22,7 +26,7 @@ export function emptyStats(): Stats {staleCount: 0, dirty: false, syncing: false, syncedAt: null, lastFile: null };}function emptySession(): SessionState {- return { lastQuery: null, perAgentQuery: {}, graftReads: 0, sourceReads: 0, savedTokens: 0 };+ return { lastQuery: null, perAgentQuery: {}, graftReads: 0, sourceReads: 0, savedTokens: 0, injectedPointers: [] };}export function cacheDir(projectDir: string): string { return join(projectDir, 'graft', '.cache'); }diff --git a/src/cli.ts b/src/cli.tsindex 478cb809..f2be58c8 100644--- a/src/cli.ts+++ b/src/cli.ts@@ -141,10 +141,11 @@ program.argument("[dir]", "repository root", ".").option("-n, --limit <n>", "max results", "8").option("--source", "inline the source at each file:line hit (retriever mode — the pack IS the answer, no need to re-open files)")+ .option("--full", "with --source: inline whole definition spans instead of the default ≤8-line crux excerpts").option("--json", "output the result as JSON")- .action(async (query: string, dir: string, opts: { limit: string; source?: boolean; json?: boolean }) => {+ .action(async (query: string, dir: string, opts: { limit: string; source?: boolean; full?: boolean; json?: boolean }) => {const engine = engineFrom();- const r = engine.ask(dir, query, { limit: Number(opts.limit), source: opts.source });+ const r = engine.ask(dir, query, { limit: Number(opts.limit), source: opts.source, full: opts.full });if (opts.json) {console.log(JSON.stringify(r, null, 2));} else {@@ -153,6 +154,20 @@ program}});+program+ .command("skeleton")+ .description("Signatures-only view of one file from the wiring graph — the cheapest way to see a file's API surface")+ .argument("<file>", "repo-relative path (or unique basename) of the file")+ .argument("[dir]", "repository root", ".")+ .option("--json", "output the result as JSON")+ .action(async (file: string, dir: string, opts: { json?: boolean }) => {+ const { skeleton, formatSkeleton } = await import("./ask/ask.js");+ const globalOpts = program.opts<{ dir?: string }>();+ const r = skeleton(dir, file, { contextDir: globalOpts.dir });+ if (opts.json) console.log(JSON.stringify(r, null, 2));+ else process.stdout.write(formatSkeleton(r));+ });+program.command("check").description("Fail if graft/ is stale relative to the code (for CI)")diff --git a/src/engine.ts b/src/engine.tsindex 4adc7ce5..84b2f32b 100644--- a/src/engine.ts+++ b/src/engine.ts@@ -90,8 +90,8 @@ export class Graft {* channel. Deterministic and $0: routes structural queries to the wiring* edges and everything else to a lexical rank over concepts + symbols.*/- ask(dir: string, query: string, opts: { limit?: number; source?: boolean } = {}): AskResult {- return ask(dir, query, { contextDir: this.cfg.contextDir, limit: opts.limit, source: opts.source });+ ask(dir: string, query: string, opts: { limit?: number; source?: boolean; full?: boolean } = {}): AskResult {+ return ask(dir, query, { contextDir: this.cfg.contextDir, limit: opts.limit, source: opts.source, full: opts.full });}/** The OpenRouter API key, or a clear error telling the user how to set it. */diff --git a/src/hosts/instructions.ts b/src/hosts/instructions.tsindex f49da7c3..91819990 100644--- a/src/hosts/instructions.ts+++ b/src/hosts/instructions.ts@@ -15,11 +15,15 @@ source files. Re-ask freely (it's cheap) and reuse literal identifiers youalready have (symbol, error string, file name) as the query.- Run \`graft ask "<your question>" --source\` → ranked nodes with the relevant- code spans inlined. Match the tool to the task shape: for understanding or- editing, the top node IS the answer — cite its \`covers:\` file:line spans and- edit straight from \`--source\`. For exhaustive tasks ("every occurrence /- every caller of this pattern"), ranked results are top-N, not complete — use- graft to orient, then enumerate with grep over the source and verify each hit.+ code spans inlined (each hit's ≤8-line crux by default; \`--full\` for whole+ definitions when the crux isn't enough). Match the tool to the task shape:+ for understanding or editing, the top node IS the answer — cite its+ \`covers:\` file:line spans and edit straight from \`--source\`. For+ exhaustive tasks ("every occurrence / every caller of this pattern"), ranked+ results are top-N, not complete — use graft to orient, then enumerate with+ grep over the source and verify each hit.+- \`graft skeleton <file>\` → every definition's signature + span, ~10× cheaper+ than reading the file; use it to skim an API surface.- \`graft callers/callees <symbol>\` and \`graft impact <symbol> [-d N]\` giveprecomputed, exact edges — who calls/is called by a symbol, and the fullblast radius — for structural questions, skip ranking and use these directly.diff --git a/src/mcp/tools.ts b/src/mcp/tools.tsindex 4bfa0d1a..31833c92 100644--- a/src/mcp/tools.ts+++ b/src/mcp/tools.ts@@ -3,7 +3,7 @@* `callTool` never throws — hosts get soft errors as isError content.*/import { Graft } from '../engine.js';-import { formatAsk } from '../ask/ask.js';+import { formatAsk, skeleton, formatSkeleton } from '../ask/ask.js';import { formatCheckReport } from '../context/check.js';import { formatGraphCheckReport } from '../graph/check.js';import { loadGraphCached } from '../graph/load.js';@@ -37,10 +37,26 @@ export const TOOLS: ToolDef[] = [properties: {query: { type: 'string', description: 'what you want to understand, in plain words' },limit: { type: 'number', description: 'max results (default 5)' },+ full: {+ type: 'boolean',+ description: 'inline whole definition spans instead of the default ≤8-line crux excerpts',+ },},required: ['query'],},},+ {+ name: 'graft_skeleton',+ description:+ "Signatures-only view of one file — every definition's signature + line span, ~10× cheaper than reading the file ($0, no LLM).",+ inputSchema: {+ type: 'object',+ properties: {+ file: { type: 'string', description: 'repo-relative path (or unique basename) of the file' },+ },+ required: ['file'],+ },+ },{name: 'graft_check',description: 'Report whether the committed graph is in sync with the code (drift check).',@@ -113,9 +129,15 @@ export function callTool(if (!query) return { text: 'graft_ask requires a query', isError: true };const limit = typeof args.limit === 'number' ? args.limit : 5;const engine = new Graft();- const r = engine.ask(root, query, { limit, source: true });+ const r = engine.ask(root, query, { limit, source: true, full: args.full === true });return { text: formatAsk(r), isError: false };}+ case 'graft_skeleton': {+ const file = String(args.file ?? '');+ if (!file) return { text: 'graft_skeleton requires a file', isError: true };+ const r = skeleton(root, file);+ return { text: formatSkeleton(r), isError: !r.entries.length && !!r.note };+ }case 'graft_check': {const engine = new Graft();const r = engine.check(root);diff --git a/test/ask.test.ts b/test/ask.test.tsindex 9094a9ef..1f318bdc 100644--- a/test/ask.test.ts+++ b/test/ask.test.ts@@ -9,8 +9,9 @@ import assert from "node:assert/strict";import { mkdtempSync, writeFileSync, rmSync } from "node:fs";import { join } from "node:path";import { tmpdir } from "node:os";+import { readFileSync } from "node:fs";import { buildGraph } from "../src/graph/build.js";-import { ask, formatAsk } from "../src/ask/ask.js";+import { ask, formatAsk, skeleton, formatSkeleton } from "../src/ask/ask.js";function makeFixture(): string {const dir = mkdtempSync(join(tmpdir(), "graft-ask-"));@@ -37,6 +38,86 @@ test("ask without source returns pointers but no inlined code", async () => {}});+/** Stamp a crux onto the addNumbers node in the fixture's committed wiring.json+ * (fixtures build keyless, so Tier-2 fields ship null). */+function stampCrux(dir: string, code: string): void {+ const p = join(dir, "graft", ".graph", "wiring.json");+ const g = JSON.parse(readFileSync(p, "utf8"));+ const n = g.nodes.find((n: any) => n.name === "addNumbers");+ n.crux = { code, span: "L2-L2" };+ writeFileSync(p, JSON.stringify(g));+}++test("ask --source inlines the crux by default, the whole span with full", async () => {+ const dir = makeFixture();+ try {+ await buildGraph(dir);+ stampCrux(dir, "return a + b;");+ const cruxed = ask(dir, "addNumbers", { source: true });+ const hit = cruxed.hits.find((h) => h.title.startsWith("addNumbers"))!;+ assert.match(hit.code!, /^return a \+ b;/, "crux excerpt inlined, not the definition");+ assert.match(hit.code!, /rerun with --full/, "escalation marker present");+ const full = ask(dir, "addNumbers", { source: true, full: true });+ const fullHit = full.hits.find((h) => h.title.startsWith("addNumbers"))!;+ assert.match(fullHit.code!, /export function addNumbers/, "full definition span inlined");+ assert.doesNotMatch(fullHit.code!, /rerun with --full/);+ } finally {+ rmSync(dir, { recursive: true, force: true });+ }+});++test("ask --source falls back to the span when a node has no crux", async () => {+ const dir = makeFixture();+ try {+ await buildGraph(dir); // keyless: crux is null on every node+ const r = ask(dir, "addNumbers", { source: true });+ const hit = r.hits.find((h) => h.title.startsWith("addNumbers"))!;+ assert.match(hit.code!, /export function addNumbers/);+ } finally {+ rmSync(dir, { recursive: true, force: true });+ }+});++test("skeleton lists a file's definitions in span order, matches by basename", async () => {+ const dir = mkdtempSync(join(tmpdir(), "graft-skel-"));+ try {+ writeFileSync(+ join(dir, "api.ts"),+ `export function first(a: number): number {\n return a;\n}\n\n` ++ `export function second(b: string): string {\n return b;\n}\n`,+ );+ await buildGraph(dir);+ const r = skeleton(dir, "api.ts");+ assert.deepEqual(r.entries.map((e) => e.name), ["first", "second"], "span order");+ assert.match(r.entries[0].signature ?? "", /first/);+ const byBase = skeleton(dir, "api.ts");+ assert.equal(byBase.file, "api.ts");+ const txt = formatSkeleton(r);+ assert.match(txt, /graft skeleton — api\.ts/);+ assert.match(txt, /L\d+-L\d+ {2}function first/);+ assert.match(skeleton(dir, "nope.ts").note ?? "", /no definitions/);+ } finally {+ rmSync(dir, { recursive: true, force: true });+ }+});++test("ask reports coverage: 1.0 when every query term hits, low on mostly-off-corpus prompts", async () => {+ const dir = makeFixture();+ try {+ await buildGraph(dir);+ const exact = ask(dir, "addNumbers");+ assert.equal(exact.coverage, 1, "single term, fully matched");+ // Conversational prompt: only "numbers" overlaps the corpus (a common term+ // there, so low idf weight); the six off-corpus words each carry the heavy+ // df=0 weight unmatched, sinking the share under the injection floor.+ const chatty = ask(dir, "thanks looks good please continue numbers tomorrow morning");+ assert.ok(chatty.hits.length > 0, "still returns lexical hits");+ assert.ok((chatty.coverage ?? 1) < 0.15, `coverage should be under the floor, got ${chatty.coverage}`);+ } finally {+ rmSync(dir, { recursive: true, force: true });+ }+});+test("ask finds a symbol by a term that appears only in its body (body-indexing)", async () => {const dir = mkdtempSync(join(tmpdir(), "graft-ask-body-"));try {diff --git a/test/claude-format.test.ts b/test/claude-format.test.tsindex 3366d1d1..99d662d6 100644--- a/test/claude-format.test.ts+++ b/test/claude-format.test.ts@@ -1,6 +1,6 @@import { test } from 'node:test';import assert from 'node:assert/strict';-import { renderStatusline, enrichedSegment, incomingEdges, formatBlastRadius, formatRetrieval, formatOrientation, renderSubagent } from '../src/claude/format.js';+import { renderStatusline, enrichedSegment, incomingEdges, formatBlastRadius, formatRetrieval, formatOrientation, renderSubagent, relevantRetrieval, INJECT_MIN_COVERAGE } from '../src/claude/format.js';import { emptyStats } from '../src/claude/state.js';const strip = (s: string) => s.replace(/\x1b\[[0-9;]*m/g, '');@@ -68,12 +68,19 @@ test('formatRetrieval renders top hits, trims snippet, first pointer only', () ={ kind: 'concept', title: 'PKCE', pointer: 'src/pkce.ts, src/client.ts', snippet: 'Validates the challenge.', score: 1 },] } as any;const txt = strip(formatRetrieval(ask)!);- assert.match(txt, /retrieved context/);+ assert.match(txt, /likely starting points/); // pointers-only header (no inlined code)assert.match(txt, /PKCE — src\/pkce\.ts/);assert.match(txt, /Validates the challenge\./); // snippet trimmed, own lineassert.doesNotMatch(txt, /client\.ts/); // only the first pointer segment});+test('formatRetrieval keeps the substitutive header when code is inlined', () => {+ const ask = { query: 'pkce', mode: 'lexical', hits: [+ { kind: 'symbol', title: 'verify', pointer: 'src/pkce.ts:L1-L4', snippet: 's', score: 1, code: 'a\nb' },+ ] } as any;+ assert.match(strip(formatRetrieval(ask)!), /retrieved context — read these spans/);+});+test('formatRetrieval appends a tokens-saved line when ask reports a baseline', () => {const ask = { query: 'pkce', mode: 'lexical', saved: { files: 1, baselineChars: 8000 }, hits: [{ kind: 'symbol', title: 'verify', pointer: 'src/pkce.ts:L1-L4', snippet: 's', score: 1, code: 'a\nb' },@@ -86,6 +93,48 @@ test('formatRetrieval returns null for no hits', () => {assert.equal(formatRetrieval({ query: 'x', mode: 'empty', hits: [] } as any), null);});+// ── relevantRetrieval: the per-prompt injection gate ──+const gateAsk = (over: Record<string, unknown> = {}) => ({+ query: 'pkce', mode: 'lexical', coverage: 1,+ hits: [+ { kind: 'symbol', title: 'verify', pointer: 'src/pkce.ts:L1-L4', snippet: 's', score: 1 },+ { kind: 'symbol', title: 'gen', pointer: 'src/pkce.ts:L6-L9', snippet: 's', score: 0.8 },+ ],+ ...over,+}) as any;+const freshSession = () => ({ lastQuery: null, perAgentQuery: {}, graftReads: 0, sourceReads: 0, savedTokens: 0, injectedPointers: [] as string[] });++test('relevantRetrieval injects on good coverage and records pointers', () => {+ const s = freshSession();+ const txt = relevantRetrieval(gateAsk(), s);+ assert.ok(txt && /verify/.test(strip(txt)));+ assert.deepEqual(s.injectedPointers, ['src/pkce.ts:L1-L4', 'src/pkce.ts:L6-L9']);+});++test('relevantRetrieval skips when coverage is below the floor', () => {+ const s = freshSession();+ assert.equal(relevantRetrieval(gateAsk({ coverage: INJECT_MIN_COVERAGE - 0.01 }), s), null);+ assert.deepEqual(s.injectedPointers, [], 'nothing recorded on skip');+});++test('relevantRetrieval treats missing coverage (structural mode) as relevant', () => {+ const txt = relevantRetrieval(gateAsk({ coverage: undefined, mode: 'structural' }), freshSession());+ assert.ok(txt);+});++test('relevantRetrieval drops already-injected pointers, skips when none are fresh', () => {+ const s = freshSession();+ assert.ok(relevantRetrieval(gateAsk(), s), 'first prompt injects');+ assert.equal(relevantRetrieval(gateAsk(), s), null, 'same hits again → silent');+ const oneNew = gateAsk({ hits: [+ { kind: 'symbol', title: 'verify', pointer: 'src/pkce.ts:L1-L4', snippet: 's', score: 1 },+ { kind: 'symbol', title: 'exchange', pointer: 'src/client.ts:L2-L8', snippet: 's', score: 0.9 },+ ] });+ const txt = strip(relevantRetrieval(oneNew, s)!);+ assert.match(txt, /exchange/, 'fresh hit injected');+ assert.doesNotMatch(txt, /verify/, 'stale hit dropped from the pack');+});+test('formatOrientation labels and truncates to budget', () => {const md = 'X'.repeat(3000);const out = strip(formatOrientation(md, 1500));diff --git a/test/claude-state.test.ts b/test/claude-state.test.tsindex 23e7607f..76fe15d4 100644--- a/test/claude-state.test.ts+++ b/test/claude-state.test.ts@@ -24,7 +24,7 @@ test('stats round-trip and patch merge', () => {test('session defaults and round-trip', () => {const d = fresh();const s = readSession(d, 'abc');- assert.deepEqual(s, { lastQuery: null, perAgentQuery: {}, graftReads: 0, sourceReads: 0, savedTokens: 0 });+ assert.deepEqual(s, { lastQuery: null, perAgentQuery: {}, graftReads: 0, sourceReads: 0, savedTokens: 0, injectedPointers: [] });s.lastQuery = 'pkce'; s.graftReads = 2;writeSession(d, 'abc', s);assert.equal(readSession(d, 'abc').lastQuery, 'pkce');diff --git a/test/mcp-server.test.ts b/test/mcp-server.test.tsindex 330dfe03..0b545c27 100644--- a/test/mcp-server.test.ts+++ b/test/mcp-server.test.ts@@ -47,6 +47,7 @@ test('initialize → tools/list → tools/call round-trip', async () => {const list = rs.find((r) => r.id === 2);assert.deepEqual(list.result.tools.map((t: any) => t.name), ['graft_ask',+ 'graft_skeleton','graft_check','graft_blast_radius','graft_callers',diff --git a/test/mcp-tools.test.ts b/test/mcp-tools.test.tsindex de19e43e..3b30a795 100644--- a/test/mcp-tools.test.ts+++ b/test/mcp-tools.test.ts@@ -47,9 +47,10 @@ function fileScopeRepo(): string {return d;}-test('TOOLS lists all five tools with schemas', () => {+test('TOOLS lists all six tools with schemas', () => {assert.deepEqual(TOOLS.map((t) => t.name), ['graft_ask',+ 'graft_skeleton','graft_check','graft_blast_radius','graft_callers',@@ -174,3 +175,13 @@ test('graft_blast_radius: unknown symbol is a soft isError with the check-spelliassert.match(r.text, /no symbol "noSuchSymbolAnywhere" in the graph/);assert.match(r.text, /check spelling/);});++test('graft_skeleton returns signatures for a file, errors on unknown file', () => {+ const d = builtRepo();+ const r = callTool(d, 'graft_skeleton', { file: 'src/math.ts' });+ assert.equal(r.isError, false);+ assert.match(r.text, /graft skeleton — src\/math\.ts/);+ assert.match(r.text, /function add {2}function add\(a: number, b: number\): number/);+ const miss = callTool(d, 'graft_skeleton', { file: 'src/nope.ts' });+ assert.equal(miss.isError, true);+});