cgcardona / muse public
README.md markdown
111 lines 5.0 KB
1f0a7cd9 docs: rename demo-midi.md → midi-demo.md and add full MIDI domain reference Gabriel Cardona <gabriel@tellurstori.com> 13h ago
1 # Muse — Demo Hub
2
3 > Domain-agnostic version control for multidimensional state.
4 > Music is the first domain. Code is the second. Genomics, 3D design, and
5 > spacetime simulation are next.
6
7 Choose a domain to see Muse's full power:
8
9 ---
10
11 ## [MIDI Demo →](midi-demo.md)
12
13 **31 semantic porcelain commands — version control that understands music.**
14
15 Muse treats MIDI as a typed, content-addressed graph of note events. Every
16 note has a stable content ID. Every commit stores a note-level structured
17 delta. Two composers can independently harmonize the same track and merge
18 at the note level — changes to non-overlapping notes never conflict.
19
20 | Group | Commands |
21 |-------|---------|
22 | Notation & Visualization | `notes` · `piano-roll` · `instrumentation` |
23 | Pitch, Harmony & Scale | `harmony` · `scale` · `contour` · `tension` · `cadence` |
24 | Rhythm & Dynamics | `rhythm` · `tempo` · `density` · `velocity-profile` |
25 | Structure & Voice Leading | `motif` · `voice-leading` · `compare` |
26 | History & Attribution | `note-log` · `note-blame` · `hotspots` |
27 | Multi-Agent Intelligence | `agent-map` · `find-phrase` · `shard` · `query` |
28 | Transformation | `transpose` · `invert` · `retrograde` · `quantize` · `humanize` · `arpeggiate` · `normalize` · `mix` |
29 | Invariants & Quality Gates | `check` |
30
31 Plus the core VCS operations with musical semantics:
32 `muse diff` shows "C4 added at beat 3.5" · `muse merge` resolves conflicts
33 per dimension (melodic / harmonic / dynamic / structural) · `muse show`
34 displays note-level changes in musical notation.
35
36 Full command reference: [MIDI Domain Reference](../reference/midi-domain.md)
37 ## [Code Demo →](demo-code.md)
38
39 **12 commands that are strictly impossible in Git.**
40
41 Muse treats code as a typed, content-addressed graph of named symbols — not
42 a bag of text lines. Every commit stores a symbol-level structured delta.
43 Every function has a stable identity hash that survives renames and moves.
44
45 | Command | One-line description |
46 |---------|---------------------|
47 | `muse code symbols` | Every function, class, and method in the snapshot — extracted from real ASTs |
48 | `muse code grep` | Search the symbol graph by name, kind, or language — no false positives |
49 | `muse code query` | Predicate DSL: `kind=function language=Go name~=handle hash=a3f2c9` |
50 | `muse code languages` | Language + symbol-type breakdown across the whole repo |
51 | `muse code blame` | Which commit last touched this exact function? One answer. |
52 | `muse code symbol-log` | Full history of one symbol — renames and moves included |
53 | `muse code detect-refactor` | Classify semantic operations: rename / move / signature / impl |
54 | `muse code hotspots` | Symbol churn leaderboard — which functions change most? |
55 | `muse code stable` | Symbol stability leaderboard — your bedrock, safe to build on |
56 | `muse code coupling` | File co-change analysis — semantic hidden dependencies |
57 | `muse code compare` | Deep semantic diff between any two historical snapshots |
58 | `muse code patch` | Surgical per-symbol modification — the agent interface |
59
60 **Supported languages:** Python, TypeScript, JavaScript, Go, Rust, Java, C, C++, C#, Ruby, Kotlin
61
62 ---
63
64 ## Shared Architecture
65
66 Both domains build on the same engine:
67
68 ```
69 Content-addressed object store ← immutable, SHA-256
70 Snapshot manifest ← file path → object hash
71 Structured delta ← typed DomainOp tree (insert / delete / replace / move / patch)
72 Commit graph ← parent chain with structured deltas on every node
73 ```
74
75 The **MIDI plugin** adds:
76
77 ```
78 Note event model ← NoteKey (pitch, velocity, start_tick, duration_ticks, channel)
79 Note-level diffs ← PatchOp with child InsertOp/DeleteOp per note
80 Dimensional merge ← melodic / rhythmic / harmonic / dynamic / structural
81 Content IDs per note ← SHA-256 of the five NoteKey fields
82 ```
83
84 The **code plugin** adds:
85
86 ```
87 AST symbol trees ← SymbolRecord (kind, name, body_hash, signature_id, content_id)
88 Symbol-level diffs ← PatchOp with child InsertOp/DeleteOp/ReplaceOp per symbol
89 Rename detection ← body_hash match across addresses
90 Move detection ← content_id match across files
91 ```
92
93 Every domain command is a consumer of what the plugin already produces.
94 No new storage format. No new protocol. Just queries over the structured
95 commit history.
96
97 ---
98
99 ## The Semantic Stack
100
101 | Layer | What it stores | Music commands | Code commands |
102 |-------|---------------|----------------|---------------|
103 | **Object store** | Raw bytes, SHA-256 | All | All |
104 | **Snapshot manifest** | `file_path → sha256` | `notes`, `harmony`, `piano-roll` | `symbols`, `languages`, `compare` |
105 | **Structured delta** | Typed op tree per commit | `note-log`, `note-blame`, `note-hotspots` | `blame`, `hotspots`, `stable`, `coupling` |
106 | **Domain graph** | Notes / AST symbols | `velocity-profile`, `harmony`, `query` | `grep`, `query`, `patch` |
107 | **Write layer** | Live file modification | `transpose`, `mix` | `patch` |
108
109 ---
110
111 *Muse v0.1.2 · Python 3.14 · `tree-sitter` for code · `mido` for MIDI*