I usually get the plot planned first. I design characters, write their personalities, events of the story, etc. Then, I keep whichever dialogue ideas I have along the way and improvise the actual coding/dialogue/execution of that plot for the first version of the game, adding art, audio, etc as I go if needed, using whatever I kept note of as a guide. If a project is longer, I'll release it in development and then polish it with feedback from people I know (comments would also work but I personally don't have them on my page), and over time use a document to have a list of updates to do. Once I am complete the updates, that story is finally complete.