CI verdicts and evidence-backed review for agent-written changes.

Live Dependency Graphs as the Collaborative Surface Developers and Agents Both Mutate

Shared dependency graphs let developers and agents coordinate concurrent edits safely.

Sponsored by Graphide

Navigating the Diff Editors
· 8 min read
Cover illustration for “Live Dependency Graphs as the Collaborative Surface Developers and Agents Both Mutate”
Agentic Coding Workflows · November 4, 2026 · 8 min read · 1,838 words

An interactive codebase graph for AI agent steering must be a live dependency model that developers navigate and agents query as they change the same repository. It must update with commits, take in runtime signals, and enforce architectural constraints in CI. Only a shared model with those properties can turn concurrent edits into coordinated work, making the graph an active collaborative surface.

Why concurrent mutation is the core problem of agent-assisted development

A developer edits a module while an agent is mid-task on the same module, reasoning from the version it encountered earlier. Neither has a shared view of the other’s changes or their effects on dependent code. The changes clash before either reaches review. Each can make a choice that makes sense given their own view of the system, but the repository must eventually make room for both changes.

The distinguishing condition is concurrency. Agent work has moved from suggesting snippets to pursuing tickets end-to-end, so a single prompt can touch dozens of files and produce thousands of lines of diff. When several agents pursue separate tasks, their work can intersect through dependencies even when they do not edit the same files.

Each agent reasons from its own local context window instead of a model of the whole codebase that everyone shares as it changes. The repository remains the ground truth, but its existence does not make its relationships visible to every participant. Reading files is not enough to coordinate mutations. The missing surface must show what each change depends on and what it can affect while other work goes on.

What a "shared representation" actually requires, and why diffs and docs fail it

A shared representation must satisfy three requirements simultaneously. It must reflect the current state of every relevant relationship, be readable by humans and agents without translation, and update when a mutation lands. These requirements concern coordination. A representation that satisfies only one or two still leaves participants reasoning from different models.

A diff shows the transition between two states. It can identify changed lines without explaining the relationships that surround them after other changes land. Static architecture diagrams fail for a different reason. Drawn outside the repository and updated separately, they diverge from the code as soon as development moves beyond the state they depict.

Documentation records intent at a point in time, but it is not a machine-queryable structural model enforced against the implementation. Agents can read or edit prose without making the system’s actual relationships immediately legible to other participants. This is the common deficiency across these artifacts. They pass changes or explanations in one direction, leaving those involved without a shared surface where they can understand mutations as they happen.

How a live dependency graph satisfies all three requirements

A live dependency graph addresses currency by updating on every commit rather than waiting for a scheduled rebuild of an architectural snapshot. The committed structure becomes the structure available for queries. That is a concrete synchronization point. Its value is that every participant’s structural questions refer to the same updated model.

The graph addresses machine readability by representing dependencies as relationships that an agent can query directly. An agent can identify which modules a file depends on, trace the dependants of an interface, or test a dependency direction against architectural rules. These are structural questions with deterministic answers within the modeled graph. They do not require an agent to reconstruct the architecture from prose each time it begins a task.

For developers, the same structure becomes a navigable map. A developer can move through dependency nodes and bring commits, test coverage, and CI telemetry into view without reading every file. Runtime signals can enrich that view further. A latency shift or a newly exercised fallback path adds behavioral context to the declared structure, so the map can show how the system behaves as well as how its code connects.

To work well, agents already need an internal model of variable definitions, function signatures, imports, and file relationships so they can foresee breaking changes or circular dependencies. Sharing that model externalizes necessary context. Humans and agents can then interpret each other’s changes through the same relationships. The graph stops being a documentation artifact and becomes the active mutual surface through which mutations are understood.

The two-layer problem: code dependencies and agent dependencies are not the same graph

A code dependency graph alone cannot show how the agents changing the code are organized. Multiple agents also depend on tools, capabilities, memory states, and one another. Those relationships form a distinct layer. Knowing that one module imports another does not show which agent can change either module or how information reaches the tool that makes the change.

AgentFlow, submitted July 2026, formalizes this layer as the Agent Dependency Graph, or ADG. Its framework-agnostic representation models agents, prompts, models, capabilities, memory states, and control policies as typed nodes. Typed edges show component-dependency, control-flow, and data-flow relationships. The types preserve distinctions that a generic connection between components would conceal.

AgentFlow was implemented for five representative agent frameworks and evaluated on AgentZoo, a corpus of 5,399 real-world agent programs. When evaluated, it found 238 taint-style prompt-to-tool risks that existing code-syntax-based tools missed. These were paths through which untrusted input could propagate through prompts or memory to high-privilege tools. AgentFlow can also generate an Agent Bill of Materials, so supply-chain auditing can cover agent-native components.

The distinction has direct consequences for concurrent development. Framework constructors, tool decorators, and handoff declarations express dependencies that classical static analysis tools do not recover as agent relationships. Together, the code graph and the ADG describe both the modules a change can affect and the agent capabilities and information paths through which that change can occur.

What graph-aware CI enforcement actually looks like in a production multi-agent system

The most tractable enforcement role for the graph is architectural gatekeeping in CI. Architecture fitness functions encode structural rules, including dependency directions and layer constraints, as automated tests in the repository. A non-zero exit blocks a merge that breaks the rules.

Cloudflare’s multi-agent code review system illustrates the broader gating pattern at production scale. Across a month-long period, it handled hundreds of thousands of runs across tens of thousands of merge requests in thousands of repositories. Up to seven specialized review agents covered security, performance, code quality, documentation, release management, and compliance.

Cloudflare classifies merge requests into risk tiers according to the size and nature of the diff. Trivial changes get two agents, larger changes get more specialists, and full reviews above a line and file threshold bring in all seven. The graph-aware principle is to make that routing sensitive to the change’s dependency footprint, so the extent of review follows the potential reach of the mutation.

Blast radius gives this principle structural meaning. Files at low topological depth that are imported by many others while importing nothing can have a large downstream impact surface. The dependency graph makes that surface measurable before merge. Cloudflare’s adversarial-verification pattern adds a separate constraint at the agent layer, requiring that the agent checking a finding is never the agent that found it.

The objection that the graph is always a lagging approximation, and why enforcement answers it

Dynamic dependencies present the strongest objection to a live graph as a coordination surface. Service-to-service interactions, runtime-resolved paths, and feature-flag-gated code can change behavior without a corresponding change to the static dependency structure. Commit updates cannot capture all of that. Traditional graph databases are designed for static data, and refreshing a graph on commit does not automatically make its view of runtime behavior current.

Extending the graph with observed relationships keeps it useful while acknowledging its incomplete knowledge. Jaeger can supply distributed tracing signals, while OpenTelemetry can supply observability signals that annotate the structural map in near-real time. A latency shift or an exercised fallback path can then become visible as behavioral drift. The resulting graph remains an approximation, but one informed by execution as well as declarations in source code.

A separate weakness appears when an agent can change both the implementation and the tests used to judge it. A green CI run does not establish correctness if the assertions themselves have moved with the code. Structural enforcement cannot settle what a test should assert. The practical policy boundary is to treat test files as a protected zone whose changes require human approval, even when implementation changes can merge on automated evidence.

The Spec Growth Engine, proposed in a June 2026 paper, addresses another form of divergence, which it calls “silent spec-code drift.” Code evolves while its specification remains unchanged, allowing the mismatch to remain hidden until repair becomes costly. The proposed drift gate makes that divergence a blocking merge condition. Making the specification another node in the live graph links the written contract to changes in the implementation.

These limits change what the graph can promise. It cannot guarantee that every runtime relationship is known or that every assertion is correct. An imperfect shared model backed by enforcement is categorically more reliable than having no shared coordination surface at all.

How do developers steer AI agents through an interactive codebase graph?

Steering begins before an agent generates the diff. A developer uses the architectural model to define constraints on the work, while the agent uses the same relationships to evaluate the impact of its proposed changes. The graph becomes an input to planning and execution.

A Dynamic Agent Org applies the same principle to the organization performing the work. Its graph changes during execution by adding or removing agents, redirecting dependencies, and collapsing parallel branches as new evidence arrives. Tests that fail or API specifications that change can reshape that structure. In sophisticated production systems, the live graph shows both the code being developed and how the agents doing the work are arranged as that changes.

Active lineage provides a concrete example of proactive constraint. Column-level data lineage shows which downstream dashboards, models, and reports read data from which upstream sources. Before proposing a schema change, an agent can use those relationships to check how its effects could cascade. The dependency map supplies context at the point of decision instead of leaving a human reviewer to discover downstream breakage after the proposal is complete.

The developer moves from reading every generated line to setting architectural constraints, approving changes to protected zones, and watching the map for drift. As agents produce code faster than reviewers can check it, that distinction decides whether keeping the design intact depends on a growing queue of manual checks or on constraints used throughout the work.

For a team adopting this model, the first step is to initialize a graph from the existing repository, mapping modules, files, classes, functions, and call relationships. The graph must become a first-class artifact that lives in the repository and versions with the code. Architectural constraint checks in CI then close the loop by blocking merges that violate its rules. A navigable map enables understanding, but a shared, enforceable model makes that understanding govern what developers and agents can change.

Sources

  1. AgentFlow: Building Agent Dependency Graphs for Static Analysis of Agent Programs
  2. [2607.01640v1] AgentFlow: Building Agent Dependency Graphs for Static Analysis of Agent Programs
  3. AI Agents for Software Engineering: 2026 Guide

More in Agentic Coding Workflows