Cast before you write.
Characters first, then the lines they say.
Every speaker gets a sheet: who they are, casting notes, and a voice. Lines are written against speakers, never against voices, so recasting one character changes every line they say and nothing else. You see what a scene will cost before anything is generated, and unchanged lines are never paid for twice.
