Skip to main content
F

dsh-orchestrator

fan56/dsh-orchestrator

Planner-executor-review loop inside one session: a planner model writes the plan and reviews, an executor model does the work, and the planner is denied shell, file writes and agent dispatch at the tool layer.

Install

dsh plugin --profile web add github:fan56/dsh-orchestrator

README

@aiwayds/dsh-orchestrator

CI npm

[English] | 简体中文

Demo

An agy-style planner → executor → review loop for DeepSeek Harness: a strong model plans and reviews, a cheaper model does the work. Watch the demo video.

Enable it explicitly: pick Orchestrator in the model picker, run /orchestrator on, or flip Enable Orchestrator in the session's model menu; unchecking it returns to the model selected before.

Orchestrator in action

Install

dsh plugin --profile <web|desktop> add @aiwayds/dsh-orchestrator

Restart the app after installing.

Configure

Orchestrator configuration page

Three entry points, all editing the same config:

  • Sidebar page — Orchestrator in the left navigation.
  • Web / Desktop settings — Plugins → Orchestrator → Configure.
  • Command wizard — /orchestrator config (also works in the TUI). Use /orchestrator status to see the current state.
KeyMeaningDefault
planner, executorProvider, model and reasoning effort for each role — the default combinationempty (set both)
combosAdditional named combinations (orchestrator-<name>), each with its own planner / executor route pair; the enable switch and loop limits stay global{}
enabledMaster switch; off makes the plugin inertfalse
executorStepCapExecutor steps before a progress review30
toolFailThresholdConsecutive tool failures before returning to the planner2
maxReviewRoundsSend-backs per plan before the planner must report (hard ceiling 20)10
workspaceScopedEnable per-workspace overridestrue
workspacesOverrides keyed by absolute workspace path{}
quotaEnabledShow the dock quota chip and allow usage queriesfalse

Equivalent YAML (profile cordis.patch.yml):

- id: dsh-orchestrator
  name: '@aiwayds/dsh-orchestrator'
  config:
    enabled: true
    planner:  { provider: opencode-go, model: hy4-flash-free, effort: high }
    executor: { provider: zai-coding-cn, model: glm-5.3-flash, effort: high }
    combos:
      glm:
        planner:  { provider: opencode-go, model: hy4-flash-free, effort: high }
        executor: { provider: zai-coding-cn, model: glm-5.3-flash, effort: high }
    executorStepCap: 30
    toolFailThreshold: 2
    maxReviewRounds: 10
    workspaceScoped: true
    workspaces:
      /Users/you/work/project-a:
        executor: { model: glm-5.3-flash }
        executorStepCap: 5
      /Users/you/work/project-b:
        planner: { effort: max }

With workspaceScoped on, the config for the current workspace overrides the global values; only keys listed there are changed, the rest are inherited. Turn it off to use global values everywhere (saved overrides stay in the file but are ignored). Workspace overrides only affect the default combination, not named ones. Planner and executor on the same provider + model + effort means nothing to orchestrate — the loop does not activate.

Autosave. Every change in the settings page is written immediately (number fields after a 400 ms debounce); there is no Save button. Invalid numbers are flagged in place and are not written. If a write is refused, the page keeps the value and offers Retry.

Local snapshot / restore. Model-related settings (routes, combos, limits, workspace overrides, plannerSkills) are mirrored to dsh-orchestrator.config.json in the active profile directory (~/.dsh/profiles/<profile>/). If the plugin is uninstalled and reinstalled, the next start restores that snapshot only when the config is completely unconfigured (both routes empty and no combos) — an existing configuration is never overwritten. Behavior switches (enabled, quotaEnabled) are not snapshotted; they keep their own defaults on a fresh install.

Quota chip

When quotaEnabled is on, the dock shows a chip with each usage window's remaining percentage (e.g. 5h 70% | W 9%) for opencode go, zai and minimax. The chip takes the worst level across all of those windows: below 10% remaining is red, 10–20% is yellow, and above 20% is green. No keys are read and no usage request is sent while the switch is off. It is off by default.

Switching combinations

The configuration page's Combinations section manages combination settings (create/delete tabs, edit each named tab's routes; changes save automatically). To switch the current session to a combination, use the selector next to Enable Orchestrator in the model menu, or run /orchestrator on [name] (e.g. /orchestrator on glm; no argument selects the default). Switching is instant; the model badge shows Orchestrator · <name>. /orchestrator status shows the current combo.

The first combination is fixed as orchestrator (the top-level planner / executor routes) and cannot be deleted. Additional combinations are exposed as virtual models with the id orchestrator-<name>: <name> is lowercase letters, digits and hyphens (up to 32 chars) and case-sensitive. The enable switch and loop limits are shared globally.

Commands

CommandEffect
/orchestrator on [name]activate at the next accepted step (queued when a turn is open); pick a named combination
/orchestrator offdeactivate; the model is left alone
/orchestrator statusrole, reason, executor steps, consecutive failures, current combo
/orchestrator configopen the configuration wizard

Bundled skills

The plugin vendors eight skills from mattpocock/skills (commit 58af1d77; each vendored SKILL.md carries a source-commit comment). They are not registered with the skills service: they are the loop's own material, read straight from the package and injected at the steps that need them. They therefore never appear in your /skill list or in any client skill picker, and a same-named skill in your ~/.agents/skills is never consulted for them. Loading a copy of grilling by hand still gives you your own file — the loop's text stays the loop's.

SkillUsed for
grill-me, grill-with-docsRequirement interview entry points (the latter also writes ADRs and a glossary)
grilling, domain-modelingThe interview and modeling discipline the entry points and wayfinder depend on
wayfinderCharting a large effort as decision tickets on a tracker
research, prototypewayfinder ticket types (background research, throwaway prototypes)
proof-it-worksThe proof gate: evidence files under $DSH_PROOF_HOME (default ~/.dsh/proof/<repo>/) before "done"

Injection rules:

  • The planner's first pass (before any plan exists) is preloaded with the audit set: grill-me, grill-with-docs, grilling, domain-modeling, wayfinder.
  • When a plan declares ## Proof: required, the executor is injected with proof-it-works on every step, and the planner gets it again on each review round to check the report cites evidence files.
  • research and prototype are never injected: both tell the reader to dispatch a background agent, and the planner cannot. wayfinder's references to them stay in the text as documentation only.
  • User skills configured via plannerSkills or mentioned by name still inject through the skills service as before. A name that collides with a bundled one resolves to the package copy.

What changed in 0.6.0

  • Exactly one owner continues the loop. When the session has an active goal, this plugin's silent-stop guard now stands down: the host's goal-round-driver continues on agent/status → idle with agent.followup(), and steering the same round here too drove it twice. Without a goal — or with it paused / blocked / complete, or active but disarm()ed — the guard keeps its 0.5.2 job. disarm() is not rare: the driver drops activation on any agent/error (including every LLM provider error or rate limit), on a max-tokens turn end, on an abort before the round is admitted, and when the driver unloads. In those cases only update_goal resume re-arms it, and until then the guard is the one keeping the loop alive. Evidence: docs/notes/goal-driver-handoff.md.
  • Send-backs default to 10, capped at 20. maxReviewRounds goes 5 → 10 and its bounds 1..10 → 1..20; /orchestrator config offers 1 / 5 / 10 / 20 with 10 marked default. The separate "questions written into the reply body" guard is unchanged — it still sends back once per round.

What changed in 0.5.2

  • A silent stop no longer ends the loop. In a review round, a reply with no tool call is the loop's only "end of round" signal, so a planner that concluded "review passed, continue" used to close the round with the plan unfinished. The loop now resumes the executor once when the reply states neither a delivery nor a completed plan, with the planner prompted to hand back rather than stop silently.
  • Questions must go through ask_user_question. Questions written into the reply body (❓ **Q1** …) are detected and the planner is sent back once to re-ask them through the tool. The bundled skills say so explicitly instead of only describing a prose format.
  • Session goal. The planner can get_goal / create_goal / update_goal; the executor cannot. When the task spans several handoffs the planner agrees the objective and its observable done condition with the user through ask_user_question, then creates the goal. While a goal is active the round cannot be closed — it must be marked complete first.
  • The bundled skills are invisible. They are no longer registered as runtime skills, so they do not appear in /skill or in any picker. See the section above.

Notes

  • The planner plans and reviews; it does not run shell commands or write files. It can write long-term memory.
  • The executor reports back instead of asking the user; questions go through the planner.
  • Goal rounds: the host's goal-round-driver auto-continues an active goal when the agent is idle. As of 0.6.0 the two no longer overlap — an active + armed goal belongs to the driver, every other case to this plugin's guard.
  • TUI has no settings page — use /orchestrator config.
  • Each profile needs its own install and config.
  • Two roles only: the planner is also the reviewer; no parallel executors.

Development

pnpm install     # resolve from the committed lockfile
pnpm build       # tsc → lib/
pnpm test        # build + node --test lib/test/

scripts/link-dsh-closure.mjs links the peer @deepseek-ai/* packages to the installed dsh CLI's own closure.

CI / Release

Every push to master and every PR runs CI with build, tests and a real-host boot smoke test. Tagged v* releases are published to npm; see docs/ci-release.md.

Related plugins