I was just digging in the CMS code to see what Don was referring to.
cms/tcl/form-proc.tcl.content::get_revision_form
builds up
template::element create
statements based on metadata and evaluates them as it goes. I was thinking that instead this could be tweaked to write out a tcl file much like bcms can "publish" a template/datasource pair.
content::process_revision_form
looks pretty cool, too. Probably a plenty to debug and bring up to date here, but there is definitely a fair amount of work already done.