Introduction

Building long-form writing agents on DeepSeek Harness (hereinafter referred to as DSH) often involves encapsulating retrieval, drafting, and revision into a set of tools and hanging them on the default ReAct loop. This way, outlines, drafts, and revisions are all crammed into the same loop, leaving no dedicated space for different types of work, and making mid-session modifications lack independent support.

dsh-agent-driver-writehere changes the mounting point: instead of appending tools to the default loop, it implements the WriteHERE long-form writing loop (heterogeneous recursive planning) as an agent driver, running as a second reasoning loop. Below is an introduction to its design, installation, and usage.

What is this

dsh-agent-driver-writehere is a DSH plugin maintained by Player-YN under the MIT license. One-sentence positioning: Run the WriteHERE long-form writing loop (heterogeneous recursive planning) as a DeepSeek Harness agent driver—WriteHERE as a second reasoning loop, not an extra ReAct tool.

The key lies in the word “driver.” It is not a toolkit: the host can directly select this driver constructor when preparing the session loop, thereby granting the planning, retrieval, and drafting of long-form writing a mode of operation independent of the default ReAct loop.

Core Mechanism: Tick Protocol and Typed Cards

The writing loop is driven by the tick protocol, going through four steps in each cycle:

GetInfo → Update → Decide → 类型化执行

Work within the loop is carried by three types of cards:

  • write: Reader body text. Leaf write nodes append to article.md.
  • think: Memo.
  • task: Call a worker with preset: 'standard' via startContinuable.

It is accompanied by two constraints:

  • Editing sessions use the WriteHereAgent constructor and tools: [] (no native function calling tools); the session never opens a terminal. When command execution, repository reading, or external API calls are needed, they should be written as task cards.
  • Task cards park the process; when a worker is needed to return, please use Web.

Web UI: Card Tree

The Web UI provides a draggable Card Tree window: an infinite canvas where parent-child connections are maintained, with a default top-down layout. While the session is running, you can open it from the sidebar footer to directly view the Card Tree expansion.

Installation and Activation

First, do the preparations: ensure dsh is in PATH and pnpm is installed locally. This package has not been published to the npm registry yet; since it declares dsh.bundle, the official loader dsh plugin add will append a configuration layer and install zod during installation.

One-line installation (recommended):

dsh plugin --profile web add github:Player-YN/dsh-agent-driver-writehere
dsh --profile web

On the first load of the plugin (only if ~/.dsh/.agent-presets/ does not exist), it will copy the article-editor preset, register the WriteHere driver, and bind that preset. React remains the default driver for Standard/PTC/Minimal/Creative modes; sessions bound to WriteHere will not fall back to React.

If you do not want changes in the main branch to alter the installation result, you can install via a fixed commit using #<sha>:

dsh plugin --profile web add github:Player-YN/dsh-agent-driver-writehere#<sha>

You can also clone first, then add from within the repository directory:

git clone https://github.com/Player-YN/dsh-agent-driver-writehere.git
cd dsh-agent-driver-writehere
dsh plugin --profile web add .

On Windows, you can install via checkout and immediately copy the preset:

.\install.ps1

After the steps above, you can use the following commands to verify, update, or remove the plugin:

dsh --profile web --dump-config   # 查找 "# == dsh-agent-driver-writehere"
dsh plugin --profile web update github:Player-YN/dsh-agent-driver-writehere
dsh plugin --profile web remove dsh-agent-driver-writehere

Two reminders: If a profile has already combined this driver from other layers, do not add the bundle again; install-remote.sh / install-remote.ps1 are only wrappers for the official add command and responsible for copying the preset. They are optional and should only be executed if you have read the script.

Typical Usage

Web is the recommended path, with the following steps:

  1. Start profile: dsh --profile web (or dsh web).
  2. New session, select “Tech Blog Blogger” (article-editor). This session binds the WriteHere driver.
  3. Send a topic, not a shell command.
  4. Open Card tree from sidebar footer to view parent-child connections.
  5. Leaf write nodes append to article.md; task nodes delegate work to the standard worker.

If the host supports forwarding --preset to session.header.agentPreset, headless mode is also available:

dsh --profile headless --preset article-editor "Why write-back is required"

Applicable Scenarios and Notes

Suitable for: Developers who want to build long-form writing workflows on DSH and wish for the intermediate products of planning, retrieval, and drafting to have structured support.

Points to note before use:

  • The plugin runs with the permissions of the current dsh process; check the source code and license (MIT) before installing.
  • The publishing process (e.g., WeChat Official Account formatting and publishing) is not part of this package—the host scheduler is only responsible for planning, updating, and drafting.
  • Editing sessions do not open a terminal; commands, repository reads, and external APIs should all be completed through task cards.
  • Task cards park the process; when a worker is needed to return, please use Web.

Summary

The value of dsh-agent-driver-writehere lies in changing the access method: instead of breaking down long-form writing into scattered tools on the default loop, it implements the WriteHERE heterogeneous recursive planning loop as a second reasoning loop, uses typed cards to carry planning, retrieval, and drafting, and spreads the process out in the Web UI via Card Tree. If you have long-form writing needs on DSH, you can start from the two addresses below:

  • Directory page: https://www.skillhub.cn/plugins/Player-YN/dsh-agent-driver-writehere
  • GitHub repository: https://github.com/Player-YN/dsh-agent-driver-writehere