dsh-advisor
移植自 omp 的顾问子系统插件:每会话独立的评审模型,观察主对话流并注入严重程度分级的建议(批注/担忧/阻碍)。
AI 分析
核心用途是引入独立的“评审员”模型对主 Agent 的输出进行实时代码或逻辑审查。适合复杂开发、架构设计等高要求任务。可通过 `/advisor` 命令在会话中动态开关。
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:btspoony/dsh-advisor说明文档
阅读完整 README ↗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, orerror), 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 theimmuneTurnscooldown. - 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.
