# AI Writes Code Faster Than Your Team Can Review It - Andrew Norrish, Sourcegraph

## Executive summary

The rapid increase in AI-driven development has shifted the primary bottleneck from writing code to reviewing it, leading to a rise in complex, AI-initiated incidents. Andrew Norrish of Sourcegraph argues that SRE and platform teams are uniquely positioned to address this challenge. He details how advanced code intelligence platforms, utilizing a full code graph, can significantly improve the core SRE workflow—Investigation, Prevention, and Remediation—by providing deep context and enabling large-scale, automated fixes across massive codebases.

## Key takeaways

- Code Review is the New Bottleneck: Increased developer velocity from AI tools has caused PR counts and sizes to balloon. The bottleneck is now the speed and capacity of humans to review AI-written code, which often lacks necessary organizational context (2:52).
- AI-Generated Code Increases Incidents: AI-written code frequently lacks the context needed for production quality, leading to 'AI-initiated incidents.' These incidents are becoming more frequent, complex, and costly, overwhelming front-line support and SRE teams (4:27).
- SREs and Platform Teams are Critical: SRE and platform teams are best suited to manage the fallout from AI development because they already operate in well-bounded, semi-autonomous areas (e.g., CVE monitoring, automated remediation) and are equipped to build processes to prevent AI-initiated incidents (9:20).
- The SRE Workflow Solution: Sourcegraph's tooling addresses the SRE workflow through three pillars: Investigation (finding root causes in minutes), Prevention (monitoring for risky or non-compliant code patterns), and Remediation (making bulk changes across all impacted repositories) (13:14).

## Technical details

- Code Graph and Context Engine: Sourcegraph builds a full code graph and code intelligence platform that serves as a 'codebase context engine,' providing necessary information for both human developers and AI agents to build robust services (1:28).
- Code Search Capabilities: The platform offers deterministic search (searching across every repo, branch, and commit with a single query) and deep search (identic search) to quickly identify the root cause of issues in minutes instead of days (13:14).
- Compliance and Monitoring: Prevention capabilities include built-in monitoring that alerts when risky code is committed or when specific patterns are matched that may be non-compliant, ensuring AI-written code meets organizational standards (13:14).
- Bulk Remediation: The tooling allows for bulk changes across all repositories within an organization, enabling rapid remediation of identified security or risky patterns across multiple services and teams (13:14).

## Practical implications

- Platform teams should focus on building robust, automated processes (like automated remediation runbooks) to manage the increasing volume of AI-generated incidents.
- Organizations must implement code intelligence tools that provide deep, cross-service context to ensure AI-written code meets regulatory and compliance requirements.
- SRE teams should leverage deterministic and deep search capabilities to drastically reduce the time spent investigating complex, AI-induced root causes.

## Topics

AI Development, Site Reliability Engineering (SRE), Code Review, Code Intelligence, Platform Engineering, Sourcegraph, AIE CODE summit

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