AI Writes the Code. So What Is the Engineer's Job Now?
How I used Claude and an adversarial design review to build an enterprise software assets platform - and why software engineering is moving from code production to technical validation.

Note: Originally published on Medium
First part of “AI Writes the Code. So What Is the Engineer’s Job Now?”, a series in 2 articles.
Today: the story — one developer, two months, and the three bugs an adversarial AI review found before a single line of code.
Part 2: the method — the living specification, the invariants, and how every role in the SDLC changes.
A few weeks ago, I asked Claude Code to attack a design I had already prepared.
I did not ask it to write code. I asked it to find what was wrong with my thinking.
The feature was a redesign of how my application handles periods and years. I thought the design was ready. Unfortunately, it was not 😞
The review found a validation rule that would have hidden an entire period from users. It found a database migration that would have copied only part of the organisational hierarchy. It found a sort order that would have silently changed the period selector for every user.
And then it found something more uncomfortable.
There was already a security gap in production. The asset routes did not apply the same period visibility rule as the category routes. A user could still see an asset for a period they were not supposed to see.
None of these problems were syntax errors. The compiler could not detect them. The test suite could not detect them either.
They were not coding but engineering mistakes.
That is the main lesson I took from several months of building with Claude Code:
AI does not remove the need for engineering skills. It changes where we apply them.
AI can now produce code extremely quickly. The important question is no longer “Can AI write this code?”. It clearly can.
The better question is: “Would I know if the code was wrong?”. And answering that question requires more engineering skill, not less.
The project: one developer, two repositories
The project is an enterprise software assets platform: an application that answers a simple business need — we need to know what assets we have and what they are worth.
I built it in two repositories: a Spring Boot / Java backend and an Angular frontend.
The project started from almost nothing. No Figma. No architecture document. No ticket backlog. No existing application.
Two months later, the result was:
14,226 lines of backend production code
16,092 lines of backend test code
25 database migrations, each written for PostgreSQL and H2
118 design records and 13 cross-repository handoff documents
14 custom AI skills and agents
➡️ These numbers come from the repositories, not from memory.
I did not run a controlled productivity experiment, so I will not pretend I can prove a precise percentage improvement. My estimate is that the same scope at the same quality would normally require a team of two or three developers for six to nine months. That is an order-of-magnitude difference — but I prefer the more useful statement:
One developer could reach a scope that I would previously have considered a small team project.
And there is another important point. The project did not become simpler because AI was involved. It became more ambitious: a year-scoped organisational hierarchy, seven periodised content categories, period lifecycle management, annual rollover, RBAC with seven roles, PDF and CSV exports, several dashboards, an MCP server for AI agents, and audit logging.
This is not a CRUD demo. It is a production application where a wrong visibility rule can expose financial information.
That is what makes AI-assisted development so transformative and amazing.
First lesson: I did not start with code
This is probably the biggest difference from how I used to work.
My old instinct was simple: I have the requirement. Let me create the first controller.
This time, I wrote the rules first.
Each repository has a CLAUDE.md file at its root. It is the first thing the AI reads in every session, so it became the project's operating system.
The discipline that makes it work: keep CLAUDE.md concise. It does not try to contain everything. It describes what the project is, states the non-negotiable rules, and points to dedicated rule files — architecture, naming conventions, security, testing, design, commands and forbidden patterns. The AI loads a detailed rule file only when it works on that topic.
I learned this the hard way. My first version was one large file with everything in it. It did not work well: every session paid the cost of reading it, and the important rules drowned in the details. A concise CLAUDE.md that delegates to focused rule files keeps the context sharp.
I published a public example of this structure on GitHub: github.com/elie29/ai-sample.
This created an interesting change. Previously, documentation was something I wrote for humans. Now, documentation became something the development system uses.
That makes incorrect documentation much more dangerous - if the AI reads a wrong rule, it produces wrong code. But it also makes documentation much more valuable. A rule that is consumed every day is much more likely to stay useful.
One sentence became important for the whole project: Documentation only stays correct when something consumes it.
My "AI team" is not one AI
Another mistake would be to think that I simply opened Claude Code and asked: "Build my application".
That is not what happened. I created a set of specialised roles: a security agent, a test agent, an accessibility agent, a SQL data generation agent for generating realistic production-like test data, an architecture verification skill, and audit-and-fix skills for security, tests and accessibility.
The important idea is specialisation. Treating AI as one general-purpose developer produced weaker results. Treating it as a team of specialists - one agent, one responsibility; one skill, one purpose; one task, one scope - produced much better ones.
For example, the security agent does not try to develop the application. It performs a loop:
audit → prioritise → ask me → fix one file → re-audit
The re-audit is important. A fix that has not been verified is not a fix. It is a claim.
This changed my mental model and shifted me toward a new development paradigm. Claude Code is not a junior developer. It is closer to a team of specialised technical roles that I direct, but that never carries responsibility for the final result.
The AI can propose, implement, review and challenge. But the human always decides.
The adversarial review: move the bugs before the code
The most valuable tool in my workflow is grill-me, a skill created by Matt Pocock. It is not a code-review tool. It operates before implementation.
The idea is simple: Do not ask AI to help you build your design. Ask AI to attack your design.
Instead of "How should I implement this?", the questions become:
"What did I forget?"
"What happens if this assumption is false?"
"What happens when these two rules interact?"
"What happens to existing data?"
"What happens to a user who already has a value selected?"
The result is that bugs move from production into the design phase. In one sentence:
It moved some of my bugs from production to the design document.
And I have concrete examples:
Bug 1: one number could hide an entire period
Some context first. The application organises its data into periods, and each period reads its data from a specific year.
The redesign introduced an intentional business decision: the inventory period must read its data from the previous year. So the Inventory 2025 period maps to the year 2024.
At the same time, seven asset routes still carried an older validation rule: minimum: 2025. That rule was correct before the redesign. Nobody thought about it, because nothing about it changed.
Each rule is reasonable on its own. Now follow one user request through both of them:
The user opens the Inventory period.
The backend translates that period into the year 2024 - as designed.
The request becomes
GET /assets/list/2024.The validation layer rejects it: 2024 is below the minimum of 2025.
The frontend receives
400 Bad Requestand shows the period with no assets.
The result: one entire period silently missing from the application. Not a crash. Not an exception. Nothing in a log to chase. The screen simply stays empty.
And here is the uncomfortable part: both rules were correct. The mapping was an approved business decision. The validation was a sensible guard. The bug existed only in their combination - and nobody reviews "the combination".
The review found the interaction. And the fix was better than changing one number: we moved the year rule into one shared schema used by all 28 routes, so the two rules can never diverge again.
The problem lived between two correct-looking rules. That is architecture.
Bug 2: the half-fix that looks finished
Another question was about copying organisational data from one year to another.
The migration copied one table. That looked correct. But the actual search query joined two year-scoped tables. If only the first one was copied, the application would start, the tests could pass, the screen would render - and two organisational levels would simply be empty.
This is one of the most dangerous types of bug. Nothing crashes. The application looks healthy. The data is simply wrong.
I call it the half-fix that looks done. It was not a syntax problem. It was a system understanding problem.
Bug 3: the security gap I did not know existed
The most uncomfortable finding was a security one.
The application can hide some periods from some users. The category routes correctly enforced that visibility rule. The asset routes did not. A hidden period could still return its asset list.
This was not introduced by the redesign. It was already in production. And the review found it while examining a different feature.
The product owner confirmed the routes should not bypass the rule, so we fixed it. But we did something else I consider important: we did not silently absorb the change into the feature. We recorded it as deliberate scope growth.
AI can find problems. AI cannot decide whether a newly discovered problem should be fixed now, later, or accepted as a risk. That remains a human decision.
When the AI was wrong
This is an important part of the story, because it happened frequently.
LLMs were born from a paper called Attention Is All You Need. Ironically, that is also the best advice for engineers who use them: attention is all you need.
Here are four examples I remember well:
The migration strategy that did not fit: The AI proposed the classic expand/contract migration strategy for the redesign. A reasonable recommendation, and wrong for this project. The application is deployed as a single artefact; we did not need to support multiple versions during a rolling deployment. The strategy would have added unnecessary complexity. I rejected it.
The internal rule it wanted to make public: The AI proposed making an internal rule public because it needed access to it. Convenient for the code, but it weakened encapsulation. I rejected that too.
The sort order that looked right: The AI proposed a DESC sort order. It looked perfectly reasonable. But the existing business behaviour required the opposite order after the new period mapping. Rejected again.
The one-character bug in the audit context: Before changing data, the application tells PostgreSQL who is acting, so the audit triggers can record it:
SELECT set_config('app.changed_by', ?, true)
The third parameter decides the scope: true means the value lives only for the current transaction, false means it lives for the whole database session.
The AI proposed false. No explanation. No questions.
An experienced PostgreSQL engineer would see the bug immediately: the application uses a connection pool. A session-scoped value remains attached to the pooled connection after the request ends , so the next request, possibly from another user, could write audit records under the previous user's name.
Every test would still pass. The audit trail would silently attribute changes to the wrong people. One character, false instead of true, and the audit log becomes a liability.
A good default is not automatically a good decision for your system
This is why I do not describe AI as an autonomous architect. I describe it as an architectural proposer. It can give me several technically valid options, explain the trade-offs, and produce a lot of implementation.
But the missing information is often not in the code. It is in the business, the deployment model, the history of the application, and why an audit log exists.
That knowledge is the engineer's responsibility.
What comes next
Many real problems, found before implementation, by a machine that was told to attack my assumptions instead of confirming them.
The obvious question is: what kind of workflow makes this repeatable?
That is Part 2: the living specification, why the code is no longer the source of truth, how invariants become the contract, how the three development models compare, and what this changes for every role in the SDLC, from product owner to tech lead.
So do not ask whether AI can write your code. Ask whether you would know if it was wrong.
Grab the template
Everything described in this article - a concise CLAUDE.md, focused rule files, skills, specifications, plans and reusable prompts - is available as a public template: github.com/elie29/ai-sample. Copy the structure, rewrite the rules for your project, and make it yours.
Let's stay in touch
I share what I learn about AI-assisted engineering, software architecture and databases. If this article made you rethink your own workflow, follow me on X and connect with me on LinkedIn . I would like to hear how you work with AI on real projects.
About the author
- Stratégie · Transformation · Ingénierie · Architecture
Comments
Join the discussionNo comments yet. Be the first to comment.
Software Assets Platform
AI can now write the code. The real question is: would you know if the code was wrong? This series is based on a real enterprise project — one developer, two repositories, two months — built almost entirely with an AI assistant. It tells the story of the bugs an adversarial AI review found before a single line of code, the times the AI was confidently wrong, and the method that made it all work: the living specification, where the spec is the source of truth, the invariants are the contract, and the code is a continuously verified implementation.





