Code Scans
Recorded: Sept. 18, 2026, 4 a.m.
| Original | Summarized |
Introducing Code Scans | DevinProductSolutionsCustomersResourcesPricingGet a DemoLog inGet StartedIntroducing Code ScansCognition|September 16, 2026|5 min read|Copy linkToday 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. Improve SEO 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. Additionally, identifying the opportunities is only half the work — someone still has to implement the changes, and many of them. Find unused code in our web app. Exclude generated files and test fixtures, and check for indirect references before recommending a 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. Ahrefs health score increased from 87 to 92 on devin.ai. Scan findingsdevin.ai + cognition.com · SEO scanCustomer case-study pages emit relative og:image / twitter:image / JSON-LD i…Every customer case-study page (/customers/<slug>) sets its Open Graph image, Twitter image, and Article JSON-LD image to the raw frontmatter.ogimagePath value, which is a root-relative path with no domain and no leading slash. Open Graph / Twitter Card spec and schema.org require absolute URLs, so previews and the Article rich-result image break.devin-websiteRedirect chain /resources/university → /university → external drops a hop on a…vercel.json defines /resources/university -> /university and, separately, /university -> https://learn.devinenterprise.com. Because the first redirect targets another redirect source, requests to /resources/university traverse a two-hop 301 chain instead of going straight to the final destination. Ahrefs confirms /resources/university has 157 live backlinks (22 referring domains).devin-websiteHomepage og:url resolves to non-canonical /index (mismatches canonical https:…The root layout sets openGraph.url: './' on every page. This holds for sub-routes but is false for the homepage: Next resolves ./ for the root route against pathname /index, so the served homepage emits og:url = https://cognition.com/index while its canonical link tag is https://cognition.com.cognition-marketing-websiteTerminal layout omits the JSON-LD structured data every base/desktop page emitsThe _terminalLayout head assembles title/description/canonical/OG/hreflang but emits no JSON-LD, unlike _baseLayout and _desktopLayout which both ship a default SoftwareApplication block. Its consumers /cli (the Devin CLI product page) and /auto-triage are both indexable central product surfaces.devin-websiteEnded event stays indexable with meta description advertising a live webinarThe whats-new-in-devin-06-24-26 event page announces on-page that the event is over ('This event has ended', 'Event ended', 'Registration closed'), yet its metadata contains no robots: {index:false} and its meta/OG descriptions still advertise the webinar as live and upcoming. So an expired page remains indexable while its search snippet promotes a past event as though registration were open.cognition-marketing-websiteExample findings · ordered by priorityHighMedium Plan. Devin studies your repository and defines rules for identifying code relevant to your goal. Agentic MapReduce Pipelinedead-code scan example1Plan2Shard3Map4Reduce1. PlanAgenticDevin studies the repository and defines rules for the code relevant to your goal — here, symbols, modules, and dependencies that may no longer be used.repoagentselectorsexports with no importersunreferenced modulesunused dependenciesstale feature flags |
Code Scans is introduced as a novel method designed to translate broad engineering objectives into tangible improvements across a codebase. The system assists users in investigating code, evaluating the resulting findings, and automatically generating pull requests to implement necessary changes. This capability addresses the common challenge where engineering tasks, such as improving performance or reducing maintenance overhead, are stalled because the initial step—investigating the codebase to pinpoint starting points—is substantial. Code Scans automates this investigative phase. The core of Code Scans is powered by Agentic MapReduce, an architecture developed for Devin Security Swarm, which is designed to make large-scale codebase investigations practical. This architecture operates in four sequential phases: Plan, Shard, Map, and Reduce. The Plan phase involves Devin studying the repository to establish rules for identifying code relevant to the user's goal. The Shard phase divides the relevant code into focused batches based on these rules. The Map phase deploys parallel Devin agents to investigate each batch, contextually reading surrounding code as needed and compiling their findings. Finally, the Reduce phase involves a concluding agent that synthesizes the findings, eliminates redundancies, prioritizes the results, and compiles them into a single, coherent report. This methodology ensures that agent reasoning is focused, directs resources efficiently, and guarantees completeness by ensuring every selected batch is processed. Users initiate a scan by defining a specific goal rather than needing prior knowledge of which files to examine. Devin then collaborates with the user to transform this goal into a concrete codebase investigation. Users can introduce custom criteria, such as team coding standards, accessibility checklists, or migration requirements, allowing Devin to precisely define the scope of inspection, which parts to skip, and what constitutes a valid finding. Following this scoping, Devin executes the investigation, returns a prioritized list of findings, and allows the user to inspect the evidence, discuss the results, and instruct Devin to initiate pull requests for addressing the identified issues. The utility of Code Scans is demonstrated through various applications. For example, one application involved improving Rust compilation time in the Dioxus repository, where Code Scans identified opportunities to streamline dependency management and build configuration, resulting in a significant reduction in debug build time. In the context of SEO optimization, scans across repositories like devin.ai and cognition.com uncovered issues such as incorrect Open Graph image configurations and suboptimal redirect chains, leading to quantifiable improvements in search engine visibility, including increased Ahrefs health scores and reductions in slow page counts. These examples illustrate the system's ability to deliver measurable, high-impact results. Code Scans can be applied to a wide spectrum of engineering questions, encompassing areas such as performance analysis, identifying inefficient database query patterns, assessing test coverage for critical flows, locating dead code, ensuring code quality by detecting duplicated logic or complexity, identifying opportunities for cleanup, monitoring telemetry gaps, enforcing accessibility standards, conducting compliance checks against regulatory policies, planning migrations, and diagnosing code-level SEO issues. By allowing users to define a custom patterning Devin should look for throughout the codebase, the tool empowers teams to define the most critical, time-consuming investigations they have been postponing. The system effectively transforms broad, open-ended questions into actionable, self-correcting changes. |