advice on developing libraries/frameworks
How to make a framework or library that doesn't end up producing applications that are miserable to maintain or extend:
1. Make every component optional to use and easy to bypass.
2. But make sure that the lower-level mechanisms that those components use are also directly addressable/usable.
3. Leave deliberate gaps in your API design for bespoke application-specific things to go.
4. Do not make assumptions or structural demands of user code unless you're also willing to design abstractions that ensure them on behalf of the user.
5. Decouple the parts of the framework as much as possible, and treat them as mostly-separate libraries that just happen to work well together, preferring standardized data representations between parts where possible.
That's really all you need to allow users of your framework/library to do their own thing and swap out the bits that don't work for them, but so so few projects actually do these things...
advice on developing libraries/frameworks (3)
There's a lot of common advice about things like API stability and upgrade paths and whatnot, but that sort of advice tends to be very "draw the rest of the fucking owl" - the recommendations above are how you actually *get to* those kinds of design properties without burning yourself out.