今日已更新 166 条资讯 | 累计 20138 条内容
关于我们

Give Your AI Assistant Infrastructure Eyes Before It Writes Another Query

Siddharth Pandey 2026年06月10日 02:18 3 次阅读 来源:Dev.to

You asked Claude Code to add pagination to your order history endpoint. It generated a clean function — listOrdersByUser() — using a DynamoDB Scan with a Limit parameter. It compiled. Tests passed. You shipped it. Three days later your AWS bill had a line item you didn't recognize: 47 million read capacity units consumed in 72 hours. The Orders table has 50M rows. Scan reads every one of them regardless of Limit — Limit only controls how many results come back, not how many items DynamoDB reads. Claude Code didn't know your table had 50M rows. It didn't know you had a GSI on userId . It guessed, and the guess was expensive. infrawise · npm What AI Assistants Don't Know About Your Infrastructure AI coding assistants read your source files. They understand function signatures, TypeScript types, and import chains. What they cannot see is the infrastructure those functions run against. When Claude Code looks at a file that calls dynamoClient.scan({ TableName: "Orders" }) , it has no idea that: The Orders table has 50M items There is already a GSI named userId-index on the userId attribute Three other functions are already using Query against that same GSI The Sessions table is accessed by 6 separate code paths, making it a hot partition candidate Without that context, the assistant fills the gap with generic patterns. It recommends Scan because it has no reason not to. It suggests adding a GSI on status because it doesn't know one exists. It writes SELECT * because it has no idea which columns are expensive to pull. This isn't a bug in the model. It's a missing input. The model was never given your infrastructure. What Happens When infrawise Is in the Loop infrawise statically analyzes your codebase, your DynamoDB tables, and your PostgreSQL schemas, then exposes that context to your editor through MCP. Claude Code gets 15 tools that answer questions like: which tables exist, what are their partition keys and sort keys, which GSIs are already defined, which functions ar

本文内容来源于互联网,版权归原作者所有
查看原文