Frimer-Rasmussen Consulting

When Vibe Coding Becomes Fragile: Why Fast Teams Need State Design

Nøglebegreber & Terminologi
The moment vibe coding changes character
Vibe coding is often enjoyable when one person is exploring a small idea.
State Design is a maturity checkpoint
The solution is not to stop vibe coding.
State Design is not edge case handling
One important distinction is easy to miss:

When Vibe Coding Becomes Fragile: Why Fast Teams Need State Design

Generative AI has made software development faster than most IT leaders were prepared for.

A developer can turn an idea into a working prototype in a day. A small team can ship a customer-facing feature at a pace that used to require far more planning, coordination, and budget.

That speed is real.

It is also valuable.

But it creates a new management problem.

When several people use AI agents to build quickly on the same system, the visible product can move faster than the shared understanding of the system. Features appear before their states are named. Interfaces look finished before the backend truth is stable. Security checks arrive after the workflow already behaves as if it were safe.

This is the fragile point in vibe coding.

Not the beginning, where speed is useful.

But the moment a prototype starts becoming software other people depend on.


The moment vibe coding changes character

Vibe coding is often enjoyable when one person is exploring a small idea.

The feedback loop is fast. The prototype appears quickly. The work feels creative. You can test an idea before the organisation has spent weeks discussing whether it might work.

That is a good thing.

For many teams, generative AI removes the dead weight between idea and experiment. Instead of long discussions, the team can build something, try it, and learn.

But the same working style can become painful when the code changes maturity.

A feature is no longer just an experiment when:

  • several people build on it

  • customers can reach it

  • it touches real data

  • it connects to other processes

  • it becomes hard to change safely

At that point, the question is no longer:

Can we make it work?

The question becomes:

Do we understand it well enough to maintain it?

That is where many fast teams get into trouble.

The code still looks like progress. But underneath, nobody has a shared model of what the system can be, what it is allowed to do, and what must never happen.


State Design is a maturity checkpoint

The solution is not to stop vibe coding.

Vibe coding is useful for discovery. It helps teams find out whether an idea is worth pursuing. It makes abstract opportunities concrete.

But once a prototype becomes shared, customer-facing, data-connected, or difficult to change safely, it needs a different discipline.

That discipline is State Design.

State Design is not a heavy upfront architecture process. It is a checkpoint between exploration and production.

Before a fast-built prototype becomes part of a real product, the team should be able to answer a few basic questions:

What are the main states of the system?
Which transitions are allowed?
Which transitions must be impossible?
What does the user see in each important state?
What is actually true in the backend?
Which states expose, store, or delete data?
Which states require authorization?
Which parts are still unfinished?

If the team cannot answer those questions, the prototype may still be useful.

But it is not yet production-ready.


State Design is not edge case handling

One important distinction is easy to miss:

State Design is not the same as edge case handling.

An edge case usually belongs to a workflow. It describes an unusual path through a process:

A user uploads the wrong file.
A customer refreshes the page during report generation.
A user starts the same process twice.
A payment succeeds, but the confirmation email fails.

Those are workflow situations.

A state is different.

A state describes what a component, workflow, data object, user session, or system process is at a given moment.

For example, a document in an AI reporting system may be:

uploaded, validating, invalid, processing, processing_failed, report_ready, exported, or deleted.

Those are not edge cases.

They are possible truths about the system.

The mistake is to design only the obvious states and then treat everything else as an exception.

In real software, many so-called edge cases are signs that the actual state model was never designed.


Workflows have paths. Components have states.

A workflow describes movement.

A state describes condition.

That distinction matters.

A workflow might say:

The user uploads a document, AI generates a report, and the user exports it.

State Design asks:

What can be true about the document, the user, the AI job, the database, the UI, and the permissions at each point in that workflow?

Those are different questions.

A workflow can have alternative paths.

A component can have alternative states.

The two are related, but they are not the same.

This is where State Design becomes useful for teams. It gives the system a shared language. Not just for the AI agent, but for developers, testers, product owners, customers, and future maintainers.

Without that shared language, every contributor creates their own assumptions.

The UI developer assumes one thing.
The backend developer assumes another.
The AI agent infers a third.
The customer discovers the fourth.

That is where fast work becomes fragile.


Case: Customers find the unfinished corners

A prototype usually works best when the creator demonstrates it.

The creator knows where not to click. They know which file to upload. They know which button to avoid pressing twice. They know which feature is only half-finished.

Customers do not know that.

They move through the product as if it were real.

They upload messy files. They go back in the browser. They reopen old reports. They click disabled-looking buttons. They assume that visible data is valid data.

This is not bad user behaviour.

It is normal user behaviour.

When customers find unfinished corners, it often means the product has visual surfaces without designed states.

A report page may show a report that is only partially generated.
A success message may appear even though the database write failed silently.
An export button may be visible before the report has been validated.
A dashboard may show data that is stale.
A deleted item may only be hidden in the interface, not actually deleted.

State Design prevents this by forcing a simple rule:

The user interface must not imply a system truth that the backend cannot guarantee.

That rule alone improves quality.

If the data is stale, the UI should say so.
If deletion is not complete, the system should not pretend that it is.
If a report is still being generated, it should not look final.

A good state model makes unfinished corners visible before customers discover them.


Case: Security becomes a late patch

In vibe-coded systems, security often arrives late.

The first version focuses on making the feature work: upload the file, generate the report, save the result, show it to the user.

That is understandable.

But if the state model is missing, security becomes a patch added after the product already has behaviour.

That is risky.

Security is not only a layer around the system. Security is also part of the system’s state.

A user session can be anonymous, authenticated, expired, revoked, or privileged.

A document can be private, shared, locked, pending deletion, or deleted.

An AI-generated report can be draft, ready, approved, exported, restricted, or expired.

If those states are not designed, permissions become scattered across the codebase.

One screen hides a button. Another route forgets to check access. An API endpoint trusts the client. A background job writes output for a user whose access has changed.

That is not an edge case.

That is an undesigned security state.

For IT leaders, this is one of the most practical reasons to introduce State Design.

It turns security from a late UI correction into a set of explicit questions:

Who owns this object in this state?
Who may move it to the next state?
What happens if access changes mid-process?
What data exists here?
What should be logged?
What must be deleted?

That is lightweight governance in practice.

Not a large compliance programme.

Just a clear answer to:

Who may do what, with which data, in which state?


Case: Different processes write to the same database

Many AI-enabled workflows are not just UI interactions.

They often include file uploads, backend validation, AI generation, database writes, exports, retries, notifications, and deletion.

That means several processes may touch the same data.

Without State Design, these processes can interfere with each other.

One process thinks the document is ready. Another is still validating it. A retry job generates a second report. An export starts before the report is complete. A deletion request arrives while processing is still running.

The result is not just bugs.

It is uncertainty about truth.

State Design gives the data object a lifecycle.

For example:

uploaded → validating → ready_for_processing → processing → report_ready → exported → pending_deletion → deleted

That lifecycle makes it possible to define legal and illegal transitions.

Can a report be exported while it is still processing? Can a deleted document be processed by a delayed background job? Can two processes update the same report at the same time? Can a retry create duplicate output?

Once states are named, these questions become much easier to handle.

Instead of asking:

Why did the database get weird?

The team can ask:

Which process performed an illegal transition?

That is a much better debugging question.


Case: Changing half-finished work

This is one of the most common problems in AI-assisted development.

A developer or AI agent builds something quickly. It works well enough in one scenario. Another developer later changes it without knowing which assumptions were built into it.

The second developer may not be careless.

They simply lack the state contract.

They do not know that a draft must never be exported. They do not know that deleted is irreversible. They do not know that a cancelled job may still finish in the background, but must be ignored. They do not know that UI-disabled actions must also be blocked server-side.

Without State Design, half-finished work is dangerous because its boundaries are invisible.

With State Design, unfinished work can be safer because the missing pieces are named.

A developer can leave behind a clear note:

Implemented:

- upload started

- upload completed

- validation failed

Not implemented:

- re-entry after upload

- retry after failed validation

- server-side deletion check

That changes collaboration.

The next developer does not have to guess what is unfinished. The AI agent does not have to infer the system model from scattered code. The customer does not accidentally test a path that pretends to be complete.

State Design turns half-finished software from a hidden trap into a visible work-in-progress.


State Design makes unfinished work honest

In fast AI-assisted development, unfinished work is unavoidable.

That is not the problem.

The problem is when unfinished work looks finished.

Generative AI is very good at creating surfaces. It can quickly create a button, a dashboard, a report page, a settings screen, or an export flow.

But a surface is not a system.

A system needs clear states.

State Design creates a visible distinction between:

implemented and not implemented valid and invalid saved and only shown locally deleted and merely hidden failed and retryable ready and approved

These distinctions matter because they reduce the amount of hidden knowledge the team has to carry.

Without them, the team is forced to remember too much.

With them, the system begins to explain itself.


What IT leaders should ask before production

A practical State Design checkpoint does not need to be large.

Before building further on a promising prototype, ask the team:

  1. What are the main states of the central objects?

  2. Which transitions must be impossible?

  3. Which states require authorization?

  4. Which states expose, store, or delete data?

  5. Which unfinished states could a customer accidentally reach?

If the answers are unclear, the issue is not necessarily bad engineering.

It may simply be that the team has moved too fast for the system’s state model to keep up.

That is fixable.

But it should be fixed before the feature becomes hard to change, hard to audit, or risky to expose to real users.

The point is not to remove speed.

The point is to prevent speed from turning into hidden complexity.


Conclusion: Use vibe coding for discovery, State Design for maturity

The solution is not to stop vibe coding.

The solution is to stop treating all code as if it had the same maturity.

Early code can be exploratory. It can be rough. It can be fast. That is part of the value.

But once the code becomes shared, customer-facing, connected to real data, or hard to change safely, it needs a different discipline.

That discipline is State Design.

For IT leaders, the practical rule is simple:

Do not call something an edge case until you know whether it is actually a missing state.

If the user uploads a wrong file, maybe the document needs an invalid state.

If AI generation fails, maybe the job needs a failed-and-retryable state.

If access changes mid-process, maybe the workflow needs an access-revoked state.

Name the states before you patch the symptoms.

That is how AI-assisted development stays fast without becoming fragile, exhausting, and unsafe to maintain.

← Tilbage til Artikler Til toppen ↑