Polyrepo Coordination and Cross-Repo Dependency Visibility
A queryable cross-repo graph is the missing layer in polyrepos.
Sponsored by Graphide

Polyrepo coordination and cross-repo dependency visibility are architectural problems. Architecture drift in AI-generated codebases becomes difficult to detect when changes are reviewed as isolated diffs without a queryable model of the relationships they alter. Reconstruct the cross-repo dependency graph, keep shared CI policy consistent, and block changes that violate declared architectural constraints.
Why polyrepo coordination keeps breaking despite good tooling
A bug fix needs three pull requests, but no single object tracks whether the whole change is done. A CVE requires chasing a shared library through repositories whose owners release independently. Each team can follow its own process correctly while the organization still lacks a reliable answer about the whole system. More coordination cannot fill in the missing dependency model. The failure begins where repo-scoped records stop describing cross-repo relationships.
GitHub's polyrepo guide identifies autonomy, clearer ownership, and scalable team boundaries as reasons enterprises choose separate repositories. Independent release cadences, team-scoped CI, bounded blast radius, and clean audit trails are deliberate benefits. Regulatory read-access constraints and heterogeneous stacks can also make consolidation difficult. Coordination costs do not erase those requirements.
However, GitHub's issues, pull requests, and workflows are repo-scoped by design. The guide states that organizations must model a multi-repo change object themselves because no native one exists. Without a separate organization-wide dependency model, answering what depends on an artifact requires searching repositories and trusting that the search was complete. This is a structural gap. A better tracking process can record known participants, but it cannot reveal a consumer that nobody knew to include.
What the dependency graph looks like in a monorepo versus a polyrepo, and why the difference matters
A monorepo with a build system such as Bazel, Nx, Pants, or Turborepo has an explicit dependency graph because the build system needs to know what to rebuild. That graph makes affected targets and transitive dependencies available through the build tool. An agent can obtain blast radius in one call. The graph is a by-product of the build architecture.
In a polyrepo, each repository can describe its direct dependencies without exposing the organization-wide picture. GitHub's built-in dependency graph is per-repo, and dependents information is not reported for private repositories. A limited organization-level dependency insights view exists for public repositories, but it is in maintenance mode. Discovering which services consume an artifact, or which APIs connect separate codebases, requires crawling manifests, searching code, or building a separate index.
The lack of an organization-wide view matters when a shared library needs a security update. Services that independently pin the library can run different versions, so remediation requires identifying every consumer and checking each upgrade. There is no atomic cross-repo operation that proves all consumers moved together. A breaking API change creates the same need for reverse dependency traversal. The technical objective is therefore not to replace polyrepo autonomy, but to reconstruct the graph that makes those questions answerable without manual discovery.
How AI agents turn the missing graph into an active liability
AI coding agents expose this gap because their effectiveness depends on the context available to them. GitHub Copilot Coding Agents are restricted to the repository specified for a task and cannot natively make changes across multiple repositories in one run. Cloning other repositories or supplying snippets can add context, but those workarounds do not provide a maintained system model. Each task remains bounded by what it receives. An agent needs explicit multi-repo context to reliably trace data flows across services and link infrastructure relationships to application logic.
The resulting signals of architecture drift are specific. Similar features acquire inconsistent implementations, existing solutions are duplicated, frontend and backend changes disagree about APIs, and shared dependencies are used under incompatible assumptions. These are predictable risks of partial context. A locally plausible implementation can contradict the system's intended structure. As agents make changes faster than humans can review them, those contradictions become harder to find by checking one file at a time.
The integration repo pattern and where it stops
An integration repo gives teams a place to coordinate while keeping their code in separate repositories. GitHub's guide describes a dedicated repository that pins component versions to immutable references in a manifest and holds integration tests and CI configuration. Its question is whether those component versions work together. It should not contain application code. Treating it as a monorepo that contains code defeats the separation the pattern is intended to preserve.
A parent tracking issue in the integration repo connects child issues in affected component repositories, while an identifier such as CHG-1042 links pull requests and branches. The guide shows how this works with a breaking API change across auth-service, billing-api, and web-frontend. Each repository creates an integration branch. A workflow then checks out all three at their integration/CHG-1042-auth-v3 HEAD, builds the composed system, and runs contract tests.
This is a genuine improvement in composition validation and release governance. It establishes whether a specified combination of components is suitable to ship together, rather than leaving that judgment to scattered conversations. Its scope is still the declared composition. The integration repo knows what it pins, but not every other repository that consumes those components. An omitted consumer remains outside the validation set.
Nx Polygraph, launched June 2026, extends this approach by connecting separate repositories into a unified dependency graph. It calls the result a “synthetic monorepo” without moving code. Coordination and dependency discovery solve different problems. An integration manifest records the versions selected for a composition, while a cross-repo graph makes relationships beyond that selection traversable.
Making the cross-repo dependency graph queryable and what that requires
A queryable cross-repo graph requires a parsed index of relationships, auto-discovery that keeps the index current, and an interface available to both engineers and agents. A static diagram does not meet that specification. Nor does a set of manifests that someone has to read by hand for each change. The index must include the links needed to answer questions across the organization, including artifact consumption and API dependencies.
The outputs make this requirement testable. A library-consumer query should return repositories and their pinned versions, while an API blast-radius query should traverse consuming services across repository boundaries. A version-compliance query should identify repositories that have not upgraded past version X. An agent should be able to call the index as a tool rather than assemble equivalent context from repeated file exploration.
In its April 2026 post about its tribal knowledge engine, Meta describes a cross-repo dependency index and data flow maps. It reports that answering “What depends on X?” changes from a multi-file exploration of ~6000 tokens to a single graph lookup of ~200 tokens. GitLab Orbit, launched June 2026, provides another interface model by serving a symbol-and-SDLC graph to agents over MCP. Its scope is GitLab-only, and it does not reach the infrastructure artifact layer.
The remaining tooling gap is cross-repo infrastructure visibility with auto-discovery and blast-radius analysis across ecosystems. Such off-the-shelf capabilities remain relatively sparse. A graph can be detailed at the symbol level yet incomplete at the service or infrastructure level. The selection criterion is therefore whether the tool indexes the relationships the team needs to traverse and keeps them current. Interface quality cannot compensate for missing edges.
Reusable workflows as the policy layer that keeps repo-scoped CI consistent
A graph reveals system structure, but visibility alone does not prevent drift. To enforce the rules, each repository needs to get the same CI policy. Shared workflows can themselves diverge when teams pin different versions or receive breaking changes without a migration path. The policy layer needs its own governance. Without that governance, the organization shares a model of dependencies but still has different rules for changing them.
The practical response is to treat reusable workflows as a versioned platform product. GitHub's guide specifies stable contracts for inputs, secrets, and outputs, supported by semantic versioning with major tags, changelogs, and migration guides. It also recommends protecting the workflow repository with CODEOWNERS, required reviews, and strict permissions. These controls govern the interface that component repositories consume. Publishing a workflow without versioning leaves adoption and compatibility unresolved.
Citi's CI/CD transformation shows how using the same templates and policy can help a very large engineering organization do its work. Its release times went from days to minutes while pipeline design stayed the same across repositories. That example concerns policy consistency. The two layers complement one another because the graph identifies relationships and the shared workflow establishes how changes are checked. Neither substitutes for the other.
For teams introducing enforcement, audit-only mode should come first. Logging violations without failing builds exposes existing problems before the policy becomes a hard gate. After that visibility and remediation stage, Open Policy Agent can evaluate rules at the pull-request boundary and block non-compliant changes before merge. The sequence applies to architectural policy as well as security checks. An executable checkpoint then replaces optional adherence with automated, repeatable enforcement across repositories.
How to detect AI-generated code diverging from intended architecture in CI
Detecting divergence requires comparing the changed dependency graph with declared architectural constraints at the pull request. A new dependency outside a component's declared service boundary should fail the build before merge. A shared-library version that disagrees with the integration manifest should fail the release pipeline. A circular dependency spanning repositories should be caught before production.
GitHub's guide specifies that repository rulesets and CODEOWNERS apply to both orchestrated and manually authored pull requests. Its 2026 security roadmap also includes a native egress firewall for GitHub-hosted runners and an Actions Data Stream. Those efforts focus on the security of CI infrastructure, with architecture rules outside their scope. They nevertheless place visibility and control at the execution boundary, where architectural checks also belong.
The practical sequence is graph first, policy layer second, enforcement check third. Teams first need a current, queryable account of dependencies, then versioned workflows that distribute policy consistently, and finally checks that block violations after an audit-only rollout. Large agent-generated diffs make this sequence especially valuable because human attention is least reliable when many files change at once. A non-zero exit that blocks an architectural violation prevents damage that post-hoc review can only diagnose.
Current verification workflow
Dependency information can help explain a change’s reach, while CI still needs to establish the outcome of the tests it is responsible for running. Graphide CI runs existing GitHub Actions jobs on Graphide runners, using warm caches, and splitting long test steps only where a check shows every result stays the same, to reduce waiting while preserving the pass/fail verdict. A failing test fails the job. Graphide review is a separate product that presents changed behavior and findings with evidence; it does not block merging on its own. Consult the current documentation for supported workloads and limitations.
Product information updated November 5, 2026 to reflect Graphide’s current CI and review products.


