codegraph
AGENTS.md73k starsChanged 4 months agoMITView on GitHub
Canonical project guidance for coding agents working in this repository (Codex/Astra, Claude Code via @AGENTS.md, Cursor, etc.). Codex size note: root AGENTS.md is intentionally kept near ~35 KiB (critical build/test/arch/retrieval rules retained). Longer validation methodology + the Excalidraw worked example live in docs/AGENTS.md. This environment sets project_doc_max_bytes = 49152 so root (and root+docs/ when cwd is under docs/) are not silently truncated at the 32 KiB default. CodeGraph is a local-first code intelligence library + CLI + MCP server. It…
- Deletes or force-pushes
- Installs packages
- Commits and pushes
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about colbymchenry/codegraph
- @midu.dev“¡No quemes tokens con tu IA explorando tu proyecto! Crea un grafo semántico local de tu código con esto ✓ …”Bluesky · May 18, 2026 · 12 likes
- @novica.bsky.social“hey #rstats is anyone working R support for github.com/colbymchenry... ?”Bluesky · May 22, 2026 · 9 likes
- headroomlabs-ai/headroom“[FEATURE] Support codegraph as an alternative code-graph backend”GitHub · Jun 15, 2026 · 8 reactions
- @alexiskirke.bsky.social“I came across this impressive open-source project on GitHub that helps AI coding agents work faster and …”Bluesky · May 25, 2026 · 7 likes
- @zottmann.dev“#WorksWellForMe: For code exploration tasks, when you tell your agent to clone a repo in a temp folder, …”Bluesky · Sep 29, 2026 · 5 likes
The biggest 5 of 86 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 86
Talked about on GitHub, Bluesky and Hacker News (86 times).
On GitHub · 50
- Jun 15, 2026[FEATURE] Support codegraph as an alternative code-graph backend — headroomlabs-ai/headroom8 reactions · 2 comments
- May 19, 2026feat: support CodeGraph as optional repo exploration helper — Gentleman-Programming/gentle-ai2 reactions · 1 comment
- Nov 17, 2026codegraph 1.6.3 — chenrui333/homebrew-tap1 reaction · 1 comment
- Jul 27, 2026codegraph: 1.4.1 -> 1.5.0 — NixOS/nixpkgs1 reaction
- Jul 7, 2026feat: Add codegraph — appium/appium-ios-remotexpc1 reaction · 1 comment
45 more on GitHub
- Jul 3, 2026Built-in graph-based code intelligence backend for dependency, call-chain, and impact queries — can1357/oh-my-pi1 reaction · 10 comments
- Jun 17, 2026Add compare table with `codegraph` — defendend/Claude-ast-index-search1 reaction · 1 comment
- Jun 15, 2026feat(codegraph): add CodeGraph local code-intelligence plugin — pleaseai/claude-code-plugins1 reaction · 4 comments
- May 29, 2026codegraph: init at 0.9.7 — numtide/llm-agents.nix1 reaction
- May 26, 2026fix(codegraph): verify MCP server is registered for the launched CLI — jasmedia/cc-pr-reviewer1 reaction · 2 comments
- May 25, 2026feat(codegraph): integrate CodeGraph MCP server to cut review token usage — jasmedia/cc-pr-reviewer1 reaction · 1 comment
- May 20, 2026CommandCode terminal freezes entirely + flickering on large output — CommandCodeAI/command-code1 reaction · 5 comments
- May 18, 2026Add Claude PR review workflow — cowprotocol/services1 reaction · 1 comment
- May 10, 2026Tools Comparisons alternatives — jgravelle/jcodemunch-mcp1 reaction · 6 comments
- Nov 22, 2026Minarbot CodeGraph 1: Rust crate foundation (schema, sync, extraction for Rust/TS/JS/Python/Go) — labsiqbal/minarbot0 reactions · 3 comments
- Nov 22, 2026[FEAT] codegraph compatibility? — hedges333/makeflow-skill0 reactions
- Nov 21, 2026build(deps-dev): bump the npm-dependencies group across 1 directory with 3 updates — vndv/pi-codegraph0 reactions
- Nov 20, 2026agent-skills.github.colbymchenry.codegraph: 1.6.3 → 1.6.4 — sudosubin/agents.nix0 reactions
- Nov 20, 2026codegraph: 1.6.2 -> 1.6.3 — NixOS/nixpkgs0 reactions
- Nov 17, 2026agent-skills.github.colbymchenry.codegraph: 1.6.2 → 1.6.3 — sudosubin/agents.nix0 reactions
- Nov 17, 2026chore(deps): bump the all-dependencies group across 1 directory with 32 updates — impact-initiatives/ana_app0 reactions
- Nov 13, 2026chore(overlays): bump codegraph to 1.6.2 — martinjlowm/nixfiles0 reactions · 1 comment
- Nov 13, 2026codegraph 0.9.9 leaks file descriptors on checkouts with many worktrees — martinjlowm/nixfiles0 reactions
- Nov 13, 2026Set up codegraph (code knowledge graph MCP) for the fleet agents — mingster/dotfiles0 reactions · 5 comments
- Nov 11, 2026Bump the dev-dependencies group across 1 directory with 5 updates — peter91v/ETNPILOT0 reactions
- Nov 9, 2026chore(deps-dev): bump @colbymchenry/codegraph from 0.8.0 to 1.6.2 — EmmanuelOrtiz87/gentle-vanguard-public0 reactions · 1 comment
- Nov 9, 2026CommonJS: missing module exports resolve to unrelated unimported class methods — inth3shadows/codegraph0 reactions · 1 comment
- Nov 6, 2026Run pinned CodeGraph integration tests in CI — phyzess/pappra0 reactions
- Nov 2, 2026chore: bump external skill pins — jthiruveedula/agentkit0 reactions
- Nov 1, 2026chore(deps): bump @colbymchenry/codegraph from 1.6.0 to 1.6.2 in /lazytrae-plugin/packages/cli/tooling/codegraph — elvinzhao10/LazyTrae0 reactions
- Nov 1, 2026integrate codegraph — alaexeyshustov/pipelines0 reactions · 1 comment
- Oct 30, 2026feat(search/S4): native C11 Tree-sitter CodeGraph symbols and versioned reference edges (#306) — qigao/TurboAgent0 reactions
- Oct 30, 2026feat(search/S3): revision-scoped SQLite FTS5 chunks+symbols and exact query planner (#306) — qigao/TurboAgent0 reactions · 2 comments
- Oct 24, 2026[22.10] Integrate RPGCode symbols, imports and calls with CodeGraph — tk-reawakened/rpgtoolkit-reawakened0 reactions
- Oct 23, 2026docs(positioning): optave/codegraph and agent-arch trip the competitive tripwire; retire the "only tool" claims — hslee16/Archy0 reactions · 2 comments
- Oct 10, 2026Add zstd compression as Indexer option — MerlinScheurer/hister0 reactions
- Oct 8, 2026fix(clone): copy a consistent snapshot, including the WAL — Lint111/codegraph0 reactions · 1 comment
- Oct 7, 2026chore(deps): Bump the workflow-tooling group across 1 directory with 2 updates — Zuexx/forgekit-android0 reactions
- Oct 7, 2026chore(deps): Bump the workflow-tooling group across 1 directory with 2 updates — Zuexx/forgekit-ios0 reactions
- Oct 6, 2026Update PURL mappings for conda-forge packages — prefix-dev/purl-associator0 reactions · 2 comments
- Oct 5, 2026build(deps): bump @colbymchenry/codegraph from 1.6.0 to 1.6.1 in /lazyqoder-plugin/tooling in the tooling group — elvinzhao10/LazyQoder0 reactions · 2 comments
- Oct 5, 2026Bump @colbymchenry/codegraph from 1.6.0 to 1.6.1 in /plugins/lazydeepseek/tooling in the tooling group — elvinzhao10/LazyDeepSeek0 reactions · 2 comments
- Oct 5, 2026Vibe https://github.com/colbymchenry/codegraph — generalbots/generalbots0 reactions
- Oct 5, 2026chore(deps): bump @colbymchenry/codegraph from 1.6.0 to 1.6.1 in /lazybuddy-plugin/tooling in the tooling group — elvinzhao10/LazyBuddy0 reactions · 1 comment
- Oct 5, 2026build(deps): bump @colbymchenry/codegraph from 1.6.0 to 1.6.1 in /plugins/lazyzcode/tooling in the tooling group — elvinzhao10/LazyZCode0 reactions · 2 comments
- Oct 4, 2026Freshness: codegraph v1.6.0 -> v1.6.2 — thoroc/context-radar0 reactions
- Oct 4, 2026codegraph: 1.6.0 -> 1.6.2 — NixOS/nixpkgs0 reactions
- Oct 3, 2026agent-skills.github.colbymchenry.codegraph: 1.6.0 → 1.6.2 — sudosubin/agents.nix0 reactions
- Oct 3, 2026codeGraph: 1.6.1 -> 1.6.2 — Kh05ifr4nD/coolheaded0 reactions
- Oct 3, 2026codegraph v1.6.2 — conda-forge/codegraph-feedstock0 reactions · 8 comments
On Bluesky · 34
- May 18, 2026¡No quemes tokens con tu IA explorando tu proyecto! Crea un grafo semántico local de tu código con esto ✓ -92% tool calls ✓ 71% más rápido… — @midu.devsays it tested it12 likes and reposts · 4 replies
- May 22, 2026hey #rstats is anyone working R support for github.com/colbymchenry... ? — @novica.bsky.social9 likes and reposts · 2 replies
- May 25, 2026I came across this impressive open-source project on GitHub that helps AI coding agents work faster and cheaper with local project-scoped… — @alexiskirke.bsky.social7 likes and reposts · 2 replies
- Sep 29, 2026#WorksWellForMe: For code exploration tasks, when you tell your agent to clone a repo in a temp folder, also tell it to init codegraph in… — @zottmann.dev5 likes and reposts · 1 reply
- May 25, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 colbymchenry / codegraph ⭐ 21,173 (+2,993) 🗒 TypeScript Pre-indexed code knowledge graph for Claude… — @github-trending.bsky.social5 likes and reposts · 1 reply
29 more on Bluesky
- May 6, 2026Reduce token & tool calls from 26-52 to 1-6 calls, faster 43-82%. When #codeagent explores your codebase query code #graph instead of… — @qdrddr.bsky.socialsays it tested it4 likes and reposts · 1 reply
- May 21, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 colbymchenry / codegraph ⭐ 7,633 (+1,850) 🗒 TypeScript Pre-indexed code knowledge graph for Claude… — @github-trending-js.bsky.social3 likes and reposts · 1 reply
- May 16, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 colbymchenry / codegraph ⭐ 2,110 (+397) 🗒 TypeScript Pre-indexed code knowledge graph for Claude… — @github-trending-js.bsky.social3 likes and reposts · 1 reply
- Nov 19, 2026🔥 Hot Repo! 🔥 (100+ new stars) 📦 colbymchenry / codegraph ⭐ 77,940 (+129) 🗒 TypeScript Pre-indexed code knowledge graph, auto syncs on… — @github-trending-js.bsky.social2 likes and reposts
- Jun 27, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 colbymchenry / codegraph ⭐ 55,237 (+388) 🗒 TypeScript Pre-indexed code knowledge graph, auto syncs… — @github-trending-js.bsky.social2 likes and reposts · 1 reply
- Jun 17, 2026CodeGraph parses your repo with tree-sitter into a local SQLite graph served over MCP, so agents query callers, callees, and impact instead… — @jeremymorgan.com2 likes and reposts · 1 reply
- Jun 9, 2026codegraphの「コードベースを地図化してAIコーディングを軽くする」、ここはかなり筋がいいです🌿 https://x.com/so_ainsight/status/2058518896907538932… — @mint-echosphere.bsky.social2 likes and reposts · 1 reply
- May 25, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 colbymchenry / codegraph ⭐ 20,919 (+2,993) 🗒 TypeScript Pre-indexed code knowledge graph for Claude… — @github-trending-js.bsky.social2 likes and reposts · 1 reply
- May 22, 2026📈 Today's GitHub Trending: 1. https://github.com/anthropics/claude-plugins-official - Python, 2556 stars today 2.… — @ghtrend.newsmast.social.ap.brid.gy2 likes and reposts
- May 16, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 colbymchenry / codegraph ⭐ 2,109 (+397) 🗒 TypeScript Pre-indexed code knowledge graph for Claude… — @github-trending.bsky.social2 likes and reposts · 1 reply
- Oct 31, 2026Index a small repo with CodeGraph, ask an agent to trace a call chain, compare against your IDE’s references. Fifteen minutes to know if… — @jeremymorgan.com1 likes and repost · 2 replies
- Oct 24, 2026Give your AI coding agent a pre-built map of your codebase: fewer tokens, fewer tool calls, 100% local. 🔗… — @prosperflowio.bsky.social1 likes and repost
- Jun 12, 2026しかも導入はタダの要約じゃない。`codegraph install` → 各プロジェクトで `codegraph init -i`、その後は file watcher で index を auto-sync。… — @mel-echosphere.bsky.social1 likes and repost
- Jun 12, 2026`codegraph`、`100% local` は本当だ。READMEにもそう書いてある。 元: https://x.com/so_ainsight/status/2058518896907538932 一次:… — @mel-echosphere.bsky.socialsays it tested it1 likes and repost · 1 reply
- Jun 3, 2026CodeGraph : un knowledge graph pré-indexé de votre codebase pour Claude Code, Cursor ou Codex. Résultat mesuré sur 7 projets réels — 35%… — @camilleroux.comsays it tested it1 likes and repost
- May 31, 2026「AIコーディングが35%安く、ツール呼び出し70%減、100%ローカルで情報も外に出ない」——codegraphが★3.4万に急上昇している。 https://x.com/opensourcelab9/status/2060602106432901196… — @sara-echosphere.bsky.socialsays it tested it1 likes and repost · 1 reply
- May 24, 2026GitHub - colbymchenry/codegraph: Pre-indexed code knowledge graph for Claude Code, Codex, Cursor, OpenCode, and Hermes Agent — fewer… — @tech-trending.bsky.social1 likes and repost · 1 reply
- May 23, 2026📈 Today's GitHub Trending: 1. https://github.com/Lum1104/Understand-Anything - TypeScript, 2331 stars today 2.… — @ghtrend.newsmast.social.ap.brid.gy1 likes and repost · 1 reply
- May 22, 2026ai ml / GitHub Trending: GitHub - colbymchenry/codegraph: Pre-indexed code kno... For engineers using AI coding agents on large codebases,… — @foursignalsdev.bsky.social1 likes and repost
- May 21, 2026Knowledge graph for your agents is a very cool ideas 🔥 https://github.com/colbymchenry/codegraph — @apvarun.com1 likes and repost
- May 21, 2026📈 Today's GitHub Trending: 1. https://github.com/anthropics/claude-plugins-official - Python, 891 stars today 2.… — @ghtrend.newsmast.social.ap.brid.gy1 likes and repost · 1 reply
- May 21, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 colbymchenry / codegraph ⭐ 7,633 (+1,850) 🗒 TypeScript Pre-indexed code knowledge graph for Claude… — @github-trending.bsky.social1 likes and repost · 1 reply
- May 20, 2026📈 Today's GitHub Trending: 1. https://github.com/colbymchenry/codegraph - TypeScript, 1910 stars today 2.… — @ghtrend.newsmast.social.ap.brid.gy1 likes and repost · 1 reply
- May 16, 2026codegraph pre-indexes your codebase into a local knowledge graph for Claude Code — so it spends fewer tokens and tool calls hunting for… — @mahdi-17.bsky.social1 likes and repost · 1 reply
- May 14, 2026Claude Codeの探索を効率化するローカル専用のコードナレッジグラフツールらしい AIのコード理解を深めて作業を高速化したいときに試したい yug1224 starred colbymchenry/codegraph… — @yug1224.com1 likes and repost
- May 8, 2026🔥 Hot Repo! 🔥 (100+ new stars) 📦 colbymchenry / codegraph ⭐ 1,045 (+148) 🗒 TypeScript Pre-indexed code knowledge graph for Claude Code… — @github-trending-js.bsky.social1 likes and repost
- Oct 30, 2026Blast radius of a code change is a graph problem. CodeGraph builds an AST-derived graph of symbols, calls, and imports, then exposes it to… — @jeremymorgan.com0 likes and reposts · 1 reply
- Jun 12, 2026同じ README の benchmark、平均は `47% fewer tokens` `58% fewer tool calls`。そこは効いてる。 でも cost は `16% cheaper` 止まりで、Excalidraw と Tokio は `even`… — @mel-echosphere.bsky.social0 likes and reposts · 1 reply
- May 28, 2026💎 README原文:"CodeGraph only helps when queried directly — otherwise a sub-agent reads files regardless and CodeGraph becomes overhead."… — @nemu-echosphere.bsky.social0 likes and reposts · 1 reply
On Hacker News · 2
- Jul 26, 2026Codegraph5 points
- May 24, 2026Supercharge Claude Code, Cursor, Codex with Semantic Code Intelligence1 point · 2 comments
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository5 other files it gives its agents.
- docs/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/codegraph.mdcCursor rule
- add-langSkill
- agent-evalSkill
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 111
All installer changes need matching coverage in __tests__/installer-targets.test.ts — there are ~47 parameterized contract tests covering …
- Very specific: line 184
Every engine test file runs in a throwaway home dir (__tests__/setup-home-sandbox.ts, a setupFiles entry): HOME/USERPROFILE (+ Windows …
- Distinctive: line 196
When asked to test or validate on Linux, use Docker — there's no Linux box, but Docker runs on the macOS host.
- Very specific: line 255
When the maintainer DOES bump the version, the only edit strictly required is to package.json — the workflow's "Sync package-lock.json" …
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Canonical project guidance for coding agents working in this repository (Codex/Astra, Claude Code via @AGENTS.md, Cursor, etc.).
Codex size note: root AGENTS.md is intentionally kept near ~35 KiB (critical build/test/arch/retrieval rules retained). Longer validation methodology + the Excalidraw worked example live in docs/AGENTS.md. This environment sets project_doc_max_bytes = 49152 so root (and root+docs/ when cwd is under docs/) are not silently truncated at the 32 KiB default.
Project Overview
CodeGraph is a local-first code intelligence library + CLI + MCP server. It parses any supported codebase with tree-sitter, stores symbols/edges/files in SQLite (FTS5), and exposes a knowledge graph to AI agents (Claude Code, Cursor, Codex CLI, opencode) over MCP. Per-project data lives in .codegraph/. Extraction is deterministic — derived from AST, not LLM-summarized.
Distributed as @colbymchenry/codegraph on npm; same binary serves as installer, indexer, and MCP server.
Build, Test, Run
npm run build # tsc + copy schema.sql and *.wasm + build the viewer into dist/; chmods dist/bin/codegraph.js
npm run build:lib # the viewer's components as @colbymchenry/codegraph-ui (ui/dist) — NOT part of `build`
npm run dev # tsc --watch
npm run clean # rm -rf dist
npm test # vitest run (all)
npm run test:watch
npm run test:eval # only __tests__/evaluation/
npm run eval # build then run __tests__/evaluation/runner.ts via tsx
npm run cli # build then run the local dist binary
# Single test file / pattern
npx vitest run __tests__/installer-targets.test.ts
npx vitest run __tests__/extraction.test.ts -t "TypeScript"copy-assets (called from build) copies src/db/schema.sql and all src/extraction/wasm/*.wasm files into dist/. Any new SQL or grammar wasm must be copied or it won't ship.
One other build step writes into dist/ and is subject to the same rule: build:ui builds the
browser viewer into dist/viewer/ (never dist/ui/ — that's the terminal ui).
scripts/check-ui-build.mjs asserts both dist/viewer/ and the copied grammars in
dist/extraction/wasm/ after every build and inside every release archive — the viewer's syntax
highlighting reads a file with the same grammar the engine indexed it with, so a missing wasm is an
unhighlighted screen as well as an extraction gap.
npm run build:lib is separate and does NOT run as part of npm run build: it compiles the same
ui/src tree a second way, with svelte-package, into ui/dist — the @colbymchenry/codegraph-ui
component library the Pro app imports (task CG-61). scripts/check-ui-package.mjs then prunes the
standalone app's shell out of it, resolves the extensionless import specifiers svelte-package
leaves behind, and asserts the seam: nothing outside lib/adapter.js may reach the network. The
package is prepared, not published — ui/package.json carries "private": true deliberately,
and scripts/pack-npm.sh only packs a tarball when CODEGRAPH_PACK_UI=1.
Tests run as two vitest projects (vitest.workspace.mts): engine (node) and ui (jsdom, the
Svelte plugin, resolve.conditions: ['browser']) for the single __tests__/ui-package.test.ts.
npm test still runs both. The split is not cosmetic — browser is a package-resolution
condition, and applied globally it hands the engine's suites the browser builds of
web-tree-sitter and friends. The root config (vitest.config.mts, .mts because the plugin is
ESM-only and the repo is CJS) is the shared base; note that a workspace project concatenates
the base's include with its own, which is why the ui project does not extends it.
Node engines: >=20.0.0 <25.0.0. There is a hard exit on Node 25.x and below 20 (see src/bin/node-version-check.ts).
Architecture
Layered pipeline
files → ExtractionOrchestrator (tree-sitter) → DB (nodes/edges/files)
↓
ReferenceResolver (imports, name-matching, framework patterns)
↓
GraphQueryManager / GraphTraverser (callers, callees, impact)
↓
ContextBuilder (markdown/JSON for AI consumption)The public API surface is src/index.ts — the CodeGraph class wires all the layers and re-exports types. Library users only touch this file; the MCP server and CLI also drive it.
Module layout
src/index.ts—CodeGraphclass:init/open/close,indexAll,sync,searchNodes,getCallers/getCallees,getImpactRadius,buildContext,watch/unwatch.src/db/—DatabaseConnection,QueryBuilder(prepared statements),schema.sql,sqlite-adapter.ts. Backed by Node's built-innode:sqlite(DatabaseSync) — real SQLite with WAL + FTS5, exposed through a thin better-sqlite3-shaped adapter. The bundled runtime always ships Node ≥22.5, sonode:sqliteis always available: no native build step and no wasm fallback. (Running from source needs Node ≥22.5.)codegraph statusreports the live backend (node-sqlite, the sole backend).src/extraction/—ExtractionOrchestrator, tree-sitter wrappers, per-language extractors underlanguages/(one file per language), plus standalone extractors for non-tree-sitter formats (svelte-extractor.ts,vue-extractor.ts,liquid-extractor.ts,dfm-extractor.tsfor Delphi).parse-worker.tsruns heavy parsing off the main thread.src/resolution/—ReferenceResolverorchestratesimport-resolver.ts(withpath-aliases.tsfor tsconfig path aliases + cargo workspace member globs),name-matcher.ts, andframeworks/(Express, Laravel, Rails, FastAPI, Django, Flask, Spring, Gin, Axum, ASP.NET, Vapor, React Router, Next.js —nextjs.ts: pages androute.tshandlers from files,router.push/redirect/NextResponse.redirectasnavigatesedges, withnext-router-synthesizer.tsfor<Link href>— Expo Router, SvelteKit, Vue/Nuxt, Cargo workspaces). Frameworks emitroutenodes andreferencesedges.callback-synthesizer.tsholds the whole-graph synthesis passes (SYNTH_PASSES, merged in registry order — first-seen wins a duplicate pair) with the language gates;tier-synthesizer.tsis the cross-tier pass (a client's literalfetch/axiospath onto its own route, a queue job onto its consumer, a bus / socket event onto its handler —channel,tier,registeredAton every edge; registered before the in-process emitter pass so its more specific edge wins);synth-utils.tshas the helpers they share (enclosingFn,enclosingValue,makeLineAt). Express'spostExtractcomposesapp.use('/prefix', router)mounts onto a mounted file's route names, idempotently (the original path stays inqualifiedName).src/graph/—GraphTraverser(BFS/DFS, impact radius, path finding) andGraphQueryManager(high-level queries), plus the shared query-time derivations more than one surface renders:named-symbol-flow.ts(the one path finder, behindcodegraph_explore's Flow section and the viewer's Flow strip),dynamic-boundary-report.ts(where the graph stops),type-hierarchy.ts(ancestors/subtypes and the implementation count explore prints and the viewer draws),dead-code.ts(unreferenced symbols, and every reason a candidate is NOT claimed). A derivation that two callers render must live here, not inToolHandler— two derivations eventually disagree.src/context/—ContextBuilder+ formatter for markdown/JSON output.src/search/— full-text query parser and helpers for FTS5.src/sync/—FileWatcher(native FSEvents/inotify/RDCW) with debounce + filter, and git-hook helpers.src/mcp/— MCP server (MCPServer,tools.ts,transport.ts).server-instructions.tsis what the server returns in the MCPinitializeresponse — keep it in sync with the user-facing tool guidance.src/installer/— see below.src/bin/codegraph.ts— CLI (commander). Subcommands:install,init,uninit,index,sync,status,query,files,context,affected,serve --mcp.src/ui/— terminal UI (shimmer progress, worker).src/ui-server/-- read-only JSON API for thecodegraph uibrowser viewer (api/:node,flow,map,screens,steps,deadcode,trails,program, ...) plus static server; Svelte viewer lives inui/(seedocs/design/codegraph-ui-design-spec.md).screens/steps/programshare one fold (via/whenviagraph/branch-guards.ts);api/effects.tscurates calls that leave the index;api/route-roots.tsnames where a route's code starts. Derivations rendered by more than one surface belong insrc/graph/, notToolHandler. Not released yet:codegraph ui/webare refused (and hidden from--help) unlessCODEGRAPH_UI=1is set —src/bin/viewer-gate.ts. Viewer changelog entries wait indocs/viewer-launch-changelog.md, not under[Unreleased]. At launch: delete the gate, move those entries back, drop the "not released yet" notes fromsite/.
NodeKind / EdgeKind
Defined in src/types.ts. Both extractors and resolvers must use these exact strings.
- NodeKind:
file,module,class,struct,interface,trait,protocol,function,method,property,field,variable,constant,enum,enum_member,type_alias,namespace,parameter,import,export,route,component,union. - EdgeKind:
contains,calls,imports,exports,extends,implements,references,type_of,returns,instantiates,overrides,decorates.
Multi-agent installer
src/installer/ is the entry point for codegraph install (and the bare codegraph/npx @colbymchenry/codegraph invocation). Architecture:
targets/registry.tslists every supported agent.targets/types.tsdefines theAgentTargetinterface — adding a 5th agent (Continue, Zed, Windsurf…) is one new file intargets/+ one entry inregistry.ts. Each target owns its config-file location and MCP-server JSON/TOML/JSONC writing. (Targets no longer write an instructions file — see below.)- Current targets:
claude.ts,cursor.ts,codex.ts,opencode.ts. targets/toml.tsis a hand-rolled TOML serializer scoped to[mcp_servers.codegraph](used by Codex). Sibling tables and[[array_of_tables]]are preserved verbatim. No new dependency.- opencode reads
opencode.jsoncby default; the installer prefers existing.jsonc, falls back to.json, and creates.jsoncfor greenfield installs. Edits are surgical viajsonc-parserso user comments and formatting survive install/re-install/uninstall round-trips. The MCP entry is OpenCode 2's nativemcp.servers.codegraphwithdisabled: falseandcodemode: false(socodegraph_explorestays on the native tool list); a pre-#1698mcp.codegraph+enabledentry is migrated on re-install and removed by uninstall. instructions-template.tsno longer holds an instructions body — it exports only the<!-- CODEGRAPH_START -->/<!-- CODEGRAPH_END -->markers. The installer stopped writing a## CodeGraphblock into each agent's instructions file (CLAUDE.md/~/.codex/AGENTS.md/~/.config/opencode/AGENTS.md/~/.gemini/GEMINI.md/.cursor/rules/codegraph.mdc/ Kiro steering doc) because it duplicated the MCPinitializeinstructions verbatim (issue #529). Each target'sinstall(self-heal on upgrade) anduninstalluse the markers to strip a block a previous install left behind.server-instructions.tsis the single source of truth for agent-facing guidance.- All installer changes need matching coverage in
__tests__/installer-targets.test.ts— there are ~47 parameterized contract tests covering install idempotency, sibling preservation, uninstall reverses install, byte-equal re-runs returningunchanged, and partial-state recovery for Codex.
Cursor MCP working-directory quirk
Cursor launches MCP subprocesses with the wrong cwd and doesn't pass rootUri in initialize. The installer injects --path into Cursor's MCP args — absolute path for local installs, ${workspaceFolder} for global installs. If you touch Cursor wiring, preserve this.
MCP server instructions
src/mcp/server-instructions.ts is sent back to the agent in the MCP initialize response. This is the first thing every agent sees about how to use the tools, and as of issue #529 it is the single source of truth for agent-facing tool guidance — the installer no longer writes a duplicate ## CodeGraph instructions block into CLAUDE.md / AGENTS.md / .cursor/rules/codegraph.mdc. Edit tool guidance here and nowhere else.
Retrieval performance & dynamic-dispatch coverage (do not regress)
CodeGraph's core value is letting an agent answer structural/flow questions ("how does X reach Y", trace, impact, callers) with a few fast codegraph calls and zero Read/Grep. The optimization target is wall-clock latency + tool-call count — don't optimize for token cost. (Cost is lower, not "flat" as earlier framing claimed: a current-build with-vs-without A/B across the 7 README repos, median of 4, saved on average 35% cost · 57% tokens · 46% time · 71% tool calls — reproducing the published README. The mechanism is far fewer turns over a much smaller accumulated context — NOT cache-ability: the without-arm's huge token volume is mostly cheap cache-reads, which is why token-count savings (57%) look bigger than cost savings (35%). Measure tokens by summing per-turn assistant usage, not result.usage (last-turn only in current Claude Code). See docs/benchmarks/call-sequence-analysis.md.) The mechanism that drives everything here: an agent falls back to Read/Grep the instant a codegraph answer is insufficient. So every change is judged by one question — is codegraph's answer sufficient enough to stop the agent from reading?
Target behavior: a flow question resolves in 1 codegraph call on small repos, scaling to 3–5 on large, with Read/Grep = 0. When reviewing a PR or trying something new, do not regress this.
Adapt the tool to the agent — don't try to change the agent
The lever that decides whether a retrieval change lands. Test before building anything here: does this make a tool the agent already calls do more with the input it already gives? If it instead needs the agent to behave differently — pick a different tool, query differently, learn from examples — it hits the low-salience wall and won't land.
CodeGraph's only channels to influence the agent are low-salience: the MCP initialize instructions (server-instructions.ts) and the tool descriptions. Changing them does not reliably move the agent's tool choice or query style — validated: trace-first steering ported into the server-instructions + tool descriptions (3 wording variants) never reproduced what a CLI --append-system-prompt achieved, and regressed wall-clock vs baseline. New tools fare worse (rarely chosen — the agent under-picks even trace); "better examples" is the same steering. The agent's tool-choice does improve on its own as host models get better at tool use — but that is not ours to force.
What works is meeting the agent where it already is:
- explore-flow —
codegraph_exploreis the PRIMARY tool the agent reliably calls; its query is a precise bag of symbol names (incl. qualifiedClass.method) spanning the flow the agent is after; explore finds the call path among those named symbols (riding synthesized edges) and leads its output with it. (buildFlowFromNamedSymbols: segment/co-naming disambiguation; ≤1 unnamed bridge so it never wanders a god-function's fan-out. Overload-aware: a PascalCase type token in the query biases an overloaded name to that type's own def —DataRequest task→ DataRequest'stask, not the abstract base; named-symbol files sort first.) - Sufficiency — make the tool's output complete enough that the agent stops.
codegraph_nodereturns the full body + the caller/callee trail, and for an AMBIGUOUS name returns every overload's body in one call (so the agent never Reads a file to find the right overload — validated on Alamofire/gin). This is the after-explore depth tool (labeled SECONDARY). - Errors teach abandonment — one or two
isError: trueresponses early in a session and the agent stops calling codegraph entirely (maintainer-observed, repeatedly).isErroris reserved for genuine "stop trying" cases: security refusals (PathRefusalError) and real malfunctions (which carry a retry-once note). Every expected/recoverable condition — project not indexed, symbol not found, file not in the index — returns a SUCCESS-shaped response carrying the guidance (NotIndexedError→textResult, seeToolHandler.execute's catch). The same principle is why the tool surface is always exposed, even at an un-indexed root (the old empty-tools/listgate was removed in #964 — it broke monorepos where only sub-projects carry a.codegraph/, and hid the tools from a session that started beforecodegraph init): safety comes from the response SHAPE (success-shaped guidance, neverisError), not from hiding tools. An un-indexed root'sinitializesends a per-project variant (SERVER_INSTRUCTIONS_NO_ROOT_INDEX— "passprojectPathto a project that has a.codegraph/"), not an "inactive" note; indexing is still deliberately the user's call, never the agent's.
What fails is the inverse — folding a precise answer into a fuzzy-input tool: the now-removed codegraph_context took a description, not symbols, so it couldn't disambiguate a flow's endpoints and surfaced the wrong feature (which is why it was cut). Precise output needs precise input — explore takes a symbol bag for exactly this reason. (codegraph_trace was likewise removed: explore-flow does its job and the agent under-picked it.)
The remaining lever under this axis is coverage: every flow made to connect statically (a new dynamic-dispatch synthesizer, or extracting symbols static parsing skipped — e.g. object-literal store actions in create((set,get)=>({...}))) is then surfaced automatically by explore-flow, no agent change needed. Reactive/reconciler runtimes (Halo's ReactiveExtensionClient, MediatR, Vue Proxy) are the frontier — flows there have no static edges, so nothing surfaces (correctly — silent beats wrong). Full investigation + A/B record: docs/benchmarks/call-sequence-analysis.md + auto-memory project_codegraph_read_displacement.
Explore budget — keep BOTH budgets monotonic with repo size
Two functions in src/mcp/tools.ts scale explore with indexed file count. This is the expected resolution (a regression here silently forces agents back to Read):
| Repo | files | explore calls | chars/call | per-file |
| express (small) | 147 | 1 | 18K | 3800 |
| excalidraw/django (medium) | 643–3043 | 2 | 28K | 6500 |
| vscode (large) | 10446 | 3 | 35K | 7000 |
| ~20k / ~40k | — | 4 / 5 | 38K | 7000 |
getExploreBudget(fileCount)→ call budget:<500→1, <5000→2, <15000→3, <25000→4, ≥25000→5(max 5).getExploreOutputBudget(fileCount)→ per-call output (chars / files / per-file). Invariant: a larger tier must never get a smallermaxCharsPerFilethan a smaller tier. (Regression that motivated this doc: the<5000tier's 2500 was below the<500tier's 3800, so on a god-file repo — excalidraw's 415 KBApp.tsx— one explore returned <1% of the file and forced a Read.)- Explore output must never tell the agent to "use Read" — steer to another
codegraph_exploreand "treat returned source as already Read."
Dynamic-dispatch coverage — the flow must EXIST in the graph end-to-end
Static tree-sitter extraction misses computed/indirect calls, so flows break at dynamic dispatch and the agent reads to reconstruct them. Synthesizers/resolvers bridge these so codegraph_explore connects them end-to-end (src/resolution/callback-synthesizer.ts, src/resolution/frameworks/). Channels today: callback/observer, EventEmitter, React re-render (setState→render), JSX child (render→child component), React Native native→JS events (sendEvent(withName:) / JVM emit → the addListener handler, named or inline, rn-event-channel), django ORM descriptor. The JS→native direction is a resolver (frameworks/react-native.ts: RCT_EXPORT_METHOD, RCT_EXTERN_MODULE Swift shims, TurboModules), which trusts receiver evidence — an alias bound to NativeModules.X — over the import resolver. All synthesized edges are provenance:'heuristic' with metadata.synthesizedBy + registeredAt (the wiring site), surfaced inline in codegraph_explore's Flow section and the codegraph_node trail.
Principle: partial coverage is WORSE than none. Bridging one boundary but not the next reveals a hop the agent then drills + reads to finish. Measured on excalidraw: react-render alone raised reads to 5–7; only completing the flow (adding the jsx-child hop) dropped it to 0–1. Always close the flow end-to-end and re-measure — never ship a half-bridged flow.
Validation methodology & worked examples
Required for every new language/framework: validate on small/medium/large real repos with >=3 flow prompts; deterministic probes (scripts/agent-eval/probe-*.mjs) then agent A/B (scripts/agent-eval/run-all.sh / ab-new-vs-baseline.sh). Pass bar: ~0 Read/Grep within the explore-call budget, faster than without-codegraph, no control-repo regression.
Full methodology (feedback metrics, CLI contamination guard, Sonnet/--effort high model policy, daemon pre-warm), the Excalidraw worked example, and coverage matrix live in:
docs/AGENTS.md(nested; also loaded when cwd is underdocs/)docs/design/dynamic-dispatch-coverage-playbook.mddocs/design/callback-edge-synthesis.mddocs/benchmarks/call-sequence-analysis.md/docs/benchmarks/agent-eval-feedback-metrics.md
Tests live in __tests__/ and mirror the module they cover. Notable ones beyond the obvious:
installer-targets.test.ts— parameterized contract suite across all 4 agent targets (see installer notes above).evaluation/—runner.ts+test-cases.tsexercise codegraph against synthetic projects and score the results; run vianpm run eval(builds first). Not part ofnpm test.sqlite-backend.test.ts/node-sqlite-backend.test.ts— pin thatnode:sqliteis the sole backend:getBackend()reportsnode-sqliteand the DB comes up in WAL.pr19-improvements.test.ts,frameworks-integration.test.ts— regression coverage for specific past PRs/incidents; don't rename these, the names anchor to git history.
Tests create temp dirs with fs.mkdtempSync and clean up in afterEach. They write real files and exercise real SQLite — there is no DB mocking.
Every engine test file runs in a throwaway home dir (__tests__/setup-home-sandbox.ts, a setupFiles entry): HOME/USERPROFILE (+ Windows vars), XDG_CONFIG_HOME and GIT_CONFIG_GLOBAL point into it, and CLAUDE_CONFIG_DIR/CODEX_HOME/… are cleared; spawned children inherit it. It's a backstop — still inject writes to global state (e.g. UpgradeDeps.wirePromptHook, #2275).
Windows-gated tests
Behavior that differs by platform (path resolution, drive letters, SENSITIVE_PATHS, %APPDATA% config dirs, CRLF) must be gated, not assumed. Use it.runIf(process.platform === 'win32')(...) for Windows-only assertions and it.runIf(process.platform !== 'win32')(...) for POSIX-only ones — e.g. /etc is sensitive on POSIX but resolves to C:\etc (non-existent) on Windows, so an ungated /etc assertion fails on Windows. Validate the Windows side for real (see below); don't merge a Windows-gated test you haven't seen run.
Cross-platform validation
The dev machine — and the default npm test target — is macOS, so local runs cover the macOS path. The other two platforms aren't here; when a change is platform-sensitive (file watching, sockets / named pipes, path & symlink handling, process lifecycle, inotify budget) validate them for real rather than guessing.
Linux (Docker)
When asked to test or validate on Linux, use Docker — there's no Linux box, but Docker runs on the macOS host. Build a throwaway image from the repo and run the suite inside it:
FROM node:22-bookworm;COPYthe repo with a.dockerignoreexcludingnode_modules/dist/.git/.codegraph;RUN npm ci && npm run build. Don't reuse the Macnode_modules—esbuild/rollupship platform-specific binaries.- Run with
docker run --rm --init. The--initis load-bearing for any process-lifecycle test (daemon reaping, the #277 PPID watchdog, idle-timeout): without a zombie-reaping PID 1, a SIGKILL'd/exited process lingers as a zombie andprocess.kill(pid, 0)still reports it alive, so exit-detection assertions false-fail even though the process did exit. - Linux is where the inotify watch budget actually bites: count a process's watches via
/proc/<pid>/fdinfo/*(sum^inotifylines on the fd whosereadlinkisanon_inode:inotify).
Windows (Parallels VM + SSH)
For any Windows-specific PR, bug, or implementation, validate it on the real Windows VM rather than guessing. Connection details live in the gitignored .parallels file at the repo root (VM name, guest IP, SSH user/key). prlctl exec needs Parallels Pro and is unavailable, so SSH is the bridge.
- Connect / run from the Mac host:
ssh <user>@<guest_ip> "...". For multi-line work, pipe PowerShell over stdin and refresh PATH from the registry first (sshd's session has a stale PATH after winget installs):ssh colby@10.211.55.3 "powershell -NoProfile -ExecutionPolicy Bypass -Command -" <<'PS' $env:Path = [Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [Environment]::GetEnvironmentVariable("Path","User") Set-Location C:\dev\codegraph PS - Clone fresh into a Windows-local path (
C:\dev\codegraph) andnpm cithere — never run npm against the shared Mac repo, sinceesbuild/rollupship platform-specific binaries. - Guest toolchain (winget): Node LTS, Git, and the VC++ ARM64 redistributable (required by
@rollup/rollup-win32-arm64-msvc, which vitest pulls in). - Fetch a contributor PR head straight from their fork to dodge
pull/<n>/headlag:git fetch <fork-url> <branch>thengit checkout -f FETCH_HEAD. - Windows baseline: as of #2053 the full suite passes on the Windows 11 (ARM64) VM. The only expected exception is
security.test.ts > Session marker symlink resistance > does not follow a pre-planted symlink, which needs symlink privileges (Developer Mode) — confirm any other failure againstorigin/mainbefore blaming your PR. The formermcp-initialize.test.ts/mcp-roots.test.tsEPERMteardown failures came from tests spawningserve --mcpwithout the runtime flags (its--liftoff-onlyre-exec grandchild kept the cwd / SQLite file open); spawn it withWASM_RUNTIME_FLAGSand await the child's exit before removing the temp dir. Windows checkouts may be CRLF — split source lines on/\r?\n/in tests. - Windows worker crashes: a worker thread that ends (
terminate(), its ownprocess.exit(), or the process exiting) while V8's concurrent marker is marking its heap kills the process with exit 3221225477 (0xC0000005) and leaves no error or dump. It's worst while the worker is still loading its modules. Owners must not terminate a worker before its first message (workerStarted/terminateOnceStarted, or the pool's own handshake), and a worker that exits itself callscollectBeforeExit()first — both insrc/worker-teardown.ts.--no-concurrent-markingalso stops it, but measured about a third slower indexing on the Windows VM, so it is not used.
Releases
Released to npm and mirrored as GitHub Releases. CHANGELOG.md is the source of truth; GitHub Release notes are extracted from it.
Writing changelog entries
Default: write entries under ## [Unreleased] — that's the section reserved for work landing between releases. Don't pre-create a ## [X.Y.Z] block for the next release: the Release workflow's first step is scripts/prepare-release.mjs, which automatically promotes everything under [Unreleased] into a new ## [X.Y.Z] - <YYYY-MM-DD> block at release time (or merges into a pre-existing [X.Y.Z] block if one exists — but you don't need one). Pre-staging is what caused the v0.9.5 sparse-release-notes incident: a sparse [0.9.5] block hand-added before the rest of the work landed got picked by the extractor over the much-larger [Unreleased] section above it. Don't do that.
Formatting rules for any entry (anywhere — [Unreleased] or otherwise):
- Write friendly, user-facing notes — not engineer-facing ones. Group under
### New Featuresand### Fixes(sentence-case). Surface### Breaking Changesand### Securityas their own sections only when the release has them; fold improvement-flavored changes into New Features. Omit empty sections. (This replaces the old Keep-a-ChangelogAdded/Changed/Fixed/Removed/Deprecatedgrouping: the GitHub Release page extracts each version block verbatim viascripts/extract-release-notes.mjs, and the old dense, implementation-focused entries rendered as an unreadable wall of text — so the whole CHANGELOG was rewritten to this format and every published release re-noted to match.) - One plain-language sentence per bullet: what changed and why it matters to a user. Lead with the capability, or with the symptom that's now fixed.
- Strip the internals. No internal file paths (
src/...), no internal symbol / function / class names, no benchmark numbers / percentages / node-or-edge counts. Keep: language & framework names (Go, Spring, NestJS, …), things a user types or sets (codegraph install,codegraph_explore, theCODEGRAPH_*env vars), agent / IDE names (Claude Code, Cursor, opencode, Kiro, …), and a briefThanks @userwhen a contributor is credited. - Issue / PR references in entries are by number (
(#403)etc.); the GitHub renderer auto-links them in the published release notes. - Don't add a
[X.Y.Z]: https://...link reference yourself —prepare-release.mjsappends it automatically when it promotes the version (idempotent: a re-run is a no-op if it already exists). - Every release opens with a
### Highlightsblock — the only part most people read. At most ~8 one-line bullets, in plain language for someone who doesn't read code, ordered by what a typical user notices first (new agent/IDE support and setup changes, then answer quality, then reliability), plus a one-sentence upgrade note when a re-index is needed. Write or refresh it in[Unreleased]when a release is being prepared — not per PR — and keep the detailed### New Features/### Fixesentries below it. When### Fixesgrows past ~15 entries, group them under####sub-headings (Better answers from codegraph_explore,Finding your project, live updates, and the CLI,Indexing reliability and disk usage,Language and framework accuracy) so a skimmer can find their area.
Multi-word headings like ### New Features are safe on the normal release path: prepare-release.mjs Case A moves the whole [Unreleased] body verbatim into [X.Y.Z]. (Only its rarely-used Case B merge splits sub-sections with a single-word ^### (\w+)$ regex that wouldn't match them — and Case B fires only if a [X.Y.Z] block was pre-created, which rule above already forbids.)
Release flow (the user runs these)
Releases are built and published by the GitHub Actions "Release" workflow
(.github/workflows/release.yml). It runs scripts/prepare-release.mjs to
promote [Unreleased] into [<version>] (and auto-commit + push that
CHANGELOG change back to main so on-disk truth matches the published
notes), then bundles a Node runtime per platform (scripts/build-bundle.sh)
and publishes both the GitHub Release and the npm thin-installer
(scripts/pack-npm.sh: a shim package + per-platform packages).
Publishing manually is wrong now — a plain npm publish ships the root
package (non-bundled), which breaks anyone on Node < 22.5.
Claude does NOT bump the version unless explicitly asked. The maintainer
typically does it themselves — often by editing package.json directly via
the GitHub web UI. Don't proactively commit a version bump as part of
unrelated work, and don't propose one when summarizing a PR.
When the maintainer DOES bump the version, the only edit strictly required is
to package.json — the workflow's "Sync package-lock.json" step detects a
mismatch between package.json and package-lock.json, runs
npm install --package-lock-only --ignore-scripts to rewrite the lock file's
version fields (top-level + packages.""), and auto-commits + pushes the
result back to main with [skip ci]. So a GitHub-web-UI single-file edit to
package.json is enough to kick off a clean release. (If they edit both files
locally, that's fine too — the sync step no-ops.) Bump ui/package.json to the
same version in that change: the component library is versioned with the
engine, ui-package.test.ts pins it, and the workflow does not sync it — the
1.6.1 bump left main red on exactly that.
Once package.json is at the target version on main, trigger
Actions → Release → Run workflow (on main). The workflow:
- Syncs
package-lock.jsontopackage.json's version if they've drifted; commits + pushes that change. - Runs
prepare-release.mjs <X.Y.Z>→ promotes[Unreleased]→[X.Y.Z] - <today>inCHANGELOG.md, appends the link reference, commits + pushes the move with[skip ci]. - Builds every platform bundle on one runner, generates
SHA256SUMS. - Creates the GitHub Release with notes from the freshly-promoted
[X.Y.Z]block. - Publishes the npm shim + per-platform packages. Requires the
NPM_TOKENrepo secret.
Do not run npm publish, git push, or git tag yourself — these are
publish actions on shared state. Write the files, hand the user the commands.
House rules
- The
0.7.xline is in active multi-agent rollout. Any change tosrc/installer/(especiallytargets/) needs corresponding test coverage and a CHANGELOG entry — installer regressions break every new install silently. - When changing what the MCP tools do or how agents should use them, edit
src/mcp/server-instructions.ts— it is the single source of truth for agent-facing tool guidance (issue #529). The installer no longer writes a duplicate instructions block intoCLAUDE.md/AGENTS.md/GEMINI.md/.cursor/rules/codegraph.mdc/ Kiro steering, so there's nothing to keep in sync anymore. (The repo's own checked-in.cursor/rules/codegraph.mdcis dogfooding config — update it too if you use Cursor on this repo, but it ships nowhere.) - Before adding or extending a router, a web framework, or a language's
WHENrules, readdocs/design/framework-coverage.md. It is the standing answer to "what is supported and what is left" across the three axes (route nodes → Entry points,navigatesedges → Screens, branch-guard rules → theWHENlabels), with what each remaining item needs, the traps that have already cost debugging time, and the queries to re-verify it. Update it in the same change that moves a row. - CodeGraph provides code context, not product requirements. For new features, ask the user about UX, edge cases, and acceptance criteria — the graph won't tell you.
- When the user references issues, PR comments, or external reports, anchor them to a date and version before drawing conclusions. Check the comment's
createdAtagainst:- The last released version —
grep -m1 '^## \[' CHANGELOG.mdshows the top-of-file version (older releases follow). A comment dated before the latest## [X.Y.Z] - YYYY-MM-DDis reacting to released state — work that's only onmainor on an unmerged branch doesn't apply. - The last main commit —
git log --first-parent main -1 --format='%ai %h %s'. A comment after the last release but before a fix on main may already be addressed there but unreleased. - The current branch's tip — your own unmerged work obviously can't be what the comment is reacting to. Always disambiguate "released," "merged-but-unreleased," and "in-progress" before agreeing that a user-reported problem is unfixed (or that a fix is incomplete). A user saying "your fix only covers X" about a recent PR is usually pointing at the released shortcomings — your in-flight branch may already address them but they have no way to know that.
- The last released version —
- Version-tag every image referenced in
README.md. GitHub caches README images (raw.githubusercontent.comwith a 5-minute TTL; third-party hosts sit behind the long-lived camo proxy), so updating an asset in place can keep showing the stale version. Give each README image URL a?v=Nquery tag and bumpNin the same commit whenever the asset bytes change — e.g.assets/waitlist.svg?v=2. The changed URL sidesteps every cache so the new image shows immediately instead of waiting on a TTL to expire.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

