Skip to main content
M

dsh-roles

myth929/dsh-roles

Role-layered subagent orchestration converging delegation into orchestrate_subagent with 5 roles (general-purpose, explore, plan, fork, dsh-code-guide), per-role context/tool isolation, Web UI model and OAR routing, step budgets, and write-scope/worktree guardrails.

Install

dsh plugin --profile web add github:myth929/dsh-roles

README

dsh-roles icon

dsh-roles

Role-layered subagent orchestration for DeepSeek Harness.
Per-role context & tool isolation, Web UI model & external runtime routing, step budgets, and parallel write guardrails.

npm version DSH version License: MIT

English · 简体中文

dsh-roles Web UI — Preset Roles & Model Routing
Plugins → dsh-roles — assign each preset role to an LLM model or external subagent runtime without restarting.

dsh-roles converges subagent delegation into a single orchestrate_subagent tool aligned with Claude Code's built-in roles. Internal presets are hidden from user-facing preset selectors, and bare subagent / subagent_fork / subagent_oar tools automatically converge into orchestrate_subagent.


Install & Update

  • Web / Desktop: Open Plugins → Add plugin, search dsh-roles, and click Install.
  • CLI:
dsh plugin add dsh-roles          # or: dsh plugin add myth929/dsh-roles
dsh plugin update dsh-roles@latest

Roles

RolePurposeCapabilities & Defaults
general-purpose (default)Multi-step coding, debugging, code reviewFull tools (read, write, edit, glob, grep, bash/pwsh, jobs, todo); keeps AGENTS.md; supports background, readOnly, writeScope, isolation: "worktree", and includeMcp
exploreFast read-only codebase searchread, glob, grep; strips workspace instructions & skill catalogs; compact pruning; returns Key Files
planRead-only architecture planningread, glob, grep; strips workspace instructions & skill catalogs; returns Critical Files for Implementation
forkContext-sharing audits & verificationInherits completed parent turns, model, and prompt cache with full parent tools; blocks nested delegation
dsh-code-guideDSH / Cordis specialistRead-only docs, web, and cordis_inspect_*; injects local @deepseek-ai/* doc roots & live host summary

Configuration

Works out of the box with zero configuration (all roles follow the parent session model).
Priority: Web UI / Loader config > environment variables > defaults.

Web UI

Open Plugins → dsh-roles to assign any configurable role (general-purpose, explore, plan, dsh-code-guide) to an LLM (provider/model + optional reasoningEffort) or an external subagent runtime (oar-antigravity, oar-codex, oar-claude, codex, etc.). Changes apply immediately without restarting. fork always follows the parent model to preserve prompt-cache reuse.

Environment Variables

Option / EnvDefaultDescription
models / DSH_ROLES_MODELSFollow parent modelPer-role route map: "provider/model" or { provider, model, reasoningEffort, subagentProvider } (fork cannot be overridden)
budgets / DSH_ROLES_BUDGETSgeneral-purpose: 8/16/28, explore/dsh-code-guide: 4/8/14, plan/fork: 5/10/18Per-role quick / standard / thorough step budgets (integer 2..200)
reminders / DSH_ROLES_REMINDERS{ nudgeInspectionSteps: 3, maxNudges: 3, catalogRefreshTurns: 3 }Mid-turn delegation nudge cadence (nudgeInspectionSteps 1..50, maxNudges 0..20) and periodic catalog refresh interval (catalogRefreshTurns 0..50)
DSH_ROLES_MODELS='{"explore":"deepseek/deepseek-chat","plan":{"provider":"openai","model":"gpt-5.4","reasoningEffort":"high"},"general-purpose":{"subagentProvider":"oar-antigravity"}}'
DSH_ROLES_BUDGETS='{"explore":{"quick":3},"general-purpose":{"standard":20}}'
DSH_ROLES_REMINDERS='{"nudgeInspectionSteps":4,"maxNudges":2,"catalogRefreshTurns":3}'

External Subagent Runtimes (OAR)

  • Codex / Claude Code: Install and configure @deepseek-ai/dsh-experimental-subagent-oar (plus native CLI sign-in) or standalone plugins such as @deepseek-ai/dsh-subagent-codex / @deepseek-ai/dsh-subagent-claude-code; dsh-roles discovers registered providers automatically.
  • Antigravity (oar-antigravity): Auto-registered as a built-in fallback whenever agy (>= 1.5.0) is detected locally, and yields automatically once configured in @deepseek-ai/dsh-experimental-subagent-oar. It is only invoked when you explicitly route a role to oar-antigravity, and runs agy acp --dangerously-skip-permissions with non-interactive permission auto-approval.

Guardrails

  • Bounded step budgets — disables tools on the final step for clean tool-free convergence and preserves partial output as budget-exhausted.
  • Three-tier parallel write safety:
    • readOnly: true — skips the write lock and disables write/edit/apply_patch while keeping bash and optional MCP tools.
    • writeScope — requires non-overlapping path prefixes for parallel main-checkout edits (enforced on write/edit/apply_patch, anchored to the worker's initial workspace directory).
    • isolation: "worktree" — isolates parallel edits in separate Git worktrees via @deepseek-ai/dsh-experimental-worktree, auto-cleaning no-op branches and committing completed changes for parent review (use synchronous mode for the inline diff summary; background: true finalizes asynchronously).
  • Single-level delegation — fixed root → child depth (including fork, persisted across cold resume).

Contributing

Issues and pull requests are welcome at myth929/dsh-roles/issues.

git clone https://github.com/myth929/dsh-roles.git
cd dsh-roles
pnpm install
dsh plugin add /path/to/dsh-roles   # link local checkout into your DSH profile

Before opening a PR, run pnpm run build && pnpm run typecheck && pnpm test (Node.js >=24 and pnpm). Keep cordis.patch.yml in sync with peerDependencies (verified by tests), and update both README.md / README_zh.md (plus locale/*.json and src/client/locales.ts for UI changes). Orchestration changes can also be evaluated with pnpm run benchmark:report or pnpm run benchmark:live.

License

MIT

Related plugins