Adds /review, /review-status, and /review-cancel to spawn an independent native subagent that inspects a chosen Git scope (base branch, uncommitted changes, a commit, or custom instructions) and returns a findings report in the current conversation, with English or Chinese output from the host locale.
Install
# from npm (prebuilt)
dsh plugin --profile web add @michengai/dsh-code-review
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:MichengAI/dsh-code-review
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
DSH Code Review
Start a review in your conversation. Let an independent agent inspect the code and bring back findings.
简体中文 · Developer docs · Changelog · Apache-2.0
DSH Code Review is a community code review plugin for DeepSeek Harness, packaged as @michengai/dsh-code-review. Enter /review, choose a scope or describe your request, and a native independent subagent inspects Git, source files, callers, and tests before returning a report to the main conversation. No Codex installation is required.
Host compatibility
The current version supports these exact DSH release candidates: 0.1.2-rc.1, 0.1.5-rc.1, 0.1.5-rc.2, 0.1.5-rc.3, 0.1.7-rc.1, 0.1.7-rc.2, 0.2.0-rc.1, and 0.2.0-rc.2. Alpha builds, 0.0.1 release candidates, and any version not in that list are not supported. Peers name those exact versions with ||; they are not a semver range. It loads through dsh.bundle.patch and requires the native spawn provider, the userQuestions service, a question answerer for your platform, and a model that supports tool calls.
Install the package from npm or build from source. Offline host and package integration checks have passed; review quality, language adherence, and interaction across platforms still need live validation.
What you can do
- Choose a scope: compare against a base branch, review uncommitted changes, select a commit, or provide custom instructions.
- Let the reviewer gather evidence: an independent context reads Git, relevant code, and tests without receiving a preloaded repository snapshot.
- Read results in the main conversation: receive prioritized findings with file paths and line numbers. Plain-text model responses are preserved.
- Use English or Chinese reports: a separate language context follows the host preference while preserving the original English Codex rubric.
- Check status or cancel: recover the latest report or cancel scope selection and an active review.
Prerequisites
- A working DeepSeek Harness installation with
dshavailable in PowerShell. - Node.js ≥
22.19.0, npm, and Git. Node.js must also meet your installed DSH version's requirements. - Examples use the
webprofile; replace it with the profile running DSH.
DSH product ecosystem
For a desktop workbench, download DSH Codex Desktop. Existing DeepSeek Harness installations can add plugins as needed by following each project's README. Below are 11 first-party plugins; consult the corresponding desktop release notes and bundled catalog for what that version includes.
| Plugin | What you can do |
|---|---|
| Codex UI | Organize projects and conversations, search tasks, and navigate chat turns |
| Agency Agents | Choose and summon specialists for your task |
| Skills Manager | Find, enable, create, and import local skills |
| Archive Manager | Search, restore, or clean up archived conversations |
| IM Connect | Send tasks and receive replies through messaging platforms |
| Automation | Schedule tasks and review each run |
| BTW | Ask side questions without interrupting the main task |
| Simplify | Use /simplify to improve code within your Git changes |
| PUA | Guide the Agent to try new approaches after failures, investigate causes, and verify results before completion |
| Code Review | Use /review to request an independent Agent code review and receive the report in the current conversation |
| Codex Pet | View conversation notifications and respond to tool approvals and questions through a desktop pet |
Installation
Ask an agent to install it (recommended)
Send this prompt to an agent with local terminal access:
Install the DSH plugin @michengai/dsh-code-review into my local web profile: run dsh plugin --profile web add @michengai/dsh-code-review@latest --registry=https://registry.npmjs.org/, then dsh --profile web --dump-config. Confirm the plugin is loaded and explain how to restart DSH and use /review. Stop and report the cause if any step fails.
Install manually
Run these commands:
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$OutputEncoding = [System.Text.Encoding]::UTF8
dsh plugin --profile web add @michengai/dsh-code-review@latest --registry=https://registry.npmjs.org/
dsh --profile web --dump-config
Continue only after each step succeeds. Restart the DSH backend you actually use, then enter /review. This is a native plugin, not a SKILL.md bundle; do not copy lib manually.
Usage
| Goal | Input |
|---|---|
| Open scope selection | /review |
| Set a custom focus | /review Check the previous commit for authorization regressions |
| View progress or the latest report | /review-status |
| Cancel selection or an active review | /review-cancel |
Empty input offers four options: base branch, uncommitted changes, a commit, and custom instructions. Uncommitted scope includes staged, unstaged, and untracked files. The base menu lists local branches; the commit menu lists the latest 100 commits. Other refs can be entered as free text.
All text after the command is treated as custom instructions, not CLI flags. --base main, ., and status are passed as ordinary text. The subagent determines and retrieves the context it needs. “Review the entire project” is passed verbatim, but does not mean the program has verified complete file-by-file coverage.
Configuration and reports
| Optional setting | Behavior |
|---|---|
reviewModel |
Review model within the same provider; otherwise inherits the current model configuration |
reportDirectory |
Absolute report directory; defaults to $DSH_HOME/code-review, or ~/.dsh/code-review when DSH_HOME is unset |
Language follows the host's locale.preference: en / en-* selects English; other values default to Chinese within the current two-language support. On 0.1.7-rc.1 and later it is the locale profile entry returned by settings.describe(). Each review captures the locale at its start; the next review reads updated settings. Command catalog descriptions and input hints are resolved when the plugin loads and require a reload to update. Without a saved preference, or when the settings read fails, Chinese is used; the backend cannot read a language detected only in the browser.
The latest report is saved atomically per conversation. The session report uses GitHub Flavored Markdown that DSH renders: a status heading, finding headings, local file links with line fragments, and paragraphs. Historical report bodies are not translated. JSON keys, enum values, code, and paths remain unchanged. Unfinished reviews do not resume automatically after shutdown. Status, cancellation, and report storage are DSH plugin features.
FAQ
Is this identical to Codex?
The rubric and short task templates follow the fixed source commit a592c38c16cdd7623dacc9168926ebccedfb67d3. Questions, tools, permissions, and event presentation use native DSH capabilities. This is not a pixel-perfect Codex Desktop clone, and different models may produce different findings.
Can a review change code?
The review instructions request no fixes, but the tool layer is not universally read-only. Execution follows Agency experts: native spawn installs the reviewer persona while preserving the host's other system sections and tools. Only recursive code review and expert invocation tools are denied. The host fixes permissions at delegation time; the plugin neither overrides approval policy nor forwards child approval requests. The host rejects operations outside that scope, and the reviewer returns a report explaining evidence and test limitations.
If Git fails during Windows sandbox preparation, or tests fail with spawn EPERM, the parent session must handle the host environment or permissions before starting another review. “Completed” means the Agent returned a report; it does not guarantee that every diff was inspected or tests passed. Read the report for those limitations.
What if nothing appears after installation?
Check that installation and runtime use the same profile, restart the DSH backend, and confirm dsh --profile web --dump-config includes the plugin. Empty /review requires a host question answerer, and the main model must support the code_review tool. Use /review-status to inspect the record; a request acknowledgement is not review completion.
Why might I still see another language?
Explicitly select Chinese or English in host settings. Model language is controlled by instructions and cannot be guaranteed. Raw external-tool errors, code, and historical reports are not automatically translated.
Development and contributing
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$OutputEncoding = [System.Text.Encoding]::UTF8
npm ci --ignore-scripts
npm run check
npm run verify:package
dsh plugin --profile web add .\michengai-dsh-code-review-0.1.3.tgz --ignore-scripts
check covers TypeScript, prompt hashes, short tasks, real AgentLoop regression tests with offline models, and documentation links. verify:package checks bundle loading, peers, and installed-package host integration in an isolated profile. These checks do not replace live model validation. GitHub and npm both include a ready-to-run lib; after changing source, run npm run build before committing.
| Entry | Responsibility |
|---|---|
| src/index.ts | Commands, main-session tool, and report delivery |
| src/selection.ts | Native scope selection |
| src/runtime.ts | Independent reviewer and tool restrictions |
| src/request.ts | Codex short tasks and base-ref resolution |
| src/i18n.ts | Host locale and output language context |
| src/report.ts | Full JSON, extracted JSON, then plain-text fallback |
See the developer navigation for implementation history. To roll back, reinstall a previously retained local package and restart DSH. Conversations and reports are not deleted.
Sources and license
Licensed under Apache License 2.0. See the original Codex rubric, source.json, and NOTICE.
Upstream source: task templates · review execution · scope selection · base branch resolution.
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-git-graph★ 8568
Git branch selector and Git graph for the dsh web GUI: switch branches and explore branch-lane and commit history from the conversation header.
Akimiya-z/codex-guard#dsh★ 136
Pre-submit pull-request hygiene checks inside DeepSeek Harness: scans the current diff for TODO leftovers, hardcoded secrets, and non-conventional commit subjects.
Cerbur/clutch-dsh#clutch-dsh-worktree★ 32
Adds a Worktree view to DSH Web UI that groups Sessions by Git worktree while keeping DSH as the source of truth.
lehhair/dsh-diff-viewer★ 26
PiUI-style diff viewer replacing the stock DiffBlock for write/edit tool calls.
DamonKoy/dsh-web-ui#dsh-git-graph★ 23
Git branch selector and Git graph in the conversation header of the dsh web GUI.
PerryLink/dsh-github★ 22
Official-grade GitHub CI integration: a composite action.yml, a polling PR review bot with idempotent inline comments and a status-check gate, plus PR/issues tools with every write gated by human approval.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.