gabriel / muse public
refactor BREAKING harmony task/harmony-decompose #1 / 13
AI Agent gabriel · 110 days ago · May 26, 2026 · Diff

refactor(harmony): move auto_apply + record_resolutions into engine.py

__init__.py was defining 250+ lines of integration logic instead of being a pure re-export shim. auto_apply and record_resolutions belong in engine.py per the decomposition spec — they are the high-level integration entry points that sit on top of the three-tier engine.

__init__.py is now a pure re-export shim (219 lines, zero function defs). engine.py gains the two functions and the imports they need.

sha256:cb2da6c61116ad1ab98d03747c21d6f66485839c7b4efd7d0124db0f8aa14e41 sha
+24 ~10 −8 symbols
sha256:a0b586dfa477f529d410ceaa961746a332657bbc806e31d50d6c786e739664a3 snapshot
+24
symbols added
~10
symbols modified
−8
symbols removed
0
dead code introduced
Semantic Changes 42 symbols
~ muse/core/harmony/__init__.py .py 9 symbols added, 8 symbols removed
auto_apply function function auto_apply L222–335
Manifest import import Manifest L102–102
logging import import logging L99–99
pathlib import import pathlib L100–100
short_id import import short_id L102–102 → moved to muse/core/harmony/engine.py
validate_object_id import import validate_object_id L103–103 → moved to muse/core/harmony/engine.py
logger variable variable logger L216–216
record_resolutions function function record_resolutions L337–476
+ DefaultPlugin import import DefaultPlugin L209–209
+ EngineConfig import import EngineConfig L209–209
+ EngineResult import import EngineResult L209–209
+ EngineStatus import import EngineStatus L209–209
+ HarmonyPlugin import import HarmonyPlugin L209–209
+ auto_apply import import auto_apply L209–209
+ find_similar import import find_similar L209–209
+ record_resolutions import import record_resolutions L209–209
+ resolve import import resolve L209–209
~ muse/core/harmony/engine.py .py 15 symbols added, 10 symbols modified
+ auto_apply function function auto_apply L508–622
+ ConflictType import import ConflictType L89–89
+ Manifest import import Manifest L75–75
+ _now_utc import import _now_utc L79–79
+ blob_fingerprint import import blob_fingerprint L79–79
+ compute_pattern_id import import compute_pattern_id L79–79
+ compute_resolution_id import import compute_resolution_id L79–79
+ compute_semantic_fingerprint import import compute_semantic_fingerprint L79–79
+ list_resolutions import import list_resolutions L88–88
+ load_pattern import import load_pattern L86–86
+ record_pattern import import record_pattern L86–86
+ save_resolution import import save_resolution L88–88
+ short_id import import short_id L75–75 ← moved from muse/core/harmony/__init__.py
+ validate_object_id import import validate_object_id L76–76 ← moved from muse/core/harmony/__init__.py
+ record_resolutions function function record_resolutions L625–764

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:cb2da6c61116ad1ab98d03747c21d6f66485839c7b4efd7d0124db0f8aa14e41 --body "your comment"