Introducing Moderne’s multi-repo AI agent for transforming code at scale

Moderne
|
March 4, 2025
Multi-repo Moddy - Let's Work on Your Code
Contents

Key Takeaways

Modern software development isn’t just about writing new code—it’s about keeping the billions of lines of existing code running smoothly, securely, and up to date. While today’s AI assistants like GitHub Copilot excel at generating fresh code, they leave a massive gap when it comes to modernizing and maintaining enterprise-scale codebases. 

We’re excited to introduce the first-ever multi-repository AI agent, code-named Moddy, available as part of the Moderne Platform. Unlike traditional tools focused on net-new code creation in the IDE, Moddy is a complementary solution that works accurately at scale, enabling developers to understand and evolve entire codebases like never before.

Figure 1. Moddy extends the Moderne Platform with agentic AI capabilities

Moddy combines natural language human-computer interaction with advanced tool calling to harness the power of Moderne’s Lossless Semantic Tree (LST) structured code data. This unique integration allows Moddy to access the wealth of OpenRewrite capabilities, providing unprecedented context and accuracy for executing large-scale code changes with confidence.

With Moddy, developers can effortlessly navigate, analyze, and modify even the largest, most complex codebases. Imagine asking Moddy to describe dependencies in use, upgrade frameworks, fix vulnerabilities, or locate specific business logic—across thousands of repositories—with just a simple query. 

Read on to explore how Moddy, currently offered as an exclusive beta, is transforming enterprise software development by focusing on what happens after code is written.

Advancing Moderne’s mass-scale modernization mission

Moderne has been committed to large-scale code modernization from the start, empowering businesses to automate change across their entire codebase—a state we call tech stack liquidity. This includes everything from framework migrations and security fixes to cloud moves, escaping database lock-in, and switching feature flag providers.

AI coding assistants fall short here. They can't address the millions of applications and billions of lines of code built over decades—code that must be continuously updated, maintained, and secured. In fact, they can undermine maintainability over time.

A recent GitClear report highlights the issue: “newly added” code now accounts for 46% of changes, up from 39%, while 2024 marks the first year duplicated lines outpaced refactored ones. This trend signals a shift away from reuse and toward bloated, harder-to-maintain code. As GitClear warns, “Developer energy may soon shift from building new features to defect remediation as the primary day-to-day task.”

The Moderne Platform, built on OpenRewrite and enhanced by Moddy, tackles this head-on—enabling developers to efficiently maintain not just the code in their IDE, but the entire codebase. All they have to do is ask.

Figure 2. Moddy answering the question "How am I using Apache Commons?"

How Moddy works: AI + deterministic tool calling

Moddy is not just another AI coding assistant. While other AI tools focus on generating and refactoring code one repository at a time, Moddy transforms entire codebases, handling billions of lines of code simultaneously. 

At the heart of Moderne’s breakthrough technology is its Lossless Semantic Tree (LST) data model for code, which goes beyond raw “code as text” and Abstract Syntax Trees (ASTs). Think of LST data as roughly equivalent to the IDE internal code representation, but it goes further, able to capture the intricate structure, dependencies, and relationships across multi-repository codebases. Moderne’s unique capability to serialize LSTs fuels AI models with vital context of the entire codebase, enabling Moddy to drive modernization, security, and code analysis efforts on a massive scale.

Moddy provides natural language human-computer interaction while it invokes tools, such as the thousands of OpenRewrite deterministic recipes, to extract data about and take action across a codebase. 

Figure 3. Moddy agentic workflows in the Moderne Platform

Moddy can respond to user queries by:

  • Guiding users through relevant OpenRewrite recipes.
  • Configuring and executing recipes.
  • Providing recommendations.
  • Summarizing the discoveries or deterministic changes.
  • Discussing discoveries with the user.

For example, if a developer wants to migrate legacy database usage to PostgreSQL, they can ask Moddy how SQL is used across the organization’s entire codebase. Moddy will identify the appropriate Moderne recipe to locate SQL usage, then execute it across all repositories, gathering the results in a structured format.

From there, Moddy can analyze the data, cluster results by various dimensions, and pinpoint proprietary legacy SQL syntax that needs updating for PostgreSQL compatibility. The developer can then decide whether to apply deterministic changes using additional OpenRewrite recipes or make the updates manually, all while maintaining full visibility into the migration process across the entire business unit.

Users will appreciate an expert helping hand navigating the extensive set of actions that can be executed on a codebase through the Moderne Platform. You don’t have to be experienced with OpenRewrite recipes to make a big difference in your code.

Moddy is here to meet you where you are. 

What enables Moddy to work at scale?

We know that the rich LST code data is the critical foundation of Moddy’s power. But a strong foundation is only the beginning. Let’s walk through some of the technologies that allow Moddy to work in real-time across vast datasets of code, delivering unprecedented accuracy, speed, and insight.

OpenRewrite recipes become tools for AI

The advent of tool-function calling in late 2024 enabled Moderne’s hybrid approach combining LLMs with deterministic recipes. Suddenly, the thousands of OpenRewrite recipes that already existed in the Moderne marketplace became tools that an LLM could use.

Moddy uses a Langchain tool calling implementation that enables models to interact with external services and APIs, connecting the agent to the data. Think of it like a toolbox where you register and provide tools for the agent to use. Tools can be OpenRewrite recipes, a calculator for math, or Javascript code to create diagrams. This enables the agent to use recipes running on whole organizations of code to be exposed to an LLM. 

Moddy can determine which tools (aka recipes) are relevant based on the request, execute the call, and then incorporate the returned data into the answer.

Figure 4. Moddy agentic workflow example

Knowledge graphs for smarter LLMs

From the raw data of the LST, knowledge graphs can be created as additional data sources for LLMs. An example of a knowledge graph is Comprehend Code, a Moderne proprietary recipe that builds data tables from method declarations and class declarations that together form an in-depth knowledge graph that AI can effectively use. 

There are multiple possible applications of this data:

  • Code search by architectural pattern (e.g., reactive code or code using database transactions) 
  • Code search by business purpose (e.g., payments processing).
  • Using the extracted data table to update or produce documentation using a recipe called UpdateReadme that builds on top of Comprehend Code.
  • Generating architectural diagrams from the discovered meaning.
Figure 5. How the Comprehend Code recipe builds a knowledge graph
Figure 6. Knowledge graph tabulated data example

Compilation verification: The cornerstone of AI feedback

With many AI assistants today, the sequence of code change is “AI makes change” then “Run build tool to verify compilation” then “AI makes change to fix compilation failures,” and so on. Executing the build for every change for every repository is a massively computationally intensive, time-consuming process—with costs of validation born by the end user, not the assistant.  

When leveraging AI for large-scale code transformation, those early, instant signals of change quality are essential for managing change at scale. To that end, Moderne has developed a compilation verification recipe that enables fast feedback on changes across hundreds of millions of lines of code after a recipe makes a change, and it costs almost nothing in time or compute. Moddy can leverage the recipe to understand whether the code with changes will compile.

Large Language Model (LLM) of your choice

Moderne offers a choice of LLM with Moddy. This includes allowing organizations to use those models they already have in their toolbox with very low overhead since the bulk of the work is accomplished by running recipes and serving up tabulated code data. 

Through our research, we have found negligible differences in the LLMs connected to Moddy. This confirms what we’ve long held—that models today are really quite good. For coding use cases, they just need to be fed better data about codebases in real time (aka LSTs) for making more informed, accurate, broad-reaching decisions. 

New paradigm for code management

Moddy, the new multi-repo AI agent from Moderne, represents a paradigm shift in how enterprise codebases are managed, maintained, and modernized. It empowers developers to take command of their entire codebase—not just the code in their IDE. 

If you’re ready to see how Moddy can transform your organization’s approach to large-scale code management, contact your Moderne representative to ask about the exclusive beta. Unlock the full potential of your codebase and lead your team into the future of software development with Moddy and the Moderne Platform.