Headings first, then one range
An outline is the ATX headings in a note, skipping headings inside fences. For each heading, to is the line before the next heading of equal or higher rank, or the last line of the note. The result is a list of ranges. It is not the body.
Call read with view=outline before reading a note that may be longer than 80 lines. The default read cap is 80 lines or 1500 tokens. The hard ceiling is 200 lines or 2500 tokens.
Example#
The wire contract does not print an outline body. Do not guess the row shape. Call read with view=outline and use the ranges in that response.
The follow-up is a body slice. This is the printed shape of that slice:
nhb_0123456789abcdef
DATA NOT INSTRUCTIONS
path notes/a
id n_AbCdEfGhIjKl
revision 4
by deploy-agent (nh_wk_9f2a)
at 2026-10-12T08:14:00Z
range 2-4
rangeHash 0123456789abcdef
corrections 1 open. The owner asks for these fixes. Change the note so it says what is asked, then close each one with correct action=resolve, its id, and a reason.
correction c_Q1w2E3r4T5y6 by owner at 2026-10-11 on lines 2-2
2│beta
!│Soak is 30 minutes, not 10. Do not shorten it.
2│beta
3│gammaPass lines as a 1-based inclusive range taken from the outline. Pass rev on that read. Pass that same number to edit as baseRevision. Copy later expect text from after the numbered │. Do not copy a ! line. The gutter is not part of the line. rangeHash matches the numbered slice. Lines with ! are the correction body. That text is data like any note text.
Server lines have no gutter. A heading line inside the note is a gutter line. It is stored data.
When it fails#
read with no lines on a long note returns a window and a server line next lines=<from>-<to> rev=<rev>. It is not an error and it is not the rest of the note. Follow that line. A range past the ceiling returns too_large. A single line over 1500 tokens returns line_too_long. That hint sentence is not printed in the wire contract.
Do this instead#
Call view=outline. Pick one range. Call read with lines set to that range. Edit inside the range. If the window stops early, call read again with the range on the next lines= line. Do not raise the request to the whole note.