It's not your problem if a client wants to change a project or add on new stuff in the middle of a project. They need to pay for the time. If it's much more expensive to do that during a project than by setting specifications at the start that's their problem, not yours. If your client is inexperienced you can explain this to them before taking on the project so there's no misunderstandings later.
So if someone pays me to create some code and they claim they've told me (or helped me write) 100% of the specifications, I'm not obligated to build the code so that it's easy to extend later. Now a good developer wants to make things easy to extend later but your primary job here is to meet specifications. If we know at the outset that the code needs to be easy to extend that would be one of the requirements from the start and also be a factor in pricing. Again, this is something to discuss with less experienced clients before you start so there's no misunderstandings 8 months later (or whenever).