/MRS-Specification-RFC#7-working-set-envelope
Design Principles
- Agents read MRS-S — complete, human-auditable score fragments
- Scopes use UUIDs — not measure numbers — for structural stability
- Task-adaptive context — views tailored to the specific task, not fixed rings
- Permissions via bundles — lane bundles grant appropriate modification rights
Envelope Structure
Envelope Fields
Required Fields
Scope Specification
Permission Fields
Optional Fields
Content Self-Containment
The:content of a Working Set Envelope MUST be parseable as standalone MRS-S:
- Instrument definitions MUST be included
- Time/key/tempo state at extraction start MUST be declared
- Spans MUST have both endpoints within scope OR be marked with boundary markers
Task-Adaptive Context Views
Context views provide task-relevant information beyond the edit scope. Unlike fixed “near/far” rings, views are selected and shaped for the specific task. See: Task-Adaptive Context ViewsView Types
View Selection by Task
Boundary-Crossing Spans
When a span crosses the envelope boundary:Boundary Rules
:boundary-entry true— span starts outside scope, ends inside:boundary-exit true— span starts inside scope, ends outside- Both markers — span crosses through scope
:from, :to, or :events of boundary-marked spans.
Available Queries
Agents may request additional context:Constraints
Constraints specify rules that generated content must satisfy:Constraint Types
Constraint violations are caught in the musical rules validation stage.