wuxiangru915/dsh-review-loop
Incremental diff reviewer for DeepSeek Harness — Web UI review panel + /review command. 增量代码审查插件:checkpoint 增量队列 + 审查意见注入 agent.
已收录
2
Git
Bundle 已验证
预览
功能介绍
增量代码审查插件:批准一批改动后只审查检查点之后的新改动,提供 Web 审查面板与 `/review` 命令,并把审查意见注入回 agent。
适合
- 审查 agent 迭代改动、希望已批准批次不再出现在下一轮队列中的团队。
- 希望在对话输入框旁查看文件 diff 并执行批准操作的 DSH Web 用户。
- 偏好使用 /review 命令进行增量或完整工作区审查的键盘优先用户。
- 需要把审查意见注入当前 agent 对话的工作流。
不适合
- 不是 Git 仓库的工作区;Git 是硬性前提。
- 低于 DSH 0.1.0-rc.5 或 Node.js 22 的环境。
- 必须提供行级评论的审查流程;该功能尚未实现。
- 需要检查点与会话分支绑定的用户;该功能同样尚未实现。
README
dsh-review-loop
Incremental diff reviewer for DeepSeek Harness.
dsh-review-loop turns code review of agent work into an incremental, closed-loop process: after you approve a batch of changes, a checkpoint is recorded and the next review shows only the changes made afterward — never a re-review of what you already saw. Review feedback is injected back to the agent through the harness’s normal message channel, without interrupting its work.
What it solves
An agent task commonly touches a dozen or more files. Reviewing the full diff every time is slow, and re-reviewing unchanged work wastes attention. This plugin makes review follow the agent’s progress:
agent works (modifies files)
-> open the review panel: only changes since the last review checkpoint
-> inspect each file's diff, add feedback
-> approve: a new checkpoint is recorded, feedback is injected to the agent
-> the agent responds and keeps working; new changes become the next batch
Features
-
Incremental review (since-review): approving snapshots the working tree into a checkpoint; the next review diffs
checkpoint -> current, so reviewed files disappear from the queue unless they change again. -
Two entry points: a Web UI review panel docked above the conversation composer (2s polling), and a
/reviewcommand for keyboard-first use. The same core logic backs both. -
Feedback closed loop: approvals may carry a comment, delivered to the agent as a user message via
agent.inject(). - No tool-call parsing: any on-disk change — by the agent, by you, or by another process — is reflected; the plugin reads git, not the agent loop.
-
Checkpoint persistence:
$DSH_HOME/review-loop/<workspace-hash>.json, written atomically, never polluting the workspace’s own git status. -
Zero core modifications: a pure bundle plugin (
dsh.bundlepatch layer); the agent-loop skeleton is untouched.
Installation
# one line, from a git source
dsh plugin --profile web add github:wuxiangru915/dsh-review-loop
# restart the web server, then hard-refresh the page
Local development:
# Development requires a sibling checkout of the DeepSeek Harness source
# repository at ../deepseek-harness: the @deepseek-ai/dsh-* packages are not
# fully published to npm (dsh-type-meta is missing), so devDependencies link
# to the workspace instead. Adjust the link paths in package.json if your
# checkout lives elsewhere.
pnpm install && pnpm build
dsh plugin --profile web add /path/to/dsh-review-loop
The repository ships prebuilt lib/ artifacts, so git-source installs work without a build step on the user’s machine.
Usage
Web UI

In any session whose workspace is a git repository, a review panel appears above the composer:
- A status line —
N file(s) to review— with an Open review button. - The expanded panel lists the pending files with toggleable, colorized diffs (added lines use the success token, removed lines the error token; the sign is always visible).
- An optional feedback input and an Approve & checkpoint button.
- After approval the panel shows the reviewed state; later edits re-surface the file.
Command line
| Command | Behavior |
|---|---|
/review |
Incremental: changes since the last checkpoint (or the full change set vs HEAD when none exists) |
/review all |
The complete working-tree change set vs HEAD, ignoring the checkpoint |
/review approve |
Record a checkpoint |
/review approve <comment> |
Record a checkpoint and inject the comment into the agent |
Architecture
src/
├── review.ts Pure core (collectState / approve / renderState) — shared by command and HTTP paths
├── git.ts git helpers (status / diff / hash-object; zero-dependency spawnSync)
├── checkpoint.ts checkpoint persistence ($DSH_HOME/review-loop/<ws-hash>.json, atomic write)
├── http.ts Web routes: GET /plugins/dsh-review-loop/state · POST /plugins/dsh-review-loop/approve
└── client/
└── review-panel.tsx Browser panel (conversation.input.dock slot, polling refresh)
command: /review ------> renderState() ----+
+--> src/review.ts (pure, shared)
web UI: GET /state ----> collectState() --+
POST /approve --> approve() + agent.inject()
The client bundle is a CJS __ModuleLoader__ artifact served at /plugins/@dsh-plugin/dsh-review-loop/client.js; routes and command share one checkpoint store, so approving from the UI advances the same queue the /review command reads.
Incremental algorithm
for each working-tree change vs HEAD:
compare its content hash with the checkpoint's recorded hash
same -> reviewed (hidden)
changed / new / HEAD moved -> pending (the incremental queue)
approve re-snapshots the tree -> the checkpoint advances
Testing
pnpm test # 7 integration tests: real cordis + real git repositories
pnpm typecheck
pnpm build # dual-half build: host ESM + client bundle
Roadmap
-
/reviewcommand (incremental diff / approve / feedback injection) - Web UI review panel (file list + diff + approve)
- Checkpoint persistence (incremental queue)
- Line-level comments (diff parser)
- Session-branch coupling (checkpoint follows session branches)
-
npm publish (
@dsh-plugin/dsh-review-loop)
Requirements
- DeepSeek Harness >= 0.1.0-rc.5 (Cordis 4.x)
- A git repository (hard prerequisite)
- Node.js >= 22
License
常见问题常见问题
在启用了 DSH 的终端中执行已验证命令 dsh plugin --profile default add github:wuxiangru915/dsh-review-loop。命令会解析公开 package 元数据,并保持插件与本页展示的目录身份一致。
兼容性以页面上展示的 bundle 与 profile 状态为准。如果某个 profile 尚未检测到,请先保持禁用,并在生产启用前阅读仓库文档。
GitHub 链接和 activity 元数据是 release 与维护状态的来源。新版本发布后重新查看本页,确认目录已经观察到最新版本。