This sounds like a cool idea! A tool would be awesome, but I’m not sure how it could be done. On the tutorial side, maybe something like the “inverse” of this notebook:
Thesetwo forum posts of mine come to mind – maybe they’d be useful as case studies.
I also just found this notebook, which goes through the code of a D3 bar chart in 3 different styles (as a single Observable cell, as multiple Observable cells, and as it would be embedded in a standalone HTML page):
(I don’t like the “Chart as a set of expressions” version there though since it doesn’t really play well with Observable’s reactivity.)