Episode 5 I guess.
Yes, it's being written from scratch. Following all the material that we already had, but since we had to simplify the story, and now we are adding different mechanics, the script to what used to be Chapters 3-9 is now completely being comprised into what is Episode 5. Of course, a lot was thrown out because there were full chapters where you played as Alexander and Rosella, but the main story arch told through all the chapters is now going to be found in Episode 5 in a simplified way (which is still a lot of backstory to tell and things to happen), so that's why it's being done "from scratch".