cgcardona / muse public
README.md markdown
85 lines 3.5 KB
2535fc53 feat(code): supercharge code plugin with 9 new semantic commands Gabriel Cardona <gabriel@tellurstori.com> 1d 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 ## [Code Tour de Force →](tour-de-force-code.md)
12
13 **12 commands that are strictly impossible in Git.**
14
15 Muse treats code as a typed, content-addressed graph of named symbols — not
16 a bag of text lines. Every commit stores a symbol-level structured delta.
17 Every function has a stable identity hash that survives renames and moves.
18
19 | Command | One-line description |
20 |---------|---------------------|
21 | `muse symbols` | Every function, class, and method in the snapshot — extracted from real ASTs |
22 | `muse grep` | Search the symbol graph by name, kind, or language — no false positives |
23 | `muse query` | Predicate DSL: `kind=function language=Go name~=handle` |
24 | `muse languages` | Language + symbol-type breakdown across the whole repo |
25 | `muse blame` | Which commit last touched this exact function? One answer. |
26 | `muse symbol-log` | Full history of one symbol — renames and moves included |
27 | `muse detect-refactor` | Classify semantic operations: rename / move / signature / impl |
28 | `muse hotspots` | Symbol churn leaderboard — which functions change most? |
29 | `muse stable` | Symbol stability leaderboard — your bedrock, safe to build on |
30 | `muse coupling` | File co-change analysis — semantic hidden dependencies |
31 | `muse compare` | Deep semantic diff between any two historical snapshots |
32 | `muse patch` | Surgical per-symbol modification — the agent interface |
33
34 **Supported languages:** Python, TypeScript, JavaScript, Go, Rust, Java, C, C++, C#, Ruby, Kotlin
35
36 ---
37
38 ## [Music Tour de Force →](tour-de-force-script.md)
39
40 **The reference domain — version control for audio compositions.**
41
42 Muse treats MIDI and MusicXML as structured state. Every note is a semantic
43 element. Every commit records which bars changed, which instruments were added,
44 which tempo markers shifted. Three-way merges happen at the note level —
45 two musicians can independently arrange the same song and merge without conflicts.
46
47 ---
48
49 ## Shared Architecture
50
51 Both domains build on the same engine:
52
53 ```
54 Content-addressed object store ← immutable, SHA-256
55 Snapshot manifest ← file path → object hash
56 Structured delta ← typed DomainOp tree (insert / delete / replace / move / patch)
57 Commit graph ← parent chain with structured deltas on every node
58 ```
59
60 The code plugin adds:
61
62 ```
63 AST symbol trees ← SymbolRecord (kind, name, body_hash, signature_id, content_id)
64 Symbol-level diffs ← PatchOp with child InsertOp/DeleteOp/ReplaceOp per symbol
65 Rename detection ← body_hash match across addresses
66 Move detection ← content_id match across files
67 ```
68
69 Every code-domain command is a consumer of this data. No new storage format.
70 No new protocol. Just queries over the structured commit history.
71
72 ---
73
74 ## Four Semantic Layers
75
76 | Layer | What it stores | Used by |
77 |-------|---------------|---------|
78 | **Object store** | Raw file bytes, content-addressed | All domains |
79 | **Snapshot manifest** | `file_path → sha256` | `symbols`, `languages`, `compare` |
80 | **Structured delta** | Typed op tree per commit | `blame`, `hotspots`, `stable`, `coupling`, `detect-refactor`, `symbol-log` |
81 | **Symbol graph** | AST-parsed `SymbolRecord` per file | `grep`, `query`, `patch` |
82
83 ---
84
85 *Muse v2 · Python 3.11 · zero runtime dependencies except `tree-sitter`*