🤖 feat: add custom modes system with .mux/modes/*.md files #1312
+1,126
−48
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
Replace the hardcoded exec/plan toggle with a flexible, user-extensible mode system. Modes are defined via markdown files with YAML frontmatter in
.mux/modes/directories.Key Changes
Types & Schemas
src/common/types/mode.tswithModeDefinitioninterface and related schemasBackend
src/node/services/modeLoaderService.ts): Discovers and loads modes from:src/node/builtinModes/)~/.mux/modes/).mux/modes/) - highest prioritymodes.listandmodes.getIPC endpointsFrontend
useModeshook for fetching available modesBuilt-in Modes
exec.md- Full execution mode (default)plan.md- Read-only planning mode with propose_planMode File Format
Testing
make static-check)Future Work (not in this PR)
Generated with
mux• Model:anthropic:claude-opus-4-5• Thinking:high