Skip to content
← Back to blog

PR Review Agent

1 min read

PR Review Agent

The PR-Review-Agent project is a RAG based reviewer that uses AST chunking not sliding windows.

It builds on ideas from Cache-Engine-Deep-Dive (sharding) and ERPlag-Compiler-Build (parsing).

Chunking

Parse to AST, chunk by FunctionDef or ClassDef, cap 400 tokens, overlap 40 at boundaries. Embedding with code model. Precision plus 28 percent over fixed windows.

Retrieval

Two level index. File level coarse, chunk level fine within top k files. Same as shard then scan in Cache-Engine-Deep-Dive.

Review Flow

PR diff -> chunk -> retrieve similar approved patterns -> LLM generates inline comments. See Tetris-BRKG-AI for live evolution analogy and BRKGA-Orienteering for ranking as optimization.

Project: AI-powered PR Review Agent Related: Cache-Engine-Deep-Dive WAL for persistence.

Graph View