The four kinds, in plain words
| Kind | What it looks like | Why it costs you |
|---|---|---|
| No tests | Nothing checks that a change did not break something else | Every new feature is a gamble |
| Old packages | The parts your app is built on are versions behind | A security flaw becomes a week of upgrades |
| Repeated code | The same logic exists in five places, slightly different | A fix in one place leaves the bug in four |
| Unknown reasons | Nobody knows why a piece of code is the way it is | People are afraid to touch it |
AI-built apps tend to have a lot of the first and third. An assistant writes working code quickly and rarely writes the test, and it will happily solve the same problem again in a new file.
How to tell how much you have
You do not need to read the code. Three questions:
- When you add a feature, does something unrelated break? That is missing tests.
- When did you last update anything? If the answer is “never”, that is old packages.
- When you ask your AI assistant for a change, does it take several tries? The codebase has become hard for it to follow too.
What does not work
A full rewrite. It feels clean. It throws away everything that currently works, and the new version builds its own debt.
Ignoring it. Debt compounds. The longer packages drift, the harder each upgrade.
One big cleanup. A month spent tidying with nothing shipped. It rarely survives contact with a deadline.
What works
Pay it down in small pieces, tied to real problems.
- Add a test each time something breaks. The bugs you actually hit are the best guide to what needs testing.
- Keep packages current continuously, a few at a time, so no upgrade is ever large.
- Fix security holes as they are published, before they pile up.
- Leave working code alone unless you are changing it anyway.
Where Bugstack fits
Bugstack does autonomous software maintenance. It pays down this debt as a side effect of fixing things:
- Every crash it fixes comes with a test. The test reproduces the bug and stays in your repository, so your test coverage grows around the code that actually breaks.
- It scans your packages daily and opens upgrade pull requests a few at a time, for npm packages.
- It checks for vulnerable packages every four hours and opens the upgrade that closes each one.
- It fixes a failing build on your main branch, so breakage does not sit.
It does not refactor your code or remove repetition. Those are judgment calls about your product, and they stay with you.
Questions
Is AI-generated code more prone to technical debt?
It tends to arrive without tests and with more repetition, because an assistant optimises for the request in front of it. Both are fixable, and neither means the app is badly built.
Should I rewrite my vibe-coded app properly?
Usually not. A working app with real users is worth more than a clean one without them. Add tests where it breaks, keep the packages current, and rewrite a piece only when you are changing it anyway.
How do I stop the debt growing?
Make upkeep continuous: something that watches for breakage, keeps packages current and closes security holes as they appear. That is the job of a maintenance tool or a person assigned to it.