Introduction

When running multi-stage tasks in DeepSeek Harness (DSH), if you only specify “do X first, then Y” in the prompt, checkpoints still rely on the model’s self-discipline. dsh-stage-gate turns stage validation into a model-callable tool: the model can open a stage gate, submit acceptance items, view all gates in the current session, and close gates when necessary.

Below is an introduction to the plugin’s positioning, capabilities, installation methods, and notes.

What is this

changingwang/dsh-stage-gate is a stage-gate governance plugin for DeepSeek Harness, maintained by changingwang, and licensed under MIT.

It registers four model-callable tools to ctx.tools:

  • gate_open
  • gate_check
  • gate_list
  • gate_close

These tools are used to perform validation checks within the same agent session. State is stored in memory and scoped to the current agent session; state will be reset after the harness restarts.

Core Capabilities

Creating a Validation Gate

gate_open(gateId, title, stage?, items) creates a stage gate with an acceptance checklist, with an initial state of open.

Checking Validation Items

gate_check(gateId, items) performs validation checks on the specified gate. Each acceptance item can be marked as met, unmet, or n/a, and can also include evidence.

Viewing Gates in the Current Session

gate_list() lists all gates in the current session, along with their lifecycle states.

Closing a Gate

gate_close(gateId, reason?) closes the specified gate. After closing, calling gate_check will be rejected by default unless allowReopen is set.

Installation and Usage

The plugin requires:

  • DeepSeek Harness >=0.1.0-rc.5
  • Model keys configured
  • DeepSeek provider configured
  • Intended for Web profile only, as these tools are visible to the model

The installation and enablement steps are as follows:

dsh plugin --profile web add dsh-stage-gate
dsh web

After installation, gate_open, gate_check, gate_list, and gate_close are exposed to the model as tools.

Typical Usage

Create the gate, then check acceptance items, and finally close the gate. The tool signatures are:

gate_open(gateId, title, stage?, items)
gate_check(gateId, items)
gate_list()
gate_close(gateId, reason?)

Each item in the items of gate_check needs to express the validation result and can use met, unmet, or n/a, or provide evidence.

If you need to prevent a closed gate from being checked again by gate_check, you can override the configuration in the profile’s cordis.patch.yml:

- id: tool-stage-gate
  config:
    allowReopen: false

allowReopen defaults to true. When set to false, calling gate_check on a closed gate will throw:

Error: gate "<id>" is closed

Applicable Scenarios and Notes

Suitable for these scenarios:

  • Using DeepSeek Harness’s Web profile
  • Need the model to explicitly create and check stage gates in multi-stage work
  • Only care about validation status within the current session
  • Accept that gate state resets after harness restart

Notes:

  • Gate state is in-memory and managed by agent session scope
  • The package deliberately does not write custom session events
  • Only applicable to Web profile, tools are visible to the model
  • The plugin runs with the current dsh process permissions; check the source code and license before installation
  • License is MIT © 2026 changingwang

Resources

  • Community directory page: https://www.skillhub.cn/plugins/changingwang/dsh-stage-gate
  • GitHub: https://github.com/changingwang/dsh-stage-gate