iterate-plugin 3.2.1 → 3.3.1
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/README.md +173 -90
- package/README.zh-CN.md +172 -80
- package/dist/approval-gate.js +0 -17
- package/dist/tools/checkpoint.js +22 -3
- package/dist/tools/defense-events.js +4 -1
- package/dist/tools/defense-store.js +9 -3
- package/dist/tools/experience-bank.js +4 -1
- package/dist/tools/experience-store.js +9 -3
- package/dist/tools/quality-gate.js +4 -1
- package/dist/tools/quality-store.js +9 -3
- package/dist/tools/transcript.js +8 -1
- package/dist/transcript.js +10 -0
- package/lib/client.js +549 -88
- package/lib/parse.js +352 -0
- package/package.json +13 -5
- package/src/approval-gate.ts +0 -26
- package/src/client/index.ts +349 -73
- package/src/tools/checkpoint.ts +22 -3
- package/src/tools/defense-events.ts +4 -1
- package/src/tools/defense-store.ts +13 -4
- package/src/tools/experience-bank.ts +4 -1
- package/src/tools/experience-store.ts +13 -4
- package/src/tools/quality-gate.ts +4 -1
- package/src/tools/quality-store.ts +13 -4
- package/src/tools/transcript.ts +8 -1
- package/src/transcript.ts +11 -0
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# iterate-plugin for DeepSeek Harness (dsh)
|
|
2
2
|
|
|
3
|
-
> dsh 桌面端的 iterate 质量指挥中心 + 经验银行插件(v3.
|
|
4
|
-
> The iterate ecosystem's quality command center + experience bank plugin for dsh (v3.
|
|
3
|
+
> dsh 桌面端的 iterate 质量指挥中心 + 经验银行插件(v3.2)。把 iterate 生态的同一套 review/fix loop 直接搬进 dsh 界面,新增质量门禁、经验银行、防御事件流与原生指挥操作。
|
|
4
|
+
> The iterate ecosystem's quality command center + experience bank plugin for dsh (v3.2). Natively embedded inside the DeepSeek Harness (dsh) desktop client with quality gates, experience bank, defense events stream, and native command buttons.
|
|
5
5
|
|
|
6
6
|
<p align="center">
|
|
7
7
|
<a href="README.md"><strong>English</strong></a> ·
|
|
@@ -24,13 +24,11 @@
|
|
|
24
24
|
|
|
25
25
|
## The iterate Ecosystem / iterate 生态一览
|
|
26
26
|
|
|
27
|
-
**iterate** is not one single binary — it is a **skill ecosystem** that layers a strict multi-round code gate on top of your existing AI assistants, IDEs, and scripts. It never replaces your tools; it adds an audit-and-close-the-loop layer on them. The whole ecosystem ships as **three interchangeable components sharing one `iterate.config.yaml` + one
|
|
27
|
+
**iterate** is not one single binary — it is a **skill ecosystem** that layers a strict multi-round code gate on top of your existing AI assistants, IDEs, and scripts. It never replaces your tools; it adds an audit-and-close-the-loop layer on them. The whole ecosystem ships as **three interchangeable components sharing one `iterate.config.yaml` + one 9-dimension review system**:
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
| **[iterate-harness](https://github.com/jingzhao-l/iterate-harness)** | Standalone headless engine, command `ih` (npm: `iterate-harness`) | Run the EXACT same loop in terminal / CI / git hooks, without any conversational assistant required |
|
|
33
|
-
| **iterate-plugin (this repo)** | dsh desktop-client plugin (npm: `iterate-plugin`) | Plug the harness runtime **into the dsh UI**: convergence dashboard, triage panel, round progress — all surfaced as native dsh widgets |
|
|
29
|
+
- **[Core Skill + CLI](https://github.com/jingzhao-l/iterate-skill)** — a portable AI skill `/iterate` + `iterate` CLI. For conversation-driven multi-round iteration inside Trae / Claude Code / Cursor / Copilot / Codex and 25+ other assistants.
|
|
30
|
+
- **[iterate-harness](https://github.com/jingzhao-l/iterate-harness)** — a standalone headless engine, command `ih` (npm: `iterate-harness`). Runs the **exact same loop** in terminal / CI / git hooks, without any conversational assistant required.
|
|
31
|
+
- **iterate-plugin (this repo)** — a dsh desktop-client plugin (npm: `iterate-plugin`). Plugs the harness runtime **into the dsh UI**: convergence dashboard, triage panel, round progress — all surfaced as native dsh widgets.
|
|
34
32
|
|
|
35
33
|
How they fit together: **Core Skill** is the canonical, assistant-agnostic review/fix engine (the "brains"). **iterate-harness** is the same engine wrapped as a headless CLI + WebUI for unattended runs. **iterate-plugin** (this repository) wraps that harness runtime as a dsh plugin, rendering the triage UI and convergence dashboard directly inside the dsh desktop client. Configuration (`iterate.config.yaml`) and the 9-dimension review system are **identical across all three** — learn one, use them all.
|
|
36
34
|
|
|
@@ -61,58 +59,79 @@ dsh plugin --profile web add iterate-plugin
|
|
|
61
59
|
|
|
62
60
|
`iterate-plugin` is the [iterate](https://github.com/jingzhao-l/iterate-skill) integration for the [DeepSeek Harness (dsh)](https://github.com/deepseek-ai/deepseek-harness) desktop client. It brings iterate's review loop (review → triage → fix → validate → converge) directly into the dsh UI, offering **autonomous closed-loop code iteration** (normal mode) and **dry-run read-only multi-round review**.
|
|
63
61
|
|
|
64
|
-
**v3.
|
|
62
|
+
**v3.2 Quality Command Center**: the plugin has grown from a "passive observation panel" into an "active command center + knowledge base". It now ships quality gate view + writable compute, an experience bank with search / adopt / add, a defense events stream (record + bilingual labels), native command buttons, and a `task_mode` indicator.
|
|
65
63
|
|
|
66
|
-
Besides 17 pure-function tools, it
|
|
64
|
+
Besides 17 pure-function tools, it carries a **build-free Web UI layer** (convergence dashboard, triage panel, stats card, 10-tab runtime observatory, theme skin, etc.) that plugs straight into dsh's existing UI slots. Configuration (`iterate.config.yaml` and the review dimensions) is identical across the other two components of the iterate ecosystem ([skill](https://github.com/jingzhao-l/iterate-skill) / [headless engine](https://github.com/jingzhao-l/iterate-harness)) — zero migration cost.
|
|
67
65
|
|
|
68
|
-
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 📑 Table of Contents
|
|
69
|
+
|
|
70
|
+
- [✨ Features](#-features)
|
|
71
|
+
- [📦 Installation](#-installation)
|
|
72
|
+
- [💬 Usage](#-usage)
|
|
73
|
+
- [⚙️ Project configuration](#️-project-configuration)
|
|
74
|
+
- [🔧 Registered tools](#-registered-tools)
|
|
75
|
+
- [📁 Runtime artifact layout](#-runtime-artifact-layout)
|
|
76
|
+
- [🎨 Design](#-design)
|
|
77
|
+
- [🧪 Running the tests](#-running-the-tests)
|
|
78
|
+
- [⚠️ Disclaimer & License](#️-disclaimer--license)
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## ✨ Features
|
|
69
83
|
|
|
70
84
|
### Two modes
|
|
71
85
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
- **
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
- **
|
|
95
|
-
- **
|
|
96
|
-
- **
|
|
97
|
-
- **
|
|
98
|
-
- **
|
|
99
|
-
- **
|
|
100
|
-
|
|
101
|
-
### UI layer (build-free client slots, v3.1: 10 tabs)
|
|
102
|
-
|
|
103
|
-
| UI component | Mounted slot | Function |
|
|
104
|
-
| --- | --- | --- |
|
|
105
|
-
| ConvergenceDashboard | `conversation.input.dock` | Live round progress bar, severity stats, dimension badges, trend mini-chart above the input; normal mode also shows fix-count badges; plus a live workflow-phase chip (current phase + running/stopped); **v3.1: task_mode indicator (code/iterate)** |
|
|
106
|
-
| ObservatoryPanel | `conversation.input.dock` | **Ten-tab** runtime observatory below the input: live activity stream (type filter), review threads (expand/collapse all), convergence trend, finding locations (severity/dimension/search filter), fixes + rollback, checkpoint resume, decision timeline (type/round filter + search); **v3.1: Quality Gate (F8)**, **Experience Bank (F9)**, **Defense Events (F10)**; one-click export of all observatory data to JSON (download, copy fallback) |
|
|
107
|
-
| TriagePanel | `conversation.chat.turnTail` | Per-finding y/n/a triage, filtering, batch (incl. select-all), keyboard shortcuts, localStorage persistence, copy-YAML / apply-instruction; **v3.1: Native command buttons (approve architectural fix, trigger new round, rollback to checkpoint)** |
|
|
108
|
-
| StatsCard | `conversation.chat.turnTail` | When no findings remain: convergence stats, round history table, trend chart, completion summary |
|
|
109
|
-
| iterate theme skin | `theme.overrideTokens` | Warm-amber 13-dsw-token override, light/dark modes, togglable in settings |
|
|
110
|
-
| ProgressCapsule | `shell.overlay` | Popup notification on each round completion / convergence (incl. convergence confirm) |
|
|
111
|
-
| SettingsPanel | `settings.section` | Theme toggle, triage-persistence notes, config-management guide, runtime status overview (artifact layout + view/cleanup tool guide), one-click triage data reset |
|
|
86
|
+
The plugin runs the same iterate engine as the rest of the ecosystem, either fully read-only or as an autonomous fix loop:
|
|
87
|
+
|
|
88
|
+
- **dry-run** — repeats multi-dimension review until convergence; **zero files modified**.
|
|
89
|
+
- **normal** — review → atomic fixes → validation every round → rollback on failure → loop until convergence.
|
|
90
|
+
|
|
91
|
+
Both modes share:
|
|
92
|
+
|
|
93
|
+
- Repeated review until convergence
|
|
94
|
+
- Parallel dimension review
|
|
95
|
+
- Deterministic aggregation / dedupe / sort
|
|
96
|
+
- meta-review report-consistency audit
|
|
97
|
+
- Self-stop when converged
|
|
98
|
+
- Breakpoint save / resume (long iterations)
|
|
99
|
+
|
|
100
|
+
`normal` mode additionally:
|
|
101
|
+
|
|
102
|
+
- Fixes **atomic findings only** (architectural ones are kept for later approval)
|
|
103
|
+
- Validates after each round's fixes
|
|
104
|
+
- Rolls back failed fixes, and can save / resume progress
|
|
105
|
+
|
|
106
|
+
### UI layer (build-free client slots, v3.2: 10 tabs)
|
|
107
|
+
|
|
108
|
+
- **ConvergenceDashboard** (`conversation.input.dock`) — live round progress bar, severity stats, dimension badges, trend mini-chart above the input; normal mode also shows fix-count badges; plus a live workflow-phase chip (current phase + running/stopped) and a **v3.2 task_mode indicator (code / iterate)**, now backed by the persisted transcript (`iterate_status` / `iterate_transcript` emit `taskMode`).
|
|
109
|
+
- **ObservatoryPanel** (`conversation.input.dock`) — a **ten-tab** runtime observatory below the input: live activity stream (type filter), review threads (expand / collapse all), convergence trend, finding locations (severity / dimension / search filter), fixes + rollback, checkpoint resume, decision timeline (type / round filter + search). **v3.2 tabs: Quality Gate (F8), Experience Bank (F9), Defense Events (F10)**; one-click JSON export of all observatory data (download, copy fallback). **v3.3: F8/F9/F10 are now live** — they scan the session stream for the latest `iterate_quality_gate` / `iterate_experience` / `iterate_defense_events` results and render real data (PASS/FAIL chip + per-dimension score bars, experience entries with adopt buttons + client-side search, defense type-count chips + filtered event stream), degrading to copy-able query instructions only when the session has none.
|
|
110
|
+
- **TriagePanel** (`conversation.chat.turnTail`) — per-finding y/n/a triage, filtering, batch ops (incl. select-all), keyboard shortcuts, localStorage persistence, copy-YAML / apply-instruction. **v3.2: native command buttons** (approve architectural fix, trigger new round, rollback to checkpoint). **v3.3: §8 指派修复 (assign)** — one click copies an `iterate_fix` instruction carrying every in-scope finding (respecting the batch toggle).
|
|
111
|
+
- **StatsCard** (`conversation.chat.turnTail`) — convergence stats, round history, trend chart and completion summary when no findings remain.
|
|
112
|
+
- **iterate theme skin** (`theme.overrideTokens`) — a warm-amber 13-token `--dsw-*` override, light/dark modes, togglable in settings.
|
|
113
|
+
- **ProgressCapsule** (`shell.overlay`) — popup notification on each round completion / convergence (incl. convergence confirm).
|
|
114
|
+
- **SettingsPanel** (`settings.section`) — theme toggle, triage-persistence notes, config-management guide, runtime status overview (artifact layout + view/cleanup tool guide), one-click triage data reset.
|
|
112
115
|
|
|
113
116
|
The UI layer is **defensive by design**: it degrades gracefully if any of `slots` / `theme` / `React` is unavailable — it never crashes the client.
|
|
114
117
|
|
|
115
|
-
|
|
118
|
+
### Behavior beyond the tools
|
|
119
|
+
|
|
120
|
+
Beyond the 17 registered tools (full reference further down), the plugin closes several loops end to end:
|
|
121
|
+
|
|
122
|
+
- **Findings triage loop** — review → UI triage (y/n/a) → `iterate_triage` writes back `known_intentional` → auto-filtered next round
|
|
123
|
+
- **Structured fix system** — each fix backs up first, writes a registry entry, records the diff; a failed validation can be reverted with `iterate_rollback`
|
|
124
|
+
- **Breakpoint resume** — checkpoints saved at the start of each round; interrupted long iterations can resume
|
|
125
|
+
- **History audit** — `iterate_history` reads the decision log (filtered by type / time / count) and the fix-registry summary to audit run process and fix details
|
|
126
|
+
- **Runtime cleanup** — `iterate_prune` removes stale decision-log entries, stale checkpoints, orphaned fix backups and empty rounds; dry-run by default (report-only), real cleanup requires `dryRun:false`, and every cleanup is logged
|
|
127
|
+
- **Config read / write** — `iterate_config` supports validated, backed-up, rollback-capable partial writes
|
|
128
|
+
- **v3.2 Experience Bank** — `iterate_experience` queries historical fixes and patterns with search / filter / adopt, and can persist new verified fixes (`add`) — re-adding the same pattern+dimension bumps its hit count instead of duplicating it
|
|
129
|
+
- **v3.2 Quality Gate** — `iterate_quality_gate` reads quality gate status with per-dimension convergence rates and PASS/FAIL, and can recompute + persist a fresh certificate (`compute`) from this round's findings / validation results (real convergence from `findingsByRound`)
|
|
130
|
+
- **v3.2 Defense Events** — `iterate_defense_events` queries defense events (precondition failures, rollbacks, invariant violations, assumption falsifications) and can `record` new ones; readable labels follow the project language (en / zh)
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 📦 Installation
|
|
116
135
|
|
|
117
136
|
### From npm
|
|
118
137
|
|
|
@@ -150,7 +169,9 @@ Then add to your profile `cordis.patch.yml`:
|
|
|
150
169
|
|
|
151
170
|
> The package carries its own `dsh.bundle.patch` (i.e. `cordis.patch.yml`); the npm package's `files` whitelist is `src` / `lib` / `dist` / `cordis.patch.yml` / `README.md` / `LICENSE`. `dist/` is the compiled output of the TypeScript server-side logic, shipped with the package so it works with dsh's `github:owner/repo#ref` git-clone install (Node does not strip TS types under `node_modules`).
|
|
152
171
|
|
|
153
|
-
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## 💬 Usage
|
|
154
175
|
|
|
155
176
|
### dry-run mode (read-only review, no file changes)
|
|
156
177
|
|
|
@@ -181,7 +202,9 @@ Workflow:
|
|
|
181
202
|
2. `loop` → parallel review → aggregate / dedupe → parallel atomic fixes → run validation commands → rollback on failure → log → stop when no new findings
|
|
182
203
|
3. `report` → output fix statistics
|
|
183
204
|
|
|
184
|
-
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## ⚙️ Project configuration
|
|
185
208
|
|
|
186
209
|
Put `iterate.config.yaml` at the project root:
|
|
187
210
|
|
|
@@ -219,29 +242,31 @@ validation:
|
|
|
219
242
|
|
|
220
243
|
> The config can be read and **validated-partially-written** via `iterate_config` (auto backup, auto rollback on write failure).
|
|
221
244
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## 🔧 Registered tools (v3.2: 17)
|
|
248
|
+
|
|
249
|
+
- `iterate_config` — read / write `iterate.config.yaml`. `operation=read` returns the full config or a named section; `operation=write` schema-validates, backs up, then merges and writes — auto rollback on failure
|
|
250
|
+
- `iterate_validate` — run a whitelisted validation command, return the result
|
|
251
|
+
- `iterate_decision_log` — append a decision log entry (append-only, never edits old ones), stored in `.iterate/decision-log.jsonl`
|
|
252
|
+
- `iterate_context` — read the `SKILL.md` / `ITERATE.md` context
|
|
253
|
+
- `iterate_review` — deterministic review engine: `plan` builds the plan, `aggregate` dedupes + converges, `meta-review` audits report consistency. Pure computation, no filesystem access
|
|
254
|
+
- `iterate_triage` — manage `personalization.known_intentional`: `apply` validates, dedupes (file|dimension|line), backs up and writes back to config; `list` reads back the current entries. The only channel for the browser triage panel to write back to config
|
|
255
|
+
- `iterate_fix` — apply **one atomic fix**: validates the relative path, backs up the original file, enforces atomicity via `atomic.max_lines` (skippable with `force`), writes new content, records a FixRecord and an `atomic_fix` log. The only legal file-modifying entry in normal mode
|
|
256
|
+
- `iterate_diff` — view accumulated fix changes: with `file`, returns the unified diff against the first backup; without it, a per-fixed-file summary
|
|
257
|
+
- `iterate_rollback` — roll back an applied fix: restore the file from backup, remove that FixRecord from the registry, append a `revert` log. Used after a failed round validation
|
|
258
|
+
- `iterate_checkpoint` — iteration breakpoint: `save` persists progress to `.iterate/checkpoint.json`, `load` reads it back, `clear` removes it. Resumable interrupted long iterations
|
|
259
|
+
- `iterate_status` — summarize current iteration state: mode, current/last round, fixes applied, remaining architectural, decision-log entry count, whether a checkpoint exists
|
|
260
|
+
- `iterate_history` — read iteration history (read-only): decision-log entries (filter by `type` / `since` / `limit`, default latest 50, cap 200) + fix-registry summary (per-round fixed/failed counts). For auditing the run, tracing logs, and inventorying fixes
|
|
261
|
+
- `iterate_prune` — clean runtime artifacts: stale decision-log entries (by `retainDays`, default 30), stale checkpoints, orphaned fix backups, empty rounds. Dry-run by default (report-only); real cleanup with `dryRun:false`, each cleanup logged
|
|
262
|
+
- `iterate_transcript` — runtime observatory: persist review transcripts, threads, fixes, and nudge directions to `.iterate/transcript.json` for the client observatory
|
|
263
|
+
- `iterate_experience` — **v3.2** query the experience bank (list / search / get), or `add` a new verified fix: re-adding the same pattern+dimension bumps its hit count instead of duplicating it. Persists to `.iterate/experience.json`
|
|
264
|
+
- `iterate_quality_gate` — **v3.2** read the quality certificate (`read`), or recompute + persist a fresh one (`compute`) from findings, validation results, `findingsByRound`, and `fixedByDimension`. Real per-dimension convergence rates
|
|
265
|
+
- `iterate_defense_events` — **v3.2** query defense events (list / counts), or `record` a new one. Human-readable labels follow the project language (en / zh)
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## 📁 Runtime artifact layout
|
|
245
270
|
|
|
246
271
|
All runtime state lives under `.iterate/` at the project root (can be excluded via `.gitignore`):
|
|
247
272
|
|
|
@@ -251,27 +276,81 @@ All runtime state lives under `.iterate/` at the project root (can be excluded v
|
|
|
251
276
|
checkpoint.json # iteration breakpoint (resume)
|
|
252
277
|
transcript.json # runtime-observatory manifest (per-reviewer threads, trend, fixes, timeline, nudge)
|
|
253
278
|
transcript-live.ndjson # append-only near-real-time reviewer-activity feed (read/fix/rollback/validate…), byte-capped
|
|
254
|
-
experience.json # v3.
|
|
255
|
-
quality-gate.json # v3.
|
|
256
|
-
defense-events.json # v3.
|
|
279
|
+
experience.json # v3.2: experience bank (historical fixes and patterns, accumulated across sessions)
|
|
280
|
+
quality-gate.json # v3.2: quality gate snapshot (dimension convergence, verification pass rates, PASS/FAIL)
|
|
281
|
+
defense-events.json # v3.2: defense events stream (precondition failures, rollbacks, invariant violations, assumption falsifications)
|
|
257
282
|
fixes/
|
|
258
283
|
registry.json # fix registry (list of FixRecords, grouped by round)
|
|
259
284
|
<fix-id>_<ts>.bak # original file backup before each fix
|
|
260
285
|
```
|
|
261
286
|
|
|
262
|
-
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## 🔐 Permissions, dependencies & compatibility
|
|
290
|
+
|
|
291
|
+
### Node.js / DSH compatibility
|
|
292
|
+
|
|
293
|
+
- **Node.js**: `>=20` (`package.json` `engines.node`).
|
|
294
|
+
- **DSH**: declares `dsh.compatibility.dshReleases` — `compatible` for the official
|
|
295
|
+
`0.1.2-alpha.4`, `0.1.2-alpha.5`, and `0.1.2-rc.1` releases. The plugin is built
|
|
296
|
+
against `@deepseek-ai/dsh-tools` / `@deepseek-ai/dsh-util-values` `0.1.2-rc.1`
|
|
297
|
+
and uses only public contracts (tool registration, client slots + theme, bundle patch).
|
|
298
|
+
|
|
299
|
+
### Runtime permissions (conservative disclosure)
|
|
300
|
+
|
|
301
|
+
The plugin runs with the **same process capabilities as the DSH host** and touches the
|
|
302
|
+
following capabilities; elevated capability means a DSH Profile install stays
|
|
303
|
+
`user-reviewed`/guarded rather than auto-approved:
|
|
304
|
+
|
|
305
|
+
- **Files** — reads and writes project-local state under `<projectRoot>/.iterate/`
|
|
306
|
+
(decision log, checkpoint, transcript, fix backups/registry, quality gate,
|
|
307
|
+
experience bank, defense events). `iterate_fix` / `iterate_triage` also apply
|
|
308
|
+
in-place edits to the user's source files (path-traversal protected to the
|
|
309
|
+
resolved project root, backups taken before every fix, rollback on failure).
|
|
310
|
+
The client half persists triage verdicts to `localStorage`.
|
|
311
|
+
- **Commands** — the plugin registers model-facing tools; any shell execution that
|
|
312
|
+
the model performs (build / test / `git`) is run by the **host**, not by this
|
|
313
|
+
plugin. The client "command buttons" only copy paste-able instruction text; they
|
|
314
|
+
do not spawn processes.
|
|
315
|
+
- **Credentials** — this plugin does **not** read or transmit credentials at
|
|
316
|
+
runtime. The sibling **iterate-skill / iterate-harness** components may read git
|
|
317
|
+
credentials / GitHub tokens when the user runs their own Git/API operations; those
|
|
318
|
+
are separate packages and are never loaded by this plugin.
|
|
319
|
+
- **Network** — no network access at runtime (everything is local to the project).
|
|
320
|
+
|
|
321
|
+
### Dependencies
|
|
322
|
+
|
|
323
|
+
Runtime dependencies: `@deepseek-ai/cordis`, `@deepseek-ai/dsh-tools`,
|
|
324
|
+
`@deepseek-ai/dsh-util-values`, `js-yaml` — all pinned exact versions. No
|
|
325
|
+
install-time lifecycle scripts (`preinstall`/`install`/`postinstall`/`prepare`);
|
|
326
|
+
only `prepublishOnly` (build) runs on publish.
|
|
327
|
+
|
|
328
|
+
### Failure bounds
|
|
329
|
+
|
|
330
|
+
- All writes are atomic (temp + rename) and confined under `.iterate/`; a crash
|
|
331
|
+
mid-write cannot corrupt the checkpoint/transcript.
|
|
332
|
+
- Persistence failures surface as structured `{ ok: false, error }` results instead
|
|
333
|
+
of silent success.
|
|
334
|
+
- Fix edits are applied to backups first and rolled back on validation failure.
|
|
335
|
+
- The UI degrades gracefully when a slot/service is unavailable.
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
## 🎨 Design
|
|
263
340
|
|
|
264
341
|
The plugin follows dsh's "everything-is-a-plugin" architecture:
|
|
265
342
|
|
|
266
|
-
- **Does exactly two things
|
|
343
|
+
- **Does exactly two things** — injects the system prompt teaching the model the iterate workflow + registers 17 pure-function tools
|
|
267
344
|
- **All orchestration runs through dsh native `workflow` + `agent` + `parallel`**
|
|
268
345
|
- **Core logic is entirely pure functions** (dedupe / filter / sort / converge / meta-audit / diff computation / history filtering / cleanup reporting) — unit-testable, no I/O
|
|
269
|
-
- **Security model
|
|
270
|
-
- **Build-free UI
|
|
271
|
-
- **v3.
|
|
346
|
+
- **Security model** — file writes confined to the resolved project root (path-traversal protection); always back up before writing, roll back on failure; config writes also back up + roll back; `iterate_prune` is dry-run by default and only clears artifacts under `.iterate/` with every cleanup logged; `iterate_fix` caps content length and `iterate_triage` caps entry count to fend off abnormal oversized payloads
|
|
347
|
+
- **Build-free UI** — `lib/client.js` uses a `React.createElement` tree + injected `<style>` tags, all colors via `--dsw-*` tokens, degrading gracefully when a service is missing
|
|
348
|
+
- **v3.2 Quality Command Center** — extends the plugin from "passive observation panel" to "active command center + knowledge base" with quality gates (read + compute), experience bank (read + add), defense events (read + record), and native command buttons
|
|
272
349
|
- Follows the iterate skill's design principles: deterministic convergence, auditable, least privilege
|
|
273
350
|
|
|
274
|
-
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
## 🧪 Running the tests
|
|
275
354
|
|
|
276
355
|
```bash
|
|
277
356
|
cd harness/iterate-plugin
|
|
@@ -282,10 +361,14 @@ npm test
|
|
|
282
361
|
|
|
283
362
|
All tests pass:
|
|
284
363
|
|
|
285
|
-
- **
|
|
286
|
-
- Coverage: dedupe, filter, sort, multi-round convergence, meta-review audit, path safety, timeout clamping, config read/write + rollback, triage merge, diff computation, checkpoint validation, fix registry, history read + filter, prune cleanup report + dry-run semantics, UI pure functions (select-all key, runtime status guide), **v3.
|
|
364
|
+
- **466 unit tests green**, type-check clean
|
|
365
|
+
- Coverage: dedupe, filter, sort, multi-round convergence, meta-review audit, path safety, timeout clamping, config read/write + rollback, triage merge, diff computation, checkpoint validation, fix registry, history read + filter, prune cleanup report + dry-run semantics, UI pure functions (select-all key, runtime status guide), **v3.2: experience bank, quality gate, defense events, approval-gate fail-open path**.
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
369
|
+
## ⚠️ Disclaimer & License
|
|
287
370
|
|
|
288
|
-
|
|
371
|
+
### Disclaimer
|
|
289
372
|
|
|
290
373
|
This project is provided "AS IS", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement.
|
|
291
374
|
|
|
@@ -298,6 +381,6 @@ This project is provided "AS IS", without warranty of any kind, express or impli
|
|
|
298
381
|
|
|
299
382
|
Users are solely responsible for the code that is generated, modified, or committed as a result of using this project. By using it, you acknowledge that neither the maintainers nor contributors are liable for any loss, damage, or legal consequences arising from its use.
|
|
300
383
|
|
|
301
|
-
|
|
384
|
+
### License
|
|
302
385
|
|
|
303
386
|
MIT
|