<?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: Mutharasu Archunan</title>
    <description>The latest articles on DEV Community by Mutharasu Archunan (@mutharasu_archunan).</description>
    <link>https://dev.to/mutharasu_archunan</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3785042%2F9c047e86-c3ed-4fed-afb8-3411e83b9849.jpg</url>
      <title>DEV Community: Mutharasu Archunan</title>
      <link>https://dev.to/mutharasu_archunan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mutharasu_archunan"/>
    <language>en</language>
    <item>
      <title>The 3 Things AI Coding Agents Still Can't Do (And How I Fixed Them)</title>
      <dc:creator>Mutharasu Archunan</dc:creator>
      <pubDate>Wed, 08 Apr 2026 11:11:10 +0000</pubDate>
      <link>https://dev.to/mutharasu_archunan/the-3-things-ai-coding-agents-still-cant-do-and-how-i-fixed-them-406l</link>
      <guid>https://dev.to/mutharasu_archunan/the-3-things-ai-coding-agents-still-cant-do-and-how-i-fixed-them-406l</guid>
      <description>&lt;p&gt;I've been using AI coding agents — Claude Code, GitHub Copilot, Cursor — daily across 11 production microservices for the past year. They've transformed how I work. But they keep failing at the same three things.&lt;/p&gt;

&lt;p&gt;This isn't a rant. This is a problem statement with a solution I built and open-sourced.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 1: Context Rot
&lt;/h2&gt;

&lt;p&gt;AI agents lose track of what matters during longer sessions. Even with 1M token context windows, having a massive database without proper indexing doesn't help — the data exists, but retrieval is inefficient.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real example:&lt;/strong&gt; I asked Claude to add rate limiting to a payment endpoint. It read the file, saw no existing rate limiter, and built one from scratch. There was already a rate limiting module in &lt;code&gt;src/middleware/rate_limiter.py&lt;/code&gt; with 200 lines of battle-tested code. Claude just didn't see it because it was two directories away.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 2: No Decision Awareness
&lt;/h2&gt;

&lt;p&gt;AI doesn't know WHY your code is the way it is.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real example:&lt;/strong&gt; Claude suggested switching our auth tokens from EdDSA to RS256 "for broader compatibility." Our team specifically chose EdDSA six months ago because our compliance team required it for a security audit. That decision existed in a PR description that Claude never saw.&lt;/p&gt;

&lt;p&gt;The agent was technically correct. It was contextually wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 3: Quality Drift
&lt;/h2&gt;

&lt;p&gt;AI-generated code prioritizes speed over project conventions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real example:&lt;/strong&gt; Our project uses async handlers everywhere — 100% consistency across 46 handler files. Claude generated a sync handler. It worked. Tests passed. But it broke the convention, and the next developer who saw it started writing sync handlers too. One exception became a pattern.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Root Cause
&lt;/h2&gt;

&lt;p&gt;Every AI context tool solves &lt;strong&gt;what code exists&lt;/strong&gt; — code graphs, RAG, embeddings. Nobody solves &lt;strong&gt;why code exists&lt;/strong&gt;, &lt;strong&gt;what rules apply&lt;/strong&gt;, and &lt;strong&gt;whether the context is still valid&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/MutharasuArchunan13/codebase-intel" rel="noopener noreferrer"&gt;codebase-intel&lt;/a&gt;&lt;/strong&gt; — an open-source platform that provides AI agents with three things no other tool offers:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Decision Journal
&lt;/h3&gt;

&lt;p&gt;Structured records of WHY decisions were made, linked to specific code locations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;DEC-042&lt;/span&gt;
&lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Use&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;token&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;bucket&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;for&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;rate&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;limiting"&lt;/span&gt;
&lt;span class="na"&gt;context&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Payment&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;endpoint&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;hammered&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;during&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;flash&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;sales"&lt;/span&gt;
&lt;span class="na"&gt;decision&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Token&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;bucket,&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;per-user&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;buckets,&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;100&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;req/min"&lt;/span&gt;
&lt;span class="na"&gt;alternatives&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;sliding_window&lt;/span&gt;
    &lt;span class="na"&gt;rejection_reason&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Memory&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;overhead&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;too&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;high&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;at&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;scale"&lt;/span&gt;
&lt;span class="na"&gt;constraints&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Must&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;not&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;add&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;gt;2ms&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;p99&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;latency"&lt;/span&gt;
    &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;sla&lt;/span&gt;
    &lt;span class="na"&gt;is_hard&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="na"&gt;code_anchors&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;src/middleware/rate_limiter.py:15-82"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are &lt;strong&gt;auto-mined from git history&lt;/strong&gt;. Run &lt;code&gt;codebase-intel mine --save&lt;/code&gt; and it extracts decision candidates from commit messages and PR descriptions using keyword analysis. On our IDP backend, it found 16 decision candidates automatically.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Quality Contracts
&lt;/h3&gt;

&lt;p&gt;Not linting. Project-specific architectural rules that AI reads BEFORE generating code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;rules&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;async-handlers&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;All handlers must be async&lt;/span&gt;
    &lt;span class="na"&gt;severity&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;error&lt;/span&gt;
    &lt;span class="na"&gt;pattern&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;(?&amp;lt;!async&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s"&gt;s)def&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s"&gt;s+(get_|post_|create_)"&lt;/span&gt;
    &lt;span class="na"&gt;fix_suggestion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Use&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;async&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;def&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;for&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;handlers"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The killer feature: auto-detection.&lt;/strong&gt; Run &lt;code&gt;codebase-intel detect-patterns --save&lt;/code&gt; and it scans your codebase to find patterns you already follow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┏━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┓
┃ # ┃ Pattern                ┃ Confidence ┃ Follows ┃ Violates ┃
┡━━━╇━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━┩
│ 1 │ Async handlers         │       100% │      46 │        0 │
│ 2 │ Layer separation       │        96% │     132 │        5 │
│ 3 │ Service class naming   │        90% │      35 │        0 │
│ 4 │ Custom exceptions      │       100% │      47 │        0 │
│ 5 │ Docstring convention   │        88% │     793 │      108 │
└───┴────────────────────────┴────────────┴─────────┴──────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Zero manual contract writing. The tool discovers what your team already does and generates rules from it.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Drift Detection
&lt;/h3&gt;

&lt;p&gt;Context rots. Decisions go stale. Code anchors point to deleted files. codebase-intel detects this:&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="nv"&gt;$ &lt;/span&gt;codebase-intel drift

Overall: MEDIUM
- Decision DEC-012 anchored to deleted file
- Decision DEC-008 is past its review &lt;span class="nb"&gt;date&lt;/span&gt;
- 2 files changed since last graph index
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Benchmarks
&lt;/h2&gt;

&lt;p&gt;Tested on 4 production codebases:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Project&lt;/th&gt;
&lt;th&gt;Without Tool&lt;/th&gt;
&lt;th&gt;With codebase-intel&lt;/th&gt;
&lt;th&gt;Reduction&lt;/th&gt;
&lt;th&gt;Decisions Surfaced&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;FastAPI monolith (359 files)&lt;/td&gt;
&lt;td&gt;16,063 tokens&lt;/td&gt;
&lt;td&gt;5,955 tokens&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;63%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;13&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Microservice (358 files)&lt;/td&gt;
&lt;td&gt;14,611&lt;/td&gt;
&lt;td&gt;5,955&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;59%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Microservice (153 files)&lt;/td&gt;
&lt;td&gt;5,904&lt;/td&gt;
&lt;td&gt;1,476&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;75%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The token reduction is nice. But the real value is the &lt;strong&gt;13 decisions surfaced&lt;/strong&gt; — those are constraints, trade-offs, and rejected alternatives that would have been invisible to the agent.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AI Agent → MCP Server → Context Orchestrator
                              ↓
                    ┌─────────┼─────────┐
                    ↓         ↓         ↓
              Code Graph  Decisions  Contracts
              (19 langs)  (git-mined) (auto-detected)
                    ↓         ↓         ↓
                    └─────────┼─────────┘
                              ↓
                        Drift Detector
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent asks "what do I need to know to work on this file?" and gets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Relevant files (from the code graph)&lt;/li&gt;
&lt;li&gt;Applicable decisions (linked to this code area)&lt;/li&gt;
&lt;li&gt;Quality rules to follow&lt;/li&gt;
&lt;li&gt;Warnings about stale context&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All fitted within a token budget, prioritized by relevance.&lt;/p&gt;

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



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;codebase-intel
&lt;span class="nb"&gt;cd &lt;/span&gt;your-project
codebase-intel init              &lt;span class="c"&gt;# build graph, mine decisions&lt;/span&gt;
codebase-intel detect-patterns &lt;span class="nt"&gt;--save&lt;/span&gt;  &lt;span class="c"&gt;# auto-generate contracts&lt;/span&gt;
codebase-intel benchmark         &lt;span class="c"&gt;# see before/after numbers&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Claude Code, add to &lt;code&gt;~/.claude/settings.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"codebase-intel"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"codebase-intel"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"serve"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/path/to/project"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  It's Not a Competition
&lt;/h2&gt;

&lt;p&gt;Tools like code-review-graph (6.3K stars) are excellent for code graphs. Cursor and Copilot are great for autocomplete. We don't replace any of them.&lt;/p&gt;

&lt;p&gt;We fill the gap none of them address: &lt;strong&gt;why does this code exist, what rules must AI follow, and is the context still valid?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd Love Feedback On
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;What patterns should the auto-detector look for in your stack?&lt;/li&gt;
&lt;li&gt;What quality rules would you want enforced in your project?&lt;/li&gt;
&lt;li&gt;Are there decision types we're missing?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/MutharasuArchunan13/codebase-intel" rel="noopener noreferrer"&gt;MutharasuArchunan13/codebase-intel&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;PyPI:&lt;/strong&gt; &lt;code&gt;pip install codebase-intel&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;License:&lt;/strong&gt; MIT&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
