- PR: #2
- Package:
pkg/store - Deliverables:
- SQLite schema v3: nodes, edges, file content hashes, metadata tables.
- Batched transactional write engine.
- Typed reads (
[]Node,[]Edge). - FTS5 subword tokenization and symbol search.
- PR: #2
- Package:
pkg/lang - Deliverables:
- Language-neutral intermediate representation (
FileIR,ImportRef,Ref,TypeFacts). - Extension registry and shared tree-sitter AST helpers.
- Go plugin (
pkg/lang/golang): functions, methods, receiver types, struct field types, interface method sets, imports, calls. - Python plugin (
pkg/lang/python): functions, classes, decorators, inheritance, type annotations,__init__constructor facts. - TypeScript/JavaScript plugin (
pkg/lang/typescript): functions, classes, interfaces, type aliases, class fields, imports/re-exports,newexpressions.
- Language-neutral intermediate representation (
- PR: #3
- Package:
pkg/resolver - Deliverables:
- Global symbol & module indexing across multiple files.
- Receiver type propagation (
this,self,super, local variables, selector chains liker.db). - Base class and interface hierarchy traversal.
- Tiered resolution engine with confidence levels (
exact,ambiguous,name_match,unknown). - Structural interface satisfaction discovery (method set subset matching for Go and TypeScript).
- Deterministic sorting and resolution rate tracking.
- PR: #4
- Package:
pkg/indexer - Deliverables:
- 3-pass incremental pipeline coordinator (
EnsureFresh). - SHA256 content hashing to skip unchanged files on subsequent runs.
- Atomic transactional batch commits to SQLite store.
- Automatic purging and edge cascading for deleted files.
- 3-pass incremental pipeline coordinator (
- PR: #5
- Package:
pkg/analysis - Deliverables:
- Bi-directional in-memory graph (
OutandInadjacency lists). ReverseReach: layered BFS over incoming edges for impact and caller analysis.ForwardReach: layered BFS over outgoing edges for dependency analysis.Trace: forward execution call-tree generator with cycle detection and budget caps.Neighborhood: subgraph extraction around seed symbols with radius limits.PathsBetween: path enumeration between symbols.DegreeMetrics: in/out degree calculation.SCCs: Tarjan's Strongly Connected Components algorithm for circular dependency detection.DeadCandidates: multi-source BFS from root entrypoints (main, routes, tests) for unreachable code detection.Condense: module-level quotient graph with coupling weights and Mermaid diagram generation.
- Bi-directional in-memory graph (
- PR: #6
- Branch:
feat/mcp-tools - Package:
pkg/mcp_server - Deliverables:
- Uniform JSON-RPC response envelope (
Envelope:answer,caveats,stats,graph_meta). - Stdio MCP server with per-project session cache (
store.Store+indexer.EnsureFresh+ in-memoryanalysis.Graph). - 6 Core Reasoning Tools:
search_symbols(query, kind?, limit): FTS5 matching with in-memory fallback.get_context(symbol, radius?, include_source?): Symbol-centered context pack with 1-hop callers, callees, inheritance, and optional source snippet.get_task_context(task, limit?): Context engine scoring task prompt tokens, expanding bounded neighborhoods, and returning ranked context packs.impact_of_change(symbol, change_type?, max_depth?, limit?): Reverse reachability impact set, affected test files, entrypoints, and dangling references on delete.trace(from, to?, direction?, max_depth?, limit?): Call-tree execution trace (with recursion detection) or call paths between two symbols.repo_overview(analysis?, level?, top?): Architecture map with Mermaid diagram, SCC circular dependencies, dead code candidates, and module coupling metrics.
- Comprehensive end-to-end test suite in
pkg/mcp_server/server_test.go.
- Uniform JSON-RPC response envelope (
- PR: #7
- Branch:
feat/m2-diff-parser - Package:
pkg/diff - Deliverables:
- Unified diff parser (
ParseUnifiedDiff) extracting file paths, hunks, line deltas, and condensed line ranges. - Safe Git diff runner (
RunGitDiff) supporting uncommitted, staged, and branch comparisons. - AST symbol mapper (
MapDiffToSymbols) intersecting diff line numbers withstore.Nodespans to classifymodified,added, ordeletedsymbols. - Unit test suite in
pkg/diff/diff_test.gocovering multi-hunk diffs, created/deleted files, git execution, and symbol mapping.
- Unified diff parser (
- PR: #8
- Branch:
feat/m2-test-selection - Package:
pkg/testselect - Deliverables:
- Predictive test selector (
SelectTests) runningReverseReachacrosscalls,inherits, andoverridesto locate reaching tests. - Test ranking by call graph distance (
depth), resolution confidence, and deterministic node IDs. - Repo-wide test reduction metric calculation (
ReductionPercent). - Git diff integration (
SelectTestsFromDiff) combining diff parsing, AST mapping, and test selection into one pipeline. - Comprehensive unit test suite in
pkg/testselect/testselect_test.go.
- Predictive test selector (
- PR: #9
- Branch:
feat/m2-arch-linter - Package:
pkg/archlint - Deliverables:
- Declarative architectural rule definitions (
RuleSet,ForbiddenRule,LayerRule) with JSON configuration loading. - Whole-graph architectural linter (
LintGraph) enforcing forbidden path patterns and strict layered architecture hierarchies. - Diff-scoped architectural linter (
LintDiff) verifying only edges modified or introduced in the diff. - Deterministic violation sorting by file, line number, and node IDs.
- Comprehensive unit test suite in
pkg/archlint/archlint_test.go.
- Declarative architectural rule definitions (
- PR: #10
- Branch:
feat/m2-mcp-integration - Package:
pkg/mcp_server - Deliverables:
diff_impacttool accepting raw diffs, git revisions, or uncommitted/staged working tree changes.- End-to-end Change Intelligence combining diff-to-AST mapping, predictive test selection, and architectural boundary linting.
- Comprehensive integration test in
pkg/mcp_server/server_test.go.
- PR: #11
- Branch:
feat/m3-file-watcher - Package:
pkg/watcher - Deliverables:
- Recursive directory watcher leveraging
fsnotifywith dynamic directory discovery. - Sliding-window debouncer with operation coalescing (
OpCreate,OpModify,OpDelete) and deterministic path sorting. - Extensible path filtering skipping VCS directories, virtual environments, build artifacts, and non-code files.
- Comprehensive unit test suite covering event coalescing, live file CRUD, dynamic subdirectories, and exclusion rules.
- Recursive directory watcher leveraging
- PR: #12
- Branch:
feat/m3-daemon - Package:
pkg/daemon - Deliverables:
- Long-running repository daemon coordinating between
pkg/watcher,pkg/indexer,pkg/store, andpkg/analysis. - Atomic pointer swaps under
sync.RWMutexproviding thread-safe concurrent reader access without race conditions or partial states. - Event-driven background sync responding to debounced file change batches with real-time SQLite sync.
- Non-blocking sync event subscription pipeline for downstream clients.
- Comprehensive unit and integration test suite in
pkg/daemon/daemon_test.go.
- Long-running repository daemon coordinating between
- PR: #21
- Package:
pkg/mcp_server - Deliverables:
- Idle reaper closing a project's watcher, graph and SQLite handle after
GRAPHCONTEXT_IDLE_TTL(default 30m); sessions with a tool call in flight are never evicted. - All sessions are closed when the stdio server stops on
SIGINT/SIGTERMor stdin close.
- Idle reaper closing a project's watcher, graph and SQLite handle after
- PR: #20
- Package:
pkg/mcp_server,pkg/daemon,pkg/watcher,pkg/cli - Deliverables:
- MCP sessions served from the live daemon graph via
Daemon.FreshGraph, with a watcher sequence number as the read-your-writes barrier. graphcontext watch [dir]runs the daemon standalone and logs each sync.graphcontext run <tool> key=value ...,toolsandindexexpose the MCP tools to shells and CI.
- MCP sessions served from the live daemon graph via
- PRs: #14, #16, #17, #18, #19
- Deliverables:
- FTS rows keyed to node rowids, delta writes, stat-based skip of unchanged files, cached per-file parse results.
- Re-index after one edit on a 2000-file synthetic repo: 4.8s to 0.06s. Benchmarks in
pkg/indexer/bench_test.go. - Crawler takes its extensions from the language registry and shares one ignore list with the watcher.
- PRs: #23, #24, #25, #26, #27
- Package:
pkg/lang/generic - Deliverables:
- Table-driven language engine: a language is a
Specof grammar node types. - Java, Rust, C#, C, C++, Ruby, PHP, Kotlin, Swift and Scala, for 13 languages in total.
- Resolver resolves each language family on its own index and treats a type-named receiver as a static call.
- Table-driven language engine: a language is a
- M4 — Validation & Benchmarks: Token-cost and resolver accuracy benchmarks.
- M5 — Research Artifact: Mutation-derived agent evaluation.