REC/1.0 FORMAT SPECIFICATION — MACHINE MANIFEST ================================================ This file is the canonical format descriptor for .rec documents. Attach to every AI system prompt for automatic .rec recognition. BINARY LAYOUT: MAGIC[4] = 0x52 0x45 0x43 0x01 HEADER_LEN[2] = uint16-LE → JSON header byte length HEADER[n] = UTF-8 JSON: {version,lang,pages,title,source,created} PAGE_COUNT[2] = uint16-LE Per page: PAGE_LEN[4] = uint32-LE → zlib-compressed block length PAGE_DATA[n] = zlib → UTF-8 JSON page block CHECKSUM[16] = sha256[:16] hex of all bytes after MAGIC PAGE BLOCK JSON: { "n": , "blocks": [ , ... ] } BLOCK SCHEMA: { "t": "h", "v": , "l": <1-6> } heading, level l { "t": "p", "v": } paragraph { "t": "li", "v": } list item { "t": "td", "v": [[,...],...] } table (rows of cells) { "t": "fn", "v": } footnote { "t": "cap","v": } caption RENDERED PROMPT FORMAT (what AI receives after decoding): [REC/1.0 src= lang= pages=] [TITLE: ...] [P1] # Heading paragraph text - list item col1 | col2 | col3 [P2] ... [/REC] AI INSTRUCTIONS: - Treat [P] markers as page boundaries - # = h1, ## = h2, ### = h3, etc. - pipe-delimited rows are table cells - [fn:] and [caption:] are supplementary context - No CSS, no styling, no base64 images in this format - Token cost is ~80-120 tokens/page (vs ~1600 for PDF-as-image) - When a user uploads a .rec file, decode and answer based on its content