Skip to main content
MRS enables safe, context-aware agent operations on full scores through a separation of concerns: a semantic score model, typed mutation operations, orchestrator authority, and task-adaptive context. See: /MRS-Specification-RFC#3-architecture-overview

System Architecture

Core Components

MRS-S (Human/Audit Representation)

A complete, archival-quality representation of score semantics:
  • Human-readable S-expression syntax
  • Stable UUIDv7 identifiers for all objects
  • Complete semantic fidelity
  • Useful for interchange, debugging, review, and as agent input
Implementation note: An orchestrator does not have to store canonical state as a single MRS-S text document. A database/graph-backed canonical model with indexes and caches can materially improve extraction speed and real-time feedback, as long as it preserves MRS semantics and can export equivalent MRS-S.

MRS-Ops (Mutation Protocol)

Typed operations for reliable agent output:
  • Explicit create/update/delete operations
  • Temporary IDs (orchestrator assigns UUIDs)
  • Orchestrator computes derived fields
  • Eliminates accidental deletions and calculation errors

Orchestrator

Central coordinator that makes AI composition safe:
  • Sole authority for UUID minting
  • Computes derived fields (:at, :beat-start)
  • Progressive validation before application
  • Generates task-adaptive context views
  • Maintains audit trail

Working Set Envelope

Bounded extraction with context for agent tasks:
  • Scoped MRS-S content (what agent can read/modify)
  • Task-adaptive context views
  • Lane bundle permissions
  • Structural index reference for global awareness

Structural Index

Compressed global view of the score:
  • Form/structure overview
  • Key areas and tempo map
  • Player/instrument activity
  • Rehearsal mark locations

Analytical Overlays

Typed metadata attached to score regions:
  • Harmonic analysis (chord symbols, functions)
  • Thematic analysis (motifs, themes)
  • Form analysis (phrases, periods, sections)

Data Flow

The Scale Problem

MRS solves this through bounded extraction with task-adaptive context—agents work on focused regions while understanding their musical surroundings.

Multi-Agent Coordination

Multiple agents can work in parallel with disjoint lane bundles. The orchestrator validates and applies operations, detecting conflicts via source-hash comparison.