{"slug": "code-scans", "title": "Code Scans", "summary": "Cognition launched Code Scans, a Devin feature powered by its Agentic MapReduce architecture that turns engineering goals into codebase investigations and pull requests. In a test on the Dioxus repository, Code Scans cut clean debug build time from 58.6 seconds to 21.0 seconds, a 64% reduction across 22 workspace crates, and an SEO scan of devin.ai and cognition.com surfaced 44 findings, raising devin.ai's Ahrefs health score from 87 to 92 and cutting slow pages by 73%. Users start a scan by typing /scan in the Devin webapp.", "body_md": "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.\n\nMany engineering tasks start with a specific change. Others start with an outcome:\n\n- **Improve SEO**\n- **Reduce maintenance overhead**\n- **Make your application compile faster**\n\nThese goals often stay on the backlog because the first step alone is a substantial project: investigating the codebase to figure out where to start. Additionally, identifying the opportunities is only half the work — someone still has to implement the changes, and many of them.\n\nCode Scans helps with both.\n\nPowered by [**Agentic MapReduce**](https://devin.ai/blog/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.\n\nTeams testing Code Scans ahead of launch are already seeing results:\n\nTo get started, type **/scan** in the Devin webapp, or read the [docs](https://docs.devin.ai/work-with-devin/code-scans).\n\n## Start with a goal\n\nYou don’t need to know which files to look at before starting a scan. Instead, you define what you’re looking for, and Devin works with you to turn that goal into a concrete codebase investigation.\n\nFor example:\n\nFind unused code in our web app. Exclude generated files and test fixtures, and check for indirect references before recommending a removal.\n\nYou 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.\n\nOnce you confirm the scope and settings, Devin runs the investigation and brings back a list of findings ordered by priority. From there, you can inspect the evidence, discuss the results with Devin, and ask it to open PRs for the issues you want to address.\n\n### Improve Rust compilation time\n\nWe 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.\n\n### SEO Optimization\n\nWe ran a scan for SEO issues across [devin.ai](https://devin.ai/?utm_source=x&utm_medium=organic_social&utm_campaign=code-scans&utm_content=seo-example) and [cognition.com](https://cognition.com/?utm_source=x&utm_medium=organic_social&utm_campaign=code-scans&utm_content=seo-example). It surfaced 44 findings across the two repositories, and we shipped fixes over the following days. Comparing Ahrefs crawls before and after:\n\n- **Ahrefs health score increased from 87 to 92** on devin.ai.\n- **Slow pages decreased by 73%** on devin.ai.\n- **Missing image alt text was eliminated** on cognition.com.\n\n## Agentic MapReduce\n\nCode Scans is built on top of [**Agentic MapReduce**](https://devin.ai/blog/agentic-map-reduce), the architecture we built for Devin Security Swarm, to make codebase-wide investigations practical. It works in 4 phases:\n\n1. **Plan.** Devin studies your repository and defines rules for identifying code relevant to your goal.\n2. **Shard.** Those rules run across the codebase, and the matching code is divided into focused batches.\n3. **Map.** Parallel Devin agents investigate each batch, reading surrounding code as needed and reporting their findings.\n4. **Reduce.** A final agent combines the findings, removes duplicates, and prioritizes the results into one report.\n\nThis keeps each agent’s context focused and directs the reasoning budget toward relevant code rather than repeated searching. This architecture also ensures completeness: every selected batch must be processed. Code Scans brings that same approach beyond security to the engineering goals you define.\n\n## What would you scan for?\n\nCode Scans can investigate a wide range of engineering questions, using your codebase’s conventions and the criteria you provide. Here are some examples:\n\n| **Scan** | **Goal** | \n|---|---|\n| **Performance** | Find slow paths, redundant computation, and missed caching opportunities that could make your application faster. | \n| **Database queries** | Look for N+1 queries, unnecessary round trips, unbounded reads, and other inefficient or unreliable data-access patterns. | \n| **Test coverage** | Identify important flows, edge cases, and failure paths that aren’t covered by tests. | \n| **Dead code** | Find unused functions, modules, dependencies, and obsolete feature flags, with evidence for what can safely be removed. | \n| **Code quality** | Look for duplicated logic, unnecessary complexity, better abstraction opportunities, and patterns that violate your team’s coding standards. | \n| **Cleanup** | Identify redundant abstractions, excessive boilerplate, and code that can be simplified without changing behavior. | \n| **Telemetry** | Find gaps in logging, metrics, and tracing that make failures difficult to diagnose or important behavior difficult to measure. | \n| **Accessibility** | Look for missing labels, broken keyboard interactions, and other gaps against the WCAG criteria you specify. | \n| **Compliance** | Investigate sensitive-data handling, audit trails, and retention logic against your organization’s regulatory requirements and policies. | \n| **Migration planning** | Trace existing dependencies, end-to-end flows, and business logic to produce a plan for an upcoming migration. | \n| **SEO Optimization** | Find code-level issues affecting search visibility, including missing or duplicated metadata, incorrect canonical URLs, indexing directives, and gaps in sitemaps or structured data. | \n| **Your own** | Define a pattern you want Devin to look for throughout the codebase. | \n\nThe most useful scan might come from a question your team has been putting off because answering it meant looking everywhere.\n\nType **/scan** in your Devin session, specify what you want to investigate, build the scope together, and start optimizing your codebase today.\n\nTry Code Scans at [devin.ai](https://devin.ai/?utm_source=x&utm_medium=organic_social&utm_campaign=code-scans&utm_content=try-cta) and learn more in the [Code Scans docs](https://docs.devin.ai/work-with-devin/code-scans).", "url": "https://wpnews.pro/news/code-scans", "canonical_source": "https://devin.ai/blog/introducing-code-scans", "published_at": "2026-09-18 03:00:40+00:00", "updated_at": "2026-09-18 03:25:10.419694+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "generative-engine-optimization", "developer-tools"], "entities": ["Cognition", "Devin", "Code Scans", "Agentic MapReduce", "Devin Security Swarm", "Dioxus", "devin.ai", "Ahrefs"], "alternates": {"html": "https://wpnews.pro/news/code-scans", "markdown": "https://wpnews.pro/news/code-scans.md", "text": "https://wpnews.pro/news/code-scans.txt", "jsonld": "https://wpnews.pro/news/code-scans.jsonld"}}