前言¶
做 DSH 插件或智能体工作流时,代码审查经常停在“只给建议”的环节:一次对话看几个文件,提出若干问题,但不会继续修复、验证、再审查。iterate-plugin 针对这个场景,把 iterate 的审查循环放进 dsh,支持先做只读多轮 review,再在 normal 模式执行闭环修复、验证和收敛。
下面介绍它的定位、两种模式、工具层、UI 层、安装命令和典型用法。
这是什么¶
iterate-plugin 是 jingzhao-l 维护的 dsh 插件,许可证为 MIT。它把 iterate skill 转成 autonomous closed-loop harness:
plan -> parallel review xN -> atomic fixes -> validate -> loop -> auto-stop
这条链路描述了 normal 模式的主流程。
同时,它提供 dry-run 纯审查模式,支持 multi-round convergence,并提供 meta-review:审查报告一致性,并输出 final review report。
资料显示,插件代码在 iterate-skill 主仓库中维护,并通过 git subtree 同步到本仓库;releases 和 npm publishing 在本插件仓库进行,本仓库是 dsh ecosystem 的 canonical publish point。资料建议 star / fork 主仓库,并在主仓库 Issues 提交 issue。
两种模式¶
dry-run 模式用于只读审查,适合先看清楚问题、不修改文件。已核实能力包括:
- dry-run read-only multi-round review
- zero file modification(read-only)
- repeated review until convergence
- parallel dimension review
- deterministic aggregation / dedupe / sort
- meta-review report consistency audit
- self-stop when converged
- breakpoint save / resume(long iterations)
normal 模式用于自动闭环修复,适合确认审查方向后继续修复、验证和收敛。已核实能力包括:
- autonomous closed-loop code iteration:review → triage → fix → validate → converge
- automatic atomic fix
- validation after each round’s fixes
- rollback on failed fixes
- fix atomic findings only, keep architectural for later
- self-stop when converged
- repeated review until convergence
- parallel dimension review
- deterministic aggregation / dedupe / sort
- meta-review report consistency audit
- breakpoint save / resume(long iterations)
先做 dry-run,再做 normal 是一个更稳的顺序:先确认问题和审查维度,再执行修复与验证。
工具层¶
iterate-plugin 提供 13 个注册工具:
iterate_config
iterate_validate
iterate_decision_log
iterate_context
iterate_review
iterate_triage
iterate_fix
iterate_diff
iterate_rollback
iterate_checkpoint
iterate_status
iterate_history
iterate_prune
这些工具覆盖配置、验证、决策记录、上下文、审查、分诊、修复、diff、回滚、checkpoint、状态、历史和清理。
findings triage loop¶
流程是:
review → UI triage(y/n/a)→ iterate_triage 写回 known_intentional → 下一轮自动过滤
这样可以在 UI 里标记哪些 finding 是有意为之,下一轮自动过滤,不再重复处理。
修复与回滚¶
结构化修复系统中,每次 fix 先备份、写 registry entry、记录 diff。失败的 fix 验证后可用 iterate_rollback 回滚。
断点恢复¶
每轮开始时保存 checkpoint,中断的长迭代可恢复。
历史审计¶
iterate_history 读取 decision log 和 fix registry summary,用于查看运行过程和修复记录。
运行时清理¶
iterate_prune 清理过期 decision-log entries、checkpoints、orphaned fix backups 和 empty rounds。默认 dry-run/report-only,真实清理需要 dryRun:false,且每次清理都会记录日志。
配置读写¶
iterate_config 支持 validated、backed-up、rollback-capable partial writes。
UI 层¶
iterate-plugin 提供 build-free Web UI layer,包括 triage panel、convergence dashboard、stats card、theme skin 等。
安装与启用¶
官方安装命令:
dsh plugin --profile web add iterate-plugin
该命令用于向当前 dsh web profile 安装 iterate-plugin。
典型用法¶
资料给出的可复现入口如下:
1、安装本插件:
dsh plugin --profile web add iterate-plugin
2、使用 dry-run 模式进行只读、零文件修改的多轮 review。
3、使用 normal 模式进行自动闭环修复、验证和收敛。
经过上面的步骤,可以先在只读模式完成审查与收敛判断,再切换到 normal 模式执行修复、验证和收敛。
适用场景与注意¶
适合以下场景:
- 需要在 DSH 中做代码审查闭环,而不只是单轮问答
- 需要先只读审查,再决定是否自动修复
- 需要 repeated review until convergence、parallel dimension review、deterministic aggregation / dedupe / sort
- 需要长迭代断点恢复、历史审计和运行时清理
- 需要 dsh 插件形式的 triage panel、convergence dashboard、stats card、theme skin 等 UI 组件
注意事项:
- dry-run 模式为零文件修改的只读模式;normal 模式会执行 fix 并修改文件。
- 插件以当前 dsh 进程权限运行,安装前应检查源码与许可证。
- 许可证为 MIT。
- GitHub 仓库:
https://github.com/jingzhao-l/iterate-plugin。 - 本文不写星标数、分类、目录 URL、dsh 最低版本或系统要求,因为这些未在当前资料中明确给出。
结尾¶
iterate-plugin 的价值在于把 iterate 的 review / fix loop 做成 dsh 插件:dry-run 负责只读审查,normal 负责闭环修复、验证和收敛,工具层与 UI 层共同支持审查、分诊、修复、回滚、断点恢复和清理。
仓库地址:https://github.com/jingzhao-l/iterate-plugin。如果需要在 DSH 社区目录中使用,可在目录中搜索 iterate-plugin;具体目录页以你当前 DSH 环境提供的入口为准。