This looks extremely useful, thanks! Does this play well with generative testing, like the experimental schema generators?
Do you use schema with this library to model the domain of the code, or primarily for validation on the boundaries, e.g. database/external services/etc.? I am asking because I have tried using schema to model the domain previously, and ended up mainly using schemas at the boundaries; so I am curious about your approach and how it has worked out for you. I was by specifying things like “this is a phone number, it has this structure” but it eventually felt very heavy, adding schemas to lots of little helper functions.
I will give this lib a spin at some point, it definitely looks like an improvement on schema, and the readability is miles ahead of spec.