I think this might be on the right track. Imagine using this to build programs as well, drag around generated functions and connect things visually. Each function can be its own node, and you can adjust the inputs and outputs by drag-dropping stuff and have the AI magically figure out the requirements.
I am working on an app [1] that does very similar as far as the branching goes (minus the right hand side visual which I have plans to support something very similar but along with a git like graph).