This already exists[0]. Still in development but it looks promising.
[0] https://github.com/leg100/otf