I'm taking my own stab at the same problem over in this org: https://github.com/bablr-lang/. It makes my head spin seeing the problem domain expressed in such a different way!
The best place to get started is to see how CSTML works in the playground: https://bablr.org/playground. It's meant to be a self-describing format. It can be streamed, and we have a btree-backed storage format for it that makes incremental editing of immutable trees a breeze.