Foreword

The core design of DeepSeek Harness (DSH) is “everything is a plugin.” When you develop agents in DSH, the model often lacks active constraints on code quality and development workflow. shenhuanageshei/dsh-thincoder-suite is a plugin ported from the open-source project thincoder. It packages “four self-discipline rules for AI code writing” into four independent tools. It does not depend on DSH core code and implements functionality directly at the plugin layer.

This mechanism forces the output of mechanically verifiable artifacts (reconciliation tables, tokens, and minutes), converting processes that originally rely on trust into auditable processes.

Core Features

The plugin provides four core tools, addressing review loops, code direction, capability overflow, and blockers respectively.

  • advisor: Solves the infinite review loop problem. It forces the output of an item-by-item reconciliation table and validates line numbers through a reference-verification mechanism, ensuring review is bounded and traceable.
  • eng / eng_coder: Solves incorrect code direction. After entering engineering mode, the model must first obtain a design-review pass token before any code-writing operation; otherwise it is blocked.
  • escalate: Solves insufficient model capability. When a task exceeds the current model’s capability, write permissions and the task are handed to a stronger model in the pool, and a post-completion report is returned for acceptance.
  • consult_start: Solves blocker problems. It supports parallel, independent consultations among multiple models. Consultation results are persisted and notified, and a new consultation can be initiated only after existing consultation results have been digested.

Installation and Activation

Dependencies

  • DSH (DeepSeek Harness): Version must satisfy >= 0.2.0-rc.1.
  • Jobs plugin: To support long tasks exceeding 10 minutes, you must install both the dsh-jobs-local and dsh-tool-jobs plugins.

Installation Steps

  1. Clone the repository:
    git clone https://github.com/shenhuanageshei/dsh-thincoder-suite.git
  1. Run the following command in your web profile directory (usually ~/.dsh/profiles/web):
    pnpm add link:<克隆路径>/dsh-thincoder-suite
  1. Edit the profile’s package.json and add the package to bundles:
    {
      "dsh": {
        "profile": {
          "bundles": [
            "@dsh-external/dsh-thincoder-suite"
          ]
        }
      }
    }
  1. Restart DSH. The presence of [thincoder-suite] active: advisor/eng/eng_coder ... in the logs indicates successful installation.

Usage

advisor: Review Convergence and Reconciliation

advisor changes the “infinite nitpicking” review mode into a “bounded reconciliation” mode. It requires the reviewed party to output a reconciliation table in the | # | Action | Detail | format each round, and Action must be one of Fixed / Dispatched / Not an issue / Deferred.

  • Reference verification: Each 文件:行号 in a review report is verified against disk; fabricated references are flagged.
  • Round control: Code review has a hard limit of 5 rounds; design review is exempt from the round limit, but if it fails to produce a usable conclusion three times in a row, further initiation will be rejected (cannot be self-released).

eng / eng_coder: Engineering Mode and Token Mechanism

  • eng: Enables engineering mode. The model can only write documentation (docs/** and root-level .md) and cannot modify product code. Design review must be initiated by the user; the model cannot review itself and issue a token to itself.
  • eng_coder: Responsible for actual product code writing. It supports structured stage task briefs (stages), where each stage has goals, allowed files, and acceptance criteria.
  • Token: The token is issued after a design review passes. By default it is valid for 7 days and stored in $DSH_HOME/.thincoder/design-tokens.json. It is renewed automatically while the design documents remain unchanged.

escalate: Capability Escalation

When a task exceeds the current model’s capability, use the escalate tool. It transfers the task and write permissions to a stronger model in the consultModels pool. Recursive escalation is no longer allowed inside sub-agents, and it is directly rejected in engineering mode (only eng_coder may be used).

consult_start: Parallel Consultation

consult_start initiates parallel independent analysis by multiple models (read-only). The consultation runs in the background and notifies the user when complete. By default, minutes are first persisted to docs/consult-minutes/, then a notification is sent. To prevent duplicate consultations, pending consultations whose results have not been digested block new initiation.

Backgrounding Long Tasks

  • Default background: eng_coder and escalate default to background execution (starting from batch 21, omitting background implies background execution). After the task completes, the user is notified, and the full report is preferably read from the persisted file $DSH_HOME/.thincoder/jobs/<jobId>.txt.
  • Prerequisites: Backgrounding depends on dsh-jobs-local + dsh-tool-jobs. If these two plugins are not installed, the task will emit a warning and fall back to synchronous execution (still subject to the platform’s 10-minute wall-clock limit).

Notes

  1. Version compatibility: This plugin only supports DSH >= 0.2.0-rc.1. Lower DSH versions cannot install it, and the platform will intercept it during installation.
  2. Local development: When developing or debugging, always use link: instead of file:. link: creates a link to the source directory in node_modules, so code changes take effect immediately; file: is merely a hard-link copy, and source changes will not be reflected in the plugin.
  3. Security model: Authorization relies on exact full-record matching + a design-document-set fingerprint + process discipline (token format is uuid:过期时间).