okay so this is gonna sound ironic. maybe even a little embarrassing. Most of us — and yes, I'm including myself here — use AI tools to write code every single day. GitHub Copilot, Cursor, Claude, wha
blog.ahmershah.dev11 min read
Great piece, Ahmer. It’s highly ironic that as we move toward highly autonomous AI agents, the solution isn't fancier prompt engineering ,it’s just going back to the basics of solid, clean code. The point about code consistency across files is huge; humans can context-switch between an API fetch and a Supabase query easily, but it completely breaks an AI's mental model of the codebase.
Excellent points. We’ve focused so much on what AI can do for us that we forgot we need to build a stable foundation for it to work on. It’s a two-way street.
Interesting take. If AI readability becomes a standard metric, I wonder if we’ll see linters in the future specifically designed to score code based on 'LLM comprehension probability' before it's pushed to a repo.
This is the real evolution of the 'Developer' role. We are transitioning from raw code writers to context managers and system architects. If you can't provide clear context through your code structure, you can't leverage AI effectively.
We spent years learning how to prompt the AI, only to realize our actual codebase was the worst prompt of all.
It turns out the best way to prompt an AI is actually just to write readable code in the first place. Who would've thought? 🤯
My AI agent when it looks at my legacy codebase: 'I can confidently say I have no idea what is going on here, but here is some code that will make it worse.' Great article, needed this wake-up call!
So you're saying my 200-line handleSubmit function isn't 'complex engineering,' it's just an AI-confusing monster? Fair point, refactoring now...
I feel personally attacked by that const d = await fetchData(u) snippet. 😂 Glad to know I'm not the only one writing hieroglyphics when I think no one is looking!
This highlights why TypeScript/strongly-typed languages feel like cheating when using AI tools nowadays. Explicit types give the agent a structural map of the data without it having to guess what d or r contains.
Really like the line “your codebase is your context.”
One place I’d extend this: AI-readable code helps the agent understand the repo, but agents also need readable execution environments.
That’s where MCP gets interesting. A clean codebase tells the agent what the app is trying to do. An MCP server can tell it what the outside system actually does: available tools, expected inputs, state transitions, webhook outcomes, logs, and failed runs.
For API integrations, this is a big shift. Instead of an agent only reading code + docs and guessing, it can use MCP to run the workflow before editing the code.
So the stack becomes:
code clarity → repo context
MCP → execution context
agent → better changes
We’re exploring this with FetchSandbox MCP for API workflows: giving agents a stateful sandbox they can execute against before touching app code.
https://fetchsandbox.com/mcp