<?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: Siddharth Pandey</title>
    <description>The latest articles on DEV Community by Siddharth Pandey (@siddharth_pandey_27).</description>
    <link>https://dev.to/siddharth_pandey_27</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%2F1878784%2Fc5935d13-014b-42fe-a1ab-a9374ff32cbb.jpg</url>
      <title>DEV Community: Siddharth Pandey</title>
      <link>https://dev.to/siddharth_pandey_27</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/siddharth_pandey_27"/>
    <language>en</language>
    <item>
      <title>Three Commands to Make Claude Code Stop Guessing Your Infra</title>
      <dc:creator>Siddharth Pandey</dc:creator>
      <pubDate>Fri, 05 Jun 2026 18:30:45 +0000</pubDate>
      <link>https://dev.to/siddharth_pandey_27/three-commands-to-make-claude-code-stop-guessing-your-infra-2onj</link>
      <guid>https://dev.to/siddharth_pandey_27/three-commands-to-make-claude-code-stop-guessing-your-infra-2onj</guid>
      <description>&lt;p&gt;You asked Claude Code to add a query for orders by customer status. It generated a &lt;code&gt;.scan()&lt;/code&gt; with a &lt;code&gt;FilterExpression&lt;/code&gt;. Your Orders table has 50M rows and three functions already hammering the same partition key. Claude Code had no idea — it read your TypeScript files, not your AWS account.&lt;/p&gt;

&lt;p&gt;That's the problem. AI coding assistants are literate in your source code. They are blind to your infrastructure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Sidd27/infrawise" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; · &lt;a href="https://www.npmjs.com/package/infrawise" rel="noopener noreferrer"&gt;npm&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What Claude Code Actually Sees (and What It Doesn't)
&lt;/h2&gt;

&lt;p&gt;When Claude Code reads your codebase, it builds a model of your application: function names, variable patterns, the string &lt;code&gt;"Orders"&lt;/code&gt; passed to &lt;code&gt;DynamoDB.DocumentClient&lt;/code&gt;. It can follow call chains, infer intent, and generate syntactically correct code.&lt;/p&gt;

&lt;p&gt;What it cannot do is describe your actual infrastructure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It doesn't know which GSIs exist on your DynamoDB tables&lt;/li&gt;
&lt;li&gt;It doesn't know how your tables are partitioned or what sort keys you use&lt;/li&gt;
&lt;li&gt;It doesn't know that &lt;code&gt;listAllOrders()&lt;/code&gt; already does a full scan and costs $40/day&lt;/li&gt;
&lt;li&gt;It doesn't know that 5 functions already write to the same partition key on &lt;code&gt;Sessions&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So when you ask it to add a new query, it generates something that looks correct. It might use &lt;code&gt;.query()&lt;/code&gt; instead of &lt;code&gt;.scan()&lt;/code&gt;. But it'll query on an attribute with no index — because it has no way to know which attributes are indexed. It'll write a &lt;code&gt;FilterExpression&lt;/code&gt; that reads every item before filtering — which is exactly a scan, just spelled differently.&lt;/p&gt;

&lt;p&gt;The code compiles. Tests pass. The problem ships.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Three Commands That Close the Gap
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;infrawise&lt;/strong&gt; gives Claude Code deterministic knowledge of your infrastructure through the Model Context Protocol. Three commands get you there.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. &lt;code&gt;infrawise init&lt;/code&gt;&lt;/strong&gt;&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="nb"&gt;cd &lt;/span&gt;your-project
infrawise init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Runs once per project. Detects your AWS profile and region, asks which databases you use, and writes a single file: &lt;code&gt;infrawise.yaml&lt;/code&gt;. That's the only file it creates in your repository — one config, no framework, no SDK changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. &lt;code&gt;infrawise doctor&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;infrawise doctor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before you trust any analysis, verify that infrawise can actually reach your infrastructure. Doctor checks every configured adapter — DynamoDB, PostgreSQL, Lambda, S3 — and reports what's reachable.&lt;/p&gt;

&lt;p&gt;This step matters more than it sounds. If your AWS credentials are stale or your DB password rotated, &lt;code&gt;infrawise analyze&lt;/code&gt; will run against cached metadata from last week and give you confident-but-wrong context. Doctor catches this before you feed stale data to Claude Code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;✓ DynamoDB  Connected (profile: default)
✓ PostgreSQL  Connected
✗ Lambda  credentials expired
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fix what's broken, then move on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. &lt;code&gt;infrawise dev&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;infrawise dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The command you run while you work. It runs a fresh analysis of your repository and infrastructure, then starts an MCP server that Claude Code queries during code generation.&lt;/p&gt;

&lt;p&gt;If no analysis cache exists, it runs one automatically. If your infrastructure changes — you add a GSI, a new Lambda, a new table — run &lt;code&gt;infrawise dev&lt;/code&gt; again and the context updates.&lt;/p&gt;

&lt;p&gt;Register it with Claude Code once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add &lt;span class="nt"&gt;--transport&lt;/span&gt; http infrawise http://localhost:3000/mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From that point, every time Claude Code generates infrastructure-touching code, it queries this server first.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Claude Code Can See After You Run Them
&lt;/h2&gt;

&lt;p&gt;Here's what &lt;code&gt;infrawise analyze&lt;/code&gt; surfaces on a real project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Findings  3 total

1.  HIGH  Full table scan detected on DynamoDB table "Orders"
         listAllOrders() scans without any filter — reads every item in the table.
       → Replace Scan with Query using a partition key or add a GSI.

2.  MED   PostgreSQL table "users" has no index on column "email"
         Filtering on "email" causes sequential scans.
       → CREATE INDEX CONCURRENTLY idx_users_email ON users(email);

3.  MED   DynamoDB table "Sessions" accessed by 6 distinct code paths
         High access concentration may create hot partition issues at scale.
       → Consider write sharding or DynamoDB DAX for read-heavy workloads.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These aren't generic warnings. They name the function (&lt;code&gt;listAllOrders&lt;/code&gt;), the table (&lt;code&gt;Orders&lt;/code&gt;), and the exact fix (&lt;code&gt;CREATE INDEX CONCURRENTLY idx_users_email ON users(email)&lt;/code&gt;). The GSI recommendation for DynamoDB includes the exact config — attribute name, key type, projection — not a suggestion to "consider adding an index."&lt;/p&gt;

&lt;p&gt;When Claude Code queries the MCP server and gets this context:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It won't suggest &lt;code&gt;.scan()&lt;/code&gt; on &lt;code&gt;Orders&lt;/code&gt; — it knows the table has 50M rows and an existing high-severity finding&lt;/li&gt;
&lt;li&gt;It will use the correct partition key and GSI name when building a &lt;code&gt;.query()&lt;/code&gt; — because it knows both&lt;/li&gt;
&lt;li&gt;It won't recommend adding a GSI on &lt;code&gt;status&lt;/code&gt; — because it knows that GSI already exists&lt;/li&gt;
&lt;li&gt;It will note that &lt;code&gt;Sessions&lt;/code&gt; already has 6 access paths before adding a seventh&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You're not getting a smarter model. You're giving the existing model the facts it was missing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The gap between AI-generated code and production-safe code is mostly an information gap. Claude Code is capable of writing correct infrastructure queries — it just doesn't have your infrastructure. &lt;code&gt;infrawise init&lt;/code&gt; connects it. &lt;code&gt;infrawise doctor&lt;/code&gt; validates the connection. &lt;code&gt;infrawise dev&lt;/code&gt; keeps it current.&lt;/p&gt;

&lt;p&gt;Three commands. One config file. No changes to your application code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Takeaways&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Claude Code reads code, not cloud — that's the gap infrawise fills&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;infrawise init&lt;/code&gt; runs once and writes a single &lt;code&gt;infrawise.yaml&lt;/code&gt; to your project&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;infrawise doctor&lt;/code&gt; prevents you from trusting analysis built on stale or broken connections&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;infrawise dev&lt;/code&gt; keeps infra context fresh automatically and serves it over MCP&lt;/li&gt;
&lt;li&gt;Findings are specific: function name, table name, exact SQL or GSI config — not generic advice&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>claudecode</category>
      <category>mcp</category>
      <category>opensource</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Stop AI From Recommending Redundant Indexes on Existing GSIs</title>
      <dc:creator>Siddharth Pandey</dc:creator>
      <pubDate>Wed, 03 Jun 2026 17:15:28 +0000</pubDate>
      <link>https://dev.to/siddharth_pandey_27/stop-ai-from-recommending-redundant-indexes-on-existing-gsis-5lo</link>
      <guid>https://dev.to/siddharth_pandey_27/stop-ai-from-recommending-redundant-indexes-on-existing-gsis-5lo</guid>
      <description>&lt;h2&gt;
  
  
  Hook — The GSI Your AI Doesn't Know About
&lt;/h2&gt;

&lt;p&gt;You asked Claude Code to fix a slow query on your &lt;code&gt;Orders&lt;/code&gt; table. It came back with a recommendation: add a GSI on &lt;code&gt;customerId&lt;/code&gt; — index name &lt;code&gt;Orders-customerId-index&lt;/code&gt;, projection type &lt;code&gt;ALL&lt;/code&gt;. Clean, well-formatted, ready to paste into Terraform.&lt;/p&gt;

&lt;p&gt;Your &lt;code&gt;Orders&lt;/code&gt; table already has &lt;code&gt;Orders-customerId-index&lt;/code&gt;. Has had it for eight months.&lt;/p&gt;

&lt;p&gt;The AI read your code. It saw a &lt;code&gt;.query()&lt;/code&gt; call filtering on &lt;code&gt;customerId&lt;/code&gt;, noticed you weren't explicitly referencing an index name, and concluded one was missing. It never checked your actual DynamoDB table. It couldn't — it had no way to.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Sidd27/infrawise" rel="noopener noreferrer"&gt;infrawise&lt;/a&gt; fixes this by reading your real infrastructure first, before any code gets written.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why AI Gets GSIs Wrong Every Time
&lt;/h2&gt;

&lt;p&gt;AI coding assistants are good at reading code. They're not reading your AWS account.&lt;/p&gt;

&lt;p&gt;When Claude Code or Copilot sees this:&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;docClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;TableName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Orders&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;KeyConditionExpression&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;customerId = :cid&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;ExpressionAttributeValues&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;:cid&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;customerId&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It has two choices: assume you're using the table's partition key, or flag a potential missing index. Without explicit index name in the code, a cautious AI will suggest one. It's the right instinct — but the wrong answer, because the index already exists.&lt;/p&gt;

&lt;p&gt;The damage isn't just a wasted suggestion. It's the next step: a junior engineer applies the Terraform diff, CloudFormation complains about a duplicate index name, and now you've got an incident ticket. Or worse — the AI generates a second index with a slightly different name (&lt;code&gt;Orders-customerId-gsi&lt;/code&gt;), and now you're paying for duplicate write capacity on every &lt;code&gt;Orders&lt;/code&gt; write.&lt;/p&gt;




&lt;h2&gt;
  
  
  How infrawise Reads Your Actual GSI Definitions
&lt;/h2&gt;

&lt;p&gt;When you run &lt;code&gt;infrawise analyze&lt;/code&gt;, the DynamoDB adapter calls &lt;code&gt;DescribeTable&lt;/code&gt; on every table in your account. The response includes &lt;code&gt;GlobalSecondaryIndexes&lt;/code&gt; — the full list of indexes that actually exist, right now, in production:&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="s"&gt;GET /  →  DescribeTable { TableName&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Orders'&lt;/span&gt; &lt;span class="err"&gt;}&lt;/span&gt;

&lt;span class="na"&gt;Response&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;GlobalSecondaryIndexes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;IndexName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Orders-customerId-index&lt;/span&gt;
      &lt;span class="na"&gt;KeySchema&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[{&lt;/span&gt; &lt;span class="nv"&gt;AttributeName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;customerId&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;KeyType&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;HASH&lt;/span&gt; &lt;span class="pi"&gt;}]&lt;/span&gt;
      &lt;span class="na"&gt;Projection&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;ProjectionType&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;ALL&lt;/span&gt; &lt;span class="pi"&gt;}&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;IndexName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Orders-status-date-index&lt;/span&gt;
      &lt;span class="na"&gt;KeySchema&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[{&lt;/span&gt; &lt;span class="nv"&gt;AttributeName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;status&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;KeyType&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;HASH&lt;/span&gt; &lt;span class="pi"&gt;},&lt;/span&gt; &lt;span class="pi"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;AttributeName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;createdAt&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;KeyType&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;RANGE&lt;/span&gt; &lt;span class="pi"&gt;}]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These index names go directly into the graph as &lt;code&gt;uses_index&lt;/code&gt; edges on the table node. The graph now knows: &lt;code&gt;Orders&lt;/code&gt; has two GSIs, covering &lt;code&gt;customerId&lt;/code&gt; and the &lt;code&gt;status + createdAt&lt;/code&gt; composite pattern.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;MissingGSIAnalyzer&lt;/code&gt; checks for tables with query edges but zero &lt;code&gt;uses_index&lt;/code&gt; edges — tables your code queries that genuinely have no indexes at all. If &lt;code&gt;Orders&lt;/code&gt; has &lt;code&gt;uses_index&lt;/code&gt; edges, the analyzer doesn't fire for it. No false alarm, no redundant suggestion.&lt;/p&gt;




&lt;h2&gt;
  
  
  What the MCP Tools Surface Before You Write Anything
&lt;/h2&gt;

&lt;p&gt;Once &lt;code&gt;infrawise dev&lt;/code&gt; is running, Claude Code connects to it and the workflow changes. Before writing any query logic, the first call is &lt;code&gt;get_infra_overview&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;→ get_infra_overview

Tables:
  Orders          dynamodb
  Products        dynamodb
  UserSessions    dynamodb

High-severity findings: 0
Medium-severity findings: 1
  → UserSessions has no GSIs but is queried by 3 functions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Orders&lt;/code&gt; is there. No finding next to it — because it has indexes. The AI sees this and knows not to suggest new ones.&lt;/p&gt;

&lt;p&gt;If you then call &lt;code&gt;analyze_function&lt;/code&gt; on the function that queries &lt;code&gt;Orders&lt;/code&gt;, the response includes the existing &lt;code&gt;uses_index&lt;/code&gt; edges:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;→ analyze_function { function: "getOrdersByCustomer" }

Services accessed:
  Orders  (query, uses_index: Orders-customerId-index)

Findings: none
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The index name is right there. The AI writes the query with &lt;code&gt;IndexName: 'Orders-customerId-index'&lt;/code&gt; — not because it's smart, but because it's reading real data.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;suggest_gsi&lt;/code&gt; tool is explicit about its own limitation. Its description reads: &lt;em&gt;"Does not verify whether the GSI already exists; check the table schema in &lt;code&gt;get_infra_overview&lt;/code&gt; first."&lt;/em&gt; It's intentionally a generation tool, not a verification tool. Verification is &lt;code&gt;get_infra_overview&lt;/code&gt;. The workflow is: look first, generate only if it's missing.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The problem isn't that AI is careless. It's that AI is working from code, and code doesn't contain your infrastructure state. A &lt;code&gt;.query()&lt;/code&gt; call doesn't tell you whether the table has an index. A function name doesn't tell you what's deployed.&lt;/p&gt;

&lt;p&gt;infrawise bridges that gap by pulling live infrastructure state — &lt;code&gt;DescribeTable&lt;/code&gt;, real index names, real projection types — and exposing it through MCP before any code gets written. The AI stops suggesting indexes that exist because it can now see the ones that do.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install -g infrawise&lt;/code&gt;, run &lt;code&gt;infrawise init&lt;/code&gt; in your repo, then &lt;code&gt;infrawise dev&lt;/code&gt;. The first time Claude Code calls &lt;code&gt;get_infra_overview&lt;/code&gt; and sees your actual table schema, the redundant GSI suggestions stop.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Sidd27/infrawise" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; · &lt;a href="https://www.npmjs.com/package/infrawise" rel="noopener noreferrer"&gt;npm&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;AI suggests GSIs based on query patterns in code — it has no visibility into indexes that already exist in your AWS account&lt;/li&gt;
&lt;li&gt;infrawise calls &lt;code&gt;DescribeTable&lt;/code&gt; on every DynamoDB table and extracts the full &lt;code&gt;GlobalSecondaryIndexes&lt;/code&gt; list into the infrastructure graph&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;MissingGSIAnalyzer&lt;/code&gt; fires only on tables with &lt;strong&gt;zero&lt;/strong&gt; GSI coverage — tables that already have indexes don't trigger it&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get_infra_overview&lt;/code&gt; surfaces existing index names before any code is written; &lt;code&gt;analyze_function&lt;/code&gt; shows which index a specific query uses&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;suggest_gsi&lt;/code&gt; is a generation tool — call it only after &lt;code&gt;get_infra_overview&lt;/code&gt; confirms the index doesn't exist&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>opensource</category>
      <category>typescript</category>
      <category>dynamodb</category>
      <category>aws</category>
    </item>
    <item>
      <title>How infrawise Catches the DynamoDB Scan You Didn't Know You Were Making</title>
      <dc:creator>Siddharth Pandey</dc:creator>
      <pubDate>Mon, 01 Jun 2026 15:12:25 +0000</pubDate>
      <link>https://dev.to/siddharth_pandey_27/how-infrawise-catches-the-dynamodb-scan-you-didnt-know-you-were-making-40og</link>
      <guid>https://dev.to/siddharth_pandey_27/how-infrawise-catches-the-dynamodb-scan-you-didnt-know-you-were-making-40og</guid>
      <description>&lt;p&gt;Your Orders table has 50 million rows. Claude Code wrote a &lt;code&gt;listAllOrders()&lt;/code&gt; function that calls &lt;code&gt;.scan()&lt;/code&gt; with no filter. It compiled. Tests passed. Friday morning, your DynamoDB bill had a new line item.&lt;/p&gt;

&lt;p&gt;The problem isn't the AI — it's that the AI had no way to know. &lt;a href="https://github.com/Sidd27/infrawise" rel="noopener noreferrer"&gt;infrawise&lt;/a&gt; solves this by building a deterministic model of your actual infrastructure and exposing it through MCP before any code gets written. This post is about how the scan detection actually works under the hood.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Scanning the Repository with ts-morph
&lt;/h2&gt;

&lt;p&gt;When you run &lt;code&gt;infrawise analyze&lt;/code&gt;, the first pass is a TypeScript/JavaScript AST scan using ts-morph. infrawise walks every source file looking for database client call expressions — DynamoDB &lt;code&gt;DocumentClient.scan&lt;/code&gt;, &lt;code&gt;.query&lt;/code&gt;, &lt;code&gt;.get&lt;/code&gt;; PostgreSQL &lt;code&gt;pg.query&lt;/code&gt;; Mongoose model methods.&lt;/p&gt;

&lt;p&gt;For each call site it finds, it records three things: the containing function name, the target table or collection, and the operation type. A &lt;code&gt;.scan()&lt;/code&gt; call becomes an edge with type &lt;code&gt;scan&lt;/code&gt;. A &lt;code&gt;.query()&lt;/code&gt; call becomes a &lt;code&gt;query&lt;/code&gt; edge. These edges are the raw material for the graph.&lt;/p&gt;

&lt;p&gt;The limitation is real and documented: only TypeScript and JavaScript are supported. Dynamically constructed queries — where the table name or operation is assembled at runtime from a variable — may not resolve. infrawise handles what static analysis can handle and flags the rest.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2: Infrastructure Introspection
&lt;/h2&gt;

&lt;p&gt;In parallel, infrawise calls your AWS APIs directly. For DynamoDB it reads every table's actual schema: partition key, sort key, every GSI with its projection type and key schema, item count, billing mode. For Lambda it reads function configurations, memory, timeouts, and event source mappings. SQS queues, SNS topics, SSM parameters, Secrets Manager secrets, RDS instances, and CloudWatch log groups are all pulled the same way — deterministic API calls, no inference.&lt;/p&gt;

&lt;p&gt;This is what separates it from passing your Terraform files to an AI. Reading a &lt;code&gt;.tf&lt;/code&gt; file tells you what &lt;em&gt;should&lt;/em&gt; exist. Calling &lt;code&gt;dynamodb.describeTable&lt;/code&gt; tells you what &lt;em&gt;does&lt;/em&gt; exist, right now.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 3: Building the Graph
&lt;/h2&gt;

&lt;p&gt;The graph engine connects the AST output to the infrastructure metadata. Each DynamoDB table, Lambda function, SQS queue, and RDS instance becomes a node. The call sites from the AST scan become typed edges between function nodes and table nodes: &lt;code&gt;scan&lt;/code&gt;, &lt;code&gt;query&lt;/code&gt;, &lt;code&gt;get&lt;/code&gt;, &lt;code&gt;publishes_to&lt;/code&gt;, &lt;code&gt;uses_index&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The result is a queryable graph. You can ask: which function nodes have &lt;code&gt;scan&lt;/code&gt; edges pointing to the &lt;code&gt;Orders&lt;/code&gt; table node? That's exactly the query the &lt;code&gt;FullTableScanAnalyzer&lt;/code&gt; runs.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 4: The 24 Analyzers
&lt;/h2&gt;

&lt;p&gt;infrawise ships 24 rule-based analyzers. Each one is a graph traversal or a schema comparison — no model, no inference.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;FullTableScanAnalyzer&lt;/code&gt; calls &lt;code&gt;getScanEdges&lt;/code&gt;, which filters all graph edges where &lt;code&gt;type === 'scan'&lt;/code&gt;. For each edge that points to a DynamoDB table node, it records the table and the calling function, then emits a &lt;code&gt;HIGH&lt;/code&gt; severity finding. No threshold, no heuristic — any &lt;code&gt;.scan()&lt;/code&gt; on a DynamoDB table is flagged:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  1.  HIGH   Full table scan detected on DynamoDB table "Orders"
             The table "Orders" is being scanned without any filter,
             which reads every item. This is expensive and slow for
             large tables. Called from: listAllOrders
             → Replace Scan with a Query operation using a partition
               key or GSI. If filtering is required on non-key
               attributes, add a Global Secondary Index (GSI).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The other analyzers follow the same pattern. &lt;code&gt;MissingGSIAnalyzer&lt;/code&gt; finds tables that have &lt;code&gt;query&lt;/code&gt; edges but no &lt;code&gt;uses_index&lt;/code&gt; edges — tables being queried with no GSI coverage. &lt;code&gt;HotPartitionAnalyzer&lt;/code&gt; counts distinct function nodes with edges to the same table; at five or more, it fires &lt;code&gt;MEDIUM&lt;/code&gt;. &lt;code&gt;MissingIndexAnalyzer&lt;/code&gt; compares PostgreSQL query predicates against the introspected &lt;code&gt;pg_indexes&lt;/code&gt; view. &lt;code&gt;NplusOneAnalyzer&lt;/code&gt; looks for repeated query edges from the same function in a loop pattern. Every rule is structural.&lt;/p&gt;




&lt;h2&gt;
  
  
  How This Reaches Your AI Assistant
&lt;/h2&gt;

&lt;p&gt;Running &lt;code&gt;infrawise dev&lt;/code&gt; starts a Fastify MCP server on Streamable HTTP. Claude Code connects to it and can query 13 tools — &lt;code&gt;get_infra_overview&lt;/code&gt;, &lt;code&gt;analyze_function&lt;/code&gt;, &lt;code&gt;suggest_gsi&lt;/code&gt;, &lt;code&gt;postgres_index_suggestions&lt;/code&gt;, and others.&lt;/p&gt;

&lt;p&gt;When Claude Code is about to write a query against &lt;code&gt;Orders&lt;/code&gt;, it calls &lt;code&gt;analyze_function&lt;/code&gt; first. The response includes the table schema, any existing GSIs, and the scan finding if one was detected. The AI writes a &lt;code&gt;query&lt;/code&gt; with the correct partition key instead of a &lt;code&gt;scan&lt;/code&gt; — not because it's smarter, but because it now has the same information a senior engineer would check before touching the table.&lt;/p&gt;

&lt;p&gt;For Claude Desktop, &lt;code&gt;infrawise stdio&lt;/code&gt; starts the same server on stdio transport.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The scan finding is the most visible output, but the real work is the graph: AST edges from ts-morph connecting function call sites to infrastructure nodes from live AWS APIs, traversed by 24 deterministic rules. No LLM touches the analysis path.&lt;/p&gt;

&lt;p&gt;If you're running Claude Code against a codebase with DynamoDB tables, &lt;code&gt;npm install -g infrawise&lt;/code&gt; and &lt;code&gt;infrawise init&lt;/code&gt; in your repo. The first &lt;code&gt;infrawise analyze&lt;/code&gt; usually finds something your AI assistant would have gotten wrong.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Sidd27/infrawise" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; · &lt;a href="https://www.npmjs.com/package/infrawise" rel="noopener noreferrer"&gt;npm&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;infrawise uses ts-morph to parse TypeScript/JavaScript source into a graph of function-to-table edges, typed by operation (&lt;code&gt;scan&lt;/code&gt;, &lt;code&gt;query&lt;/code&gt;, &lt;code&gt;get&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;AWS infrastructure metadata comes from live API calls — not Terraform, not static files — so the graph reflects what actually exists.&lt;/li&gt;
&lt;li&gt;24 rule-based analyzers traverse the graph deterministically; &lt;code&gt;FullTableScanAnalyzer&lt;/code&gt; flags any &lt;code&gt;.scan()&lt;/code&gt; edge to a DynamoDB table as &lt;code&gt;HIGH&lt;/code&gt; with no threshold.&lt;/li&gt;
&lt;li&gt;Context is exposed through an MCP server (Streamable HTTP for Claude Code, stdio for Claude Desktop) so AI tools see findings before they generate code.&lt;/li&gt;
&lt;li&gt;The analysis path contains zero LLMs — every finding is a graph query or schema comparison.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>opensource</category>
      <category>typescript</category>
      <category>dynamodb</category>
      <category>mcp</category>
    </item>
    <item>
      <title>Git Knows Who. AI Knows What. Nobody Knows Why.</title>
      <dc:creator>Siddharth Pandey</dc:creator>
      <pubDate>Sun, 31 May 2026 11:24:18 +0000</pubDate>
      <link>https://dev.to/siddharth_pandey_27/git-knows-who-ai-knows-what-nobody-knows-why-1lha</link>
      <guid>https://dev.to/siddharth_pandey_27/git-knows-who-ai-knows-what-nobody-knows-why-1lha</guid>
      <description>&lt;p&gt;Modern software development has achieved incredible things.&lt;/p&gt;

&lt;p&gt;AI can generate entire features.&lt;/p&gt;

&lt;p&gt;Editors can autocomplete your thoughts before you've finished having them.&lt;/p&gt;

&lt;p&gt;Agents can open PRs while you're still reading the ticket.&lt;/p&gt;

&lt;p&gt;And yet, despite all this progress, there is still one question capable of ruining a senior engineer's afternoon:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Why the hell does this code exist?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Consider this innocent little gem:&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="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;distance&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Looks simple.&lt;/p&gt;

&lt;p&gt;AI can explain it.&lt;/p&gt;

&lt;p&gt;Git can tell you who wrote it.&lt;/p&gt;

&lt;p&gt;The PR can tell you when it was merged.&lt;/p&gt;

&lt;p&gt;But nobody can tell you why it was added in the first place.&lt;/p&gt;

&lt;p&gt;Was it reducing GPS noise?&lt;/p&gt;

&lt;p&gt;Was it preventing duplicate events?&lt;/p&gt;

&lt;p&gt;Was it added because thousands of devices were rapidly entering and exiting the same geofence?&lt;/p&gt;

&lt;p&gt;Was it a workaround for a production incident that woke up three engineers on a Sunday morning?&lt;/p&gt;

&lt;p&gt;We may never know.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Archaeology Phase of Software Engineering
&lt;/h2&gt;

&lt;p&gt;Every mature codebase eventually turns developers into archaeologists.&lt;/p&gt;

&lt;p&gt;You discover a mysterious piece of code and begin the sacred ritual:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Check Git blame.&lt;/li&gt;
&lt;li&gt;Open commit.&lt;/li&gt;
&lt;li&gt;Open PR.&lt;/li&gt;
&lt;li&gt;Open linked ticket.&lt;/li&gt;
&lt;li&gt;Ticket references a Slack discussion.&lt;/li&gt;
&lt;li&gt;Slack link is dead.&lt;/li&gt;
&lt;li&gt;Original author left the company.&lt;/li&gt;
&lt;li&gt;Team lead moved to another startup.&lt;/li&gt;
&lt;li&gt;Nobody remembers anything.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Congratulations.&lt;/p&gt;

&lt;p&gt;You have reached the end of the knowledge graph.&lt;/p&gt;

&lt;p&gt;The only remaining documentation is a comment that says:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Don't remove this&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thank you, mysterious engineer from 2023.&lt;/p&gt;

&lt;p&gt;Very helpful.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI Is About To Make This Much Worse
&lt;/h2&gt;

&lt;p&gt;The old workflow looked like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Human thinks
    ↓
Human writes code
    ↓
Human forgets why
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The new workflow looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Human writes ticket
    ↓
AI writes code
    ↓
Human edits code
    ↓
Another AI refactors code
    ↓
Reviewer requests changes
    ↓
Code reaches production
    ↓
Everyone forgets why
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We have successfully automated everything except remembering our decisions.&lt;/p&gt;

&lt;h2&gt;
  
  
  We Have Documentation Everywhere
&lt;/h2&gt;

&lt;p&gt;The funny thing is that companies already have mountains of documentation.&lt;/p&gt;

&lt;p&gt;The requirement is in Linear.&lt;/p&gt;

&lt;p&gt;The discussion is in Slack.&lt;/p&gt;

&lt;p&gt;The design is in Notion.&lt;/p&gt;

&lt;p&gt;The implementation is in GitHub.&lt;/p&gt;

&lt;p&gt;The AI conversation is in Cursor.&lt;/p&gt;

&lt;p&gt;The meeting notes are somewhere in a folder named:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Final_v2_Updated_Final_Real_Final
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The problem isn't missing information.&lt;/p&gt;

&lt;p&gt;The problem is that all the information lives in different universes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Git Answers The Wrong Question
&lt;/h2&gt;

&lt;p&gt;Git is fantastic.&lt;/p&gt;

&lt;p&gt;Ask Git:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Who changed this?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Git:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Bob.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Ask Git:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Git:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;February 14th, 2026.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Ask Git:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Why?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Git:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Commit message: "fix stuff"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Fantastic.&lt;/p&gt;

&lt;p&gt;Outstanding.&lt;/p&gt;

&lt;p&gt;Truly the pinnacle of human knowledge preservation.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Shortcut We Actually Need
&lt;/h2&gt;

&lt;p&gt;We already have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go To Definition&lt;/li&gt;
&lt;li&gt;Find References&lt;/li&gt;
&lt;li&gt;Rename Symbol&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What we don't have is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Ctrl + Y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which means:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Why is this here?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Imagine clicking a line of code and seeing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Reason:
Ignore GPS drift within 50 meters.

Requirement:
TRACKING-123

Discussion:
Customers reported phantom arrivals and departures.

Implementation:
PR #482

Generated by:
Cursor

Reviewer:
Sarah

Business Assumption:
Location updates within 50 meters are considered noise.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that's useful.&lt;/p&gt;

&lt;p&gt;Because most bugs aren't caused by developers not understanding code.&lt;/p&gt;

&lt;p&gt;They're caused by developers not understanding decisions.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Missing Layer
&lt;/h2&gt;

&lt;p&gt;For decades we've been obsessed with source code.&lt;/p&gt;

&lt;p&gt;Then we became obsessed with documentation.&lt;/p&gt;

&lt;p&gt;Now we're obsessed with AI code generation.&lt;/p&gt;

&lt;p&gt;Meanwhile the most valuable thing keeps disappearing:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The reasoning.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The chain actually looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Requirement
    ↓
Discussion
    ↓
Decision
    ↓
AI Generation
    ↓
Code Review
    ↓
  Code
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Today we only preserve the last two steps.&lt;/p&gt;

&lt;p&gt;Then six months later we hold a meeting to rediscover the first four.&lt;/p&gt;

&lt;h2&gt;
  
  
  Maybe This Is the Next Developer Tool
&lt;/h2&gt;

&lt;p&gt;What if a VS Code extension could answer:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Why does this code exist?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Not by hallucinating.&lt;/p&gt;

&lt;p&gt;Not by guessing.&lt;/p&gt;

&lt;p&gt;But by building a traceable chain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Requirement
    ↓
Discussion
    ↓
AI Session
    ↓
Code Review
    ↓
  Code
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Click a line.&lt;/p&gt;

&lt;p&gt;Press Ctrl+Y.&lt;/p&gt;

&lt;p&gt;Get the story.&lt;/p&gt;

&lt;p&gt;Not just the syntax.&lt;/p&gt;

&lt;h2&gt;
  
  
  Future Technical Debt
&lt;/h2&gt;

&lt;p&gt;People think AI-generated code is the next challenge.&lt;/p&gt;

&lt;p&gt;I disagree.&lt;/p&gt;

&lt;p&gt;The next challenge is AI-generated code with missing context.&lt;/p&gt;

&lt;p&gt;Code can be read.&lt;/p&gt;

&lt;p&gt;Logic can be reverse-engineered.&lt;/p&gt;

&lt;p&gt;Intent is much harder.&lt;/p&gt;

&lt;p&gt;And every year we're generating more code while preserving less reasoning.&lt;/p&gt;

&lt;p&gt;That's a dangerous trade.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thought
&lt;/h2&gt;

&lt;p&gt;Git knows who.&lt;/p&gt;

&lt;p&gt;AI knows what.&lt;/p&gt;

&lt;p&gt;Nobody knows why.&lt;/p&gt;

&lt;p&gt;And somewhere inside your production codebase is a line that nobody dares delete because the original author left three companies ago and the only documentation says:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Trust me&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which, historically, has never caused any problems.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How RAGScope Knows Which Chunks Your LLM Actually Used</title>
      <dc:creator>Siddharth Pandey</dc:creator>
      <pubDate>Sun, 31 May 2026 09:46:24 +0000</pubDate>
      <link>https://dev.to/siddharth_pandey_27/how-ragscope-knows-which-chunks-your-llm-actually-used-e5k</link>
      <guid>https://dev.to/siddharth_pandey_27/how-ragscope-knows-which-chunks-your-llm-actually-used-e5k</guid>
      <description>&lt;p&gt;Your retriever fetched 10 chunks. Your LLM only used 3. RAGScope shows a precision score of 30 out of 100. The question every new user asks: how does it know?&lt;/p&gt;

&lt;p&gt;There is no OpenTelemetry attribute that says "this chunk was in the context window." RAGScope infers it — and the way it does this is the most consequential piece of engineering in the whole tool.&lt;/p&gt;




&lt;h2&gt;
  
  
  There Is No "In Context" Attribute in OTel
&lt;/h2&gt;

&lt;p&gt;The OpenTelemetry semantic conventions for generative AI (&lt;code&gt;gen_ai.*&lt;/code&gt;) define attributes for model, input/output tokens, and retrieved documents. They do not define anything like &lt;code&gt;gen_ai.chunk.reached_llm&lt;/code&gt; or &lt;code&gt;gen_ai.retrieval.used_document_ids&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When your RETRIEVER span fires, you get a list of documents. When your LLM span fires, you get a prompt and a completion. The two spans are connected by a parent-child trace relationship — but there is no attribute that maps which retrieved documents appear in which prompt.&lt;/p&gt;

&lt;p&gt;This gap matters. A reranker might drop 7 of your 10 chunks. Your application code might apply a token budget and truncate 4 more. From the trace alone, you cannot tell.&lt;/p&gt;

&lt;p&gt;RAGScope needs this information to compute the precision sub-score — the highest-weighted metric at 40% of the overall score. Getting it wrong would make precision meaningless.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Substring Match — How &lt;code&gt;assembleContext&lt;/code&gt; Works
&lt;/h2&gt;

&lt;p&gt;RAGScope's answer is in &lt;code&gt;src/enrichment/pipeline.ts&lt;/code&gt;, in a function called &lt;code&gt;assembleContext&lt;/code&gt;:&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="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;assembleContext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;RagChunk&lt;/span&gt;&lt;span class="p"&gt;[],&lt;/span&gt; &lt;span class="nx"&gt;llmSpans&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ParsedSpan&lt;/span&gt;&lt;span class="p"&gt;[]):&lt;/span&gt; &lt;span class="nx"&gt;RagChunk&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;llmPrompts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;llmSpans&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;!!&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;llmPrompts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;position&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;inContext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;llmPrompts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;some&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;inContext&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;inContext&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;contextPosition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;position&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;inContext&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;contextPosition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The approach: collect the raw prompt strings from every LLM span in the trace, then check whether each chunk's content appears as a literal substring of any of those prompts.&lt;/p&gt;

&lt;p&gt;If your LLM span records its prompt in the &lt;code&gt;input&lt;/code&gt; attribute — which TraceAI, Traceloop, and OpenTelemetry's gen_ai conventions all do — and your retriever span records the chunk content in &lt;code&gt;gen_ai.retrieval.documents&lt;/code&gt; — RAGScope has everything it needs.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;contextPosition&lt;/code&gt; counter assigns an incrementing index to each in-context chunk in the order they are encountered during the &lt;code&gt;chunks.map()&lt;/code&gt; iteration — which follows retrieval rank, not prompt position. It tracks which retrieved chunks are in context and their relative order among in-context chunks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why substring matching works
&lt;/h3&gt;

&lt;p&gt;Frameworks like LangChain and LlamaIndex build LLM prompts by concatenating retrieved chunk contents, often wrapped in minimal formatting like &lt;code&gt;Context:\n{chunk}\n&lt;/code&gt;. The chunk text itself is usually present verbatim. As long as the chunk content recorded on the RETRIEVER span matches what was injected into the prompt string — which it does when both come from the same retrieval call — substring matching is reliable.&lt;/p&gt;

&lt;p&gt;The constraint: &lt;code&gt;chunk.content&lt;/code&gt; must be non-empty and non-null. RAGScope only stores content when the RETRIEVER span includes it in the documents array. If your instrumentation omits content and only records chunk IDs, &lt;code&gt;assembleContext&lt;/code&gt; cannot match, and precision will read 0% until content is included.&lt;/p&gt;




&lt;h2&gt;
  
  
  What This Means for Your Precision Score
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;scoreRetrieval&lt;/code&gt; in &lt;code&gt;src/audit/scorer.ts&lt;/code&gt; uses the &lt;code&gt;inContext&lt;/code&gt; flag directly:&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="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;scoreRetrieval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;RagChunk&lt;/span&gt;&lt;span class="p"&gt;[]):&lt;/span&gt; &lt;span class="nx"&gt;SubScore&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;used&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;inContext&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;score&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;used&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;precision&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;score&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;finding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;used&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; chunks used`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;recommendation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="nx"&gt;score&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;
        &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="s2"&gt;`Reduce TOP_K &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;→&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;used&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt; (only &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;used&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; chunks reached LLM)`&lt;/span&gt;
        &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If 3 of 10 chunks appear in the LLM prompt, precision = 30. The recommendation fires automatically: &lt;code&gt;Reduce TOP_K 10→3&lt;/code&gt;. The score contributes 40% to the overall — a 30 on precision alone floors your overall score to at most 43, even if efficiency, redundancy, and coverage are perfect.&lt;/p&gt;

&lt;p&gt;This is the most common cause of FAIL scores: teams set &lt;code&gt;TOP_K=10&lt;/code&gt; during early experimentation and never reduce it. Ten chunks get retrieved. Three reach the LLM. The other seven waste token budget and push the efficiency score down too.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;--verbose&lt;/code&gt; flag makes this explicit. Each sub-score prints with its finding:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   ✗  precision    30/100  3/10 chunks used
   ✗  efficiency   45/100  55% tokens wasted
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the Recommendations section:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; Recommendations
   → Reduce TOP_K 10→3 (only 3 chunks reached LLM)
   → 55% of retrieved tokens never reached the LLM
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  When precision reads 0% unexpectedly
&lt;/h3&gt;

&lt;p&gt;If your trace has no LLM spans — for example, you're testing your retriever in isolation — &lt;code&gt;llmPrompts&lt;/code&gt; will be empty and &lt;code&gt;assembleContext&lt;/code&gt; returns all chunks unchanged with &lt;code&gt;inContext: false&lt;/code&gt;. In that case, &lt;code&gt;scoreRetrieval&lt;/code&gt; sees zero used chunks over a non-zero total, and precision reads 0.&lt;/p&gt;

&lt;p&gt;If your trace has no chunks at all, &lt;code&gt;scoreRetrieval&lt;/code&gt; short-circuits to a score of 100 with the finding &lt;code&gt;no chunks&lt;/code&gt; — the assumption being that a trace with no retrieved chunks represents a non-retrieval query that shouldn't be penalized.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;RAGScope's precision score is only meaningful because &lt;code&gt;assembleContext&lt;/code&gt; solves the hardest observability problem in RAG pipelines: figuring out which retrieved chunks actually reached the model. It does this by checking chunk content against LLM prompt strings — no extra instrumentation, no special attributes, no embeddings.&lt;/p&gt;

&lt;p&gt;The implication for your setup: include chunk content in your RETRIEVER spans. Without it, &lt;code&gt;assembleContext&lt;/code&gt; cannot match, precision stays at zero, and the most impactful metric in your audit is blind. With it, you get the exact number that tells you whether your &lt;code&gt;TOP_K&lt;/code&gt; setting is costing you context budget.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try it:&lt;/strong&gt; &lt;a href="https://github.com/Sidd27/ragscope" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; · &lt;a href="https://www.npmjs.com/package/ragscope" rel="noopener noreferrer"&gt;npm&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;OTel has no "in context" attribute — RAGScope determines LLM context inclusion by checking if chunk content is a substring of the LLM span's prompt string&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;assembleContext&lt;/code&gt; in &lt;code&gt;src/enrichment/pipeline.ts&lt;/code&gt; performs this matching; &lt;code&gt;contextPosition&lt;/code&gt; tracks relative order among in-context chunks (by retrieval rank, not prompt position)&lt;/li&gt;
&lt;li&gt;Precision is 40% of the overall score — a low precision score is the most common cause of FAIL labels&lt;/li&gt;
&lt;li&gt;If chunk content is missing from your RETRIEVER spans, precision will read 0%; include content in your instrumentation to get accurate scores&lt;/li&gt;
&lt;li&gt;The automatic recommendation (&lt;code&gt;Reduce TOP_K N→M&lt;/code&gt;) fires when precision &amp;lt; 60%, giving a concrete action to take immediately&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>rag</category>
      <category>opensource</category>
      <category>observability</category>
      <category>llm</category>
    </item>
    <item>
      <title>Node.js Just Closed a Major Gap with Deno and Bun</title>
      <dc:creator>Siddharth Pandey</dc:creator>
      <pubDate>Sat, 30 May 2026 10:00:39 +0000</pubDate>
      <link>https://dev.to/siddharth_pandey_27/nodejs-just-closed-a-major-gap-with-deno-and-bun-4hji</link>
      <guid>https://dev.to/siddharth_pandey_27/nodejs-just-closed-a-major-gap-with-deno-and-bun-4hji</guid>
      <description>&lt;p&gt;Node.js just closed one of its biggest architectural gaps with Deno and Bun, and honestly, as someone who has lost a non-zero amount of life expectancy to &lt;code&gt;node-gyp&lt;/code&gt;, I'm happy about it.&lt;/p&gt;

&lt;p&gt;As of &lt;strong&gt;Node.js 26.1 (May 2026)&lt;/strong&gt;, we finally have an experimental built-in &lt;strong&gt;FFI module (&lt;code&gt;node:ffi&lt;/code&gt;)&lt;/strong&gt;. 🎉&lt;/p&gt;

&lt;h3&gt;
  
  
  The old ritual
&lt;/h3&gt;

&lt;p&gt;Need to call a native C/C++ library?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Write a C++ addon.&lt;/li&gt;
&lt;li&gt;Fight with &lt;code&gt;binding.gyp&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Install build tools.&lt;/li&gt;
&lt;li&gt;Discover that it works on your machine and nowhere else.&lt;/li&gt;
&lt;li&gt;Question your career choices.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The new way
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;DynamicLibrary&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;suffix&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;node:ffi&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;lib&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;DynamicLibrary&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`libsqlite3.&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;suffix&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sqlite3_libversion&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;lib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getFunction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sqlite3_libversion&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;result&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;sqlite3_libversion&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it.&lt;/p&gt;

&lt;p&gt;No wrapper project.&lt;/p&gt;

&lt;p&gt;No C++ glue code.&lt;/p&gt;

&lt;p&gt;No sacrificing a goat to the cross-platform compilation gods.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why this matters
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Direct access to native libraries from JavaScript.&lt;/li&gt;
&lt;li&gt;Easier integration with Rust, C, and existing system libraries.&lt;/li&gt;
&lt;li&gt;Smaller dependency trees.&lt;/li&gt;
&lt;li&gt;Much nicer experience for IoT, embedded systems, and vendor SDKs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before this, reaching native code from Node often felt like opening a side quest you never signed up for.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reality check
&lt;/h3&gt;

&lt;p&gt;It's still &lt;strong&gt;experimental&lt;/strong&gt; and FFI won't magically outperform optimized N-API addons. If you're calling a function millions of times per second, native addons still win.&lt;/p&gt;

&lt;p&gt;But for most integrations?&lt;/p&gt;

&lt;p&gt;This removes a surprising amount of friction.&lt;/p&gt;

&lt;p&gt;Node has spent years becoming more batteries-included. Native &lt;code&gt;fetch&lt;/code&gt;, built-in test runner, built-in dotenv support, TypeScript support, and now FFI.&lt;/p&gt;

&lt;p&gt;For backend developers, this is one of those features that won't make headlines outside our bubble, but it will quietly remove a lot of pain.&lt;/p&gt;

&lt;p&gt;And if this means I touch &lt;code&gt;binding.gyp&lt;/code&gt; less often, that's already a successful release.&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
      <category>fullstack</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Why Runtime Reality Breaks Static Assumptions</title>
      <dc:creator>Siddharth Pandey</dc:creator>
      <pubDate>Sun, 17 May 2026 05:48:18 +0000</pubDate>
      <link>https://dev.to/siddharth_pandey_27/why-runtime-reality-breaks-static-assumptions-9dk</link>
      <guid>https://dev.to/siddharth_pandey_27/why-runtime-reality-breaks-static-assumptions-9dk</guid>
      <description>&lt;p&gt;Most AI systems today reason about infrastructure as if it is static.&lt;/p&gt;

&lt;p&gt;A snapshot of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;code&lt;/li&gt;
&lt;li&gt;configs&lt;/li&gt;
&lt;li&gt;schemas&lt;/li&gt;
&lt;li&gt;deployment definitions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But real systems are not static.&lt;/p&gt;

&lt;p&gt;They evolve constantly.&lt;/p&gt;

&lt;p&gt;Sometimes intentionally.&lt;/p&gt;

&lt;p&gt;Sometimes because somebody made a “temporary workaround” 11 months ago and now the company is emotionally dependent on it.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Gap Between “Declared” and “Running”
&lt;/h2&gt;

&lt;p&gt;There is always a gap between:&lt;/p&gt;

&lt;h3&gt;
  
  
  What is declared
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Terraform&lt;/li&gt;
&lt;li&gt;CloudFormation&lt;/li&gt;
&lt;li&gt;CDK&lt;/li&gt;
&lt;li&gt;configs&lt;/li&gt;
&lt;li&gt;architecture diagrams nobody updated since 2023&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What is actually running
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;hotfixes&lt;/li&gt;
&lt;li&gt;partial rollouts&lt;/li&gt;
&lt;li&gt;deprecated services still somehow alive&lt;/li&gt;
&lt;li&gt;environment drift&lt;/li&gt;
&lt;li&gt;shadow dependencies&lt;/li&gt;
&lt;li&gt;“temporary” scripts promoted directly into production&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AI systems mostly reason over the declared layer.&lt;/p&gt;

&lt;p&gt;Production lives in the running layer.&lt;/p&gt;

&lt;p&gt;That mismatch is where infrastructure assumptions start becoming dangerous.&lt;/p&gt;




&lt;h2&gt;
  
  
  Drift Is Normal, Not Exceptional
&lt;/h2&gt;

&lt;p&gt;One thing I’ve learned from real systems:&lt;/p&gt;

&lt;p&gt;Drift is not some rare edge case.&lt;/p&gt;

&lt;p&gt;Drift is the default operating mode of infrastructure.&lt;/p&gt;

&lt;p&gt;Schemas drift.&lt;br&gt;
Queues get reused.&lt;br&gt;
Lambda responsibilities quietly expand.&lt;br&gt;
Environment configs diverge.&lt;br&gt;
Feature flags outlive entire product strategies.&lt;/p&gt;

&lt;p&gt;And somehow the system still works through a combination of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;operational experience&lt;/li&gt;
&lt;li&gt;institutional memory&lt;/li&gt;
&lt;li&gt;monitoring alerts&lt;/li&gt;
&lt;li&gt;and collective engineering anxiety&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The problem is:&lt;br&gt;
AI systems usually do not have access to any of that context.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Breaks AI Reasoning
&lt;/h2&gt;

&lt;p&gt;If an AI agent assumes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;an index exists because Terraform references it&lt;/li&gt;
&lt;li&gt;a queue is active because code imports it&lt;/li&gt;
&lt;li&gt;a service is healthy because it appears in configs&lt;/li&gt;
&lt;li&gt;an API contract is current because docs mention it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;…it can confidently generate completely wrong operational decisions.&lt;/p&gt;

&lt;p&gt;Not because the syntax is bad.&lt;/p&gt;

&lt;p&gt;Because the system model is stale.&lt;/p&gt;

&lt;p&gt;And stale infrastructure assumptions are dangerous precisely because they often look reasonable.&lt;/p&gt;




&lt;h2&gt;
  
  
  Static Context Has a Ceiling
&lt;/h2&gt;

&lt;p&gt;This is why I think purely static approaches eventually hit a ceiling for infrastructure-heavy AI systems.&lt;/p&gt;

&lt;p&gt;You can absolutely improve things with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;better retrieval&lt;/li&gt;
&lt;li&gt;larger context windows&lt;/li&gt;
&lt;li&gt;repo indexing&lt;/li&gt;
&lt;li&gt;schema awareness&lt;/li&gt;
&lt;li&gt;dependency graphs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of that helps.&lt;/p&gt;

&lt;p&gt;But eventually runtime reality wins.&lt;/p&gt;

&lt;p&gt;Because production systems are living systems.&lt;/p&gt;

&lt;p&gt;Not snapshots.&lt;/p&gt;




&lt;h2&gt;
  
  
  Runtime Truth Is Hard
&lt;/h2&gt;

&lt;p&gt;To reason reliably about infrastructure, AI systems eventually need awareness of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;runtime state&lt;/li&gt;
&lt;li&gt;deployment reconciliation&lt;/li&gt;
&lt;li&gt;drift detection&lt;/li&gt;
&lt;li&gt;evolving dependencies&lt;/li&gt;
&lt;li&gt;environment divergence&lt;/li&gt;
&lt;li&gt;operational anomalies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In other words:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;what is actually true right now.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Not:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;what was declared six months ago and hopefully still exists.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is a much harder problem than code generation.&lt;/p&gt;

&lt;p&gt;But it is also the problem that matters most once software reaches production scale.&lt;/p&gt;




&lt;h2&gt;
  
  
  This Is the Direction I Keep Thinking About
&lt;/h2&gt;

&lt;p&gt;A lot of the thinking behind &lt;a href="https://www.npmjs.com/package/infrawise" rel="noopener noreferrer"&gt;Infrawise&lt;/a&gt; started from this gap between:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;static infrastructure definitions
and&lt;/li&gt;
&lt;li&gt;operational system reality&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Right now I’m mostly exploring deterministic infrastructure context through:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;schema relationships&lt;/li&gt;
&lt;li&gt;infra mapping&lt;/li&gt;
&lt;li&gt;dependency awareness&lt;/li&gt;
&lt;li&gt;static analysis&lt;/li&gt;
&lt;li&gt;topology understanding&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But long-term I think runtime observability and operational signals become important too.&lt;/p&gt;

&lt;p&gt;Because infrastructure awareness is not just:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“what does the code say?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“what is the system actually doing?”&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;Current AI coding assistants are already very good at understanding source code.&lt;/p&gt;

&lt;p&gt;The next generation will need to understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;runtime behavior&lt;/li&gt;
&lt;li&gt;operational state&lt;/li&gt;
&lt;li&gt;infrastructure drift&lt;/li&gt;
&lt;li&gt;deployment reality&lt;/li&gt;
&lt;li&gt;evolving system relationships&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because production systems are not static architecture diagrams.&lt;/p&gt;

&lt;p&gt;They are constantly moving targets held together by software, infrastructure, and a surprising amount of engineering optimism.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>infrastructure</category>
      <category>opensource</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Why “More Context” Still Doesn’t Fix Infrastructure</title>
      <dc:creator>Siddharth Pandey</dc:creator>
      <pubDate>Fri, 15 May 2026 17:11:03 +0000</pubDate>
      <link>https://dev.to/siddharth_pandey_27/why-more-context-still-doesnt-fix-infrastructure-58nh</link>
      <guid>https://dev.to/siddharth_pandey_27/why-more-context-still-doesnt-fix-infrastructure-58nh</guid>
      <description>&lt;p&gt;A common reaction to AI hallucinating infrastructure is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Just give it more context.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;More code.&lt;br&gt;
More docs.&lt;br&gt;
More Terraform.&lt;br&gt;
More logs.&lt;br&gt;
More everything.&lt;/p&gt;

&lt;p&gt;It sounds reasonable.&lt;/p&gt;

&lt;p&gt;But it quietly assumes something important:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;infrastructure understanding is a “volume problem”.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It is not.&lt;/p&gt;




&lt;h2&gt;
  
  
  More Context Doesn’t Fix Wrong Structure
&lt;/h2&gt;

&lt;p&gt;Let’s say you give an AI agent access to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Terraform&lt;/li&gt;
&lt;li&gt;CloudFormation&lt;/li&gt;
&lt;li&gt;CDK&lt;/li&gt;
&lt;li&gt;schema definitions&lt;/li&gt;
&lt;li&gt;deployment configs&lt;/li&gt;
&lt;li&gt;API code&lt;/li&gt;
&lt;li&gt;docs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It can now “see more”.&lt;/p&gt;

&lt;p&gt;But infrastructure problems are rarely about missing visibility.&lt;/p&gt;

&lt;p&gt;They are about missing relationships.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which service consumes this queue?&lt;/li&gt;
&lt;li&gt;Which Lambda depends on this table?&lt;/li&gt;
&lt;li&gt;Which schema version is actually deployed?&lt;/li&gt;
&lt;li&gt;Which environment is stale?&lt;/li&gt;
&lt;li&gt;Which index is required by this access pattern?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are not text retrieval problems.&lt;/p&gt;

&lt;p&gt;These are graph problems.&lt;/p&gt;




&lt;h2&gt;
  
  
  RAG Works on Similarity, Not Truth
&lt;/h2&gt;

&lt;p&gt;RAG retrieves things that are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;semantically similar&lt;/li&gt;
&lt;li&gt;textually relevant&lt;/li&gt;
&lt;li&gt;contextually close&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But infrastructure requires:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;exact state&lt;/li&gt;
&lt;li&gt;exact relationships&lt;/li&gt;
&lt;li&gt;exact deployment reality&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Similarity is not enough when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a resource exists in dev but not prod&lt;/li&gt;
&lt;li&gt;a schema changed but code didn’t&lt;/li&gt;
&lt;li&gt;an index was removed but code still assumes it exists&lt;/li&gt;
&lt;li&gt;two services are loosely coupled but heavily dependent&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The system becomes inconsistent very quickly.&lt;/p&gt;

&lt;p&gt;And AI happily reasons over that inconsistency as if it is unified truth.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Real Issue: No Deterministic Infrastructure Graph
&lt;/h2&gt;

&lt;p&gt;What AI actually needs is not just more text.&lt;/p&gt;

&lt;p&gt;It needs a deterministic representation of the system itself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;services&lt;/li&gt;
&lt;li&gt;dependencies&lt;/li&gt;
&lt;li&gt;data flows&lt;/li&gt;
&lt;li&gt;infrastructure topology&lt;/li&gt;
&lt;li&gt;runtime relationships&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In simple terms:&lt;br&gt;
a graph where nodes are real infrastructure resources and edges are verified relationships between them — not assumptions inferred from code similarity.&lt;/p&gt;

&lt;p&gt;Without that, the model is still guessing.&lt;/p&gt;

&lt;p&gt;Even if it has access to your entire repository.&lt;/p&gt;

&lt;p&gt;Because repos do not fully represent production systems.&lt;/p&gt;

&lt;p&gt;Production systems are behavior.&lt;/p&gt;




&lt;h2&gt;
  
  
  This Is Where Things Start Breaking Quietly
&lt;/h2&gt;

&lt;p&gt;Most infra failures don’t come from obvious mistakes.&lt;/p&gt;

&lt;p&gt;They come from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;outdated assumptions&lt;/li&gt;
&lt;li&gt;invisible dependencies&lt;/li&gt;
&lt;li&gt;forgotten services&lt;/li&gt;
&lt;li&gt;implicit coupling&lt;/li&gt;
&lt;li&gt;undocumented flows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AI systems are especially vulnerable here because they treat code as the system.&lt;/p&gt;

&lt;p&gt;But production systems are not code.&lt;/p&gt;

&lt;p&gt;They are behavior.&lt;/p&gt;




&lt;h2&gt;
  
  
  This Is the Gap I Keep Thinking About
&lt;/h2&gt;

&lt;p&gt;This is the gap that pushed me toward building &lt;a href="https://www.npmjs.com/package/infrawise" rel="noopener noreferrer"&gt;Infrawise&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The goal is not just:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“give AI more context.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It is to make infrastructure relationships structurally understandable for AI systems.&lt;/p&gt;

&lt;p&gt;Things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;real schema relationships&lt;/li&gt;
&lt;li&gt;actual index existence&lt;/li&gt;
&lt;li&gt;service dependencies&lt;/li&gt;
&lt;li&gt;infrastructure topology&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Derived from infrastructure state and system analysis — not guessed purely from source code patterns.&lt;/p&gt;




&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;A lot of current AI tooling assumes that if the model sees enough files, eventually it will understand the system.&lt;/p&gt;

&lt;p&gt;I don’t think that is true.&lt;/p&gt;

&lt;p&gt;Because infrastructure problems are fundamentally relationship problems.&lt;/p&gt;

&lt;p&gt;Not autocomplete problems.&lt;/p&gt;

&lt;p&gt;Not retrieval problems.&lt;/p&gt;

&lt;p&gt;And definitely not “just increase the context window” problems.&lt;/p&gt;

&lt;p&gt;Current AI coding assistants are already very good at understanding source code.&lt;/p&gt;

&lt;p&gt;The next generation will need to understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;infrastructure topology&lt;/li&gt;
&lt;li&gt;operational relationships&lt;/li&gt;
&lt;li&gt;deployment reality&lt;/li&gt;
&lt;li&gt;system behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because repos do not fully represent production systems.&lt;/p&gt;

&lt;p&gt;Production systems are behavior.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>infrastructure</category>
      <category>mcp</category>
    </item>
    <item>
      <title>AI Generated a DynamoDB Query That Could Never Work</title>
      <dc:creator>Siddharth Pandey</dc:creator>
      <pubDate>Wed, 13 May 2026 06:34:02 +0000</pubDate>
      <link>https://dev.to/siddharth_pandey_27/ai-generated-a-dynamodb-query-that-could-never-work-53h9</link>
      <guid>https://dev.to/siddharth_pandey_27/ai-generated-a-dynamodb-query-that-could-never-work-53h9</guid>
      <description>&lt;p&gt;I asked an AI coding assistant to generate a DynamoDB query.&lt;/p&gt;

&lt;p&gt;A few seconds later it confidently gave me this:&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;dynamo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;TableName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Orders&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;IndexName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;customerId-createdAt-index&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;KeyConditionExpression&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;customerId = :customerId&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Looks clean.&lt;/p&gt;

&lt;p&gt;Looks professional.&lt;/p&gt;

&lt;p&gt;Looks like something a senior backend engineer would casually approve during code review while fighting for survival in their 14th Slack thread of the day.&lt;/p&gt;

&lt;p&gt;Tiny issue though.&lt;/p&gt;

&lt;p&gt;The index did not exist.&lt;/p&gt;

&lt;p&gt;And honestly, this is becoming one of the biggest problems with AI coding tools:&lt;br&gt;
they are extremely good at generating things that &lt;em&gt;look correct&lt;/em&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The AI Wasn't Being Stupid
&lt;/h2&gt;

&lt;p&gt;That’s the interesting part.&lt;/p&gt;

&lt;p&gt;The assistant actually made a pretty reasonable guess.&lt;/p&gt;

&lt;p&gt;It saw:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DynamoDB usage&lt;/li&gt;
&lt;li&gt;query patterns&lt;/li&gt;
&lt;li&gt;naming conventions&lt;/li&gt;
&lt;li&gt;nearby code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;…and predicted what &lt;em&gt;probably&lt;/em&gt; existed.&lt;/p&gt;

&lt;p&gt;Which is exactly what LLMs are designed to do.&lt;/p&gt;

&lt;p&gt;The problem is:&lt;br&gt;
production infrastructure is not based on probability.&lt;/p&gt;

&lt;p&gt;Either the GSI exists or it does not.&lt;/p&gt;

&lt;p&gt;AWS is unfortunately not very emotionally supportive about this distinction.&lt;/p&gt;




&lt;h2&gt;
  
  
  Infrastructure Is Not Just "More Context"
&lt;/h2&gt;

&lt;p&gt;A lot of AI tooling conversations eventually turn into:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“We just need better RAG.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Or:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“We just need larger context windows.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That helps.&lt;/p&gt;

&lt;p&gt;But I think there’s a deeper issue here.&lt;/p&gt;

&lt;p&gt;Because infrastructure is not just information.&lt;/p&gt;

&lt;p&gt;It’s relationships.&lt;/p&gt;

&lt;p&gt;The assistant might read:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Terraform&lt;/li&gt;
&lt;li&gt;schema files&lt;/li&gt;
&lt;li&gt;docs&lt;/li&gt;
&lt;li&gt;migrations&lt;/li&gt;
&lt;li&gt;configs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;…and still not reliably understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;which indexes are actually deployed&lt;/li&gt;
&lt;li&gt;which environments differ&lt;/li&gt;
&lt;li&gt;which access patterns are safe&lt;/li&gt;
&lt;li&gt;which infrastructure assumptions are outdated&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s not just a retrieval problem.&lt;/p&gt;

&lt;p&gt;That’s a system understanding problem.&lt;/p&gt;




&lt;h2&gt;
  
  
  DynamoDB Makes This Very Obvious
&lt;/h2&gt;

&lt;p&gt;DynamoDB is actually a great example here because it is brutally honest about access patterns.&lt;/p&gt;

&lt;p&gt;With SQL databases, developers sometimes get away with questionable decisions for a while.&lt;/p&gt;

&lt;p&gt;DynamoDB basically says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“No index? That sounds like a you problem.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And honestly, fair enough.&lt;/p&gt;

&lt;p&gt;The entire database is designed around:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;partition strategy&lt;/li&gt;
&lt;li&gt;access patterns&lt;/li&gt;
&lt;li&gt;deliberate schema design&lt;/li&gt;
&lt;li&gt;predictable query paths&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Which means an AI assistant cannot just generate random “probably correct” queries and hope reality cooperates.&lt;/p&gt;

&lt;p&gt;The query either aligns with infrastructure design or it does not.&lt;/p&gt;

&lt;p&gt;There’s not much middle ground.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Dangerous Part Is Confidence
&lt;/h2&gt;

&lt;p&gt;What makes these failures tricky is that the generated code often looks completely believable.&lt;/p&gt;

&lt;p&gt;No syntax errors.&lt;br&gt;
No obvious red flags.&lt;br&gt;
No broken TypeScript.&lt;/p&gt;

&lt;p&gt;Just confident infrastructure hallucinations.&lt;/p&gt;

&lt;p&gt;And that’s much harder for engineers to detect quickly.&lt;/p&gt;

&lt;p&gt;Especially in large systems where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;nobody remembers every index&lt;/li&gt;
&lt;li&gt;environments drift over time&lt;/li&gt;
&lt;li&gt;schemas evolve constantly&lt;/li&gt;
&lt;li&gt;infrastructure knowledge is fragmented across teams&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every company has at least one cloud resource held together entirely by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;historical accidents&lt;/li&gt;
&lt;li&gt;undocumented assumptions&lt;/li&gt;
&lt;li&gt;and collective organizational fear&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AI assistants walk directly into these systems with the confidence of somebody who read half the README and decided they understand the architecture.&lt;/p&gt;




&lt;h2&gt;
  
  
  This Is The Gap I Keep Thinking About
&lt;/h2&gt;

&lt;p&gt;Most AI coding assistants today are optimized for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;syntax&lt;/li&gt;
&lt;li&gt;implementation patterns&lt;/li&gt;
&lt;li&gt;framework familiarity&lt;/li&gt;
&lt;li&gt;autocomplete quality&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But production systems need something else:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;operational awareness&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The assistant needs deterministic understanding of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;infrastructure topology&lt;/li&gt;
&lt;li&gt;indexes&lt;/li&gt;
&lt;li&gt;schema relationships&lt;/li&gt;
&lt;li&gt;runtime dependencies&lt;/li&gt;
&lt;li&gt;deployment reality&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Otherwise it is just making educated guesses about systems that may cost thousands of dollars per mistake.&lt;/p&gt;

&lt;p&gt;That feels slightly important.&lt;/p&gt;




&lt;h2&gt;
  
  
  This Is One of the Reasons I Started Building Infrawise
&lt;/h2&gt;

&lt;p&gt;This problem is one of the reasons I started working on opensource project &lt;a href="https://github.com/Sidd27/infrawise" rel="noopener noreferrer"&gt;Infrawise&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The idea is simple:&lt;/p&gt;

&lt;p&gt;Instead of forcing AI assistants to infer infrastructure from scattered code and configs, provide deterministic infrastructure context directly.&lt;/p&gt;

&lt;p&gt;Things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DynamoDB index awareness&lt;/li&gt;
&lt;li&gt;schema relationships&lt;/li&gt;
&lt;li&gt;infrastructure mapping&lt;/li&gt;
&lt;li&gt;static analysis&lt;/li&gt;
&lt;li&gt;AI-consumable infrastructure context&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Not “AI magic.”&lt;/p&gt;

&lt;p&gt;Just explicit system understanding.&lt;/p&gt;

&lt;p&gt;Because hallucinated code is annoying.&lt;/p&gt;

&lt;p&gt;Hallucinated infrastructure is how people accidentally discover entirely new AWS billing experiences.&lt;/p&gt;




&lt;h2&gt;
  
  
  AI Needs To Understand Systems, Not Just Code
&lt;/h2&gt;

&lt;p&gt;Current AI coding assistants are already very good at understanding source code.&lt;/p&gt;

&lt;p&gt;The next generation will need to understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;architecture&lt;/li&gt;
&lt;li&gt;topology&lt;/li&gt;
&lt;li&gt;infrastructure relationships&lt;/li&gt;
&lt;li&gt;operational constraints&lt;/li&gt;
&lt;li&gt;deployed reality&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because software does not actually run inside VS Code.&lt;/p&gt;

&lt;p&gt;It runs inside infrastructure.&lt;/p&gt;

&lt;p&gt;And infrastructure is where “probably correct” stops being good enough.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devops</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Why RAG Alone Cannot Understand Infrastructure</title>
      <dc:creator>Siddharth Pandey</dc:creator>
      <pubDate>Mon, 11 May 2026 12:04:13 +0000</pubDate>
      <link>https://dev.to/siddharth_pandey_27/why-rag-alone-cannot-understand-infrastructure-jfp</link>
      <guid>https://dev.to/siddharth_pandey_27/why-rag-alone-cannot-understand-infrastructure-jfp</guid>
      <description>&lt;p&gt;Every AI tooling discussion eventually reaches the same sentence:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Just use RAG.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;At this point, RAG is basically the duct tape of AI architecture.&lt;/p&gt;

&lt;p&gt;Missing context?&lt;br&gt;
RAG.&lt;/p&gt;

&lt;p&gt;Bad answers?&lt;br&gt;
RAG.&lt;/p&gt;

&lt;p&gt;AI hallucinating production infrastructure?&lt;br&gt;
Apparently also RAG.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To be clear&lt;/strong&gt;: Retrieval-Augmented Generation is genuinely useful.&lt;/p&gt;

&lt;p&gt;It improves grounding.&lt;br&gt;
It reduces hallucinations.&lt;br&gt;
It helps AI systems access external knowledge.&lt;/p&gt;

&lt;p&gt;But there’s a growing misconception in AI engineering right now:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;More retrieval does not automatically create system understanding.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And infrastructure problems are usually &lt;em&gt;system understanding&lt;/em&gt; problems.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Problem Is Not Missing Text
&lt;/h2&gt;

&lt;p&gt;Most infrastructure failures in AI coding assistants are not happening because documentation is missing.&lt;/p&gt;

&lt;p&gt;The problem is that infrastructure knowledge is relational, fragmented, and operational.&lt;/p&gt;

&lt;p&gt;For example, imagine asking an AI assistant:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Can this DynamoDB access pattern use an existing index?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That answer depends on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;actual GSIs&lt;/li&gt;
&lt;li&gt;partition keys&lt;/li&gt;
&lt;li&gt;sort keys&lt;/li&gt;
&lt;li&gt;deployed schema state&lt;/li&gt;
&lt;li&gt;access patterns&lt;/li&gt;
&lt;li&gt;environment-specific infrastructure&lt;/li&gt;
&lt;li&gt;workload constraints&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is not just a “retrieve the right paragraph” problem.&lt;/p&gt;

&lt;p&gt;A vector database cannot magically infer operational relationships from semantically similar chunks of text.&lt;/p&gt;

&lt;p&gt;Infrastructure is not a Wikipedia article.&lt;/p&gt;

&lt;p&gt;It is a topology.&lt;/p&gt;


&lt;h2&gt;
  
  
  The “Looks Correct” Problem
&lt;/h2&gt;

&lt;p&gt;This is where AI gets dangerous.&lt;/p&gt;

&lt;p&gt;The generated output often looks completely reasonable.&lt;/p&gt;

&lt;p&gt;Example:&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="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;ordersTable&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;IndexName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;customerId-createdAt-index&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Looks valid.&lt;/p&gt;

&lt;p&gt;Compiles.&lt;/p&gt;

&lt;p&gt;Very professional-looking.&lt;/p&gt;

&lt;p&gt;Tiny problem: &lt;strong&gt;the index does not exist&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The AI retrieved enough surrounding context to generate something statistically plausible.&lt;/p&gt;

&lt;p&gt;But plausible infrastructure is not the same thing as real infrastructure.&lt;/p&gt;

&lt;p&gt;This is the core limitation of relying entirely on semantic retrieval.&lt;/p&gt;

&lt;p&gt;RAG helps models retrieve information.&lt;/p&gt;

&lt;p&gt;Infrastructure awareness requires understanding relationships.&lt;/p&gt;

&lt;p&gt;Those are different problems.&lt;/p&gt;




&lt;h2&gt;
  
  
  Infrastructure Is a Graph Problem
&lt;/h2&gt;

&lt;p&gt;Modern systems are deeply interconnected.&lt;/p&gt;

&lt;p&gt;A single API endpoint might depend on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DynamoDB tables&lt;/li&gt;
&lt;li&gt;GSIs&lt;/li&gt;
&lt;li&gt;SQS queues&lt;/li&gt;
&lt;li&gt;Lambda functions&lt;/li&gt;
&lt;li&gt;deployment environments&lt;/li&gt;
&lt;li&gt;feature flags&lt;/li&gt;
&lt;li&gt;event consumers&lt;/li&gt;
&lt;li&gt;schema versions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now imagine asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“What breaks if I change this schema?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is not a chunk retrieval problem.&lt;/p&gt;

&lt;p&gt;That is dependency analysis.&lt;/p&gt;

&lt;p&gt;The AI needs to understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;who consumes the schema&lt;/li&gt;
&lt;li&gt;where it is used&lt;/li&gt;
&lt;li&gt;which systems depend on it&lt;/li&gt;
&lt;li&gt;whether environments differ&lt;/li&gt;
&lt;li&gt;whether migrations already exist&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most RAG systems fundamentally operate on semantic similarity.&lt;/p&gt;

&lt;p&gt;Infrastructure problems often require deterministic relationship mapping.&lt;/p&gt;

&lt;p&gt;Very different category of problem.&lt;/p&gt;




&lt;h2&gt;
  
  
  Bigger Context Windows Do Not Solve This Either
&lt;/h2&gt;

&lt;p&gt;A lot of people assume larger context windows will eventually solve infrastructure awareness.&lt;/p&gt;

&lt;p&gt;I do not think that is true.&lt;/p&gt;

&lt;p&gt;A 2 million token context window filled with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Terraform&lt;/li&gt;
&lt;li&gt;CloudFormation&lt;/li&gt;
&lt;li&gt;CDK&lt;/li&gt;
&lt;li&gt;schemas&lt;/li&gt;
&lt;li&gt;docs&lt;/li&gt;
&lt;li&gt;configs&lt;/li&gt;
&lt;li&gt;deployment files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;still does not automatically produce reliable topology understanding.&lt;/p&gt;

&lt;p&gt;Because the issue is not just visibility.&lt;/p&gt;

&lt;p&gt;It is interpretation.&lt;/p&gt;

&lt;p&gt;Even humans struggle with this.&lt;/p&gt;

&lt;p&gt;Every engineering organization has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;infrastructure nobody wants to touch&lt;/li&gt;
&lt;li&gt;queues nobody fully understands&lt;/li&gt;
&lt;li&gt;“temporary” resources that became permanent&lt;/li&gt;
&lt;li&gt;databases held together by historical accidents and organizational fear&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Giving AI more tokens to read does not automatically create operational intelligence.&lt;/p&gt;

&lt;p&gt;Otherwise every engineer who read all the docs would already fully understand production.&lt;/p&gt;

&lt;p&gt;Which is obviously not how reality works.&lt;/p&gt;




&lt;h2&gt;
  
  
  Semantic Similarity vs Deterministic Context
&lt;/h2&gt;

&lt;p&gt;This distinction matters a lot.&lt;/p&gt;

&lt;p&gt;RAG systems answer questions like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“What information is semantically related to this query?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Infrastructure-aware systems need to answer questions like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which indexes actually exist?&lt;/li&gt;
&lt;li&gt;Which services consume this queue?&lt;/li&gt;
&lt;li&gt;Which schema version is deployed?&lt;/li&gt;
&lt;li&gt;Which environment contains this resource?&lt;/li&gt;
&lt;li&gt;Which APIs depend on this table?&lt;/li&gt;
&lt;li&gt;Which resources are connected?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those answers should not come from probabilistic guessing.&lt;/p&gt;

&lt;p&gt;They should come from deterministic infrastructure context.&lt;/p&gt;

&lt;p&gt;That is the missing layer most AI coding systems still lack.&lt;/p&gt;




&lt;h2&gt;
  
  
  This Is One of the Reasons I Started Building Infrawise
&lt;/h2&gt;

&lt;p&gt;One of the reasons I started working on &lt;a href="https://github.com/Sidd27/infrawise" rel="noopener noreferrer"&gt;Infrawise&lt;/a&gt; was this exact gap.&lt;/p&gt;

&lt;p&gt;The goal is not:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“put infrastructure docs into embeddings.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The goal is to make infrastructure relationships explicit enough that AI systems stop guessing.&lt;/p&gt;

&lt;p&gt;Things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DynamoDB index awareness&lt;/li&gt;
&lt;li&gt;schema relationships&lt;/li&gt;
&lt;li&gt;infrastructure mapping&lt;/li&gt;
&lt;li&gt;static analysis&lt;/li&gt;
&lt;li&gt;AI-consumable infrastructure context&lt;/li&gt;
&lt;li&gt;deterministic extraction pipelines&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Not just “more retrieval.”&lt;/p&gt;

&lt;p&gt;Because honestly, some infrastructure mistakes are too expensive to leave to semantic similarity.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Future Is Not Just Better Retrieval
&lt;/h2&gt;

&lt;p&gt;RAG is useful.&lt;/p&gt;

&lt;p&gt;It will absolutely remain part of AI systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But infrastructure-aware AI requires more than retrieval.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It requires:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;topology understanding&lt;/li&gt;
&lt;li&gt;dependency mapping&lt;/li&gt;
&lt;li&gt;deterministic infrastructure state&lt;/li&gt;
&lt;li&gt;operational context&lt;/li&gt;
&lt;li&gt;relationship awareness&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The next generation of AI coding assistants will not just retrieve infrastructure knowledge.&lt;/p&gt;

&lt;p&gt;They will need to understand infrastructure reality.&lt;/p&gt;

&lt;p&gt;And that is a much harder problem than embedding documents into a vector database.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>infrastructure</category>
      <category>rag</category>
    </item>
    <item>
      <title>Your AI Assistant Knows Your Code But Not Your Architecture</title>
      <dc:creator>Siddharth Pandey</dc:creator>
      <pubDate>Sun, 10 May 2026 11:03:22 +0000</pubDate>
      <link>https://dev.to/siddharth_pandey_27/your-ai-assistant-knows-your-code-but-not-your-architecture-2037</link>
      <guid>https://dev.to/siddharth_pandey_27/your-ai-assistant-knows-your-code-but-not-your-architecture-2037</guid>
      <description>&lt;p&gt;AI coding assistants are getting dangerously good.&lt;/p&gt;

&lt;p&gt;They can refactor code, generate APIs, write SQL queries, explain regex you wrote at 2 AM during a production incident, and confidently suggest changes that &lt;em&gt;look&lt;/em&gt; correct.&lt;/p&gt;

&lt;p&gt;And that’s exactly the problem.&lt;/p&gt;

&lt;p&gt;Because your AI assistant knows your code.&lt;/p&gt;

&lt;p&gt;It does &lt;strong&gt;not&lt;/strong&gt; know your architecture.&lt;/p&gt;

&lt;p&gt;There’s a huge difference between:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“I read your files”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;and&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“I understand your system.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Right now, most AI tools are basically that one engineer who joined last week, skimmed the repo for 20 minutes, and immediately started suggesting database changes in production.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Confidence Problem
&lt;/h2&gt;

&lt;p&gt;Let’s say you ask your AI assistant:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Generate a DynamoDB query for customer orders.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It happily gives you this:&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;dynamo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;TableName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Orders&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;IndexName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;customerId-createdAt-index&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;KeyConditionExpression&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;customerId = :customerId&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Looks clean.&lt;/p&gt;

&lt;p&gt;Very professional.&lt;/p&gt;

&lt;p&gt;Tiny issue though.&lt;/p&gt;

&lt;p&gt;That GSI does not exist.&lt;/p&gt;

&lt;p&gt;The assistant saw patterns in code and statistically guessed what &lt;em&gt;probably&lt;/em&gt; exists.&lt;/p&gt;

&lt;p&gt;Which is honestly terrifying when you think about it.&lt;/p&gt;

&lt;p&gt;Because infrastructure is not autocomplete-friendly.&lt;/p&gt;




&lt;h2&gt;
  
  
  Your Architecture Lives Outside the Code
&lt;/h2&gt;

&lt;p&gt;Modern systems are scattered across:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Terraform&lt;/li&gt;
&lt;li&gt;CloudFormation&lt;/li&gt;
&lt;li&gt;CDK&lt;/li&gt;
&lt;li&gt;databases&lt;/li&gt;
&lt;li&gt;queues&lt;/li&gt;
&lt;li&gt;topics&lt;/li&gt;
&lt;li&gt;IAM policies&lt;/li&gt;
&lt;li&gt;deployment pipelines&lt;/li&gt;
&lt;li&gt;cloud consoles&lt;/li&gt;
&lt;li&gt;“temporary” scripts from 2022 that somehow became production-critical&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Meanwhile the AI assistant is sitting there reading:&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="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;ordersTable&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(...)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and internally going:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“I have absolutely no idea what this system actually looks like, but statistically speaking… vibes.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That’s how you end up with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PostgreSQL joins on non-indexed columns&lt;/li&gt;
&lt;li&gt;Event flow assumptions based entirely on naming conventions&lt;/li&gt;
&lt;li&gt;DynamoDB scans quietly disguised as “optimizations”&lt;/li&gt;
&lt;li&gt;APIs generated against schemas that were deleted three migrations ago&lt;/li&gt;
&lt;li&gt;Infrastructure suggestions that look plausible but do not match deployed reality&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The code compiles.&lt;/p&gt;

&lt;p&gt;The architecture cries silently in the background.&lt;/p&gt;




&lt;h2&gt;
  
  
  Inference Is Not Infrastructure Awareness
&lt;/h2&gt;

&lt;p&gt;This is the core issue.&lt;/p&gt;

&lt;p&gt;Today’s AI coding assistants are really good at inference.&lt;/p&gt;

&lt;p&gt;But infrastructure requires deterministic understanding.&lt;/p&gt;

&lt;p&gt;There’s a massive difference between:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“This probably exists”
and&lt;/li&gt;
&lt;li&gt;“This definitely exists in production”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Humans already struggle with this.&lt;/p&gt;

&lt;p&gt;Every company has at least one production resource that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;nobody fully understands&lt;/li&gt;
&lt;li&gt;nobody wants to touch&lt;/li&gt;
&lt;li&gt;somehow costs thousands per month&lt;/li&gt;
&lt;li&gt;and is protected by pure organizational fear&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now imagine an AI confidently modifying systems like that.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Bigger Context Windows Won’t Solve This
&lt;/h2&gt;

&lt;p&gt;A lot of tooling right now is focused on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;larger context windows&lt;/li&gt;
&lt;li&gt;better embeddings&lt;/li&gt;
&lt;li&gt;repository RAG&lt;/li&gt;
&lt;li&gt;more docs ingestion&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Helpful? Yes.&lt;/p&gt;

&lt;p&gt;Sufficient? No.&lt;/p&gt;

&lt;p&gt;Because infrastructure problems are relationship problems.&lt;/p&gt;

&lt;p&gt;Questions like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which services consume this queue?&lt;/li&gt;
&lt;li&gt;Which indexes support this access pattern?&lt;/li&gt;
&lt;li&gt;Which schemas are actually deployed?&lt;/li&gt;
&lt;li&gt;Which Lambda depends on this topic?&lt;/li&gt;
&lt;li&gt;Which environment even has this resource?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are topology questions.&lt;/p&gt;

&lt;p&gt;Not autocomplete questions.&lt;/p&gt;

&lt;p&gt;A 2 million token context window still cannot magically understand infrastructure relationships if the information itself is fragmented or ambiguous.&lt;/p&gt;

&lt;p&gt;More tokens do not automatically create system awareness.&lt;/p&gt;




&lt;h2&gt;
  
  
  This Is Why I Started Building Infrawise
&lt;/h2&gt;

&lt;p&gt;This problem is one of the reasons I started working on &lt;a href="https://github.com/Sidd27/infrawise" rel="noopener noreferrer"&gt;Infrawise&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The idea is simple:&lt;/p&gt;

&lt;p&gt;Instead of forcing AI assistants to &lt;em&gt;guess&lt;/em&gt; infrastructure,&lt;br&gt;
give them deterministic infrastructure context.&lt;/p&gt;

&lt;p&gt;Things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DynamoDB index awareness&lt;/li&gt;
&lt;li&gt;schema relationships&lt;/li&gt;
&lt;li&gt;infrastructure mapping&lt;/li&gt;
&lt;li&gt;static analysis&lt;/li&gt;
&lt;li&gt;infrastructure-aware context for AI systems&lt;/li&gt;
&lt;li&gt;MCP integration paths&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Not “AI magic.”&lt;/p&gt;

&lt;p&gt;Just explicit system understanding.&lt;/p&gt;

&lt;p&gt;Because honestly, hallucinated code is annoying.&lt;/p&gt;

&lt;p&gt;Hallucinated infrastructure is how people accidentally discover new billing tiers on AWS.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Next Generation of AI Coding Tools
&lt;/h2&gt;

&lt;p&gt;The current generation of AI assistants understands syntax.&lt;/p&gt;

&lt;p&gt;The next generation will need to understand systems.&lt;/p&gt;

&lt;p&gt;Not just:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;functions&lt;/li&gt;
&lt;li&gt;files&lt;/li&gt;
&lt;li&gt;classes&lt;/li&gt;
&lt;li&gt;frameworks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;architecture&lt;/li&gt;
&lt;li&gt;runtime dependencies&lt;/li&gt;
&lt;li&gt;infrastructure topology&lt;/li&gt;
&lt;li&gt;deployment reality&lt;/li&gt;
&lt;li&gt;operational constraints&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because software does not run inside VS Code.&lt;/p&gt;

&lt;p&gt;It runs inside infrastructure.&lt;/p&gt;

&lt;p&gt;And infrastructure is where bad assumptions become expensive.&lt;/p&gt;

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