gabriel / muse public
docs BREAKING task/229-fix-hd-path-docs-post-hub-scoping #1 / 1
AI Agent gabriel · 1 day ago · Sep 18, 2026 · Diff

docs: update every HD path example/docstring to the 7-level hub-scoped shape (musehub#221)

Comprehensive sweep prompted by: has every place documenting or showing an example identity HD path actually been updated since #221 added the hub segment? Searched the whole ~/ecosystem tree for the MUSE_PURPOSE constant (1075233755) and for symbolic path-formula mentions (role'/index', domain'/entity_type', etc.) and checked every hit.

Deliberately left unchanged (correct as-is): - muse/core/hub_scoping_migration.py, muse/cli/commands/migrate_cmd.py, muse/cli/commands/path_cmd.py -- these legitimately show the six-level shape, since their whole job is detecting/migrating/decoding it. - muse/core/hdkeys.py's muse_path() docstring -- already correctly conditional (six-level when hub=None, seven-level when given).

Fixed (were stale six-level examples presented as current, or otherwise inconsistent): - docs/agent-provenance.md -- human + agent key examples now show the hub segment, with a pointer to docs/reference/auth.md for the full path breakdown. - docs/reference/auth.md -- both identity.toml examples now hub-scoped, plus a new explanatory paragraph on what hub' is and why six-level entries need muse migrate hub-scoping first. - muse/core/slip010.py -- this is the authoritative "Muse HD path structure" diagram (the module docstring every other doc effectively points back to). Rewrote it to show hub' as the optional, identity-domain-only segment, with an explanation of why other domains never use it. Updated the module's own runnable-looking examples to match. - muse/core/hdkeys.py -- one docstring assert used a non-computable "<hub>" placeholder where its sibling asserts show real literal values; replaced with the actual computed hub_index("musehub.ai"). - muse/cli/commands/auth.py -- _parse_rotation_index's docstring called the rotation index "the 6th path component" and showed a 6-level example; the function itself was already correct (takes parts[-1] regardless of length) but rotate now requires hub-scoped paths, so the doc claim was actively misleading about which position matters. - muse/cli/commands/agent.py -- three msign_path examples in the JSON schema docs were stale on two counts: they never accounted for hub scoping AND used a wrong abbreviated 4-field shape that never matched muse_path()'s real 6/7-field output even before #221. Replaced with the real computed shape matching the actual muse_path(DOMAIN_IDENTITY, ENTITY_AGENT, account, hub=hub_idx) call at the real call site.

Also fixed presentations/build-with-muse/episode-04 (separate repo, companion commit there) -- its identity.toml example was doubly stale: six-level AND showing the pre-migration fingerprints for gabriel's real identity, which changed when this same identity was actually migrated to hub-scoped keys earlier in this work. That script's own production notes explicitly require every shown artifact to be real and current, never a hand-typed placeholder -- pulled the actual current ~/.muse/identity.toml and a real verify-commit key_id to fix it properly rather than just patching the path shape cosmetically.

Tests: 206/206 across hdkeys/slip010/auth-rotate (docstring/comment-only changes, no functional code touched).

sha256:b88ca1c72335d541266c2e7af62cc4235f3cd34191e62b5d3c5470beaf0a9d49 sha
~9 symbols
6 changed · 1196 in snapshot files
sha256:343ef2aa78a3e14721903f152cbb04d908e05e083570617b90efc2c619709b00 snapshot
~9
symbols modified
6
files changed
1196
files in snapshot
0
dead code introduced
Semantic Changes 9 symbols
~ muse/core/hdkeys.py .py 1 symbol modified
Files Changed
~6
1196 in snapshot
← Older Oldest on task/229-fix-hd-path-docs-post-hub-scoping
All commits
Newer → Latest on task/229-fix-hd-path-docs-post-hub-scoping

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