Skip to content

feat(core,mcp): persistent relational code graph#1

Merged
rutvikchandla3 merged 13 commits into
mainfrom
feat/relational-code-graph
Jun 20, 2026
Merged

feat(core,mcp): persistent relational code graph#1
rutvikchandla3 merged 13 commits into
mainfrom
feat/relational-code-graph

Conversation

@rutvikchandla3

Copy link
Copy Markdown
Owner

Summary

  • add persistent relational code graph indexing for symbols, references, imports, implementations, and impact analysis
  • expose graph/search/navigation functionality through MCP with output budgeting
  • expand core, MCP, and eval tests/fixtures for graph behavior

Notes

  • pins Node 22 and ensures native SQLite install hooks run

RutvikChandla and others added 12 commits June 20, 2026 01:21
- .nvmrc 20 -> 22 so better-sqlite3 uses published macOS arm64 prebuilds
- add .npmrc (ignore-scripts=false) so the native SQLite deps run install hooks
- smoke-pack-install: force ignore-scripts=false for the packed-install check
- README: document the Node 22 + .npmrc requirement

Pre-existing local environment setup; committed alongside the graph work
because the build/test gate depends on Node 22.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…s/impl/impact)

Adds a persistent, incrementally-maintained `edges` graph so codesift can
answer relational queries grep structurally cannot — who calls/references X,
what imports a file, who implements an interface, and bounded impact
("what breaks if I change X") — all index-time, zero-egress, and honestly
labeled import-resolved vs name-only.

Phases (per GRAPH_PLAN.md):
- 0: edges table + indexes, per-file plumbing in applySyncChanges,
  SCHEMA_VERSION 7->8, Edge/EdgeKind/EdgeResolution types.
- 1: index-time edge extraction for TS/JS + Python riding the cached
  chunking AST; caller attribution by enclosing range; with_usages now
  reads the index instead of re-parsing files at query time.
- 2: core findCallers/findReferences/findImporters + MCP tools
  find_callers / find_refs / find_importers.
- 3: TS implements/extends heritage edges; name-only call edges for
  Go/Java/Ruby/Rust; findImplementers + who_implements.
- 4: opt-in find_symbol relations bundle (with_callers) and bounded
  impact(name, depth) BFS (hard node/depth caps + cycle guard) + impact tool.

Reviewed and fixed: default-export resolution, name-only leakage into
disambiguated queries, shadow/member-access mislabeling, case-insensitive
edge matching, and stale-inbound-edge cleanup on file removal.

Honesty: never type-resolved; name-only surfaced as approx. Additive — no
ranking/fusion/search behavior changed. Gate green on Node 22
(pnpm build && typecheck && test: 11 files, 177 tests).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rutvikchandla3
rutvikchandla3 force-pushed the feat/relational-code-graph branch from 82fbe1d to f2e679c Compare June 20, 2026 09:08
@rutvikchandla3
rutvikchandla3 force-pushed the feat/relational-code-graph branch from f2e679c to 16cc515 Compare June 20, 2026 09:11
@rutvikchandla3
rutvikchandla3 merged commit 15cc60f into main Jun 20, 2026
8 checks passed
@rutvikchandla3
rutvikchandla3 deleted the feat/relational-code-graph branch June 20, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants