dsh-review: DeepSeek Harness Code Review Plugin

Preface

The design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When developing agents or performing automated code maintenance, code review is a frequent and important step. Manual review can easily miss details, and the dsh-review plugin solves the problem of agents lacking structured review capabilities by integrating the review process directly into the conversation flow through a standardized command workflow.

What It Is

dsh-review is a plugin for DeepSeek Harness, maintained by developer apcamargo. It provides agents with a complete code review workflow by adding two new commands: /review and /end-review.

Core Features

The plugin primarily provides the following capabilities:

  1. Multi-mode review: Supports reviewing uncommitted changes, specific commits, GitHub Pull Requests (requires the gh tool), and snapshots of specified folders.
  2. Custom instructions: Supports storing global or temporary review instructions via /review instructions.
  3. Tiered feedback: Supports sorting discovered issues by priority from [P0] to [P3], with confidence labels attached.
  4. Command-line enhancement: Supports two flags, --extra and --aggressive, for attaching specific instructions or enabling aggressive review mode.
  5. Status query: View the current review session’s status and stored instructions via /review status.

Installation

Install this plugin by running the following command. The plugin automatically declares the dsh.bundle manifest, so it is typically enabled automatically after running dsh plugin add.

dsh plugin --profile web add https://github.com/apcamargo/dsh-review.git

The Harness must be restarted after installation for the plugin to load.

Typical Usage

The plugin provides a rich set of subcommands and flags. The main operations are listed below.

Basic Review

Review uncommitted changes (default behavior):

/review

Check review status:

/review status

Specifying the Review Scope

  • Branch-based: Compare the current branch against a specified base branch:
  /review branch [name]

The default is main or master.

  • Commit-based: Review a commit with a specified SHA:
  /review commit abc123
  • Pull Request-based: Review a GitHub PR (requires gh installed locally and logged in):
  /review pr 123
  /review pr https://github.com/owner/repo/pull/123
  • Folder-based: Review specified paths as snapshots, independent of the Git repository:
  /review folder src docs

Custom Review Focus

Enter text directly as the review focus:

/review check the error handling

Set or clear custom instructions (instructions are appended to all subsequent reviews in the session):

/review instructions "prefer fail-fast error handling"
/review instructions clear

Using Flags

  • Extra instructions: Append an additional instruction in any mode:
  /review --extra "check for SQL injection"
  • Aggressive mode: Enable aggressive review, where the model looks for problems with a skeptical attitude:
  /review --aggressive

Ending the Review

Use /end-review to end the current review session and choose an output mode:
- summarize (default): Generate a structured review report containing scope, conclusions, findings, and a fix queue.
- fix: Generate and execute fix operations.
- done: Only clear the session state and return to normal coding work.

/end-review
/end-review summarize
/end-review fix
/end-review done

Use Cases and Notes

This plugin is suitable for developers who need to embed code review logic into agent workflows.

Before using it, please confirm the following environment requirements:
1. Node.js version: Node.js >= 22 must be installed.
2. Git repository: Most commands (e.g., uncommitted, branch, commit, pr) depend on a Git repository.
3. GitHub CLI: When using /review pr, gh must be installed and logged in.

Known limitations:
- No mode enforcement: The plugin manages review state via flags; the agent itself does not read this state to restrict its tool usage—this depends on the design of the prompts.
- Session isolation: State is stored under the session ID and is reset when forking or resuming a session.
- Session cleanup: Records of deleted sessions are not automatically cleaned up.

Conclusion

Through a standardized command interface, dsh-review enables agents to independently complete the entire process from code diff extraction to tiered feedback. For projects building automated code review flows with DeepSeek Harness, this is a practical tool. See the links below for the plugin directory and source code.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye