gabriel / muse public
fix BREAKING fix/agent-config-canonical-path #3 / 3
AI Agent gabriel · 11 days ago · Jul 7, 2026 · Diff

fix: move agent-config canonical source outside .muse/ to .museagent.md (issue #78)

agent_md_path() returned .muse/agent.md -- .muse/ is unconditionally excluded from every snapshot (_ALWAYS_IGNORE_DIRS), regardless of .museignore, so the canonical agent-config source could never be tracked. This defeated the entire premise of muse agent-config: clone the repo, run sync, get your tool's adapter -- the source itself never survived a clone. Confirmed live: editing ~/ecosystem/.muse/agent.md produced zero change in muse status, and the file was absent from muse ls-files.

Fixed by moving agent_md_path() to <root>/.museagent.md -- a normal tracked file, outside .muse/ entirely, at the repo/workspace root. Chosen over AGENT.md to avoid confusion with AGENTS.md (the Codex adapter's generated output, not the source).

Added ACFG_01-03 in tests/test_cmd_agent_config.py: the path is no longer inside .muse/, a real init+add+commit+ls-files round-trip proves the file is genuinely tracked (not just a path-string assertion), and generated CLAUDE.md references @.museagent.md. Fixed two pre-existing tests that hardcoded the old path literal. Updated docs/agent-guide.md and a stale code_stage.py comment/test docstring that implied agent.md still lives inside .muse/.

No migration logic for existing .muse/agent.md files in this commit -- this workspace's own files (muse, musehub, ~/ecosystem, other members) are migrated separately in a follow-up, per the ticket's phased plan.

sha256:ec1d0e0022a4b70b9f777e4a7036296debc6def576324d13de627e76bdf0eb31 sha
+4 ~40 symbols
sha256:38dc2566558d1d65640bf80947e91f8c749cfc75750203e74650e91570abbb81 snapshot
+4
symbols added
~40
symbols modified
0
dead code introduced
Semantic Changes 44 symbols
~ muse/core/paths.py .py 1 symbol modified
~ tests/test_cmd_agent_config.py .py 4 symbols added, 11 symbols modified

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