Most review tools dump a PR diff into a model and hope it finds bugs. The model sees added/removed lines, hunk headers, context lines. It has no idea that the function it's looking at is called by x other functions across y files, or that a type change here breaks an interface three directories away.
The triage layer parses source code into ASTs using tree-sitters, extracts semantically meaningful entities (functions, classes, methods, structs), and builds a cross-file dependency graph. It ranks every changed entity by transitive blast radius. Cuts the review surface by 80-90%, and increases the attention score on the bug significantly. Now I am sure it can be out of distribution few times but for fast code reviews this tradeoff is worth making.
Once you've narrowed the problem to "here are the n riskiest entities in this PR," you don't need a frontier model. You need a model that just knows your code. A 7B fine-tuned on your codebase knows your patterns, your conventions, your common bugs. Structural triage handles the global reasoning that results in your model handling the judgment call really well.
Commands:
- inspect diff - entity-level diff with risk scoring and blast radius
- inspect predict - show which unchanged entities are at risk of breaking
- inspect review - structural triage + LLM review
- inspect pr - review a GitHub PR
21 language parsers. Written in Rust. Open source.
Github: https://github.com/Ataraxy-Labs/inspect