Headings produce a derived section tree that downstream metrics (MCC, Filler / Lazy Risk, Section Balance) read from. Every section has a heading level, byte/line range, parent/child IDs, word count, and per-section artifact and link counts.Documentation Index
Fetch the complete documentation index at: https://mehen.ophi.dev/llms.txt
Use this file to discover all available pages before exploring further.
Structure
Each section node carries:Quality flags
mehen marks three structural smells on the section tree:| Flag | Trigger |
|---|---|
| Heading skip | Direct nesting jump (e.g., H1 → H4 without an intervening H2/H3). |
| Chunking smell | An H2 section that is oversized relative to the document’s p95 length. |
| Fragmentation smell | A document flooded with very short H5/H6 nodes — over-decomposition. |
How downstream metrics use the tree
- MCC reads heading-level changes to charge nesting penalties.
- Filler / Lazy Risk reads section sizes to detect “shallow big doc”.
- Section Balance penalizes oversized sections at the 95th percentile.
- Evidence Coverage computes per-section evidence anchor density.
References
- W3C: Web Content Accessibility Guidelines 2.1 — Heading levels — the source of the heading-skip quality flag (assistive-technology users rely on heading-level ordering).
- CommonMark Spec: ATX headings and setext headings — the parser-level definition the section tree builds on.
See also
- LOC family — feeds per-section line counts.
- Section Balance — balance scoring on the tree.