gabriel / muse public
.museattributes
118 lines 4.7 KB
e74bbfd6 chore: ignore .hypothesis, .pytest_cache, .mypy_cache, .ruff_cache; add… gabriel 8h ago
1 # .museattributes — merge strategy overrides for this repository.
2 # Documentation: docs/reference/muse-attributes.md
3 #
4 # Format: TOML with an optional [meta] header and an ordered [[rules]] array.
5 # Rules are evaluated top-to-bottom after sorting by priority (descending).
6 # The first matching rule wins. Unmatched paths fall back to "auto".
7 #
8 # ─── Strategies ───────────────────────────────────────────────────────────────
9 #
10 # ours Take the current-branch (left) version; remove from conflicts.
11 # theirs Take the incoming-branch (right) version; remove from conflicts.
12 # union Include all additions from both sides. Deletions are honoured
13 # only when both sides agree. Best for independent element sets
14 # (MIDI notes, symbol additions, import sets, genomic mutations).
15 # Falls back to "ours" for binary blobs.
16 # base Revert to the common ancestor; discard changes from both branches.
17 # Use this for generated files, lock files, or pinned assets.
18 # auto Default — let the three-way merge engine decide.
19 # manual Force the path into the conflict list for human review, even when
20 # the engine would auto-resolve it.
21 #
22 # ─── Rule fields ──────────────────────────────────────────────────────────────
23 #
24 # path (required) fnmatch glob against workspace-relative POSIX paths.
25 # dimension (required) Domain axis name (e.g. "notes", "symbols") or "*".
26 # strategy (required) One of the six strategies above.
27 # comment (optional) Free-form note explaining the rule — ignored at runtime.
28 # priority (optional) Integer; higher-priority rules are tried first.
29 # Default 0; ties preserve declaration order.
30
31 [meta]
32 domain = "code" # must match the "domain" field in .muse/repo.json
33
34 # ─── MIDI domain examples ─────────────────────────────────────────────────────
35 # [[rules]]
36 # path = "drums/*"
37 # dimension = "*"
38 # strategy = "ours"
39 # comment = "Drum tracks are always authored on this branch."
40 # priority = 20
41 #
42 # [[rules]]
43 # path = "keys/*.mid"
44 # dimension = "pitch_bend"
45 # strategy = "theirs"
46 # comment = "Remote always has the better pitch-bend automation."
47 # priority = 15
48 #
49 # [[rules]]
50 # path = "stems/*"
51 # dimension = "notes"
52 # strategy = "union"
53 # comment = "Unify note additions from both arrangers; let the engine merge."
54 #
55 # [[rules]]
56 # path = "mixdown.mid"
57 # dimension = "*"
58 # strategy = "base"
59 # comment = "Mixdown is generated — always revert to ancestor during merge."
60 #
61 # [[rules]]
62 # path = "master.mid"
63 # dimension = "*"
64 # strategy = "manual"
65 # comment = "Master track must always be reviewed by a human before merge."
66
67 # ─── Code domain examples ─────────────────────────────────────────────────────
68 # [[rules]]
69 # path = "src/generated/**"
70 # dimension = "*"
71 # strategy = "base"
72 # comment = "Generated code — revert to base; re-run codegen after merge."
73 # priority = 30
74 #
75 # [[rules]]
76 # path = "src/**/*.py"
77 # dimension = "imports"
78 # strategy = "union"
79 # comment = "Import sets are independent; accumulate additions from both sides."
80 #
81 # [[rules]]
82 # path = "tests/**"
83 # dimension = "symbols"
84 # strategy = "union"
85 # comment = "Test additions from both branches are always safe to combine."
86 #
87 # [[rules]]
88 # path = "src/core/**"
89 # dimension = "*"
90 # strategy = "manual"
91 # comment = "Core module changes need human review on every merge."
92 # priority = 25
93 #
94 # [[rules]]
95 # path = "package-lock.json"
96 # dimension = "*"
97 # strategy = "ours"
98 # comment = "Lock file is managed by this branch's CI; ignore incoming."
99
100 # ─── Generic / domain-agnostic examples ───────────────────────────────────────
101 # [[rules]]
102 # path = "docs/**"
103 # dimension = "*"
104 # strategy = "union"
105 # comment = "Documentation additions from both branches are always welcome."
106 #
107 # [[rules]]
108 # path = "config/secrets.*"
109 # dimension = "*"
110 # strategy = "manual"
111 # comment = "Secrets files require manual review — never auto-merge."
112 # priority = 100
113 #
114 # [[rules]]
115 # path = "*"
116 # dimension = "*"
117 # strategy = "auto"
118 # comment = "Fallback: let the engine decide for everything else."