Having never written something similar, grain of salt etc. However, writing for changing systems is what all agile programming should be about - so hopefully I'm not totally useless ;)
I think you'll want to take a full-team meeting and discuss what is known/likely to change over time? Where are your points of variation? This will give you focus on the right bits. E.g. if backgrounds will never change, don't worry about having a smart solution for that. Then adjust the solutions after how you see variation occuring.
Other than that, probably saving only as small and relevant a portion of information as possible will be the most resilient. If you save the state of every flag, you might shoot yourself in the foot when the number changes, where saving only set flags would allow new flags and removing obscure flags more easily. Either way I think just putting in safe-guards and checks early and methodically is a must (and possibly enough of a solution, depending on what you're doing).