feat: muse reflog, gc, archive, bisect, blame, worktree, workspace
* feat: implement muse reflog, gc, archive, bisect, blame, worktree, workspace
Seven production-quality VCS commands that complete Muse's core feature set:
reflog — append-only per-ref journal of every HEAD movement; hooked into commit, checkout, reset, and merge so every operation is captured. Safety net for undoing accidental resets.
gc — reachability walk from all live refs; prunes unreachable blobs from the object store. --dry-run shows impact before any deletion. Handles 200 orphans in a single pass.
archive — exports any historical snapshot as tar.gz or zip. No .muse/ metadata included — distribution-only format. Supports --prefix, --ref, --output.
bisect — binary search engine (muse/core/bisect.py) with start/bad/good/skip/ run/reset/log CLI subcommands. Converges in log₂(N) steps. Agent-safe: muse bisect run <cmd> automates the hunt using exit-code protocol (0=good, 125=skip, else=bad).
blame — line-level attribution for any text file (muse/core/blame.py). Walks the commit graph, uses difflib SequenceMatcher to push each unchanged line back to the oldest commit that introduced it. --porcelain emits JSON per line for pipeline use.
worktree — multiple simultaneous branch checkouts sharing one .muse/ store. Each worktree is a sibling directory (<repo>-<name>/state/). Metadata, HEAD files, and state/ population all handled atomically. Includes add/list/remove/prune subcommands.
workspace — multi-repository composition manifest (.muse/workspace.toml). add/remove/list/status/sync subcommands. sync clones missing members and pulls existing ones. Designed for coordinator + worker agent swarms.
Testing: 133 new tests (90 unit + 43 CLI integration) across 7 new test files. All 2293 tests pass. mypy: 0 errors. typing_audit: 0 violations.
Documentation: 7 new reference pages + docs/README.md navigation updated.
* chore: remove stray test archive from repo root
* chore: ignore *.tar.gz and *.zip artifacts from muse archive
---------
Co-authored-by: Gabriel Cardona <gabriel@tellurstori.com>
Comments
0No comments yet. Be the first to start the discussion.