dsh-diaolong 0.0.0-stage → 0.3.0
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/LICENSE +21 -0
- package/README.en.md +97 -0
- package/README.md +96 -2
- package/client.js +1158 -0
- package/converter.js +209 -0
- package/cordis.patch.yml +6 -0
- package/docs/DETAIL.en.md +111 -0
- package/docs/DETAIL.md +110 -0
- package/icon.svg +25 -0
- package/index.js +407 -0
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +70 -4
- package/prose_lint.js +324 -0
- package/skills/diaolong-author-studies/SKILL.md +55 -0
- package/skills/diaolong-author-studies/authors/zh/_roster.md +47 -0
- package/skills/diaolong-author-studies/authors/zh/_template-zh.md +70 -0
- package/skills/diaolong-author-studies/authors/zh/a-lai.md +68 -0
- package/skills/diaolong-author-studies/authors/zh/chen-zhongshi.md +68 -0
- package/skills/diaolong-author-studies/authors/zh/lu-xun.md +76 -0
- package/skills/diaolong-author-studies/authors/zh/lu-yao.md +68 -0
- package/skills/diaolong-author-studies/authors/zh/mo-yan.md +68 -0
- package/skills/diaolong-author-studies/authors/zh/wang-anyi.md +68 -0
- package/skills/diaolong-author-studies-en/SKILL.md +55 -0
- package/skills/diaolong-author-studies-en/authors/en/_roster-en.md +35 -0
- package/skills/diaolong-author-studies-en/authors/en/_template-en.md +70 -0
- package/skills/diaolong-author-studies-en/authors/en/hemingway.md +84 -0
- package/skills/diaolong-critique/SKILL.md +131 -0
- package/skills/diaolong-gongwen/SKILL.md +359 -0
- package/skills/diaolong-style-atlas/SKILL.md +473 -0
- package/skills/diaolong-style-profiles/SKILL.md +673 -0
- package/skills_install.js +168 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 dsh-diaolong contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.en.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Diaolong · Literary Craft (dsh-diaolong)
|
|
2
|
+
|
|
3
|
+
> Help AI write like literature, not like AI.
|
|
4
|
+
|
|
5
|
+
[中文](./README.md) · [Plugin details](./docs/DETAIL.en.md) · [License](./LICENSE)
|
|
6
|
+
|
|
7
|
+
Diaolong is a **literary-craft skill pack** for [DeepSeek Harness](https://github.com/deepseek-ai/DeepSeek-Harness). It does not teach AI to "imitate a famous author's voice." It breaks the time-tested technical legacies of literature into actionable writing rules: how baimiao works, how the iceberg omits, how images accumulate, where rhythm tightens and where it releases.
|
|
8
|
+
|
|
9
|
+
The name comes from *Wenxin Diaolong* (《文心雕龙》), the classic of Chinese literary craft — "diaolong" means carving the mind of literature.
|
|
10
|
+
|
|
11
|
+
## Why dissect technique instead of imitating style
|
|
12
|
+
|
|
13
|
+
- **Voice imitation carries copyright risk**: pastiching protected expression only yields a counterfeit; dissecting technique is criticism, study, and learning.
|
|
14
|
+
- **Imitation only copies the surface**: short sentences and ellipses are symptoms; what actually holds prose up is narrative distance, information gaps, and image structure.
|
|
15
|
+
- **Dissection is reusable by AI**: a technique is a checkable, executable rule that enters the writing workflow and review checklist directly.
|
|
16
|
+
|
|
17
|
+
## Skills and tools
|
|
18
|
+
|
|
19
|
+
| Skill | What it does |
|
|
20
|
+
|-------|--------------|
|
|
21
|
+
| `diaolong-style-atlas` | The style atlas: baimiao / synaesthesia / image systems / iceberg omission / narrative distance / stream of consciousness / rhythm / irony / metaphor & metaphor systems / free indirect discourse / point of view & focalization / dialogue & subtext / significant detail / montage & juxtaposition / sound & euphony / parallelism & repetition — each with definition, tell-tale features, use cases, self-check lists, and combination rules |
|
|
22
|
+
| `diaolong-style-profiles` | Popular style profiles: 20 mainstream writing styles (wenyi literary-illness / student naivete / gufeng classical / webnovel power-fantasy / sweet romance / cold suspense / rustic idyll / prose-poetic / light-novel translationese / melancholy net-native / Beijing colloquial / Hong Kong urban / Wang Xiaobo-esque rational absurdism / wuxia jianghu martial world / xuanhuan-xianxia cultivation / urban healing / Republican-era Shanghai / cyberpunk / historical power-struggle / officialese) with portraits, signature lines, use cases, and pitfalls |
|
|
23
|
+
| `diaolong-author-studies` | Chinese author technique dossiers: Mao Dun Prize & Nobel laureates and influential writers, with imitation exercises and common failure modes |
|
|
24
|
+
| `diaolong-author-studies-en` | English author technique dossiers (same structure, English branch) |
|
|
25
|
+
| `diaolong-critique` | Literary critique: a seven-layer review plus Chinese/English AI-flavor word lists, output as a P0/P1/P2 issue report |
|
|
26
|
+
| `diaolong-gongwen` | Officialese / official-document zone: document-type quick reference, plain-speech-to-officialese conversion, high-frequency terminology, stock sentence patterns and register discipline, with a built-in "truth red lines" section — truthfully reflecting the facts is the first principle; AI drafts need human review |
|
|
27
|
+
|
|
28
|
+
| Tool | What it does |
|
|
29
|
+
|------|--------------|
|
|
30
|
+
| `diaolong_lint` | Prose health check: sentence/paragraph stats, adverb density, exclamation/ellipsis counts, AI-flavor hits, parallel constructions — with a P1/P2 issue list and fix suggestions |
|
|
31
|
+
| `diaolong_convert` | One-click rewriting: reads the atlas / style-profile / officialese dossiers and rewrites text in the chosen style, technique, or document type — the AI can pick any target when calling it |
|
|
32
|
+
|
|
33
|
+
### UI panel
|
|
34
|
+
|
|
35
|
+
A "Diaolong" panel appears in the Web GUI sidebar, sharing the exact same analysis algorithm as the tool:
|
|
36
|
+
|
|
37
|
+
- **Prose checkup**: paste text → instant report (stat cards, density bars, AI-flavor hits, P1/P2 issue list); copy the report or take it into a chat for rewriting.
|
|
38
|
+
- **Style profiles**: 20 style cards — type text once, then click a card for an instant in-panel rewrite.
|
|
39
|
+
- **Technique atlas**: 16 technique quick-reference cards, same one-click rewriting.
|
|
40
|
+
- **Officialese**: 11 document-type cards with one-click conversion + a truth-red-lines notice.
|
|
41
|
+
- One-click rewriting goes through the host remote service `diaolong.convert` (the same dossiers and algorithm as the `diaolong_convert` tool); on older hosts without that service the UI falls back to copying a prompt.
|
|
42
|
+
- In-chat `diaolong_lint` tool calls render as a rich report card.
|
|
43
|
+
|
|
44
|
+
The client UI is generated by `ui-template.js` + `build-client.mjs`: running `node build-client.mjs` produces `client.js`, which inlines the `prose_lint.js` analysis logic into the UI — one algorithm, two surfaces, never out of sync.
|
|
45
|
+
|
|
46
|
+
## Copyright tier discipline
|
|
47
|
+
|
|
48
|
+
Every dossier obeys a three-tier discipline built into the skills themselves:
|
|
49
|
+
|
|
50
|
+
- **Tier A · Public domain**: short original quotations allowed (e.g. Lu Xun).
|
|
51
|
+
- **Tier B · Deceased, protected**: technique analysis only, plus minimal commentarial quotation.
|
|
52
|
+
- **Tier C · Living authors**: original technique analysis only, no quotations; all examples self-written.
|
|
53
|
+
|
|
54
|
+
Classify before quoting; when in doubt, apply the stricter tier.
|
|
55
|
+
|
|
56
|
+
## Install
|
|
57
|
+
|
|
58
|
+
Install as a DSH plugin:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# from npm
|
|
62
|
+
npm install dsh-diaolong
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Or search "Diaolong" in the DSH plugin market / Discover tab.
|
|
66
|
+
|
|
67
|
+
After installation, six `diaolong-*` skills appear in the agent's skill catalog and the `diaolong_lint` and `diaolong_convert` tools become available — just talk to the agent:
|
|
68
|
+
|
|
69
|
+
- "Rewrite this passage with the Diaolong style atlas: baimiao × iceberg, cut half the adjectives."
|
|
70
|
+
- "Write a farewell scene in the wenyi literary-illness style, avoiding its pitfalls."
|
|
71
|
+
- "Run three imitation exercises following the Lu Xun dossier, then check failure modes against the Mo Yan dossier."
|
|
72
|
+
- "Critique this chapter with Diaolong, focusing on AI flavor and rhythm."
|
|
73
|
+
- "Rewrite this work note as a proper request-for-instructions document, minding the truth red lines."
|
|
74
|
+
- "Run diaolong_lint on this passage."
|
|
75
|
+
- "Use diaolong_convert to rewrite this in Wang Xiaobo-esque style."
|
|
76
|
+
- "Use diaolong_convert with mode=technique, target=baimiao."
|
|
77
|
+
|
|
78
|
+
## Collection roadmap
|
|
79
|
+
|
|
80
|
+
The first batch is **quality-first**: shipping dossiers are Lu Xun (Tier A), Lu Yao and Chen Zhongshi (Tier B), Mo Yan, A Lai and Wang Anyi (Tier C), and Hemingway (quotations limited to pre-1928 public-domain works). `authors/zh/_roster.md` lists every Mao Dun Literature Prize winner (editions 1–11) with their winning works as the expansion queue; later batches add other awards and influential writers.
|
|
81
|
+
|
|
82
|
+
## Roadmap
|
|
83
|
+
|
|
84
|
+
- [x] v0.1 complete plugin skeleton + first-batch skills and dossiers
|
|
85
|
+
- [x] `diaolong_lint` prose-health tool (adverb density, AI-flavor frequency, rhythm metrics)
|
|
86
|
+
- [x] Popular style profiles skill (20 styles, incl. wenyi literary-illness, student naivete, and Wang Xiaobo-esque)
|
|
87
|
+
- [x] Officialese skill `diaolong-gongwen` (document-type reference, plain-speech conversion, truth red lines)
|
|
88
|
+
- [x] Diaolong UI panel (checkup / style profiles / technique atlas / officialese tabs + tool report card)
|
|
89
|
+
- [ ] Dossier expansion batches (remaining Mao Dun Prize editions, then Nobel laureates writing in Chinese)
|
|
90
|
+
|
|
91
|
+
## Contributing
|
|
92
|
+
|
|
93
|
+
PRs welcome. Before adding an author dossier, read the relevant `_template` and follow the copyright tier discipline strictly; quotations must note the source and the tier determination. Discussions go in Issues.
|
|
94
|
+
|
|
95
|
+
## License
|
|
96
|
+
|
|
97
|
+
[MIT](./LICENSE) © 2025 dsh-diaolong contributors
|
package/README.md
CHANGED
|
@@ -1,3 +1,97 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 雕龙 · 文学素养(dsh-diaolong)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> 让 AI 写得更像文学、更不像 AI。
|
|
4
|
+
|
|
5
|
+
[English](./README.en.md) · [插件详情](./docs/DETAIL.md) · [License](./LICENSE)
|
|
6
|
+
|
|
7
|
+
雕龙是一套面向 [DeepSeek Harness](https://github.com/deepseek-ai/DeepSeek-Harness) 的**文学素养技能集**。它不教 AI「模仿某位作者的腔调」,而是把文学史上经过时间检验的技法遗产拆解成可操作的写作规则:白描怎么写、冰山怎么留、意象怎么埋、节奏哪里绷紧哪里松开。
|
|
8
|
+
|
|
9
|
+
名字出自《文心雕龙》——「雕龙」即雕琢文心。
|
|
10
|
+
|
|
11
|
+
## 为什么是「拆解技法」而不是「模仿文风」
|
|
12
|
+
|
|
13
|
+
- **文风模仿有版权风险**:仿写他人仍受版权保护的文字表达,产出的只是仿制品;拆解技法属于批评、研究与学习。
|
|
14
|
+
- **模仿只能学到表面**:短句与省略号是症状;真正让文字立起来的是叙事距离、信息差与意象结构。
|
|
15
|
+
- **拆解才能让 AI 复用**:技法是可检查、可执行的规则,能直接进入写作流程与审校清单。
|
|
16
|
+
|
|
17
|
+
## 技能与工具一览
|
|
18
|
+
|
|
19
|
+
| 技能 | 作用 |
|
|
20
|
+
|------|------|
|
|
21
|
+
| `diaolong-style-atlas` | 技法地图:白描 / 通感 / 意象系统 / 冰山留白 / 叙事距离 / 意识流 / 节奏 / 反讽 / 比喻与隐喻系统 / 自由间接引语 / 视角与聚焦 / 对话与潜台词 / 细节聚焦 / 蒙太奇与场景并置 / 声音与音韵 / 排比与复沓,各含定义、判别特征、适用场景、自检清单与组合规则 |
|
|
22
|
+
| `diaolong-style-profiles` | 热门文风谱系:文青病(张嘉佳式)、学生青涩、古风、爽文体、晋江甜宠、悬疑冷峻、乡土淡泊、散文诗化、轻小说翻译腔、网抑云丧系、京味口语、港风、王小波式、武侠江湖、玄幻仙侠、都市治愈、民国风情、赛博朋克、历史权谋、公文体共 20 种流行风格的画像、典型句式、适用场景与雷区 |
|
|
23
|
+
| `diaolong-author-studies` | 中文名家技法档案:茅盾文学奖、诺贝尔文学奖得主及影响力作家的技法档案,含仿写练习与常见失败模式 |
|
|
24
|
+
| `diaolong-author-studies-en` | 英文名家技法档案(同构,英文分区) |
|
|
25
|
+
| `diaolong-critique` | 文学性审校:七层检查 + 中英文 AI 腔词表,输出 P0/P1/P2 分级问题清单 |
|
|
26
|
+
| `diaolong-gongwen` | 公文/官话专区:文种速查、白话转官话对照、高频公文术语、惯用句式与语体纪律,内置「真实性红线」——真实反映情况是第一原则,AI 稿须人工核验 |
|
|
27
|
+
|
|
28
|
+
| 工具 | 作用 |
|
|
29
|
+
|------|------|
|
|
30
|
+
| `diaolong_lint` | 文笔体检:统计句长 / 段落 / 副词密度 / 感叹号 / 省略号 / AI 腔词与排比句式,输出 P1/P2 分级问题清单与修改建议 |
|
|
31
|
+
| `diaolong_convert` | 一键改写:读取技法地图 / 文风谱系 / 公文专区档案,按指定的风格、技法或文种改写文本,AI 调用时可自由选择目标 |
|
|
32
|
+
|
|
33
|
+
### UI 面板
|
|
34
|
+
|
|
35
|
+
侧栏新增「雕龙」面板(Web GUI),与工具共用同一套体检算法:
|
|
36
|
+
|
|
37
|
+
- **文笔体检**:粘贴文字 → 一键出报告(统计卡、密度条、AI 腔命中、P1/P2 问题清单),可复制报告或一键带报告去对话改写。
|
|
38
|
+
- **风格谱系**:20 张风格卡速查,顶部输入文字后点卡片**一键直出改写结果**。
|
|
39
|
+
- **技法地图**:16 技法速查卡,同样支持一键改写。
|
|
40
|
+
- **公文专区**:文种卡(11 种常用文种)一键转写 + 真实性红线提示条。
|
|
41
|
+
- 面板的一键改写通过宿主远程服务 `diaolong.convert` 完成(与 `diaolong_convert` 工具共用同一套档案与算法);旧版宿主没有该服务时自动降级为「复制提示词」。
|
|
42
|
+
- 会话内的 `diaolong_lint` 工具调用也会渲染成富报告卡。
|
|
43
|
+
|
|
44
|
+
客户端 UI 由 `ui-template.js` + `build-client.mjs` 生成:`node build-client.mjs` 产出 `client.js`(把 `prose_lint.js` 的体检逻辑内联进 UI,两处共用同一套算法,永不漂移)。
|
|
45
|
+
|
|
46
|
+
## 版权分级纪律
|
|
47
|
+
|
|
48
|
+
所有档案遵守三层分级,内置在技能本身:
|
|
49
|
+
|
|
50
|
+
- **A 类 · 公有领域**:可引用原文短例(如鲁迅)。
|
|
51
|
+
- **B 类 · 已故、保护期内**:仅技法分析 + 极短评论性引文。
|
|
52
|
+
- **C 类 · 在世作者**:仅原创技法分析,不引原文;示例全部自撰。
|
|
53
|
+
|
|
54
|
+
引用前先判级;无法确定时从紧。
|
|
55
|
+
|
|
56
|
+
## 安装
|
|
57
|
+
|
|
58
|
+
作为 DSH 插件安装:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# 从 npm
|
|
62
|
+
npm install dsh-diaolong
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
或在 DSH 的插件市场 / Discover 页搜索「雕龙」。
|
|
66
|
+
|
|
67
|
+
安装后,Agent 的技能目录中会出现 `diaolong-*` 六个技能,并可用 `diaolong_lint` 与 `diaolong_convert` 两个工具,直接对话即可使用:
|
|
68
|
+
|
|
69
|
+
- 「用雕龙技法地图改写这段:白描 × 冰山,砍掉一半形容词。」
|
|
70
|
+
- 「按文青病风格写一段青春告别,注意别踩雷区。」
|
|
71
|
+
- 「按鲁迅档案做三次仿写练习,再按莫言档案查失败模式。」
|
|
72
|
+
- 「用雕龙审校这一章,重点查 AI 腔和节奏。」
|
|
73
|
+
- 「把这段工作材料改写成规范的请示,注意真实性红线。」
|
|
74
|
+
- 「跑一遍 diaolong_lint 体检这段文笔。」
|
|
75
|
+
- 「用 diaolong_convert 把这段话改成王小波式,不要改原意。」
|
|
76
|
+
- 「用 diaolong_convert 以『白描』技法改写这段,mode 选 technique。」
|
|
77
|
+
|
|
78
|
+
## 收录规划
|
|
79
|
+
|
|
80
|
+
首期**质量优先**:随包档案为鲁迅(A 类)、路遥、陈忠实(B 类)、莫言、阿来、王安忆(C 类)、海明威(引用限 1928 年前公有领域作品)。`authors/zh/_roster.md` 已列出茅盾文学奖第 1–11 届全部获奖者与获奖作品作为扩展清单;后续分批补齐其他奖项与影响力人物。
|
|
81
|
+
|
|
82
|
+
## 路线图
|
|
83
|
+
|
|
84
|
+
- [x] v0.1 完整插件骨架 + 首批技能与档案
|
|
85
|
+
- [x] `diaolong_lint` 文笔体检工具(统计副词密度、AI 腔词频、节奏指标)
|
|
86
|
+
- [x] 热门文风谱系技能(20 种流行风格,含文青病、学生青涩与王小波式)
|
|
87
|
+
- [x] 公文/官话技能 diaolong-gongwen(文种速查、白话转官话、真实性红线)
|
|
88
|
+
- [x] 雕龙 UI 面板(体检 / 风格谱系 / 技法地图 / 公文专区四页签 + 工具报告卡)
|
|
89
|
+
- [ ] 作者档案分批扩充(茅奖其余届次、诺奖中文写作获奖者)
|
|
90
|
+
|
|
91
|
+
## 贡献
|
|
92
|
+
|
|
93
|
+
欢迎 PR。新增作者档案请先读对应 `_template`,严格遵守版权分级纪律;引用原文需标注出处与层级判定依据。讨论请开 Issue。
|
|
94
|
+
|
|
95
|
+
## 许可证
|
|
96
|
+
|
|
97
|
+
[MIT](./LICENSE) © 2025 dsh-diaolong contributors
|