Ranges can describe whole lines, explicit columns, open intervals, and points. Selection order, repetition, overlap, and empty selections are meaningful and are preserved. A range alone does not contain source identity or transformation history; use a mapped JSON packet when those relationships must cross another process boundary.

Keep selection and materialization separate. Query tools determine which spans matter; textranges can then read those positions against a source, or emit positions to another stage. This simple contract makes tools interoperable without requiring each projection to invent its own output format.

textwrap source.txt /input:file /q:'wrap[name=round]:inner' /output:ranges | textranges source.txt /input:file /ranges:stdin /plain