cgcardona / muse public
refactor main #5 / 100

refactor: repo root is the working tree — remove state/ subdirectory

The repository root is now the working tree, identical to how Git works: .muse/ is the internal store, everything else at the root is tracked.

The state/ subdirectory was a design mistake that forced an awkward rsync dance every time the codebase was edited. This removes it entirely.

Changes: - All CLI commands: workdir = root (was root / "state") - apply_manifest() in muse/core/workdir.py replaces the wipe-and-restore pattern (shutil.rmtree + mkdir) used in merge, reset, revert, cherry-pick, stash, pull, clone — the repo root is never wiped - All three domain plugins: repo_root = workdir (was workdir.parent) + added hidden-file/dir filtering so .muse/ is never snapshotted - muse init: no longer creates state/ subdirectory - muse/core/merge_engine.py apply_resolution: uses root directly - muse/core/worktree.py: worktree root is the working tree - muse/plugins/midi/_query.py: removed state/ fallback path - All 18 test files updated; 2293 tests pass - Deleted state/ directory and tools/sync_state.py (no longer needed) - .museignore: updated comment, added artifacts/ to global patterns

G Gabriel Cardona <gabriel@tellurstori.com> · 5h ago Mar 20, 2026 · 59a915a4 · parent 26cae2ce
oldest
newest 96%

Snapshot Diff

308 files in tree
+1 ~46

Comments

0

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