A query starts with a projection such as lines, wrap, indent, or table, then narrows its nodes with metadata predicates and selection operations. > is the explicit composition step: selected spans become a new mapped current view before the next projection runs. The second stage sees local text and local indexes while retaining links back to the source.
The query surface is documented by implemented operations, not by every historical syntax. Use projection-specific spans when structural boundaries matter, and use explicit joins when materializing separated selections. Complex source transformations remain visible instead of being hidden in a string-building shortcut.
textquery source.txt /input:file /q:'wrap[name=round]:inner > lines:at(0)' /output:json