Summary
Users who want to change the default models used by mach6 skill agents (e.g. code-reviewer, explore, feature-dev) currently must copy the entire agent .md file to ~/.dreb/agents/ and edit the model: field. This works, but means losing upstream updates to the agent's system prompt, tools list, and description when dreb is updated.
Current Behavior
- Agent definitions bundle model fallback lists in their
.md frontmatter (e.g. model: zai/glm-5-turbo, anthropic/sonnet)
- The only way to override these is to place a same-named
.md file in ~/.dreb/agents/ or .dreb/agents/, which replaces the entire agent definition — prompt, tools, and all
- The settings system (
~/.dreb/agent/settings.json) has defaultProvider/defaultModel but no per-agent model overrides
- Upgrading dreb doesn't update locally-copied agent files, so users miss improvements to prompts and tool configurations
Proposed Behavior
Add a mach6 section in settings with per-agent model overrides:
{
"mach6": {
"models": {
"code-reviewer": ["anthropic/opus", "anthropic/sonnet"],
"explore": ["anthropic/sonnet"],
"feature-dev": ["anthropic/opus", "anthropic/sonnet"],
"independent-assessor": ["anthropic/opus"]
}
}
}
Resolution order: per-invocation model override → mach6.models setting → agent definition model field → parent model fallback.
TUI Experience
- A "Mach6 Models" section in
/settings (clearly labeled as mach6-specific)
- Shows each mach6 agent with its current model ranking
- Selecting an agent opens a ranking editor where you can:
- See available models (from the model registry)
- Add/remove models from the fallback list
- Reorder models via up/down keys to set priority (first = preferred, rest = fallbacks)
- Visual feedback showing the ranked list (e.g.
1. anthropic/opus 2. anthropic/sonnet)
Acceptance Criteria
Technical Notes
- Settings infrastructure already supports deep merge and TUI editing —
settings-manager.ts, settings-selector.ts
- Model resolution lives in
resolveModelForSubagentSpawn() in packages/coding-agent/src/tools/subagent.ts
- The TUI submenu pattern exists for "Thinking Level" and "Theme" — a ranked list editor is a new component but fits the existing pattern
discoverAgentTypes() returns the full agent map — can filter to mach6-relevant agents for the settings UI
- The ranking UI could use arrow keys (up/down to reorder) similar to sortable list patterns —
@dreb/tui may need a new RankedList or ReorderableList component
- Consider grouping agents by tier in the UI (e.g. "strong" agents like
feature-dev/independent-assessor vs "standard" agents like explore/code-reviewer) to help users understand which ones benefit from stronger models
Summary
Users who want to change the default models used by mach6 skill agents (e.g.
code-reviewer,explore,feature-dev) currently must copy the entire agent.mdfile to~/.dreb/agents/and edit themodel:field. This works, but means losing upstream updates to the agent's system prompt, tools list, and description when dreb is updated.Current Behavior
.mdfrontmatter (e.g.model: zai/glm-5-turbo, anthropic/sonnet).mdfile in~/.dreb/agents/or.dreb/agents/, which replaces the entire agent definition — prompt, tools, and all~/.dreb/agent/settings.json) hasdefaultProvider/defaultModelbut no per-agent model overridesProposed Behavior
Add a
mach6section in settings with per-agent model overrides:{ "mach6": { "models": { "code-reviewer": ["anthropic/opus", "anthropic/sonnet"], "explore": ["anthropic/sonnet"], "feature-dev": ["anthropic/opus", "anthropic/sonnet"], "independent-assessor": ["anthropic/opus"] } } }Resolution order: per-invocation
modeloverride →mach6.modelssetting → agent definitionmodelfield → parent model fallback.TUI Experience
/settings(clearly labeled as mach6-specific)1. anthropic/opus 2. anthropic/sonnet)Acceptance Criteria
mach6.modelsfield inSettingsinterface — aRecord<string, string | string[]>mapping agent names to ordered model fallback listsresolveModelForSubagentSpawnrespectsmach6.modelsoverrides (after per-invocation, before agent definition)~/.dreb/agent/settings.json) and project (.dreb/settings.json) levels both work, with project overriding global via existingdeepMergeSettings/settingshas a "Mach6 Models" submenu with a ranking/reorder UI for each agent's fallback listmach6.modelsis not setTechnical Notes
settings-manager.ts,settings-selector.tsresolveModelForSubagentSpawn()inpackages/coding-agent/src/tools/subagent.tsdiscoverAgentTypes()returns the full agent map — can filter to mach6-relevant agents for the settings UI@dreb/tuimay need a newRankedListorReorderableListcomponentfeature-dev/independent-assessorvs "standard" agents likeexplore/code-reviewer) to help users understand which ones benefit from stronger models