Prism AI PR Reviewer
Autonomous Tree-sitter AST semantic code analyzer & pull request reviewer engineered for CI/CD.


Traditional AI PR review bots paste raw git diffs into generic LLM prompts, leading to hallucinatory comments, noisy formatting suggestions, and exorbitant token bills. Prism parses your codebase into concrete Tree-sitter syntax trees to isolate exact semantic change scopes before LLM evaluation.
Architecture
Prism runs as a high-throughput Rust binary integrated directly into GitHub Actions or GitLab CI. It computes AST-level deltas between git commit SHAs, identifies mutated control-flow paths, validates type signatures, and constructs a dense context payload containing only relevant caller/callee graphs. This payload is scored against security heuristics and evaluated via high-precision LLM reasoning.
Software teams spend up to 30% of engineering bandwidth reviewing mechanical bugs, race conditions, memory leaks, and broken invariants in PRs. Existing linters miss architectural context, while naive LLM bots post spam comments that developers quickly mute.
Key Decisions
Built native Tree-sitter bindings in Rust for Rust, Go, Python, TypeScript, and Kotlin.
Impact: Reduced token usage by 68% and eliminated formatting-related hallucinated review comments.
Pre-screened changes for known CVE patterns and concurrency hazards before LLM invocation.
Impact: Zero API cost spent on files that statically pass invariant checks.
Generated direct unified diff suggestions that developers can accept with a single click in GitHub PRs.
Impact: Decreased PR review cycle turnaround times by 42% across adopting engineering teams.
Benchmarks
| Metric | Prism AI PR Reviewer | Standard / Competitor |
|---|---|---|
| Average Review Latency | 720 ms | 4,800 ms (Raw Diff LLM Bot) |
| LLM Tokens per 500 LOC PR | 1,450 | 6,800 (Full File Context Wrapper) |
| Signal-to-Noise Ratio | 96.4% | 61.2% (Standard AI Bot) |
Installation & Setup
npm install -g @akilaisadev/prism
# Or add directly as GitHub Action:
uses: akilaisadev/prism-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}