Skip to main content
This page follows RFC section 3. For the full text, see: /MRS-Specification-RFC#3-architecture-overview. MRS enables context-aware agent operations on full-scope scores: tools and machine agents operate on focused regions with appropriate surrounding context, while the orchestrator maintains the full score and handles structural coordination.

Core Components

┌─────────────────────────────────────────────────────────────────────┐
│                         MRS ECOSYSTEM                                │
│                                                                      │
│   ┌────────────────────────────────────────────────────────────┐    │
│   │                        MRS-S                                │    │
│   │                The Single Canonical Format                  │    │
│   │                                                             │    │
│   │ • Complete, hierarchical, self-documenting                  │    │
│   │ • Measures and events indexed by stable UUIDs               │    │
│   │ • Used for storage, interchange, AND agent I/O              │    │
│   └────────────────────────────────────────────────────────────┘    │
│                              │                                       │
│              ┌───────────────┼───────────────┐                      │
│              ▼               ▼               ▼                      │
│   ┌──────────────┐  ┌──────────────┐  ┌──────────────┐             │
│   │   SYNOPSIS   │  │ WORKING SET  │  │   OVERLAYS   │             │
│   │              │  │   ENVELOPE   │  │              │             │
│   │ • Structural │  │              │  │ • Harmonic   │             │
│   │   overview   │  │ • Scoped     │  │   analysis   │             │
│   │ • Read-only  │  │   content    │  │ • Motivic    │             │
│   │ • Derived    │  │ • Context    │  │   tracking   │             │
│   │              │  │   rings      │  │ • Typed,     │             │
│   │              │  │ • Scope      │  │   optional   │             │
│   │              │  │   negotiation│  │              │             │
│   └──────────────┘  └──────────────┘  └──────────────┘             │
└─────────────────────────────────────────────────────────────────────┘

The Context Problem

Full scores are too large for context windows, but editing requires understanding surrounding material:
Score TypeApprox. Tokens
Lead sheet~2K
Piano sonata~40K
Full orchestra~1.5M
Editing the clarinet part in measures 45-52 requires:
  • The melodic material being responded to
  • The harmonic context
  • Phrase boundaries
  • What comes before and after
See: /MRS-Specification-RFC#3-2-context-problem

The Solution: Context-Aware Extraction

Working Set Envelopes extract:
  1. Content: Full-detail MRS-S for the edit region (writable)
  2. Context rings: Surrounding material at reduced detail (read-only)
  3. Synopsis access: Structural overview of the entire score (read-only)

Stable Identifiers

Every measure, event, and span carries a stable UUIDv7 identifier:
(measure 
  :id #uuid "018c3f40-1234-7890-abcd-ef1234567890"
  :number 45    ; Display property only
  :beat-start 487+1/4
  ...)
  • :id — Stable identity, survives insertions/deletions
  • :number — Display property for human navigation
All internal references use UUIDs. Measure numbers appear only in :display-hint fields. See: /MRS-Specification-RFC#3-3-stable-identifiers

Why One Format?

MRS uses a single syntax for all operations:
BenefitDescription
Unambiguous syntaxNo context-dependent parsing
Trivial merge logicScope replacement: delete old, insert new
Single parserOne grammar, one implementation
No conversionAgent I/O uses the same syntax as storage
The insight: agents don’t need a different format—they need a different scope with appropriate context.