I think that is a good pattern too, though I would replace the make/taskfile step with something bazel-like.
Dagger used to be more declarative with CUE, but demand was not strong enough.