cgcardona / muse public
feat code main #73 / 100

feat(code): Phase 6 — ConflictRecord taxonomy, muse breakage, muse invariants

MergeResult v2 — ConflictRecord taxonomy New ConflictRecord dataclass in domain.py carries structured conflict metadata alongside the existing conflicts: list[str]: - conflict_type: symbol_edit_overlap | rename_edit | move_edit | delete_use | dependency_conflict | file_level (legacy) - ours_summary / theirs_summary: short change descriptions - addresses: list[str] of involved symbol addresses Added as MergeResult.conflict_records: list[ConflictRecord] (default []). Fully backward-compatible — existing callers that don't populate it continue to work; plugins that implement StructuredMergePlugin can enrich it.

muse breakage Detects symbol-level structural breakage in the working tree vs HEAD: - stale_import: imports a symbol no longer in the HEAD snapshot - missing_interface_method: class body missing methods found in HEAD Purely structural — no code execution, no type checker, no network. Operates on the committed symbol graph + current working-tree parse. Supports --language filter and --json output.

muse invariants Enforces architectural rules from .muse/invariants.toml: - no_cycles: import graph must be acyclic (DFS cycle detection) - forbidden_dependency: source_pattern must not import forbidden_pattern - layer_boundary: lower layers must not import from upper layers - required_test: public functions must have corresponding test functions Minimal built-in TOML parser — no extra dependencies. All rules run against the committed snapshot; no working-tree parsing. Creates invariants.toml if absent — guided onboarding message shown. Supports --commit REF to check historical snapshots and --json output.

mypy: 0 errors · typing_audit: 0 violations · pytest: 797 passed.

G Gabriel Cardona <gabriel@tellurstori.com> · 1d ago Mar 18, 2026 · 49d82b61 · parent e35a0a2e
oldest
newest 28%

Snapshot Diff

137 files in tree
+2 ~6 -12
docs/architecture/supercharge-plan.md .md
muse/cli/commands/api_surface.py .py
muse/cli/commands/checkout_symbol.py .py
muse/cli/commands/clones.py .py
muse/cli/commands/codemap.py .py
muse/cli/commands/index_rebuild.py .py
muse/cli/commands/lineage.py .py
muse/cli/commands/query_history.py .py
muse/cli/commands/semantic_cherry_pick.py .py
muse/core/indices.py .py
muse/plugins/code/_predicate.py .py
muse/plugins/code/_refactor_classify.py .py

Comments

0

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