dsh-advisor-flow: Advisor Review Workflow on DeepSeek Harness

Preface

DeepSeek Harness (DSH) is designed so that everyday models handle routine work, while a stronger advisor model provides a second opinion at critical decisions, repeated failures, or the end of a turn. dsh-advisor-flow is a plugin porting pi-advisor-flow to DSH, adding advisory tools, review gates, usage ledgers, and privacy tiers to the agent.

Plugin Overview

Name: dsh-advisor-flow
Maintainer: ccll
Positioning: A DeepSeek Harness (DSH) plugin providing on-demand review and advisory workflows.

This plugin addresses the lack of an external review mechanism during agent execution. By introducing a separate advisor model (reusing DSH’s model routing), it enforces review of execution plans, failure retries, and final results without taking over control of the main workflow.

Core Capabilities

The plugin provides the following core features:

  1. On-demand advisory tool: The executor can invoke the ask_advisor tool when needed. This tool supports general review (no parameters) or targeted review by passing a specific question, draft, repository context tier, and file list. Each answer carries an adviceId for later reference.
  2. Manual consultation: The session owner can initiate a consultation at any time using the /advisor-manual [focus] command, or cancel an ongoing consultation with /advisor cancel.
  3. Hard loop gate: When a tool call signature repeats up to a preset threshold (default 3), the system intercepts the call and requests advisor review. The advisor returns one of three verdicts: proceed, revise, or blocked.
  4. Execution guide injection: The plugin injects execution guidelines into the system prompt, including constraints for three phases: before-plan, after-failure, and before-completion.
  5. Hard completion review: In the default hard mode, a mandatory review is performed before each turn closes. If the verdict is revise or blocked, the advisor feeds suggestions back to the executor. The soft mode is purely for reference.
  6. Outcome recording: The executor can use the record_advisor_outcome tool to record whether advice was adopted and the verification result; disabled by default.
  7. Usage ledger and status: Via the /advisor status command, you can view session status, gate statistics, and token consumption and cost breakdowns categorized by trigger type.
  8. Privacy tiers: Supports repository context tiers (off/summary/full). Sensitive data is replaced with placeholders before sending (redactSecrets), and file contents only leave the local machine after separate confirmation.
  9. Non-blocking guarantee: Whether the advisor service or gate check fails, it will never block the main agent loop.

Installation and Activation

Since the npm publication is still in progress, it currently needs to be installed directly from the repository.

dsh plugin --profile web add github:ccll/dsh-advisor-flow

After installation, if you don’t see the settings card in the UI, restart dsh web.

The configuration file is located under the advisor-flow namespace in settings.yaml. To enable the plugin, you must configure advisor-flow.enabled along with advisor.provider and advisor.model.

advisor-flow:
  enabled: true
  advisor:
    provider: deepseek-official
    model: deepseek-reasoner
  mode: hard
  gates:
    plan: { enabled: true }
    failure: { enabled: true }
    loop: { enabled: true, threshold: 3 }
    completion: { enabled: true }
  failureMode: block-tool
  privacy:
    repoContext: summary
    redactSecrets: true

Usage

The plugin interacts through both command line and tools.

Command-line interactions:
- /advisor-manual [focus]: Immediately start a manual consultation.
- /advisor cancel: Cancel an ongoing consultation.
- /advisor: Toggle the session’s advisor mode (on/off).
- /advisor status: Query session status, gate statistics, and costs.

Tool call examples:

The executor calls ask_advisor for a general review:

// No parameters, perform general review
ask_advisor()

Call ask_advisor for a review targeting a specific question:

ask_advisor({
  question: "Are there risks in the current retry strategy?",
  draft: "Retry 3 times, with 1 second interval each...",
  repoContext: "summary" // Can only narrow down to the owner-allowed tier
})

Notes

  • Non-takeover principle: The advisor model only provides suggestions; it does not directly invoke tools or modify files. Workflow control always remains in the hands of the main agent.
  • Compatibility: The plugin depends on DSH’s plugin interface. The compatible version declared in package.json is 0.2.0-rc.2, but the test environment in the README is 0.1.5-rc.1. Please verify environment compatibility before installing.
  • Security: Sensitive data redaction is disabled by default. It is recommended to enable redactSecrets in the settings to ensure sensitive values are replaced before transmission.

Conclusion

dsh-advisor-flow provides a standardized review layer for DSH agents. Through configurable gates and privacy tiers, it helps developers introduce external model oversight capabilities while maintaining workflow autonomy.

GitHub Repository
SkillHub Plugin Directory

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye