Como a Anthropic faz Code Review (o que dá pra copiar)

Como a Anthropic faz Code Review (o que dá pra copiar)

Overview of Code Changes at Tropic

Daily Code Changes

  • In May, Tropic experienced 20,500 code changes per day; by September, this number increased to over 30,000.
  • Approximately 90% of the code is written and reviewed by automated agents in the cloud before human intervention.

Internal Processes

  • The speaker discusses a recent publication detailing Tropic's internal processes involving seven layers of operation.
  • The aim is to differentiate between applicable practices and those that are unrealistic for other teams.

Mental Models and Human Review

Team Dynamics

  • No team member maintains a complete mental model of the cloud code; they believe it's unnecessary for anyone to do so.
  • This shift in perspective emphasizes understanding potential issues with changes rather than confirming human review.

Quality Assurance Shift

  • The focus has transitioned from "Did a human read this?" to "What could go wrong with this change?"
  • They measure how much needs to be undone or causes problems in production as indicators of quality assurance effectiveness.

Seven Layers of Review Process

Layered Approach

  • The first layer involves running tests, builds, and linters before any pull request (PR).
  • A second agent reviews the diff with a clean context to avoid bias from prior knowledge about the code.

Automated Reviews

  • Layer two includes standard CI/CD practices like linting and testing; failures block merges.
  • Layer three introduces an automatic cloud review that assesses PR intentions against repository standards.

Bug Detection Mechanism

Parallel Bug Hunting

  • Multiple agents simultaneously hunt for bugs; findings only become comments if all agents agree on their validity.
  • Comments are categorized by severity, helping prioritize issues effectively during reviews.

Documentation Practices

Review.md File Usage

  • A file named review.md serves as guidance for reviewers on what aspects matter most during PR evaluations.

Importance of Accurate Documentation

  • Discrepancies between documentation and actual code lead to failures that must be addressed during reviews.

Error Management Strategies

Handling Repeated Errors

  • If multiple PR errors are detected across submissions, they are consolidated into linting rules or documented in Review MD.

Continuous Improvement

  • This process aims at reducing repetitive errors while enhancing overall system efficiency through feedback loops.

Risk Assessment Framework

Human Intervention Levels

  • Changes requiring no human review include low-impact documents; medium-impact changes necessitate at least one person’s oversight.

Critical Change Protocol

  • High-risk changes demand dual reviews from different individuals based on an agent's classification system.

Post-Merge Monitoring

Release Strategy

  • After merging, changes undergo gradual release behind feature flags allowing quick rollbacks if necessary.

Confidence Through Control

  • Knowing that changes can be reverted quickly enhances confidence in deploying smaller increments without extensive manual review.

Evaluating Reviewer Effectiveness

Incident Analysis

  • Each incident becomes a test case where past PR fixes inform future evaluations ensuring continuous learning from mistakes.

Regression Testing for Reviewers

  • New tools or models undergo scrutiny against historical incidents ensuring reliability before implementation.

Managing Alert Noise

Balancing Alerts

  • Striking a balance between catching errors without overwhelming noise is crucial for effective monitoring systems.

Feedback Loop Integration

  • Insights gained from reviewer performance help refine alert systems ensuring relevance without excessive false positives.

Challenges with Agent Reviews

Infinite Loops Issue

  • An example illustrates how excessive nitpicking can lead to endless rounds of review causing inefficiencies within the process.

Streamlining Feedback

  • Implementing limits on rounds encourages more substantial feedback rather than trivial corrections prolonging review cycles.

Metrics Evaluation

Performance Metrics

  • Despite improvements per individual PR metrics indicate an increase in total reverts due to higher submission volumes leading to more issues overall.

Cost Considerations

  • Running multiple parallel agents incurs significant costs which may not be sustainable compared to traditional methods used elsewhere.

Research Findings

Recent Studies

  • A study found AI reviewers performed well on open-source tasks but struggled significantly with closed repositories indicating limitations based on familiarity with codebases.

Implications for Future Development

  • Understanding these dynamics helps shape expectations around AI-assisted coding environments moving forward emphasizing areas needing improvement.

Turn any video into a summary like this

YouTube links, meetings, lectures. With transcripts, search, and chat.

Video description

A Anthropic recebe mais de 30 mil mudanças de código por dia. O Claude escreve 90% delas, o próprio Claude revisa, e um tipo de mudança nunca passa por humano nenhum. Neste vídeo eu abro as 7 camadas que eles publicaram, separo o que dá pra copiar amanhã no seu time e o que só funciona com token infinito, com papers pra checar cada promessa. • A nova pergunta: o que pode dar errado nessa mudança? • Revisão com contexto limpo e por que isso evita viés • Vários agentes caçando bug e votando antes de comentar • REVIEW.md: o arquivo que ensina o agente a revisar • Quem decide quantos humanos revisam (spoiler: um agente) • Feature flag, merge queue e reverter em minutos • Como eles testam o próprio revisor com incidentes antigos • O PR que rodou 50 revisões numa noite só • O que os papers dizem sobre código aberto vs. fechado • 5 práticas que você aplica sem gastar nada 📚Fontes • Post do time do Claude Code — "Solving code review at Anthropic" (15/10/2026) https://claude.dev/blog/solving-code-review-at-anthropic/ • (When) Should a Software Factory be Lights-off? Benchmarking Code Review Agents on Bug Detection (CRBugBench) — 09/10/2026 https://arxiv.org/abs/2610.13668 • TestSuiteBench: Coding Agents Struggle to Generate Strong Test Suites from Specifications — 09/10/2026 https://arxiv.org/abs/2610.13065 • Who Finishes the Job? A Study of Follow-Up Fixes and Commit Authorship on AI Coding Agent Pull Requests — 22/09/2026 https://arxiv.org/abs/2609.26847 • tsc-rs (pingdotgg/ts-rust) — README https://github.com/pingdotgg/ts-rust 🎓 Vira membro e acesse vídeos exclusivos: https://www.youtube.com/@pasquadev/join Entre na fila de espera da Mentoria: https://pasquadev.beehiiv.com 🇺🇸 A talk é em inglês. Se quer chegar no nível de assistir conteúdo sem legenda, é com a Fluency que eu indico: https://fluencypass.com/ingles-online?utm_campaign=cd7ed78a&utm_source=pap&utm_medium=yt-descrição&bid=1383b569&affiliate=pasquadev 🔗 Me encontra em: Instagram: @pasquadev TikTok: @pasquadev 00:00 30 mil PRs por dia 00:54 A frase polêmica 01:39 A nova pergunta 02:50 Camada 1: contexto limpo 03:39 Camada 2: CI 03:59 Camada 3: revisão automática 05:19 O REVIEW.md 08:01 Camadas 4 e 5 09:29 Camadas 6 e 7 09:55 Reverter em minutos 11:45 Testando o revisor 13:05 O custo do barulho 14:41 50 rodadas numa noite 15:59 Choque de realidade 19:47 5 lições aplicáveis 20:38 O papel humano