AI-written code still needs human maintenance habits
can make it easy to accept repeated logic across a project. In a firsthand example, the same access check appeared in a route handler, a , an , and a webhook. Each version worked and the tests passed, but the better design would have been a shared helper that kept the rule in one place.
The risk is that an LLM reads the existing codebase before writing more code. If duplicated checks are merged, the model may treat that duplication as the project’s normal style and repeat it again. Asking for a refactor later may not fix every copy, because the messy pattern has already spread.
Small code smells can pile up until prompts alone are not enough, and a human has to clean up the structure directly.
Key points
- can quietly duplicate the same logic in several places.
- A working test suite does not prove the code will be easy to maintain.
- An LLM uses the existing codebase as a guide for future changes.
- Repeated bad patterns can become the style the AI keeps copying.
- Later may miss some copies once duplication has spread.