Cross-repo migration agents
Cross-repo migration agents are AI agents configured to execute a consistent modernization task across dozens or hundreds of repositories simultaneously, opening PRs in each, handl
- ·Projects previously deemed "too expensive to modernize" are being modernized by agents at low cost
- ·Cross-repository migration agents operate across multiple codebases simultaneously
- ·Major version migrations (e.g., Java 8 to 21, Angular.js to Angular 17) are agent-driven
- ·Cost-per-migration-PR is tracked and decreasing
- ·Cross-repo migrations complete within defined SLAs (e.g., 100 repos migrated in 30 days)
Evidence
- ·Previously-stalled migration projects now in progress or completed with agent assistance
- ·Cross-repo migration agent logs showing multi-repository operation
- ·Major version migration PRs authored by agents with passing CI
What It Is
Cross-repo migration agents are AI agents configured to execute a consistent modernization task across dozens or hundreds of repositories simultaneously, opening PRs in each, handling each repository's individual edge cases, and tracking progress across the fleet. Where single-repository migration agents handle depth (one complex migration thoroughly), cross-repo agents handle breadth (one consistent migration applied uniformly across all relevant repositories).
The classic use case is organizational standardization: an internal API changes its authentication method, and 40 microservices need to update their client configuration. A new logging standard is adopted, and all 30 backend services must migrate from the old library to the new one. A security vulnerability is found in a common utility class, and the patched version must be deployed across every repository that imports it. Without cross-repo agents, each of these becomes a coordination effort that takes weeks of distributed work across multiple teams. With cross-repo agents, the same change is applied uniformly in hours.
The agent runs with a script or task specification that defines: what repositories are in scope, what transformation to apply, how to validate success, and how to handle failures. The agent clones each repository (or works from cached state), applies the transformation, runs the tests, and opens a PR. For large fleets (100+ repositories), the agent runs in parallel across batches of repositories. Each PR is independent - a failure in one repository does not block progress in others. The team reviews and merges each PR on its own timeline.
Cross-repo agents are the mechanism by which organizational consistency norms can actually be enforced rather than aspirationally maintained. Every time a standard changes, a cross-repo agent can propagate the change to every repository that needs it. The gap between "we have a standard" and "all repositories comply with the standard" shrinks from months to days.
Why It Matters
- Eliminates consistency drift across repositories - In organizations with many repositories, standards drift is the default; cross-repo agents make propagating standard changes as easy as making them in one repository
- Reduces the coordination tax on platform teams - Platform teams that own shared standards typically spend disproportionate time coordinating standard migrations across teams; cross-repo agents remove the manual coordination and let each team simply review and merge their PR
- Makes security patches instantaneous at scale - When a vulnerable dependency is patched, a cross-repo agent can open PRs across all affected repositories within hours; the organization's CVE remediation time drops from weeks to days
- Enables large-scale architectural decisions - Architecture decisions that would have been prohibitively expensive to enforce (because they require changes to every repository) become viable at agent-level speed and cost
- Creates an audit trail for compliance - Every cross-repo migration produces a complete record: which repositories were targeted, what was changed, which PRs were opened, which were merged, which failed and why. This audit trail is valuable for security compliance and architectural governance.
Getting Started
- Identify your first cross-repo migration candidate - Choose a high-value, low-risk change that affects many repositories: a common dependency version bump, a logging configuration standardization, or a shared utility class update. Low-risk means: the transformation is mechanical, the change is small, and tests will catch regressions.
- Build a repository inventory with metadata - You need a machine-readable list of all repositories with metadata: language/framework, which shared dependencies they use, team ownership, and CI status. This inventory is the agent's targeting system for cross-repo work.
- Write and test the migration script on one repository - Before running the agent at scale, validate the transformation on a single repository manually. Confirm it produces the expected output, passes tests, and opens a clean PR. The single-repo validation catches problems before they multiply across 40 repositories.
- Configure parallel execution with rate limiting - Run the agent on batches of 5-10 repositories in parallel, not all simultaneously. Rate limiting prevents CI system overload and gives reviewers a manageable PR flow rather than 40 PRs opening in the same minute.
- Set up cross-repo progress tracking - Maintain a tracking document (or database table) that records each repository's migration status: not started, in progress, PR open, PR merged, failed. This is the agent's state management and your progress dashboard.
- Establish escalation criteria - Define what causes the agent to stop and escalate: test failures it cannot fix, merge conflicts with active feature work, repositories with no CI configuration, protected branches that require additional approvals. These criteria prevent the agent from spending time on repositories that need human attention.
The first time you run a cross-repo migration agent across a large fleet, you will discover repository hygiene issues you did not know existed: repositories with broken CI, repositories with no tests at all, repositories where the dependency you are trying to update is vendored in a non-standard location. This discovery is a valuable side effect - you now have a list of repositories that need remediation before they can participate in future automated migrations.
Common Pitfalls
Not having team buy-in before opening PRs. A cross-repo agent that opens PRs without advance notice creates confusion and resistance: developers open their repository dashboard to find 3 PRs from an agent they did not know existed. Brief team leads before running a cross-repo migration; explain what the agent is doing and why.
Insufficient error handling across diverse repositories. A fleet of 40 repositories will have 40 slightly different build configurations, dependency management approaches, and project structures. The agent must handle structural variation gracefully - skipping repositories it cannot process rather than failing noisily.
Letting failed PRs accumulate without triage. When the agent fails in 5 of 40 repositories, those 5 failures need human triage. Establish a clear owner for cross-repo migration failures and a timeline for triage. Failed migrations that are not triaged within a week are candidates for manual handling.
Running cross-repo migrations during active feature sprints. A cross-repo migration that opens PRs in all repositories simultaneously competes with feature PRs for review attention in every team. Schedule large cross-repo migrations for low-activity periods: early in a sprint, before a sprint planning session, or on a team rotation where one team handles reviews.
No post-merge monitoring. A cross-repo migration that is merged successfully in all 40 repositories but causes a production issue in 3 of them requires a post-merge monitoring period. Define a monitoring window (48-72 hours) and watch for increased error rates or deployment failures in the migrated services.
How Different Roles See It
Bob's organization has 42 backend services, all of which use the same internal gRPC client library. The library team released a new major version with a breaking change in the connection pooling configuration. Without cross-repo agents, this would be a coordination project: Bob would send a migration guide to each team's tech lead, wait for them to prioritize it, and follow up for weeks as teams work through it at different speeds. The migration would take 2-3 months to complete across all teams, with a long tail of stragglers.
With a cross-repo agent, Bob can have the library team write the migration script, validate it on their own repository, and then run the agent across all 42 services. Within three days, all 42 services have open PRs. Within two weeks, most are merged. The remaining stragglers are the services with broken CI or unusual configurations - Bob's list of repositories that need infrastructure attention, which is useful information independent of this migration. The coordination tax dropped from 3 months to 2 weeks.
Sarah is tracking "migration propagation time" - how long it takes for a standard change to reach all repositories after it is decided. Before cross-repo agents: average propagation time for a common-library change was 11 weeks (time to get all teams to merge the PR). After cross-repo agents: propagation time for mechanical migrations is 2 weeks (time to review and merge). For security-critical migrations, propagation time dropped from 6 weeks to 4 days.
Sarah should add propagation time as a standing organizational health metric. It measures how effectively the organization can execute consistent change across its codebase, which is a direct measure of technical governance effectiveness. A slow propagation time means standards are not actually being enforced - they are aspirational. A fast propagation time means decisions made at the organizational level actually translate into codebase reality quickly.
Victor built the cross-repo migration framework: a Python script that reads a YAML repository inventory, checks each repository's metadata to determine applicability, runs the migration agent against applicable repositories in parallel batches, and writes progress to a SQLite database that renders as a simple web dashboard. He built the framework over one weekend; the framework itself is now a reusable asset for every future cross-repo migration.
Victor has run six cross-repo migrations in the past three months. The framework has processed 187 repository-migration combinations and opened 162 PRs (the remaining 25 either failed with errors that need human attention or were determined non-applicable during the metadata check). Of the 162 PRs, 148 have been merged. Victor's hands-on time for all six migrations: approximately 40 hours of framework development, 8 hours of validation, and 12 hours of failure triage. The equivalent manual coordination effort would have consumed hundreds of hours across dozens of developers. Victor is planning to open-source the framework skeleton as a contribution to the organization's public tooling portfolio.
Further Reading
From the Field
Recent releases, projects, and discussions relevant to this maturity level.
Where does your team actually sit on this?
This guide describes one level of one area. Run the assessment to place your team across all 16 areas, see which gates you have passed, and get a report you can take to your stakeholders.