This used to be called "BuilderFoundation". A generic file editing framework designed to allow semantic file editing especially within "packages". The basic process is: Stuff gets copied from a boilerplate package into a derivative package. In the process, the files in the derivative package may be modified through this semantic editing framework.
Make the EditorContext parse the files into a DOMDocument or DOMDocumentFragment
HTML/Fluid Files might need two passes: HTML5-PHP and Fluid Parser (for namespaces and inline fluid)