Contents
TABLE OF CONTENTS
All posts
Anshuman Praharaj

How I Ship Code With AI Without Losing Control


Well, this flow I’m gonna talk about is something I learnt after multiple iterations of working with different AI tools in general, from Claude Code to Cursor to Antigravity and, of course, using chat interfaces of ChatGPT and Claude since 2023. I’ve been using GPT since it was released to the public back in the 2022-23 timeline, I guess.

Now, my view on AI writing code is that if something is making life simpler as an engineer, why not use it? I do understand, however, that a lot of people don’t share the same view on AI writing code, and their point is more towards how this will lead us to a point where AI and, yk, agents will replace software engineers in general. But my point of view is not the same. What I believe about this situation is that, let’s say, before the AI era, writing code was one of the skills, or you can say the skill, that was primary to most software engineers, especially early in their careers, and now it is not (I mean, it is, but not as the primary task). So, if expectations from the role are different, how is this gonna, yk, replace us as engineers? It’s simply just that the core skillsets are a bit changed now, even though I know a lot of code is still needed to be written by humans, especially a lot of sensitive code in financial industries and all...

Well, I diverged a bit above... coming back to my workflow. I generally follow a 3-4 step workflow for using AI. As my work is primarily focused on backend, a lot of time has to be spent designing schemas, architecture, dataflows, and all. So, in general, the very first step is always what I do is I take a blank canvas (yes, literally)... I go to Excalidraw... and then I draw it all, yes, the architecture and dataflow, then use Eraser (eraser.io) to draw tables and create relations and all.

Then the next step is always writing it down... in a descriptive manner. It’s for both me and the agent to have a good contextual idea of how the system is gonna work overall, so we can always look back at it and compare how the current state is as compared to how it was planned initially, and yk, we can make the changes or let it go in case it is what I wrote initially.

The next step is... I guess obvious, or maybe not, but I generally feed my writing to GPT when I’m very lazy or the system/code isn’t needed to be that strict, or in many cases, I write the prompt myself, taking a good 15-20 mins of time reviewing everything I wrote... because, you see, a good prompt saves a lot of headache, and asking the agent to "FIX THE CODE"...

Now, once the prompt is ready, what I do is I open Antigravity with Claude Sonnet/Opus and I feed it the prompt. Yeah, so one more I use in the majority of large codebases is Code Review Graph (https://code-review-graph.com/).

So, what CRG does is it indexes your repository into a persistent local graph of functions, calls, imports, and blast radius, and then serves that context to Claude Code, Cursor, Copilot, Codex, and any MCP-compatible client.

Your agent stops re-reading the codebase on every prompt. Reviews become shorter, sharper, and dramatically cheaper.

Now, once I give my prompt, the obvious thing is that the agent will write the code. Of course, I generally create the folder structure and files on my own and don’t rely on AI for obvious reasons. That is, it creates a lot of bloat in many cases.

Now, once the code is written into the files, I generally go through it and review it and try to understand a lot of it and how it’s connected, what function is doing what. In a lot of cases, I just understand the flow from reading the function name and file/package imports because, yeah, I know the implementation from the amount of code I have written in the last 3 years.

Now, once I am done with reviewing the code, I fire up my Postman and I set up a lot of cURL requests to test the APIs I wrote and ensure they work exactly the way I intended, and if not, I refer back to the literature I wrote in the beginning and make the corrections a lot of times manually because I don’t want my agent to hallucinate, but also a lot of times I just let the AI fix it.

Well, overall, that’s the flow I follow to ship most of the code I write these days. I did the same in 8 months of my internship and I do the same now too, and I look forward to new tools to make it more efficient going forward.