gabriel / muse public
feat BREAKING task/diff-json-schema #1 / 1
gabriel · 60 days ago · Apr 16, 2026 · Diff

feat: symbol-aware diff --json + fix staged diff correctness

diff --json schema additions (Muse is a symbol-aware VCS — the JSON must be too): - renamed: {old_path: new_path} extracted from PatchOp.from_address - symbols: {file: {added,deleted,modified}} from PatchOp.child_ops - sem_ver_bump: classify_delta() run in-place (same data, missing call) - breaking_changes: classification.breaking_addresses from same classifier - total_changes: explicit len(added)+len(modified)+len(deleted)+len(renamed) - summary field removed (natural language, useless to agents)

Bug fix — muse diff --staged correctness: - plugin.snapshot(root) with empty stage falls through to full working-tree walk (correct for muse commit; wrong for diff --staged). Empty stage must produce staged-view == HEAD. Fixed by building staged_files explicitly from read_stage() entries overlaid on head_files, bypassing snapshot().

Naming consistency — op vocabulary aligned to core domain ops (domain.py): - RefactorEventSummary.kind comment: 'add' → 'insert' (matches InsertOp) - release_analysis.py: kind='add' → kind='insert' at both call sites

TDD: 26 new tests across test_diff_json_schema.py (20) and test_diff_staged_clean.py (6) covering schema invariants, file-level categorisation, symbol output, semantic fields, diff modes, and the empty-stage correctness regression.

sha256:1f29c0a37879bd3dade9e54dc0d4aaefd4033de95224aa18e959da004967790a sha
sha256:8312ac124ffe52b049d59767e5d568f5653056fca7c90affe566cfb64c35edaf snapshot
← Older Oldest on task/diff-json-schema
All commits
Newer → Latest on task/diff-json-schema

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:1f29c0a37879bd3dade9e54dc0d4aaefd4033de95224aa18e959da004967790a --body "your comment"