Skip to main content

Introducing Code Scans

By Steven Van ·

Devin's new /scan command investigates a codebase against a stated goal, ranks the findings and opens pull requests for the ones you choose.

Devin can now take a broad engineering goal, such as improving SEO or cutting build times, and turn it into a prioritized list of findings and pull requests. The feature is Code Scans, and Devin users start one by typing /scan in the Devin webapp.

How a scan starts

No file list is needed up front. The user states a goal, for example "Find unused code in our web app. Exclude generated files and test fixtures, and check for indirect references before recommending a removal." Criteria can also come from a team's coding standards, an accessibility checklist, or requirements for an upcoming migration. Devin helps settle what to inspect, what to skip and what counts as a finding.

After the scope and settings are confirmed, Devin runs the investigation and returns findings ordered by priority. Users can inspect the evidence, discuss the results with Devin, and ask it to open PRs for the issues they want to fix.

Agentic MapReduce

Code Scans runs on Agentic MapReduce, the architecture built for Devin Security Swarm. It works in four phases:

  • Plan: Devin studies the repository and defines rules for identifying code relevant to the goal.
  • Shard: the rules run across the codebase and the matching code is divided into focused batches.
  • Map: parallel Devin agents investigate each batch, reading surrounding code as needed.
  • Reduce: a final agent combines the findings, removes duplicates and prioritizes them into one report.

Reported results

In a scan of the Dioxus repository for compilation speed, Devin found changes such as making heavyweight CLI features opt-in. After applying them locally, clean debug build time fell from 58.6 seconds to 21.0 seconds, a 64% reduction across the 22 workspace crates tested.

A scan for SEO issues across devin.ai and cognition.com surfaced 44 findings, and fixes shipped over the following days. Comparing Ahrefs crawls before and after, the health score on devin.ai rose from 87 to 92, slow pages there fell by 73%, and missing image alt text on cognition.com was eliminated.

One team testing Code Scans before launch estimated a 96% PR merge rate across several repositories and more than 700 engineering hours saved.

Devin
Devin
AI software engineering agent for building features, fixing bugs, reviewing code, and handling work across repositories.
View Devin →
Sources

Original source

Read Introducing Code Scans on Creators Toolbox