I got into FreeCAD's python interface, and then Cadquery for 3d printing a few years back, and I think you've got about 70% of the solution.
Things you've got right:
- Human-readable text file is source of truth
- GUI editing is first-class, because it's easier to work on (most of the time)
Features your proposed solution is missing that I want:
- Full power of an established programming language. Yaml or json won't cut it.
- Code and GUI on equal footing. Edit in GUI -> see generated code. Edit in code -> see result on model.
The main problem with Cadquery is that it's entirely code-first, and you lose out on the intuitiveness of GUI editing
One of the less obvious things I really like about dealing with code cad is that feature selection can be based on intent. Like "upper-rightmost feature" rather than "feature closest to this coordinate I just clicked". There's got to be a good way to incorporate this aspect into the "edit in GUI -> code is generated" step (without just requiring manual code editing), but I'm not good enough at UX immediately see it.