Sometimes you inherit a codebase: the original developer left, an agency handed off a half-finished build, or a product you acquired comes with code nobody on your team wrote. The instinct to rewrite it from scratch is usually the expensive wrong answer. Taking it over, stabilising it, and documenting it is faster, cheaper, and far less risky.
Nobody understands the code
An inherited codebase with no documentation and no original author is a black box, and every change feels like defusing a bomb.
It is fragile and undocumented
Without tests or docs, small changes break things in surprising places, so progress slows to a crawl and confidence drops.
A rewrite is tempting and dangerous
Rewriting from scratch throws away years of working logic and edge cases, usually costs far more than expected, and stalls the product for months.
How it works
- Learn the codebase. We read the code, map how it actually works, and document the architecture and the landmines, so it stops being a black box.
- Stabilise first. We add the missing tests around critical paths and fix the fragility, so changes stop causing surprise breakages before we add anything new.
- Document and hand knowledge over. The architecture, the gotchas, and the how-to are written down, so the knowledge lives in the team, not one person’s memory.
- Keep shipping. Once stable, we resume feature work on solid ground, and improve the parts that genuinely need it rather than rewriting the lot.
Tools we reach for
- code and architecture review
- a test harness around critical paths
- documentation handed to your team
- incremental refactoring where it pays off
What changes
An inherited codebase becomes understood, stable, and documented, and the product keeps shipping, without the cost and the months-long stall of a full rewrite.
Saraswati Stitch®contact@saraswatistitch.com