> ## Documentation Index
> Fetch the complete documentation index at: https://musicready.org/llms.txt
> Use this file to discover all available pages before exploring further.

# MRS-S Overview

> The canonical storage format with stable UUID identifiers.

MRS-S is the canonical storage format for complete, archival-quality scores. It is optimized for semantic fidelity, human readability, and validation.

See: [`/MRS-Specification-RFC#4-mrs-s-the-canonical-storage-format`](/MRS-Specification-RFC#4-mrs-s-the-canonical-storage-format)

## Role in MRS Architecture

| Format      | Purpose                           |
| ----------- | --------------------------------- |
| **MRS-S**   | Storage, interchange, agent input |
| **MRS-Ops** | Agent output, mutations           |

Agents **read** MRS-S fragments in Working Set Envelopes. Agents **write** MRS-Ops operations. The orchestrator applies operations to canonical score state.

## Top-level Structure

```clojure theme={null}
(mrs-s 1.0
  (meta <metadata>)
  (players <player-definitions>)
  (instruments <instrument-definitions>)
  (measures <measure-content>)           ; OR (movements <movement-content>)
  (spans <span-definitions>)
  (overlays <overlay-content>)           ; OPTIONAL
  (structural-index <index-content>)     ; OPTIONAL
  (alternatives <alt-content>)           ; OPTIONAL
  (layout <layout-hints>))               ; OPTIONAL
```

## Key Characteristics

### Stable UUID Identifiers

Every measure, event, and span carries a stable UUIDv7 identifier:

```clojure theme={null}
(measure 
  :id #uuid "018c3f40-1234-7890-abcd-ef1234567890"
  :number 45
  :beat-start 487
  ...)

(: 0 C5.q 
  :id #uuid "018c3f2a-1234-7890-abcd-ef1234567890"
  :dyn p)
```

* `:id` — Stable identity for all internal references
* `:number` / `beat` — Display/structural position for human navigation

### Player-Instrument Model

Players own instruments; instruments appear in measure content:

```clojure theme={null}
(players
  (player woodwind-2
    :name "Flute 2 / Piccolo"
    :instruments [flute-2 piccolo]
    :default flute-2))

(instruments
  (instrument flute-2 :name "Flute" :transposition none ...)
  (instrument piccolo :name "Piccolo" :transposition (up P8) ...))

(measures
  (measure :id #uuid "..." :number 1
    (flute-2 (v1 ...))    ; Before instrument change
    (piccolo (v1 ...))))  ; After instrument change
```

### Orchestrator-Computed Derived Fields

In MRS-S storage, `:at` (absolute position) is optional. The orchestrator computes it:

```
event.:at = measure.:beat-start + event.beat
```

This is a change from earlier versions: agents no longer provide `:at` in operations; the orchestrator computes it.

### All References Use UUIDs

Span endpoints, working set scopes, overlay regions—everything references by UUID:

```clojure theme={null}
(slur
  :id #uuid "018c3f2c-..."
  :from #uuid "018c3f2a-..."
  :to #uuid "018c3f2b-...")
```

### Canonical Rational Syntax

All temporal positions use exact rationals:

```
0, 1, 2              ; Integers
2+1/2                ; Two and a half
0+1/3                ; One third
3+3/4                ; Three and three quarters
```

Decimal literals (`2.5`) are NOT permitted.

## File Types

* **MIME type**: `application/vnd.mrs+sexpr`
* **Extensions**: `.mrs` or `.mrs-s`
* **Encoding**: UTF-8 (no BOM)

## Related Documentation

* [Metadata & Players](/mrs-s/metadata-and-parts)
* [Measures & Events](/mrs-s/measures-and-events)
* [Spans, Directions & Structure](/mrs-s/spans-directions-and-structure)
