AI Workflow · Module 7
Design First, Code Later
"The most expensive code is code built on the wrong foundation."
Here's a failure pattern that happens constantly: a developer writes a detailed prompt, the AI produces exactly what was asked for, and then the developer realizes the implementation doesn't fit the existing architecture. The code has to be thrown away. The prompt was perfect — but the design thinking came too late.
AI amplifies your implementation speed. But it cannot design for you. Design is a red-light task: it requires your knowledge of the system, the team's conventions, the business constraints, and the long-term maintainability goals. Hand that over to the AI and you get working code on the wrong foundation.
The Design First framework gives you a concrete process for separating the design phase (yours) from the implementation phase (AI's) — so every piece of generated code fits the system you already understand.
The Two Traps: Big Bang and Vague Direction
Before the framework, name the failure modes.
Both traps have the same root cause: implementation before design.
The Design First Framework: 3 Steps Before Any Prompt
Once you have the D-A-P, every prompt you write is giving the AI a construction job with a blueprint. It can't make architectural decisions that weren't already made.
The 4-Phase Iterative Cycle
For features that span multiple files and components, use the iterative cycle instead of one large prompt. This keeps you in architectural control as the implementation grows.
Loop until all components are complete. Your blueprint ensures each iteration builds on the previous one correctly.
One Conversation, One Task
The single most practical rule in this article:
In practice: each component from your DAP decomposition is one conversation. When that component is done and reviewed, start a fresh conversation for the next one. The AI doesn't carry over assumptions from previous sessions — and in this case, that's a feature.
Design as the Durable Skill
Here's the thing about AI-assisted development: the tools change. The models improve. The IDEs and assistants will look different in 24 months. But software architecture — the ability to decompose a system, define interfaces, and make sound design decisions — has been valuable for 60 years and will be for 60 more.
The design phase is the part AI can't do for you. Which means it's the part that compounds in value as AI handles more of everything else.
Protect the design phase. That's where your long-term leverage lives.
Next in AI Workflow
Part 8 — The 4 Quality Gates
AI generates technical debt faster than any developer ever could. The 4 Quality Gates stop it before it ships — a non-negotiable checklist for every AI-generated pull request.