# Tessl Code Review: Catching 74% of Bugs Pre-Merge

## Executive summary

Tessl Code Review is an AI-native code reviewer designed to address the critical bottleneck of trusting code generated by coding agents in a software factory. It functions as an automated GitHub app that runs specialized, customizable review rules (lenses) against Pull Requests (PRs). The system emphasizes self-improvement loops, allowing the review process to learn from the codebase and the team's specific best practices, thereby increasing defect detection rates (claiming up to 74% detection).

## Key takeaways

- AI Code Review and the Software Factory: Building a 'software factory' requires more than just plumbing; it requires self-improvement loops that continuously refine the context and skills used by coding agents. Code review is positioned as a critical loop that feeds back into the factory to improve code quality before merging.
- Customization via Lenses and Globs: The system uses customizable 'lenses' (review rules) that can be tuned to specific domains (e.g., audio DSP) and restricted to specific file paths using globs. This allows for highly targeted reviews, even in large mono-repos.
- Local and CI Integration: Tessl Code Review can be run directly via the CLI (`Tessl code review give it the profile`) against local changes, enabling developers to catch defects before opening a PR, complementing its automated GitHub app integration.

## Technical details

- Architecture and Workflow: Tessl Code Review integrates as a GitHub app, running automatically when a PR is opened. It utilizes a set of skills (defaulting to four, plus Tessl's three proprietary skills) to analyze changes. The output is a comment on the PR, with mechanisms to approve or request changes.
- Review Lenses: Lenses are specialized review rules that can be configured for specific paths (using globs) and effort levels (low, high). Users can use the Tessl agent to suggest and generate custom lenses based on the existing codebase, documentation, and best practices.
- Configuration and Enforcement: Configuration is per-repository and includes setting the trigger (on open or mention), review behavior (advisory, or enforcing approval/blocking), and the ability to auto-approve after all threads are resolved.

## Practical implications

- Establishes a robust, automated quality gate within the CI/CD pipeline, ensuring that agent-generated code meets organizational standards before merging.
- Allows build teams to shift quality assurance left by running reviews locally via CLI, reducing reliance on manual human review.
- Enables fine-grained control over review scope using globs, which is crucial for large mono-repos or complex microservice architectures.

## Topics

AI Code Review, Software Factory, CI/CD, GitHub Automation, Code Quality, Agent Reliability, Tessl.io, Tessl CLI

Source: https://www.youtube.com/watch?v=tAYbWVgqaBk
