HeadlinesBriefing favicon HeadlinesBriefing.com

Code Scans: Automate Codebase Improvements

Hacker News •
×

Today we’re introducing Code Scans: a new way to turn broad engineering goals into concrete improvements across your codebase. Tell Devin what you want to achieve, and it helps you investigate what needs to change, evaluate the findings, and turn them into pull requests. Many engineering tasks start with a specific change, but others start with an outcome like improving SEO, reducing maintenance overhead, or making your application compile faster. These goals often stay on the backlog because the first step alone is a substantial project: investigating the codebase to figure out where to start. Identifying opportunities is only half the work — someone still has to implement the changes, and many of them. Code Scans helps with both.

Powered by Agentic Map Reduce, the architecture we built for Devin Security Swarm, Code Scans breaks large investigations into focused batches, distributes them across parallel agents, and synthesizes their findings into one report. Devin then turns its findings into PRs ready to review. Teams testing Code Scans ahead of launch are already seeing results: Code Scans had a significant impact on software quality, bug fixes, stability, performance, and compliance, including security and privacy. With an estimated 96% PR merge rate across several repos, we estimate we've saved over 700 engineering hours in our short testing timeframe.

To get started, type /scan in the Devin webapp, or read the docs. You don’t need to know which files to look at before starting a scan. You define what you’re looking for, and Devin works with you to turn that goal into a concrete codebase investigation. For example, find unused code in your web app, excluding generated files and test fixtures, and check for indirect references before recommending removal. You can also bring your own criteria: a team’s coding standards, an accessibility checklist, or requirements for an upcoming migration. Devin helps establish what to inspect, what to skip, and what should count as a finding. Once you confirm the scope and settings, Devin runs the investigation and brings back a list of findings ordered by priority.

We asked Code Scans to speed up compilation in the Dioxus repository. Devin identified opportunities to streamline dependencies and build configuration, including making heavyweight CLI features opt-in rather than compiling them by default. After applying the changes locally, clean debug build time dropped from 58.6 seconds to 21.0 seconds—a 64% reduction across the 22 workspace crates tested. Scan findings included the default mounted feature forcing web-sys/js-sys/wasm-bindgen onto every non-web renderer, an oversized foundational crate causing full re-expansion, and cargo-generate compiled unconditionally though used only by dx create.