/MRS-Specification-RFC#9-extract-replace-protocol
Overview
Extraction
Extraction produces a Working Set Envelope from a source document:- Validate requested scope (measure UUIDs exist, parts exist)
- Compute source hash for conflict detection
- Resolve inherited state (time/key/tempo at extraction start)
- Copy measures in UUID range
- Build context rings at reduced detail
- Include spans (mark boundary crossings)
- Build envelope with metadata and synopsis reference
/MRS-Specification-RFC#9-2-extraction-mrs-s--working-set
Replacement
Replacement applies agent output back to the source:- Verify source hash (for conflict detection)
- Validate response scope (UUID range, parts)
- Parse response content as MRS-S
- Assign UUIDs to new objects lacking them
- Delete all content in scope from source
- Insert all content from response
- Handle span updates
- Full validation
/MRS-Specification-RFC#9-3-replacement-working-set--mrs-s
UUID-Based Operations
All scope specifications use UUIDs:Insertion Operations
When agents need to insert new measures::number values and updates absolute positions.
Round-Trip Guarantee
For any valid MRS-S document S and extraction parameters P:/MRS-Specification-RFC#9-4-round-trip-guarantee