The codebase that got you to product-market fit starts fighting you once you're past it — slower feature velocity, more regressions, a growing list of things "nobody wants to touch." The instinct is often to rebuild from scratch. That instinct is usually wrong.
If the core architecture is sound and the pain is concentrated in a few specific modules, refactor. You keep the working 80% of the system intact and fix what's actually broken, with continuous shipping the whole time.
A rebuild earns its cost when the fundamental data model or architecture can't support where the product is going — not when it's just old or unfamiliar. If every new feature requires fighting the existing structure rather than extending it, that's a structural problem no refactor fixes.
Ask: "if we refactored the three worst modules, would the system support our roadmap for the next 18 months?" If yes, refactor. If the honest answer is no even after fixing the obvious problems, that's your rebuild signal. Talk to us if you want a second opinion before committing either way.