Skip to content

Commit 2715cd4

Browse files
authored
Merge pull request #25 from thinkgrid-labs/feat/code-graph
Feat/code graph
2 parents 851742b + 7c6a244 commit 2715cd4

14 files changed

Lines changed: 2666 additions & 1076 deletions

File tree

.diffmind/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Written by diffmind. Generated state — not worth committing.
2+
# Deliberately absent: rules/, rules.toml, config.toml, baseline.json.
3+
cache/
4+
runs/
5+
models/
6+
graph.db
7+
graph.db-wal
8+
graph.db-shm
9+
symbols.json
10+
daemon.json

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,23 @@ else's branch. Both surfaces share one engine; neither replaces the other.
2020

2121
### Added
2222

23+
- **Code graph.** A tree-sitter symbol graph for 13 languages — Rust,
24+
TypeScript, TSX, JavaScript, Python, Go, Java, C#, Ruby, PHP, C, C++ and
25+
Scala — stored in `.diffmind/graph.db` and updated incrementally
26+
by mtime. Replaces the regex symbol index, which could only see `pub`/`export`
27+
declarations and had no concept of a reference at all.
28+
Review context now includes **the callers of every changed symbol** — a
29+
changed signature is judged against the code that depends on it — plus the
30+
enclosing definition, referenced definitions, and the file's tests. Everything
31+
stays inside a byte budget, so context does not grow with the repository.
32+
Bodies are read from the working tree rather than stored, so a snippet can
33+
never disagree with the file being reviewed. Adding a language is one entry in
34+
a table; contributions welcome.
35+
36+
- **Cross-file review units.** When a symbol and code that calls it both change
37+
in one diff, they are reviewed together as a single unit instead of separately.
38+
Reviewed apart, the model judges an interaction while seeing only one side of
39+
it as background. One call replaces two.
2340
- **Reviewer's cockpit** (`diffmind --tui`). Analyses on launch. Each finding
2441
shows the actual hunk the model reviewed and the context it was given.
2542
`a` accepts (and copies a review comment via OSC 52, which works over SSH),

README.md

Lines changed: 351 additions & 387 deletions
Large diffs are not rendered by default.

apps/tui-cli/Cargo.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,18 @@ sysinfo = { workspace = true }
2626
toml = { workspace = true }
2727
# Model download checksums and the daemon's auth token.
2828
sha2 = { workspace = true }
29+
tree-sitter = "0.26"
30+
tree-sitter-rust = "0.24"
31+
tree-sitter-python = "0.25"
32+
tree-sitter-javascript = "0.25"
33+
tree-sitter-typescript = "0.23"
34+
rusqlite = { version = "0.40", features = ["bundled"] }
35+
streaming-iterator = "0.1.9"
36+
tree-sitter-go = "0.25"
37+
tree-sitter-java = "0.23"
38+
tree-sitter-ruby = "0.23"
39+
tree-sitter-php = "0.24"
40+
tree-sitter-c-sharp = "0.23"
41+
tree-sitter-scala = "0.26"
42+
tree-sitter-c = "0.24"
43+
tree-sitter-cpp = "0.23"

0 commit comments

Comments
 (0)