coldstart
Self-maintaining and persistent codebase memory for AI coding agents — a deterministic AST index plus agent-written notes that flag themselves stale when the code changes. Works with Claude Code, Cursor, and Codex via MCP + CLI.
Install / Use
claude mcp add AkashGoenka -- npx -y github:AkashGoenka/coldstartIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Skill content
View source on GitHubTwo layers, one tool:
- The notebook (
coldstart kb) — durable, agent-written notes about how this codebase actually works: what a file is for, how a flow spans files, which invariants hold. Captured after real tasks, recalled when a later task matches, and kept honest by the index — every note is anchored to real files, and a note whose evidence drifted is flagged, not served as truth. - Navigation (
coldstart find/coldstart gs) — a fast static index over file paths, symbol names, exports, and the import/call graph. It answers "which files are relevant to this task?" in milliseconds, with checkable evidence instead of a similarity score.
No embeddings, no model to run, no service to babysit. Agents are already good at reading and reasoning about code; what they waste tokens on is finding the right file and re-deriving what the last session already figured out. coldstart does those two parts and gets out of the way.
Install
Requires Node.js 18+.
npm install -g @cstart/coldstart
cd your-project
coldstart init # coldstart.md + client wiring + notebook + background index warm-up
A single coldstart init does everything — navigation and the notebook. It asks two things — the experience (cli, recommended, or mcp) and the client — then writes the agent-facing guidance into the client's own rules file (as an imported coldstart.md for Claude Code; inlined directly for Cursor and Codex, which don't resolve @file references), wires the client, and sets up the notebook (skeleton, git wiring, and — for Claude Code, Codex, and Cursor — the capture/recall hooks). Pass --experience / --client to skip the prompts. The client is never auto-detected; you always pick it.
- Claude Code → writes
coldstart.mdand ensuresCLAUDE.mdimports it via@coldstart.md, and registers both the find/gs search hooks (a PostToolUse nudge + a PreToolUse find-dedup guard) and the notebook recall/capture hooks (UserPromptSubmit + Stop/SubagentStop) in.claude/settings.json— merged into any existing settings, never overwriting them. Themcpexperience also writes.mcp.json. - Codex → embeds the full coldstart guidance inline in a marked block in
AGENTS.md(Codex has no@fileinclude, so there's no separatecoldstart.md), refreshed in place on re-run, and registers Codex-specific navigation plus notebook hooks in.codex/hooks.json. The capture hook understands Codex rollout and subagent transcripts. Themcpexperience also writes[mcp_servers.coldstart]into.codex/config.toml. - Cursor → writes
.cursor/rules/coldstart.mdc— an always-applied rule that carries the full coldstart guidance inline (Cursor doesn't reliably resolve@filereferences in rules), rewritten on every init — and registers Cursor-specific navigation plus notebook hooks in.cursor/hooks.json(apreToolUsefind-dedup guard, apostToolUsenudge,beforeSubmitPromptrecall, andstop/subagentStopcapture — merged into any existing hooks). The capture hook parses Cursor's own conversation transcript. Themcpexperience also writes.cursor/mcp.json. - Other → writes
coldstart.mdonly, and prints the wiring directions (plus the MCP server entry for themcpexperience).
init then warms the index in the background, so your first lookup is instant. Re-running init is safe — it never duplicates entries.
Upgrading
npm install -g @cstart/coldstart@latest
coldstart init # re-run in each project to refresh coldstart.md
A version stamp in the keeper's lockfile makes the old background keeper shut down on the next lookup; a fresh one spawns from the new binary. No manual restart needed.
[!NOTE] Migrating from
coldstart-mcp: the package was renamedcoldstart-mcp→@cstart/coldstartat 2.0.0 (the CLI is now the primary surface).coldstart-mcpis deprecated but still installs; switch withnpm uninstall -g coldstart-mcp && npm install -g @cstart/coldstart && coldstart init. Thecoldstart-mcpbinary name is kept as an alias, so existing MCP configs keep working.
Removing coldstart
init writes per-repo wiring that a global npm uninstall can't reach (npm fires no reliable uninstall hook, and it has no record of which repos you init'd). So — like husky — coldstart ships an explicit reverse:
coldstart unwire # strip coldstart's wiring from this repo (notebook kept)
coldstart unwire --purge # also delete .coldstart/notebook/ and its git plumbing
unwire removes only coldstart-owned markers from the files init touched — hook entries, the @coldstart.md import, the AGENTS.md block, the MCP server entry, and files coldstart fully owns (coldstart.md, .cursor/rules/coldstart.mdc) — never your own content in shared files. It sweeps all four clients, is idempotent (a second run reports everything already gone), and keeps the notebook by default since it's committed, shared data. Run it in each project first, then npm uninstall -g @cstart/coldstart to remove the package.
The notebook
A repo-local knowledge base written and read by agents, in .coldstart/notebook/:
coldstart kb search tile save lifecycle # plain task words, symbols, or file names
coldstart kb lookup src/models.py Tile # everything known at one exact address
coldstart kb write spec.json # the write gate (two-phase dedup)
coldstart kb commit # publish notes to git, nothing else rides along
coldstart kb view # open a single-file HTML browser of the notebook
coldstart kb repair # worklist of notes that are written but unfindable
coldstart kb repair-aliases # worklist of aliases that may no longer be true
coldstart kb status / lint / render / init / migrate
What a note is. Three shapes: a file note (what a file is for — a single summary, or per-symbol facets for hub files), a flow note (a cross-file story: ordered steps, invariants), and a lesson (a trap, rule, bug-cause, rationale, or confirmed absence). Every note carries anchors — concrete file paths and symbols its claims rest on.
Where notes reach the agent. Three surfaces, no new habits required:
Summary:lines onfindresults — a past agent's verified overview of a file, right where the file ranks.[fresh]means the file is byte-identical to when the summary was verified — the agent can rely on it without re-reading the file.- Recall at prompt time (optional hook) — notes whose titles, aliases, or anchors match the incoming prompt are surfaced as a compact title + gist + path block, hard-capped, framed as reference data. Nothing matches → nothing injected.
kb search/kb lookup— a search engine over the notebook for mid-task vocabulary changes, and an exact-address lookup (path [symbol]) before editing a file.
Why it can be trusted. This is the part that took the design work:
- Freshness is mechanical, not hoped-for. Every anchor is stamped with a content hash at write time; the index re-checks stamps as the code changes. A drifted note renders
[evidence changed: <path>]and the guidance says re-verify — stale knowledge degrades into a labeled hypothesis instead of a confident lie. - The log is the truth. Notes live in an append-only
.rawevent log (commit it — merges are unions, so parallel branches of notes reconcile without conflicts). The Markdown notes are derived, regenerated mechanically, and gitignored. - Writes go through a gate. A new note's concept is first searched against existing notes — the agent must explicitly merge into a match (
--into <id>) or declare it new (--new). Duplicates are gated at write time, not cleaned up later. - Concurrent sessions are safe. Multiple agents can write at once: per-note append-only logs, exclusive creation for new note ids (a same-moment duplicate becomes two visible notes, never a silent merge), lossless merging for shared file notes, and atomic renders (a reader never sees a half-written note).
- Corrections happen in-session. If an agent finds a note wrong while the evidence is in its context, the guidance tells it to fix or retract the note right then — no better-placed future agent exists.
Setup: the notebook comes with coldstart init — no separate step. It creates the notebook skeleton, sets union-merge for the logs, and (on Claude Code, Codex and Cursor) wires the two hooks — capture at session end, recall at prompt time. (coldstart kb init still exists as an alias if you want to (re-)wire just the notebook.) Other hosts can drive the notebook without the hooks: via the full kb CLI, or — for no-shell clients — the kb_search / kb_lookup / kb_write / kb_status / kb_repair / kb_repair_aliases MCP tools.
Language-agnostic. The notebook's freshness machinery is content-hash based, so it works on any codebase — including languages the navigation index doesn't parse. Where the index does parse, notes additionally get symbol-level freshness.
[!NOTE] The notebook is young. What's verified today: notes written by agents in real sessions checked out accurate against the code; the stale-note loop closes end-to-end (flag → re-read → correction); capture, recall, and concurrent writes hold up under stress. The bet — stated as a bet — is that a corpus like this compounds over a repo's lifetime: the second time any question comes up, the answer is one
Readaway instead of a re-derivation.
Navigation: the two operations
| | What it answers | Replaces |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| find <terms> | "Which files are about this?" — ranks files by how many of your query terms they cover (filenames, path segments, exported symbols, plus a repo-wide name-reference pass). | a flurry of grep/glob while orienting |
| gs <file> | "What is this file?" — top-level symbols with line ranges, who imports it, who calls each symbo
Truncated for display — read the full file on GitHub.
Related Skills
momen-cursurrules-prompt-file
40.6kCursor rules for building custom frontends with Momen.app as headless BaaS with GraphQL API, actionflows, AI agents, and Stripe integration.
semiotic-react-dataviz-cursorrules-prompt-file
40.6kCursor rules for Semiotic data visualization library with 30+ chart types, MCP server, and AI-assisted chart generation.
Agent-Reach
71.9kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
ruflo
67.9k🌊 The original agent meta-harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
