Catch the Bugs Your Code Review Misses - Killian Carlsen-Phelan & Taylor Luttrell-Williams, Sonar

Taylor Luttrell-Williams and Killian Carlsen-Phelan from Sonar present Guitar, an automated, context-aware code review tool that helps developers efficiently detect and fix bugs in AI-generated code while enforcing custom business rules and streamlining the review process through automation. Guitar enhances code reliability by understanding business logic, integrating with tools like Jira and Slack, and enabling auto-fixes and merges, thereby addressing the challenges of rapid AI-driven development and reducing manual review overhead.

Taylor Luttrell-Williams and Killian Carlsen-Phelan from Sonar introduce Guitar, a tool designed to help developers efficiently review and fix AI-generated code before merging. They emphasize the challenges posed by the rapid influx of code from AI agents, which can overwhelm human reviewers and introduce bugs or inconsistencies with project standards. Guitar addresses these issues by providing automated, context-aware code reviews that minimize false positives, diagnose CI failures, and autonomously apply fixes, thereby streamlining the code verification process and ensuring reliability at scale.

The workshop begins with instructions on setting up Guitar via GitHub and forking a specially prepared repository containing exercises. Killian demonstrates how Guitar reviews pull requests (PRs) by analyzing code changes in context, beyond what traditional static analysis tools like SonarQube can do. For example, Guitar identifies logical issues in ticket transfer functionality that might be missed by human reviewers focusing only on diffs. This highlights Guitar’s ability to understand business logic and existing code interactions, which is crucial as codebases grow and AI-generated contributions increase.

Next, the presenters explore how Guitar can enforce custom business rules and repository-specific guidelines through configuration files and rule sets. They showcase a scenario where a service fee added to ticket prices violates a company policy that displayed prices must be final. Guitar detects this discrepancy by referencing contextual information provided in markdown files and rules, demonstrating its flexibility to adapt to unique team requirements. This feature empowers teams to maintain consistency and compliance automatically, reducing manual oversight.

The final practical segment covers Guitar’s automation capabilities, including auto-applying fixes and auto-merging PRs once all tests pass. Killian walks through enabling these features, showing how Guitar iterates on fixes, validates changes against CI pipelines, and merges code without human intervention. This automation significantly reduces the time and effort spent on repetitive review tasks and pipeline troubleshooting, allowing teams to keep pace with rapid development cycles driven by AI-generated code.

In conclusion, Taylor highlights advanced Guitar features such as integration with Jira and Slack for enriched context, a knowledge system that learns from reviewer feedback, and cross-repository and cross-PR analysis to detect conflicts across multiple codebases. These capabilities make Guitar a powerful complement to existing tools like SonarQube, providing a comprehensive solution for managing the complexity and velocity of modern software development. The session ends with an invitation to explore Guitar further through a free trial and additional resources, encouraging developers to leverage its full potential.

Useful Links