Region markers
A region is delimited by two marker lines:
docref: begin <name>
docref: end <name>
The tokens may appear anywhere in a line, behind any comment leader. The grammar is therefore language-agnostic without per-language comment parsing:
// docref: begin footnote-ordering
# docref: begin retry-loop
-- docref: begin tenant-scope
<!-- docref: begin nav-skeleton -->
Rules:
- Recognition pattern:
docref:\s*(begin|end)\s+([a-z0-9][a-z0-9-]*). - Names are kebab-case and unique per file. A duplicate
beginwith the same name in one file is an error. endalways carries the name. This keeps nested and overlapping regions unambiguous; both are permitted.- An unmatched
beginorendis an error. - The marker lines themselves are excluded from extraction and from hashing.
Symbols need no marker and are the default. Markers are for sub-symbol slices (five specific lines inside a function) or for languages and file types where structural resolution is unavailable.