Add evaluation framework and fix call graph extraction

- Add evaluation test suite with TypeScript and Python fixtures
- Fix MCP server to defer CodeGraph init until rootUri received
- Fix call edge extraction by calling resolveReferences() after indexAll/sync
- Fix glob matching for root-level files (e.g., **/*.py now matches auth.py)
- Fix duplicate node extraction for methods inside classes
- Update context tests to use buildContext for semantic search + graph traversal
- Export unused formatter functions to fix build

Evaluation results:
- TypeScript: 96% precision, 79% recall, 85% F1
- Python: 99% precision, 80% recall, 85% F1

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Colby McHenry
2026-01-18 18:48:22 -06:00
co-authored by Claude Opus 4.5
parent e306114607
commit 6b672f9152
30 changed files with 2600 additions and 129 deletions
+6 -1
View File
@@ -1,12 +1,15 @@
{
"name": "@colbymchenry/codegraph",
"version": "0.1.0",
"version": "0.1.1",
"description": "A local-first code intelligence system that builds a semantic knowledge graph from any codebase",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"bin": {
"codegraph": "./dist/bin/codegraph.js"
},
"files": [
"dist"
],
"scripts": {
"build": "tsc && npm run copy-assets",
"copy-assets": "cp -r src/extraction/queries dist/extraction/ && cp src/db/schema.sql dist/db/",
@@ -14,6 +17,8 @@
"cli": "npm run build && node dist/bin/codegraph.js",
"test": "vitest run",
"test:watch": "vitest",
"test:eval": "vitest run __tests__/evaluation/",
"eval": "npm run build && npx tsx __tests__/evaluation/runner.ts",
"clean": "rm -rf dist"
},
"keywords": [