gabriel / muse public
feat patch harmony task/harmony-phase1 #1 / 1
AI Agent gabriel · 59 days ago · Apr 17, 2026 · Diff

feat(harmony): Phase 1 — Resolution Intelligence core data model + 135-test suite

Introduces muse.core.harmony — a greenfield resolution intelligence system built from the ground up for Muse's agent-first, domain-agnostic paradigm. Replaces the mechanical rerere replay model with a three-tier pipeline: policy → exact replay → semantic match → escalate.

Core concepts - ConflictPattern: semantic identity with blob + semantic fingerprints - Resolution: committed decision with strategy, rationale, AgentProvenance, confidence, human_verified, applied_count - Policy: declarative rule scoped workspace→repo→domain→file; first match wins - ResolutionProposal: candidate with confidence score for agent auto-accept - AgentProvenance: attribution (type: agent|human, agent_id, model_id)

Open string-constant namespaces (ConflictType, ResolutionStrategy, PolicyAction, PolicyScope, AuditEventType) — extensible by domain plugins without modifying this module.

Storage: .muse/harmony/patterns/<id>/pattern.json + resolutions/, .muse/harmony/policies/<id>.json, .muse/harmony/audit/<YYYYMMDD>-<uuid4>.json

Security: hex64 + URL-safe ID validation, symlink guards, size caps (32/16/8/4 KiB), atomic writes via temp-file + os.replace.

Test suite (tests/test_harmony_phase1.py — 135 tests, all green): I Unit (35) — fingerprints, validation, namespaces, dataclasses, condition matching II Integration (60) — pattern/resolution/policy/audit CRUD, gc_stale III End-to-end (7) — full conflict lifecycle + audit trail IV Stress (4) — 100-pattern scan, concurrent record/increment V Data integrity (11) — atomic write, JSON round-trip, field types VI Security (14) — path traversal, symlinks, size caps, malformed JSON VII Performance (7) — per-operation timing assertions

sha256:50452d2577f9354841ee5a7d3ca3ffbc6c8b2daf9b0b4ef867cda97953cf8acc sha
sha256:88ab774ca9bc89fc3249580dc891c63a5c3461f26be11fb457db2e58f71fae4e snapshot
← Older Oldest on task/harmony-phase1
All commits
Newer → Latest on task/harmony-phase1

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:50452d2577f9354841ee5a7d3ca3ffbc6c8b2daf9b0b4ef867cda97953cf8acc --body "your comment"