Maintainability is exactly what the practice trades away, so keeping any of it is a deliberate act rather than a by-product. The useful question is not how to have both but when to buy some of it back.
When does it become worth paying for?
At the point somebody else depends on it, real data enters it, or you expect to still be running it in six months. Any of those converts a throwaway into something with a future, and the practice that suited the first does not suit the second.
Noticing that transition is the hard part, since it happens without an announcement.
What is the first thing to fix?
A written description of what the thing does. Not the code: what it is for, what it stores, what it connects to, how to run it and what would break it.
That document is what makes everything else recoverable, and it is the cheapest thing on the list.
The order matters because each step makes the next cheaper. Documentation first means the reading is directed, and reading first means the consolidation is safe, where doing them in the other order produces effort spent on parts that turn out not to matter.
What comes next?
- Read the risky parts. Anything destructive or external.
- Remove what is unused. Generated projects accumulate dead code.
- Consolidate duplication. The same logic in four places is normal here.
- Get the data model straight. Since it is expensive to change later.
- Add a few tests. On whatever would be worst to break silently.
Naming conventions drift for the same reason, which makes searching the project harder than it should be and compounds every other difficulty.
Why is duplication so characteristic?
Because each request was answered locally, without reference to what already existed. The same operation ends up implemented separately in several places, and fixing a bug in one leaves it in the others.
This is the specific thing that makes vibe coded projects fragile as they grow.
How do you find the problems without reading everything?
Review this project as a whole rather than as individual changes. Where is the same logic implemented more than once, what is unused, and where would a change in one place need a matching change somewhere else that is easy to miss?
That question produces a genuinely useful list, and it is the kind of comparison a model does well.
What about tests?
Worth having on the few operations where a silent failure would be expensive, rather than everywhere. Tests are also the thing that makes future changes safe when you cannot fully predict their effect, which is the position you are in.
Is it worth rewriting instead?
Frequently, for anything small. A rewrite with a clear description and an understanding of what the thing actually needs to do is faster than untangling something built incrementally by a tool with a partial view.
For anything large the rewrite is not realistic, which is an argument against letting it get large in the first place.
What does the debt actually feel like?
Small changes costing more than they should. A request that ought to take ten minutes takes an afternoon, because the change has to be described, the result checked by behaviour, and the two side effects it produced found and described in turn.
That is the shape of the cost rather than a dramatic failure, and it compounds quietly. A project where every small change costs an afternoon eventually stops being changed at all, which is how something that works perfectly well ends up abandoned in favour of a rewrite nobody planned for.
What is the honest position?
A project built this way and kept has a debt attached to it. Paying some of it down at the moment it stops being temporary is considerably cheaper than paying all of it at the moment something breaks.