cgcardona / muse public
feat code main #75 / 100

feat(code): Phase 3 — .muse/indices/ infrastructure and muse index command

New module muse/core/indices.py: - symbol_history index: address → chronological event timeline (commit_id, op, content_id, body_hash, signature_id per event) - hash_occurrence index: body_hash → list of addresses that share it - load/save helpers for both indexes - index_info() for status reporting - All indexes: schema_version:1, updated_at timestamp, fully rebuildable

New command muse index (multi-command Typer app): - muse index status: show present/absent/corrupt status and entry counts - muse index rebuild: walk full commit history to rebuild symbol_history and/or hash_occurrence; --index NAME for selective rebuild

Design: - Indexes are derived, optional, and fully rebuildable — zero impact on repository correctness if absent - symbol_history enables O(1) lineage/symbol-log instead of O(commits) scan - hash_occurrence enables O(1) clone detection and hash= queries - Incremental updates can be wired into the commit hook in a future phase

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

G Gabriel Cardona <gabriel@tellurstori.com> · 1d ago Mar 18, 2026 · 6647e2c9 · parent b4e8aaf2
oldest
newest 26%

Snapshot Diff

137 files in tree
+2 ~1 -7
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/lineage.py .py
muse/cli/commands/semantic_cherry_pick.py .py

Comments

0

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