Most devs ask AI to write the code.
Then they copy + paste it in.
It works.
Until it doesn’t.
Because sometimes, AI builds fast… in the wrong direction.
Here’s a better way:
Before you let it write a single line, say this:
"Architect the solution before implementing. Walk me through the plan step-by-step."
Not only will you see the thinking, you’ll also see improved solutions. I’ve found that when using the word “architect” it brings up design patterns and the SOILD principles. I’ll see it reference the use factory pattern or considering single responsibility principle.
That means cleaner separation of concerns, more modular code, and far fewer refactors down the road.
In other words, your future self (and your team) will thank you when you’re still shipping features on top of that same codebase a year later.
Example #1 – New Feature
Prompt:
"Architect the solution for adding OAuth login with Google to our Next.js + Supabase app. Explain your approach step-by-step before writing any code."
Now you can check:
Is it following security best practices?
Is it integrating with your stack the right way?
Is it missing anything obvious?
Example #2 – Bug Fix
Prompt:
"Architect the solution for fixing intermittent 'null value' errors in the Supabase auth callback. Explain your reasoning before implementing."
Why this works:
Prevents rabbit holes – AI doesn’t start coding the wrong thing.
Surfaces assumptions – You see its mental model before the build.
Improves consistency – Every feature follows a thought-out structure.
Teaches your team – Junior devs see not just what to do, but why.
The takeaway:
Never let AI go straight to code.
Make it architect first, explain second.
Your vibe code quality will jump overnight.
No posts

Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.