dsh-coding-enhanced 0.5.16 → 0.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -7
- package/README.md +76 -74
- package/docs/prior-art.md +194 -0
- package/docs/ui-directions/README.md +35 -0
- package/docs/ui-directions/index.html +869 -0
- package/docs/web-review-architecture.md +668 -0
- package/lib/client.js +306 -28
- package/lib/index.js +385 -60
- package/package.json +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.5.16
|
|
4
|
-
|
|
5
|
-
- Publish from GitHub Actions with npm Trusted Publishing (OIDC); the workflow
|
|
6
|
-
no longer reads a long-lived `NPM_TOKEN`.
|
|
7
|
-
- README: the package is available on npm; install by name.
|
|
8
|
-
- Version 0.5.16.
|
|
9
|
-
|
|
10
3
|
## 0.5.15
|
|
11
4
|
|
|
12
5
|
- Restore the native tool gate: while AI Change Review and the input-bar Auto
|
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# dsh-coding-enhanced
|
|
4
4
|
|
|
5
|
-
**
|
|
5
|
+
**The DSH change gate: review before it lands, rewind when it goes wrong, and keep working while review waits.**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Queue every AI edit · rewind whole turns · hand review to a non-blocking waiter
|
|
8
8
|
|
|
9
9
|
[](LICENSE)
|
|
10
10
|

|
|
@@ -15,14 +15,23 @@ Review every AI file change before it lands · Undo the last turn when it goes w
|
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
`dsh-coding-enhanced` is **not another AI PR reviewer**. It is a **workflow layer for DSH agents**, shipped as one installable plugin:
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
- **Pre-write change gate** — native `write` / `edit` / `apply_patch` are refused while Pre-review is on; the agent queues `review_write` / `review_patch`; nothing lands until you Finish.
|
|
21
|
+
- **Workspace time machine** — per-turn shadow-git snapshots, multi-turn withdraw, a pre-withdraw backup, and a gap warning when a rewind crosses turns without snapshots.
|
|
22
|
+
- **Non-blocking review handoff** — one persistent review waiter subagent holds the wait; the main agent can keep chatting or end the turn; the waiter wakes it with the per-file results.
|
|
23
|
+
- **Remote + cross-AI (next)** — passkey-paired always-on web review, line-level AI comments (B), and an adversarial AI cross-review API.
|
|
24
|
+
|
|
25
|
+
> **What this is not.** Not an AI PR reviewer (CodeRabbit / Qodo / Copilot), not a hosted SaaS, and not a claim to be first. The diff UI is table stakes; the gate, the time machine, and the handoff are the product. See the [prior-art survey](docs/prior-art.md) for the direct comparison with [`dsh-diff-approval`](https://github.com/9087/dsh-diff-approval).
|
|
26
|
+
|
|
27
|
+
| | Pillar | What it gives you |
|
|
21
28
|
|---|---|---|
|
|
22
|
-
| 🛡️ | **AI Change Review
|
|
23
|
-
| ↩️ | **Turn Withdraw
|
|
29
|
+
| 🛡️ | **Change gate** (the `AI Change Review` switch) | The agent queues every edit with `review_write` / `review_patch`; they accumulate in one review tab; nothing lands until you approve, reject, edit or Finish. |
|
|
30
|
+
| ↩️ | **Workspace time machine** (the `Turn Withdraw` switch) | Restore the workspace to before a turn and cancel that round in the model's context; multi-turn rewind, backup and gap warnings. |
|
|
31
|
+
| ⏳ | **Review handoff** | One persistent review waiter subagent holds the wait; the main agent keeps working and is woken when you Finish. |
|
|
32
|
+
| 🌐 | **Remote + cross-AI** | Planned: passkey-paired web review, line-level AI comments, adversarial external-AI cross-review. |
|
|
24
33
|
|
|
25
|
-
|
|
34
|
+
All in one bundle — install once, use the gate and the time machine independently.
|
|
26
35
|
|
|
27
36
|
---
|
|
28
37
|
|
|
@@ -30,7 +39,7 @@ Both live in one bundle and work independently — install once, use either.
|
|
|
30
39
|
|
|
31
40
|
## 🧩 Sub-features
|
|
32
41
|
|
|
33
|
-
### 🛡️ 1. AI Change Review
|
|
42
|
+
### 🛡️ 1. Change gate (`AI Change Review`)
|
|
34
43
|
|
|
35
44
|
DSH agents normally write files as they go. With this sub-feature, changes are
|
|
36
45
|
**queued** instead: the agent proposes every edit, they accumulate in one review
|
|
@@ -60,8 +69,13 @@ tab, and nothing touches disk until you finish.
|
|
|
60
69
|
only queue the proposal — they never write.
|
|
61
70
|
2. All queued changes appear in the **same** right-sidebar review tab, even
|
|
62
71
|
when the agent proposes them across several steps.
|
|
63
|
-
3. When it has finished proposing, the agent
|
|
64
|
-
|
|
72
|
+
3. When it has finished proposing, the agent uses **one persistent review
|
|
73
|
+
waiter subagent per conversation**. It starts the waiter once, then sends
|
|
74
|
+
each new `reviewId` and `waitKey` to the same child with `send_message` (no
|
|
75
|
+
new subagent task per review). The waiter calls `review_wait` with both and
|
|
76
|
+
waits; the main agent can keep chatting or end the turn. When the review
|
|
77
|
+
finishes, the waiter returns and wakes it. If delegation is unavailable,
|
|
78
|
+
**`review_wait`** blocks the main agent as before.
|
|
65
79
|
4. You **Approve**, **Reject** (with instructions), or **Edit** each file, then
|
|
66
80
|
**Finish**. Approved and hand-edited files are written; rejected files are
|
|
67
81
|
not. `review_wait` returns one structured result per file
|
|
@@ -72,6 +86,15 @@ tab, and nothing touches disk until you finish.
|
|
|
72
86
|
by the plugin's tool gate. Turning the switch off returns it to native
|
|
73
87
|
editing. Shell commands (`bash`, `sed`, …) are outside the review.
|
|
74
88
|
|
|
89
|
+
Both tools return `reviewId` and `waitKey`; use them to start a review waiter
|
|
90
|
+
subagent instead of blocking the current turn.
|
|
91
|
+
|
|
92
|
+
Both tools accept an optional `notes` array. Each note is anchored to a
|
|
93
|
+
new-file `line` (recommended) or a 1-based `hunk`; the review diff renders it as
|
|
94
|
+
a compact gradient-tinted **AI explanation row** immediately after that added
|
|
95
|
+
line: same grid and height as a diff row, `AI` in the sign column, one line with
|
|
96
|
+
ellipsis (hover for the full text); a hunk-only note goes after the group. The agent is prompted to add one short note per added group.
|
|
97
|
+
|
|
75
98
|
**Review tab**
|
|
76
99
|
|
|
77
100
|
- Opens as a **right-sidebar tab**, like a file preview — not a pop-up.
|
|
@@ -131,7 +154,7 @@ always shows the cumulative change.
|
|
|
131
154
|
Deletes, renames, copies, binary patches and paths outside the working
|
|
132
155
|
directory are refused — use `review_write` for those cases.
|
|
133
156
|
|
|
134
|
-
### ↩️ 2. Turn Withdraw
|
|
157
|
+
### ↩️ 2. Workspace time machine (`Turn Withdraw`)
|
|
135
158
|
|
|
136
159
|
The last turn wrote something you did not want? Undo it in one click.
|
|
137
160
|
|
|
@@ -172,6 +195,19 @@ The last turn wrote something you did not want? Undo it in one click.
|
|
|
172
195
|
|
|
173
196
|
<a id="quick-start"></a>
|
|
174
197
|
|
|
198
|
+
### ⏳ 3. Non-blocking review handoff
|
|
199
|
+
|
|
200
|
+
The main agent does not call `review_wait` itself. After queueing, it starts **one
|
|
201
|
+
persistent review waiter subagent** per conversation and sends it the
|
|
202
|
+
`reviewId` + `waitKey`; later reviews reuse the same child with
|
|
203
|
+
`send_message` instead of spawning a new subagent.
|
|
204
|
+
|
|
205
|
+
- the waiter calls `review_wait` with both and blocks only itself;
|
|
206
|
+
- the main agent can keep chatting, do other work, or end the turn;
|
|
207
|
+
- when you Finish, the waiter returns the per-file results and wakes the main agent;
|
|
208
|
+
- if the waiter is gone, the main agent starts a new one; direct `review_wait`
|
|
209
|
+
remains as the fallback.
|
|
210
|
+
|
|
175
211
|
## 🚀 Quick start
|
|
176
212
|
|
|
177
213
|
### 1. Install
|
|
@@ -209,7 +245,8 @@ paste its URL; use this when you want a fixed version:
|
|
|
209
245
|
dsh plugin --profile desktop add https://github.com/hello-2021/dsh-coding-enhanced/releases/download/v<version>/dsh-coding-enhanced-<version>.tgz
|
|
210
246
|
```
|
|
211
247
|
|
|
212
|
-
> **
|
|
248
|
+
> **Direct npm install is planned.** Once the package is published,
|
|
249
|
+
> `dsh plugin add dsh-coding-enhanced` will work without a URL.
|
|
213
250
|
|
|
214
251
|
**CLI (local tarball)**
|
|
215
252
|
|
|
@@ -221,40 +258,19 @@ dsh plugin --profile desktop add /path/to/dsh-coding-enhanced-<version>.tgz
|
|
|
221
258
|
this directory. DSH installs a link, so source edits apply on the next
|
|
222
259
|
recomposition or restart.
|
|
223
260
|
|
|
224
|
-
**Install by package name (npm)**
|
|
225
|
-
|
|
226
|
-
The package is published on npm as `dsh-coding-enhanced` (0.5.16). The Add
|
|
227
|
-
plugin box accepts the bare name, and
|
|
228
|
-
`dsh plugin add dsh-coding-enhanced` works.
|
|
229
|
-
|
|
230
|
-
**Discover / plugin market**
|
|
231
|
-
|
|
232
|
-
DSH's **Discover** tab is a reader for plugin **index JSON** files; the app does
|
|
233
|
-
not ship a central community catalog. Official entries are built into DSH;
|
|
234
|
-
third-party plugins become discoverable by publishing an index and sharing its
|
|
235
|
-
URL. This repository ships a format-1 index pinned to the v0.5.15 commit:
|
|
236
|
-
|
|
237
|
-
1. Enable **Plugins → More → Experimental plugins → Custom plugin indexes**.
|
|
238
|
-
2. Open **Discover → Add index source** and paste:
|
|
239
|
-
`https://raw.githubusercontent.com/hello-2021/dsh-coding-enhanced/main/market/index.json`
|
|
240
|
-
3. Install **Coding Enhanced** from the index.
|
|
241
|
-
|
|
242
|
-
The index installs the pinned git commit, so it works before the package is on
|
|
243
|
-
npm. Regenerate it for a release with
|
|
244
|
-
`node scripts/market-index.mjs v<version>`.
|
|
245
|
-
|
|
246
261
|
### 2. Choose features
|
|
247
262
|
|
|
248
263
|
Open **Settings → Coding Enhanced** (the same controls appear on the plugin's page in the **Plugins** tab):
|
|
249
264
|
|
|
250
265
|
| Setting | Default | What it does |
|
|
251
266
|
|---|---|---|
|
|
252
|
-
| **AI Change Review
|
|
253
|
-
| **Turn Withdraw
|
|
267
|
+
| **Change gate** (`AI Change Review`) | on | the pre-write review gate for `review_write` / `review_patch` |
|
|
268
|
+
| **Workspace time machine** (`Turn Withdraw`) | on | turn-start snapshots, multi-turn withdraw and the restore action |
|
|
254
269
|
| **Turns kept for withdraw** | 10 | how many recent turns stay withdrawable (1–50) |
|
|
255
270
|
| **Snapshot nested git repositories** | on | include nested repositories' working files (excluding `.git`) |
|
|
256
271
|
| **Automatic cleanup** | on | run `git gc` on shadow snapshots after pruning or withdrawing |
|
|
257
272
|
| **Clean up now** | — | prune extra snapshots and compact every shadow repository |
|
|
273
|
+
| **Updates** | — | check npm for the latest release and install it from the settings card; restart DSH after updating |
|
|
258
274
|
|
|
259
275
|
Settings apply immediately and persist in `$DSH_HOME/coding-enhanced/settings.json`.
|
|
260
276
|
|
|
@@ -263,7 +279,7 @@ Settings apply immediately and persist in `$DSH_HOME/coding-enhanced/settings.js
|
|
|
263
279
|
Next to the model selector at the bottom-right of the message input, the shield
|
|
264
280
|
button opens **Review tools**:
|
|
265
281
|
|
|
266
|
-
|
|
|
282
|
+
| Pre-review | What the agent gets |
|
|
267
283
|
|---|---|
|
|
268
284
|
| **on** | a system-prompt instruction to queue every edit with `review_write` / `review_patch`, then call `review_wait` and wait; the review tools are available |
|
|
269
285
|
| **off** | the review tools are not exposed; the agent uses normal `write` / `edit` |
|
|
@@ -272,15 +288,20 @@ This is a convenience switch, separate from **Settings → Coding Enhanced → A
|
|
|
272
288
|
Change Review** (which enables the review tab and withdraw surfaces). More
|
|
273
289
|
review switches will be added to the same popover.
|
|
274
290
|
|
|
275
|
-
### 4. Use the
|
|
291
|
+
### 4. Use the change gate
|
|
276
292
|
|
|
277
293
|
Ask the agent to change files → it queues them with `review_write` / `review_patch` → the **Code review** tab opens → decide per file
|
|
278
294
|
→ **Finish**.
|
|
279
295
|
|
|
280
|
-
### 5. Use
|
|
296
|
+
### 5. Use the time machine
|
|
281
297
|
|
|
282
298
|
Click the undo icon in the assistant action row on the latest completed turn →
|
|
283
|
-
confirm.
|
|
299
|
+
confirm. Before the files are restored, the plugin snapshots the current
|
|
300
|
+
workspace as a pre-withdraw backup. After a withdrawal, the `Withdrawn` action
|
|
301
|
+
row offers **Restore pre-withdraw files**; it restores the files only, and the
|
|
302
|
+
turn stays hidden from the model. If a rewind spans turns without snapshots
|
|
303
|
+
(the plugin was off, installed later, or snapshots were pruned), the
|
|
304
|
+
confirmation lists those turns.
|
|
284
305
|
|
|
285
306
|
> Uninstall at any time from **Plugins → dsh-coding-enhanced → Remove**. Your
|
|
286
307
|
> `$DSH_HOME/coding-enhanced` state is left in place.
|
|
@@ -343,10 +364,10 @@ tools/pre-execute ── waits for your decision
|
|
|
343
364
|
|
|
344
365
|
## ⚠️ Limits
|
|
345
366
|
|
|
346
|
-
- While **AI Change Review** and the input-bar **
|
|
367
|
+
- While **AI Change Review** and the input-bar **Pre-review** switch are on,
|
|
347
368
|
native `write` / `edit` / `apply_patch` are refused by the plugin's
|
|
348
369
|
`tools/pre-execute` policy; the agent must use `review_write` /
|
|
349
|
-
`review_patch`. Turning
|
|
370
|
+
`review_patch`. Turning Pre-review off allows native editing again. Shell
|
|
350
371
|
commands (`bash`, `sed`, `rm`, …) are not intercepted.
|
|
351
372
|
- **Editable text is capped at 200 KiB** per file. Binary and larger files are
|
|
352
373
|
review-only.
|
|
@@ -372,20 +393,21 @@ tools/pre-execute ── waits for your decision
|
|
|
372
393
|
|
|
373
394
|
## 🗺️ Roadmap
|
|
374
395
|
|
|
375
|
-
The
|
|
376
|
-
|
|
396
|
+
The gate, the time machine, and the handoff are the product. The local diff UI
|
|
397
|
+
is deliberately simple; [`dsh-diff-approval`](https://github.com/9087/dsh-diff-approval)
|
|
398
|
+
already covers the “beautiful diff panel” case. Next:
|
|
377
399
|
|
|
378
|
-
- review
|
|
379
|
-
|
|
380
|
-
-
|
|
381
|
-
|
|
382
|
-
-
|
|
400
|
+
- **P1 — standalone web review**: passkey pairing, always-on standby, outbound
|
|
401
|
+
WSS bridge, review display and decisions.
|
|
402
|
+
- **P2 — line-level AI comments (B)**: a dedicated comment subagent; line
|
|
403
|
+
selection; suggestions.
|
|
404
|
+
- **P3 — multi-round AI revisions**: previous-round dimming; a previous-round
|
|
405
|
+
addition removed this round stays red.
|
|
406
|
+
- **P4 — external AI adversarial cross-review**: review-scoped tokens,
|
|
407
|
+
participants, verdicts, proposals.
|
|
383
408
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
---
|
|
387
|
-
|
|
388
|
-
<a id="development"></a>
|
|
409
|
+
See [the architecture](docs/web-review-architecture.md) and [the prior-art
|
|
410
|
+
survey](docs/prior-art.md).
|
|
389
411
|
|
|
390
412
|
## 🛠️ Development
|
|
391
413
|
|
|
@@ -406,26 +428,6 @@ For fast iteration, install this directory as a **link** through
|
|
|
406
428
|
**Plugins → Add plugin** and edit the source directly. When using the tarball
|
|
407
429
|
workflow, rebuild and reinstall after each change.
|
|
408
430
|
|
|
409
|
-
### Publishing
|
|
410
|
-
|
|
411
|
-
The package is published (0.5.16). Future releases are published by tagging
|
|
412
|
-
(`v<version>`) and letting the workflow run; the workflow uses Trusted
|
|
413
|
-
Publishing (OIDC), so no long-lived npm token is needed:
|
|
414
|
-
|
|
415
|
-
```sh
|
|
416
|
-
npm publish --access public
|
|
417
|
-
```
|
|
418
|
-
|
|
419
|
-
The trusted publisher is configured on the package settings for the
|
|
420
|
-
`npm-publish.yml` workflow; the workflow has `id-token: write` and needs no
|
|
421
|
-
`NPM_TOKEN`. Tag `v<version>` to publish.
|
|
422
|
-
|
|
423
|
-
After a release, regenerate the market index and commit it:
|
|
424
|
-
|
|
425
|
-
```sh
|
|
426
|
-
node scripts/market-index.mjs v<version>
|
|
427
|
-
```
|
|
428
|
-
|
|
429
431
|
---
|
|
430
432
|
|
|
431
433
|
<a id="release"></a>
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# 撞创意检索:GitHub / B 站
|
|
2
|
+
|
|
3
|
+
> 检索日期:2026-11-22。范围:GitHub 仓库搜索、DSH 插件生态列表、B 站视频搜索,以及已知的 AI coding / code review 产品。
|
|
4
|
+
> 这不是法律意义上的 exhaustive prior-art 检索;GitHub 只取了按 star 排序的头部结果,B 站只取了搜索页面前几页。
|
|
5
|
+
|
|
6
|
+
## 0. 结论先说
|
|
7
|
+
|
|
8
|
+
**有直接撞的,而且不止一个。**
|
|
9
|
+
|
|
10
|
+
- **最直接**:[`9087/dsh-diff-approval`](https://github.com/9087/dsh-diff-approval) — 同样是 DSH 插件,做“pending agent edits 的 diff review + per-file/per-block keep & revert + undo/redo + 评论/标注”,已发布 npm,UI 比我们成熟很多。
|
|
11
|
+
- **同一生态里还有一批“AI reviewer / advisor”插件**:答案评分、独立 reviewer、advisor 二次意见、持久 PMO reviewer、把 DSH 暴露给外部 agent 做 review 等。
|
|
12
|
+
- **B 站**没有找到直接讲我们这个 DSH 插件的视频,但“如何审核 AI 写的代码”“Claude Code 子 Agent 审查”“Cursor 回退”这些主题已经是热门内容(最高 15 万播放)。
|
|
13
|
+
- **我们完整的一套组合**(native write/edit 前置 gate + 多轮 withdraw + 非阻塞人类 review waiter + passkey Web 端 + 外部 AI 对抗式 cross-review)**没有找到完全相同的产品**,但每一块都有 prior art。
|
|
14
|
+
|
|
15
|
+
**建议:不要再以“AI code review / diff approval”作为主卖点**。`dsh-diff-approval` 已经在局部做得比我们完整;我们的差异化应放在 **gate + withdraw + 非阻塞 waiter + 远程/跨 AI review**。
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 1. 直接相关:DSH 插件
|
|
20
|
+
|
|
21
|
+
### 1.1 `dsh-diff-approval`(最接近)
|
|
22
|
+
|
|
23
|
+
- 仓库:<https://github.com/9087/dsh-diff-approval>
|
|
24
|
+
- npm:<https://www.npmjs.com/package/dsh-diff-approval>
|
|
25
|
+
- 数据:16 stars / 3 forks;TypeScript;创建 2026-08-16;最后 push 2026-11-12。
|
|
26
|
+
- 它的定位:
|
|
27
|
+
|
|
28
|
+
> Make every agent edit approvable in DeepSeek Harness: full-diff review, per-file / per-block keep & revert, undo/redo.
|
|
29
|
+
|
|
30
|
+
它的 README 列出的能力(节选):
|
|
31
|
+
|
|
32
|
+
- 自动跟踪成功的 `edit` / `write` / editor mutation,折叠成 sidebar 里的 pending 列表;
|
|
33
|
+
- per-file / per-block **Keep / Revert**,支持拖选行范围后 Keep/Revert;
|
|
34
|
+
- **Undo / Redo**(keep/revert/import/comment 都可 undo);
|
|
35
|
+
- **Comments & annotations**:选中行写评论,评论卡锚定在行下方;agent 可以主动 annotate;
|
|
36
|
+
- 行引用 `(file:line)`、split view、Markdown 预览、VCS 导入、持久化、虚拟滚动等;
|
|
37
|
+
- 可 dock 成右侧 tab 或 floating panel。
|
|
38
|
+
|
|
39
|
+
**和我们重叠的部分:**
|
|
40
|
+
|
|
41
|
+
| 能力 | 我们 | dsh-diff-approval |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| Pending review 列表 / diff UI | ✓(较简) | ✓✓(成熟很多) |
|
|
44
|
+
| Per-file approve/reject | ✓ | ✓ keep/revert |
|
|
45
|
+
| 行级选择 / 行引用 | 规划中 | ✓ |
|
|
46
|
+
| AI 注释/解释 | ✓ 自动 notes | ✓ agent 可 annotate;评论 |
|
|
47
|
+
| Undo / redo | ✓ 多轮 withdraw(更强) | ✓ 单次操作 undo |
|
|
48
|
+
| 持久化 | ✓ snapshot/state | ✓ pending state |
|
|
49
|
+
|
|
50
|
+
**它没有(至少 README 没体现)的:**
|
|
51
|
+
|
|
52
|
+
- **Pre-write gate**:它是“成功写入后再 review”;我们是在 native `write/edit` 执行前拦截并排队。这是一个真正的语义差异。
|
|
53
|
+
- **多轮 workspace withdraw**:它是单次操作 undo/redo;我们是多轮 shadow-git 快照、回退整个工作区。
|
|
54
|
+
- **非阻塞的人类 review waiter**:它是写完后 review,不涉及等待人类;我们是 review 期间主 agent 可以继续/结束。
|
|
55
|
+
- **独立 Web + passkey 配对**:没有。
|
|
56
|
+
- **外部 AI 对抗式 cross-review API**:没有。
|
|
57
|
+
- **多轮 AI 二次提交**:它是 per-block keep/revert,不是 AI 在 review 未结束时重新提交并淡化上一轮。
|
|
58
|
+
|
|
59
|
+
**判断:在“diff review UI + per-file keep/revert + AI 注释”这一层,它是直接竞品,而且比我们成熟。** 我们的优势必须来自它没有的 gate / withdraw / waiter / web / cross-review。
|
|
60
|
+
|
|
61
|
+
### 1.2 其他 DSH reviewer / advisor 插件
|
|
62
|
+
|
|
63
|
+
来自 [`awesome-dsh-plugin`](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) 列表(这些都是真实存在的 DSH 插件):
|
|
64
|
+
|
|
65
|
+
| 插件 | 做什么 | 和我们的关系 |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| [`bycall/dsh-answer-reviewer`](https://github.com/bycall/dsh-answer-reviewer) | 每个最终 assistant turn 由独立 LLM 重新审查,1–100 打分;低于阈值把 agent 拉回修改 | 直接对应我们“AI 改动预审查 + 评分”的未来想法 |
|
|
68
|
+
| [`CAI-MH/dsh-quality-review`](https://github.com/CAI-MH/dsh-quality-review) | 每个 turn 后独立 reviewer 审查,最多 2 轮,SOP 规则注入 | 答案质量 review |
|
|
69
|
+
| [`ccll/dsh-advisor-flow`](https://github.com/ccll/dsh-advisor-flow) | executor / advisor:关键时刻 ask_advisor;拦截重复工具调用做 advisor review,proceed/revise/blocked | 对抗式二次意见的 prior art |
|
|
70
|
+
| [`suifei/dsh-pmo-button`](https://github.com/suifei/dsh-pmo-button) | 给 session 加一个**持久 PMO reviewer 子 agent**,每轮审查,STATUS: CONTINUE/DONE/NEED_HUMAN | 持久 reviewer 子 agent 的 prior art |
|
|
71
|
+
| [`qian-dsh/dsh-as-mcp-server`](https://github.com/qian-dsh/dsh-as-mcp-server) | 把 DSH 暴露成 MCP server,让另一个 agent 实时看工具调用/写文件、拿 floor lock 拒绝 DSH 写工具、delegate reviews | 外部 AI review / 跨 agent 的 prior art |
|
|
72
|
+
| [`WDahah/portable-dsh-multi-agent-plugin`](https://github.com/WDahah/portable-dsh-multi-agent-plugin) | 任务给一个模型、review 给另一个模型;合格证据、故障转移、journal | 任务/审查分离、跨模型 review |
|
|
73
|
+
| [`hongcha-dsh/dsh-dev-plan-presets`](https://github.com/hongcha-dsh/dsh-dev-plan-presets) | 主模型只 plan/dispatch/review;recon/review/scribe/develop 子 agent | 子 agent review 的 prior art |
|
|
74
|
+
| [`LittleAlety/dsh-team-conductor`](https://github.com/LittleAlety/dsh-team-conductor) | Agent Teams;任务完成要等 Lead review | 团队内 review |
|
|
75
|
+
| [`2002XiaoYu/dsh-session-diff`](https://github.com/2002XiaoYu/dsh-session-diff) | 会话级 diff 视图,右侧 sidebar,+/− 计数、changes only/whole file | review UI 的 prior art |
|
|
76
|
+
|
|
77
|
+
**判断:DSH 生态里“review / advisor / 评分 / 多 agent 交叉审查”已经很拥挤。** 我们的非阻塞 waiter 在“人类 review”这个点上仍有差异,但“持久 reviewer 子 agent”不是全新概念(`dsh-pmo-button`)。
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## 2. 非 DSH 的相邻 prior art
|
|
82
|
+
|
|
83
|
+
### 2.1 Human-in-the-loop coding agents
|
|
84
|
+
|
|
85
|
+
- [Cline](https://github.com/cline/cline):每个 edit 的 diff approve/reject;checkpoints/rewind。
|
|
86
|
+
- [Roo Code](https://github.com/RooCodeInc/Roo-Code):类似,模式化 agent;checkpoints。
|
|
87
|
+
- [Cursor](https://cursor.com):review changes、accept/reject、checkpoints;闭源。
|
|
88
|
+
- [Claude Code](https://www.anthropic.com/claude-code):permission prompts、plan mode、checkpoints/rewind;闭源。
|
|
89
|
+
- [Aider](https://github.com/Aider-AI/aider):git diff、/undo;CLI。
|
|
90
|
+
- [OpenHands](https://github.com/All-Hands-AI/OpenHands):Web workspace、agent 运行、diff review;开源。
|
|
91
|
+
- [Continue](https://github.com/continuedev/continue):IDE 内 agent/chat/edit。
|
|
92
|
+
|
|
93
|
+
这些产品已经把“AI 改代码 → 人看 diff → approve/reject”变成标准交互。**我们的 review gate 不是新交互**,只是把它搬进 DSH 并做成统一队列 + Finish。
|
|
94
|
+
|
|
95
|
+
### 2.2 AI PR review
|
|
96
|
+
|
|
97
|
+
- [CodeRabbit](https://www.coderabbit.ai):PR 行级 review、建议、摘要。
|
|
98
|
+
- [Qodo Merge / PR-Agent](https://github.com/qodo-ai/pr-agent):开源 PR review、行级 comment、建议。
|
|
99
|
+
- [Graphite Diamond](https://graphite.dev):PR review + AI。
|
|
100
|
+
- GitHub Copilot code review:行级 comments。
|
|
101
|
+
- [`villesau/ai-codereviewer`](https://github.com/villesau/ai-codereviewer)、`codereview.gpt`、`open-code-review`(阿里)等。
|
|
102
|
+
|
|
103
|
+
这些把“AI 逐行解释/建议”做成主流。**我们的紫色 AI 说明行不是新概念**,只是把它嵌入“agent edit queue”而不是 PR。
|
|
104
|
+
|
|
105
|
+
### 2.3 Rewind / checkpoint
|
|
106
|
+
|
|
107
|
+
- Cursor / Cline checkpoints。
|
|
108
|
+
- [`arpagon/pi-rewind`](https://github.com/arpagon/pi-rewind):per-turn checkpoint、/rewind、diff preview。
|
|
109
|
+
- [`Buzburg/agent-rewind`](https://github.com/Buzburg/agent-rewind):local checkpoints、readable diffs、validated recovery。
|
|
110
|
+
- [`Simon-rss/undokey`](https://github.com/Simon-rss/undokey):通用 undo key,filesystem checkpoints。
|
|
111
|
+
- `opencode-rewind`、`stepback` 等。
|
|
112
|
+
|
|
113
|
+
**多轮 withdraw / workspace rewind 也不是我们独有**;我们的差异是“按 turn 的 shadow-git 快照 + 多轮 rewind + pre-withdraw backup”。
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## 3. B 站
|
|
118
|
+
|
|
119
|
+
搜索关键词:`AI 代码 审查`、`Cursor 代码 确认` 等;结果(播放量/作者/标题):
|
|
120
|
+
|
|
121
|
+
| 播放 | 视频 | 相关性 |
|
|
122
|
+
|---|---|---|
|
|
123
|
+
| 150,070 | [如何审核 AI 写的代码?从写代码到上线,一套保证产品质量的全流程](https://www.bilibili.com/video/BV1PznU6YEZE) | 直接说明“审核 AI 代码”是热门话题 |
|
|
124
|
+
| 553 | [Claude Code 代码审查流程实践:提交前钩子、子 Agent 审查与 PR 风险分级](https://www.bilibili.com/video/BV1M3sM6NEs9) | **和我们的“子 agent 等待/审查”最接近的 workflow 内容** |
|
|
125
|
+
| 7,297 | [Claude Code 官方团队怎么审查代码?](https://www.bilibili.com/video/BV1XZx36pEUG) | 官方 review 流程 |
|
|
126
|
+
| 690 | [open-code-review:阿里开源 AI 代码审查神器](https://www.bilibili.com/video/BV1W9sL6UEsA) | 开源 AI PR review |
|
|
127
|
+
| 11,546 | [Cursor 怎么回退代码,防止改错改乱](https://www.bilibili.com/video/BV1TtwCehEzG) | withdraw/rewind 的 prior art |
|
|
128
|
+
| 567 | [国庆不带电脑,也能用手机盯着 Cursor 干活](https://www.bilibili.com/video/BV1HFaz6bEj3) | 远程/手机 review 的相邻需求 |
|
|
129
|
+
|
|
130
|
+
**B 站没有找到直接介绍 DSH 插件的视频**(DSH 生态相对小众),但“审核 AI 代码”已经是 15 万播放级别的主题,说明需求真实存在。
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 4. 能力重叠矩阵
|
|
135
|
+
|
|
136
|
+
| 能力 | 我们 | dsh-diff-approval | answer-reviewer | advisor-flow | pmo-button | as-mcp-server | Cline/Cursor | CodeRabbit/Qodo | B 站 workflow |
|
|
137
|
+
|---|---|---|---|---|---|---|---|---|---|
|
|
138
|
+
| Diff review UI | ✓ | ✓✓ | — | — | — | — | ✓ | ✓ | 教程 |
|
|
139
|
+
| Per-file decisions | ✓ | ✓ | — | — | — | — | ✓ | ✓ | — |
|
|
140
|
+
| AI 行级注释 | ✓ 自动 notes | ✓ agent annotate | — | — | — | — | 部分 | ✓ | — |
|
|
141
|
+
| **Pre-write gate(拦 native write/edit)** | **✓** | —(写后 review) | — | 拦截工具调用 | — | floor lock | 权限提示 | — | hooks |
|
|
142
|
+
| **多轮 workspace withdraw** | **✓** | 单次 undo | — | — | — | — | checkpoints | — | Cursor 回退 |
|
|
143
|
+
| **非阻塞人类 review waiter** | **✓** | — | — | — | — | — | — | — | 子 agent 审查 |
|
|
144
|
+
| 持久 reviewer 子 agent | ✓(人类 review) | — | ✓(AI review) | ✓ | ✓(PMO) | — | — | — | Claude 子 agent |
|
|
145
|
+
| 独立 Web + passkey | 规划中 | — | — | — | — | — | Cursor 手机 | Web/GitHub | — |
|
|
146
|
+
| 多轮 AI 修改/淡化 | 规划中 | per-block | — | — | — | — | — | 部分 | — |
|
|
147
|
+
| 外部 AI 对抗式 API | 规划中 | — | — | advisor | — | ✓ 外部 agent | — | — | — |
|
|
148
|
+
|
|
149
|
+
> ✓✓ = 明显更强;— = 未体现或没有。
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## 5. 真正还有差异的部分
|
|
154
|
+
|
|
155
|
+
1. **Pre-write gate**:我们拦的是 native `write/edit/apply_patch`,在写入前排队;`dsh-diff-approval` 是写后 review。前者更“强制流程”,后者更“事后可撤销”。这是产品哲学差异,不一定是优势;要验证用户是否喜欢被 gate。
|
|
156
|
+
2. **多轮 workspace withdraw**:按 turn 的 shadow-git 快照 + 多轮回退 + pre-withdraw backup;比单次 undo 更接近“时间机器”。
|
|
157
|
+
3. **非阻塞人类 review waiter**:主 agent 起一个持久 waiter 子 agent,主 agent 继续聊天/结束;完成后唤醒。这个组合在 DSH 里没找到同样的实现(`pmo-button` 是 AI 评审,不是人类 review)。
|
|
158
|
+
4. **独立 Web + passkey 配对 + 常驻 standby**:没找到完全一样的;`OpenHands`/`bottleneck` 有 Web review,但不是 passkey 配对。
|
|
159
|
+
5. **外部 AI 对抗式 cross-review API**:`dsh-as-mcp-server` / `portable-dsh-multi-agent-plugin` 是相邻能力,但“review-scoped token + participants/verdicts/proposals”这套接口没有现成产品。
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## 6. 建议
|
|
164
|
+
|
|
165
|
+
1. **不要宣称“首个 / 唯一”**。`dsh-diff-approval` 在“review pending edits + per-file keep/revert + 注释”上已经是直接竞品,而且 UI 比我们成熟。
|
|
166
|
+
2. **不要把 P1 Web 端做成“又一个 diff review 面板”**。那会正面撞 `dsh-diff-approval`(本地)和 CodeRabbit/Qodo(PR)。
|
|
167
|
+
3. **把 P1 Web 端定位成“远程/常驻的 AI 变更 gate”**:
|
|
168
|
+
- passkey 配对 + standby;
|
|
169
|
+
- 行级 AI comment subagent(B);
|
|
170
|
+
- 多轮 AI 修改/淡化;
|
|
171
|
+
- 对抗式 cross-review API;
|
|
172
|
+
- 与 DSH 的 gate/withdraw 绑定。
|
|
173
|
+
4. **我们的身份**:不是“AI code review 工具”,而是 **“DSH 的变更 gate + 工作区时间机器 + 非阻塞人类 review 交接”**。
|
|
174
|
+
5. **不急着改代码**。先把 README 的 positioning 改掉,避免和 `dsh-diff-approval` 正面比较;把“gate / withdraw / waiter / cross-review”作为主叙事。
|
|
175
|
+
6. **市场仍然早**:`dsh-diff-approval` 16 stars,DSH 插件生态刚起;不是赢家通吃。B 站 15 万播放说明需求在,但用户要的是“怎么审核”,不是“又一个 diff 工具”。
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## 7. 来源
|
|
180
|
+
|
|
181
|
+
- dsh-diff-approval:<https://github.com/9087/dsh-diff-approval> · <https://www.npmjs.com/package/dsh-diff-approval>
|
|
182
|
+
- awesome-dsh-plugin:<https://github.com/awesome-dsh-plugin/awesome-dsh-plugin>
|
|
183
|
+
- dsh-answer-reviewer:<https://github.com/bycall/dsh-answer-reviewer>
|
|
184
|
+
- dsh-quality-review:<https://github.com/CAI-MH/dsh-quality-review>
|
|
185
|
+
- dsh-advisor-flow:<https://github.com/ccll/dsh-advisor-flow>
|
|
186
|
+
- dsh-pmo-button:<https://github.com/suifei/dsh-pmo-button>
|
|
187
|
+
- dsh-as-mcp-server:<https://github.com/qian-dsh/dsh-as-mcp-server>
|
|
188
|
+
- portable-dsh-multi-agent-plugin:<https://github.com/WDahah/portable-dsh-multi-agent-plugin>
|
|
189
|
+
- dsh-session-diff:<https://github.com/2002XiaoYu/dsh-session-diff>
|
|
190
|
+
- Cline:<https://github.com/cline/cline> · Roo Code:<https://github.com/RooCodeInc/Roo-Code> · Aider:<https://github.com/Aider-AI/aider> · OpenHands:<https://github.com/All-Hands-AI/OpenHands> · Continue:<https://github.com/continuedev/continue>
|
|
191
|
+
- PR-Agent/Qodo:<https://github.com/qodo-ai/pr-agent> · CodeRabbit:<https://www.coderabbit.ai> · Graphite:<https://graphite.dev>
|
|
192
|
+
- ai-codereviewer:<https://github.com/villesau/ai-codereviewer>
|
|
193
|
+
- pi-rewind:<https://github.com/arpagon/pi-rewind> · agent-rewind:<https://github.com/Buzburg/agent-rewind> · undokey:<https://github.com/Simon-rss/undokey>
|
|
194
|
+
- B 站:<https://www.bilibili.com/video/BV1PznU6YEZE> · <https://www.bilibili.com/video/BV1M3sM6NEs9> · <https://www.bilibili.com/video/BV1XZx36pEUG> · <https://www.bilibili.com/video/BV1W9sL6UEsA> · <https://www.bilibili.com/video/BV1TtwCehEzG> · <https://www.bilibili.com/video/BV1HFaz6bEj3>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Review UI — GitHub native
|
|
2
|
+
|
|
3
|
+
The chosen direction is **GitHub native only**. No alternate themes or
|
|
4
|
+
directions are offered.
|
|
5
|
+
|
|
6
|
+
Open [`index.html`](index.html) to try the interaction.
|
|
7
|
+
|
|
8
|
+
## AI explanation row
|
|
9
|
+
|
|
10
|
+
The AI explanation is no longer a card. It is a **normal diff row**:
|
|
11
|
+
|
|
12
|
+
- same grid and line height as the code rows;
|
|
13
|
+
- a subtle violet → fuchsia → cyan gradient tint;
|
|
14
|
+
- a 2px violet edge and `AI` in the sign column (no badge inside the text);
|
|
15
|
+
- one line of text with ellipsis; hover the row to read the full explanation;
|
|
16
|
+
- no margin, border radius, shadow or card chrome.
|
|
17
|
+
|
|
18
|
+
This keeps the code rhythm intact and makes the explanation feel like a
|
|
19
|
+
annotation line rather than a block that interrupts the diff.
|
|
20
|
+
|
|
21
|
+
## What to try
|
|
22
|
+
|
|
23
|
+
- Switch files in the left rail.
|
|
24
|
+
- Click or drag line numbers to select a range; use **Explain**,
|
|
25
|
+
**Suggest change**, **Ask AI**, **Clear**.
|
|
26
|
+
- Toggle **Dim previous round**: round-1 additions fade; a previous-round line
|
|
27
|
+
removed in round 2 stays red at current intensity.
|
|
28
|
+
- Approve / reject a file and **Finish review**.
|
|
29
|
+
- Ask the AI reviewer about a selection in the right rail.
|
|
30
|
+
|
|
31
|
+
## Why this direction
|
|
32
|
+
|
|
33
|
+
- familiar GitHub grammar, dense and low-risk;
|
|
34
|
+
- the AI explanation is visible without taking over the diff;
|
|
35
|
+
- closest to the existing DSH review tab and the fastest to ship.
|