<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nacho Aldama</title>
    <description>The latest articles on DEV Community by Nacho Aldama (@nachoaldamav).</description>
    <link>https://dev.to/nachoaldamav</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F561031%2Fcd329f5f-40aa-46b1-8d1d-610385d6612a.png</url>
      <title>DEV Community: Nacho Aldama</title>
      <link>https://dev.to/nachoaldamav</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nachoaldamav"/>
    <language>en</language>
    <item>
      <title>Your AI Coding Agent Needs a Dependency Graph, Not Just a Repository</title>
      <dc:creator>Nacho Aldama</dc:creator>
      <pubDate>Wed, 09 Sep 2026 13:00:34 +0000</pubDate>
      <link>https://dev.to/nachoaldamav/your-ai-coding-agent-needs-a-dependency-graph-not-just-a-repository-m8n</link>
      <guid>https://dev.to/nachoaldamav/your-ai-coding-agent-needs-a-dependency-graph-not-just-a-repository-m8n</guid>
      <description>&lt;p&gt;Tools like Claude and Cursor can generate a clean component in a couple of seconds. But generating isolated code is the easy part. The actual challenge is modifying a production system without breaking things three steps away.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Disclaimer:&lt;/strong&gt; I work at Bit, and this post is based on what I've seen while working on the product.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Right now, we feed agents raw repository trees. That gives them source text, but it rarely exposes the operational context they actually need: component boundaries, published APIs, downstream consumers, or build dependencies. &lt;/p&gt;

&lt;p&gt;If we want agents to do more than generate plausible-looking PRs, they need to navigate the codebase the way a senior engineer does: through an explicit dependency graph.&lt;/p&gt;

&lt;h2&gt;
  
  
  A repository snapshot is rarely the whole system
&lt;/h2&gt;

&lt;p&gt;Take a dead-simple schema tweak:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// before&lt;/span&gt;
&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Order&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;total&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// after&lt;/span&gt;
&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Order&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;totalCents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;TypeScript catches this rename when the consumers are visible to the same typecheck. Useful, but not the interesting failure.&lt;/p&gt;

&lt;p&gt;Now keep the field name and change only its meaning:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// before: dollars&lt;/span&gt;
&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Order&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;total&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// after: cents&lt;/span&gt;
&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Order&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;total&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Everything still compiles. A checkout that formats &lt;code&gt;12.99&lt;/code&gt; as &lt;code&gt;$12.99&lt;/code&gt; may now receive &lt;code&gt;1299&lt;/code&gt; and render &lt;code&gt;$1,299.00&lt;/code&gt;. An admin panel, mobile client, or partner webhook can make the same silent mistake.&lt;/p&gt;

&lt;p&gt;Ripple CI uses Bit's component graph to build the changed component and its affected dependents. For this change, a run could look like this:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;th&gt;What happened&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Orders API&lt;/td&gt;
&lt;td&gt;Changed&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;total&lt;/code&gt; now represents cents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Partner API&lt;/td&gt;
&lt;td&gt;Passed&lt;/td&gt;
&lt;td&gt;Contract test handles cents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Storefront&lt;/td&gt;
&lt;td&gt;Passed&lt;/td&gt;
&lt;td&gt;Doesn't display &lt;code&gt;total&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Checkout&lt;/td&gt;
&lt;td&gt;Failed&lt;/td&gt;
&lt;td&gt;Expected &lt;code&gt;$12.99&lt;/code&gt;, rendered &lt;code&gt;$1,299.00&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Admin Panel&lt;/td&gt;
&lt;td&gt;Passed&lt;/td&gt;
&lt;td&gt;Consumer tests remain green&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mobile App&lt;/td&gt;
&lt;td&gt;Running&lt;/td&gt;
&lt;td&gt;Dependent build in progress&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;There is no type error here. The graph identifies which consumers need to be exercised, and a consumer test or staging preview reveals the hidden assumption. Instead of getting a vague red pipeline hours later, the agent gets the exact failure and affected component, then proposes an update to Checkout for review.&lt;/p&gt;

&lt;p&gt;Those consumers may be maintained across different packages, workspaces, repositories, or teams.&lt;/p&gt;

&lt;p&gt;When an agent only sees the immediate repository, it finishes the task, prints a successful diff, and moves on. The breakage doesn’t show up until hours later when a completely different pipeline blows up in staging.&lt;/p&gt;

&lt;p&gt;If the agent can query an actual component graph, its behavior changes. Instead of guessing, it can check: &lt;em&gt;Who consumes this contract, where are they deployed, and what needs to be tested if I change this field?&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why component boundaries make better context
&lt;/h2&gt;

&lt;p&gt;Relying on text search (or even basic vector search) over a massive codebase produces noisy context. A component-driven architecture changes this by turning the system into a queryable graph:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Explicit public APIs versus internal implementation details&lt;/li&gt;
&lt;li&gt;Known upstream dependencies and downstream dependents&lt;/li&gt;
&lt;li&gt;Independent version history and ownership&lt;/li&gt;
&lt;li&gt;Discrete build and test targets for each piece&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of dumping twenty semi-relevant files into the prompt window, you give the agent an exact map of the software. It knows which files matter, which contracts are strictly enforced, and which services depend on the output.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://nx.dev/docs/features/ci-features/affected" rel="noopener noreferrer"&gt;Nx&lt;/a&gt; and &lt;a href="https://vercel.com/docs/monorepos/turborepo" rel="noopener noreferrer"&gt;Turborepo&lt;/a&gt; already do affected builds well inside a workspace or monorepo. Bit's claim here is different: component relationships remain explicit when versioned components are published and consumed across workspaces or repositories, and Bit Cloud pairs that graph with per-change staging and release workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  The feedback loop: from diff to repair
&lt;/h2&gt;

&lt;p&gt;Most agent workflows stall out after code generation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Prompt → Agent generates diff → Developer reviews raw code → CI breaks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A workable agent loop has to give the model feedback on the ripple effects of its changes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Fetch context → Isolated change → Preview environment → Downstream builds → Repair attempt → Review → Ship
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The useful part here is the repair attempt. If an agent makes a breaking change to a shared component, it can use downstream failure logs to identify broken callers, propose targeted patches, rerun the relevant builds, and return the result for review within the same session. It does not get to decide that the repair is correct.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hooking the Agent into the graph via MCP
&lt;/h2&gt;

&lt;p&gt;Developers don't need another proprietary chat interface; they want to use Cursor, Claude Code, or whatever workspace they already like. The bridge here is the Model Context Protocol (MCP).&lt;/p&gt;

&lt;p&gt;When you initialize a workspace with Bit (&lt;code&gt;bit init --agent cursor&lt;/code&gt; or &lt;code&gt;bit init --agent claude&lt;/code&gt;), Bit writes the relevant MCP configuration and editor-specific instructions. The configuration connects MCP-aware clients to Bit Cloud's hosted MCP endpoint and exposes tools such as &lt;code&gt;bit_remote_search&lt;/code&gt;, &lt;code&gt;bit_component_details&lt;/code&gt;, and &lt;code&gt;bit_create&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A typical interaction looks like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Developer:&lt;/strong&gt; Find the component that owns &lt;code&gt;Order&lt;/code&gt; before changing its contract.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Agent:&lt;/strong&gt; Uses &lt;code&gt;bit_remote_search&lt;/code&gt; to locate candidates, then &lt;code&gt;bit_component_details&lt;/code&gt; to inspect the selected component's API, version, and metadata.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That gives the agent enough context to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Find existing shared components before reinventing the wheel&lt;/li&gt;
&lt;li&gt;Inspect component APIs, versions, and metadata&lt;/li&gt;
&lt;li&gt;Create a component with the workspace's configured generator when needed&lt;/li&gt;
&lt;li&gt;Identify relevant dependencies before editing code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After the code changes, CI feedback comes through the Bit CLI rather than MCP. The &lt;code&gt;bit ripple&lt;/code&gt; commands expose job status, logs, and errors, and the generated agent instructions tell supported clients how to use them. The MCP tools provide component context; Ripple reports what happened after the change.&lt;/p&gt;

&lt;h2&gt;
  
  
  Diffs don't tell the whole story
&lt;/h2&gt;

&lt;p&gt;Code review for AI changes shouldn't just be scrolling through lines of green and red text. A diff can look spotless and still fall apart at runtime:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Did the styling break on mobile viewports?&lt;/li&gt;
&lt;li&gt;Does the actual authentication flow complete end-to-end?&lt;/li&gt;
&lt;li&gt;Did the shared design token change introduce contrast issues?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bit Cloud gives each change a staging environment with a real URL before approval. That shifts the human role from tedious line-by-line syntax checking to evaluating the actual running behavior.&lt;/p&gt;

&lt;p&gt;A passing build is evidence, not approval. The reviewer still needs to inspect the diff, tests, and preview, and decide whether the agent's repair preserves the intended behavior. Promotion remains an explicit human decision.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick start
&lt;/h2&gt;

&lt;p&gt;To initialize a workspace and scaffold the components from this example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install Bit and init workspace&lt;/span&gt;
npx @teambit/bvm &lt;span class="nb"&gt;install
&lt;/span&gt;bit init &lt;span class="nt"&gt;--default-scope&lt;/span&gt; acme.shop &lt;span class="nt"&gt;--agent&lt;/span&gt; cursor
bit create node entities/order
bit create react ui/order-summary
bit start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The example configures Cursor. Use &lt;code&gt;--agent claude&lt;/code&gt; instead if you're working with Claude Code.&lt;/p&gt;

&lt;p&gt;Once &lt;code&gt;ui/order-summary&lt;/code&gt; consumes the &lt;code&gt;Order&lt;/code&gt; contract and has a test for its displayed value, make the units change, then snap and export it to let the cloud graph run the downstream checks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bit snap &lt;span class="nt"&gt;--message&lt;/span&gt; &lt;span class="s2"&gt;"update order summary to cents"&lt;/span&gt;
bit &lt;span class="nb"&gt;export
&lt;/span&gt;bit ripple errors
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;bit ripple errors&lt;/code&gt; resolves the latest export job and returns the failures that need attention. In this example, the useful feedback is not another type error. It is the consumer failure showing that Checkout treated &lt;code&gt;1299&lt;/code&gt; cents as &lt;code&gt;1299&lt;/code&gt; dollars.&lt;/p&gt;

&lt;h2&gt;
  
  
  The useful part comes after the diff
&lt;/h2&gt;

&lt;p&gt;Coding agents are already fast enough at producing code. The slow part starts once the diff exists: finding affected consumers, waiting for CI, tracing failures across repositories, and checking whether the change works in a running environment.&lt;/p&gt;

&lt;p&gt;This is where the component graph becomes useful. It lets the agent follow a change beyond the files it edited and respond to the same build failures a developer would see. The result still needs review, but it can arrive with the affected components tested and a working preview instead of leaving that investigation for later.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://bit.cloud/" rel="noopener noreferrer"&gt;Try Bit Cloud&lt;/a&gt; · &lt;a href="https://bit.cloud/blog/the-new-bit-cloud" rel="noopener noreferrer"&gt;The New Bit Cloud&lt;/a&gt; · &lt;a href="https://bit.cloud/docs" rel="noopener noreferrer"&gt;Bit Cloud Documentation&lt;/a&gt; · &lt;a href="https://bit.cloud/docs/cloud-mcp/overview" rel="noopener noreferrer"&gt;Cloud MCP Overview&lt;/a&gt; · &lt;a href="https://github.com/teambit/bit/releases/tag/v2.0.0" rel="noopener noreferrer"&gt;Bit 2.0 Release Notes&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>webdev</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
