# I Made a Fruit Fly Review My Code - Nick Nisi, WorkOS

## Executive summary

The speaker argues that the human code reviewer has become the primary bottleneck in modern software development, despite advancements in CI, linting, and automated agents. He proposes a shift from mandatory human approval to a risk-based, AI-assisted review process. This system uses a combination of team-defined review skills, lightweight classifiers, and automated tools to filter pull requests (PRs), escalating only the most complex or risky changes to a human. The presentation uses a simulated fruit fly brain, trained on code smells, to illustrate how biological systems can process code quality, demonstrating that the core value of human review shifts from finding bugs to understanding the *context* and *reasoning* behind the change.

## Key takeaways

- The Human Bottleneck in Code Review: As code is written faster and more PRs are generated, the human reviewer is the limiting factor, even with advanced CI and agents (e.g., Graphite, Code Rabbit). The focus must shift from 'Do I approve this?' to 'Does this actually do what I expect it to do?'
- AI-Driven Code Review Simulation: A simulated fruit fly brain, wired with a connectome (176,000 neurons, 6.3 million connections), is trained to review code. Code is converted into 'code smells' using AI (Jev), which triggers dopamine rewards (sugar for good code) or punishments (bitter taste for bad code). The fly's brain processes this sensory input to determine code quality.
- Proposed Automated Review Workflow: To scale review, a multi-stage process is suggested: 1) A team-maintained 'review skill' (using code owners) for minimum required checks. 2) A classifier (e.g., Jev/Clef) to assess complexity and risk. 3) Automated reviewers (Reptile, Code Rabbit, Codo) for technical checks. Only PRs failing these automated checks are escalated to a human.
- Shifting from Review to Proof: As trust in automation grows, the requirement for manual review diminishes. Verification should rely on 'proof'—such as screenshots, videos, test results, command outputs, or easy-to-replicate manual steps—to confirm functionality rather than just approving the code.

## Technical details

- Connectome and Neural Modeling: The demonstration uses a connectome—the actual neurons of a male fruit fly brain, meticulously scanned and wired up to model 6.3 million connections and over 125 million synapses. This model is used to process code review inputs.
- Code Smell Generation: Code is converted into 'code smells' using AI (specifically Jev, a system one model) acting as the fly's nose. This smell is processed by the brain, which links the smell to memory of good (sugar reward dopamine) or bad (bitter punishment dopamine) code.
- Automated Review Components: The proposed system relies on a sequence: Team Review Skill (code owners) $\rightarrow$ Classifier (Jev/Clef) $\rightarrow$ Automated Reviewers (Reptile, Code Rabbit, Codo). Failure at any stage triggers human escalation.

## Practical implications

- Implement a tiered review system: Use automated tools and classifiers to filter PRs, reserving human time for high-risk or context-dependent changes.
- Shift documentation and verification efforts from 'code review' (checking syntax/logic) to 'proof' (providing test outputs, screenshots, and replication steps).
- Establish team-specific 'review skills' (using code owners) to define the minimum necessary checks for specific domains (e.g., DX vs. Platform).
- Focus human effort on understanding *why* a change is needed (business logic/functionality change) rather than *if* the code is technically correct.

## Topics

Software Engineering, Code Review, AI/ML, CI/CD, Build Automation, WorkOS, AIE CODE summit, fruitfly.review

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