feat: rich AST extraction with classes, methods, calls, and raises

- Upgrade tree-sitter to 0.22.4 with compatible grammar versions
- Add Python support via tree-sitter-python@0.23.6
- Add Go support via tree-sitter-go@0.23.4
- Extract class hierarchies with method signatures (params, returns)
- Extract call graphs including external library calls
- Extract exception raises (ValueError, Error, etc)
- Extract top-level functions with full signatures
- Encode rich AST data into compact markdown format:
  class:Name, method:name(params)→return, call:..., raise:...
- Deduplicate nested call chains (db.query vs db.query().where())
- Filter out simple export names when rich func/class entries exist
- All 55 tests passing
This commit is contained in:
2026-06-10 15:58:52 +02:00
parent ed9f843d65
commit dbde651a2a
6 changed files with 589 additions and 55 deletions
+5 -1
View File
@@ -26,7 +26,11 @@ describe("llm-cache", () => {
});
it("stores and retrieves cached results", () => {
setCached("abc123", "PURPOSE: test\nDEPS: none\nCONCEPTS: none", TEST_CACHE_DIR);
setCached(
"abc123",
"PURPOSE: test\nDEPS: none\nCONCEPTS: none",
TEST_CACHE_DIR,
);
const result = getCached("abc123", TEST_CACHE_DIR);
expect(result).toBe("PURPOSE: test\nDEPS: none\nCONCEPTS: none");
});