cgcardona / muse public
feat main #7 / 100

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>

G Gabriel Cardona <cgcardona@gmail.com> · 5h ago Mar 20, 2026 · e0353dfe · parent dfaf1b77
oldest
newest 94%

Comments

0

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