changingwang/dsh-stage-gate
项目介绍Project Overview
dsh-stage-gate 是 DeepSeek Harness 的阶段关卡治理插件,注册 gate_open、gate_check、gate_list、gate_close 四个工具,让模型为多阶段任务创建验收清单、逐项提交证据并得出 PASS/BLOCK 结论。适用于需要在阶段推进前做显式验收与卡点的代理工作流。注意:关卡状态仅存内存、按会话隔离,Harness 重启后会重置。
dsh-stage-gate is a DeepSeek Harness plugin adding model-callable stage gates. It registers gate_open, gate_check, gate_list, and gate_close, so agents can define acceptance checklists, submit item-level evidence, and receive a clear PASS or BLOCK result before moving between phases. Use it for multi-phase work requiring explicit verification and governance. Caveat: gate state is in-memory and scoped per session, so it resets when the harness restarts.
请帮我了解并安装插件:【dsh-stage-gate】【https://github.com/changingwang/dsh-stage-gate】
把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.
或使用命令行安装(适合开发者)Or use CLI install (for developers)
命令行安装CLI Install
dsh plugin --profile web add dsh-stage-gate
把 changingwang/dsh-stage-gate 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-stage-gate
Stage-gate governance tools for DeepSeek Harness.
Model-callable stage gates: create an acceptance checklist, verify it with evidence, and get a clear PASS / BLOCK conclusion — a governance layer for agents that run multi-phase work. State is in-memory, scoped per session.
English | 中文
What it does
Registers four tools on ctx.tools:
| Tool | Purpose |
|---|---|
gate_open(gateId, title, stage?, items) |
Create a stage gate with its full acceptance checklist (status open). |
gate_check(gateId, items) |
Verify the gate: send the ENTIRE item list (whole-value replacement); each item carries met/unmet/n/a and optional evidence. The gate is blocked while any item is unmet, passed when all are met/n/a. |
gate_list() |
List every gate in the session with its lifecycle status. |
gate_close(gateId, reason?) |
Close a gate (closed). A closed gate rejects further gate_check unless allowReopen is set. |
Lifecycle
open → in_review → passed (all items met/n/a)
│ │
│ └── blocked (any item unmet) → (allowReopen) → open
└────────────────────────────→ closed (gate_close)
statuson the gate is the lifecycle state machine.conclusionon the latestgate/checkrecords the most recent verification result.
Install
dsh plugin --profile web add dsh-stage-gate
dsh web
The tools become model-visible in the Web UI. Model keys and a DeepSeek provider must already be configured (see the DeepSeek Harness Web UI guide).
Configuration
allowReopen (default true): whether a gate_check on a closed gate is accepted. When false, checking a closed gate throws Error: gate "<id>" is closed.
Override in your profile's cordis.patch.yml:
- id: tool-stage-gate
config:
allowReopen: false
How it works
Gate state is kept in memory, scoped per agent session (gate_open /
gate_check / gate_close mutate an in-memory map keyed by session + gate id).
This package deliberately does not write custom session events
(gate/*). DeepSeek Harness's session persistence refuses to reload a log
containing an event type outside its known-event whitelist unless the event is
marked ignorable, and Session.append has no API to set that marker. Custom
plugin events would make sessions unloadable after restart — see
docs/BUG-2026-08-17-session-log-pollution.md.
Trade-off: gate state resets when the harness restarts. This is the correct cost for an out-of-repo plugin until the harness opens a registration surface for downstream plugin events.
Development
pnpm install
pnpm test # vitest (14 tests)
pnpm typecheck # strict tsc
pnpm build # emit lib/
Compatibility
- Requires DeepSeek Harness
>=0.1.0-rc.5. - Web profile only (tools are model-facing).
- Gate state is in-memory and resets on harness restart (see How it works).
License
MIT © 2026 changingwang
nexu-io/open-design
freestylefly/awesome-gpt-image-2
anywhere-labs/dsh-desktop
walkinglabs/learn-harness-engineering
awesome-dsh-plugin/awesome-dsh-plugin
MemTensor/MemOS