Preliminary "Header inferencing" XSLT
The develop branch @aaad1151a46ab75771c5b6f92912680b610d4bd1 now has a demo pipeline showing dynamic attribution of header levels h1-hx to paragraphs in a document based on their formatting. It is fairly crude but seemingly effective.
It needs demo and discussion, and in particular the rules for what makes a header need to be shaken out.
However it also needs an invocation script. (So far only an XProc pipeline, which does a little more work than the regular extraction pipeline, then generates an applies an XSLT to achieve this mapping.) So that comes next...