system-design, architecture, artificial-intelligence · 2026-08-27 · 4 min read
AI Can Write Code. But Who Designs the System?
AI can generate functional code in seconds, but it can't design a resilient architecture. Learn why AI is a force multiplier, not an autonomous engineer.
AI Can Write Code. But Who Designs the System?
If you spend five minutes on tech Twitter or LinkedIn, you will hear that software engineers are obsolete.
"Why hire an engineer when a prompt can generate a full-stack CRUD app in 30 seconds?"
It sounds convincing until you actually try to build a production system.
In my previous post, I broke down why I never write code before mapping requirements, boundaries, data flow, architecture, and edge cases.
Once that blueprint exists, where does AI fit into my daily workflow?
The answer is simple: AI is a force multiplier, not an autonomous engineer.
AI is incredible at typing code. But it has no idea what system it is actually building.
The Problem With "Vibe Coding"
If you give an AI model a prompt like:
"Build a user subscription management system with Stripe."
It will generate 200 lines of functional JavaScript in five seconds. It will configure a checkout session, create a webhook handler, and write a database query.
On the surface, it looks complete. But underneath:
- Did it handle out-of-order webhook delivery from Stripe?
- Did it implement idempotent event processing so users aren't charged twice?
- Did it check your database isolation levels to prevent race conditions during plan upgrades?
- Does its data model account for your company's specific multi-tenant tenancy rules?
Usually, no. AI generates the most statistically probable code, not the most resilient system.
When you let AI design your architecture, you don’t eliminate engineering problems—you just defer them until production outages force you to solve them at 2 AM.
Where AI Shines: The Relentless Junior Assistant
I use AI every single day. I love it. But I treat it like a brilliant, hyper-fast junior engineer who has memorized every API doc in existence, yet lacks real-world judgment.
Here is where AI gives me 10x leverage:
- Boilerplate & Type Definitions: Converting OpenAPI specs into TypeScript types or Zod schemas in milliseconds.
- Test Case Generation: Handing an AI my edge case list from Step 5 of my planning process and asking it: "Write unit tests covering these exact four failure modes."
- Tedious Migrations: Converting legacy SQL queries, writing regex patterns, or writing repetitive mock data for local testing.
- Exploring Unknown APIs: Asking for quick syntax examples of an SDK instead of digging through poor documentation.
In these tasks, AI saves me hours of typing. But notice the pattern: I dictate the intent, the structure, and the constraints. AI only fills in the blanks.
What AI Cannot Do (The Engineer's Real Value)
Code generation is rapidly becoming a commodity. The true craft of senior software engineering has never been typing speed—it is decision-making under constraints.
AI cannot:
- Understand Business Trade-offs: AI cannot decide whether your startup should prioritize consistency over availability for a specific microservice.
- Set Domain Boundaries: AI does not know which features belong in your core domain and which belong in a third-party micro-service.
- Own Accountability: When a data leak happens or a payment gateway loops, you cannot hold an LLM responsible. An engineer must own the system's invariants.
My 3-Rule Framework for Engineering with AI
To get massive speed without sacrificing code quality, I follow three strict rules:
- Never Prompt Without a Blueprint: I never ask AI to generate code until I have defined the API contract, database schema, and error states myself.
- Never Commit Code I Cannot Explain Line by Line: If AI writes an algorithm or query that I don't fully understand, it does not go into the pull request.
- Delegate the Syntax, Guard the Architecture: Let AI write the helper functions, the CSS modules, and the unit tests. Keep the data flow, security model, and system boundaries firmly in human hands.
The Takeaway
AI didn't replace the software engineer; it redefined the job.
The value of an engineer used to be split: 50% system thinking and 50% typing syntax. AI reduced the cost of typing syntax to near zero.
That means 100% of your value is now your ability to think, design, and architect.
AI can write the code. But the system? That's still on you.