A rewrite is not a code decision. It is a cutover decision, and the quality of the old code tells you almost nothing about whether the cutover is possible.
Five questions worth answering before anyone writes a line:
-
Is there a seam? If you cannot route a subset of traffic (one endpoint, one merchant, one country) into the new system, you do not have a migration. You have a launch date.
-
Can both systems write? Not read. Write. Dual-write or shadow-write is what lets you compare behaviour under real load instead of trusting a spec meeting.
-
What is the behavioural baseline? In a legacy system the output is the spec. If you cannot capture and replay it, "correct" is undefined, and every diff turns into an argument nobody can settle.
-
Is the data move reversible? Additive, idempotent migrations and a path back matter more than schema elegance. The rewrite you cannot roll back is the one you ship under pressure.
-
Who owns the old system during the overlap? Legacy keeps taking change requests while you rebuild. Unowned drift is how a planned rewrite chases a moving target indefinitely.
Python 2 to 3 migrations and monolith-to-services work taught me the same lesson: the rewrites that landed had a seam and a working comparison. The ones that stalled had a better architecture and no way to get there.
Probably one of those five breaks first in your system. Worth knowing which one...