btspoony/dsh-advisor2

dsh-advisor

dsh plugin bundle porting the omp advisor subsystem: a per-session reviewer model that observes the primary transcript and injects severity-ranked advice (nit/concern/blocker).

AI Analysis

核心用途是引入独立的“评审员”模型对主 Agent 的输出进行实时代码或逻辑审查。适合复杂开发、架构设计等高要求任务。可通过 `/advisor` 命令在会话中动态开关。

Package
dsh-advisor
Version
0.1.0
License
MIT
Last updated
Aug 13, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:btspoony/dsh-advisor

Usage

Once installed and enabled, the advisor observes every session. Control it per session with the /advisor command (available when a command registry is composed):

/advisor            toggle the advisor for this session
/advisor on         enable the advisor for this session
/advisor off        disable the advisor for this session
/advisor status     show state, model, runtime status, pending count, last activity

/advisor on|off|toggle are session-scoped and ephemeral: they flip a per-session override, never the persisted config. Enabling a session whose config lacks provider/model starts no model call — /advisor status (and the /advisor on reply) shows the gate reason.

/advisor on is also the manual recovery path: a session advisor paused by a quota/rate-limit (quota_exhausted — KD-5 has no auto-resume timer) resumes in place, and a halted advisor (permanent model error, e.g. invalid credentials) is rebuilt fresh for the session.

The advisor reviews on a dual-mode trigger, depending on the session shape:

  • Standard stepped sessions — after each stepped primary turn that ends normally (completed, max-tokens, or error), the advisor reviews the incremental transcript delta.
  • Agentic / harness sessions (never emit turn/end) — after each completed agent reply round: when a new human input arrives (inbox-spliced input included) after an unreviewed assistant increment, the advisor reviews that increment.

Either way the advisor emits at most one note per review, ranked by severity:

  • nit — a minor style, clarity, or quality suggestion; delivered via agent.inject (non-waking, consumed at the next pre-step boundary).
  • concern — a material risk or clearly better direction to weigh before continuing; delivered via agent.steer (waking), subject to the immuneTurns cooldown.
  • blocker — continuing clearly wastes work (contradicts an explicit user instruction, going in circles, fundamentally unsound); delivered via agent.steer.

Injected advice appears in the session stream as a user-role message carrying the advisor source kind and self-describing content, e.g.:

[advisor:concern] extract the helper into a module and unit-test it

The [advisor:{severity}] prefix is the only cue the primary model gets about how to treat it — the primary system prompt never mentions advisories. Advisor messages are excluded from later advisor deltas, so the advisor never reads its own advice back.

Advisor note injected into the session stream