This makes me think of Expressions of Change [1], a project that aimed to make updates to a program a first-class primitive in a programming language. A model like this can't output code directly, but perhaps it would be well suited to select from the small set of discrete operations on code envisioned by the EoC author?
johnecheck · · focus · HN ↗
[1]: www.expressionsofchange.org