dislop 0.9.1 → 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.
- package/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +2 -2
- package/.codex-plugin/plugin.json +7 -8
- package/.cursor-plugin/plugin.json +2 -3
- package/.pre-commit-hooks.yaml +5 -12
- package/PRODUCT.md +19 -63
- package/README.md +360 -252
- package/README.zh-CN.md +390 -240
- package/action.yml +30 -39
- package/bin/dislop-mcp.mjs +3 -4
- package/bin/dislop.mjs +4 -4594
- package/gemini-extension.json +2 -2
- package/llms-install.md +68 -0
- package/package.json +17 -63
- package/packs/common/artifact-qa/pack.json +5 -0
- package/packs/common/artifact-qa/prompts/rules.md +11 -0
- package/packs/common/artifact-qa/scripts/index.mjs +173 -0
- package/packs/common/slide-deck/pack.json +6 -0
- package/packs/common/slide-deck/prompts/rules.md +11 -0
- package/packs/common/slide-deck/scripts/index.mjs +62 -0
- package/packs/common/web-ui/pack.json +6 -0
- package/packs/common/web-ui/prompts/rules.md +11 -0
- package/packs/common/web-ui/scripts/index.mjs +80 -0
- package/packs/en/artifact-qa/pack.json +6 -0
- package/packs/en/artifact-qa/prompts/rules.md +14 -0
- package/packs/en/artifact-qa/scripts/index.mjs +90 -0
- package/packs/en/prose/pack.json +7 -0
- package/packs/en/prose/prompts/rules.md +26 -0
- package/packs/en/prose/scripts/index.mjs +290 -0
- package/packs/en/slide-deck/pack.json +7 -0
- package/packs/en/slide-deck/prompts/rules.md +17 -0
- package/packs/en/slide-deck/scripts/index.mjs +81 -0
- package/packs/en/web-ui/pack.json +7 -0
- package/packs/en/web-ui/prompts/rules.md +20 -0
- package/packs/en/web-ui/scripts/index.mjs +103 -0
- package/packs/zh/artifact-qa/pack.json +6 -0
- package/packs/zh/artifact-qa/prompts/rules.md +14 -0
- package/packs/zh/artifact-qa/scripts/index.mjs +89 -0
- package/packs/zh/prose/pack.json +7 -0
- package/packs/zh/prose/prompts/rules.md +26 -0
- package/packs/zh/prose/scripts/index.mjs +305 -0
- package/packs/zh/slide-deck/pack.json +7 -0
- package/packs/zh/slide-deck/prompts/rules.md +17 -0
- package/packs/zh/slide-deck/scripts/index.mjs +75 -0
- package/packs/zh/web-ui/pack.json +7 -0
- package/packs/zh/web-ui/prompts/rules.md +20 -0
- package/packs/zh/web-ui/scripts/index.mjs +98 -0
- package/plugin.json +5 -6
- package/server.json +2 -2
- package/skills/deslop-docs/SKILL.md +10 -8
- package/skills/deslop-slides-docx/SKILL.md +7 -8
- package/skills/deslop-verify/SKILL.md +7 -8
- package/skills/deslop-web-ui/SKILL.md +7 -8
- package/skills/dislop/SKILL.md +16 -28
- package/skills/dislop/references/essay.md +1 -1
- package/skills/dislop/references/essay.zh-CN.md +1 -1
- package/skills/dislop/references/office.md +1 -1
- package/skills/dislop/references/office.zh-CN.md +1 -1
- package/skills/dislop/references/web-ui.md +1 -1
- package/skills/dislop/references/web-ui.zh-CN.md +1 -1
- package/skills/dislop/references/work-docs.md +1 -1
- package/skills/dislop/references/work-docs.zh-CN.md +1 -1
- package/src/cli-main.mjs +210 -0
- package/src/commands/check-fix.mjs +169 -0
- package/src/commands/doctor.mjs +110 -0
- package/src/commands/init.mjs +49 -0
- package/src/commands/login.mjs +82 -0
- package/src/commands/model.mjs +130 -0
- package/src/commands/packs.mjs +44 -0
- package/src/commands/verify.mjs +133 -0
- package/src/commands/voice.mjs +84 -0
- package/src/kernel/config.mjs +232 -0
- package/src/kernel/document-model.mjs +1412 -0
- package/src/kernel/fact-gate.mjs +615 -0
- package/src/kernel/file-discovery.mjs +139 -0
- package/src/{binary-node.mjs → kernel/ooxml-binary.mjs} +532 -893
- package/src/kernel/pack-loader.mjs +715 -0
- package/src/kernel/patcher.mjs +341 -0
- package/src/kernel/pipeline.mjs +267 -0
- package/src/kernel/prompt-assembler.mjs +307 -0
- package/src/kernel/voice-profile.mjs +177 -0
- package/src/mcp/stdio-server.mjs +372 -0
- package/src/runners/auto-fix.mjs +59 -0
- package/src/runners/interactive-tty.mjs +461 -0
- package/src/runners/reporters.mjs +256 -0
- package/src/runtime/chunker.mjs +87 -0
- package/src/runtime/json-extract.mjs +144 -0
- package/src/runtime/privacy-gate.mjs +97 -0
- package/src/runtime/providers/anthropic.mjs +65 -0
- package/src/runtime/providers/cloud.mjs +136 -0
- package/src/runtime/providers/gemini.mjs +91 -0
- package/src/runtime/providers/local-model.mjs +139 -0
- package/src/runtime/providers/openai-compat.mjs +130 -0
- package/src/runtime/router.mjs +315 -0
- package/src/sdk/index.mjs +137 -0
- package/models/manifest.json +0 -90
- package/models/pocket-slop-v1.json +0 -1
- package/packs/business-brief/pack.json +0 -937
- package/packs/core/pack.json +0 -209
- package/packs/deck-and-ui/pack.json +0 -539
- package/packs/engineering-spec/pack.json +0 -144
- package/packs/executive-deck/pack.json +0 -98
- package/packs/literary-essay/pack.json +0 -344
- package/packs/regulated-comms/pack.json +0 -99
- package/patterns/ai-tic-rubric.json +0 -252
- package/patterns/banks/composite-fusion.json +0 -48
- package/patterns/banks/discourse-rhythm.json +0 -95
- package/patterns/banks/lexical-signals.json +0 -92
- package/patterns/banks/syntactic-frames.json +0 -52
- package/patterns/banks/visual-deck.json +0 -44
- package/patterns/dimensions/artifacts.json +0 -121
- package/patterns/dimensions/discourse.json +0 -438
- package/patterns/dimensions/lexical.json +0 -198
- package/patterns/dimensions/rhythm.json +0 -258
- package/patterns/dimensions/syntactic.json +0 -285
- package/patterns/dimensions/visual-and-deck.json +0 -530
- package/patterns/taxonomy.json +0 -112
- package/src/core.mjs +0 -5497
- package/src/dislop/review-picker.vim +0 -114
- package/src/local-model.mjs +0 -997
- package/src/pattern-engine.mjs +0 -1003
- package/src/pocket-model.mjs +0 -729
- package/src/review-apply.mjs +0 -151
- package/src/review-client.mjs +0 -1073
package/README.zh-CN.md
CHANGED
|
@@ -1,292 +1,442 @@
|
|
|
1
|
-
|
|
2
|
-
<picture>
|
|
3
|
-
<source media="(prefers-color-scheme: dark)" srcset="./assets/banner-zh-dark.svg">
|
|
4
|
-
<img src="./assets/banner-zh-light.svg" alt="dislop — 去 AI 味才是真正的生产力!" width="100%">
|
|
5
|
-
</picture>
|
|
6
|
-
</p>
|
|
7
|
-
|
|
8
|
-
<p align="center">
|
|
9
|
-
<a href="./README.md">English</a> ·
|
|
10
|
-
<a href="https://dislop.com/zh/">去 dislop.com 试试</a> ·
|
|
11
|
-
<a href="https://dislop.com/zh/guides/">实用指南</a> ·
|
|
12
|
-
<a href="https://dislop.com/zh/rules/">规则图鉴</a> ·
|
|
13
|
-
<a href="./awesome/README.zh-CN.md">工具清单</a> ·
|
|
14
|
-
<a href="https://www.npmjs.com/package/dislop">npm</a> ·
|
|
15
|
-
<a href="https://pypi.org/project/dislop/">PyPI</a> ·
|
|
16
|
-
<a href="https://x.com/dislop_ai">X (@dislop_ai)</a> ·
|
|
17
|
-
<a href="./LICENSE">Apache-2.0</a>
|
|
18
|
-
</p>
|
|
19
|
-
|
|
20
|
-
**去 AI 味才是真正的生产力!** `dislop` 是专用的 AI 味检查工具。默认挂进你的 Agent、终端和 CI 自动自检,也提供网页工作台随时手动排查。它把社区验证过的去味规则、语料经验与 90 条精选工具收在一起,帮你和你的 Agent 在文档、网页和 PPT 发出前,挑出并改掉里面的 AI 味。
|
|
21
|
-
|
|
22
|
-
产品分为三层:**纯文档 Skill**(按文体避坑,不含可执行脚本)、**开源本地 CLI 与编辑器插件**(零依赖离线扫出文档、网页、SVG、图片、Word/PPT 与 PDF 里的硬伤与常见套话,开发者也可配置自有密钥做深度审校)、**官方云端 MCP 与网页工作台**(`https://dislop.com/mcp`,免装本地环境,按文体多模型审校并返回结构化问题清单,支持保留原排版的 Word/PPT 处理)。
|
|
23
|
-
|
|
24
|
-
拿一段模型刚写完的上线说明来举个例子:
|
|
1
|
+
# dislop
|
|
25
2
|
|
|
26
|
-
|
|
27
|
-
好的,以下是修改后的上线说明。值得注意的是,本次改造以队列分级为重要抓手,全面赋能一线运维团队,故障恢复时间最多 45 秒。
|
|
28
|
-
```
|
|
3
|
+
[English](./README.md) | 简体中文
|
|
29
4
|
|
|
30
|
-
|
|
5
|
+
**去除 AI 废话与交付脏残留,就是硬核生产力。**
|
|
31
6
|
|
|
32
|
-
|
|
33
|
-
[ERROR] launch-note.md:1:1 chatbot-artifact "好的,以下是修改后"
|
|
34
|
-
[WARNING] launch-note.md:1:16 zh-bureaucratic-padding "值得注意的是,"
|
|
35
|
-
[WARNING] launch-note.md:1:35 zh-bureaucratic-padding "抓手"
|
|
36
|
-
[WARNING] launch-note.md:1:38 zh-bureaucratic-padding "全面赋能"
|
|
37
|
-
```
|
|
7
|
+
`dislop` 是一款构建在零第三方运行时依赖 Node.js(`>= 20`)微内核上的可插拔文稿与交付物 Linter。它在正式发稿、提交 PR 或导出客户交付物前,自动审计 Markdown、纯文本、HTML/CSS/JSX/TSX/SVG、Word(`.docx`)、PowerPoint(`.pptx`)、PDF 与位图图片,将客观交付**缺陷(Defect)**与非阻断的文风去 AI 味**建议(Suggestion)**严格隔离。
|
|
38
8
|
|
|
39
|
-
|
|
9
|
+
架构细节详见 [docs/architecture.md](./docs/architecture.md),自定义规则包开发指南详见 [CONTRIBUTING.md](./CONTRIBUTING.md),多语言测试样本文稿位于 [slop-samples/](./slop-samples/)([`zh-CN.md`](./slop-samples/zh-CN.md)、[`en.md`](./slop-samples/en.md))。
|
|
40
10
|
|
|
41
|
-
|
|
42
|
-
<img src="./assets/demos/proof-cycle-zh-v2.gif" alt="dislop 检查上线说明三步对照:标出 AI 寒暄与空话、拦下二阶口号、改干净后退出码 0" width="840">
|
|
43
|
-
</p>
|
|
11
|
+
## 核心设计
|
|
44
12
|
|
|
45
|
-
|
|
13
|
+
1. **微内核 + 分阶段按需加载规则包(`dislop/sdk`)**:
|
|
14
|
+
- 微内核负责物理坐标解析(`DocumentModel`)、不可变安全与防提示词注入约束、双层事实守恒门禁(Dual Post-LLM Fact Gate)、三层模型路由、无损坐标写回与 CI 退出码仲裁。
|
|
15
|
+
- 语言与场景规则封装在 `packs/<语言或通用域>/<场景>/{pack.json,scripts/,prompts/}` 下(涵盖 `common/*` 跨语言结构检查及 `zh/*`、`en/*` 在 `artifact-qa`、`prose`、`web-ui`、`slide-deck` 四大场景的专属规则包),`scripts/` 与 `prompts/` 均按实际执行阶段惰性加载。
|
|
16
|
+
2. **双轨分类体系(`Defect` vs. `Suggestion`)**:
|
|
17
|
+
- **文风建议绝不阻断 CI**:所有去 AI 味诊断均归为 `Suggestion`(`strong | moderate | hint`),在任何场景下恒返回 **退出码 `0`**(SARIF 中严格映射为 `"note"`)。
|
|
18
|
+
- **客观交付事故拦截 CI**:未替换的 `[公司名称]` / `[TODO]` 占位符、遗留的 AI 助手寒暄壳、泄露的 `[oaicite:1]` 引用标记、空链接/死链以及漏进 `.docx`/`.pptx` 的裸 Markdown 语法归为 `Defect`(`error | warning`),仅由确定性 `scripts/` 抛出;存在未解决的 `Defect: error` 时返回 **退出码 `1`**。
|
|
19
|
+
3. **本地隐私优先 + 三层模型语义增强**:
|
|
20
|
+
- 默认运行在 `--engine local` 本地模式(零外网上传),执行毫秒级确定性脚本检查,并可通过 [Ollama](https://ollama.com) 挂载 Tier 3 本地小模型(`dislop model pull`;若本机未安装 Ollama,CLI 会自动回退至离线规则并提示安装方式)。
|
|
21
|
+
- 按需启用 `--engine auto`、`--engine cloud`(`dislop login`)或 `--engine byok`(支持 OpenAI 兼容网关、Anthropic、Gemini、本地代理及 Ollama/vLLM),首次向外部域名发送文本前受域名隐私授权门禁(`privacy-gate.mjs`)保护。
|
|
22
|
+
4. **双层事实守恒与防注入门禁(Fact Gate)**:
|
|
23
|
+
- 任何改写候选在展示或落盘前,均强制校验数字、量纲单位、百分比、URL、行内代码与专有名词未丢失、未捏造,并执行规则包自带的 `verifyFix()` 二阶口号回归拦截。
|
|
46
24
|
|
|
47
|
-
|
|
25
|
+
## 快速上手
|
|
48
26
|
|
|
49
|
-
|
|
27
|
+
```bash
|
|
28
|
+
# 1. 只读检查(默认本地运行,零外网上传,自动识别中文文稿挂载 zh/* 规则包)
|
|
29
|
+
npx --yes dislop check slop-samples/zh-CN.md
|
|
50
30
|
|
|
51
|
-
|
|
31
|
+
# 2. 输出面向 Coding / Writing Agent 的紧凑结构化流
|
|
32
|
+
npx --yes dislop check docs/ --format agent
|
|
52
33
|
|
|
53
|
-
|
|
34
|
+
# 3. 终端逐块交互式审校(支持 y/n/e/p/a/A/s/u/q 快捷键)
|
|
35
|
+
npx --yes dislop fix draft.md
|
|
54
36
|
|
|
55
|
-
|
|
56
|
-
|
|
37
|
+
# 4. 非交互式批量自动清理经校验的 fixSafety === "safe" 项并备份原文件
|
|
38
|
+
npx --yes dislop fix draft.md --auto --backup
|
|
39
|
+
|
|
40
|
+
# 5. 校验人工或 Agent 改稿前后的事实与指标是否守恒
|
|
41
|
+
npx --yes dislop verify --git HEAD draft.md
|
|
57
42
|
```
|
|
58
43
|
|
|
59
|
-
|
|
44
|
+
## 中文去 AI 味实战用例(基于 `slop-samples/zh-CN.md`)
|
|
60
45
|
|
|
61
|
-
|
|
62
|
-
# 1. 检查当前目录(命中硬伤退出码 1,同时标出套话提醒)
|
|
63
|
-
npx --yes dislop check .
|
|
46
|
+
以下所有输出均基于仓库内的真实中文样本文稿 [slop-samples/zh-CN.md](./slop-samples/zh-CN.md) 实测采集,未做任何人工删改。
|
|
64
47
|
|
|
65
|
-
|
|
66
|
-
npx --yes dislop explain negation-pivot-frame --lang zh
|
|
48
|
+
### 用例 1:离线零 Token 确定性排查(`--no-llm`)
|
|
67
49
|
|
|
68
|
-
|
|
69
|
-
npx --yes dislop check --changed origin/main --format github
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
<details>
|
|
73
|
-
<summary>更多命令(深度检查、交叉审校、防退化校验、个人文风、Python 版)</summary>
|
|
50
|
+
仅加载 `common/artifact-qa`、`zh/artifact-qa` 与 `zh/prose` 的 `scripts/` 钩子(完全不读取 `prompts/`),毫秒级揪出遗留寒暄壳(`当然可以!以下是为您润色后的…` / `希望以上内容对您有所帮助!`)、内部检索标记 `[oaicite:1]`、未填占位符 `[公司名称]` / `[TODO: 确认故障负责人]`、空死链,以及中文高频宏大叙事起手式、句首铺垫套话、机械自问句、“不是…而是…”伪深刻句壳与四字口号排比串:
|
|
74
51
|
|
|
75
52
|
```bash
|
|
76
|
-
|
|
77
|
-
npx --yes dislop check draft.md --pack auto --register argumentative --deep --profile --compact --json
|
|
78
|
-
|
|
79
|
-
# 多信号交叉审校、分场景改后防漂移校验、三层接入体检与离线个人文风卡
|
|
80
|
-
npx --yes dislop review draft.md --register casual
|
|
81
|
-
npx --yes dislop verify --git HEAD draft.md --register casual
|
|
82
|
-
npx --yes dislop doctor
|
|
83
|
-
npx --yes dislop voice my-notes.md
|
|
84
|
-
|
|
85
|
-
# Python 3.10+(已上架 PyPI,零外部依赖)
|
|
86
|
-
uvx dislop check quarterly-review.pptx
|
|
87
|
-
pip install dislop && dislop check . --lang zh
|
|
53
|
+
dislop check slop-samples/zh-CN.md --no-llm --format agent
|
|
88
54
|
```
|
|
89
55
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
56
|
+
```text
|
|
57
|
+
# dislop file=slop-samples/zh-CN.md engine=deterministic defects=8 suggestions=6
|
|
58
|
+
[P1-S1|L1] DEFECT(error,safe) zh/artifact-qa/chatbot-artifact
|
|
59
|
+
quote: "当然可以!以下是为您润色后的第三季度存储集群迁移复盘报告。"
|
|
60
|
+
reason: 正文中遗留了 AI 对话寒暄开场或客套收尾壳,可直接安全删除。
|
|
61
|
+
fix: DELETE
|
|
62
|
+
[P3-S2|L5] DEFECT(error,safe) common/artifact-qa/chatbot-citation-leak
|
|
63
|
+
quote: "[oaicite:1]"
|
|
64
|
+
reason: Internal AI search/citation token leaked into output text.
|
|
65
|
+
fix: DELETE
|
|
66
|
+
[P3-S2|L5] DEFECT(error,manual) zh/artifact-qa/unfilled-placeholder
|
|
67
|
+
quote: "[公司名称]"
|
|
68
|
+
reason: 正文中存在未替换的中文模板占位符或默认假文。
|
|
69
|
+
prompt: 发稿前请将“[公司名称]”替换为真实信息,或直接删去该未完成句。
|
|
70
|
+
[P5-S2|L9] DEFECT(error,manual) common/artifact-qa/unfilled-placeholder
|
|
71
|
+
quote: "[TODO: 确认故障负责人]"
|
|
72
|
+
reason: Unfilled developer or template token left in deliverable.
|
|
73
|
+
prompt: Replace '[TODO: 确认故障负责人]' with the real value before publishing, or remove the unfinished sentence.
|
|
74
|
+
[P5-S2|L9] DEFECT(error,manual) common/artifact-qa/empty-link-target
|
|
75
|
+
quote: "[值班应急手册]()"
|
|
76
|
+
reason: Link has an empty destination URL.
|
|
77
|
+
prompt: Provide a valid destination URL or unwrap the link.
|
|
78
|
+
[P9-S1|L17] DEFECT(error,safe) zh/artifact-qa/chatbot-artifact
|
|
79
|
+
quote: "希望以上内容对您有所帮助!"
|
|
80
|
+
reason: 正文中遗留了 AI 对话寒暄开场或客套收尾壳,可直接安全删除。
|
|
81
|
+
fix: DELETE
|
|
82
|
+
[P9-S2|L17] DEFECT(error,safe) zh/artifact-qa/chatbot-artifact
|
|
83
|
+
quote: "如果您需要进一步调整,请随时告诉我。"
|
|
84
|
+
reason: 正文中遗留了 AI 对话寒暄开场或客套收尾壳,可直接安全删除。
|
|
85
|
+
fix: DELETE
|
|
86
|
+
[P5-S2|L9] DEFECT(warning,manual) common/artifact-qa/placeholder-dead-link
|
|
87
|
+
quote: "[故障时间线](#)"
|
|
88
|
+
reason: Placeholder non-navigating link target '#'.
|
|
89
|
+
prompt: Wire a real destination URL or use a <button type="button"> control.
|
|
90
|
+
[P3-S1|L5] SUGGESTION(strong,safe) zh/prose/hollow-transition
|
|
91
|
+
quote: "在当今数字化转型加速推进的时代浪潮下,这一举措无疑具有举足轻重的战略意义。"
|
|
92
|
+
reason: 零信息增量的宏大叙事套话,执行破坏性删除测试后不影响上下文事实与因果推进。
|
|
93
|
+
fix: DELETE
|
|
94
|
+
[P5-S1|L9] SUGGESTION(strong,review) zh/prose/unprompted-negation
|
|
95
|
+
quote: "这不是一次简单的参数微调,而是核心结账链路可靠性基线的重建。"
|
|
96
|
+
reason: 移除无前文语境支撑的“不是…而是…”伪深刻对比壳,直接陈述后半句内容。
|
|
97
|
+
fix: "这是核心结账链路可靠性基线的重建。"
|
|
98
|
+
[P8-S1|L15] SUGGESTION(strong,safe) zh/prose/hollow-transition
|
|
99
|
+
quote: "展望未来,我们将继续砥砺前行,构筑更加稳健的数字底座!"
|
|
100
|
+
reason: 零信息增量的宏大叙事套话,执行破坏性删除测试后不影响上下文事实与因果推进。
|
|
101
|
+
fix: DELETE
|
|
102
|
+
[P4-S1|L7] SUGGESTION(moderate,safe) zh/prose/throat-clearing
|
|
103
|
+
quote: "值得注意的是,PostgreSQL 在 `{{cluster_region}}` 区域的 4 个只读副本上 p95 查询延迟从 142ms 降至 18ms。"
|
|
104
|
+
reason: 删去无实质信息的句首套话铺垫,直接进入具体陈述。
|
|
105
|
+
fix: "PostgreSQL 在 `{{cluster_region}}` 区域的 4 个只读副本上 p95 查询延迟从 142ms 降至 18ms。"
|
|
106
|
+
[P4-S2|L7] SUGGESTION(moderate,review) zh/prose/rhetorical-self-qa
|
|
107
|
+
quote: "为什么这一点如此重要?"
|
|
108
|
+
reason: 移除机械的助手式自问过渡句,让后一句直接给出结论。
|
|
109
|
+
fix: DELETE
|
|
110
|
+
[P6-S1|L11] SUGGESTION(moderate,manual) zh/prose/four-char-slogan-triad
|
|
111
|
+
quote: "全面赋能、协同联动、闭环管理"
|
|
112
|
+
reason: 连续堆砌三个及以上空洞四字套话排比,缺乏具体动作或边界信息。
|
|
113
|
+
prompt: 删去四字口号排比串,保留或改写为原文中实际发生的具体改动:[填入具体机制或动作]
|
|
114
|
+
```
|
|
95
115
|
|
|
96
|
-
###
|
|
116
|
+
### 用例 2:一键安全剥离寒暄壳与零信息空话(`fix --auto --dry-run`)
|
|
97
117
|
|
|
98
|
-
|
|
118
|
+
在自动化流水线或提交前钩子中,`dislop fix --auto` 仅自动执行 `fixSafety === "safe"` 的确定性清理项(移除首尾助手寒暄、`[oaicite:1]`、宏大背景空话、文末口号与“值得注意的是,”前缀),完整保留 `142ms`、`18ms`、`64%`、`{{cluster_region}}` 等全部技术参数,并将需要人工拍板的 `[公司名称]`、`[TODO: 确认故障负责人]` 与空链接留待人工补齐:
|
|
99
119
|
|
|
100
|
-
```
|
|
101
|
-
dislop
|
|
102
|
-
dislop review draft.md --offline --json > review.json
|
|
103
|
-
dislop apply --review-file review.json --source-file draft.md --include 2,5
|
|
120
|
+
```bash
|
|
121
|
+
dislop fix slop-samples/zh-CN.md --auto --dry-run --no-llm
|
|
104
122
|
```
|
|
105
123
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
<img src="./assets/demos/deck-office-zh-v2.gif" alt="dislop 检查 quarterly-review.pptx:标出裸 Markdown、字墙、68% 缩排和过程标题后改为结论页" width="840"><br>
|
|
143
|
-
<sub>PPT 演示文稿(.pptx)检查:裸星号、单页字墙、自动缩字与过程标题</sub>
|
|
144
|
-
</td>
|
|
145
|
-
</tr>
|
|
146
|
-
</table>
|
|
147
|
-
|
|
148
|
-
## 实用指南、规则图鉴与工具清单
|
|
149
|
-
|
|
150
|
-
除了命令行本身,这个仓库直接编出了一套可读、可引用的中文去 AI 味参考站:
|
|
151
|
-
|
|
152
|
-
- **[全部 53 条规则图鉴](https://dislop.com/zh/rules/)**:每条附删除测试判断方法、原句 / 换了种 AI 味 / 改好三段对照,以及可一键复制进 PR 或群聊的引用链接。
|
|
153
|
-
- **[6 篇实用指南](https://dislop.com/zh/guides/)**:[什么是 AI 味](https://dislop.com/zh/guides/what-is-ai-slop/) · [中文写作怎么去 AI 味](https://dislop.com/zh/guides/remove-ai-slop-writing/) · [前端页面去 AI 味](https://dislop.com/zh/guides/fix-ai-slop-web-ui/) · [PPT 与 Word 去模板味](https://dislop.com/zh/guides/deslop-pptx-docx/) · [Agent 与 CI 接入教程](https://dislop.com/zh/guides/agent-cli-mcp-tutorial/) · [去 AI 味工具对比](https://dislop.com/zh/guides/linter-vs-detector-vs-skill/)。
|
|
154
|
-
- **[Awesome Anti-Slop 工具清单(90 条)](./awesome/README.zh-CN.md)**([English](./awesome/README.md) · [在线筛选](https://dislop.com/zh/awesome/)):核验过的中英文工具、写作规范、前端设计规则与论文(提供 [index.json](https://dislop.com/awesome/index.json) 与 [index.md](https://dislop.com/awesome/index.md))。
|
|
155
|
-
- **投稿翻车样本**:遇到特别典型的 AI 套话、紫粉页面或挤满字墙的 PPT,欢迎[点此提交脱敏样本](https://github.com/dislop-ai/dislop/issues/new?template=slop_sample.yml)。
|
|
156
|
-
|
|
157
|
-
## 让你的 AI、编辑器和流水线直接用
|
|
158
|
-
|
|
159
|
-
| 接入环境 | 一行命令或一键唤起 | 说明 |
|
|
160
|
-
|---|---|---|
|
|
161
|
-
| **任意联网 AI 对话** | 发一句:`先读 https://dislop.com/llms.txt,按里面的规矩和检查方法把接下来这份稿子过一遍。` | 免安装,直接读约 `2.4 KB` 索引、任务卡(`/tasks/*.md`)或单条规则页(`/rules/<id>.md`) |
|
|
162
|
-
| **跨宿主 Agent Skill** | `npx skills add dislop-ai/dislop` | 安装纯 Markdown 主技能 [skills/dislop/SKILL.md](./skills/dislop/SKILL.md) 及 4 项场景子技能([deslop-docs](./skills/deslop-docs/SKILL.md)、[deslop-slides-docx](./skills/deslop-slides-docx/SKILL.md)、[deslop-web-ui](./skills/deslop-web-ui/SKILL.md)、[deslop-verify](./skills/deslop-verify/SKILL.md),无脚本、零联网) |
|
|
163
|
-
| **Claude Code 插件** | `/plugin marketplace add dislop-ai/dislop` 后执行 `/plugin install dislop@dislop-ai` | 一键装好纯文档 Skill 与官方远程 MCP 连接(常驻上下文仅约 `130` tokens) |
|
|
164
|
-
| **OpenAI Codex 插件** | `codex plugin marketplace add dislop-ai/dislop` 后执行 `codex plugin add dislop@dislop-ai` | 附带 [openai.yaml](./skills/dislop/agents/openai.yaml) 原生应用卡片与 `$dislop` 快捷指令 |
|
|
165
|
-
| **Gemini CLI 扩展** | `gemini extensions install https://github.com/dislop-ai/dislop` | 基于根目录 [gemini-extension.json](./gemini-extension.json) 直连官方远程 MCP `https://dislop.com/mcp` |
|
|
166
|
-
| **官方 MCP 注册表** | 在 `registry.modelcontextprotocol.io` 检索 `io.github.dislop-ai/dislop` | 登记官方托管远程 MCP 端点 `https://dislop.com/mcp`(Streamable HTTP) |
|
|
167
|
-
| **VS Code / Cursor 一键装 MCP** | [装进 VS Code(官方云端)](https://vscode.dev/redirect/mcp/install?name=dislop&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fdislop.com%2Fmcp%22%7D) · [装进 Cursor(官方云端)](cursor://anysphere.cursor-deeplink/mcp/install?name=dislop&config=eyJ0eXBlIjoiaHR0cCIsInVybCI6Imh0dHBzOi8vZGlzbG9wLmNvbS9tY3AifQ==) | 浏览器点击直接拉起编辑器确认框,不用手改 JSON |
|
|
168
|
-
| **GitHub Action / `pre-commit`** | 在工作流里引用 `uses: dislop-ai/dislop@main`(见 [action.yml](./action.yml) 与 [.pre-commit-hooks.yaml](./.pre-commit-hooks.yaml)) | PR 只查本次改动行并输出行内批注或 SARIF 2.1.0 |
|
|
169
|
-
|
|
170
|
-
<p align="center">
|
|
171
|
-
<img src="./assets/demos/agent-workflow-zh-v2.gif" alt="Agent 闭环工作流:加载 SKILL.md、增量门禁退出码 1、修复后 dislop verify 通过" width="840"><br>
|
|
172
|
-
<sub>Agent + CI 闭环:写前读 Skill,提交前增量门禁,改后 verify 校验数字零丢失</sub>
|
|
173
|
-
</p>
|
|
174
|
-
|
|
175
|
-
### 接入官方云端 MCP(`Claude Code`、`Codex`、`Cursor`、`WorkBuddy`、`Claude Cowork`)
|
|
176
|
-
|
|
177
|
-
```json
|
|
178
|
-
{
|
|
179
|
-
"mcpServers": {
|
|
180
|
-
"dislop": {
|
|
181
|
-
"type": "http",
|
|
182
|
-
"url": "https://dislop.com/mcp",
|
|
183
|
-
"headers": {
|
|
184
|
-
"Authorization": "Bearer dslp_your_token_here"
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
124
|
+
```diff
|
|
125
|
+
--- a/slop-samples/zh-CN.md
|
|
126
|
+
+++ b/slop-samples/zh-CN.md
|
|
127
|
+
@@ -1,13 +1,13 @@
|
|
128
|
+
-当然可以!以下是为您润色后的第三季度存储集群迁移复盘报告。
|
|
129
|
+
-
|
|
130
|
+
-# 第三季度存储层迁移复盘纪要
|
|
131
|
+
-
|
|
132
|
+
-在当今数字化转型加速推进的时代浪潮下,这一举措无疑具有举足轻重的战略意义。根据您提供的会议纪要,我已将 [公司名称](合作方某某科技)的核心发现梳理如下 [oaicite:1]。
|
|
133
|
+
-
|
|
134
|
+
-值得注意的是,PostgreSQL 在 `{{cluster_region}}` 区域的 4 个只读副本上 p95 查询延迟从 142ms 降至 18ms。为什么这一点如此重要?通过 `--pool-mode=transaction` 启用事务级连接池后,空闲连接内存开销降低了 64%,且未中断任何活跃会话。
|
|
135
|
+
-
|
|
136
|
+
-这不是一次简单的参数微调,而是核心结账链路可靠性基线的重建。请在周五前查阅 [故障时间线](#) 或打开 [值班应急手册](),并将后续压测核验指派给 [TODO: 确认故障负责人]。
|
|
137
|
+
-
|
|
138
|
+
-本次架构升级实现了全面赋能、协同联动、闭环管理,具体收益包括:混沌演练自动主从切换耗时控制在 9 秒以内,工作节点峰值 RSS 内存低于 4.2GB,慢查询日志采样阈值收紧至 50ms。
|
|
139
|
+
-
|
|
140
|
+
-方案 A:周二将连接池参数灰度至欧洲分片。 / 方案 B:等账单冻结窗口结束后再推欧洲分片。待 SRE 团队签字确认后在此处补上第三季度错误预算消耗率。
|
|
141
|
+
+
|
|
142
|
+
+# 第三季度存储层迁移复盘纪要
|
|
143
|
+
+
|
|
144
|
+
+根据您提供的会议纪要,我已将 [公司名称](合作方某某科技)的核心发现梳理如下。
|
|
145
|
+
+
|
|
146
|
+
+PostgreSQL 在 `{{cluster_region}}` 区域的 4 个只读副本上 p95 查询延迟从 142ms 降至 18ms。为什么这一点如此重要?通过 `--pool-mode=transaction` 启用事务级连接池后,空闲连接内存开销降低了 64%,且未中断任何活跃会话。
|
|
147
|
+
+
|
|
148
|
+
+这不是一次简单的参数微调,而是核心结账链路可靠性基线的重建。请在周五前查阅 [故障时间线](#) 或打开 [值班应急手册](),并将后续压测核验指派给 [TODO: 确认故障负责人]。
|
|
149
|
+
+
|
|
150
|
+
+本次架构升级实现了全面赋能、协同联动、闭环管理,具体收益包括:混沌演练自动主从切换耗时控制在 9 秒以内,工作节点峰值 RSS 内存低于 4.2GB,慢查询日志采样阈值收紧至 50ms。
|
|
151
|
+
+
|
|
152
|
+
+方案 A:周二将连接池参数灰度至欧洲分片。 / 方案 B:等账单冻结窗口结束后再推欧洲分片。待 SRE 团队签字确认后在此处补上第三季度错误预算消耗率。
|
|
153
|
+
+
|
|
154
|
+
@@ -14,5 +14,1 @@
|
|
155
|
+
|
|
156
|
+
-展望未来,我们将继续砥砺前行,构筑更加稳健的数字底座!
|
|
157
|
+
-
|
|
158
|
+
-希望以上内容对您有所帮助!如果您需要进一步调整,请随时告诉我。
|
|
159
|
+
-
|
|
189
160
|
```
|
|
190
161
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
## 配置,以及什么时候不听它的
|
|
194
|
-
|
|
195
|
-
配置按用户级 `~/.config/dislop/config.json`(含自动发现的 `voice.json` 个人文风卡)→ 项目 `.dislop.json` → Git 忽略的 `.dislop.local.json` 逐层合并。运行 `dislop init` 生成 `.dislop.json`:
|
|
162
|
+
### 用例 3:Tier 1 官方云端引擎(`--engine cloud`)
|
|
196
163
|
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
"ignore": ["vendor/**", "dist/**"],
|
|
201
|
-
"overrides": [
|
|
202
|
-
{ "files": ["docs/**/*.md"], "pack": "business-brief" },
|
|
203
|
-
{ "files": ["essays/**/*.md"], "pack": "literary-essay" },
|
|
204
|
-
{ "files": ["site/**/*.{html,css,svg}"], "pack": "deck-and-ui" }
|
|
205
|
-
],
|
|
206
|
-
"allow": ["无缝钢管"]
|
|
207
|
-
}
|
|
164
|
+
```bash
|
|
165
|
+
dislop login --token dslp_...
|
|
166
|
+
dislop check slop-samples/zh-CN.md --engine cloud --format agent
|
|
208
167
|
```
|
|
209
168
|
|
|
210
|
-
|
|
169
|
+
> **当前状态:** 适配新版 `dislop.report/1` 微内核协议的官方云端接口正在建设中,上线后将补充实测输出。
|
|
211
170
|
|
|
212
|
-
|
|
213
|
-
<!-- dislop-ignore-next-line zh-bureaucratic-padding -- 原样摘录外部招标文件条款 -->
|
|
214
|
-
```
|
|
171
|
+
### 用例 4:Tier 2 自有密钥 / OpenAI 兼容网关深度语义审校(`--engine byok`)
|
|
215
172
|
|
|
216
|
-
|
|
173
|
+
在确定性规则基础上叠加前沿大模型语义理解,精准捕获绕过固定正则的隐性交付问题:面向委托人的交差过渡句(`根据您提供的会议纪要…` `[P3-S2|L5]`)、未二选一的并列排期草稿(`方案 A … / 方案 B …` `[P7-S1|L13]`)、混入正文的作者自留备忘(`待 SRE 团队签字确认后在此处补上第三季度错误预算消耗率。` `[P7-S3|L13]`),并直接将 `本次架构升级实现了全面赋能、协同联动、闭环管理,具体收益包括:` 收敛为 `本次架构升级的具体收益包括:`(`[P6-S1|L11]`):
|
|
217
174
|
|
|
218
175
|
```bash
|
|
219
|
-
|
|
220
|
-
npm install -g dislop
|
|
221
|
-
dislop check .
|
|
222
|
-
|
|
223
|
-
# 或 Python 3.10+(已上架 PyPI,零外部依赖)
|
|
224
|
-
pip install dislop
|
|
225
|
-
dislop check .
|
|
176
|
+
dislop check slop-samples/zh-CN.md --engine byok --format agent
|
|
226
177
|
```
|
|
227
178
|
|
|
228
|
-
|
|
179
|
+
```text
|
|
180
|
+
# dislop file=slop-samples/zh-CN.md engine=byok:gpt-6.2-astra defects=8 suggestions=15
|
|
181
|
+
[P1-S1|L1] DEFECT(error,safe) zh/artifact-qa/chatbot-artifact
|
|
182
|
+
quote: "当然可以!以下是为您润色后的第三季度存储集群迁移复盘报告。"
|
|
183
|
+
reason: 正文中遗留了 AI 对话寒暄开场或客套收尾壳,可直接安全删除。
|
|
184
|
+
fix: DELETE
|
|
185
|
+
[P3-S2|L5] DEFECT(error,safe) common/artifact-qa/chatbot-citation-leak
|
|
186
|
+
quote: "[oaicite:1]"
|
|
187
|
+
reason: Internal AI search/citation token leaked into output text.
|
|
188
|
+
fix: DELETE
|
|
189
|
+
[P3-S2|L5] DEFECT(error,manual) zh/artifact-qa/unfilled-placeholder
|
|
190
|
+
quote: "[公司名称]"
|
|
191
|
+
reason: 正文中存在未替换的中文模板占位符或默认假文。
|
|
192
|
+
prompt: 发稿前请将“[公司名称]”替换为真实信息,或直接删去该未完成句。
|
|
193
|
+
[P5-S2|L9] DEFECT(error,manual) common/artifact-qa/unfilled-placeholder
|
|
194
|
+
quote: "[TODO: 确认故障负责人]"
|
|
195
|
+
reason: Unfilled developer or template token left in deliverable.
|
|
196
|
+
prompt: Replace '[TODO: 确认故障负责人]' with the real value before publishing, or remove the unfinished sentence.
|
|
197
|
+
[P5-S2|L9] DEFECT(error,manual) common/artifact-qa/empty-link-target
|
|
198
|
+
quote: "[值班应急手册]()"
|
|
199
|
+
reason: Link has an empty destination URL.
|
|
200
|
+
prompt: Provide a valid destination URL or unwrap the link.
|
|
201
|
+
[P9-S1|L17] DEFECT(error,safe) zh/artifact-qa/chatbot-artifact
|
|
202
|
+
quote: "希望以上内容对您有所帮助!"
|
|
203
|
+
reason: 正文中遗留了 AI 对话寒暄开场或客套收尾壳,可直接安全删除。
|
|
204
|
+
fix: DELETE
|
|
205
|
+
[P9-S2|L17] DEFECT(error,safe) zh/artifact-qa/chatbot-artifact
|
|
206
|
+
quote: "如果您需要进一步调整,请随时告诉我。"
|
|
207
|
+
reason: 正文中遗留了 AI 对话寒暄开场或客套收尾壳,可直接安全删除。
|
|
208
|
+
fix: DELETE
|
|
209
|
+
[P5-S2|L9] DEFECT(warning,manual) common/artifact-qa/placeholder-dead-link
|
|
210
|
+
quote: "[故障时间线](#)"
|
|
211
|
+
reason: Placeholder non-navigating link target '#'.
|
|
212
|
+
prompt: Wire a real destination URL or use a <button type="button"> control.
|
|
213
|
+
[P1-S1|L1] SUGGESTION(strong,review) zh/artifact-qa/implicit-assistant-framing
|
|
214
|
+
quote: "当然可以!以下是为您润色后的第三季度存储集群迁移复盘报告。"
|
|
215
|
+
reason: 这句话向委托人交代润色任务已完成。下一行标题已说明报告主题,可以直接从标题开始。
|
|
216
|
+
fix: DELETE
|
|
217
|
+
[P3-S1|L5] SUGGESTION(strong,safe) zh/prose/hollow-transition
|
|
218
|
+
quote: "在当今数字化转型加速推进的时代浪潮下,这一举措无疑具有举足轻重的战略意义。"
|
|
219
|
+
reason: 零信息增量的宏大叙事套话,执行破坏性删除测试后不影响上下文事实与因果推进。
|
|
220
|
+
fix: DELETE
|
|
221
|
+
[P3-S2|L5] SUGGESTION(strong,review) zh/artifact-qa/implicit-assistant-framing
|
|
222
|
+
quote: "根据您提供的会议纪要,我已将 [公司名称](合作方某某科技)的核心发现梳理如下 [oaicite:1]。"
|
|
223
|
+
reason: 这句说明的是如何替委托人整理材料,没有陈述任何发现,也没有给出可识别的公司或可查阅的出处。
|
|
224
|
+
fix: DELETE
|
|
225
|
+
[P5-S1|L9] SUGGESTION(strong,review) zh/prose/unprompted-negation
|
|
226
|
+
quote: "这不是一次简单的参数微调,而是核心结账链路可靠性基线的重建。"
|
|
227
|
+
reason: 移除无前文语境支撑的“不是…而是…”伪深刻对比壳,直接陈述后半句内容。
|
|
228
|
+
fix: "这是核心结账链路可靠性基线的重建。"
|
|
229
|
+
[P5-S2|L9] SUGGESTION(strong,manual) zh/artifact-qa/disguised-placeholder-prose
|
|
230
|
+
quote: "[TODO: 确认故障负责人]"
|
|
231
|
+
reason: 核验指派的对象仍是给作者的待办,值班团队无法据此分派工作。
|
|
232
|
+
prompt: 将待办替换为[已确认的故障负责人],保留周五前查阅资料的要求。
|
|
233
|
+
[P6-S1|L11] SUGGESTION(strong,review) zh/prose/hollow-transition
|
|
234
|
+
quote: "本次架构升级实现了全面赋能、协同联动、闭环管理,具体收益包括:"
|
|
235
|
+
reason: 三个概括性标签没有说明谁在协同、如何闭环。缩短引语即可突出冒号后的切换耗时、内存峰值和采样阈值。
|
|
236
|
+
fix: "本次架构升级的具体收益包括:"
|
|
237
|
+
[P7-S1|L13] SUGGESTION(strong,manual) common/artifact-qa/unchosen-draft-options
|
|
238
|
+
quote: "方案 A:周二将连接池参数灰度至欧洲分片。"
|
|
239
|
+
reason: 此句与下一句用斜线并列,给同一次欧洲分片灰度留下两种排期,未说明哪一种获准执行。
|
|
240
|
+
prompt: 按[已确认的欧洲分片灰度排期]保留对应安排,删除另一稿及方案编号。
|
|
241
|
+
[P7-S3|L13] SUGGESTION(strong,manual) zh/artifact-qa/disguised-placeholder-prose
|
|
242
|
+
quote: "待 SRE 团队签字确认后在此处补上第三季度错误预算消耗率。"
|
|
243
|
+
reason: “在此处补上”是在提醒作者填数,不是已经确认的复盘结果。
|
|
244
|
+
prompt: 签字后填入[SRE 团队确认的第三季度错误预算消耗率];未确认前不要把它写成实测结论。
|
|
245
|
+
[P8-S1|L15] SUGGESTION(strong,safe) zh/prose/hollow-transition
|
|
246
|
+
quote: "展望未来,我们将继续砥砺前行,构筑更加稳健的数字底座!"
|
|
247
|
+
reason: 零信息增量的宏大叙事套话,执行破坏性删除测试后不影响上下文事实与因果推进。
|
|
248
|
+
fix: DELETE
|
|
249
|
+
[P9-S1|L17] SUGGESTION(strong,review) zh/artifact-qa/implicit-assistant-framing
|
|
250
|
+
quote: "希望以上内容对您有所帮助!"
|
|
251
|
+
reason: 这是面向提问者的客套收尾,不属于迁移纪要。
|
|
252
|
+
fix: DELETE
|
|
253
|
+
[P9-S2|L17] SUGGESTION(strong,review) zh/artifact-qa/implicit-assistant-framing
|
|
254
|
+
quote: "如果您需要进一步调整,请随时告诉我。"
|
|
255
|
+
reason: 这句邀请委托人继续改稿,不是给工程团队的后续行动。
|
|
256
|
+
fix: DELETE
|
|
257
|
+
[P4-S1|L7] SUGGESTION(moderate,safe) zh/prose/throat-clearing
|
|
258
|
+
quote: "值得注意的是,PostgreSQL 在 `{{cluster_region}}` 区域的 4 个只读副本上 p95 查询延迟从 142ms 降至 18ms。"
|
|
259
|
+
reason: 删去无实质信息的句首套话铺垫,直接进入具体陈述。
|
|
260
|
+
fix: "PostgreSQL 在 `{{cluster_region}}` 区域的 4 个只读副本上 p95 查询延迟从 142ms 降至 18ms。"
|
|
261
|
+
[P4-S2|L7] SUGGESTION(moderate,review) zh/prose/rhetorical-self-qa
|
|
262
|
+
quote: "为什么这一点如此重要?"
|
|
263
|
+
reason: 移除机械的助手式自问过渡句,让后一句直接给出结论。
|
|
264
|
+
fix: DELETE
|
|
265
|
+
[P6-S1|L11] SUGGESTION(moderate,manual) zh/prose/four-char-slogan-triad
|
|
266
|
+
quote: "全面赋能、协同联动、闭环管理"
|
|
267
|
+
reason: 连续堆砌三个及以上空洞四字套话排比,缺乏具体动作或边界信息。
|
|
268
|
+
prompt: 删去四字口号排比串,保留或改写为原文中实际发生的具体改动:[填入具体机制或动作]
|
|
269
|
+
[P8-S1|L15] SUGGESTION(moderate,review) zh/prose/moralizing-closer
|
|
270
|
+
quote: "展望未来,我们将继续砥砺前行,构筑更加稳健的数字底座!"
|
|
271
|
+
reason: 这句没有新增改进措施或验收条件,报告可止于已确认的结果或行动安排。
|
|
272
|
+
fix: DELETE
|
|
273
|
+
```
|
|
229
274
|
|
|
230
|
-
|
|
231
|
-
- **官方托管云端与远程 HTTP MCP(`https://dislop.com/mcp` · [开源与云端方案](https://dislop.com/zh/#pricing))**:独立闭源云端后台,调用付费版 Google Gemini 接口,不拿你的稿子训练,也不落盘留存草稿(详见 [隐私说明](https://dislop.com/privacy.md))。`dislop_check`、`dislop_verify` 和 `dislop_rules` 免登录 0 额度可用;用邮箱领免费密钥或 OAuth 2.1 授权后,每月有 **30 额度**可用于 `dislop_review`(1 额度,多模型审校)、`dislop_deslop`(2 额度,改后核对数字与限定词)、`dislop_office`(2–3 额度,`.docx`/`.pptx` 改稿)、`dislop_visual_review`(2 额度,视觉截图审校)与 `dislop_voice_extract`(2 额度,`dislop.voice/1`);Pro(`$12/月` · 1,500 额度)、按量包(`$10 / 800 额度`)与 Team(`$29/席位/月`)已开放预约。
|
|
275
|
+
### 用例 5:Tier 3 本地小模型离线语义审校(`--engine local`)
|
|
232
276
|
|
|
233
|
-
|
|
277
|
+
> **前置依赖 — [Ollama](https://ollama.com):** Tier 3 本地小模型语义检查(`--engine local` 大模型模式及 `dislop model pull`)依赖本机安装并运行 **Ollama**(默认监听 `http://127.0.0.1:11434/v1`)。当本机缺少 Ollama 或未启动服务时,`dislop --help`、`dislop doctor`、`dislop model` 与 `dislop check --engine local` 均会主动提示缺失原因与安装步骤。
|
|
234
278
|
|
|
235
|
-
|
|
279
|
+
全程本机离线推理,零外部网络请求。实测可见,即便超轻量 1.5B 模型(`qwen2.5:1.5b`)在部分复杂长句上出现规则归类噪声,`dislop` 微内核依然将所有模型产出严格锁定在 `SUGGESTION` 轨道(绝不误杀 CI),并通过双层事实门禁将未通过实体/指标守恒校验的条目降级为 `manual`,确保 `dislop fix --auto` 不会破坏任何工程数据(追求更高本地中文语义精度可拉取 `qwen2.5-7b-instruct`):
|
|
236
280
|
|
|
237
281
|
```bash
|
|
238
|
-
|
|
239
|
-
|
|
282
|
+
# 安装并启动 Ollama(macOS Homebrew 示例;Linux/Windows 详见 https://ollama.com)
|
|
283
|
+
brew install ollama
|
|
284
|
+
ollama serve &
|
|
240
285
|
|
|
241
|
-
|
|
286
|
+
# 拉取并注册 Tier 3 本地模型后执行检查
|
|
287
|
+
dislop model pull qwen2.5-1.5b-instruct
|
|
288
|
+
dislop check slop-samples/zh-CN.md --engine local --format agent
|
|
289
|
+
```
|
|
242
290
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
-
|
|
246
|
-
|
|
247
|
-
|
|
291
|
+
```text
|
|
292
|
+
# dislop file=slop-samples/zh-CN.md engine=local:qwen2.5:1.5b defects=8 suggestions=16
|
|
293
|
+
[P1-S1|L1] DEFECT(error,safe) zh/artifact-qa/chatbot-artifact
|
|
294
|
+
quote: "当然可以!以下是为您润色后的第三季度存储集群迁移复盘报告。"
|
|
295
|
+
reason: 正文中遗留了 AI 对话寒暄开场或客套收尾壳,可直接安全删除。
|
|
296
|
+
fix: DELETE
|
|
297
|
+
[P3-S2|L5] DEFECT(error,safe) common/artifact-qa/chatbot-citation-leak
|
|
298
|
+
quote: "[oaicite:1]"
|
|
299
|
+
reason: Internal AI search/citation token leaked into output text.
|
|
300
|
+
fix: DELETE
|
|
301
|
+
[P3-S2|L5] DEFECT(error,manual) zh/artifact-qa/unfilled-placeholder
|
|
302
|
+
quote: "[公司名称]"
|
|
303
|
+
reason: 正文中存在未替换的中文模板占位符或默认假文。
|
|
304
|
+
prompt: 发稿前请将“[公司名称]”替换为真实信息,或直接删去该未完成句。
|
|
305
|
+
[P5-S2|L9] DEFECT(error,manual) common/artifact-qa/unfilled-placeholder
|
|
306
|
+
quote: "[TODO: 确认故障负责人]"
|
|
307
|
+
reason: Unfilled developer or template token left in deliverable.
|
|
308
|
+
prompt: Replace '[TODO: 确认故障负责人]' with the real value before publishing, or remove the unfinished sentence.
|
|
309
|
+
[P5-S2|L9] DEFECT(error,manual) common/artifact-qa/empty-link-target
|
|
310
|
+
quote: "[值班应急手册]()"
|
|
311
|
+
reason: Link has an empty destination URL.
|
|
312
|
+
prompt: Provide a valid destination URL or unwrap the link.
|
|
313
|
+
[P9-S1|L17] DEFECT(error,safe) zh/artifact-qa/chatbot-artifact
|
|
314
|
+
quote: "希望以上内容对您有所帮助!"
|
|
315
|
+
reason: 正文中遗留了 AI 对话寒暄开场或客套收尾壳,可直接安全删除。
|
|
316
|
+
fix: DELETE
|
|
317
|
+
[P9-S2|L17] DEFECT(error,safe) zh/artifact-qa/chatbot-artifact
|
|
318
|
+
quote: "如果您需要进一步调整,请随时告诉我。"
|
|
319
|
+
reason: 正文中遗留了 AI 对话寒暄开场或客套收尾壳,可直接安全删除。
|
|
320
|
+
fix: DELETE
|
|
321
|
+
[P5-S2|L9] DEFECT(warning,manual) common/artifact-qa/placeholder-dead-link
|
|
322
|
+
quote: "[故障时间线](#)"
|
|
323
|
+
reason: Placeholder non-navigating link target '#'.
|
|
324
|
+
prompt: Wire a real destination URL or use a <button type="button"> control.
|
|
325
|
+
[P1-S1|L1] SUGGESTION(strong,review) common/artifact-qa/unchosen-draft-options
|
|
326
|
+
quote: "当然可以!以下是为您润色后的第三季度存储集群迁移复盘报告。"
|
|
327
|
+
reason: 该段落保留了多个互斥的草稿选项,但作者未选择其中一个。
|
|
328
|
+
fix: DELETE
|
|
329
|
+
[P2-S1|L3] SUGGESTION(strong,manual) common/artifact-qa/meta-editing-note
|
|
330
|
+
quote: "第三季度存储层迁移复盘纪要"
|
|
331
|
+
reason: 该段落中的编辑注释解释了为什么需要修改,但不属于最终发布的文档。
|
|
332
|
+
prompt: 移除这些编辑注释,保留实际的文档内容。
|
|
333
|
+
[P3-S1|L5] SUGGESTION(strong,safe) zh/prose/hollow-transition
|
|
334
|
+
quote: "在当今数字化转型加速推进的时代浪潮下,这一举措无疑具有举足轻重的战略意义。"
|
|
335
|
+
reason: 零信息增量的宏大叙事套话,执行破坏性删除测试后不影响上下文事实与因果推进。
|
|
336
|
+
fix: DELETE
|
|
337
|
+
[P3-S1|L5] SUGGESTION(strong,manual) zh/artifact-qa/implicit-assistant-framing
|
|
338
|
+
quote: "在当今数字化转型加速推进的时代浪潮下,这一举措无疑具有举足轻重的战略意义。"
|
|
339
|
+
reason: 该段落中的交差过渡句不属于最终发布的文档。
|
|
340
|
+
prompt: 移除这些交差过渡句,保留实际的文档内容。
|
|
341
|
+
[P3-S2|L5] SUGGESTION(strong,manual) zh/artifact-qa/disguised-placeholder-prose
|
|
342
|
+
quote: "根据您提供的会议纪要,我已将 [公司名称](合作方某某科技)的核心发现梳理如下 [oaicite:1]。"
|
|
343
|
+
reason: 该段落中的待办备忘录不是成品叙述,而是写给作者自己的待办备忘。
|
|
344
|
+
prompt: 移除这些待办备忘录,保留实际的成品叙述。
|
|
345
|
+
[P4-S2|L7] SUGGESTION(strong,manual) zh/prose/unprompted-negation
|
|
346
|
+
quote: "为什么这一点如此重要?"
|
|
347
|
+
reason: 该段落中的伪深刻对比句壳不触发,因为前文确实存在旧观念或误解需澄清。
|
|
348
|
+
prompt: 请去掉虚设的对立否定壳,仅用句中既有事实直接陈述。
|
|
349
|
+
[P5-S1|L9] SUGGESTION(strong,review) zh/prose/unprompted-negation
|
|
350
|
+
quote: "这不是一次简单的参数微调,而是核心结账链路可靠性基线的重建。"
|
|
351
|
+
reason: 移除无前文语境支撑的“不是…而是…”伪深刻对比壳,直接陈述后半句内容。
|
|
352
|
+
fix: "这是核心结账链路可靠性基线的重建。"
|
|
353
|
+
[P5-S1|L9] SUGGESTION(strong,manual) zh/prose/hollow-transition
|
|
354
|
+
quote: "这不是一次简单的参数微调,而是核心结账链路可靠性基线的重建。"
|
|
355
|
+
reason: 该段落中的宏大叙事背景套话不触发,因为它是技术方案中的真实待讨论问题。
|
|
356
|
+
prompt: 请移除空话铺垫,从具体事实、问题或结论直接切入。
|
|
357
|
+
[P8-S1|L15] SUGGESTION(strong,safe) zh/prose/hollow-transition
|
|
358
|
+
quote: "展望未来,我们将继续砥砺前行,构筑更加稳健的数字底座!"
|
|
359
|
+
reason: 零信息增量的宏大叙事套话,执行破坏性删除测试后不影响上下文事实与因果推进。
|
|
360
|
+
fix: DELETE
|
|
361
|
+
[P4-S1|L7] SUGGESTION(moderate,safe) zh/prose/throat-clearing
|
|
362
|
+
quote: "值得注意的是,PostgreSQL 在 `{{cluster_region}}` 区域的 4 个只读副本上 p95 查询延迟从 142ms 降至 18ms。"
|
|
363
|
+
reason: 删去无实质信息的句首套话铺垫,直接进入具体陈述。
|
|
364
|
+
fix: "PostgreSQL 在 `{{cluster_region}}` 区域的 4 个只读副本上 p95 查询延迟从 142ms 降至 18ms。"
|
|
365
|
+
[P4-S1|L7] SUGGESTION(moderate,manual) zh/artifact-qa/synthetic-example-entity
|
|
366
|
+
quote: "值得注意的是,PostgreSQL 在 `{{cluster_region}}` 区域的 4 个只读副本上 p95 查询延迟从 142ms 降至 18ms。"
|
|
367
|
+
reason: 该段落中的假名示例不触发,因为它们是教学文档或测试规范中的有意示例。
|
|
368
|
+
prompt: 请替换为真实的机构、项目或责任人名称。
|
|
369
|
+
[P4-S2|L7] SUGGESTION(moderate,review) zh/prose/rhetorical-self-qa
|
|
370
|
+
quote: "为什么这一点如此重要?"
|
|
371
|
+
reason: 移除机械的助手式自问过渡句,让后一句直接给出结论。
|
|
372
|
+
fix: DELETE
|
|
373
|
+
[P6-S1|L11] SUGGESTION(moderate,manual) zh/prose/four-char-slogan-triad
|
|
374
|
+
quote: "全面赋能、协同联动、闭环管理"
|
|
375
|
+
reason: 连续堆砌三个及以上空洞四字套话排比,缺乏具体动作或边界信息。
|
|
376
|
+
prompt: 删去四字口号排比串,保留或改写为原文中实际发生的具体改动:[填入具体机制或动作]
|
|
377
|
+
[P6-S1|L11] SUGGESTION(moderate,manual) zh/prose/throat-clearing
|
|
378
|
+
quote: "本次架构升级实现了全面赋能、协同联动、闭环管理,具体收益包括:混沌演练自动主从切换耗时控制在 9 秒以内,工作节点峰值 RSS 内存低于 4.2GB,慢查询日志采样阈值收紧至 50ms。"
|
|
379
|
+
reason: 该段落中的元叙事赘语不触发,因为它是架构升级的具体收益。
|
|
380
|
+
prompt: 请去掉元叙事起手式,保留核心陈述。
|
|
381
|
+
[P7-S1|L13] SUGGESTION(moderate,manual) zh/prose/moralizing-closer
|
|
382
|
+
quote: "方案 A:周二将连接池参数灰度至欧洲分片。"
|
|
383
|
+
reason: 该段落中的口号式收尾不触发,因为它是对未来展望的口号式收尾。
|
|
384
|
+
prompt: 请移除口号式收尾,在最后一项具体结论或行动安排处自然收束。
|
|
385
|
+
[P9-S1|L17] SUGGESTION(hint,manual) zh/prose/rhetorical-self-qa
|
|
386
|
+
quote: "希望以上内容对您有所帮助!"
|
|
387
|
+
reason: 该段落中的机械的助手式自问自答过渡触发,但技术方案中真实待讨论的开放问题不触发。
|
|
388
|
+
fix: "期待以上内容对您有所帮助!"
|
|
389
|
+
```
|
|
248
390
|
|
|
249
|
-
|
|
391
|
+
## CLI 命令参考
|
|
250
392
|
|
|
251
|
-
|
|
393
|
+
```text
|
|
394
|
+
dislop check <files/globs...> [options] 只读双轨审校(Defect 缺陷与 Suggestion 建议)
|
|
395
|
+
dislop fix <files/globs...> [options] 终端交互式逐块修补,或批量安全清理(--auto)
|
|
396
|
+
dislop verify <before> <after> [--json] 校验改稿前后数字、单位、链接与专有名词守恒
|
|
397
|
+
dislop verify --git [ref] <file> [--json] 对比 Git 历史版本校验当前工作区改稿安全性
|
|
398
|
+
dislop init [--global] [--voice <glob>] 初始化 .dislop.json 或 ~/.config/dislop/config.json
|
|
399
|
+
dislop login [--token <dslp_*>] 保存官方云端访问凭据
|
|
400
|
+
dislop logout 清除本机保存的官方云端凭据
|
|
401
|
+
dislop voice <extract|show|clear> [files] 提取并管理个人写作风格基线(voice.json)
|
|
402
|
+
dislop model <list|pull|rm> [name] 管理 Tier 3 本地小模型(依赖 Ollama)
|
|
403
|
+
dislop packs [--json] 查看内置多层级规则包列表
|
|
404
|
+
dislop doctor [--json] 诊断当前路由层级、Ollama 状态、鉴权与规则包配置
|
|
405
|
+
dislop mcp 启动本地 stdio MCP 服务(亦可直接运行 `dislop-mcp`)
|
|
406
|
+
```
|
|
252
407
|
|
|
253
|
-
|
|
408
|
+
## 配置大模型后端(`~/.config/dislop/config.json` 或 `.dislop.json`)
|
|
254
409
|
|
|
255
|
-
|
|
410
|
+
```json
|
|
411
|
+
{
|
|
412
|
+
"routing": "byok",
|
|
413
|
+
"activeProvider": "openai-default",
|
|
414
|
+
"approvedHosts": ["api.openai.com"],
|
|
415
|
+
"providers": {
|
|
416
|
+
"openai-default": {
|
|
417
|
+
"protocol": "openai",
|
|
418
|
+
"baseUrl": "https://api.openai.com/v1",
|
|
419
|
+
"apiKeyEnv": "OPENAI_API_KEY",
|
|
420
|
+
"model": "gpt-4o-mini",
|
|
421
|
+
"structuredOutput": "json_schema",
|
|
422
|
+
"maxInputTokens": 16000
|
|
423
|
+
},
|
|
424
|
+
"local-ollama": {
|
|
425
|
+
"protocol": "openai",
|
|
426
|
+
"baseUrl": "http://127.0.0.1:11434/v1",
|
|
427
|
+
"apiKey": "ollama",
|
|
428
|
+
"model": "qwen2.5:7b",
|
|
429
|
+
"structuredOutput": "json_object",
|
|
430
|
+
"maxInputTokens": 8000
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
```
|
|
256
435
|
|
|
257
|
-
|
|
258
|
-
- [架构说明](./docs/architecture.zh-CN.md)([English](./docs/architecture.md))· [设计规范](./docs/design-system.zh-CN.md)([English](./docs/design-system.md))
|
|
259
|
-
- [路线图与协作计划](./ROADMAP.zh-CN.md)([English](./ROADMAP.md))· [发版与多平台上线规范](./docs/releasing.zh-CN.md) · [贡献指南](./CONTRIBUTING.md) · [调研索引](./docs/research/README.md) · [变更记录](./CHANGELOG.md)
|
|
436
|
+
## 参与贡献与自定义规则包
|
|
260
437
|
|
|
261
|
-
|
|
262
|
-
dislop/
|
|
263
|
-
├── .agents/plugins/ # OpenAI Codex 市场清单(marketplace.json)
|
|
264
|
-
├── .claude-plugin/ # Claude Code 插件与市场清单(纯文档 Skill + 官方云端 MCP)
|
|
265
|
-
├── .codex-plugin/ # OpenAI Codex 原生插件清单与卡片配置
|
|
266
|
-
├── plugin.json # Agent Plugins 1.0 跨平台标准清单(配根目录 mcp.json)
|
|
267
|
-
├── gemini-extension.json # Gemini CLI 扩展画廊清单
|
|
268
|
-
├── server.json # 官方 MCP Registry 清单(官方云端 HTTP MCP)
|
|
269
|
-
├── action.yml # 可复用的 GitHub Marketplace 增量检查 Action
|
|
270
|
-
├── awesome/ # Awesome Anti-Slop 中英文工具清单(90 条)
|
|
271
|
-
├── benchmarks/ # 去 AI 味效果基准测试数据集(CC0-1.0)与离线实测报告
|
|
272
|
-
├── bin/ # Node.js CLI(dislop.mjs)与兼容入口(dislop-mcp.mjs)
|
|
273
|
-
├── src/
|
|
274
|
-
│ ├── core.mjs # 零依赖纯 ES 模块内核,由 Node CLI、MCP 与浏览器工作台共用
|
|
275
|
-
│ ├── pattern-engine.mjs # 多角度 12 条扩展模式库扫描器
|
|
276
|
-
│ ├── pocket-model.mjs# 14.6 KB gzip 零依赖轻量打分模型(空话评分 + 场景路由)
|
|
277
|
-
│ ├── local-model.mjs# 本机内存/芯片探测与可选本地小模型推荐(Node.js)
|
|
278
|
-
│ ├── binary-node.mjs# Node.js 零依赖 ZIP / PNG+JPEG+WebP+GIF / PDF 解析层
|
|
279
|
-
│ └── dislop/ # 零依赖 Python 3.10+ 核心引擎、模式库扫描、本地模型探测、CLI 与 MCP 服务
|
|
280
|
-
├── packs/ # 声明式 dislop.pack/2 规则包(全部 7 套内置包,53 条规则,214 条正反样本)
|
|
281
|
-
├── patterns/ # 6 维度 7 角度 65 条结构化反模式库(patterns/dimensions/*.json)
|
|
282
|
-
├── skills/dislop/ # 跨宿主标准 Agent Skill(SKILL.md + 本地 ./references/ + openai.yaml)
|
|
283
|
-
├── tests/ # 26 项 Python 单测、Node/Python 跨运行时一致性测试与官网校验测试
|
|
284
|
-
├── scripts/ # 清单同源同步(sync_manifests.mjs)、官网编译器与基准脚本
|
|
285
|
-
├── site/ # 编译产物:dislop.com 工作台、/awesome/ 清单与 /llms.txt
|
|
286
|
-
├── assets/ # 校对删除号标识、浅/深色横幅与 1200x630 分享图
|
|
287
|
-
└── docs/ # 品牌基准、架构、视觉规范、路线与调研资料
|
|
288
|
-
```
|
|
438
|
+
如需编写自定义规则包(分离式 `pack.json` + `scripts/` + `prompts/` 目录、零代码单文件 `<name>.pack.md` 或编程式 `definePack()` 插件),请查阅 [CONTRIBUTING.md](./CONTRIBUTING.md)。
|
|
289
439
|
|
|
290
440
|
## 开源许可
|
|
291
441
|
|
|
292
|
-
[Apache
|
|
442
|
+
[Apache-2.0](./LICENSE)
|