shiyan688/dsh-novel-craft

dsh-novel-craft —— 跑在 DeepSeek Harness 上的开源 AI 小说写作插件。目的:让 AI 写出你觉得对味的文字。方法:你只点赞、点踩,模型自己总结规律,写进一份几百字节的偏好档案;正文不进写稿上下文。775 条断言 / 7 个测试文件,MIT。

Project Overview项目介绍

dsh-novel-craft is a native writing plugin for the DeepSeek Harness (DSH) agent platform, installed via the single command dsh plugin --profile web add dsh-novel-craft and mounted as two halves: a host half exposing 23 HTTP routes under /novel-craft/api/ (state, marks, evidence, distill, rules, profile, discover, project, workspace, chapter, setup, annotation, pack, revise, revise-apply, tension, check, stage, newchapter, rule-evidence) that bound to 127.0.0.1 only, and a browser half delivered as a seven-tab workbench (抽卡工作台) that DSH serves on demand with no-cache so a page refresh picks up code changes. Its core capability is "taste calibration by clicking": the reader steps through candidate paragraphs with j/k/G/B/Space/n/p, marks good or bad with a left 3px color bar and soft background, then triggers a single one-shot distillation call capped at 40 paragraphs × 240 chars / 20KB total, where the system prompt forces the model to output only 喜欢: / 避免: sections and forbids copying source text. Each distilled rule must be individually adopted to enter the profile, and every rule carries a 🔍 evidence button pointing back to the original marked spans.

Practical specifics of "open a new chapter": the user supplies a chapter goal (number, objective, must-happen, forbidden), requests N direction labels (default 10) that propose scene-level decisions rather than adjective swaps, edits or deselects them, then the system writes each surviving direction to disk immediately as 第13章-A-保守精修.txt (visible "第 3/10 篇", mid-run abort safe, single-file failure isolated) and the approved paragraphs can be merged into a final draft that flags 〔此处需过渡〕 gaps instead of bridging them. Revision only touches annotated paragraphs (each ≤800 chars, batch ≤20), assembles ±80 chars of context, and a literal byte-diff guard rejects writes when any non-annotated paragraph drifts or the paragraph count changes, with originals auto-backed up before write-back. The 情节 tab runs purely local string statistics — tension curve (manual 1–5 vs estimated dashed with per-point rationale), outline drift, unresolved foreshadowing ledger, word-count imbalance, event density, score decline — never feeding the novel body into the model.

Practical specifics of dependencies, limits, lifecycle: the writing pack sent into the model is 9000 chars across 10 sections (chapter task, author preference profile, previous chapter tail ≤900 chars, recap from summaries, characters, props/buffs ledger, plot nodes, pending foreshadowing, anti-AI-tone list, writing requirements) trimmed in a fixed priority order with a budget table appended and an explicit "do not load into context" footer that lists evidence excerpts, annotation files, full-book merges, and so on; the three buttons that may carry body text (提炼规律, 补齐来源, 按批注微调) each have hard limits printed in the README. The host half is loaded at DSH startup so the user must restart DSH after install; peer dependencies are declared as *, verified against DSH 0.1.0-rc.7, 0.1.2-rc.1, 0.1.5-rc.1 (latest), 0.1.5-rc.2 (next), 0.1.6-alpha.1 via node scripts/check-dsh-compat.mjs next (latest/alpha/specific), which spins up a temporary DSH install with isolated DSH_HOME and asserts host routes + client bundle delivery then cleans up. DSH ≥0.1.5 requires Node 22 because Node 20 makes dsh web exit silently (no log, no port), and the compat script auto-searches for Node 22 and reports that as an environment failure rather than a plugin regression. Tests run via npm test (7 files, 775 assertions, no host-path dependency, fixtures built in temp dirs) and the package is MIT-licensed.

dsh-novel-craft 是一个面向 DeepSeek Harness(DSH)的原生写作插件,通过 dsh plugin --profile web add dsh-novel-craft 命令安装,挂载为宿主半区(23 条 HTTP 接口)和浏览器半区(七页签工作台),仅服务 127.0.0.1。它把"点选校准"做成核心:作者用键盘 G/B 标好/坏段落(顶部三段式引导、悬浮按钮、幂等去重),候选按字号 15.75、行高 1.95 排版,底部显示「第 N/M 段」;「⚗️ 提炼规律」将 ≤40 段×240 字(总 ≤20KB)的一次性调用交给模型,强制输出"喜欢/避免"两节、禁止抄原文,结果需逐条勾选才入档,每条可点击「🔍 证据」追溯原始段落。规律只占几百字节,因此能进入每章写稿上下文。

典型流程为:选候选目录→键鼠阅读标注→提炼规律→「✍️ 开新章」四步(任务、挑方向、写稿、合并)→「按批注微调」仅改被批注段落(逐字核对、备份、写回)→「📈 情节」本地字符串体检(张力曲线手工/估算、伏笔欠账、字数失衡)。适合想用 DSH 跑长篇小说的作者;正文绝不进写稿上下文(写作包 9000 字、10 节预算),仅规律、设定、上章结尾、禁 AI 腔清单随包。仅三处按钮会带原文,每处都有硬上限写明。

依赖方面:宿主半区随 DSH 启动装载(装后须重启 DSH),peer 声明为 *,实测通过 0.1.0-rc.7、0.1.2-rc.1、0.1.5-rc.1/latest、0.1.5-rc.2/next、0.1.6-alpha.1,可跑 node scripts/check-dsh-compat.mjs next 验证;DSH ≥0.1.5 需 Node 22(Node 20 会静默退出,脚本会自动寻找并判为环境问题)。测试 7 文件 775 条断言(npm test),不依赖本机路径;许可证 MIT。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 6 stars - very few users, little community feedback星标只有 6,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-novel-craft

把 shiyan688/dsh-novel-craft 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-novel-craft

English: docs/README.en.md(只放在仓库里,不进 npm 包——否则 npm 页面会显示英文版)

dsh-novel-craft 是一个跑在 DeepSeek Harness(dsh)上的开源 AI 小说写作插件(MIT 协议,npm 一行安装)。它解决的是「怎么让 AI 写出符合你个人文风的小说」——不用反复调提示词,也不用逐段写评语。

目的:让 AI 写出你觉得对味的文字。

方法:你只点赞、点踩,模型自己总结规律。

读候选稿时顺手点一下——好段落 👍、坏段落 👎。然后让模型把这批点选总结成几条能照着做的写法,写进一份档案。下一轮写稿带着这份档案,写完再点、再总结。它总结出来的东西长这样(我自己的档案):

## 已验证偏好(作者喜欢什么)
- 让在场群像先静默再爆响
- 危险降临先写器物异动,再写人的闷哼
## 避免的写法(作者不喜欢什么)
- 不要用比喻堆砌来写人群的恐惧
- 不要在施法后补旁白解释动机

这些不是我写的,是我点出来的。每条后面能点「🔍 证据」,看它当年是从哪几段原文里总结的;不认同的直接删掉。

**档案里只有规律,没有原文。**这是这个方法能成立的前提:原文一轮就几千字,带两轮上下文就满了,更别说一本书——带不动的东西,谈不上"持续"。规律是几百字节(我的是 714 字节),每一轮写稿都带得动;而且模型记住的是"怎么写",不是"这几句长什么样",前者能迁移到新章节,后者只会被抄。所以它能一轮轮跑下去,越用越对味。

可靠性信号:775 条断言 / 7 个测试文件,每个能力都有真数据用例;发版前请三个独立视角复审,四个高危问题先复现再修。详见「这东西靠谱吗」。


适合谁用 / 不适合谁用

适合:

  • 已经在用 DeepSeek Harness(dsh),想让它帮着写小说 / 网文
  • 长篇连载作者,需要十几万字不崩的设定与伏笔管理
  • 已经有明显个人文风,但说不清自己到底要什么
  • 刚开始写、还没形成固定风格 —— 点一轮,同时也是给自己标一次「我喜欢什么」
  • 愿意每轮花几分钟点一遍段落,换长期越用越准

不适合:

  • 没用过 dsh,也不打算装(本插件依赖 dsh)
  • 想让 AI 一键自动生成整本小说
  • 想要零投入全自动的

前置条件:Node 22 + DeepSeek Harness。dsh ≥ 0.1.5 在 Node 20 下起 dsh web 会静默退出(不打印、不监听端口),看起来特别像"插件不兼容",其实是环境问题。


它和别的做法有什么不一样

要让 AI 写出你的味道,常见有四条路。区别不在于谁更聪明,在于你要付出什么:

做法 你要付出什么 AI 学到的是什么 能跑几轮
自己写提示词 反复调,换个对话还得重来 这一轮的指令 一次
逐段写评语 每轮读 8–10 篇、每篇两三千字,还得说清"哪里好" 一些形容词 一两轮就退化
上传风格样本 / 微调模型 准备语料、等训练、结果不可控 你的句子长什么样 看语料量
dsh-novel-craft 读的时候顺手点一下 你的规律(怎么写) 一轮轮持续

为什么要做这个

因为原来的两条路都太累。

自己写提示词。"别写那么用力"它听不懂,你得反复调;调好这一次,下次开个新对话又得重来。

**逐段给它写评语。**一轮摊开八到十篇候选,每篇两三千字,读完还要说"哪里好"——说不出来,只会觉得"这篇有感觉"。勉强写下的那些"更细腻""节奏不错""有点刻意",翻译回写作等于没说,第三轮它还是同一个毛病,只是换了个说法。

说到底:**判断很好下,表达很难写。**点一下是一秒钟的事;让你把"我想要什么"讲清楚,你写得动十次,写不动一百次。所以别让你表达,让模型总结。


安装:一行命令

dsh plugin --profile web add dsh-novel-craft

装完重启一次 dsh(宿主半区在启动时装载)。侧栏底部会出现「🎴 抽卡工作台」。

不想装也能先看:把仓库里的 docs/preview.html 用浏览器打开,那是真实组件渲染出来的界面快照,七个页签都能点。


怎么用

一、点它一轮,它就学到一点

选一个放着候选稿的目录(选择器会推荐、记最近、也能浏览,不用记路径),然后读,按键盘:

j/k 换段 · G 标好 · B 标坏 · 空格 取消 · n/p 换篇

读完点「⚗️ 提炼规律」。它把这一批点选总结成条目,你逐条勾选,采纳的才进档案。不勾的不会进去——所以你永远能拦下它总结错的部分。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-skin-manager 下一个 Next dsh-huadongbianzuqi →