{"at":"2026-11-23T01:29:58.140Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T01:29:58.559Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T01:29:58.659Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T01:29:59.061Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"prompts":{},"resources":{},"tools":{}},"instructions":"coldstart answers \"which files are relevant to this task?\" from a static index (`find`, `gs`) and keeps a durable NOTEBOOK of notes past agents wrote about this repo (`kb_search`, `kb_lookup`, `kb_write`, `kb_status`, `kb_repair`, `kb_repair_aliases`). Try `kb_search` before `find` when the task may have been worked on here before.\n\nSETUP: the hooks that capture notes automatically at the end of a task, and surface matching notes when a prompt arrives, are NOT installed by this MCP server. If the user asks why notes are never captured or recalled, tell them to run `coldstart init` once in the repo root (install: `npm i -g @cstart/coldstart`); it wires those hooks for Claude Code, Cursor, or Codex. Every tool here works without it — only the automatic capture and recall are missing.","protocolVersion":"2025-11-25","serverInfo":{"name":"coldstart","version":"2.2.17"}}}}
{"at":"2026-11-23T01:29:59.061Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T01:29:59.061Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T01:29:59.064Z","dir":"received","era":"initialize","message":{"id":0,"jsonrpc":"2.0","method":"roots/list"}}
{"at":"2026-11-23T01:29:59.064Z","dir":"sent","era":"initialize","message":{"error":{"code":-32601,"message":"Method not found"},"id":0,"jsonrpc":"2.0"}}
{"at":"2026-11-23T01:29:59.064Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"Locate the files relevant to a task. Pass `query` = EVERY salient identifier from the task (symbol names, domain nouns, the rare token you half-remember) — not one distilled keyword. Recall is bounded by the terms you give: a one-token query cannot out-rank lookalikes, so over-supply rather than under-supply. Reach for find BEFORE Read/Grep/Glob.\n\nHOW IT WORKS: find greps every term across the repo body AND matches declared names (filenames, path segments, exported symbols), then ranks files by DISTINCT-TERM COVERAGE — the file that covers MORE of your query rises above its lookalikes. This catches body-level matches (nested defs, dynamic refs, string literals) that a declared-name index misses.\n\nOUTPUT: a ranked page. Top files get an inline preview — their indexed symbols (with line ranges) plus the body lines where your rare terms CLUSTER (def/class/assignment lines first), so you often answer WITHOUT a follow-up Read. Lower-ranked files list as bare paths. Prose/doc and stylesheet matches are partitioned into secondary lists so they do not crowd out source. Related files (sharing a rare identifier with a top hit, no import edge between them) are surfaced as first-class neighbors.\n\nNAMING: case- and separator-insensitive (`LoadStaging` ≡ `load_staging`). It does NOT expand synonyms or plurals for you — that is your job: if the concept could be named two ways, pass both tokens.\n\nAFTER THE RESULT:\n1. A path + its inline symbols/preview answer the question → done, no Read needed.\n2. Path looks right but you need shape/usage → `gs` on it (symbols + imports + per-symbol callers + importers in one shot).\n3. \"no indexed file contains any of [...]\" → those identifiers do not exist in the repo; reformulate or grep for a phrase/regex find cannot index. Do not grep spelling variants of a token find already reported absent.","inputSchema":{"properties":{"query":{"description":"Space-separated identifiers for the thing you are looking for — pass every salient token from the task, not one keyword. camelCase/snake_case both accepted. More discriminating tokens = sharper ranking.","type":"string"}},"required":["query"],"type":"object"},"name":"find"},{"description":"Drill into a known file. Returns these sections as compact text:\n- Symbols — top-level + per-class methods (name, kind, line range, extends/implements). With cross-file callers attached per exported symbol (inline if 1 caller; newline-per-caller block if ≥2). For huge files (>20 symbols, no `match`), symbols are reordered by caller count (most-used first) and truncated to top 15.\n- Imports — 1-hop internal outbound dependencies (library imports stripped).\n- Importers — 1-hop reverse: files in this repo that import this one. With `match`, additionally lists EVERY indexed file (importer or not, any language) whose CONTENT references the matched term even when its filename does not (a registry, admin, or config file using the symbol — or a frontend file referencing a backend name). That subsection IS the complete \"who uses <symbol>\" answer: it is exhaustive over indexed content, so a subsystem absent from it does NOT use the symbol — do not grep to enumerate or re-verify use-sites, and do not keep hunting in subsystems the section rules out.\n- Related — files sharing rare identifier/string-literal tokens with this file (with `match`: with the matched symbols' code region), shown only when NO import edge connects them. These are name-reference relations the import graph cannot see — Django migrations↔models, config-by-name registration, cross-language (JS↔Python) pairs. Treat them as first-class neighbors: the shared token shown is the reason they are related.\nUse this AFTER find surfaces a candidate file. This is the right tool for \"who uses this file\" / \"who calls this symbol\" — no separate call needed.\n\n`view` controls which sections you get (default `full` = all four). `symbols`, `imports`, `importers`, `callers` each return one section in isolation when you want a byte-light answer.\n\nFor god-files (large classes, large routers, large config modules), pass `match` to filter symbols/imports/importers/callers to one area — e.g. `match: \"auth\"` or `match: \"/^handle/\"`. Substring is case-insensitive; wrap in slashes for regex.\n\nPrefer this over Read when you need shape, neighbors, or usage. Reach for Read only for implementation details inside a method body. If you have called gs on 5+ files for one question, you are enumerating — go back to find with a sharper `path` glob or a different concept token instead.","inputSchema":{"properties":{"file_path":{"description":"Relative path to the file (e.g. \"src/auth/service.ts\"). Suffix matches are accepted.","type":"string"},"match":{"description":"Filter all sections by name. Substring (case-insensitive) by default; use `|` to OR substrings (`match: \"resource|tile\"`); wrap in slashes for regex (`match: \"/^handle/\"`). Use this on large/god-files to avoid a wall of output — e.g. `match: \"tile\"` on a big models.py reduces output to just tile-related symbols, their callers, and matching imports/importers.","type":"string"},"symbol":{"description":"Deliver the BODY of the named symbol(s) inline, sliced from their indexed line range — so you read a method WITHOUT a Read at a guessed offset. Comma/pipe-separate names (`serialize,restore_state`). A bare name matches the method (`serialize` → `Graph.serialize`). Each body is followed by `callers:`/`calls:` POINTERS (file + line range) so the next hop is one more `gs --symbol` call, not a windowed Read. Use this the moment a file’s symbol list shows the method you need — it replaces the read-at-offset hunt on god-files. If the name is NOT a declared symbol (a runtime/template-injected value, a string key, a config token), it falls back to an in-tool GREP: returns the body lines where the token appears, with context — so you never shell out to grep. Overrides `view`/`match`.","type":"string"},"view":{"description":"Which sections to return. Default \"full\" = symbols (with inline callers) + imports + importers. Use one of the narrower views to halve or quarter the output when you know what you need: \"symbols\" (shape only, no callers), \"imports\" (outbound only), \"importers\" (inbound only), \"callers\" (per-symbol cross-file callers in expanded form, no symbol shape).","enum":["full","symbols","imports","importers","callers"],"type":"string"}},"required":["file_path"],"type":"object"},"name":"gs"},{"description":"Search the repo's NOTEBOOK — durable notes past agents wrote after finishing tasks here (file purposes, cross-file flows, traps/lessons, established absences). Try this BEFORE find when the task might have been seen before: a hit can answer outright or point straight at the right files, skipping a search. Pass plain task words (symptoms work: \"logout loop after refresh\"), symbol names, or file names.\n\nResults are inlined in full with a freshness stamp computed against the CURRENT code: [fresh] = the cited file is byte-identical to when the note was verified; [evidence changed: <path>] = that file drifted since — re-verify before relying on it (and correct the note if it proved wrong: `coldstart kb write`). Absence notes (\"there is no X\") are re-checked live. No hits or an empty notebook → fall through to find, no tax.","inputSchema":{"properties":{"query":{"description":"Plain task words, symptoms, symbol names, or file names. Same over-supply rule as find: pass every salient token.","type":"string"}},"required":["query"],"type":"object"},"name":"kb_search"},{"description":"Read everything the NOTEBOOK knows at ONE exact address — the file you are about to edit. Address-keyed, not concept-keyed: unlike kb_search (fuzzy, ranked), this filters notes by exact anchor path, so it is exhaustive at that path. Returns the file note's facets, every cross-file flow that passes THROUGH this file, and lessons/absences anchored here — each with a live freshness stamp against the current code.\n\nReach for this the moment you have DECIDED on a file and are about to modify it: it surfaces the flow you might break, the absence you are about to violate, the rationale for the code's shape. A clean result (\"nothing known here\") is itself a positive signal — proceed. Anything marked [evidence changed: <path>] drifted since it was verified; re-verify before relying on it, and correct the note with kb_write if it proved wrong. Pass an optional `symbol` to narrow to one top-level symbol at that path.","inputSchema":{"properties":{"path":{"description":"Exact repo-relative path of the file (e.g. \"src/auth/service.ts\").","type":"string"},"symbol":{"description":"Optional top-level symbol name to narrow the lookup to notes anchored at that symbol.","type":"string"}},"required":["path"],"type":"object"},"name":"kb_lookup"},{"description":"Save or correct NOTEBOOK notes after finishing real work here — you have the files in context, so no future agent is better placed to record what you learned. Write a file note (what a file is for), a flow note (how a task spans files), or an absence lesson (a confirmed \"there is no X\"). Pass `specs` (an ARRAY of specs) to write ALL your notes in ONE call — malformed notes are reported together instead of one hiding the rest, and the result ends with a coverage line naming any worked files still without a note; pass `spec` (a single object) for a one-off. Also the tool to FIX or RETRACT a note you used that proved wrong: `op: \"put\"` replaces; `op: \"retract\"` with `target: {kind: \"note\"}` removes the whole note (or `target: {kind: \"anchor\"|\"alias\"|\"facet\"|\"invariant\"|\"behavior\"|\"feature\", key: \"<value>\"}` removes one part).\n\nTWO-PHASE reuse gate: a flow/lesson `spec` sent WITHOUT an `id` first searches the notebook for the same concept. If plausible matches exist, kb_write returns `{status:\"candidates\", candidates:[...]}` INSTEAD of writing — re-call with `into: \"<id>\"` to merge into an existing note, or `is_new: true` to declare a genuinely new one. This makes note identity reliable (matching, not guessing an exact title). File notes skip the gate (id derives from the path).\n\nThe `spec` shape: `type` (\"file\"|\"flow\"|\"lesson\", or sugar \"file-hub\"/\"file-single\"), `title`, `summary`, `anchors` ([{path, symbols?}] — the addresses the note is about, which drive freshness), plus type-specific fields (file: facets/character; flow: steps/verified; lesson: kind:\"absence\"/scope/body). Call with NO arguments to get the full spec guide.\n\nREQUIRED for the note to be findable at all — file-single: identityAliases + anchors[].symbols; file-hub: identityAliases + facets[].symbol; flow: identityAliases + steps + verified; lesson: scope.terms. A note missing these is written but unreachable: identityAliases are the only STABLE search surface besides the exact title (incidentAliases are optional — symptom words for a write that describes one, replaced by the next such write, never required), and anchor symbols are the only channel that answers a query typed as an identifier.\n\nThis tool WRITES to the repo notebook; it never commits to git — publishing notes is a human-only step (`coldstart kb commit`).","inputSchema":{"properties":{"agent":{"description":"Optional agent id (given in a capture prompt, alongside session). Selects THIS agent stream's durable worklist for the coverage line so a subagent does not clear the main agent's list. Defaults to \"main\".","type":"string"},"into":{"description":"Phase-2 answer: merge this write into the existing note with this id (from a prior `candidates` response).","type":"string"},"is_new":{"description":"Phase-2 answer: declare this a genuinely new concept, bypassing the candidate matches from a prior `candidates` response.","type":"boolean"},"session":{"description":"Optional session id (given in a capture prompt). Enables the flow-evidence check: a flow whose step files this session never actually read gets a warning.","type":"string"},"spec":{"description":"A single note spec (JSON object). Fields: type, title, summary, identityAliases (stable — unions forever), incidentAliases (this write's symptom words — replaced by the next write that changes summary/body, omit if this write isn't about an incident), anchors:[{path,symbols?}], and type-specific fields (facets/character for file; steps/verified for flow; kind/scope/body for lesson). REQUIRED for the note to be findable at all — file-single: identityAliases + anchors[].symbols; file-hub: identityAliases + facets[].symbol; flow: identityAliases + steps + verified; lesson: scope.terms. A note missing these is written but unreachable: identityAliases are the only STABLE search surface besides the exact title (incidentAliases are optional — symptom words for a write that describes one, replaced by the next such write, never required), and anchor symbols are the only channel that answers a query typed as an identifier. Omit `id` on a new flow/lesson to trigger the reuse gate. Use `specs` instead to write several notes at once.","type":"object"},"specs":{"description":"The capture path: an ARRAY of note specs (each the same shape as `spec`), written in ONE call. Order flows before the file notes that reference them. Well-formed notes are written; malformed ones are reported together (not atomic — a bad note never silences a good one); the result ends with a coverage line naming any worked file still without a note. Prefer this over many single-`spec` calls.","items":{"type":"object"},"type":"array"}},"required":[],"type":"object"},"name":"kb_write"},{"description":"Notebook overview: how many notes exist (by type: file/flow/lesson), how many are flagged stale (their anchored files drifted since verification), and how many are superseded/retracted. Pass `paths` (array of repo-relative paths) to instead list the notes anchored at each of those exact paths with their freshness state — a quick \"is anything known here?\" check across several files at once.","inputSchema":{"properties":{"paths":{"description":"Optional repo-relative paths. When given, returns per-path anchored notes + freshness instead of the whole-notebook overview.","items":{"type":"string"},"type":"array"}},"type":"object"},"name":"kb_status"},{"description":"List the notebook notes that are WRITTEN BUT UNFINDABLE — missing the fields a note cannot be retrieved without (identityAliases, anchor symbols, a flow's verified paths). Notes written before those fields were required are correct but unreachable, and this is how they get found.\n\nReturns a worklist, never a change: repairing is your work, because every gap needs a judgement about the code (which words a reader would search for, which symbols the note is actually about, which files you can honestly claim to have read). Fix each one with kb_write, passing the note's `id` — fields merge, so nothing already in the note is lost.\n\nA clean notebook returns \"Nothing to repair here.\" Run it when the user asks to repair, fix, or clean up the notebook.","inputSchema":{"properties":{},"type":"object"},"name":"kb_repair"},{"description":"List file/flow notes whose identityAliases may no longer describe them — a DIFFERENT problem from kb_repair: that one finds notes with NO aliases at all, this one is for aliases that exist but have gone stale (a note rewritten several times can carry words that were really symptoms of an earlier write, not stable facts). Paginated 10 notes at a time.\n\nEach entry shows the current (capped) identityAliases AND the full historical union hidden past the render cap — read both before retracting anything, because dropping a visible alias can resurface an older hidden one on the next fold. Re-read the note's code, then reconcile via kb_write (retract stale entries, re-put the rest) — never mechanically, every judgement needs the current code. End every note's kb_write with `aliasesVerified:true` on it, even when nothing changed — that is what stops it reappearing; without it the same note resurfaces on your next call.\n\nReturns \"No file/flow notes to reconcile.\" when done. Once a batch is marked aliasesVerified, call again with NO offset (or offset 0) — verified notes drop out of the list on their own. Do not increment offset yourself across a reconciling pass: the list shrinks as notes get marked, so a fixed offset (including a stale `more.nextOffset`) silently skips whatever shifted into that position. `offset`/`more.nextOffset` still work for browsing the list WITHOUT marking anything — just not as a way to advance while reconciling.","inputSchema":{"properties":{"limit":{"description":"Notes per page. Defaults to 10.","type":"number"},"offset":{"description":"Pagination offset (0-based). For browsing only — do NOT increment this across calls once you start marking notes aliasesVerified, since the eligible list shrinks as you go. Leave at 0 (or omit) and just call again; reviewed notes fall out automatically.","type":"number"}},"type":"object"},"name":"kb_repair_aliases"}]}}}
