回合后自动复盘
监听 turn/end 与 session/flush,识别纠错、新技巧、技能失效三类信号;回合与分钟双重节流,快照有界。
DSH 进化在回合结束后只读复盘,把可复用流程蒸馏成技能草稿,过四道代码级闸门,再由你决定是否采纳。全程记账,单条可回滚。
dsh plugin --profile web add github:veritaswiki/dsh-evolution
DSH Evolution reviews each turn read-only, distills reusable procedures into skill drafts, runs four code-level gates, and lets you decide what lands. Every change is ledgered and individually reversible.
dsh plugin --profile web add github:veritaswiki/dsh-evolution
截图为当前中文界面;完整英文 UI 尚未提供。
DSH 内置的 skill 工具能加载技能,却不能把新经验写回去。手动整理成 SKILL.md 既慢,又容易夹带一次性信息;改错了还很难回退。DSH 进化把这段空白做成一条可审计的闭环。
skillcreatedBy: agent 的技能DSH's built-in skill tool can load skills, but it cannot write new experience back. Hand-writing a SKILL.md is slow, easy to pollute with one-off details, and hard to undo. DSH Evolution turns that gap into an auditable loop.
skillcreatedBy: agent skills从采集、复盘、蒸馏到闸门、审阅、落盘和回滚,每一步都有明确边界;没有黑盒写入,也没有不可逆的自动修改。
监听 turn/end 与 session/flush,识别纠错、新技巧、技能失效三类信号;回合与分钟双重节流,快照有界。
跑在宿主 subagent fork 或 OpenAI-compatible 端点;两条通道都不写文件,写入只发生在闸门之后。
mode: draft 只写 .staging/,正式技能库零改动;采纳后由 promote 落盘并触发热更新。
命名、frontmatter、禁词、体积与路径;只放行可复用、可命名的经验,拒绝一次性产物与环境噪声。
每次创建、补丁、采纳、合并、归档都追加账本;文件内容按 SHA-256 去重,任何一条都能单独回滚。
.usage.json 驱动 active → stale → archived;零使用不归档、pinned 豁免;LLM 建伞合并默认只预览。
同名升级、同域同类、无效草稿自动分组;分组直接给出动作,只有严格同名且 agent 创建的锚点才自动升级。
驳回移入 .archive/discarded-* 并记账;提示里的撤销或账本里的恢复草稿都能把它拿回来。
概览直接说明它做什么、会发送多少上下文、草稿写在哪,再一键开启;不需要先跳设置页。
From capture and review to distillation, gates, approval, writes, and rollback, every step has a clear boundary. No black-box writes, no irreversible automatic edits.
Listens to turn/end and session/flush, detecting corrections, new techniques, and stale skills; dual turn/minute throttling and bounded snapshots.
Runs in a host subagent fork or an OpenAI-compatible endpoint. Neither channel writes files; writes happen only after the gates.
mode: draft writes only to .staging/; the formal library is untouched. Promotion writes through and hot-reloads.
Naming, frontmatter, forbidden content, and size/paths. Only reusable, nameable lessons pass; one-off artifacts and environment noise are rejected.
Every create, patch, promotion, consolidation, and archive appends to the ledger; blobs are content-addressed and individually reversible.
.usage.json drives active → stale → archived; zero-use skills are kept, pinned skills are exempt, and LLM consolidation previews by default.
Same-name upgrades, same-domain siblings, and invalid drafts are grouped with actions. Only strict same-name, agent-owned anchors upgrade automatically.
Rejection moves drafts to .archive/discarded-* and ledger it; Undo or Restore draft brings them back.
The overview explains what runs, how much context is sent, and where drafts go, then enables in one click. No trip to a settings page first.
文档语言、界面语言和技能内容语言是三件不同的事。下面这张表把真实支持范围写清楚,避免把英文文档误当成英文 UI。
| 维度 | 支持情况 |
|---|---|
| 文档语言 | 简体中文(README.md)与英文(README.en.md),结构与配置表一一对应;CHANGELOG.md、CONTRIBUTING.md、SECURITY.md 目前为英文。 |
| 插件界面 | 简体中文。locale 文件覆盖插件名称、描述与页面 meta;完整英文 UI 尚未提供,英文支持目前限于文档、市场元数据与本站。 |
| 审阅简报 | 内置中文简报(适用场景、关键步骤、风险提示),技能正文可使用任意语言。 |
| 技能内容 | 与自然语言无关:中文、英文或其他语言的 SKILL.md 都可被加载、复盘与生成。 |
| 实现语言 | JavaScript(ESM),无构建步骤;vendor/hermes/ 是 Nous Research hermes-agent 的 Python 逐字副本,仅用于能力对齐与提示词保真审计。 |
| 运行时 | Node.js ≥ 20.11;DSH >=0.2.2-rc.1 <0.3.0,web profile。 |
| 宿主平台 | DSH Web 宿主所在平台;CI 在 Ubuntu 上运行,其他桌面平台未在仓库 CI 中覆盖。 |
| 客户端 | 桌面 Web 工作台;可安装的手机 PWA(iOS / Android 浏览器);/dsh-evolution/api/* HTTP API。 |
| 复盘后端 | 宿主 subagent fork(默认,只读工具)或任意 OpenAI-compatible 端点(DSH_EVOLUTION_BASE_URL)。 |
| 存储 | 文件系统:SKILL.md、JSONL 账本、JSON 配置与遥测;无数据库、无外部服务。 |
| 分发 | GitHub 仓库、GitHub Release tarball、源码目录;npm 包 @veritaswiki/dsh-evolution 已按 scoped 名称准备(截至 v0.2.0 尚未发布)。 |
| 市场元数据 | package.json 内置 dsh.catalog(category workflow、中英文 summary、capabilities)与 dsh.compatibility,仓库带 dsh-plugin topic。 |
locale/en.json 只覆盖插件名称、描述与页面 meta。完整英文 UI 是后续工作,欢迎在 GitHub 贡献。Documentation language, UI language, and skill-content language are separate. This table states the real support matrix, so English docs are not mistaken for an English UI.
| Dimension | Support |
|---|---|
| Documentation | Simplified Chinese (README.md) and English (README.en.md) with matching structure and configuration tables; CHANGELOG.md, CONTRIBUTING.md, and SECURITY.md are currently English-only. |
| Plugin UI | Simplified Chinese. Locale files cover the plugin name, description, and page meta; a full English UI is not available yet. English support is currently documentation, marketplace metadata, and this site. |
| Review briefing | Built-in Chinese briefing (when to use, key steps, risks); skill bodies may be written in any language. |
| Skill content | Language-agnostic: SKILL.md files in Chinese, English, or other languages can be loaded, reviewed, and generated. |
| Implementation | JavaScript (ESM), no build step. vendor/hermes/ is a verbatim Python copy of Nous Research hermes-agent, used only for parity and prompt-fidelity audits. |
| Runtime | Node.js ≥ 20.11; DSH >=0.2.2-rc.1 <0.3.0, web profile. |
| Host platform | Wherever the DSH web host runs; CI runs on Ubuntu, other desktop platforms are not covered by this repository's CI. |
| Clients | Desktop web workbench; installable mobile PWA (iOS / Android browsers); /dsh-evolution/api/* HTTP API. |
| Review backend | Host subagent fork (default, read-only tools) or any OpenAI-compatible endpoint (DSH_EVOLUTION_BASE_URL). |
| Storage | Filesystem: SKILL.md, JSONL ledger, JSON config and telemetry; no database, no external service. |
| Distribution | GitHub repository, GitHub Release tarball, source directory; npm package @veritaswiki/dsh-evolution is prepared under a scoped name (not published as of v0.2.0). |
| Marketplace metadata | package.json ships dsh.catalog (category workflow, EN/ZH summaries, capabilities) and dsh.compatibility; the repository carries the dsh-plugin topic. |
locale/en.json covers only the plugin name, description, and page meta. A full English UI is future work, and contributions are welcome on GitHub.复盘不写文件,闸门只做静态检查,写入由插件在闸门之后完成。每一步都有边界,每一次变更都有记录。
turn/end / session/flush;剥离系统注入块;回合与分钟双重节流;快照有界(24 条 / 24000 字符)。
宿主 subagent fork(skill / glob / grep / read)或 OpenAI-compatible 端点;新回合打断上一次复盘。
结构化 JSON → SKILL.md 纯函数合成;草稿写入 .staging/,正式技能库零改动。
命名、frontmatter、禁词、体积与路径;拒绝一次性产物、环境噪声和不可命名的经验。
同名升级、同域同类、无效草稿分组;一键采纳、可选批示、驳回可撤销。
promote 写入正式库并热更新;JSONL 账本 + SHA-256 blob;单条回滚,失败关闭。
非 kebab-case、超 64 字符、fix-X / debug-Y / PR 号 / 日期戳、裸库名。
缺 description;description 超 80 字符;frontmatter.name 与目标名不一致。
负面断言、环境失败(command not found)、一次性叙事。
正文超 24000 字符;add_reference 不是 references/<topic>.md 或带日期戳。
.evolution_ledger.jsonl;文件内容按 SHA-256 去重存进 .evolution_backups/blobs/;回滚前先做安全捕获,捕获失败就拒绝。Review never writes files. Gates are static checks. The plugin writes only after the gates, and every change is recorded.
turn/end / session/flush; strip injected blocks; dual turn/minute throttling; bounded snapshots (24 messages / 24000 chars).
Host subagent fork (skill / glob / grep / read) or an OpenAI-compatible endpoint; a new turn interrupts the previous review.
Pure JSON → SKILL.md synthesis; drafts land in .staging/ while the formal library stays untouched.
Naming, frontmatter, forbidden content, and size/paths; one-off artifacts, environment noise, and unnameable lessons are rejected.
Same-name upgrades, same-domain siblings, and invalid drafts are grouped; one-click approval, optional directive, undoable rejection.
promote writes to the formal library and hot-reloads; JSONL ledger + SHA-256 blobs; single-entry rollback, fail-closed.
Non-kebab-case, over 64 chars, fix-X / debug-Y / PR numbers / date stamps, bare library names.
Missing description; description over 80 chars; frontmatter.name mismatch.
Negative claims, environment failures (command not found), one-off narratives.
Body over 24000 chars; add_reference not references/<topic>.md or date-stamped.
.evolution_ledger.jsonl; file contents are deduplicated by SHA-256 under .evolution_backups/blobs/; rollback captures the current state first and refuses if capture fails.工作台和手机 PWA 共用一套动作词汇与动效语言:采纳是一键,批示是可选增强,驳回可撤销;动效尊重 prefers-reduced-motion。
截图展示当前中文界面;完整英文 UI 尚未提供。
The workbench and mobile PWA share one action vocabulary and motion language: approval is one click, directives are optional, rejection is undoable, and motion respects prefers-reduced-motion.
Screenshots show the current Chinese UI; a full English UI is not available yet.
自动进化默认关闭;每个实际复盘的回合会增加一次模型调用。建议先用 draft 模式观察草稿质量,再决定是否开启后台复盘。
当前直接可用的安装方式;安装后把包名加入该 profile 的 dsh.profile.bundles,重启 DSH。
dsh plugin --profile web add github:veritaswiki/dsh-evolution从 v0.2.0 GitHub Release 附件安装,适合固定版本或离线分发。
dsh plugin --profile web add https://github.com/veritaswiki/dsh-evolution/releases/download/v0.2.0/dsh-evolution.tgz包名是 scoped;截至 v0.2.0 尚未发布到 npm registry。发布后可用下面命令,现在请使用 GitHub 或 Release。
dsh plugin --profile web add @veritaswiki/dsh-evolution克隆仓库并从本地目录安装,适合开发与调试。
git clone https://github.com/veritaswiki/dsh-evolution.git && dsh plugin --profile web add ./dsh-evolution~/.dsh/cordis.patch.yml不装 bundle,直接在 profile 配置中插入插件配置:
- insert:
- id: dsh-evolution
name: '@veritaswiki/dsh-evolution'
config:
enabled: false
mode: draft
skill-evolution 迁移0.2.0 把插件改名为 dsh-evolution:配置里的 id / name 改成 dsh-evolution / @veritaswiki/dsh-evolution;旧的 ~/.dsh/state/skill-evolution-settings.json 仍会被读取;技能、草稿、账本与 .usage.json 文件名不变,已有数据无需迁移。旧 npm 包 skill-evolution@0.1.1 不再更新。
每个实际复盘的回合会增加一次模型调用;复盘模型收到会话摘录,默认最近 24 条消息、总长度上限 24000 字符。请先确认模型服务商的隐私与计费规则。默认 mode: draft 只写 ~/.dsh/skills/.staging/,提升到正式库需要显式操作。
装好后运行 /evolution status,应能看到技能根目录、模式、技能数、待审草稿数与账本条数。
Automatic evolution is off by default, and each reviewed turn adds a model call. Start in draft mode to judge draft quality before enabling background review.
Works today. Add the package to the profile's dsh.profile.bundles, then restart DSH.
dsh plugin --profile web add github:veritaswiki/dsh-evolutionInstall the v0.2.0 GitHub Release asset for a pinned version or offline distribution.
dsh plugin --profile web add https://github.com/veritaswiki/dsh-evolution/releases/download/v0.2.0/dsh-evolution.tgzThe package is scoped and not yet on the npm registry as of v0.2.0. Once published, use the command below; for now use GitHub or the Release tarball.
dsh plugin --profile web add @veritaswiki/dsh-evolutionClone the repository and install from a local directory for development and debugging.
git clone https://github.com/veritaswiki/dsh-evolution.git && dsh plugin --profile web add ./dsh-evolution~/.dsh/cordis.patch.yml directlySkip the bundle and insert the plugin config into the profile directly:
- insert:
- id: dsh-evolution
name: '@veritaswiki/dsh-evolution'
config:
enabled: false
mode: draft
skill-evolution0.2.0 renames the plugin to dsh-evolution: change config id / name to dsh-evolution / @veritaswiki/dsh-evolution; the old ~/.dsh/state/skill-evolution-settings.json is still read; skill, draft, ledger, and .usage.json filenames are unchanged, so existing data needs no migration. The old npm package skill-evolution@0.1.1 will not receive updates.
Each reviewed turn adds a model call; the review model receives a session excerpt bounded to the last 24 messages and 24000 characters. Check your provider's privacy and billing terms first. mode: draft writes only to ~/.dsh/skills/.staging/; promotion to the formal library is explicit.
After installation, run /evolution status to see the skills root, mode, skill count, pending drafts, and ledger entries.
| 键 | 默认值 | 说明 |
|---|---|---|
enabled | false | 是否启用自动采集、回合后复盘与 curator 维护 |
mode | draft | draft 只写 .staging/;apply 过闸后直接落盘 |
skillsRoot | ~/.dsh/skills | 技能根目录;草稿、账本、遥测都放这里 |
httpHost | 127.0.0.1 | 独立服务监听地址;非回环地址必须配置令牌 |
httpPort | 18890 | 独立服务端口;可由 DSH_EVOLUTION_PORT 覆盖 |
httpToken | "" | 非空时每个 HTTP API 与手机 HTML 请求均须认证 |
minTurnsBetween | 1 | 两次复盘之间至少间隔多少个可复盘回合 |
minMinutesBetween | 2 | 两次复盘之间至少间隔多少分钟 |
maxMessages | 24 | 快照保留的最近消息条数 |
maxChars | 24000 | 单次复盘快照字符上限 |
reviewTimeoutSeconds | 180 | 单次复盘超时 |
curatorEnabled | true | 是否启用生命周期维护 |
staleAfterDays | 14 | 多少天未使用标记 stale |
archiveAfterDays | 30 | 多少天未使用移入 .archive/(不删除) |
| 环境变量 | 作用 |
|---|---|
DSH_EVOLUTION_BASE_URL | OpenAI-compatible 辅助端点;不设则复盘走宿主 subagent fork |
DSH_EVOLUTION_API_KEY | 辅助端点的 Bearer token |
DSH_EVOLUTION_MODEL | 辅助端点使用的模型名 |
DSH_EVOLUTION_PORT | 覆盖独立手机端服务的 httpPort |
DSH_EVOLUTION_HOST | 覆盖 httpHost |
DSH_EVOLUTION_TOKEN | 覆盖 httpToken |
DSH_EVOLUTION_SKILLS_ROOT | 覆盖 skillsRoot |
DSH_HOME | DSH 主目录,默认 ~/.dsh |
127.0.0.1:18890。LAN/Tailscale 暴露必须设置强 httpToken;非回环绑定未配置令牌会拒绝启动。手机打开 http://<LAN-IP>:18890/dsh-evolution/mobile?token=<token>。普通 HTTP 不加密令牌,远程访问请用 Tailscale 或 HTTPS 反向代理。Defaults come from cordis.patch.yml and the Schemastery definition. See the English README for the full table, every environment variable, and phone access details.
| Key | Default | Meaning |
|---|---|---|
enabled | false | Enable collection, post-turn review, and curator maintenance |
mode | draft | draft writes only .staging/; apply writes after the gates |
skillsRoot | ~/.dsh/skills | Skills root; drafts, ledger, and telemetry live here |
httpHost | 127.0.0.1 | Standalone listen address; non-loopback requires a token |
httpPort | 18890 | Standalone port; DSH_EVOLUTION_PORT overrides |
httpToken | "" | When set, every HTTP API and mobile HTML request must authenticate |
minTurnsBetween | 1 | Minimum reviewable turns between reviews |
minMinutesBetween | 2 | Minimum minutes between reviews |
maxMessages | 24 | Recent messages kept in a snapshot |
maxChars | 24000 | Snapshot character budget |
reviewTimeoutSeconds | 180 | Per-review timeout |
curatorEnabled | true | Enable lifecycle maintenance |
staleAfterDays | 14 | Days before a skill is marked stale |
archiveAfterDays | 30 | Days before a skill moves to .archive/ (never deleted) |
| Environment variable | Purpose |
|---|---|
DSH_EVOLUTION_BASE_URL | OpenAI-compatible auxiliary endpoint; without it, review uses a host subagent fork |
DSH_EVOLUTION_API_KEY | Bearer token for the auxiliary endpoint |
DSH_EVOLUTION_MODEL | Model name for the auxiliary endpoint |
DSH_EVOLUTION_PORT | Override the standalone httpPort |
DSH_EVOLUTION_HOST | Override httpHost |
DSH_EVOLUTION_TOKEN | Override httpToken |
DSH_EVOLUTION_SKILLS_ROOT | Override skillsRoot |
DSH_HOME | DSH home, default ~/.dsh |
127.0.0.1:18890 by default. LAN/Tailscale exposure requires a strong httpToken; a non-loopback bind without one refuses to start. Open http://<LAN-IP>:18890/dsh-evolution/mobile?token=<token> on the phone. Plain HTTP does not encrypt the token; use Tailscale or an HTTPS reverse proxy for remote access.关于自动修改、上下文发送、npm 状态、英文界面和数据位置的快速回答。
默认不会。自动进化默认关闭,mode: draft 只写 .staging/;即使开启,也只有 metadata.createdBy: agent 的技能会被自动改写。用户手写技能需要显式二次确认。
不会。复盘只取有界摘录:默认最近 24 条消息(另加更早消息的摘要),总长度上限 24000 字符。使用辅助端点时,摘录会发送到你配置的模型服务商;请先确认对方的隐私与计费规则。
截至 v0.2.0 还不能。@veritaswiki/dsh-evolution 尚未发布到 npm registry;请用 github:veritaswiki/dsh-evolution 或 Release tarball。npm 发布配置完成后会更新安装说明。
目前没有完整英文 UI。工作台与手机 PWA 是中文,locale/en.json 只覆盖插件名称、描述与页面 meta;英文支持体现在 README.en.md、市场元数据与本站。英文 UI 是后续工作,欢迎贡献。
草稿、归档、账本、备份和遥测都在 skillsRoot(默认 ~/.dsh/skills),设置在 ~/.dsh/state/。卸载插件不会删除这些文件;需要清理时请自行处理 .staging/、.archive/ 和账本。
DSH >=0.2.2-rc.1 <0.3.0,web profile;Node.js 需要 ≥ 20.11。
Quick answers on automatic edits, context sharing, npm status, the English UI, and where data lives.
No by default. Automatic evolution is off, and mode: draft writes only to .staging/. Even when enabled, only skills with metadata.createdBy: agent are eligible for automatic rewriting; user-authored skills require an explicit second confirmation.
No. Review uses a bounded excerpt: the last 24 messages by default (plus a digest of earlier messages), capped at 24000 characters. When an auxiliary endpoint is configured, that excerpt is sent to the model provider you chose; check their privacy and billing terms first.
Not as of v0.2.0. @veritaswiki/dsh-evolution is not yet on the npm registry; use github:veritaswiki/dsh-evolution or the Release tarball. The install instructions will be updated when publication completes.
Not yet. The workbench and mobile PWA are Chinese; locale/en.json covers only the plugin name, description, and page meta. English support currently lives in README.en.md, marketplace metadata, and this site. A full English UI is future work, and contributions are welcome.
Drafts, archives, ledger, backups, and telemetry live under skillsRoot (default ~/.dsh/skills); settings live under ~/.dsh/state/. Uninstalling the plugin does not delete these files; clean up .staging/, .archive/, and the ledger yourself if needed.
DSH >=0.2.2-rc.1 <0.3.0, web profile. Node.js ≥ 20.11.