← Blog
Code ModernizationAI/MLProduct

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

Contents
  1. Why one repository at a time falls short
  2. How Moddy works: AI + deterministic tool calling
  3. Can AI coding agents work across multiple repositories at once?
  4. What enables agents to work at scale?
  5. OpenRewrite recipes become tools for agents
  6. Does Moddy use generative AI to change code?
  7. Precomputed context with Prethink
  8. Code search across every repository with Trigrep
  9. Bring your own model
  10. Managing code at enterprise scale

Modern software development is as much about keeping billions of lines of existing code running smoothly, securely, and up to date as it is about writing new code. Today’s coding agents handle a lot of that work well inside a single repository. The gap is at enterprise scale, where the same change has to land correctly across thousands of repositories.

Moddy is the multi-repository agent built into the Moderne Platform, designed for that scale. It pairs natural language conversation with tool calling over Moderne’s Lossless Semantic Tree (LST), the structured code data OpenRewrite recipes run on. That gives it the context and accuracy to make large-scale code changes with confidence.

Figure 1. Moddy in the Moderne Platform
Figure 1. Moddy in the Moderne Platform

With Moddy, developers can 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 a simple query. Since we introduced it in early 2025, the deterministic tools it relies on have become available to the coding agents developers already use, so an agent like Claude Code can work across many repositories too.

Read on to explore how Moddy, and any coding agent with access to Moderne’s deterministic tools, is changing enterprise software development by focusing on what happens after code is written.

Why one repository at a time falls short

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.

Coding agents fall short here when they work one repository at a time. The millions of applications and billions of lines of code built over decades have to be continuously updated, maintained, and secured, often with the same change across all of them.

The Moderne Platform, built on OpenRewrite and enhanced by Moddy, tackles this head-on. All developers have to do is ask.

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

How Moddy works: AI + deterministic tool calling

While most coding agents generate and refactor code one repository at a time, Moddy works across entire codebases, handling billions of lines of code at once.

At the heart of Moderne’s approach 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. Because Moderne serializes LSTs, AI models get context on the entire codebase, enabling Moddy to drive modernization, security, and code analysis efforts on a massive scale.

Moddy invokes tools, such as deterministic OpenRewrite recipes, to extract data about and take action across a codebase.

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.

Moddy is one way to put this to work, through natural language in the Moderne Platform, where you can ask about and change code across every repository your organization has loaded. You can also bring your own coding agent. Moderne agent tools give it recipes, Trigrep, and Prethink from the Moderne CLI, and agent chat lets it work across a whole working set of repositories at once.

Can AI coding agents work across multiple repositories at once?

Yes, with Moderne. Moddy plans a change once and runs it as a deterministic recipe across every selected repository in the Moderne Platform, then opens one pull request per repository. Your own coding agent can work the same way when it runs through agent chat in the Moderne CLI.

For the bigger picture on why agents work better with deterministic tools, watch Jonathan Schneider’s talk, AI coding agents don’t need bigger models.

▶ Watch on YouTube

What enables agents to work at scale?

The LST is the foundation. These are the technologies built on it that let agents like Moddy work across large codebases with accuracy and speed.

Moderne’s AI Agent Tools: Deterministic, Accurate, and Faster Reasoning at Scale
▶ Watch on YouTube

OpenRewrite recipes become tools for agents

Moddy calls recipes as tools inside the Moderne Platform, and Moderne agent tools give other coding agents the same access from the Moderne CLI or via MCP. Either way, an agent can find the right recipe, run it across a whole organization of code, and read back the results as data tables.

Does Moddy use generative AI to change code?

No. Moddy uses a language model to understand the request and choose tools, and the code changes come from OpenRewrite recipes, which produce the same output for the same input every time.

Precomputed context with Prethink

Recipes can also extract knowledge from the LST that an agent would otherwise have to work out for itself. Prethink uses them to produce context about a codebase, such as its dependencies, architecture, and conventions, and gives that context to agents ahead of time so they don’t spend tokens rediscovering the codebase on every task.

Code search across every repository with Trigrep

Trigrep gives agents fast code search across many repositories. Its index is built from the LST, so it matches on types and symbols as well as text, and an agent can find every place a change needs to land before it makes one.

Bring your own model

Moddy works with the model your organization brings, which today means Anthropic models, with very low overhead since the bulk of the work is running recipes and serving up tabulated code data. If you bring your own coding agent, it uses whatever model that agent is already set up with.

Managing code at enterprise scale

Moderne gives agents a view of the whole codebase, and that changes how enterprise codebases are managed, maintained, and modernized. Whether you work through Moddy in the Moderne Platform or bring your own coding agent, you have control of your entire codebase.

Try Moddy today with open source repositories, or use your own agent with agent chat. To see Moddy and the Moderne Platform in action, contact us for a demo.

Written by Bryan Friedman

Originally published