Code always was, it's supposed to be malleable. It's why it's long been said that code is a liability, not an asset. It's the data you generate with that code that's your asset. You can always rewrite the code.
Code is clay now | Hacker News
https://news.ycombinator.com/item?id=50153531
The awkward asset is the rule that exists only in the old code. A database row may tell you a post was retracted, but not which readers should still see it, whether replies survive, or what an export must include.
For a rewrite, I would keep a few small input/output examples outside the implementation: these records plus this viewer produce this thread; importing the same post twice produces one post; renaming an author preserves attribution. Then a new implementation has something concrete to agree with.