← Blog
AI/MLProduct

GitHub Copilot and Moderne take code transformation from one repo to your whole estate

Contents
  1. Why coding agent rollouts stall after the pilot
  2. How GitHub Copilot and Moderne work together
  3. Agents need a compiler-accurate view of the code
  4. Deterministic changes across every repository
  5. From one prompt to every repository
  6. What this looks like at enterprise scale
  7. Try it in person at GitHub Agentic Days
  8. Start with your own code

Many large engineering organizations have rolled out GitHub Copilot. Leadership now wants to know what return they’re getting on that investment.

For many enterprises, that return depends on two kinds of work: modernizing legacy Java and .NET code on frameworks past end of support, and shipping security fixes that touch thousands of repositories. Both have to happen across every affected repository at once. Working through the estate one repository at a time takes too long and costs too much.

Moderne is a GitHub Technology Partner and a spotlighted startup in the Microsoft Pegasus Program. We work directly with both companies on that problem.

Estate-wide changes only work when every change is accurate. Accuracy comes from determinism. GitHub Copilot works out the change you want. Moderne makes that change the same way in every repository. You review the recipe once, then apply it everywhere.

Why coding agent rollouts stall after the pilot

When we sit with engineering leaders, we see three things stand between the pilot and production:

  • The legacy estate. Code is spread across thousands of repositories, on frameworks that are out of support, with tech debt that keeps growing. An agent can’t reason well over code in that state. Upgrading one app at a time keeps it running, but the same outdated patterns stay in every other repo. Agents become more useful as the estate is modernized.
  • Trust in the output. An agent working on one repository at a time rebuilds its context every time, so its output varies from repo to repo. Reviewers can’t trust it, and they end up redoing the work.
  • Scale and governance. One agent can’t maintain ten thousand repositories. A security fix that touches 2,000 repositories becomes 2,000 pull requests, each written separately and each needing its own review. With that much review work, teams fix the urgent issues and leave the underlying debt in place.

How GitHub Copilot and Moderne work together

At the scale of thousands of repositories, GitHub Copilot needs to know exactly where a piece of code lives in every repo. It also needs a way to make an edit that comes out identical each time. Moderne provides both.

Agents need a compiler-accurate view of the code

To change code correctly, an agent needs to know what each type resolves to and which library version each call uses. Moderne builds a Lossless Semantic Tree (LST) for each repository. The LST records the code with its types resolved, along with its dependencies, formatting and every call site.

Moderne Code Search gives agents a way to query that LST across every repository. It’s powered by Trigrep, which indexes the LST instead of the source files, so every match carries the type it resolves to and the library version it came from.

GitHub Copilot calls Moderne Code Search to ask exact questions, such as “where do we call this vulnerable method?” or “which repositories still use Spring 5?” It gets back every real match instead of text that only looks similar. It can also query those results with SQL to get a count or summary without opening every file. Once the search is right, GitHub Copilot saves it as a changeset. The matching repositories become the scope for the change.

Moderne Code Navigation lets GitHub Copilot jump from any match to where a method or class is declared. That declaration might be in the same repository or in another repository in your organization. It might also be in an open-source library, and in that case Copilot opens the exact version your build uses. It reads the real source instead of relying on what it remembers about that library.

The Lossless Semantic Tree combines the code, its dependencies, compiler output, language version and build tool into one resolved fact, such as a call to new AllowAllHostnameVerifier() that disables host checks. The LST is semantic, lossless and persistent.

Deterministic changes across every repository

Moderne makes changes with recipes. A recipe is a small, tested program built for one kind of change. It finds the exact code it’s looking for and makes the same edit every time it runs. Moderne has more than 10,000 recipes covering Java, Kotlin, C#, Python, JavaScript and TypeScript, plus the frameworks and build tools around them, from Spring and .NET to npm and Gradle.

From one prompt to every repository

Take one migration as an example: replacing Gson with Jackson across every repository.

  1. Ask for the outcome. From the Moderne CLI, you give GitHub Copilot one prompt: “Replace Gson with Jackson across all of my repositories.”
  2. Look first. GitHub Copilot checks for an existing Gson-to-Jackson recipe, including any that earlier runs have already refined. When it doesn’t find one, it measures the problem before building anything.
  3. Scope it. Code Search ranks repositories by how many Gson files they have. GitHub Copilot picks a pilot set and saves it as a changeset.
  4. Migrate one repository first. GitHub Copilot migrates one representative repository until it compiles. That migration becomes the spec for the recipe.
  5. Build the recipe. GitHub Copilot turns the migration into a deterministic recipe and adds unit tests until they pass.
  6. Run, learn and run again. The recipe runs across the pilot. When something breaks, agents turn the failure into a new test and a recipe fix, then run the recipe again. Each pass covers more edge cases than the one before.
  7. Push with evidence. Every repository gets its commits and notes, and an evidence folder records the run. The recipe and its tests stay behind, ready for the next repository or the next team.

Each pass makes the recipe more accurate. Agents turn what they learn from one attempt into tests and fixes for the next. They also share what they find with the agents that run after them. We call this recursive self improvement. None of this retrains the underlying AI model. What improves is the recipe, its tests and the shared context. Your team can read, review and reuse all of it.

GitHub Copilot spends its tokens once, on building and fixing the recipe. Running the finished recipe on each additional repository uses no model tokens.

We used the same loop to move our own repositories from Gradle 8 to 9. Agents found a gap at compile time, wrote a recipe for it and applied it across the codebase.

What this looks like at enterprise scale

Enterprises use Moderne to upgrade and secure code across hundreds to tens of thousands of repositories. A global bank upgraded and remediated 50,000 repositories with recipes its own developers wrote. Choice Hotels moved 500 services from Java 8 to Java 25. They also turned a six-week security effort into 200 pull requests in an hour.

Try it in person at GitHub Agentic Days

GitHub Agentic Days are coming to three cities. Work with the GitHub and Moderne teams in person and watch Copilot and Moderne make one change across many repositories.

DateCityRegistration
Nov 16ChicagoRegister
Nov 19BostonRegister
Dec 8PhiladelphiaRegister

Start with your own code

Run it on your own repositories: start a Moderne evaluation.

Already on Azure? You can get Moderne through the Azure Marketplace and apply it toward your existing Microsoft commitment.

Written by Matt Finkelstein Chief Partnerships Officer