It's not yet 100% ready for prime-time, and certainly not for hundreds of thousands of tasks, but I wrote a ...hm... generic framework-wrapping framework (using Ansible as the first and only currently supported 'framework' -- but I'm working on a Terraform adapter, and plain shell-scripts. K8s is also planned), that supports optional typing of arguments. It also allows you to add other metadata to arguments (like documentation, references):
https://freckles.io
It can be used directly, using yaml. Or via Python (a bit like Pulumi, just more generic, and also a bit more flexible in other ways). Should be easy enough to also support other languages like JavaScript, although I think I'll write a client-library for a proper functional language first, because that'd be a really good fit, conceptually.
Still needs better (and up-to-date) documentation, and I realize I really have to work on my elevator pitch (as is probably quite obvious). But I'm already using it for most of my sysadmin/devops related tasks, and I'm growing more and more confident that the concept behind it is sound.
The ultimate goal is to allow users to build 100% composable devops pipelines, so that a complete app- (or whatever else-) infrastructure (including potential bootstrapping of physical machines as well as building container images, etc.) can be described with a single dict-like structure. That's probably a bigger piece of cake than I'll be able to bite off though :-)