<?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: Tấn Đạt Trần</title>
    <description>The latest articles on DEV Community by Tấn Đạt Trần (@tn_ttrn_6dfb0a0044ad).</description>
    <link>https://dev.to/tn_ttrn_6dfb0a0044ad</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%2F4185955%2F9d8d3e9b-1c3a-4c59-8eba-efb184e048c1.jpg</url>
      <title>DEV Community: Tấn Đạt Trần</title>
      <link>https://dev.to/tn_ttrn_6dfb0a0044ad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tn_ttrn_6dfb0a0044ad"/>
    <language>en</language>
    <item>
      <title>Why AI Coding Agents Need Knowledge Graphs and Strict TDD</title>
      <dc:creator>Tấn Đạt Trần</dc:creator>
      <pubDate>Thu, 15 Oct 2026 06:04:06 +0000</pubDate>
      <link>https://dev.to/tn_ttrn_6dfb0a0044ad/why-ai-coding-agents-need-knowledge-graphs-and-strict-tdd-o09</link>
      <guid>https://dev.to/tn_ttrn_6dfb0a0044ad/why-ai-coding-agents-need-knowledge-graphs-and-strict-tdd-o09</guid>
      <description>&lt;h1&gt;
  
  
  Why AI Coding Agents Need Knowledge Graphs and Strict TDD
&lt;/h1&gt;

&lt;p&gt;Most AI coding agents (Claude Code, OpenAI Codex, OpenCode, DeepSeek Harness) write code fast, but they break architectures in large production codebases. &lt;/p&gt;

&lt;p&gt;Here are the 3 biggest problems with raw agents:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Blind Refactoring:&lt;/strong&gt; The agent edits a central "hub" file without knowing that 14 downstream modules depend on it, causing silent breaking changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;False Confidence:&lt;/strong&gt; Agents routinely hallucinate that their changes "work" without ever compiling, testing, or verifying actual behavior.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context Pollution:&lt;/strong&gt; Multi-file modifications quickly exhaust the agent's context window, degrading reasoning quality.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To fix this, I created &lt;strong&gt;&lt;a href="https://github.com/datit309/supergraph" rel="noopener noreferrer"&gt;Supergraph&lt;/a&gt;&lt;/strong&gt; — an open-source workflow and orchestration engine for AI coding agents.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Supergraph Does
&lt;/h2&gt;

&lt;p&gt;Supergraph enforces a strict 8-step engineering lifecycle on every task:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;scan → analyze → plan → TDD → execute → fix → verify → review&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Knowledge Graph &amp;amp; Blast Radius
&lt;/h3&gt;

&lt;p&gt;Powered by &lt;strong&gt;Codebase Memory MCP&lt;/strong&gt; (SQLite + ZSTD graph database) and &lt;strong&gt;Serena LSP&lt;/strong&gt;, Supergraph indexes your repository locally. Before proposing a single code change, it calculates the mathematical blast radius. If you attempt to modify a high-degree hub node or bridge node, it flags the risk immediately and halts reckless edits.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Enforced Test-Driven Development (TDD)
&lt;/h3&gt;

&lt;p&gt;Supergraph enforces a strict &lt;strong&gt;RED → GREEN → REFACTOR&lt;/strong&gt; cycle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;RED Phase:&lt;/strong&gt; The agent MUST write a failing test first, run it against the test suite, and record verified failing output into the system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GREEN Phase:&lt;/strong&gt; Only after failure verification is recorded does the agent gain permission to write the minimal production code needed to pass.&lt;/li&gt;
&lt;li&gt;No more fake claims or untested code!&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Multi-Agent Git Worktrees (&lt;code&gt;supergraph-team&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;For complex features or refactors, Supergraph schedules tasks as a Wave DAG. Each agent worker claims an isolated git worktree branch. Tasks execute in parallel without dirtying your main working tree. A verification gate checks tests and linter before merging back into main, with a live status dashboard running at &lt;code&gt;http://localhost:3333&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Autonomous Human Browser QA (&lt;code&gt;browser-agent&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;Built on native Rust CDP (&lt;code&gt;agent-browser&lt;/code&gt;, zero Playwright bloat). It bypasses anti-bot defenses using real browser profiles, captures token-efficient Accessibility Tree snapshots (&lt;code&gt;@ref&lt;/code&gt;), and executes 5-dimension ISTQB test matrices (UI + API + database fault injection).&lt;/p&gt;

&lt;h3&gt;
  
  
  5. ~75% Token Compression (&lt;code&gt;caveman&lt;/code&gt; mode)
&lt;/h3&gt;

&lt;p&gt;Built-in prompt engineering and tool-result pruning strip conversational fluff while keeping code and terminal outputs technically exact, saving token costs across multi-hour sessions.&lt;/p&gt;




&lt;h2&gt;
  
  
  Cross-Platform Support
&lt;/h2&gt;

&lt;p&gt;Supergraph runs identically across 5 agent platforms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Claude Code&lt;/strong&gt; (Marketplace / Plugin)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OpenAI Codex CLI&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Google Antigravity&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OpenCode&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DeepSeek Harness (DSH)&lt;/strong&gt; (Native Cordis bundle &amp;amp; preset)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;Install in one command (macOS/Linux/WSL):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/datit309/supergraph/master/install.sh | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or on Windows PowerShell 5.1+:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;irm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://raw.githubusercontent.com/datit309/supergraph/master/install.ps1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;iex&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Start your session with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/supergraph:scan       &lt;span class="c"&gt;# Ingest graph context&lt;/span&gt;
/supergraph:analyze    &lt;span class="c"&gt;# Risk &amp;amp; blast radius check&lt;/span&gt;
/supergraph:plan       &lt;span class="c"&gt;# Generate DAG plan&lt;/span&gt;
/supergraph:execute    &lt;span class="c"&gt;# Parallel git worktrees execution&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Open Source &amp;amp; Contributions
&lt;/h2&gt;

&lt;p&gt;Supergraph is 100% open-source under the MIT license:&lt;br&gt;
⭐ &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/datit309/supergraph" rel="noopener noreferrer"&gt;https://github.com/datit309/supergraph&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you find this approach useful, please drop a Star on GitHub! Pull requests for new skills, test runners, and platform integrations are warmly welcomed.&lt;/p&gt;

</description>
      <category>opensource</category>
    </item>
  </channel>
</rss>
