hero

Introducing Entelligence Deep Review Agent

Taradepan R

May 13, 2025

7 min read

Software evolves quickly—but ensuring every change fits seamlessly within a complex codebase remains a persistent challenge. Today, we're proud to launch Entelligence Deep Review Agent, our advanced review bot that elevates code quality by scanning entire repositories for comprehensive context on new changes. It thoroughly analyzes dependencies and interactions within the codebase to ensure seamless integration of updates. By cross-checking new code against existing implementations, it prevents conflicts or regressions. We're thrilled to have enabled this for Python and JS/TS and plan to expand support to additional languages soon.

Why Repository Context Is Essential in AI Code Review?

Code doesn't live in isolation. Every function, class, and module depend on other parts of the system to work correctly. Without understanding the repository as a whole, AI code review tools can't evaluate how a change might ripple through the codebase. For example, renaming a function might seem harmless in one file—but could break critical functionality elsewhere if the dependency graph isn't considered.

So, what Repository context does? It allows AI to:

  • Trace dependencies across files and modules
  • Identify hidden coupling or unintended side effects
  • Evaluate whether changes align with existing patterns and architecture
  • Surface issues that only emerge when looking at the system holistically

In short, AI code reviews need the same big-picture awareness that human reviewers rely on to maintain software quality.

Why the Obvious Solution Doesn't Work?

Traditional code reviews and LLM-based tools often analyze only one file at a time. This single-file approach falls short because real-world projects have intertwined logic across many files. Benchmarks confirm that models struggle without cross-file context – they "see clear improvements when [relevant] context" from other files is included.

A natural response to the context problem is to simply feed the entire repository into a large language model (LLM) and let it reason about everything at once. After all, more data should mean better insights, right? Unfortunately, it's not that simple. Large codebases quickly exceed an LLM's context window (token limit), causing critical information to be omitted. Even using retrieval-augmented techniques (RAG) has pitfalls: as one observer notes, the embedding model "doesn't know what you haven't provided". In other words, it might retrieve irrelevant snippets (e.g. random CSS classes) while missing the specific code you need.

Putting an entire repo into an LLM's context runs into fundamental limitations:

  • Context Window Limits: Even the largest LLMs have finite context windows. Modern codebases often exceed these limits by orders of magnitude, forcing compromises in what gets included.
  • Diluted Attention: LLMs aren't optimized for focusing on a small, relevant subset of data within massive inputs. Feeding everything in can make it harder—not easier—for the model to identify which parts of the repo matter for a specific pull request.
  • Local Change Nature of PRs: Pull requests are inherently local—they modify a small set of files within a much larger codebase. What matters is not all code everywhere, but which parts of the repo are affected by this change. Dumping the whole repo misses this dynamic relationship.

In other words, more data isn't automatically better. Effective AI code review requires selective, structured, and relevant context—not just raw scale.

Here Deep Review Agent comes to rescue. But how? Let's dig deep.

How Deep Review Agent can Amp Up the Quality of Your Entire Repositories?

Deep Review Agent overcomes these challenges by fully leveraging repository-wide context. With access to the entire project, the agent's LLM can "identify hidden patterns within large codebases" and extract semantic structures that a file-by-file review would miss. It helps enforce consistency (e.g. API usage, configurations, naming conventions) across modules.

Experiments show that giving a model the full cross-file context drastically improves its accuracy. In a benchmark suite, code generation models found tasks "extremely challenging" without cross-file context, but performance jumped when that context was added. Similarly, AI code tools that "understand not just isolated code snippets but entire codebases" yield suggestions that are far more relevant and aligned with the project.

In practice, this means Deep Review Agent can spot subtle bugs – like a mismatched function signature or a misnamed variable in another file – that static linters or single-file reviews would overlook.

Importantly, Deep Review Agent's context-aware insights directly improve code quality. By understanding how pieces fit together, the agent avoids suggestions that might break other parts of the system. Industry reports note that LLM-powered review tools detect deeper logic flaws (even when syntax is correct) and help prevent "subtle bugs and inefficiencies that static analyzers might overlook," leading to more robust software.

How We Solve the Problem: LSPs to the Rescue

The Language Server Protocol (LSP) is a communication protocol used to connect code editors or IDEs (like VS Code, Sublime Text) with language servers that provide programming language features such as autocompletion, go-to-definition, find references, error checking, and code formatting. But beyond powering developer tools, LSPs offer a powerful foundation for solving the AI code review context problem.

Quite overwhelming? Let's understand this in a better way:

Deep Review Agent is built on two pillars: language-server analysis and LLM reasoning. First, it spins up a Language Server Protocol (LSP) instance for your project. Language servers exist for virtually every major programming language, so the agent can parse Python, JavaScript, TypeScript, and more without custom parsers. LSP gives the agent full semantic knowledge: it can look up definitions, type information, call hierarchies, and cross-file symbol references just like an IDE. This static analysis forms a rich "knowledge graph" of the repo.

We leverage LSPs to search the entire codebase for every function definition, class, or symbol affected by a pull request. Instead of blindly including the entire repo, we pull in only the relevant context for the code being changed: this includes the function or method definitions, their implementations, related references, and any dependencies that might be impacted. By reconstructing this targeted, semantic map of the affected code, we enable the AI to reason about how the new changes fit within the broader system—without overwhelming it with unrelated information.

This approach ensures that the review process checks whether the changes might break existing functionality, violate contracts, or introduce subtle bugs in related areas, while keeping the analysis focused and actionable.

In short, LSPs give us a smart way to extract just the right amount of context, aligning AI code reviews with the way human developers think about and navigate code. By orchestrating LSP queries and LLM prompts, Deep Review Agent mimics having a multi-file-aware expert looking at your code. It doesn't just run a generic static analyzer or rely solely on keyword search. Instead, it "acts as a team of specialized engineers" by digging into various aspects of the code (like performance, security, style) with the full project context. The outcome is a deep, semantic code review that captures project-wide issues without overwhelming the model with irrelevant code.

How Deep Review Agent Works – 4 Steps

  1. Scan and Parse: Deep Review Agent points to your project. It launches the language server(s) for the codebase, which immediately parses all files. The agent builds an index of symbols, import graphs, function signatures, class hierarchies, etc.
  2. Extract Relevant Context: For each code change or query, the agent identifies which parts of the project matter. It uses LSP to follow references – e.g. finding where a function is defined or how a class is used elsewhere. The agent gathers comments, docstrings, types, and even configuration values from across the repo.
  3. Ask the AI: The agent formulates one or more prompts to the LLM, including the extracted context. For example, it might say "Given this function signature and these unit tests, is there a bug in the caller?" or "Propose an implementation that uses our existing helper functions." The LLM's output is constrained by the precise context, so it doesn't hallucinate disconnected code.
  4. Deliver Feedback: Deep Review Agent translates the AI's answers into developer-friendly output. It might annotate lines in the editor, generate a code review comment, or even produce a fix suggestion/patch. Each recommendation includes explanation so developers understand the reasoning and can trust the change.

Key Features of the Deep Review Agent

FeatureWhat It DoesWhy It Matters
Whole-Repo Context AnalysisParses and ingests all files via LSP and static analysis.Catches cross-file bugs and patterns. Context-aware feedback is far more accurate.
LSP-Powered Code IntelligenceUses each language's LSP server to resolve symbols, types, references, etc.Leverages proven compiler-level knowledge. No need to reinvent parsers; it "supports every language" via LSP.
AI-Powered Code ReviewRuns an LLM on relevant code snippets to suggest improvements.Finds logic issues and suggests fixes beyond simple lint rules. LLMs "understand the meaning behind code" to spot hidden flaws.
Multi-Language SupportWorks with JavaScript, TypeScript, Python (and more coming).Covers the mix of languages in modern projects. LSP ensures it can handle new languages without manual work.
Integrations & WorkflowsIntegrates with IDEs, CI/CD, and pull-request workflows.Fits into developers' normal process for seamless adoption. (E.g., provides in-IDE hints and PR comments.)
Security & Privacy FocusOptionally runs on-prem or with user-controlled LLM; does not train on your code.Keeps proprietary code safe. Follows SOC 2 compliance principles and doesn't expose your code for model training.

Language Support for the Deep Review Agent

The Deep Review Agent works with:

  • Python
  • JavaScript
  • TypeScript

We're committed to broad language support. In upcoming releases, Deep Review Agent will extend beyond JavaScript/TypeScript/Python to cover Java, C#, Go, Ruby, PHP, Kotlin, Swift, Rust, and more. Each new language support is enabled by plugging into its LSP. We prioritize additions based on developer demand and industry trends, ensuring your polyglot codebases are fully supported.

Real-World Examples of Deep Review Agent

Here's the structure that Deep Review Agent follows for Code Review:

Example 1: Wrong metric labeling in JavaScript

Deep Review Example 1
Language: JavaScriptBug Type: Wrong metric labeling

In this pull request, the code prints out campaign metrics:

console.log(`— Opens:   $${pctOpened.toFixed(1)}% of sent`);
console.log(`— Clicks: $${pctClicked.toFixed(1)}% of sent`);

Meanwhile, deeper in the codebase, the clickRate metric is calculated as:

const clickRate = opened > 0 ? clicked / opened : 0;

At first glance, everything seems fine—the numbers display without syntax errors or runtime failures. But a critical mismatch is hiding beneath the surface. The click rate is calculated as a percentage of opened emails, yet the UI labels it as a percentage of sent emails. This subtle misalignment creates misleading insights for users who assume the click rate is out of total emails sent.

A code review tool looking only at the current file would miss this entirely. It takes repository context—tracing where clickRate is calculated in src/processMetrics.js and where it's displayed in src/consumer.js—to spot the inconsistency. By pulling in this cross-file relationship, a context-aware AI agent like Entelligence's Deep Review can flag the discrepancy and even suggest a correction:

-console.log(`— Clicks:  $${pctClicked.toFixed(1)}% of sent`);
+console.log(`— Clicks: $${pctClicked.toFixed(1)}% of opened`);

Why is this a tricky bug?

  • There's no syntax error.
  • There's no runtime crash.
  • Even a file-level code review might miss it — because:
    • The calculation happens in one file (src/processMetrics.js).
    • The display/labeling happens in another file (src/consumer.js).

This is a cross-file bug — you need repository context to catch it and Deep Review Agent works well with it.

How a Deep Review Agent helps?

  • Trace relationships across files.
  • Detect that the metric label doesn't match its calculation.
  • Suggest the right fix.
Deep Review Example 1 Solution

This example shows how bugs aren't always local—they often emerge from the interaction between different parts of a system. Without an understanding of these relationships, traditional AI code review tools can't catch these issues. Repository context bridges that gap.

Example 2: Discount unit mismatch in TypeScript

Deep Review Example 2
Language: TypeScriptBug Type: Discount unit mismatch

In this pull request, the pricing logic for a product looks correct at first glance:

const discount = product.discount ?? defaultDiscount;
const finalPrice = getDiscountedPrice(product.price, discount);

The code fetches a discount value—either from the product or a default—and passes it to getDiscountedPrice. But hidden beneath the surface is a subtle, critical bug. The getDiscountedPrice function, defined in src/utils/priceUtils.ts, expects the discount as a percentage (a number between 0 and 100). Meanwhile, product.discount stores the discount as a decimal fraction (a number between 0 and 1). This mismatch leads to drastically incorrect price calculations: a 20% discount (stored as 0.2) is interpreted as a 0.2% discount instead of 20%.

Without tracing the function signature across files, a local code review wouldn't catch this discrepancy. But by connecting priceCalculator.ts and priceUtils.ts, a repository-aware AI like Entelligence identifies the unit mismatch and flags it as a correctness issue—something that static analysis or syntax checks wouldn't reveal.

How a Deep Review Agent Helps?

  • Trace data contracts across modules: The agent doesn't just look at the local file where the discount is used. It follows the flow from priceCalculator.ts to priceUtils.ts and inspects the expected input type for getDiscountedPrice.
  • Detect unit mismatches: It recognizes that product.discount is stored as a decimal (0–1), but the function expects a percentage (0–100). This is a subtle bug that won't trigger a syntax or type error, but it produces dramatically incorrect pricing in production.
  • Suggest the right fix: Instead of leaving the developer to dig through documentation or code comments, the Deep Review Agent flags the unit mismatch and suggests a concrete correction: multiplying the decimal by 100 before passing it to the function.

The Deep Review Agent bridges that gap, performing cross-file, cross-context reasoning to catch integration bugs before they slip through code review or CI pipelines.

Deep Review Example 2 Solution

This example underscores how understanding data contracts between modules is critical for accurate reviews—and why AI needs repository context to surface these deeper integration bugs.

Example 3: Incorrect dictionary key access in Python

Deep Review Example 3
Language: PythonBug Type: Incorrect dictionary key access

In this pull request, the code attempts to extract sentiment analysis results:

result = classify_sentiment(text_input)
sentiment = result["sentiment"]
confidence = result["confidence"]

At first glance, the code appears straightforward. But under the hood, the classify_sentiment function—defined in app/classify_sentiment.py—returns a nested dictionary structured like this:

return {
"sentiment_analysis": sentiment_data,
"raw_response": { ... }
}

The sentiment data actually lives under result["sentiment_analysis"]. Accessing result["sentiment"] directly triggers a key error or retrieves no data, depending on how Python handles the missing key. A shallow code review tool scanning only this file won't flag the issue because it lacks awareness of how classify_sentiment structures its output.

How a Deep Review Agent Helps?

  • Trace cross-file relationships: It tracks how the classify_sentiment() function (defined in a separate module) shapes the output data structure, going beyond just the local file.
  • Detect mismatches between data producers and consumers: It recognizes that the consuming code (in the pull request) tries to access keys (result["sentiment"]) that don't exist, based on the actual nested return structure.
  • Suggest the right fix: By pulling in the function definition from elsewhere in the repo, a context-aware AI like Entelligence can detect the mismatch and propose the correct access pattern:
-sentiment = result["sentiment"]
-confidence = result["confidence"]
+sentiment = result["sentiment_analysis"]["sentiment"]
+confidence = result["sentiment_analysis"]["confidence"]
Deep Review Example 3 Solution

This example shows how repository context enables AI to reason across function boundaries, surfacing bugs rooted in cross-file data structures that a local analysis would miss. Without this broader view, such errors can easily slip into production.

Example 4: Inverted indexing bug in Python

Deep Review Example 4
Language: PythonBug Type: Inverted indexing bug

In this pull request, the code attempts to extract the top and bottom user scores from a merged list:

# Identify top 10 and bottom 5
top_n = merged[:10]
bottom_n = merged[-5:] if len(merged) >= 5 else merged[-len(merged):]

At first glance, the slicing seems reasonable. But a deeper look at the codebase reveals a critical misunderstanding. The merge_sorted_lists function—defined in src/utils/merge.py—explicitly merges two ascending-sorted lists into a single ascending-sorted list. In other words, the highest scores are at the end of the list, not the beginning. By slicing merged[:10] for the top scores, the code mistakenly selects the lowest scores instead of the highest, and vice versa for the bottom scores.

This subtle indexing bug arises from an incorrect assumption about the data ordering. A review confined to this file wouldn't spot the issue, because the bug stems from how another module—merge_sorted_lists—defines its output contract.

How a Deep Review Agent helps?

  • Trace data flow across modules: It doesn't just look at the local slicing code; it pulls in the definition of merge_sorted_lists from another file to understand how the merged data is ordered.
  • Detect mismatches between assumptions and reality: While the local file assumes that the highest scores are at the start of the list, the agent knows (by analyzing the upstream function) that the highest scores are actually at the end — catching an otherwise invisible bug.
  • Propose the precise fix: Instead of a vague alert, the agent suggests the exact correction. By linking function definitions and their usage across files, a repository-aware AI like Entelligence can catch the inversion and suggest a correction.
- top_n = merged[:10]
- bottom_n = merged[-5:] if len(merged) >= 5 else merged[-len(merged):]
+ top_n = merged[-10:] if len(merged) >= 10 else merged
+ bottom_n = merged[:5]
Deep Review Example 4 Solution

This example highlights how code correctness often depends not just on local logic, but on shared assumptions and data flows across modules—and why deep repository context is essential for effective AI code review.

Business Benefits from Deep Review Agent

  • Fewer Production Bugs: By detecting subtle logic errors before merge, the Deep Review Agent helps prevent costly post-release fixes. (LLMs "identify hidden patterns" and catch issues static tools miss.)
  • Faster Review Cycles: Automated, context-aware feedback slashes time-to-first-review. AI-assistance means "no PR falls through the cracks" – reviews become quicker and more consistent.
  • Higher Developer Confidence: Teams can rely on thorough, consistent checks across the repo. Automating routine checks reduces cognitive load and burnout, letting developers focus on high-value work and trust that common mistakes won't slip by.
  • Improved Productivity: With repetitive review tasks offloaded, engineers get faster merges and can iterate on features more quickly. Streamlined reviews and clearer feedback loops accelerate development velocity.
  • Enhanced Collaboration: Since feedback includes explanations grounded in the codebase context, both junior and senior devs gain a shared understanding. Review comments are concrete (e.g. "Undefined variable; did you mean API_URL?"), which improves team communication and knowledge sharing.

End Note

Entelligence Deep Review Agent brings true repository-wide intelligence to code review. By understanding your entire codebase, it finds errors and offers fixes that no single-file tool can catch. With Deep Review Agent, your team spends less time on nitty-gritty reviews and more time innovating, all while shipping more reliable code.

hero

Streamline your Engineering Team

Get started with a Free Trial or Book A Demo with the founder
footer
logo

Building artificial
engineering intelligence.

Product

Home

Log In

Sign Up

Helpful Links

OSS Explore

PR Arena

IDE

Resources

Blog

Changelog

Startups

Contact Us

Careers