# Generated code can be fast and expensive at the same time.

> AI coding assistants reduce some implementation friction while increasing the need for architectural clarity.

Canonical URL: https://marmation.com/review/generated-code-and-architecture-debt/

By Vikram Roy · 2026-11-12

A developer asks an agent to add a new customer workflow. It completes the feature rapidly, but duplicates validation logic that already exists elsewhere and bypasses one authorization layer. The speed is real. So is the engineering debt.

## The decision behind the technology

Architecture has more to do with boundaries and invariants than syntax. A coding agent may see only part of a codebase or not know the organization’s reason for a pattern. If the task lacks context and acceptance criteria, the agent can satisfy the local request while harming the system.

## A better way to frame the work

Provide curated repository context, architectural decision records, access rules and tests that represent intended behavior. Ask for small reviewable changes. Separate code-writing speed from end-to-end delivery metrics. Keep humans responsible for accepting design tradeoffs.

## Put the idea under realistic pressure

Run an experiment: give an agent a task that crosses two service boundaries. Have a senior engineer evaluate not only whether tests pass but whether ownership and authentication remain correct. Add regression tests for the invariant the first attempt missed. This teaches the team what context must be shared.

## When the recommendation changes

For self-contained prototypes and disposable experiments, minimal architectural ceremony may be appropriate. For long-lived products and regulated data, the cost of hidden coupling is much higher.

## What to decide before moving forward

Measure review time, defects, change failure and rework alongside coding speed. If improvements do not reach production, the workflow needs redesign.

### References and context

[Stack Overflow Developer Survey 2026](<https://survey.stackoverflow.co/2026/ai/data>); [Thoughtworks Technology Radar](<https://www.thoughtworks.com/radar>).

## Sources

- [Thoughtworks Technology Radar](<https://www.thoughtworks.com/radar>) — Thoughtworks. Original technical editorial research; exemplar of knowledge product. Example of original technical editorial content Limit: Not day-one direct competitor in size; inspiration not copy. Editorial reference not Marmation affiliation
- [Developer Survey 2026: AI](<https://survey.stackoverflow.co/2026/ai/data>) — Stack Overflow. Coding agents and developer workflows adoption context. Limit: Responses are a developer survey, not entire engineering workforce.

## Related reading

- [AI belongs inside a good product, not beside it](https://marmation.com/review/product-systems/)
- [What makes an AI product feature worth building?](https://marmation.com/review/ai-product-business-case/)
- [The demo answers. The product has to deliver.](https://marmation.com/review/ai-product-from-prototype-to-production/)
