前言¶
做 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 環境提供的入口爲準。