DSH Plugin Store
Back to home

ICCuse

dsh-pain-point-check

Enforced pain-point-check guard plugin for DeepSeek Harness: after two non-converged experiments it injects the three questions, denies non-investigative tool calls until answered, and blocks same-direction retries. dsh-plugin

Stars
0
Language
TypeScript
Created
Aug 14, 2026
Updated
Aug 14, 2026
Other
GitHub repo

Introduction

dsh-pain-point-check

中文版见 README.zh.md

An enforced pain-point-check guard plugin for DeepSeek Harness (dsh).

Where the official repeat-tool-reminder is advisory — it nudges an agent that repeats the exact same call — this guard vetoes: after two non-converged experiments on the same problem it injects the three questions, denies non-investigative tool calls until the model answers them in its reply text, and blocks further same-direction shots.

Why

An agent in "solution state" loses meta-cognition and keeps attacking the same problem — confirmation bias (designing experiments that support the current hypothesis), sunk cost (refusing to change direction), and narrative closure (wanting to finish the story). The gate forces a return to the pain point before the next shot, turning negative results into information.

Install

The package is not on npm yet; install it straight from this repository:

npm install github:ICCuse/dsh-pain-point-check
# or: pnpm add github:ICCuse/dsh-pain-point-check

Then mount it in your profile composition. Add one row to your profile patch — for the web profile, ~/.dsh/profiles/web/cordis.patch.yml:

- id: pain-point-check
  name: 'dsh-pain-point-check'
  config:
    failureThreshold: 2
    repeatThreshold: 2

Restart the harness (dsh web) and the guard is live for every session.

How it works

HookRole
tools/resultCounts per-agent experiments on the current problem: failed (errored) calls and consecutive identical calls.
agent/pre-stepResets the counters on a real user interjection (a new problem); while the gate is pending, appends the three-question check block to the next step.
tools/pre-executeDenies every non-investigative call while the gate is pending (allowlist: read, read_image, glob, grep, web_search, ask_user_question, skill, todo_write).
session/eventDetects the three answers in the model's reply text (痛点=… 排除=… 更便宜=…, English markers accepted) and lifts the gate.

The three questions: is this pain point still the most painful? What did the last negative result actually rule out? Is there a cheaper path? If the model cannot name what the negative result excluded, it has no falsifiable hypothesis — the check text tells it to go write one instead of firing another shot.

Config

FieldDefaultMeaning
failureThreshold2Failed calls that arm the gate.
repeatThreshold2Consecutive identical calls that arm the gate.
allowlistinvestigation setTools still callable while pending.

Both thresholds must be integers >= 1; a misconfiguration throws at plugin load.

Development

lib/ is prebuilt (built from the DeepSeek Harness monorepo toolchain). Tests:

npm install
npm test

The test suite drives a real agent loop against a scripted mock adapter (no network): arming, denial, allowlist, lifting, partial answers, resets, and fail-loud config validation.

License

MIT