feat(harmony): Phase 2 — CLI subcommand group + MIDI harmony rename
Replace the MIDI chord-analysis harmony.py with the Resolution Intelligence CLI, and rename the former to midi_harmony.py (kept for the midi rollout).
muse harmony subcommands (13 total): record — persist a ConflictPattern (idempotent) list — list patterns (--domain / --conflict-type filters) show — full pattern + all resolutions resolve — save a Resolution; CLI-level idempotency via content scan best — highest-quality resolution (human_verified > conf > applied) forget — delete pattern + resolutions clear — delete all patterns (--yes skips prompt) gc — GC stale unresolved patterns older than --age days policy-add — add/replace a declarative policy policy-list — scope-sorted policy listing policy-remove — remove a policy audit — append-only audit log (--limit)
app.py wiring: harmony.register(subparsers) added alongside mv midi_harmony commented out in the disabled midi rollout block
Test suite (tests/test_harmony_cli.py — 120 tests, all green): I Unit (21) — TypedDict schemas; subcommand help exits 0 II Integration (53) — all subcommand success paths (text + JSON) III Error (19) — invalid IDs, missing patterns, out-of-range confidence IV E2E (5) — record→resolve→best, policy lifecycle, gc, clear V Data integrity (6) — null fields always present, confidence round-trip VI Security (7) — path-traversal IDs rejected at every subcommand VII Performance (6) — all subcommands complete <300 ms
Combined: 255/255 green (135 Phase 1 + 120 Phase 2).
0 comments
muse hub commit comment sha256:d203ff4c7b74475a36623ee4b8137bb36c0f3d26e4a89dfd64b404e64d3ec63c --body "your comment"
No comments yet. Be the first to start the discussion.