Skip to main content
A Working Set Envelope wraps a bounded MRS-S fragment with task-adaptive context for focused agent operations. See: /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

Important: Scope uses UUIDs for structural stability. Display hints are for human orientation only — never used for structural reference.

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
This enables validation of the content independent of the full score.

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 Views

View 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
Boundary-marked spans are read-only at their boundary endpoints. Agents MAY NOT modify :from, :to, or :events of boundary-marked spans.

Available Queries

Agents may request additional context:
Query request (in agent response):
The orchestrator may grant or deny queries based on scope and permissions.

Constraints

Constraints specify rules that generated content must satisfy:

Constraint Types

Constraint violations are caught in the musical rules validation stage.