@stardustlc/dsh-review 0.4.6 → 0.4.8

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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # 变更记录
2
2
 
3
+ ## 0.4.8 (2026-10-30)
4
+
5
+ - 重整中英文首页:用途、三步流程图、安装入口与操作示例;详细配置与边界集中到完整说明。
6
+ - 保留下载统计、独立更新选择、问题反馈和贡献入口;原封面与运行功能保留。
7
+ - Refresh bilingual landing pages, workflow artwork, quick starts and reference navigation.
8
+
9
+
10
+ ## 0.4.7 (2026-10-30)
11
+
12
+ - 原生插件列表与详情新增专门生成的鲸鱼娘图标:大头像、独立功能符号、透明留白,适合 30 / 36 px 显示;原封面保留。
13
+ - Add purpose-made whale-girl artwork with a distinct function emblem, transparent padding and small-size readability; preserve the original cover.
14
+
15
+
3
16
  ## 0.4.6 (2026-10-29)
4
17
 
5
18
  - 补齐中英文使用流程:准备、入口、具体操作与结果核对;新增累计 npm 下载徽章并保留月统计。
package/README.en.md CHANGED
@@ -1,65 +1,68 @@
1
- # dsh-review
1
+ [简体中文](README.md) · **English**
2
2
 
3
- [中文](README.md)
3
+ # Review
4
4
 
5
- [![npm](https://img.shields.io/npm/v/@stardustlc/dsh-review)](https://www.npmjs.com/package/@stardustlc/dsh-review) [![downloads](https://raw.githubusercontent.com/STARDUSTLC666/dsh-suite/npm-downloads/assets/dsh-review-downloads.svg)](https://www.npmjs.com/package/@stardustlc/dsh-review) [![total downloads](https://raw.githubusercontent.com/STARDUSTLC666/dsh-suite/npm-downloads/assets/dsh-review-total-downloads.svg)](https://www.npmjs.com/package/@stardustlc/dsh-review)
6
-
7
- [Download statistics](https://github.com/STARDUSTLC666/dsh-suite/blob/npm-downloads/README.md)
5
+ **Review code with evidence and fixes you can recheck.**
8
6
 
9
- Review Git changes with independent defect discovery, cross-checked source evidence, fix tracking and an explicit review gate. Keeps unfinished work and human decisions visible, with quick, standard and deep modes. Inspired by [the Claude Code team's workflow](https://claude.dev/blog/solving-code-review-at-anthropic/).
7
+ [![npm](https://img.shields.io/npm/v/@stardustlc/dsh-review)](https://www.npmjs.com/package/@stardustlc/dsh-review) [![downloads](https://raw.githubusercontent.com/STARDUSTLC666/dsh-suite/npm-downloads/assets/dsh-review-downloads.svg)](https://www.npmjs.com/package/@stardustlc/dsh-review) [![total downloads](https://raw.githubusercontent.com/STARDUSTLC666/dsh-suite/npm-downloads/assets/dsh-review-total-downloads.svg)](https://www.npmjs.com/package/@stardustlc/dsh-review)
10
8
 
11
- Feedback and contributions are welcome: report [issues](https://github.com/STARDUSTLC666/dsh-review/issues) or submit [pull requests](https://github.com/STARDUSTLC666/dsh-review/pulls).
9
+ **[Install](#install) · [Workflow](#start-using-it) · [Full guide](https://github.com/STARDUSTLC666/dsh-review/blob/main/docs/REFERENCE.en.md)**
12
10
 
13
- Requires Git, Node.js 22.19+ or 24+, and the official DSH services for tools, subagents, permission presets and jobs. Requires DSH 0.2.1-rc.3 or newer; [this validation round](docs/validation-0.4.4.md) uses official 0.2.1-rc.4. Start the conversation at the Git repository root.
11
+ <picture>
12
+ <source media="(prefers-color-scheme: dark) and (max-width: 640px)" srcset="https://raw.githubusercontent.com/STARDUSTLC666/dsh-review/main/docs/assets/intro/workflow-en-mobile-dark.svg">
13
+ <source media="(max-width: 640px)" srcset="https://raw.githubusercontent.com/STARDUSTLC666/dsh-review/main/docs/assets/intro/workflow-en-mobile-light.svg">
14
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/STARDUSTLC666/dsh-review/main/docs/assets/intro/workflow-en-dark.svg">
15
+ <img src="https://raw.githubusercontent.com/STARDUSTLC666/dsh-review/main/docs/assets/intro/workflow-en-light.svg" alt="Review code with evidence and fixes you can recheck. · workflow illustration" width="100%">
16
+ </picture>
14
17
 
15
- ```bash
16
- dsh plugin --profile web add @stardustlc/dsh-review
17
- ```
18
+ ## Features
18
19
 
19
- For Desktop, install into the profile Desktop actually uses, then start a new conversation. No credentials are copied or modified.
20
+ - Choose scope and depth for a working tree, staged diff or Git base.
21
+ - Inspect triggers, source locations and independent verification.
22
+ - Track open items and rerun the gate after code changes.
20
23
 
21
- Use the scoped package name. The unscoped npm package `dsh-review` belongs to another author and is unrelated to this repository.
24
+ ## Install
22
25
 
23
- Ask DSH to review your current changes with `review_run`, or provide `base: "main"` for committed changes and `staged: true` for the index. Interrupted runs can resume with their `runId`.
26
+ Open **Plugins** in the DSH desktop app and install `@stardustlc/dsh-review`. If the CLI is available:
24
27
 
25
- | Mode | Fresh-context finders | Independent verification | Synthesis |
26
- |---|---|---|---|
27
- | quick | Correctness and security | One verifier per candidate | Deterministic filtering |
28
- | standard | Correctness, state, compatibility, security | Three voters, two must agree | Deterministic filtering |
29
- | deep | Same four lenses | Three voters, two must agree | Additional arbiter preserving confirmed findings |
28
+ ```bash
29
+ dsh plugin --profile desktop add @stardustlc/dsh-review
30
+ ```
30
31
 
31
- Every mode includes two separate risk classifications. Sensitive changes cannot be downgraded. Forked author context is rejected.
32
+ For the web profile, replace `desktop` with `web`. Restart that DSH profile after installation. The package’s DSH requirement is `>=0.2.1-rc.3`.
32
33
 
33
- Each run is bound to an immutable base, HEAD, source snapshot and nonce. Missing or malformed output, changed code, exhausted budgets and incomplete verification block the AI gate. Evidence must cite actual snapshot source; an asserted command transcript alone is insufficient.
34
+ ## Start using it
34
35
 
35
- Git attribute conversions are isolated so repository clean filters cannot run or hide changes. Effective `info/attributes` rules stop review with an explicit incomplete error. Confirm and remove those rules before retrying; the plugin does not edit Git configuration.
36
+ 1. Install @stardustlc/dsh-review in the profile you use, then start a new session in the target Git repository.
37
+ 2. Choose the working tree, staged changes or a Git base, and the appropriate review depth.
38
+ 3. Ask the assistant to run review_run. Keep its runId and inspect unfinished work with review_status.
39
+ 4. Check each trigger, code location and independent verification; fix the issue or record a reasoned disposition.
40
+ 5. Review changed code again and check review_gate. The AI gate does not replace CI or human approval.
36
41
 
37
- Posted findings require a fix or reasoned disposition. Fixes clear only after independent re-verification. Reviews default to three completed rounds; round three limits new findings to the actual incremental edits while re-checking unresolved findings. New files remain eligible. Binary changes require separate review.
42
+ Example request:
38
43
 
39
- The ten tools are `review_diff`, `review_run`, `review_report`, `review_check`, `review_respond`, `review_status`, `review_gate`, `review_learn`, `review_issue` and `review_eval`. External task submissions cannot prove independent execution and never pass the automatic gate. No tool publishes GitHub feedback or grants a human approval.
44
+ > Review the current Git diff with triggers and source evidence. Do not modify files yet.
40
45
 
41
- Evidence commands go through the live caller's controlled host terminal, including permission and cancellation handling. Read-only sessions refuse command execution. On the official Windows preset, controlled `pwsh` bridges to Git Bash when Bash is not exposed; Git Bash and PowerShell 7.3+ are required. There is no direct process fallback.
46
+ ## Before you start
42
47
 
43
- Default state is `DSH_HOME/plugins/dsh-review/<repository hash>/`. A workspace child directory can be configured explicitly. Corrupt ledgers fail closed; v1 evidence is backed up without inheriting old approvals.
48
+ AI reviews and gates still need real tests, CI and human judgment.
44
49
 
45
- Defaults: three rounds, incremental re-review after round two, 20 findings, two nits, severity floor `important`, 80 worker calls, concurrency three, ten-minute run timeout, two-minute command timeout, 4 MiB snapshot limit and the `spawn` backend. The legacy `evidenceRequired: false` setting cannot disable independent verification.
50
+ Configuration, detailed tools and troubleshooting: [full reference](https://github.com/STARDUSTLC666/dsh-review/blob/main/docs/REFERENCE.en.md).
46
51
 
47
- `dsh-review-gate` can combine the AI result with read-only GitHub evidence: successful required checks, resolved threads and current-commit human approvals. Trusted-author policy is loaded from the PR base commit, never its editable working files. Owners must separately enforce branch protection, CODEOWNERS, merge queues and release controls.
52
+ ## Plugin updates
48
53
 
49
- See [integration, migration and rollback](docs/INTEGRATION.md), [design and boundaries](docs/DESIGN.md), [validation](docs/VALIDATION.md) and [changelog](CHANGELOG.md). Evaluation uses curated defect matches, clean controls and separate coverage reporting; it does not claim production recall from synthetic tests.
54
+ Check updates at the bottom of the workbench or native plugin details. Automatic checks are on by default; **automatic installation is off**. You choose whether to install and when to restart. Suite-managed components update with their bundle. [Update behavior](https://github.com/STARDUSTLC666/dsh-review/blob/main/docs/REFERENCE.en.md).
50
55
 
51
- Issues and PRs are welcome. Include reproducible inputs, versions and expected/actual behavior; redact secrets and private source. MIT License.
56
+ ## Documentation
52
57
 
53
- ## Start using it
58
+ - [Full usage, configuration and limits](https://github.com/STARDUSTLC666/dsh-review/blob/main/docs/REFERENCE.en.md)
59
+ - [Release notes](https://github.com/STARDUSTLC666/dsh-review/blob/main/CHANGELOG.md)
60
+ - [Validation scope and history](https://github.com/STARDUSTLC666/dsh-review/blob/main/docs/VALIDATION.md)
54
61
 
55
- 1. Install @stardustlc/dsh-review in the profile you use, then start a new session in the target Git repository.
56
- 2. Choose the working tree, staged changes or a Git base, and the appropriate review depth.
57
- 3. Ask the assistant to run review_run. Keep its runId and inspect unfinished work with review_status.
58
- 4. Check each trigger, code location and independent verification; fix the issue or record a reasoned disposition.
59
- 5. Review changed code again and check review_gate. The AI gate does not replace CI or human approval.
62
+ ## Feedback and contributions
60
63
 
61
- ## Plugin updates
64
+ If the plugin helps, a Star makes it easier for others to discover. Report problems or suggest improvements in [Issues](https://github.com/STARDUSTLC666/dsh-review/issues); code and documentation [PRs](https://github.com/STARDUSTLC666/dsh-review/pulls) are welcome. Include versions and reproduction steps, and remove credentials from reports.
62
65
 
63
- Requires DSH 0.2.1-rc.3 or newer. Update controls sit at the bottom of the existing workbench, or native plugin details for plugins without a workbench. Checks, release notes and preferences expand in place, with no separate update page or settings menu. Automatic checks are on by default; **automatic installation is off by default**. Only explicit opt-in permits compatible stable patches while idle with no unsaved changes. Preferences are independent, with per-plugin disable, deferral and ignore controls. No forced DSH restart or upgrade, and local-source installations stay unchanged. Suite components explain and operate on the whole Suite in the same footer.
66
+ ## License
64
67
 
65
- Older releases need one manual update in native plugin management to acquire these controls. Publishing to npm does not replace an existing user installation.
68
+ [MIT](https://github.com/STARDUSTLC666/dsh-review/blob/main/LICENSE)
package/README.md CHANGED
@@ -1,14 +1,35 @@
1
- # dsh-review
1
+ **简体中文** · [English](README.en.md)
2
2
 
3
- [English](README.en.md)
3
+ # Review
4
+
5
+ **让代码审阅落到证据和可复查的修复上。**
4
6
 
5
7
  [![npm](https://img.shields.io/npm/v/@stardustlc/dsh-review)](https://www.npmjs.com/package/@stardustlc/dsh-review) [![downloads](https://raw.githubusercontent.com/STARDUSTLC666/dsh-suite/npm-downloads/assets/dsh-review-downloads.svg)](https://www.npmjs.com/package/@stardustlc/dsh-review) [![total downloads](https://raw.githubusercontent.com/STARDUSTLC666/dsh-suite/npm-downloads/assets/dsh-review-total-downloads.svg)](https://www.npmjs.com/package/@stardustlc/dsh-review)
6
8
 
7
- [下载统计说明](https://github.com/STARDUSTLC666/dsh-suite/blob/npm-downloads/README.md)
9
+ **[安装使用](#安装) · [使用流程](#开始使用) · [完整说明](https://github.com/STARDUSTLC666/dsh-review/blob/main/docs/REFERENCE.zh.md)**
10
+
11
+ <picture>
12
+ <source media="(prefers-color-scheme: dark) and (max-width: 640px)" srcset="https://raw.githubusercontent.com/STARDUSTLC666/dsh-review/main/docs/assets/intro/workflow-zh-mobile-dark.svg">
13
+ <source media="(max-width: 640px)" srcset="https://raw.githubusercontent.com/STARDUSTLC666/dsh-review/main/docs/assets/intro/workflow-zh-mobile-light.svg">
14
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/STARDUSTLC666/dsh-review/main/docs/assets/intro/workflow-zh-dark.svg">
15
+ <img src="https://raw.githubusercontent.com/STARDUSTLC666/dsh-review/main/docs/assets/intro/workflow-zh-light.svg" alt="让代码审阅落到证据和可复查的修复上。 · 流程示意" width="100%">
16
+ </picture>
17
+
18
+ ## 功能
19
+
20
+ - 为工作区、暂存改动或 Git 基准选择范围与深度。
21
+ - 核对触发条件、代码位置和独立复核证据。
22
+ - 跟踪未完成项,代码改变后再检查门禁。
8
23
 
9
- 面向 Git 改动的代码审阅插件:独立查找缺陷、交叉复核证据、跟踪修复,并给出明确的审阅门禁。保留未完成项和需人工决定的结论,支持 quick、standard、deep 三种模式。
24
+ ## 安装
10
25
 
11
- 参考 [Claude Code 团队的审阅流程](https://claude.dev/blog/solving-code-review-at-anthropic/),实现其中可在 DSH 内完成的审阅环节。它不授予人工批准,也不会自动发评论或合并代码。
26
+ 在 DSH 桌面版「插件」面板安装 `@stardustlc/dsh-review`。已配置命令行时也可使用:
27
+
28
+ ```bash
29
+ dsh plugin --profile desktop add @stardustlc/dsh-review
30
+ ```
31
+
32
+ 网页版把 `desktop` 改为 `web`;安装后重启对应的 DSH。宿主要求以包声明 `>=0.2.1-rc.3` 为准。
12
33
 
13
34
  ## 开始使用
14
35
 
@@ -18,122 +39,41 @@
18
39
  4. 逐项核对触发条件、代码位置和独立复核证据,修复问题或记录有理由的处置。
19
40
  5. 代码改变后重新审阅并检查 review_gate;AI 门禁不代替 CI 或人工批准。
20
41
 
21
- ## 使用
22
-
23
- 需要 Git、Node.js 22.19+ / 24+,以及提供子智能体、权限预设和作业管理服务的官方 DSH 运行环境。当前最低要求为 DSH 0.2.1-rc.3;[本轮验收](docs/validation-0.4.4.md)使用官方 0.2.1-rc.4。在 Git 仓库根目录创建会话后,让 DSH:
24
-
25
- > 审阅当前改动,运行 dsh-review。只报告有具体触发条件、代码证据和独立复核的问题。审查没完成时不要说通过。
26
-
27
- 安装到 Web profile:
28
-
29
- ~~~bash
30
- dsh plugin --profile web add @stardustlc/dsh-review
31
- ~~~
32
-
33
- 桌面版应安装到它实际使用的 profile,并在新的会话中加载插件。插件不会查找、复制或修改其他 profile 的密钥。
34
-
35
- 请使用带作用域的包名。npm 上未加作用域的 dsh-review 属于其他作者,不是本仓库。
36
-
37
- 常见调用:
38
-
39
- ~~~json
40
- {"tool":"review_run","arguments":{"base":"main"}}
41
- ~~~
42
-
43
- 省略 base 审当前工作区;staged=true 审暂存区。需要中断后续工作时取消正在运行的工具;恢复未完成审查时使用返回的 runId。敏感改动始终使用 deep,不能通过参数降级。
44
-
45
- ## 审阅如何完成
42
+ 可以这样说:
46
43
 
47
- | 模式 | 独立找问题 | 每个问题的复核 | 汇总 |
48
- |---|---|---|---|
49
- | quick | 正确性、安全,2 个任务 | 1 个独立审阅者 | 确定性把关 |
50
- | standard | 正确性、状态、兼容性、安全,4 个任务 | 3 人投票,至少 2 票一致 | 确定性把关 |
51
- | deep | 同 standard | 3 人投票,至少 2 票一致 | 另派汇总者,不能删掉已确认的问题 |
44
+ > 审阅当前 Git 改动,逐项给出触发条件和代码证据,先不要修改文件。
52
45
 
53
- 每轮还有两个独立风险判断任务,分别判断风险等级和是否需要额外人工审阅。所有任务使用新的上下文;继承作者对话的 fork 后端不会被接受。
46
+ ## 开始前要知道
54
47
 
55
- - 每轮绑定 Git 基准、HEAD、完整文件快照和唯一运行编号。代码变化、结果缺失、格式损坏或超限都会阻止放行。
56
- - 读取原始 Git 改动时隔离属性转换,不执行仓库的 clean 过滤器。`info/attributes` 含有效规则时提示审查未完成;请先确认并移除规则后重试,插件不会代改仓库配置。
57
- - 复核必须说明具体成因并引用快照中的真实代码行。一个非空 evidence 字符串不算验证。
58
- - 风格、命名、格式和清理建议直接过滤。已发表问题按指纹去重;每条仍须修复或写明处置原因。
59
- - 默认最多 3 轮。从第 3 轮起,新问题限定在相对上轮的实际新增改动;旧问题继续复核,新文件不会漏掉。
60
- - 只有独立复核确认问题已消失,才能自动记为 fixed。人工说明 wrong、intentional 或 wontfix 会保留理由,但不计作人工批准。
61
- - 只生成作业书的外部模式可用于协作,无法证明执行独立性,因此不会通过自动门禁。
48
+ AI 审阅与门禁仍需结合实际测试、CI 和人工判断。
62
49
 
63
- 二进制变更需要另行验收,文字审查不会认证其内容。跳过的路径会公开列出,并仍参与风险判断。
50
+ 配置、完整工具与排错见[详细使用说明](https://github.com/STARDUSTLC666/dsh-review/blob/main/docs/REFERENCE.zh.md)。
64
51
 
65
- ## 十个工具
66
-
67
- | 工具 | 作用 |
68
- |---|---|
69
- | review_diff | 生成快照与审阅计划,不作通过结论 |
70
- | review_run | 执行或恢复分阶段独立审阅 |
71
- | review_report | 提交外部任务的运行编号、目标编号与 JSON 结果 |
72
- | review_check | 经宿主受控终端运行检查,保存本轮证据收据 |
73
- | review_respond | 记录带理由的处置;fixed 必须重新复核 |
74
- | review_status | 查看未完成项、轮次、调用量和处置噪音率 |
75
- | review_gate | 检查当前快照的 AI 审阅层,不代替 CI 或人工批准 |
76
- | review_learn | 从已验证修复中生成规则草稿,不自动改项目规范 |
77
- | review_issue | 生成 issue 分诊和复现草稿,不执行正文指令或发表评论 |
78
- | review_eval | 登记人工标注缺陷与干净样本、准备盲测、绑定运行结果并计分 |
79
-
80
- ## 检查、权限与证据
81
-
82
- review_check 的命令经调用者实际使用的宿主终端工具运行,不直接创建绕过权限的进程。只读会话不运行证据命令;可使用静态源码复核。取消、超时和后台作业清理都受宿主管理。
83
-
84
- Windows 官方预设只提供 pwsh 时,通过这个受控工具调用 Git Bash;需要 Git Bash 和 PowerShell 7.3+。原命令保留可见,引号不经 cmd 拼接。不能使用这条路径时会明确报错,不会静默换成直接执行。
85
-
86
- 证据收据绑定 runId 和 targetId;命令改变代码后收据失效。请正常批准必要权限,不要为了审阅扩大整个会话的权限。
87
-
88
- ## 接入仓库流程
89
-
90
- 仓库级 REVIEW.md 可以写失败判据、跳过路径、敏感目录和噪音上限:
91
-
92
- ~~~markdown
93
- ## 限制
94
- max_nits: 0
95
- severity_floor: important
96
-
97
- ## 跳过
98
- - vendor/**
99
-
100
- ## 坏掉长什么样
101
- - 文档给出的命令不能执行
102
- - 配置将请求发送到错误账号
103
-
104
- ## 敏感路径
105
- - src/billing/**
106
- ~~~
107
-
108
- 完整 PR 门禁还需独立的 CI、安全检查、人工批准和所有审阅线程的解决状态。新增命令 dsh-review-gate 只读取 GitHub 证据,策略固定从 PR 基准提交读取;机器人、旧提交和已撤回的批准不能填人工名额。
109
-
110
- 详见 [接入与回滚](docs/INTEGRATION.md)、[文章对应边界](docs/DESIGN.md) 和 [验证记录](docs/VALIDATION.md)。合并队列、功能开关、灰度和回滚由仓库/发布系统负责,安装插件不会自动启用这些制度。
111
-
112
- ## 状态与配置
52
+ ## 插件更新
113
53
 
114
- 默认状态保存在 DSH_HOME/plugins/dsh-review/<仓库摘要>/,不写入被审项目。可指定仓库内子目录,例如 .dsh-review。账本版本为 2;旧账本会保留备份,旧版本的“通过”不会沿用。
54
+ 在工作台或原生插件详情页底部检查更新。默认自动检查,**默认不自动安装**;是否安装、何时重启由你决定。Suite 管理的组件随整包更新。[查看更新规则](https://github.com/STARDUSTLC666/dsh-review/blob/main/docs/REFERENCE.zh.md)。
115
55
 
116
- | 配置 | 默认 | 含义 |
117
- |---|---|---|
118
- | stateDir | @profile | profile 下按仓库隔离;也可指定仓库内子目录 |
119
- | roundCap | 3 | 每个审阅系列的完成轮次上限 |
120
- | diffOnlyAfterRound | 2 | 超过这轮后只对新增改动提出新问题 |
121
- | maxFindings / maxNits | 20 / 2 | 问题数与 nit 上限 |
122
- | severityFloor | important | 默认不发表 nit |
123
- | maxCalls / maxParallel | 80 / 3 | 每轮实际派发预算、最大并发 |
124
- | runTimeoutMs | 600000 | 每次执行的总超时 |
125
- | commandTimeoutMs | 120000 | 单条证据命令超时 |
126
- | maxDiffBytes | 4194304 | 补丁及源码快照总量上限;超出则未完成 |
127
- | subagentProvider | spawn | 必须明确保证不继承作者上下文 |
56
+ ## 文档
128
57
 
129
- evidenceRequired 为旧配置兼容项,设为 false 也不能关闭独立证据验证。v0.2 的手工 head/findings 提交接口已停用,迁移见接入文档。
58
+ - [详细使用、配置与边界](https://github.com/STARDUSTLC666/dsh-review/blob/main/docs/REFERENCE.zh.md)
59
+ - [更新记录](https://github.com/STARDUSTLC666/dsh-review/blob/main/CHANGELOG.md)
60
+ - [验证范围与历史](https://github.com/STARDUSTLC666/dsh-review/blob/main/docs/VALIDATION.md)
130
61
 
131
- 欢迎提交 [Issues](https://github.com/STARDUSTLC666/dsh-review/issues) 和 PR,最好附具体触发输入、版本、预期结果与实际结果。请先去掉密钥和私有代码。
62
+ ## 反馈与贡献
132
63
 
133
- [更新记录](CHANGELOG.md) · MIT License
64
+ 如果插件帮到了你,欢迎 Star,让更多人发现它。问题和建议请提交 [Issues](https://github.com/STARDUSTLC666/dsh-review/issues),也欢迎代码与文档 [PR](https://github.com/STARDUSTLC666/dsh-review/pulls)。反馈时附上版本与复现步骤,并移除凭据。
134
65
 
135
- ## 插件更新
66
+ ## License
136
67
 
137
- 需要 DSH 0.2.1-rc.3 或更新版本。更新控件直接位于原有工作台内容末尾;没有工作台的插件,位于原生插件详情页底部。检查、更新记录和偏好在原地展开,不增加独立更新页面或设置菜单。自动检查默认开启;**自动安装默认关闭**,明确授权后才会在空闲且没有未保存修改时安装兼容的稳定补丁。开关按插件独立保存,可关闭、推迟或忽略提醒;不会强制重启 DSH、升级 DSH 本体或替换本地源码安装。Suite 组件在当前页面底部明确说明并操作 Suite 整包更新。
68
+ [MIT](https://github.com/STARDUSTLC666/dsh-review/blob/main/LICENSE)
138
69
 
139
- 旧版用户先在官方插件管理中手动更新一次,之后才会获得此入口。发布到 npm 不会直接替换用户已经安装的版本。
70
+ <a id="使用"></a>
71
+ <a id="审阅如何完成"></a>
72
+ <a id="十个工具"></a>
73
+ <a id="检查权限与证据"></a>
74
+ <a id="接入仓库流程"></a>
75
+ <a id="限制"></a>
76
+ <a id="跳过"></a>
77
+ <a id="坏掉长什么样"></a>
78
+ <a id="敏感路径"></a>
79
+ <a id="状态与配置"></a>
Binary file
@@ -0,0 +1,67 @@
1
+ > Full usage reference. The landing page focuses on outcomes, installation and workflows; detailed parameters, limits, update rules and historical validation links remain here.
2
+
3
+ # dsh-review
4
+
5
+ [中文](../README.md)
6
+
7
+ [![npm](https://img.shields.io/npm/v/@stardustlc/dsh-review)](https://www.npmjs.com/package/@stardustlc/dsh-review) [![downloads](https://raw.githubusercontent.com/STARDUSTLC666/dsh-suite/npm-downloads/assets/dsh-review-downloads.svg)](https://www.npmjs.com/package/@stardustlc/dsh-review) [![total downloads](https://raw.githubusercontent.com/STARDUSTLC666/dsh-suite/npm-downloads/assets/dsh-review-total-downloads.svg)](https://www.npmjs.com/package/@stardustlc/dsh-review)
8
+
9
+ [Download statistics](https://github.com/STARDUSTLC666/dsh-suite/blob/npm-downloads/README.md)
10
+
11
+ Review Git changes with independent defect discovery, cross-checked source evidence, fix tracking and an explicit review gate. Keeps unfinished work and human decisions visible, with quick, standard and deep modes. Inspired by [the Claude Code team's workflow](https://claude.dev/blog/solving-code-review-at-anthropic/).
12
+
13
+ Feedback and contributions are welcome: report [issues](https://github.com/STARDUSTLC666/dsh-review/issues) or submit [pull requests](https://github.com/STARDUSTLC666/dsh-review/pulls).
14
+
15
+ Requires Git, Node.js 22.19+ or 24+, and the official DSH services for tools, subagents, permission presets and jobs. Requires DSH 0.2.1-rc.3 or newer; [this validation round](validation-0.4.4.md) uses official 0.2.1-rc.4. Start the conversation at the Git repository root.
16
+
17
+ ```bash
18
+ dsh plugin --profile web add @stardustlc/dsh-review
19
+ ```
20
+
21
+ For Desktop, install into the profile Desktop actually uses, then start a new conversation. No credentials are copied or modified.
22
+
23
+ Use the scoped package name. The unscoped npm package `dsh-review` belongs to another author and is unrelated to this repository.
24
+
25
+ Ask DSH to review your current changes with `review_run`, or provide `base: "main"` for committed changes and `staged: true` for the index. Interrupted runs can resume with their `runId`.
26
+
27
+ | Mode | Fresh-context finders | Independent verification | Synthesis |
28
+ |---|---|---|---|
29
+ | quick | Correctness and security | One verifier per candidate | Deterministic filtering |
30
+ | standard | Correctness, state, compatibility, security | Three voters, two must agree | Deterministic filtering |
31
+ | deep | Same four lenses | Three voters, two must agree | Additional arbiter preserving confirmed findings |
32
+
33
+ Every mode includes two separate risk classifications. Sensitive changes cannot be downgraded. Forked author context is rejected.
34
+
35
+ Each run is bound to an immutable base, HEAD, source snapshot and nonce. Missing or malformed output, changed code, exhausted budgets and incomplete verification block the AI gate. Evidence must cite actual snapshot source; an asserted command transcript alone is insufficient.
36
+
37
+ Git attribute conversions are isolated so repository clean filters cannot run or hide changes. Effective `info/attributes` rules stop review with an explicit incomplete error. Confirm and remove those rules before retrying; the plugin does not edit Git configuration.
38
+
39
+ Posted findings require a fix or reasoned disposition. Fixes clear only after independent re-verification. Reviews default to three completed rounds; round three limits new findings to the actual incremental edits while re-checking unresolved findings. New files remain eligible. Binary changes require separate review.
40
+
41
+ The ten tools are `review_diff`, `review_run`, `review_report`, `review_check`, `review_respond`, `review_status`, `review_gate`, `review_learn`, `review_issue` and `review_eval`. External task submissions cannot prove independent execution and never pass the automatic gate. No tool publishes GitHub feedback or grants a human approval.
42
+
43
+ Evidence commands go through the live caller's controlled host terminal, including permission and cancellation handling. Read-only sessions refuse command execution. On the official Windows preset, controlled `pwsh` bridges to Git Bash when Bash is not exposed; Git Bash and PowerShell 7.3+ are required. There is no direct process fallback.
44
+
45
+ Default state is `DSH_HOME/plugins/dsh-review/<repository hash>/`. A workspace child directory can be configured explicitly. Corrupt ledgers fail closed; v1 evidence is backed up without inheriting old approvals.
46
+
47
+ Defaults: three rounds, incremental re-review after round two, 20 findings, two nits, severity floor `important`, 80 worker calls, concurrency three, ten-minute run timeout, two-minute command timeout, 4 MiB snapshot limit and the `spawn` backend. The legacy `evidenceRequired: false` setting cannot disable independent verification.
48
+
49
+ `dsh-review-gate` can combine the AI result with read-only GitHub evidence: successful required checks, resolved threads and current-commit human approvals. Trusted-author policy is loaded from the PR base commit, never its editable working files. Owners must separately enforce branch protection, CODEOWNERS, merge queues and release controls.
50
+
51
+ See [integration, migration and rollback](INTEGRATION.md), [design and boundaries](DESIGN.md), [validation](VALIDATION.md) and [changelog](../CHANGELOG.md). Evaluation uses curated defect matches, clean controls and separate coverage reporting; it does not claim production recall from synthetic tests.
52
+
53
+ Issues and PRs are welcome. Include reproducible inputs, versions and expected/actual behavior; redact secrets and private source. MIT License.
54
+
55
+ ## Start using it
56
+
57
+ 1. Install @stardustlc/dsh-review in the profile you use, then start a new session in the target Git repository.
58
+ 2. Choose the working tree, staged changes or a Git base, and the appropriate review depth.
59
+ 3. Ask the assistant to run review_run. Keep its runId and inspect unfinished work with review_status.
60
+ 4. Check each trigger, code location and independent verification; fix the issue or record a reasoned disposition.
61
+ 5. Review changed code again and check review_gate. The AI gate does not replace CI or human approval.
62
+
63
+ ## Plugin updates
64
+
65
+ Requires DSH 0.2.1-rc.3 or newer. Update controls sit at the bottom of the existing workbench, or native plugin details for plugins without a workbench. Checks, release notes and preferences expand in place, with no separate update page or settings menu. Automatic checks are on by default; **automatic installation is off by default**. Only explicit opt-in permits compatible stable patches while idle with no unsaved changes. Preferences are independent, with per-plugin disable, deferral and ignore controls. No forced DSH restart or upgrade, and local-source installations stay unchanged. Suite components explain and operate on the whole Suite in the same footer.
66
+
67
+ Older releases need one manual update in native plugin management to acquire these controls. Publishing to npm does not replace an existing user installation.
@@ -0,0 +1,141 @@
1
+ > 完整使用说明。首页已按用途、安装和操作流程重新整理;这里保留详细参数、限制、更新规则与历史验证链接。
2
+
3
+ # dsh-review
4
+
5
+ [English](../README.en.md)
6
+
7
+ [![npm](https://img.shields.io/npm/v/@stardustlc/dsh-review)](https://www.npmjs.com/package/@stardustlc/dsh-review) [![downloads](https://raw.githubusercontent.com/STARDUSTLC666/dsh-suite/npm-downloads/assets/dsh-review-downloads.svg)](https://www.npmjs.com/package/@stardustlc/dsh-review) [![total downloads](https://raw.githubusercontent.com/STARDUSTLC666/dsh-suite/npm-downloads/assets/dsh-review-total-downloads.svg)](https://www.npmjs.com/package/@stardustlc/dsh-review)
8
+
9
+ [下载统计说明](https://github.com/STARDUSTLC666/dsh-suite/blob/npm-downloads/README.md)
10
+
11
+ 面向 Git 改动的代码审阅插件:独立查找缺陷、交叉复核证据、跟踪修复,并给出明确的审阅门禁。保留未完成项和需人工决定的结论,支持 quick、standard、deep 三种模式。
12
+
13
+ 参考 [Claude Code 团队的审阅流程](https://claude.dev/blog/solving-code-review-at-anthropic/),实现其中可在 DSH 内完成的审阅环节。它不授予人工批准,也不会自动发评论或合并代码。
14
+
15
+ ## 开始使用
16
+
17
+ 1. 按安装说明把 @stardustlc/dsh-review 安装到实际使用的 profile,再在目标 Git 仓库创建新会话。
18
+ 2. 说明审阅范围:当前工作区、暂存改动或指定 Git 基准,并选择合适的审阅深度。
19
+ 3. 让助手调用 review_run;保留返回的 runId,查看 review_status 中的未完成项。
20
+ 4. 逐项核对触发条件、代码位置和独立复核证据,修复问题或记录有理由的处置。
21
+ 5. 代码改变后重新审阅并检查 review_gate;AI 门禁不代替 CI 或人工批准。
22
+
23
+ ## 使用
24
+
25
+ 需要 Git、Node.js 22.19+ / 24+,以及提供子智能体、权限预设和作业管理服务的官方 DSH 运行环境。当前最低要求为 DSH 0.2.1-rc.3;[本轮验收](validation-0.4.4.md)使用官方 0.2.1-rc.4。在 Git 仓库根目录创建会话后,让 DSH:
26
+
27
+ > 审阅当前改动,运行 dsh-review。只报告有具体触发条件、代码证据和独立复核的问题。审查没完成时不要说通过。
28
+
29
+ 安装到 Web profile:
30
+
31
+ ~~~bash
32
+ dsh plugin --profile web add @stardustlc/dsh-review
33
+ ~~~
34
+
35
+ 桌面版应安装到它实际使用的 profile,并在新的会话中加载插件。插件不会查找、复制或修改其他 profile 的密钥。
36
+
37
+ 请使用带作用域的包名。npm 上未加作用域的 dsh-review 属于其他作者,不是本仓库。
38
+
39
+ 常见调用:
40
+
41
+ ~~~json
42
+ {"tool":"review_run","arguments":{"base":"main"}}
43
+ ~~~
44
+
45
+ 省略 base 审当前工作区;staged=true 审暂存区。需要中断后续工作时取消正在运行的工具;恢复未完成审查时使用返回的 runId。敏感改动始终使用 deep,不能通过参数降级。
46
+
47
+ ## 审阅如何完成
48
+
49
+ | 模式 | 独立找问题 | 每个问题的复核 | 汇总 |
50
+ |---|---|---|---|
51
+ | quick | 正确性、安全,2 个任务 | 1 个独立审阅者 | 确定性把关 |
52
+ | standard | 正确性、状态、兼容性、安全,4 个任务 | 3 人投票,至少 2 票一致 | 确定性把关 |
53
+ | deep | 同 standard | 3 人投票,至少 2 票一致 | 另派汇总者,不能删掉已确认的问题 |
54
+
55
+ 每轮还有两个独立风险判断任务,分别判断风险等级和是否需要额外人工审阅。所有任务使用新的上下文;继承作者对话的 fork 后端不会被接受。
56
+
57
+ - 每轮绑定 Git 基准、HEAD、完整文件快照和唯一运行编号。代码变化、结果缺失、格式损坏或超限都会阻止放行。
58
+ - 读取原始 Git 改动时隔离属性转换,不执行仓库的 clean 过滤器。`info/attributes` 含有效规则时提示审查未完成;请先确认并移除规则后重试,插件不会代改仓库配置。
59
+ - 复核必须说明具体成因并引用快照中的真实代码行。一个非空 evidence 字符串不算验证。
60
+ - 风格、命名、格式和清理建议直接过滤。已发表问题按指纹去重;每条仍须修复或写明处置原因。
61
+ - 默认最多 3 轮。从第 3 轮起,新问题限定在相对上轮的实际新增改动;旧问题继续复核,新文件不会漏掉。
62
+ - 只有独立复核确认问题已消失,才能自动记为 fixed。人工说明 wrong、intentional 或 wontfix 会保留理由,但不计作人工批准。
63
+ - 只生成作业书的外部模式可用于协作,无法证明执行独立性,因此不会通过自动门禁。
64
+
65
+ 二进制变更需要另行验收,文字审查不会认证其内容。跳过的路径会公开列出,并仍参与风险判断。
66
+
67
+ ## 十个工具
68
+
69
+ | 工具 | 作用 |
70
+ |---|---|
71
+ | review_diff | 生成快照与审阅计划,不作通过结论 |
72
+ | review_run | 执行或恢复分阶段独立审阅 |
73
+ | review_report | 提交外部任务的运行编号、目标编号与 JSON 结果 |
74
+ | review_check | 经宿主受控终端运行检查,保存本轮证据收据 |
75
+ | review_respond | 记录带理由的处置;fixed 必须重新复核 |
76
+ | review_status | 查看未完成项、轮次、调用量和处置噪音率 |
77
+ | review_gate | 检查当前快照的 AI 审阅层,不代替 CI 或人工批准 |
78
+ | review_learn | 从已验证修复中生成规则草稿,不自动改项目规范 |
79
+ | review_issue | 生成 issue 分诊和复现草稿,不执行正文指令或发表评论 |
80
+ | review_eval | 登记人工标注缺陷与干净样本、准备盲测、绑定运行结果并计分 |
81
+
82
+ ## 检查、权限与证据
83
+
84
+ review_check 的命令经调用者实际使用的宿主终端工具运行,不直接创建绕过权限的进程。只读会话不运行证据命令;可使用静态源码复核。取消、超时和后台作业清理都受宿主管理。
85
+
86
+ Windows 官方预设只提供 pwsh 时,通过这个受控工具调用 Git Bash;需要 Git Bash 和 PowerShell 7.3+。原命令保留可见,引号不经 cmd 拼接。不能使用这条路径时会明确报错,不会静默换成直接执行。
87
+
88
+ 证据收据绑定 runId 和 targetId;命令改变代码后收据失效。请正常批准必要权限,不要为了审阅扩大整个会话的权限。
89
+
90
+ ## 接入仓库流程
91
+
92
+ 仓库级 REVIEW.md 可以写失败判据、跳过路径、敏感目录和噪音上限:
93
+
94
+ ~~~markdown
95
+ ## 限制
96
+ max_nits: 0
97
+ severity_floor: important
98
+
99
+ ## 跳过
100
+ - vendor/**
101
+
102
+ ## 坏掉长什么样
103
+ - 文档给出的命令不能执行
104
+ - 配置将请求发送到错误账号
105
+
106
+ ## 敏感路径
107
+ - src/billing/**
108
+ ~~~
109
+
110
+ 完整 PR 门禁还需独立的 CI、安全检查、人工批准和所有审阅线程的解决状态。新增命令 dsh-review-gate 只读取 GitHub 证据,策略固定从 PR 基准提交读取;机器人、旧提交和已撤回的批准不能填人工名额。
111
+
112
+ 详见 [接入与回滚](INTEGRATION.md)、[文章对应边界](DESIGN.md) 和 [验证记录](VALIDATION.md)。合并队列、功能开关、灰度和回滚由仓库/发布系统负责,安装插件不会自动启用这些制度。
113
+
114
+ ## 状态与配置
115
+
116
+ 默认状态保存在 DSH_HOME/plugins/dsh-review/<仓库摘要>/,不写入被审项目。可指定仓库内子目录,例如 .dsh-review。账本版本为 2;旧账本会保留备份,旧版本的“通过”不会沿用。
117
+
118
+ | 配置 | 默认 | 含义 |
119
+ |---|---|---|
120
+ | stateDir | @profile | profile 下按仓库隔离;也可指定仓库内子目录 |
121
+ | roundCap | 3 | 每个审阅系列的完成轮次上限 |
122
+ | diffOnlyAfterRound | 2 | 超过这轮后只对新增改动提出新问题 |
123
+ | maxFindings / maxNits | 20 / 2 | 问题数与 nit 上限 |
124
+ | severityFloor | important | 默认不发表 nit |
125
+ | maxCalls / maxParallel | 80 / 3 | 每轮实际派发预算、最大并发 |
126
+ | runTimeoutMs | 600000 | 每次执行的总超时 |
127
+ | commandTimeoutMs | 120000 | 单条证据命令超时 |
128
+ | maxDiffBytes | 4194304 | 补丁及源码快照总量上限;超出则未完成 |
129
+ | subagentProvider | spawn | 必须明确保证不继承作者上下文 |
130
+
131
+ evidenceRequired 为旧配置兼容项,设为 false 也不能关闭独立证据验证。v0.2 的手工 head/findings 提交接口已停用,迁移见接入文档。
132
+
133
+ 欢迎提交 [Issues](https://github.com/STARDUSTLC666/dsh-review/issues) 和 PR,最好附具体触发输入、版本、预期结果与实际结果。请先去掉密钥和私有代码。
134
+
135
+ [更新记录](../CHANGELOG.md) · MIT License
136
+
137
+ ## 插件更新
138
+
139
+ 需要 DSH 0.2.1-rc.3 或更新版本。更新控件直接位于原有工作台内容末尾;没有工作台的插件,位于原生插件详情页底部。检查、更新记录和偏好在原地展开,不增加独立更新页面或设置菜单。自动检查默认开启;**自动安装默认关闭**,明确授权后才会在空闲且没有未保存修改时安装兼容的稳定补丁。开关按插件独立保存,可关闭、推迟或忽略提醒;不会强制重启 DSH、升级 DSH 本体或替换本地源码安装。Suite 组件在当前页面底部明确说明并操作 Suite 整包更新。
140
+
141
+ 旧版用户先在官方插件管理中手动更新一次,之后才会获得此入口。发布到 npm 不会直接替换用户已经安装的版本。