nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:ZyxQl-Ala/dsh-rollover
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
上下文滚段 —— 在上下文窗口快满之前,把「上一段发生了什么」保存下来,换到新的一段时再交给自己。
Context rollover for DeepSeek Harness: watch context pressure, save a 接续前情 handoff before the window fills, and re-inject it once in the next session segment.
DSH 会话满的时候有两种糟糕结局:
这个插件把两者之间补上一段:
contextPressure,超过 warnAt(默认 45%)就在系统提示词里提醒「顺手写进记忆」;超过 threshold(默认 60%)提醒「该滚段了」;rollover_handoff 把最近 keepTurns 轮对话提炼成《接续前情》,存成
<state>/rollover/handoffs/<sessionId>.md;dsh-decay-memory,同时写一条 📌 永久记忆(换段后每轮都能看到);| 工具 | 作用 |
|---|---|
rollover_status |
当前会话占用比例、是否该滚段(fine / getting-full / should-roll) |
rollover_handoff |
生成并保存《接续前情》(可附一句留给下一段的话) |
{
"warnAt": 0.45, // 开始提醒
"threshold": 0.6, // 建议滚段
"keepTurns": 12, // 接续前情取最近几轮
"maxChars": 5000,
"injectIntoMemory": true, // 同时写进 dsh-decay-memory 的 📌 记忆
"stateDir": "" // 默认 $DSH_HOME/rollover
}
$DSH_HOME/rollover/handoffs/<sessionId>.md 接续前情正文
$DSH_HOME/rollover/state.json 已注入记录
$DSH_HOME/decay-memory/memory.json 可选:📌 记忆
纯本地、无网络、无遥测。会话识别用的是 DSH 自己的投影缓存(storages/session_projcache/sessions),不需要任何额外权限。
MIT
<你的 DSH 地址>/rollover页面可以:看当前会话占用进度、看《接续前情》存档(自动/手动、已注入/待注入)、改阈值与冷却、点「立即生成接续前情」。
默认开启:占用 >= autoAt(默认 60%)时插件自己生成《接续前情》——不依赖模型调用,写 $DSH_HOME/rollover/handoffs/<sessionId>.md,并写进 dsh-decay-memory 的 📌 记忆;同一会话 10 分钟冷却(autoCooldownMs)。
数据接口(同源、需要 DSH 登录态):
GET /rollover/api/state
POST /rollover/api/config { warnAt, threshold, autoAt, autoCooldownMs, keepTurns, maxChars, autoHandoff, injectIntoMemory }
POST /rollover/api/action { op: "handoff" | "reset-injected" | "delete-handoff", ... } CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: context。