AI coding tools aren’t here to replace developers. At least not when you use them on purpose. They’re more like smart collaborators that need some human steering.
Over the past year, I’ve been using AI coding tools to build Minions, our agentic AI framework designed for regulated industries. I’ve tested just about every tool and tried plenty of workflows along the way. This is the one I’ve landed on. It’s been working well for me, and chances are, it could help you too.
Overall, I’ve found Cursor works best for focused tasks like writing specific features, refactoring, and adding error handling. Claude Code, on the other hand, does a better job of grasping the overall architecture and suggesting higher-level solutions, but it’s not as sharp as Cursor when it comes to targeted changes.
Step 1: Nail Down the Requirements (ChatGPT or Gemini)
Before writing a single line of code, I hash things out with ChatGPT or Gemini. They help me:
-
Challenge assumptions
-
Spot edge cases
-
Think through architecture
Sometimes I even get them to sketch Mermaid diagrams so I’m clear on the big picture before diving in.
Step 2: Write Tests First (Cursor)
Once I know what I’m building, I flip over to Cursor to write the first round of unit and integration tests based on the requirements. This is where Test-Driven Development (TDD) and AI click:
-
Cursor handles the boring stuff and catches edge cases.
-
I check the tests to make sure they make sense and cover what matters.
-
Most of the time, focusing on integration tests is more important, but there are times when we need to get into the weeds and write unit tests.
Step 3: Document Everything (Cursor)
Before coding, I ask Cursor to pull together a Markdown doc that:
-
Summarizes the requirements
-
Lists the tests and what they cover
-
Captures key assumptions
This becomes my working agreement with… well, myself.
Step 4: Write the First Draft by Hand
Next, I will write the initial implementation myself. Cursor and IntelliJ lend a hand, but I stay in charge. My focus:
-
Get the core logic and structure right
-
Skip optimizations, error handling, and logging for now
This way, I’m sure the heart of the code works before layering on the extras.
Step 5: Tighten Things Up (Cursor)
With the skeleton in place, I let Cursor help with:
-
Improve the code organization and make it testable
-
Error handling
-
Edge case coverage
-
Logging and metrics
-
Adding individual method unit tests
Always double-check its suggestions. One small AI change can break a lot more than you think.
Step 6: Test, Debug, Retest. Repeat.
After each tweak, I run all tests for regression testing. Not just the ones that failed. If something breaks, I ask Cursor for targeted fixes, then rerun everything. Keeps surprises to a minimum.
Step 7: Check the Architecture (Mermaid Diagrams)
Once everything’s working, I make a Mermaid call sequence diagram with Cursor or Claude. It helps me sanity-check the flow against my original plan and also update the code documentation. Many times, the code that AI writes is correct, but really difficult to understand and follow. The call sequence diagram helps with the understanding.
Step 8: Final Gut Check (ChatGPT or Gemini)
Last step. I circle back to ChatGPT or Gemini and ask:
-
“Does this meet the original requirements?”
-
“What edge cases did I miss?”
They often spot things I didn’t. Always worth the ask.
A Few Lessons I’ve Picked Up:
-
No single AI tool does it all. Treat them like teammates with different skills.
-
What I’ve found is, Cursor is great in writing targeted functionalities, refactoring, adding error handling, and so on. Claude Code does better in understanding the overall architecture and suggesting better overall solutions but it can’t do the targeted refactoring and changes as good as Cursor does.
-
Human oversight isn’t optional. Especially after AI suggests changes.
-
Use AI for scaffolding, reviewing, and suggestions. Not blind edits.
-
Use snapshot or contract testing on critical parts.
-
Commit often to track what AI changes.
-
Try AI code reviews (like GitHub Copilot Chat) for extra feedback.
The Bottom Line: AI doesn’t replace good craftsmanship. It sharpens it. If you’re thoughtful about how you use these tools, they’ll make you a better, faster, and more careful developer.