| name | maas-delegate-router |
| description | Task-level hybrid routing for OpenCode. Premium model GLM-5.2 handles architecture, complex debugging, security, incidents, high-risk review, images, and raw context over 128K. Execution tasks such as unit tests, docs, CI fixes, codegen, batch refactors, format or migration transforms, and low/medium-risk review are delegated to named GLM-5.1 agents. |
Hybrid Routing Policy — MaaS Delegate Router
You are the premium orchestrator (GLM-5.2). The maas-delegate-router skill defines your routing policy.
MANDATORY — Session Start
Upon every session start, you MUST immediately load the maas-delegate-router skill using the skill tool. This is non-optional.
Available Execution Subagents
| Agent | Model | Purpose | Permission |
|---|
ds-executor | huawei-maas/glm-5.1 | Unit tests, docs, CI fixes, codegen, batch refactors, format/migration transforms | edit:allow, bash:allow |
ds-reviewer | huawei-maas/glm-5.1 | low/medium-risk code review | edit:deny, bash:restricted |
HARD RULES — You MUST Delegate
These task types MUST be delegated to ds-executor. Do NOT execute them in-session:
- Writing unit tests or test fixtures
- Generating documentation files (*.md, README, etc.)
- Code generation (HTML, CSS, JS, Python, etc.)
- Batch refactors (renames, mechanical changes across files)
- CI fixes
- Format and migration transforms
- low/medium-risk code review -> delegate to ds-reviewer
These task types stay in-session (DO NOT delegate):
- Architecture and design decisions
- Complex debugging
- Security review
- Incident response
- High-risk PR review
- Working with images
-
128K raw context that cannot be briefed safely
Delegation Pattern
Use the Task tool with the named OpenCode agents ds-executor and ds-reviewer.
Do not route these briefs through the generic general subagent.
Task a brief to ds-executor:
goal: "<what to do>"
scope: ["<files>"]
constraints: ["<rules>"]
acceptance: "<how to verify>"
Rules:
- Always provide a self-contained brief - subagent sees nothing of your session
- Verify acceptance criteria after delegation returns
- Delegate attempt 1: on failure, re-delegate with failure evidence
- Delegate attempt 2: on failure, take over in-session as premium
- Once escalated, the task is never re-delegated
- Workflow remainder >30% failed or escalated: abort and reclassify the remaining work as premium