dislop 0.9.0 → 1.0.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.
Files changed (124) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/.codex-plugin/plugin.json +7 -8
  4. package/.cursor-plugin/plugin.json +2 -3
  5. package/.pre-commit-hooks.yaml +5 -12
  6. package/PRODUCT.md +19 -57
  7. package/README.md +360 -252
  8. package/README.zh-CN.md +390 -240
  9. package/action.yml +30 -39
  10. package/bin/dislop-mcp.mjs +3 -4
  11. package/bin/dislop.mjs +4 -4582
  12. package/gemini-extension.json +2 -2
  13. package/llms-install.md +68 -0
  14. package/package.json +17 -55
  15. package/packs/common/artifact-qa/pack.json +5 -0
  16. package/packs/common/artifact-qa/prompts/rules.md +11 -0
  17. package/packs/common/artifact-qa/scripts/index.mjs +173 -0
  18. package/packs/common/slide-deck/pack.json +6 -0
  19. package/packs/common/slide-deck/prompts/rules.md +11 -0
  20. package/packs/common/slide-deck/scripts/index.mjs +62 -0
  21. package/packs/common/web-ui/pack.json +6 -0
  22. package/packs/common/web-ui/prompts/rules.md +11 -0
  23. package/packs/common/web-ui/scripts/index.mjs +80 -0
  24. package/packs/en/artifact-qa/pack.json +6 -0
  25. package/packs/en/artifact-qa/prompts/rules.md +14 -0
  26. package/packs/en/artifact-qa/scripts/index.mjs +90 -0
  27. package/packs/en/prose/pack.json +7 -0
  28. package/packs/en/prose/prompts/rules.md +26 -0
  29. package/packs/en/prose/scripts/index.mjs +290 -0
  30. package/packs/en/slide-deck/pack.json +7 -0
  31. package/packs/en/slide-deck/prompts/rules.md +17 -0
  32. package/packs/en/slide-deck/scripts/index.mjs +81 -0
  33. package/packs/en/web-ui/pack.json +7 -0
  34. package/packs/en/web-ui/prompts/rules.md +20 -0
  35. package/packs/en/web-ui/scripts/index.mjs +103 -0
  36. package/packs/zh/artifact-qa/pack.json +6 -0
  37. package/packs/zh/artifact-qa/prompts/rules.md +14 -0
  38. package/packs/zh/artifact-qa/scripts/index.mjs +89 -0
  39. package/packs/zh/prose/pack.json +7 -0
  40. package/packs/zh/prose/prompts/rules.md +26 -0
  41. package/packs/zh/prose/scripts/index.mjs +305 -0
  42. package/packs/zh/slide-deck/pack.json +7 -0
  43. package/packs/zh/slide-deck/prompts/rules.md +17 -0
  44. package/packs/zh/slide-deck/scripts/index.mjs +75 -0
  45. package/packs/zh/web-ui/pack.json +7 -0
  46. package/packs/zh/web-ui/prompts/rules.md +20 -0
  47. package/packs/zh/web-ui/scripts/index.mjs +98 -0
  48. package/plugin.json +5 -6
  49. package/server.json +8 -2
  50. package/skills/deslop-docs/SKILL.md +10 -8
  51. package/skills/deslop-slides-docx/SKILL.md +7 -8
  52. package/skills/deslop-verify/SKILL.md +7 -8
  53. package/skills/deslop-web-ui/SKILL.md +7 -8
  54. package/skills/dislop/SKILL.md +16 -28
  55. package/skills/dislop/references/essay.md +1 -1
  56. package/skills/dislop/references/essay.zh-CN.md +1 -1
  57. package/skills/dislop/references/office.md +1 -1
  58. package/skills/dislop/references/office.zh-CN.md +1 -1
  59. package/skills/dislop/references/web-ui.md +1 -1
  60. package/skills/dislop/references/web-ui.zh-CN.md +1 -1
  61. package/skills/dislop/references/work-docs.md +1 -1
  62. package/skills/dislop/references/work-docs.zh-CN.md +1 -1
  63. package/src/cli-main.mjs +210 -0
  64. package/src/commands/check-fix.mjs +169 -0
  65. package/src/commands/doctor.mjs +110 -0
  66. package/src/commands/init.mjs +49 -0
  67. package/src/commands/login.mjs +82 -0
  68. package/src/commands/model.mjs +130 -0
  69. package/src/commands/packs.mjs +44 -0
  70. package/src/commands/verify.mjs +133 -0
  71. package/src/commands/voice.mjs +84 -0
  72. package/src/kernel/config.mjs +232 -0
  73. package/src/kernel/document-model.mjs +1412 -0
  74. package/src/kernel/fact-gate.mjs +615 -0
  75. package/src/kernel/file-discovery.mjs +139 -0
  76. package/src/{binary-node.mjs → kernel/ooxml-binary.mjs} +532 -893
  77. package/src/kernel/pack-loader.mjs +715 -0
  78. package/src/kernel/patcher.mjs +341 -0
  79. package/src/kernel/pipeline.mjs +267 -0
  80. package/src/kernel/prompt-assembler.mjs +307 -0
  81. package/src/kernel/voice-profile.mjs +177 -0
  82. package/src/mcp/stdio-server.mjs +372 -0
  83. package/src/runners/auto-fix.mjs +59 -0
  84. package/src/runners/interactive-tty.mjs +461 -0
  85. package/src/runners/reporters.mjs +256 -0
  86. package/src/runtime/chunker.mjs +87 -0
  87. package/src/runtime/json-extract.mjs +144 -0
  88. package/src/runtime/privacy-gate.mjs +97 -0
  89. package/src/runtime/providers/anthropic.mjs +65 -0
  90. package/src/runtime/providers/cloud.mjs +136 -0
  91. package/src/runtime/providers/gemini.mjs +91 -0
  92. package/src/runtime/providers/local-model.mjs +139 -0
  93. package/src/runtime/providers/openai-compat.mjs +130 -0
  94. package/src/runtime/router.mjs +315 -0
  95. package/src/sdk/index.mjs +137 -0
  96. package/models/manifest.json +0 -90
  97. package/models/pocket-slop-v1.json +0 -1
  98. package/packs/business-brief/pack.json +0 -937
  99. package/packs/core/pack.json +0 -209
  100. package/packs/deck-and-ui/pack.json +0 -539
  101. package/packs/engineering-spec/pack.json +0 -144
  102. package/packs/executive-deck/pack.json +0 -98
  103. package/packs/literary-essay/pack.json +0 -344
  104. package/packs/regulated-comms/pack.json +0 -99
  105. package/patterns/ai-tic-rubric.json +0 -252
  106. package/patterns/banks/composite-fusion.json +0 -48
  107. package/patterns/banks/discourse-rhythm.json +0 -95
  108. package/patterns/banks/lexical-signals.json +0 -92
  109. package/patterns/banks/syntactic-frames.json +0 -52
  110. package/patterns/banks/visual-deck.json +0 -44
  111. package/patterns/dimensions/artifacts.json +0 -121
  112. package/patterns/dimensions/discourse.json +0 -438
  113. package/patterns/dimensions/lexical.json +0 -198
  114. package/patterns/dimensions/rhythm.json +0 -258
  115. package/patterns/dimensions/syntactic.json +0 -285
  116. package/patterns/dimensions/visual-and-deck.json +0 -530
  117. package/patterns/taxonomy.json +0 -112
  118. package/src/core.mjs +0 -5497
  119. package/src/dislop/review-picker.vim +0 -114
  120. package/src/local-model.mjs +0 -997
  121. package/src/pattern-engine.mjs +0 -1003
  122. package/src/pocket-model.mjs +0 -729
  123. package/src/review-apply.mjs +0 -151
  124. package/src/review-client.mjs +0 -1073
@@ -1,285 +0,0 @@
1
- {
2
- "schema": "dislop.pattern-library/1",
3
- "dimension": "syntactic",
4
- "version": "1.0.0",
5
- "patterns": [
6
- {
7
- "id": "pat-negation-pivot-frame",
8
- "ruleId": "negation-pivot-frame",
9
- "packId": "business-brief",
10
- "category": "language-template",
11
- "detectionAngle": "syntactic-frame",
12
- "status": "active",
13
- "severityDefault": "warning",
14
- "languages": ["en", "zh"],
15
- "modalities": ["markdown", "text", "html", "docx", "pptx"],
16
- "evidenceLevel": "empirical-corpus",
17
- "name": { "en": "'Not X, but Y' Rhetorical Pivot", "zh": "“不是 A,而是 B”二阶反转框" },
18
- "mechanism": {
19
- "en": "When 1st-order buzzwords are banned, models collapse into binary rhetorical contrast (`It's not just X — it's Y` / `这不是 A,而是 B`) that negates a strawman to elevate an abstract slogan.",
20
- "zh": "禁用一阶高频词后,模型会退回到二元否定反转(“这不是 A,而是 B”),先立稻草人再拔高抽象口号。"
21
- },
22
- "tags": ["negation-pivot", "contrast", "second-order", "不是而是", "并非而是", "与其说不如说"],
23
- "falsePositiveGuards": [
24
- "Exempts concrete numeric corrections on both sides (`不是 30 秒,而是 300 秒`, `wasn't 30s — it was 300s`).",
25
- "Exempts code identifiers, filenames (`.py`), and factual root-cause statements (`报错原因不是磁盘满,而是 inode 耗尽`)."
26
- ],
27
- "modelTendencies": ["gpt-family", "claude-family", "deepseek-family"],
28
- "exemplar": {
29
- "bad": "这不是一款简单的文档检查工具,而是交付质量的底气。",
30
- "trap": "工具已至。底气自生。交付无忧。",
31
- "good": "`dislop` 在发稿前标出本机路径泄露、未填占位符和超载幻灯片。",
32
- "source": "original"
33
- }
34
- },
35
- {
36
- "id": "pat-literary-negation-pivot",
37
- "ruleId": "literary-negation-pivot",
38
- "packId": "literary-essay",
39
- "category": "language-template",
40
- "detectionAngle": "syntactic-frame",
41
- "status": "active",
42
- "severityDefault": "warning",
43
- "languages": ["en", "zh"],
44
- "modalities": ["markdown", "text", "html", "docx"],
45
- "evidenceLevel": "editorial-consensus",
46
- "name": { "en": "Literary Aphorism Negation Pivot", "zh": "散文金句腔“不是……而是……”" },
47
- "mechanism": {
48
- "en": "Narrative drafts insert aphoristic 'not an object, but a symbol' pivots that replace concrete sensory details with abstract commentary.",
49
- "zh": "非虚构与散文稿中常见“不是器物,而是尊严/陪伴”式金句,用抽象评语打断画面感。"
50
- },
51
- "tags": ["essay", "aphorism", "negation-pivot", "散文", "金句"],
52
- "falsePositiveGuards": [
53
- "Exempts concrete location/object corrections (`停靠的不是三号站台,而是五号站台`, `He ordered tea, not coffee`)."
54
- ],
55
- "modelTendencies": ["claude-family", "deepseek-family"],
56
- "exemplar": {
57
- "bad": "老周留下的那把旧刨子不是工具,而是手艺人的尊严。",
58
- "trap": "一把旧刨子。半生木工活。满手老茧。",
59
- "good": "老周退休那天把用了二十年的旧刨子擦净木屑,收进樟木箱底。",
60
- "source": "original"
61
- }
62
- },
63
- {
64
- "id": "pat-staccato-slogan-run",
65
- "ruleId": "staccato-slogan-run",
66
- "packId": "business-brief",
67
- "category": "language-template",
68
- "detectionAngle": "syntactic-frame",
69
- "status": "active",
70
- "severityDefault": "warning",
71
- "languages": ["en", "zh"],
72
- "modalities": ["markdown", "text", "html", "docx", "pptx"],
73
- "evidenceLevel": "editorial-consensus",
74
- "name": { "en": "Staccato Slogan Fragment Run", "zh": "连续超短断句口号" },
75
- "mechanism": {
76
- "en": "Three or more consecutive ultra-short declarative fragments (`Signals drop. Photos vanish. Trust dies.`) mimic LinkedIn/landing-page dramatic copy.",
77
- "zh": "连续三句及以上 2–6 字无逗号超短断句(“信号消失。照片蒸发。体验归零。”),制造廉价广告感。"
78
- },
79
- "tags": ["staccato", "slogan", "fragments", "second-order", "断句", "口号"],
80
- "falsePositiveGuards": [
81
- "Skips headings, lists, and tables; requires >= 3 consecutive ultra-short sentences."
82
- ],
83
- "modelTendencies": ["gpt-family", "deepseek-family"],
84
- "exemplar": {
85
- "bad": "Signals drop. Photos vanish. Audits stall. Offline sync keeps all 120 inspection photos queued locally.",
86
- "trap": "Offline sync isn't a fallback — it's field resilience for 120 photos.",
87
- "good": "When cellular coverage drops in basement vaults, offline sync queues up to 120 inspection photos locally until reconnection.",
88
- "source": "original"
89
- }
90
- },
91
- {
92
- "id": "pat-zh-four-char-triad",
93
- "ruleId": "zh-four-char-triad",
94
- "packId": "business-brief",
95
- "category": "language-template",
96
- "detectionAngle": "syntactic-frame",
97
- "status": "active",
98
- "severityDefault": "warning",
99
- "languages": ["zh"],
100
- "modalities": ["markdown", "text", "html", "docx", "pptx"],
101
- "evidenceLevel": "editorial-consensus",
102
- "name": { "en": "Chinese Four-Character Slogan Triad", "zh": "中文四字套语三联排比" },
103
- "mechanism": {
104
- "en": "Models string three symmetric four-character modifier blocks (`精准高效、安全可靠、灵活易用`) to sound polished without adding verifiable claims.",
105
- "zh": "模型高频堆砌三组对称四字形容词(“精准高效、安全可靠、灵活易用”),看起来工整但没有可核验信息。"
106
- },
107
- "tags": ["triad", "four-char", "parallelism", "zh", "四字排比", "四字成语"],
108
- "falsePositiveGuards": [
109
- "Exempts proper-noun entity lists (`北京大学、清华大学、复旦大学`), book titles (`《...》`), and broken function-word slices."
110
- ],
111
- "modelTendencies": ["zh-report", "qwen-family", "deepseek-family"],
112
- "exemplar": {
113
- "bad": "新版网关具备精准高效、安全可靠、灵活易用的特性,单节点支持 8,000 QPS。",
114
- "trap": "新版网关不是简单升级,而是 8,000 QPS 的性能飞跃。",
115
- "good": "新版网关单节点支持 8,000 QPS,并在上游超时 2 秒后自动熔断。",
116
- "source": "original"
117
- }
118
- },
119
- {
120
- "id": "pat-semicolon-tricolon",
121
- "ruleId": "semicolon-tricolon",
122
- "packId": "business-brief",
123
- "category": "language-punctuation",
124
- "detectionAngle": "syntactic-frame",
125
- "status": "active",
126
- "severityDefault": "warning",
127
- "languages": ["en", "zh"],
128
- "modalities": ["markdown", "text", "html", "docx", "pptx"],
129
- "evidenceLevel": "editorial-consensus",
130
- "name": { "en": "Three-Part Balanced Semicolon Pitch", "zh": "三段对称分号推销句" },
131
- "mechanism": {
132
- "en": "AI product copy frequently packs three parallel value propositions into one sentence joined by two semicolons (`X happens; Y improves; Z ships`), producing ad-copy symmetry even with zero banned buzzwords.",
133
- "zh": "即便不用任何禁用词,AI 仍习惯用两个分号把三个卖点工整并排塞进同一句(“硬伤直接划掉;套话给出提醒;改完再来复查。”),读起来像宣发海报。"
134
- },
135
- "tags": ["tricolon", "semicolon", "symmetry", "pitch", "分号排比", "三段推销句"],
136
- "falsePositiveGuards": [
137
- "Exempts parenthetical academic citations (`(Smith, 2020; Chen, 2021; Wu, 2022)`).",
138
- "Exempts single-semicolon two-clause contrasts and code/table lines."
139
- ],
140
- "modelTendencies": ["gpt-family", "claude-family", "gemini-family"],
141
- "exemplar": {
142
- "bad": "不能发的硬伤,系统直接划掉;听着像套话的地方,它在页边提醒你;等你改完,再拿原稿逐条对一遍。",
143
- "trap": "硬伤划掉。套话提醒。原稿复核。",
144
- "good": "系统先标出不能发的硬伤和套话。你改完之后,再跑一次检查确认没有新问题。",
145
- "source": "original"
146
- }
147
- },
148
- {
149
- "id": "pat-literary-semicolon-tricolon",
150
- "ruleId": "literary-semicolon-tricolon",
151
- "packId": "literary-essay",
152
- "category": "language-punctuation",
153
- "detectionAngle": "syntactic-frame",
154
- "status": "active",
155
- "severityDefault": "warning",
156
- "languages": ["en", "zh"],
157
- "modalities": ["markdown", "text", "html", "docx"],
158
- "evidenceLevel": "editorial-consensus",
159
- "name": { "en": "Literary Three-Part Semicolon Parallelism", "zh": "散文三段分号工整排比" },
160
- "mechanism": {
161
- "en": "AI literary drafts stage three atmospheric clauses in one semicolon-joined tricolon (`Water meets beans; steam curls; the first sip steadies...`), flattening authentic rhythm.",
162
- "zh": "散文生成稿高频用两个分号工整堆砌三段意象排比,读起来像配音朗诵稿。"
163
- },
164
- "tags": ["tricolon", "semicolon", "essay", "散文排比", "分号排比"],
165
- "falsePositiveGuards": ["Single-semicolon sentences stay exempt."],
166
- "modelTendencies": ["claude-family", "gpt-family"],
167
- "exemplar": {
168
- "bad": "街道两旁的树叶逐渐染上金黄;午后的阳光变得柔和而绵长;行人的衣领也悄然立了起来。",
169
- "trap": "树叶金黄。阳光柔和。衣领立起。",
170
- "good": "下午三点风凉下来,路口骑车的人把夹克拉链拉到下巴,梧桐叶顺着路沿滚进排水口。",
171
- "source": "original"
172
- }
173
- },
174
- {
175
- "id": "pat-rhetorical-qa-cadence",
176
- "ruleId": "rhetorical-qa-cadence",
177
- "packId": "business-brief",
178
- "category": "language-punctuation",
179
- "detectionAngle": "syntactic-frame",
180
- "status": "active",
181
- "severityDefault": "warning",
182
- "languages": ["en", "zh"],
183
- "modalities": ["markdown", "text", "html", "docx", "pptx"],
184
- "evidenceLevel": "editorial-consensus",
185
- "name": { "en": "Rhetorical Self-Q&A Transition", "zh": "AI 自问自答式过渡句" },
186
- "mechanism": {
187
- "en": "Models simulate conversational engagement by posing a stock rhetorical question and answering it immediately (`Why does this matter? Because...`, `The result? ...`, `为什么这很重要?因为……`).",
188
- "zh": "模型常在正文里自设短问句再立刻作答(“为什么这很重要?因为……”“结果呢?……”),制造刻意互动感。"
189
- },
190
- "tags": ["rhetorical-question", "self-qa", "transition", "自问自答", "结果呢", "为什么这很重要"],
191
- "falsePositiveGuards": [
192
- "Skips FAQ headings (`## ...?`), blockquotes, and lines inside dialogue quotes."
193
- ],
194
- "modelTendencies": ["gpt-family", "claude-family", "deepseek-family"],
195
- "exemplar": {
196
- "bad": "Why does this matter? Because unindexed queries stall checkout traffic during flash sales.",
197
- "trap": "This isn't just an index tweak — it's checkout survival.",
198
- "good": "Unindexed queries stall checkout traffic during flash sales, so we added a composite index on `(store_id, created_at)`.",
199
- "source": "original"
200
- }
201
- },
202
- {
203
- "id": "pat-literary-rhetorical-qa",
204
- "ruleId": "literary-rhetorical-qa",
205
- "packId": "literary-essay",
206
- "category": "language-punctuation",
207
- "detectionAngle": "syntactic-frame",
208
- "status": "active",
209
- "severityDefault": "warning",
210
- "languages": ["en", "zh"],
211
- "modalities": ["markdown", "text", "html", "docx"],
212
- "evidenceLevel": "editorial-consensus",
213
- "name": { "en": "Literary Staged Self-Q&A", "zh": "散文主持词式自问自答" },
214
- "mechanism": {
215
- "en": "Narrative essays lecture the reader with staged rhetorical questions (`Why does a loaf baked at dawn taste different? Because...`) instead of showing the scene.",
216
- "zh": "散文段落以自问自答替代场景描写,像主持词而非真实叙述。"
217
- },
218
- "tags": ["essay", "rhetorical-question", "self-qa", "散文设问"],
219
- "falsePositiveGuards": ["Real reported speech and dialogue stay exempt."],
220
- "modelTendencies": ["claude-family", "deepseek-family"],
221
- "exemplar": {
222
- "bad": "Why does brewing pour-over coffee feel so grounding? Because the deliberate pace invites us to pause.",
223
- "trap": "Warm water. Slow pour. Quiet pause.",
224
- "good": "At 6:30 a.m. he weighed 18 grams of beans and poured slowly until the kettle stopped hissing.",
225
- "source": "original"
226
- }
227
- },
228
- {
229
- "id": "pat-concession-symmetry-frame",
230
- "ruleId": "concession-symmetry-frame",
231
- "packId": "pattern-bank",
232
- "category": "language-template",
233
- "detectionAngle": "syntactic-frame",
234
- "status": "active-bank",
235
- "severityDefault": "info",
236
- "languages": ["en", "zh"],
237
- "modalities": ["markdown", "text", "html", "docx"],
238
- "evidenceLevel": "editorial-consensus",
239
- "name": { "en": "Formulaic Both-Sides Concession Frame", "zh": "模板化两面平衡让步句式" },
240
- "mechanism": {
241
- "en": "RLHF neutrality bias pushes models into stock balanced-concession templates (`While X presents challenges, it also offers tremendous opportunities`, `虽然……面临一定挑战,但不可否认它也带来了巨大机遇`).",
242
- "zh": "RLHF 中立偏好使模型高频写出“虽然……存在一定挑战,但同时也带来了前所未有的机遇”这类两面讨好空壳。"
243
- },
244
- "tags": ["concession", "both-sides", "hedging", "symmetry", "两面平衡", "虽然但是"],
245
- "falsePositiveGuards": [
246
- "Only triggers when BOTH concession marker AND stock abstract opportunity/challenge clichés co-occur in the same sentence."
247
- ],
248
- "modelTendencies": ["claude-family", "gpt-family", "qwen-family"],
249
- "exemplar": {
250
- "bad": "While remote work presents certain challenges, it also offers tremendous opportunities for organizational flexibility.",
251
- "trap": "Remote work isn't a compromise — it's the future of flexibility.",
252
- "good": "Remote teams saved 4 hours of weekly commute time per engineer, though onboarding new hires took two weeks longer.",
253
- "source": "original"
254
- }
255
- },
256
- {
257
- "id": "pat-pull-quote-closer",
258
- "ruleId": "pull-quote-closer",
259
- "packId": "pattern-bank",
260
- "category": "language-template",
261
- "detectionAngle": "syntactic-frame",
262
- "status": "active-bank",
263
- "severityDefault": "warning",
264
- "languages": ["en", "zh"],
265
- "modalities": ["markdown", "text", "html", "docx"],
266
- "evidenceLevel": "editorial-consensus",
267
- "name": { "en": "Pull-Quote / Poster Slogan Closer", "zh": "金句卡片式海报收尾" },
268
- "mechanism": {
269
- "en": "Copy drafts bolt on a shareable pull-quote punchline (`The pen stays in your hand`, `Built for the future`, `这才是……真正的温度/力量/价值`, `笔一直在你手里`).",
270
- "zh": "段尾强行加一句适合做分享卡片的广告金句(如“这才是好工具真正的温度”“笔一直在你手里”“为未来而生”)。"
271
- },
272
- "tags": ["pull-quote", "slogan", "closer", "金句收尾", "海报腔"],
273
- "falsePositiveGuards": [
274
- "Targeted specifically at high-precision slogan punchline stems at sentence/paragraph end."
275
- ],
276
- "modelTendencies": ["gpt-family", "claude-family"],
277
- "exemplar": {
278
- "bad": "工具会自动标出问题。这才是好工具真正的温度,笔一直在你手里。",
279
- "trap": "工具标出问题。你握着笔。",
280
- "good": "工具只标出问题行号,改不改、怎么改都由你自己决定。",
281
- "source": "original"
282
- }
283
- }
284
- ]
285
- }