This isn't quite what you are looking for, and may...
# spicedb
p
This isn't quite what you are looking for, and maybe not relvant to spicedb directly, but i've played with generating code based on Proto specs, and then using that at runtime to do authorization: https://github.com/pquerna/protoc-gen-authz/blob/main/examplepb/example.proto