Who Reviews AI-Written Code? Gitar Automatically Catches Hidden Bugs

Sonar launches Gitar, using context-aware automated verification to close the review gap for AI-generated code.
AI coding agents have dramatically increased code output speed, overwhelming traditional human review and driving up production incident rates. The Sonar team's Gitar is positioned as a code change verification system with high signal-to-noise ratio, automated CI failure diagnosis and repair, and project rules that inject business context. Three hands-on demos cover cross-file logic vulnerabilities, business rule violations, and automated CI failure repair and merging, demonstrating Gitar's ability to understand change intent. Advanced features include cross-repository and cross-PR analysis to catch risks that are harmless individually but break systems when combined. Gitar doesn't replace static analysis and human judgment; it adds a layer of context-based automated verification between them.
Who Reviews AI-Written Code? Gitar Automatically Catches Hidden Bugs
AI coding agents are writing code at a speed and volume that's exceeding the limits of human review. Gitar, showcased by the Sonar team at an AI Engineer workshop, attempts to answer an increasingly urgent question: when agents generate more code than anyone can review, who ensures it's actually correct?
When Code Volume Exceeds Human Review Capacity
Sonar's Taylor Luttrell opened with a scenario: AI coding agents are highly efficient in speed and volume, but team sizes are fixed while the number of changes explodes. The result is longer review queues, backlogged merge requests, and code review shifting from a collaborative step to a chore no one wants to take on.
More seriously, production incident rates are rising. Taylor noted that coding agents don't always adhere to the project architecture and coding standards that teams spend significant time designing—they lack that context. To keep up with the pace of changes introduced by agents, verification must be faster and better than human review.
This is exactly Gitar's positioning: a code change verification system, not just another code review tool.

Gitar's Differentiation: Signal-to-Noise Ratio and CI Diagnosis
According to Taylor, Gitar's core differentiation lies in several areas. First is a high signal-to-noise ratio—it deliberately minimizes false positives, because every false positive consumes tokens and represents a fix attempt that could introduce unintended changes.
Second is CI failure diagnosis. Gitar can distinguish genuine build failures from noise and autonomously fix problems. It iterates continuously until all changes pass CI, ensuring that the code the agent intends to deliver is truly shippable.
Third is transparency. Gitar provides a dedicated analytics dashboard that gives teams visibility into the review process and CI status, enabling continuous improvement in delivery speed and quality.
Taylor emphasized that Gitar is complementary to SonarQube: static analysis tools like SonarQube can trace security issues such as SQL injection across multiple files and functions, but they cannot infer intent—they cannot determine whether business logic holds. Gitar fills exactly this gap: understanding the context and intent behind each code change.
Static Analysis and Intent-Based Verification
Static analysis (such as SonarQube) detects potential defects without executing the program by parsing source code syntax and semantics—for example, null pointer dereferences, SQL injection patterns, or resource leaks. Its strength is determinism and the ability to trace data flow across files, but its limitation is that it can only determine whether code "violates known patterns"—it cannot answer "does this change match business intent?" Gitar builds on this by introducing intent understanding: it reads PR descriptions, linked tickets, project rules, and other context to infer the purpose of a change, then checks whether the implementation matches that purpose. The two are complementary—static analysis guards the general security baseline, while intent verification covers business logic and team conventions.
Hands-On 1: Out-of-the-Box Review Catches Cross-File Logic Vulnerability
Sonar's Killian Carlson demonstrated three scenarios using a hypothetical ticketing API project called Box Office. The first PR added ticket transfer functionality to the system; tests passed, CI was all green.
But Gitar found an edge case in orders.py: after a buyer transfers a ticket to a friend, they can still cancel the original order and get a refund, causing the friend's ticket to be invalidated. Killian noted that the project even had a test that almost caught this issue—it verified that an invalidated ticket cannot be transferred, but didn't verify the reverse case.

The key to this vulnerability: if you only look at the diff, the reviewer sees no problem in the new code—they must have working memory of the application's existing order cancellation logic to understand the breaking point. As agentic coding scales up, the application surface area becomes increasingly complex, making it nearly impossible to remember the behavior of every function. Gitar's value lies in comparing new functionality against existing functionality, even when the problem isn't obvious.
The fix is simple: click apply fix, or just comment "Gitar fix." Gitar appends a new commit to the PR and continuously re-verifies, iterating until all green without additional per-PR charges.
Hands-On 2: Constraining Business Logic with Project Rules
The second PR added a $3.50 service fee to each ticket. The code itself has no engineering errors, but this fictional company has a business rule: the price shown to customers must be the final price including all fees. Such rules typically live in senior engineers' heads, wikis, or Confluence pages—they're unrelated to code correctness.
Gitar injects context through the .gitar/review directory and defines rules through the .gitar/rules directory. Rules work like this: when a PR meets certain conditions, a rule triggers and executes an action. For example, when pricing-related files are modified, automatically list all customer-facing price fields and flag whether they are all-inclusive.

Killian also gave a more flexible example: when a Slack link is pasted in the PR description, a rule can direct Gitar to enter Slack, read the discussion, and check whether the code matches what was agreed at the time.
This scenario illustrates that Gitar checks not only "is the code correct" but also "does the code match your business."
What Are .gitar/review and .gitar/rules
The .gitar/review directory is used to inject project context into Gitar—such as architecture descriptions, domain glossaries, or responsibility descriptions of key modules—so the review agent can make judgments based on a full understanding of the project. The .gitar/rules directory stores executable review rules, each consisting of a trigger condition and an action: when a PR modifies files that meet the conditions (such as pricing-related code), Gitar automatically executes the specified action (such as listing all customer-facing price fields and checking whether they are all-inclusive). This mechanism turns tacit conventions in senior engineers' heads into explicit, versionable configuration, allowing review standards to evolve alongside the codebase rather than being scattered across wikis or passed down by word of mouth.
Hands-On 3: Automated CI Failure Diagnosis and Fully Automated Merge
The third PR refactored ticket validation logic, causing a test failure: "The same ticket cannot be scanned twice." This was a check missed during refactoring—after scanning once, the ticket should be invalidated; otherwise, friends could repeatedly use the same ticket to enter.
After examining CI logs, Gitar provided a diagnosis: scanning an already-used ticket twice returned 200. Killian vented about the pain of the traditional process: reading logs, diagnosing locally, fixing, pushing, waiting for the pipeline to rerun, failing again—time-consuming, costly, and requiring repeatedly asking colleagues to review. Gitar automates this entire loop.
Automation is enabled by commenting GitarAutoApplyOn and GitarAutoMergeOn. The former allows Gitar to continuously push fixes without requiring confirmation each time; the latter automatically merges when no issues are detected and the pipeline passes. Killian clarified that enabling via comments in the workshop was just for demonstration purposes—in practice, AutoApprove and AutoMerge can be enabled per repository on the Gitar dashboard, and the level of automation can be set independently for each repository.

Automation Boundaries of AutoApply and AutoMerge
GitarAutoApplyOn allows Gitar to push fix commits directly to a PR after diagnosing the cause of CI failure, without requiring manual confirmation each time; GitarAutoMergeOn automatically merges a PR when Gitar detects no issues and all pipelines pass. Both can be configured independently per repository, allowing teams to choose different automation levels based on the criticality of the repository: a core payment repository might only enable AutoApply while retaining manual merging, while an internal tools repository could be fully automated. This tiered design lets teams enjoy agent-level delivery speed while retaining control over high-risk changes.
Advanced Capabilities: Cross-Repository and Cross-PR Analysis
Taylor added several advanced features beyond the scope of the workshop. Gitar supports feature verification—checking whether a PR fully implements requirements against Jira tickets—and also supports Linear and Slack integrations.
The "Knowledge" capability learns team conventions from feedback and identifies false positives; its weight is also tied to the reviewer's seniority, and it displays the source and rationale for each rule.
Two more notable capabilities are cross-repository analysis and cross-PR analysis. The former can find PRs that are fine when merged individually but would break code in another repository, with no limit on the number of repositories analyzed. The latter checks interactions between in-flight PRs—two PRs that each pass individually but together break production. This risk grows as more agents are connected.
During the Q&A, Taylor confirmed that Gitar has MCP connectivity and can integrate with multiple context sources.
The Practical Significance of Cross-Repository and Cross-PR Analysis
In the monorepo era, the impact of a change was typically confined to the same codebase, and traditional CI was sufficient to catch most integration issues. But in a multi-repository microservices architecture, an interface change in one repository can silently break a caller in another repository, while both repositories' CI is green. Cross-repository analysis establishes dependency and contract relationships between repositories to simulate cross-repository impact before merging. Cross-PR analysis addresses a more insidious problem: multiple in-flight PRs each pass tests, but after merging, semantic conflicts cause production failures—for example, one PR changes a function signature while another adds code that calls that function. As the number of PRs submitted in parallel by AI agents increases, this type of "fine individually, broken together" risk grows exponentially, making cross-PR verification a necessary safety net.
Who Needs This Type of Tool
Based on the demonstration, Gitar targets platforms and engineering teams that need to deliver code at agent-level volume and speed. It doesn't replace static analysis and human judgment; rather, it adds a layer of context-based verification between the two.
What's really worth considering is a point Killian repeatedly emphasized: we cannot ship unverified code. When agents increase code output by an order of magnitude, verification must scale accordingly—otherwise outages are almost inevitable. Gitar's answer is to automate verification as well, with an understanding of intent.
Related articles

Akio SD Bundle 2026 Edition: One-Click Install & Zero-Basics Image Generation Tutorial
Akio Stable Diffusion bundle 2026 one-click install tutorial: text-to-image prompts, checkpoint and VAE selection, sampling parameters, seed reproduction, and ControlNet line-art repainting—generate images from zero basics.

ComfyUI Two-Stage Sampling in Practice: A Guide to Choosing ControlNet Preprocessors
ComfyUI two-stage sampling tutorial: ControlNet controls structure in stage one; stage two drops ControlNet to boost quality with Denoise at 0.75. Covers OpenPose, Canny, Soft Edge, and Depth preprocessors.

2026's Most Mind-Bending Animated Series 'Infinite Flow': The Ultimate Fusion of Mystery, Deduction, and Survival Challenges
An in-depth analysis of Bilibili's animated series *Infinite Flow*: its infinite-flow worldview, mystery-deduction and survival challenges, Lin Qian's growth, ensemble portrayal, and narrative ambition.