feat(code): Phase 5 — multi-agent coordination layer
New storage layer muse/core/coordination.py: - .muse/coordination/reservations/<uuid>.json advisory symbol leases - .muse/coordination/intents/<uuid>.json declared operations - Reservation: address list + run_id + branch + TTL-based expiry - Intent: extends a reservation with operation type and detail string - All records: write-once, schema_version:1, expiry-enforced by is_active()
Six new coordination commands:
muse reserve ADDRESS... --run-id ID --ttl N --op OP Advisory symbol reservation. Warns if addresses already reserved by another agent. Never blocks — purely coordination signal.
muse intent ADDRESS... --op OP --detail TEXT --reservation-id UUID Declares a specific operation (rename/move/extract/delete/...) before executing it. Enables forecast to predict conflicts more accurately.
muse forecast [--branch B] [--json] Predicts merge conflicts from active reservations and intents. Three conflict types: address_overlap (1.0), blast_radius_overlap (0.75), operation_conflict (0.9). Uses Python call graph for blast-radius.
muse plan-merge OURS THEIRS [--json] Dry-run semantic merge plan. Classifies diverging symbols into: symbol_edit_overlap, rename_edit, delete_use, no_conflict. Reads committed snapshots — does not modify anything.
muse shard --agents N [--language LANG] [--json] Partitions the codebase into N low-coupling work zones using import graph connectivity + greedy component partitioning balanced by symbol count. Reports cross-shard edges as coupling score.
muse reconcile [--json] Reads coordination state + branch divergence, recommends merge ordering (fewer conflicts first) and integration strategy (fast-forward / rebase / manual) for each active branch.
mypy: 0 errors · typing_audit: 0 violations · pytest: 797 passed.
Comments
0No comments yet. Be the first to start the discussion.