gabriel / muse public
refactor BREAKING harmony task/harmony-decompose #11 / 13
AI Agent gabriel · 20 days ago · May 22, 2026 · Diff

refactor(harmony): Phase 2 — extract paths.py

Move all path helpers and path-level validation to muse/core/harmony/paths.py.

Moved to paths.py ----------------- Directory helpers: patterns_dir, policies_dir, audit_dir, escalations_dir, escalation_path, pattern_dir (_pattern_entry_dir alias), _resolutions_dir, resolution_path (_resolution_path alias)

Validation: _validate_id, _validate_fingerprint, _validate_policy_id

Constants: _HARMONY, _PATTERNS, _POLICIES, _AUDIT, _ESCALATIONS, _RESOLUTIONS, _PATTERN_FILE, _MAX_FINGERPRINT_BYTES, _SHA256_ID_RE, _BARE_HEX64_RE, _POLICY_ID_RE

__init__.py changes ------------------- - Imports all of the above from .paths (full re-export — no call site changes required anywhere in the codebase) - Retains persistence-layer size caps (_MAX_PATTERN_BYTES etc.) inline until they move with their respective persistence modules - Removes unused stdlib imports: hashlib, re (re is now only needed inside paths.py)

Test result: 707 passed / 0 failed (baseline: 707 passed)

sha256:47e5edb0d431c5b4e41a97332a6d8d5358601668a13f383366b6b2e3bc167c08 sha
sha256:c49e316b407b89c5dca7ab07f0fc75d9f1bd2a08e650194cf53fd51e5aab0434 snapshot

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:47e5edb0d431c5b4e41a97332a6d8d5358601668a13f383366b6b2e3bc167c08 --body "your comment"