Skip to content

feat: implement Modes Layer for specialized agent profiles#1980

Closed
impulse22-ru wants to merge 22 commits intoQwenLM:mainfrom
impulse22-ru:feature/modes-layer
Closed

feat: implement Modes Layer for specialized agent profiles#1980
impulse22-ru wants to merge 22 commits intoQwenLM:mainfrom
impulse22-ru:feature/modes-layer

Conversation

@impulse22-ru
Copy link
Copy Markdown

  • Add @qwen-code/modes package with ModeManager, ToolRouter, PromptComposer
  • Add 6 built-in modes: Architect, Code, Ask, Debug, Review, Orchestrator
  • Add /mode slash command for CLI mode switching
  • Add settings.json support for custom modes and global instructions
  • Add comprehensive documentation and tests

Features:

  • ModeManager: switch modes, register custom modes, subscribe to changes
  • ToolRouter: filter and validate tools per mode
  • PromptComposer: compose system prompts with safety blocks
  • Built-in modes with role definitions, allowed tools, safety constraints

Documentation:

  • docs/MODES_GUIDE.md - user guide
  • docs/MODES_IMPLEMENTATION.md - implementation details
  • packages/modes/README.md - API documentation

Tests:

  • mode-manager.test.ts, tool-router.test.ts, prompt-composer.test.ts

TLDR

Dive Deeper

Reviewer Test Plan

Testing Matrix

🍏 🪟 🐧
npm run
npx
Docker
Podman - -
Seatbelt - -

Linked issues / bugs

- Add @qwen-code/modes package with ModeManager, ToolRouter, PromptComposer
- Add 6 built-in modes: Architect, Code, Ask, Debug, Review, Orchestrator
- Add /mode slash command for CLI mode switching
- Add settings.json support for custom modes and global instructions
- Add comprehensive documentation and tests

Features:
- ModeManager: switch modes, register custom modes, subscribe to changes
- ToolRouter: filter and validate tools per mode
- PromptComposer: compose system prompts with safety blocks
- Built-in modes with role definitions, allowed tools, safety constraints

Documentation:
- docs/MODES_GUIDE.md - user guide
- docs/MODES_IMPLEMENTATION.md - implementation details
- packages/modes/README.md - API documentation

Tests:
- mode-manager.test.ts, tool-router.test.ts, prompt-composer.test.ts

Co-authored-by: Qmode <qmode@example.com>

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Add translations for all supported languages:
- English (en)
- Russian (ru)
- Chinese (zh)
- German (de)
- Portuguese (pt)

Translated keys:
- Switch between different agent modes
- Configuration not available
- Mode manager not available
- List all available modes
- Show current mode
- Available Modes / Usage
- Use Cases / Allowed Tools / Excluded Tools / Safety Constraints

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
qmode and others added 2 commits March 1, 2026 16:17
…Code → Ask → Debug → Review → Orchestrator)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
…ycle

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
qmode and others added 12 commits March 2, 2026 01:51
…t, 🚀 YOLO, 📐 Architect, 💻 Code, ❓ Ask, 🐛 Debug, 🔍 Review, 🎯 Orchestrator)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
…ng on Shift+Tab

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
…p mode cycling in AppContainer only

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
…ching

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
…trator) in Footer

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
…work mode when approval mode is active

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
qmode and others added 2 commits March 2, 2026 04:01
…uestions (8 questions one-by-one)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
…tect (critical fix)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
qmode and others added 2 commits March 2, 2026 15:56
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants