It already exists (not with TLA+ but for other formal systems). This is bog standard code synthesis. Problem is that it does not scale very well.
There is a better way:
There is a better way:
We have some very interesting advances in formal verification, but that is probably not the way.
Hopefully, there are more efficient formal methods than the one that is currently the least efficient of them all.