I felt a need to be able to generate spec and Datomic schemas in the same place while prototyping our application (which I'd say is "always", btw, which will have implications later on).
I made this possible by creating a parallell spec registry (simply map of keys, similar to the spec registry) and a special def-macro, called "schdef", which put the spec into the ordinary spec registry with s/def, and into the parallell registry with just a swap!. It works decently well for our use-case. Clojure.spec is a little limited in which things can be hooked into it, and I think part of it is to avoid this kind of overloading for now.
We generate all our datomic schema from this during development, and it makes it a breeze to add new schema attributes and create initialized test dbs by reading the registry.
Of course there are downsides, but not in the double registry-atoms (at least not right now). One thing to explore more is the possibility to add warnings when one spec/schema-attribute update is incompatible with an attribute already in the registry, since this means our registry is most likely not coherent and could break based on load order (this happens most often when we put specs in shared libraries, and/or in test-namespaces, and can be tedious to track down - a more strict s/def mode could maybe be of help here - mostly for developer ergonomics). Maybe this could be solved with an emacs-mode or similar - like "highlight s/defs which are incompatible (whatever that may means) with the current spec on that key".
/Linus