Repository navigation
feat(musecode): generate and import Muse Code custom agents - #3919
Merged
Merged
Conversation
Muse Code now documents file-based custom agents: Markdown with YAML frontmatter (name, description, model, effort, tools, disallowedTools) loaded from `.agents/agents/` (project) and `~/.config/muse/agents/` (user). Add a `musecode` subagents target for both scopes. The project directory is already written by the Antigravity targets and the simulated agentsmd writer, so the musecode section joins the merge every writer of that file performs (below the Antigravity blocks), and the file stays identical whichever target runs last. Global agents live in per-tool directories, so each global writer merges only its own sections. Warn when a name is not lowercase words joined by hyphens. Refs #2790 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
…secode-subagents # Conflicts: # src/generated/docs-content.ts
…ecode block The project `.agents/agents/` file is shared with the Antigravity writers, so its content cannot be narrowed to Muse Code's documented keys. Warn instead when it carries keys outside name, description, model, effort, tools and disallowedTools, and when an antigravity-* block overrides a musecode block value. Document the global --delete sweep and the Meta provider rejecting effort `none`. Refs #2790 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
…ile key Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
…secode-subagents # Conflicts: # src/generated/docs-content.ts
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Muse Code now publishes a custom agents page (raised in the 2026-11-19 re-check on #2790). Agents are Markdown files with YAML frontmatter, and the body is the prompt. The documented keys are
name,description,model,effort,toolsanddisallowedTools. Project agents live in.agents/agents/and load once the workspace is trusted. User agents live in~/.config/muse/agents/, or under$XDG_CONFIG_HOME/muse/agents/when that is set.This PR adds a native
musecodesubagents target for both scopes:.agents/agents/<name>.md). The Antigravity targets and the simulatedagentsmdwriter already generate into this directory, with one shared frontmatter builder so the file doesn't depend on which target ran last.MusecodeSubagentreuses that writer (it extendsAntigravitySharedSubagent). Themusecode:block joins the merge every writer of this file performs, through the newAGENTS_DIR_SHARED_SUBAGENT_SECTION_KEYS=musecode→antigravity-ide→antigravity-cli. It sits lowest, so a key the Antigravity blocks already set keeps its current value. The bytes on disk stay identical across all four writers, and a test checks this.~/.config/muse/agents/<name>.md). Only Muse Code reads this directory, so only themusecode:block is merged here. Global Antigravity output (~/.gemini/config/agents/) and the Antigravity plugin bundle now ignore themusecode:block.musecode:section.musecode:example block, a Muse Code note, and updates to the Antigravity and.agents/agents/ownership notes. The supported-tools tables are regenerated.Design trade-off (worth a maintainer look)
The issue suggested stripping every non-Muse key, because an unknown key can disable an agent. That isn't possible for the project file without breaking the shared-file guarantee, since Muse Code reads
.agents/agents/whether or not themusecodetarget is enabled. The agents page also only says unknown keys invalidate--agentsJSON definitions. It doesn't say what happens to Markdown files. So Antigravity-only keys set inantigravity-*blocks still reach Muse Code, and this is documented. If the maintainer prefers a stricter Muse-only render for the project file, that's a separate design decision.Remaining on #2790 (still blocked upstream)
approval-policy.jsonstill has no published schema.Test notes
src/features/subagents/musecode-subagent.test.tscovers paths, documented fields, identical shared-file output across the musecode, antigravity-cli, antigravity-ide and agentsmd writers, global/plugin isolation of themusecodeblock, the name warning, import, and targeting.pnpm cicheckpasses (619 files / 17151 tests).src/e2e/e2e-subagents.spec.tspasses (177 tests).Refs #2790
🤖 Generated with Claude Code
https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4