Back to Thoughts

AI Writes the Code. The Engineer Still Owns the System

Jan 28, 20266 min readView raw

AI did not replace our engineers. It replaced the easiest part of engineering: turning a clear plan into code.

That sounds like a small distinction until you work this way for a few months. The bottleneck moves from syntax to judgment. The expensive mistakes are no longer missing imports or bad loops. They are unclear boundaries, weak plans, and small architectural decisions that quietly become the shape of the codebase.

Here is how we use AI at DevDash Labs, and where we still do not trust it.

Link to this sectionThe AI coding workflow that actually stuck

We use three tools because each one has a clear job.

Cursor is for autocomplete. It is fast, local to the file, and good at predicting the next few lines without turning every edit into a discussion.

Claude Code is for planning and implementation. When we need to scaffold a feature, reason through a refactor, or touch several files, it is useful because it can inspect context before writing code.

Codex is for criticism and second-pass review. It is useful as a separate reader because it catches different mistakes than the tool that wrote the first patch.

The important part is not the tool list. The important part is the separation of responsibilities. Autocomplete, builder, reviewer. When one tool tries to do all three jobs without human checkpoints, quality drops quickly.

Link to this sectionWhere AI-assisted coding fails

AI is not bad because it makes syntax mistakes. Those are easy to catch.

It is bad because it makes plausible design choices without understanding the cost of living with them.

Give it a component to build and it may dump everything into one file: state, rendering, API calls, validation, and error handling. Give it the same problem with a different prompt and it may split the work into twelve files when three would do. Neither failure is random. The model optimizes for completing the requested task, not for preserving your system's shape.

Docs are another weak spot. We tried letting AI write internal documentation directly. The result was padded, over-explained, and hard to scan. Our docs need to help team leads answer a specific question quickly. AI kept writing like the reader had unlimited patience. They do not.

The deeper failure mode is standards drift. You can give the model conventions, examples, and repo rules. It will follow them most of the time.

Most of the time is not enough.

Small violations compound. One odd folder choice becomes a pattern. One broad abstraction gets copied. One unreviewed helper turns into the place every future change has to route through.

By the time the mistake is obvious, you are no longer fixing a patch. You are negotiating with architecture you never chose.

Link to this sectionReview the plan before reviewing the code

Our rule is simple: no meaningful change starts with code.

For bigger work, AI proposes a plan first. We review the plan before a file changes. If the plan has the wrong boundary, touches the wrong layer, skips a migration, or invents a pattern, we fix that before implementation.

This catches the highest-cost errors early. A bad plan can generate a good-looking diff that is still wrong. A good plan usually produces a diff that is easier to review, easier to test, and easier to unwind.

We also keep work chunked. One step at a time. One diff at a time. The model can handle large context windows, but reviewers still need to understand what changed and why.

The workflow looks like this:

  1. Define the change and constraints.
  2. Point the tool at the relevant files, docs, and conventions.
  3. Review the implementation plan.
  4. Let it write a focused patch.
  5. Review the diff manually.
  6. Run the relevant tests.
  7. Repeat for the next step.

The slower part is step three. That is also where most of the value is.

Link to this sectionContext beats prompting tricks

The best AI coding results we get do not come from clever prompts. They come from good context.

Before the tool writes code, we give it the real inputs:

  • the existing files that define the pattern
  • official package docs when an API matters
  • internal guidelines
  • relevant tests
  • the exact failure or acceptance criteria

"Learn this first" is a real instruction in our workflow.

Without that context, the model fills gaps with defaults from the internet. Sometimes those defaults are fine. Sometimes they are the exact opposite of what your repo needs.

Link to this sectionThe compound-error problem in AI codebases

The failure mode of AI-assisted coding is rarely one giant wrong answer.

It is a chain.

The model makes a small architectural choice you do not catch. That choice shapes the next three files. Those files become context for the next feature. The next feature copies the pattern. Two weeks later, the codebase has a new architecture, but nobody on the team explicitly agreed to it.

The fix is not to avoid AI. The fix is to review earlier.

Review the plan. Review the boundaries. Review the abstractions. Review the tests. Code review still matters, but by the time you are staring at line 700 of a generated patch, many of the important decisions have already been made.

Link to this sectionThe engineer's job moves up the stack

The developers who benefit most from AI are not the ones who type fastest. They are the ones who can tell whether the work is structurally right.

That means the job shifts toward:

  • designing the system before implementation
  • deciding when a feature needs a new abstraction, and when it does not
  • setting conventions clearly enough that tools can follow them
  • reviewing plans, not just diffs
  • testing generated code as if a very confident junior engineer wrote it
  • understanding security, data flow, and production failure modes

You still need to know how software works. You just spend less time proving it by typing every line yourself.

Link to this sectionWhat we still do manually

We do not outsource architectural ownership.

AI can propose a design, but a human owns the trade-off. AI can write a test, but a human decides whether the test proves the right thing. AI can explain a diff, but a human still has to ask whether the diff should exist.

That is the line we hold.

The output of AI-assisted coding is not code you accept. It is code you interrogate.

Link to this sectionThe practical takeaway

If you are adding AI to your engineering workflow, start with review gates, not tool subscriptions.

Decide where AI is allowed to act autonomously. Decide which changes require a plan. Decide what context must be loaded before implementation. Decide how large a generated diff can get before it becomes unreviewable.

AI made me type less code. It did not make me responsible for less code.

That is the trade: less syntax, more judgment. Less typing, more ownership.

Keep reading

All thoughts
Gopal Khadka