e. g. ASDF to use certain declamations? Is making the declarations in the
library dependent on documented entries to *features* the way to go? Where
would I push the desired settings into *features*?
Even if you set them in ASDF, you will have to have a way to tell it when you are debugging code (always), and when you are generating a end-user application (once in a blue moon, and in a different, explicitely controlled process).
And yes, since asdf doesn't cache the compiled files in separate directories for the various optimization settings (or the various *features* list), since that would be very unwiedly, you have to clear the cache when you switch between generating the end-user application, and normal developping work. rm -rf ~/.cache/common-lisp/ is found in all application generation makefiles.
Optimize declaimations and declarations in libraries is the curse of the CL application developper.