Commands, change classification, risk scoring, and supported languages.
All commands support --format json and --format markdown for machine-readable output.
--context Show dependency details for each entity--min-risk <level> Filter by minimum risk (low, medium, high, critical)--format <fmt> terminal (default), json, or markdownBased on ConGra (arXiv:2409.14121). Every change is classified along three dimensions: text, syntax, and functional.
| Classification | What changed | Review needed? |
|---|---|---|
| Text | Comments, whitespace, docs only | usually skip |
| Syntax | Signatures, types, declarations (no logic) | check API surface |
| Functional | Logic or behavior | careful review |
| Mixed | Combinations of the above | careful review |
Graph-centric. Dependents and blast radius are the primary discriminators. Entities at the center of the dependency graph score highest. Cosmetic-only changes get an 80% discount.
Risk levels: Critical (>= 0.7) · High (>= 0.5) · Medium (>= 0.3) · Low (< 0.3)
Entity extraction powered by sem-core and tree-sitter. All parsers compiled into the binary.
| Language | Extensions | Entities |
|---|---|---|
| Rust | .rs | functions, structs, enums, impls, traits |
| TypeScript | .ts .tsx | functions, classes, interfaces, types, enums |
| JavaScript | .js .jsx .mjs .cjs | functions, classes, variables |
| Python | .py | functions, classes, decorators |
| Go | .go | functions, methods, types |
| Java | .java | classes, methods, interfaces, enums, fields |
| C | .c .h | functions, structs, enums, unions, typedefs |
| C++ | .cpp .cc .cxx .hpp | functions, classes, structs, enums, namespaces |
| Ruby | .rb | methods, classes, modules |
| C# | .cs | methods, classes, interfaces, enums, structs |
| PHP | .php | functions, classes, methods, interfaces, traits, enums |
| Fortran | .f90 .f95 .f03 .f08 | functions, subroutines, modules, programs |
REST API for integrating inspect into CI pipelines, bots, and custom workflows. Submit a PR, get back findings. Uses the deep_v2 strategy: two-temperature LLM review with diff-aware validation.
$ curl -X POST https://inspect-review.vercel.app/api/review \ -H "Content-Type: application/json" \ -d '{"repo":"owner/repo","pr_number":123}' // Response { "pr": { "number": 123, "title": "Fix auth bypass", ... }, "findings": [ { "issue": "Missing origin validation in CORS handler", "evidence": "if (origin.indexOf('example.com') !== -1)", "severity": "critical", "file": "src/middleware/cors.ts" } ], "summary": { "total_findings": 3, "files_analyzed": 12 }, "timing": { "triage_ms": 1200, "review_ms": 18000, "total_ms": 19200 } }
$ curl -X POST https://inspect-review.vercel.app/api/triage \ -H "Content-Type: application/json" \ -d '{"repo":"owner/repo","pr_number":123}' // Response { "pr": { "number": 123, "title": "Fix auth bypass" }, "files_analyzed": 8, "files": [ { "file": "src/auth.ts", "additions": 45, "deletions": 12 } ], "timing_ms": 1400 }
$ curl https://inspect-review.vercel.app/api/health {"status": "ok"}
inspect ships an MCP server so any coding agent (Claude Code, Cursor, etc.) can use entity-level review as a tool. Build with cargo build -p inspect-mcp.
| Tool | Purpose |
|---|---|
inspect_triage | Primary entry point. Full analysis sorted by risk with verdict. |
inspect_entity | Drill into one entity: before/after content, dependents, dependencies. |
inspect_group | Get all entities in a logical change group. |
inspect_file | Scope review to a single file. |
inspect_stats | Lightweight summary: stats, verdict, timing. No entity details. |
inspect_risk_map | File-level risk heatmap with per-file aggregate scores. |
Returned by inspect_triage and inspect_stats. A quick signal for agents and humans.
| Verdict | Meaning |
|---|---|
| likely_approvable | All changes are cosmetic (comments, whitespace, formatting) |
| standard_review | Normal changes, no high-risk entities |
| requires_review | High-risk entities present |
| requires_careful_review | Critical-risk entities present |
Rust toolchain required. Single binary, no runtime dependencies.
$ cargo install --git https://github.com/Ataraxy-Labs/inspect inspect-cli$ git clone https://github.com/Ataraxy-Labs/inspect $ cd inspect && cargo build --release $ ./target/release/inspect diff HEAD~1