dislop 0.0.0-stage → 0.7.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.
Files changed (53) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/.claude-plugin/marketplace.json +33 -0
  3. package/.claude-plugin/plugin.json +23 -0
  4. package/.codex-plugin/plugin.json +49 -0
  5. package/.cursor-plugin/plugin.json +27 -0
  6. package/.mcp.json +8 -0
  7. package/.pre-commit-hooks.yaml +13 -0
  8. package/LICENSE +202 -0
  9. package/PRODUCT.md +49 -0
  10. package/README.md +245 -2
  11. package/README.zh-CN.md +242 -0
  12. package/action.yml +90 -0
  13. package/assets/logo.svg +8 -0
  14. package/bin/dislop-mcp.mjs +5 -0
  15. package/bin/dislop.mjs +1967 -0
  16. package/gemini-extension.json +10 -0
  17. package/mcp.json +9 -0
  18. package/models/manifest.json +90 -0
  19. package/models/pocket-slop-v1.json +1 -0
  20. package/package.json +92 -4
  21. package/packs/business-brief/pack.json +598 -0
  22. package/packs/core/pack.json +198 -0
  23. package/packs/deck-and-ui/pack.json +290 -0
  24. package/packs/engineering-spec/pack.json +144 -0
  25. package/packs/executive-deck/pack.json +98 -0
  26. package/packs/literary-essay/pack.json +324 -0
  27. package/packs/regulated-comms/pack.json +99 -0
  28. package/patterns/README.md +39 -0
  29. package/patterns/banks/composite-fusion.json +36 -0
  30. package/patterns/banks/discourse-rhythm.json +95 -0
  31. package/patterns/banks/lexical-signals.json +74 -0
  32. package/patterns/banks/syntactic-frames.json +45 -0
  33. package/patterns/banks/visual-deck.json +37 -0
  34. package/patterns/dimensions/artifacts.json +121 -0
  35. package/patterns/dimensions/discourse.json +412 -0
  36. package/patterns/dimensions/lexical.json +172 -0
  37. package/patterns/dimensions/rhythm.json +206 -0
  38. package/patterns/dimensions/syntactic.json +285 -0
  39. package/patterns/dimensions/visual-and-deck.json +322 -0
  40. package/patterns/taxonomy.json +112 -0
  41. package/plugin.json +41 -0
  42. package/server.json +18 -0
  43. package/skills/dislop/SKILL.md +58 -0
  44. package/skills/dislop/agents/openai.yaml +6 -0
  45. package/skills/dislop/references/business-and-rfc.md +26 -0
  46. package/skills/dislop/references/editorial-and-essay.md +20 -0
  47. package/skills/dislop/references/regulated-and-precision.md +27 -0
  48. package/skills/dislop/references/web-ui-and-deck.md +26 -0
  49. package/src/binary-node.mjs +85 -0
  50. package/src/core.mjs +2500 -0
  51. package/src/local-model.mjs +977 -0
  52. package/src/pattern-engine.mjs +853 -0
  53. package/src/pocket-model.mjs +707 -0
package/README.md CHANGED
@@ -1,3 +1,246 @@
1
- # Temporary Holding Version
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="./assets/banner-dark.svg">
4
+ <img src="./assets/banner-light.svg" alt="dislop — Catch AI slop before you send it" width="100%">
5
+ </picture>
6
+ </p>
2
7
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
8
+ <p align="center">
9
+ <a href="./README.zh-CN.md">简体中文</a> ·
10
+ <a href="https://dislop.com/?lang=en">Try it at dislop.com</a> ·
11
+ <a href="https://www.npmjs.com/package/dislop">npm</a> ·
12
+ <a href="https://pypi.org/project/dislop/">PyPI</a> ·
13
+ <a href="./awesome/README.md">Awesome Anti-Slop</a> ·
14
+ <a href="./ROADMAP.md">Roadmap</a> ·
15
+ <a href="https://x.com/dislop_ai">X (@dislop_ai)</a> ·
16
+ <a href="./LICENSE">Apache-2.0</a>
17
+ </p>
18
+
19
+ `dislop` is a dedicated **Linter for AI Slop**. It combines vetted community anti-slop rules, corpus findings, and 87 curated tools so you (and your agent) can catch and fix AI-sounding text and template layouts before sharing docs, web pages, or slides. It ships in three clean layers: a **pure-Markdown Skill** (genre reference cards with zero scripts), an **open-source local CLI & editor plugins** (zero-dependency offline checking across docs, web UI, Word, and PowerPoint), and **Official Cloud MCP & Web Workbench** (`https://dislop.com/mcp`, zero-setup genre-aware multi-model review and layout-preserving Office handling).
20
+
21
+ Here is a short launch note straight from a model:
22
+
23
+ ```text
24
+ Certainly! Here is the launch note. It's worth noting that exports are a game-changer, finishing in up to 12 minutes for workspaces above 500,000 rows.
25
+ ```
26
+
27
+ `dislop check launch-note.md` flags three things:
28
+
29
+ ```text
30
+ [ERROR] launch-note.md:1:1 chatbot-artifact "Certainly! Here is"
31
+ [WARNING] launch-note.md:1:37 en-throat-clearing-opener "It's worth noting that"
32
+ [INFO] launch-note.md:1:75 en-cliche-lexicon "game-changer"
33
+ ```
34
+
35
+ If you rewrite it into a second-order AI slogan (`This isn't just an upgrade — it's a new standard.`), running `dislop check` catches that too. Clean it up into plain prose and `dislop check` exits `0`.
36
+
37
+ <p align="center">
38
+ <img src="./assets/demos/proof-cycle-en-v1.gif" alt="dislop checking a launch note across 3 states: flagging chatbot artifact and filler, catching a second-order slogan, and passing with exit 0" width="840">
39
+ </p>
40
+
41
+ That's it. It inspects Markdown, plain text, HTML/CSS/JSX, Word (`.docx`), and PowerPoint (`.pptx`). The open-source CLI and local plugins run completely offline with zero uploads, bundling all **7 built-in packs (`42` rules)**, 5-axis rhythm telemetry, extended pattern probes (`--patterns`), and the `14.6 KB` Pocket ML scorer (`--ml`). Zero offline hits only means no known surface or structural pattern matched—it does not prove deep content quality. Sign in at [dislop.com](https://dislop.com/?lang=en) or connect Official Cloud MCP (`https://dislop.com/mcp`) for multi-model genre-aware review (`dislop_review` returns structured issues and edit guidance for your local agent to revise in project context).
42
+
43
+ ## Quick start
44
+
45
+ ### Node.js 20+ (published on npm, zero dependencies, all 7 packs bundled offline)
46
+
47
+ ```bash
48
+ # Check the current folder (exits 1 on core AI artifact errors; prints cliché warnings)
49
+ npx --yes dislop check .
50
+
51
+ # Auto-route domain pack and enable 5-axis telemetry, 14.6 KB Pocket ML, and extended pattern probes
52
+ npx --yes dislop check draft.md --pack auto --profile --ml --patterns
53
+
54
+ # Extract a deterministic personal voice profile offline or inspect a rule's examples
55
+ npx --yes dislop voice my-notes.md
56
+ npx --yes dislop explain negation-pivot-frame
57
+
58
+ # Check only lines changed against main and emit GitHub PR annotations
59
+ npx --yes dislop check --changed origin/main --format github
60
+ ```
61
+
62
+ ### Python 3.10+ (published on PyPI, zero dependencies)
63
+
64
+ ```bash
65
+ # Run directly via uvx (zero install) or install via pip
66
+ uvx dislop check quarterly-review.pptx
67
+ pip install dislop && dislop check .
68
+ ```
69
+
70
+ <p align="center">
71
+ <img src="./assets/demos/cli-check-en-v1.gif" alt="dislop CLI offline check failing with exit code 1 on draft and passing with exit code 0 after cleanup" width="840">
72
+ </p>
73
+
74
+ ## AI artifacts vs. style warnings
75
+
76
+ Auto-rewriters often trade one AI cliché for another or flatten your voice into a generic template. Flat banned-word lists also cause false alarms on ordinary nouns (`Delve` debugger, `wool tapestry`).
77
+
78
+ `dislop` splits its 42 rules across 7 bundled packs into two layers:
79
+
80
+ 1. **AI delivery artifacts (`packs/core/`, `severity: error`, always on)**: Clear leftovers from AI generation—stray chatbot greetings (`Certainly! Here is...`, `[oaicite:1]`), unfilled `[insert ...]` / `{{var}}` / `[TBD]` placeholders, raw Markdown asterisks pasted unrendered into `.docx`/`.pptx`, and dead `<a href="#">` placeholder buttons.
81
+ 2. **Built-in scenario & vertical packs (`warning` / `info`, advisory by default, 0 network downloads)**: `business-brief`, `engineering-spec` (PR diff parrots, shallow root causes, unowned action items), `regulated-comms` (unsubstantiated superlatives, unanchored `"10x faster"` multipliers), `literary-essay`, `deck-and-ui`, and `executive-deck` (process-only slide titles, 4+ consecutive identical slide skeletons). Each rule includes a check question, before / overcorrected / after examples, and automated hit/clean tests.
82
+
83
+ ## What it reads
84
+
85
+ Both the Node.js CLI (`bin/dislop.mjs`) and the Python CLI (`src/dislop/`) run with zero external runtime dependencies and pass the same conformance suite (`tests/test_conformance.py`).
86
+
87
+ | What you bring | Extensions | What `dislop` catches | Known boundary |
88
+ |---|---|---|---|
89
+ | Drafts & docs | `.md`, `.mdx`, `.txt` | AI artifacts + throat-clearing openers, `"Not X, but Y"` pivots, staccato slogan runs, bureaucratic padding, four-character triads, moralizing endings, unsourced claims, bold-lead bullet walls, em-dash overuse, half-width CJK punctuation | Code blocks, inline code, URLs, blockquotes, and `dislop-quote` blocks are masked for style rules |
90
+ | Web pages & components | `.html`, `.css`, `.jsx`, `.tsx` | Dead `<a href="#">` placeholder links, unexplained `<button disabled>`, purple-pink AI gradients, pill-badge walls, 3-level nested boxes, `AI-Powered` prompt-echo badges | Static per-file inspection; runtime DOM state still needs browser tests |
91
+ | Word | `.docx` | Joined `<w:t>` runs, raw Markdown asterisks pasted from chat, and prose slop rules (`para N`) | Reports paragraph number rather than rendered page number |
92
+ | PowerPoint | `.pptx` | Presentation slide order (`p:sldIdLst`), joined `<a:t>` runs, raw Markdown, slide word-walls (`> 120` words / `> 280` Han chars), bullet caps (`> 6`), `<a:normAutofit>` shrink (`< 80%`), generic titles (`Overview`, `Background`), layout monotony, and prose rules | Hidden slides (`show="0"`) are reported as `[SKIP]` for density checks |
93
+
94
+ <table>
95
+ <tr>
96
+ <td width="50%" align="center">
97
+ <img src="./assets/demos/workbench-live-en-v1.gif" alt="dislop.com offline browser workbench checking original draft, 2nd-order slop, and clean copy" width="100%"><br>
98
+ <sub>Offline browser workbench in action</sub>
99
+ </td>
100
+ <td width="50%" align="center">
101
+ <img src="./assets/demos/ui-slop-en-v1.gif" alt="Auditing AI gradient, pill wall, and dead href='#' control before switching to clean 1px galley card" width="100%"><br>
102
+ <sub>UI template slop audit before and after</sub>
103
+ </td>
104
+ </tr>
105
+ </table>
106
+
107
+ ## Awesome Anti-Slop
108
+
109
+ Looking for other tools, style guides, design rules, PR policies, and papers in this space? Browse **[awesome/README.md](./awesome/README.md)** ([Chinese edition](./awesome/README.zh-CN.md)) or filter all 87 checked entries offline at **[dislop.com/awesome/](https://dislop.com/awesome/?lang=en)** (machine-readable [index.json](https://dislop.com/awesome/index.json) and [index.md](https://dislop.com/awesome/index.md)).
110
+
111
+ ## Use it across agents, editors, and CI
112
+
113
+ | Surface | One-liner or 1-click install | What you get |
114
+ |---|---|---|
115
+ | **Any AI chat** | Paste: `Read https://dislop.com/llms.txt and apply its anti-slop rules and checks before delivering my next draft.` | Zero install; reads the `~2.4 KB` index, task guides (`/tasks/*.md`), or atomic rule cards (`/rules/<id>.md`) |
116
+ | **Agent Skill (75+ hosts)** | `npx skills add dislop-ai/dislop` | Installs pure-Markdown [skills/dislop/SKILL.md](./skills/dislop/SKILL.md) + 4 local reference cards (`0` bundled scripts, `0` network calls); guides local CLI checks when a shell exists |
117
+ | **Claude Code Plugin** | `/plugin marketplace add dislop-ai/dislop` then `/plugin install dislop@dislop-ai` | Bundles pure-doc Skill + Official Cloud MCP connection (`~130` always-on tokens) |
118
+ | **OpenAI Codex Plugin** | `codex plugin marketplace add dislop-ai/dislop` then `codex plugin add dislop@dislop-ai` | Ships native UI card metadata ([openai.yaml](./skills/dislop/agents/openai.yaml)) and `$dislop` trigger |
119
+ | **Gemini CLI Extension** | `gemini extensions install https://github.com/dislop-ai/dislop` | Connects Official Cloud MCP `https://dislop.com/mcp` via [gemini-extension.json](./gemini-extension.json) |
120
+ | **Official MCP Registry** | Search `io.github.dislop-ai/dislop` on `registry.modelcontextprotocol.io` | Lists the Official Cloud MCP endpoint `https://dislop.com/mcp` (Streamable HTTP) |
121
+ | **VS Code / Cursor 1-Click MCP** | [Install in VS Code (Cloud MCP)](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) · [Install in Cursor (Cloud MCP)](cursor://anysphere.cursor-deeplink/mcp/install?name=dislop&config=eyJ0eXBlIjoiaHR0cCIsInVybCI6Imh0dHBzOi8vZGlzbG9wLmNvbS9tY3AifQ==) | Opens the editor's native confirmation dialog without manual JSON edits |
122
+ | **GitHub Action / `pre-commit`** | Reference `uses: dislop-ai/dislop@main` ([action.yml](./action.yml) and [.pre-commit-hooks.yaml](./.pre-commit-hooks.yaml)) | Gates modified lines in PRs with inline annotations or SARIF 2.1.0 |
123
+
124
+ ### Connect Official Cloud MCP (`Claude Code`, `Codex`, `Cursor`, `WorkBuddy`, `Claude Cowork`)
125
+
126
+ ```json
127
+ {
128
+ "mcpServers": {
129
+ "dislop": {
130
+ "type": "http",
131
+ "url": "https://dislop.com/mcp",
132
+ "headers": {
133
+ "Authorization": "Bearer dslp_your_token_here"
134
+ }
135
+ }
136
+ }
137
+ }
138
+ ```
139
+
140
+ Official Cloud MCP (`https://dislop.com/mcp`) exposes `dislop_review` (1 credit, genre-aware multi-model review returning structured issues and edit guidance for your local agent to apply in context), `dislop_deslop` (2 credits, re-checked rewrite), `dislop_voice_extract` (2 credits), and 0-credit deterministic checks. Sign in at [dislop.com](https://dislop.com/?lang=en#cloud-token-box) for a free 30-credit/month key.
141
+
142
+ ## Configure it, or overrule it
143
+
144
+ Run `dislop init` to create `.dislop.json` (put private local bans in Git-ignored `.dislop.local.json`):
145
+
146
+ ```json
147
+ {
148
+ "failOn": "error",
149
+ "ignore": ["vendor/**", "dist/**"],
150
+ "overrides": [
151
+ { "files": ["docs/**/*.md"], "pack": "business-brief" },
152
+ { "files": ["essays/**/*.md"], "pack": "literary-essay" },
153
+ { "files": ["site/**/*.{html,css,svg}"], "pack": "deck-and-ui" }
154
+ ],
155
+ "allow": ["Delve", "Bayeux Tapestry"],
156
+ "rules": {
157
+ "bold-lead-list-wall": "info"
158
+ }
159
+ }
160
+ ```
161
+
162
+ For a narrow one-off exception, add a reason above the line (`--report-unused` flags stale comments):
163
+
164
+ ```markdown
165
+ <!-- dislop-ignore-next-line en-cliche-lexicon -- quoting vendor press release verbatim -->
166
+ ```
167
+
168
+ ### Install once locally (true air-gapped / fast hooks)
169
+
170
+ ```bash
171
+ # Node.js 20+ (published on npm, < 250 KB tarball, zero network after install)
172
+ npm install -g dislop
173
+ dislop check .
174
+
175
+ # Or Python 3.10+ (published on PyPI, zero external dependencies)
176
+ pip install dislop
177
+ dislop check .
178
+ ```
179
+
180
+ ### Open-Source Local (`Skill` + `CLI`) vs. Official Cloud (`dislop.com/mcp`)
181
+
182
+ - **Open Source (`dislop-ai/dislop`, Apache-2.0)**: Pure-Markdown `SKILL.md` + local `./references/*.md` (no bundled scripts), zero-dependency Node/Python CLI (`dislop check [--pack <id|auto>] [--profile] [--ml] [--patterns] [--changed [ref]] [--staged] [--format text|json|sarif|github|md]`, `dislop patterns`, `dislop voice`, `dislop explain`, `dislop packs`, `dislop catalog`, `dislop resources`), all 7 built-in packs (`42` rules) + 53-pattern catalog (`patterns/`), bundled `14.6 KB` gzip (`49.0 KB` raw) Pocket ML ensemble (`models/pocket-slop-v1.json`, `< 0.5 ms`, `100.0%` F1 / `0.0%` Clean FPR on `stealth-vapor-v1`), `Awesome Anti-Slop`, and `dislop-bench v2`. `check` / `patterns` / `voice` make `0` network calls so private drafts never leave your machine (existing `--mcp` and optional local-model modules stay in-repo during real-world evaluation).
183
+ - **Official Cloud MCP & Web Workbench (`https://dislop.com/mcp`, `https://dislop.com/?lang=en#pricing`)**: Closed-source hosted backend running paid-tier zero-training model endpoints (no draft logging; see [privacy.md](https://dislop.com/privacy.md)). Exposes `dislop_review` (1 credit, multi-model genre-aware review returning structured issues and edit guidance), `dislop_deslop` (2 credits, re-checked rewrite verifying numbers and qualifiers), and `dislop_voice_extract` (2 credits, `dislop.voice/1`). Sign-in required for cloud AI: claim a free key for **30 monthly credits**, with early-access waitlists for Pro (`$12/mo`, 1,500 credits), PAYGO (`$10 / 800 credits`), and Team (`$29/seat/mo`).
184
+
185
+ ## Anti-slop benchmark (`dislop-bench v2`)
186
+
187
+ Run the full offline benchmark (`112` cross-modality detection samples across Node & Python + `18` end-to-end writing and design tasks comparing raw AI, naive humanizers, and `dislop`-guided revisions):
188
+
189
+ ```bash
190
+ node scripts/run_benchmark.mjs --assert
191
+ ```
192
+
193
+ Latest measured baseline ([benchmarks/REPORT.md](./benchmarks/REPORT.md) and [benchmarks/PATTERN-BENCHMARK.md](./benchmarks/PATTERN-BENCHMARK.md)):
194
+
195
+ - **Core Detection (`Suite A`, 112 samples = 48 v1 + 16 `holdout-v1` + 48 `text-hard-v2`)**: Precision `100.0%` · Recall `100.0%` · Clean FPR `0.0%` · Adversarial Near-Miss FPR `0.0%` · 2nd-Order Trap Recall `100.0%` · Node/Python Rule & Statistical Profile Parity `100.0%`.
196
+ - **Multi-Angle Pattern Benchmark (`154` samples = 48 + 16 + 62 `pattern-challenge-v2` + 28 `holdout-v2`)**: Precision `100.0%` · Recall `100.0%` · F1 `100.0%` · Clean FPR `0.0%` · Node/Python Parity `100.0%`.
197
+ - **Bundled Pocket ML (`stealth-vapor-v1`, 24 paired samples; 36 blind eval with holdouts)**: `14.6 KB` gzip (`49.0 KB` raw), `< 0.5 ms`, `100.0%` F1, `0.0%` Clean FPR.
198
+ - **End-to-End Revision (`Suite B`, 18 tasks = 12 `revision-v1` + 6 `revision-hard-v2`, weights `D1=45 / D2=20 / D3=25 / D4=10`)**: `raw_ai` **60.8 / 100** → `naive_humanizer` **70.8 / 100** (doubles 3rd-order slop and drops or invents numbers) → `dislop_clean` **100.0 / 100** (`18/18` all-clear).
199
+ - **Live 5-model comparison ([benchmarks/MODEL-COMPARISON.md](./benchmarks/MODEL-COMPARISON.md))**: Across `Gemini 3.1/3.5 Flash-Lite`, `Gemini 3.5/3.8 Flash`, and `Qwen 3.8 Flash`, bare prompts averaged `76.0–84.2 / 100` (`2/10–4/10` all-clear on the 10-task `revision-v1` live subset), while the `dislop` re-checked cloud pipeline lifted every model by **+15.8 to +22.3 points** (`97.0–100.0 / 100`, `8/10–10/10` all-clear; `Gemini 3.1 Flash-Lite` reached `98.5 / 100` in `1.2s` at `~$0.09 / 1k calls`).
200
+
201
+ See [benchmarks/README.md](./benchmarks/README.md) to score your own model, Skill, or cloud endpoint (`--eval`) or export randomized blind human A/B review sheets (`--export-blind-sheet`).
202
+
203
+ ## dislop checks dislop
204
+
205
+ GitHub Actions CI runs `dislop pack-test` (164 fixture assertions in both Node and Python), 26 Python `unittest` conformance and engine tests across 4 modules (`test_conformance`, `test_engine`, `test_pattern_library`, `test_pocket_and_local_models`), pattern catalog checks (`node scripts/pattern_lab.mjs verify` and `assert`), and site checks (`tests/test_site.mjs`). It also runs `dislop check . --fail-on warning` across this repository's docs, `awesome/`, and `site/`.
206
+
207
+ ## Docs & layout
208
+
209
+ - [Product Brief](./PRODUCT.md) · [Brand & Voice Guide](./docs/brand-and-voice-guide.md) ([zh-CN](./docs/brand-and-voice-guide.zh-CN.md))
210
+ - [Architecture](./docs/architecture.md) ([zh-CN](./docs/architecture.zh-CN.md)) · [Design System](./docs/design-system.md) ([zh-CN](./docs/design-system.zh-CN.md))
211
+ - [Roadmap](./ROADMAP.md) ([zh-CN](./ROADMAP.zh-CN.md)) · [Releasing](./docs/releasing.md) · [Contributing](./CONTRIBUTING.md) · [Research Index](./docs/research/README.md) · [Changelog](./CHANGELOG.md)
212
+
213
+ ```text
214
+ dislop/
215
+ ├── .agents/plugins/ # OpenAI Codex marketplace manifest (marketplace.json)
216
+ ├── .claude-plugin/ # Claude Code plugin & marketplace manifests (pure-doc Skill + Official Cloud MCP)
217
+ ├── .codex-plugin/ # OpenAI Codex native plugin manifest & UI card metadata
218
+ ├── plugin.json # Agent Plugins 1.0 portable manifest (paired with root mcp.json)
219
+ ├── gemini-extension.json # Gemini CLI Extension Gallery manifest
220
+ ├── server.json # Official MCP Registry manifest (Official Cloud HTTP MCP)
221
+ ├── action.yml # Reusable GitHub Marketplace incremental check Action
222
+ ├── awesome/ # Awesome Anti-Slop (README.md & README.zh-CN.md, 87 entries)
223
+ ├── benchmarks/ # Offline anti-slop benchmark datasets (CC0-1.0) & reproducible reports
224
+ ├── bin/ # Node.js CLI (dislop.mjs) and compatibility launcher (dislop-mcp.mjs)
225
+ ├── src/
226
+ │ ├── core.mjs # Zero-dep ES module shared by Node CLI, MCP, and browser workbench
227
+ │ ├── pattern-engine.mjs # Multi-angle 11-probe extended pattern-bank scanner
228
+ │ ├── pocket-model.mjs# Bundled 14.6 KB gzip zero-dep Pocket ML ensemble & domain pack router
229
+ │ ├── local-model.mjs# Hardware-aware optional local small-model advisor (Node.js)
230
+ │ ├── binary-node.mjs# Zero-dep ZIP reader for Node.js (.docx / .pptx)
231
+ │ └── dislop/ # Zero-dep Python 3.10+ engine, pattern scanner, local-model advisor, CLI, and MCP
232
+ ├── packs/ # Declarative dislop.pack/2 manifests (7 built-in packs, 42 rules, 160 fixtures)
233
+ ├── patterns/ # Structured 53-pattern anti-slop catalog across 6 dimensions & 7 angles
234
+ ├── skills/dislop/ # Cross-host Agent Skill (SKILL.md + local ./references/ + openai.yaml)
235
+ ├── tests/ # 26 Python unittest suites, Node/Python conformance, and site tests
236
+ ├── scripts/ # Manifest lockstep sync (sync_manifests.mjs), site compiler & benchmarks
237
+ ├── site/ # Compiled dislop.com workbench, /awesome/, and /llms.txt pages
238
+ ├── assets/ # Logo mark, light/dark banners, and 1200x630 social preview card
239
+ └── docs/ # Brand guide, architecture, design system, roadmap, and research
240
+ ```
241
+
242
+ ## License
243
+
244
+ [Apache License 2.0](./LICENSE)
245
+
246
+ <!-- mcp-name: io.github.dislop-ai/dislop -->
@@ -0,0 +1,242 @@
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="./assets/banner-dark.svg">
4
+ <img src="./assets/banner-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">去 dislop.com 试试</a> ·
11
+ <a href="https://www.npmjs.com/package/dislop">npm</a> ·
12
+ <a href="https://pypi.org/project/dislop/">PyPI</a> ·
13
+ <a href="./awesome/README.zh-CN.md">Awesome Anti-Slop 工具清单</a> ·
14
+ <a href="./ROADMAP.zh-CN.md">路线图</a> ·
15
+ <a href="https://x.com/dislop_ai">X (@dislop_ai)</a> ·
16
+ <a href="./LICENSE">Apache-2.0</a>
17
+ </p>
18
+
19
+ `dislop` 是专用的 **AI 味检查工具(Linter for AI Slop)**。整合社区验证过的去味规则、语料经验与 87 条精选工具,帮你(的 Agent)在文档、网页和 PPT 发出前,挑出并改掉里面的 AI 味。产品分为三层:**纯文档 Skill**(按文体避坑,不含可执行脚本)、**开源本地 CLI 与编辑器插件**(零依赖毫秒级扫出 AI 硬伤与常见套话,支持开发者配置自有密钥做深度审校)、**官方云端 MCP 与网页工作台**(`https://dislop.com/mcp`,免装本地环境,按文体多模型深度审校并返回结构化问题清单,也支持保留原排版的 Word/PPT 处理)。
20
+
21
+ 拿一段模型刚写完的上线说明来举个例子:
22
+
23
+ ```text
24
+ 好的,以下是修改后的上线说明。值得注意的是,本次改造以队列分级为重要抓手,全面赋能一线运维团队,故障恢复时间最多 45 秒。
25
+ ```
26
+
27
+ 跑 `dislop check launch-note.md --lang zh`,会标出四处:
28
+
29
+ ```text
30
+ [ERROR] launch-note.md:1:1 chatbot-artifact "好的,以下是修改后"
31
+ [WARNING] launch-note.md:1:16 zh-bureaucratic-padding "值得注意的是,"
32
+ [WARNING] launch-note.md:1:35 zh-bureaucratic-padding "抓手"
33
+ [WARNING] launch-note.md:1:38 zh-bureaucratic-padding "全面赋能"
34
+ ```
35
+
36
+ 如果删掉了旧套话,却顺手换成了另一种 AI 腔(例如“这不是一次简单的升级,而是一场效率革命”),再跑一遍 `dislop check` 一样会被标出来。改回平实的话,检查直接通过。
37
+
38
+ <p align="center">
39
+ <img src="./assets/demos/proof-cycle-zh-v1.gif" alt="dislop 检查上线说明三步对照:标出 AI 寒暄与空话、拦下二阶口号、改干净后退出码 0" width="840">
40
+ </p>
41
+
42
+ 大致就做这些。Markdown、纯文本、HTML/CSS/JSX、Word(`.docx`)和 PPT(`.pptx`)都能查。开源本地 CLI 与编辑器插件默认离线运行、零上传,内置 **7 套场景包(`42` 条规则)**、5 轴节奏统计、扩展模式库扫描(`--patterns`)与随包 `14.6 KB` 轻量集成模型(`--ml`);未命中规则时仅说明未发现已知模式,不代表深度内容质量无误。在 [dislop.com](https://dislop.com) 网页工作台与官方托管云端 MCP(`https://dislop.com/mcp`)登录后,可调用多模型深度审校(`dislop_review` 返回具体问题与改法建议,交给本地 Agent 结合上下文改稿)与复检改写。
43
+
44
+ ## 上手
45
+
46
+ ### Node.js 20+(已上架 npm,零外部依赖,内置全部 7 套规则包)
47
+
48
+ ```bash
49
+ # 检查当前目录(命中硬伤时退出码为 1,同时标出套话提醒)
50
+ npx --yes dislop check .
51
+
52
+ # 自动路由文体包,同时开启 5 轴节奏统计、14.6 KB 轻量模型与扩展模式库扫描
53
+ npx --yes dislop check draft.md --pack auto --profile --ml --patterns
54
+
55
+ # 离线提取你自己的句长与标点个人文风,或查看某条规则的判断方法和示例
56
+ npx --yes dislop voice my-notes.md
57
+ npx --yes dislop explain negation-pivot-frame --lang zh
58
+
59
+ # 只查相对 main 新改的行,并输出 GitHub PR 行内批注
60
+ npx --yes dislop check --changed origin/main --format github
61
+ ```
62
+
63
+ ### Python 3.10+(已上架 PyPI,零外部依赖)
64
+
65
+ ```bash
66
+ # 用 uvx 免安装直接跑,或用 pip 安装
67
+ uvx dislop check quarterly-review.pptx
68
+ pip install dislop && dislop check . --lang zh
69
+ ```
70
+
71
+ <p align="center">
72
+ <img src="./assets/demos/cli-check-zh-v1.gif" alt="dislop CLI 本地离线检查:原稿退出码 1 与清理后退出码 0" width="840">
73
+ </p>
74
+
75
+ ## AI 残留硬伤和套话提醒分开查
76
+
77
+ 很多自动“去 AI 味”改写工具容易把旧套话换成另一种腔调,或者把你的语气全洗成同一种模版。单纯用黑名单也有毛病,容易误伤正常句子(比如「抓手机拍照」「北京大学、清华大学、复旦大学」)。
78
+
79
+ `dislop` 把 7 套内置包里的 42 条规则分成两层:
80
+
81
+ 1. **AI 残留硬伤(`packs/core/`,固定 `error`,所有文体包默认开启)**:一眼就能看出的 AI 生成残迹——留在第一行的 AI 寒暄(`好的,以下是…`、`[oaicite:1]`)、没填的占位符(`{{var}}`、`【待补充】`)、贴进 Word/PPT 没渲染的裸 Markdown,以及 AI 网页里的空链接 `<a href="#">` 与占位禁用按钮。
82
+ 2. **场景与垂直规则包(`warning` / `info`,默认全部内置、0 联网)**:`business-brief`(工作文档)、`engineering-spec`(PR 摘要复读、空洞根因复盘、无责任人改进项)、`regulated-comms`(无证据极限词、缺基线的“提升数倍”)、`literary-essay`(随笔长文)、`deck-and-ui`(PPT 与网页)与 `executive-deck`(只写“关于……的分析汇报”的过程标题、连续 4 页以上同骨架幻灯片)。每条都附判断方法、原句 / 改过头 / 改好三段示例,以及正反测试样本。
83
+
84
+ ## 它读得了什么
85
+
86
+ Node.js 版(`bin/dislop.mjs`)和 Python 版(`src/dislop/`)都零外部依赖,通过同一套跨运行时一致性测试(`tests/test_conformance.py`)。
87
+
88
+ | 手头的文件 | 扩展名 | 能替你挑出什么 | 明确边界 |
89
+ |---|---|---|---|
90
+ | 文稿与长文 | `.md`, `.mdx`, `.txt` | AI 残留硬伤 + 开场白寒暄、公文黑话、“不是 A,而是 B”套句、连发短句和四字排比、段尾说教、无出处数据、满屏加粗清单、破折号过密、中文里混半角标点 | 代码块、行内代码、URL、引用块与 `dislop-quote` 示例区对文风规则自动屏蔽 |
91
+ | 网页与组件 | `.html`, `.css`, `.jsx`, `.tsx` | 空链接与无说明禁用按钮、默认紫粉渐变、满屏胶囊标签、三层套盒、`AI-Powered` 提示词营销徽章 | 只做单文件静态分析;动态渲染后的 DOM 需配合浏览器测试 |
92
+ | Word 文档 | `.docx` | 合并同段落文本运行、贴进文档没渲染的裸 Markdown 星号及正文套话(定位至 `para N`) | 报段落序号,不计算排版页码 |
93
+ | 演示文稿 | `.pptx` | 按真实放映顺序定位页码、裸 Markdown、单页字数墙(中文 > 280 字 / 英文 > 120 词)、要点超过 6 条、自动缩排低于 80%、空泛标题(“背景”“概述”)、连页版式单调及正文套话 | 隐藏幻灯片跳过密度检查并显式报 `[SKIP]` |
94
+
95
+ <table>
96
+ <tr>
97
+ <td width="50%" align="center">
98
+ <img src="./assets/demos/workbench-live-zh-v1.gif" alt="dislop.com 浏览器离线工作台实时标出原稿、二阶 AI 腔与干净稿" width="100%"><br>
99
+ <sub>浏览器工作台零上传离线自查</sub>
100
+ </td>
101
+ <td width="50%" align="center">
102
+ <img src="./assets/demos/ui-slop-zh-v1.gif" alt="检查网页组件紫粉渐变、胶囊墙与空链接并改为 1px 校样版式" width="100%"><br>
103
+ <sub>网页与组件模板味清理前后</sub>
104
+ </td>
105
+ </tr>
106
+ </table>
107
+
108
+ ## Awesome Anti-Slop 工具清单
109
+
110
+ 我们也顺手整理了 87 个去 AI 味相关的中英文工具、写作规范、前端设计规则、代码 PR 治理和论文。可以直接看 **[awesome/README.zh-CN.md](./awesome/README.zh-CN.md)**([English](./awesome/README.md)),或者在 **[dislop.com/awesome/](https://dislop.com/awesome/)** 离线筛选(也提供 [index.json](https://dislop.com/awesome/index.json) 和 [index.md](https://dislop.com/awesome/index.md) 给 Agent 读取)。
111
+
112
+ ## 让你的 AI、编辑器和流水线直接用
113
+
114
+ | 接入环境 | 一行命令或一键唤起 | 说明 |
115
+ |---|---|---|
116
+ | **任意联网 AI 对话** | 发一句:`先读 https://dislop.com/llms.txt,按里面的规矩和检查方法把接下来这份稿子过一遍。` | 免安装,直接读约 `2.4 KB` 索引、任务卡(`/tasks/*.md`)或单条规则页(`/rules/<id>.md`) |
117
+ | **跨宿主 Agent Skill** | `npx skills add dislop-ai/dislop` | 安装纯 Markdown 的 [skills/dislop/SKILL.md](./skills/dislop/SKILL.md) 与 4 张本地参考卡(不含脚本,全程 `0` 联网),动笔前避坑并在有 Shell 时调用 CLI 自检 |
118
+ | **Claude Code 插件** | `/plugin marketplace add dislop-ai/dislop` 后执行 `/plugin install dislop@dislop-ai` | 一键装好纯文档 Skill 与官方远程 MCP 连接(常驻上下文仅约 `130` tokens) |
119
+ | **OpenAI Codex 插件** | `codex plugin marketplace add dislop-ai/dislop` 后执行 `codex plugin add dislop@dislop-ai` | 附带 [openai.yaml](./skills/dislop/agents/openai.yaml) 原生应用卡片与 `$dislop` 快捷指令 |
120
+ | **Gemini CLI 扩展** | `gemini extensions install https://github.com/dislop-ai/dislop` | 基于根目录 [gemini-extension.json](./gemini-extension.json) 直连官方远程 MCP `https://dislop.com/mcp` |
121
+ | **官方 MCP 注册表** | 在 `registry.modelcontextprotocol.io` 检索 `io.github.dislop-ai/dislop` | 登记官方托管远程 MCP 端点 `https://dislop.com/mcp`(Streamable HTTP) |
122
+ | **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 |
123
+ | **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 |
124
+
125
+ ### 接入官方云端 MCP(`Claude Code`、`Codex`、`Cursor`、`WorkBuddy`、`Claude Cowork`)
126
+
127
+ ```json
128
+ {
129
+ "mcpServers": {
130
+ "dislop": {
131
+ "type": "http",
132
+ "url": "https://dislop.com/mcp",
133
+ "headers": {
134
+ "Authorization": "Bearer dslp_your_token_here"
135
+ }
136
+ }
137
+ }
138
+ }
139
+ ```
140
+
141
+ 官方远程 MCP 端点(`https://dislop.com/mcp`)提供云端大模型审校与改稿工具:`dislop_review`(1 额度,返回分文体结构化问题清单与改法建议,供本地 Agent 结合项目上下文改稿)、`dislop_deslop`(2 额度,自动复检改写)、`dislop_voice_extract`(2 额度)及 0 额度基础检查。需要先在 [dislop.com](https://dislop.com/#cloud-token-box) 登录领取免费密钥。
142
+
143
+ ## 配置,以及什么时候不听它的
144
+
145
+ 运行 `dislop init` 生成 `.dislop.json`(个人私有禁词放在 Git 忽略的 `.dislop.local.json`):
146
+
147
+ ```json
148
+ {
149
+ "failOn": "error",
150
+ "ignore": ["vendor/**", "dist/**"],
151
+ "overrides": [
152
+ { "files": ["docs/**/*.md"], "pack": "business-brief" },
153
+ { "files": ["essays/**/*.md"], "pack": "literary-essay" },
154
+ { "files": ["site/**/*.{html,css,svg}"], "pack": "deck-and-ui" }
155
+ ],
156
+ "allow": ["无缝钢管"]
157
+ }
158
+ ```
159
+
160
+ 确需在某一行保留原文引用,在上一行写明原因即可(`--report-unused` 会清出失效注释):
161
+
162
+ ```markdown
163
+ <!-- dislop-ignore-next-line zh-bureaucratic-padding -- 原样摘录外部招标文件条款 -->
164
+ ```
165
+
166
+ ### 本地一次安装(真断网 / 快速 Hook 推荐)
167
+
168
+ ```bash
169
+ # Node.js 20+(已上架 npm,装一次后完全离网运行,包体 < 250 KB)
170
+ npm install -g dislop
171
+ dislop check .
172
+
173
+ # 或 Python 3.10+(已上架 PyPI,零外部依赖)
174
+ pip install dislop
175
+ dislop check .
176
+ ```
177
+
178
+ ### 开源本地(`Skill` + `CLI`)vs. 官方托管云端(`dislop.com/mcp`)
179
+
180
+ - **开源本地(`dislop-ai/dislop`,Apache-2.0)**:纯文档 `SKILL.md` 与 `./references/*.md` 参考卡(不含可执行脚本)、Node/Python 零依赖命令行(`dislop check [--pack <id|auto>] [--profile] [--ml] [--patterns] [--changed [ref]] [--staged] [--format text|json|sarif|github|md]`、`dislop patterns`、`dislop voice`、`dislop explain`、`dislop packs`、`dislop catalog`、`dislop resources`)、全部 7 套内置规则包(42 条规则)、53 条反模式库(`patterns/`)、随包内置的 `14.6 KB` gzip(原始 `49.0 KB`)传统集成模型(`models/pocket-slop-v1.json`,`< 0.5 ms`,在 `stealth-vapor-v1` 上 F1 `100.0%`、干净误报 `0.0%`)、`Awesome Anti-Slop` 及 `dislop-bench v2`。`check` / `patterns` / `voice` 全程零联网,私密文档绝不离开本机(源码亦保留既有 `--mcp` 与可选本地小模型工具链,供真实语料对比评测期间向后兼容)。
181
+ - **官方托管云端与远程 HTTP MCP(`https://dislop.com/mcp` · [开源与云端方案](https://dislop.com/#pricing))**:独立闭源云端后台,使用付费级零训练模型端点(不落盘留存草稿;详见 [隐私说明](https://dislop.com/privacy.md))。提供 `dislop_review`(1 额度,多模型分文体深层审校,返回结构化问题与改法建议)、`dislop_deslop`(2 额度,自动复检改写,改完核对原稿数字与限定词,对不上自动重改)与 `dislop_voice_extract`(2 额度,提取 `dislop.voice/1` 个人文风)。云端 AI 功能需登录使用,邮箱领取免费密钥即享 **每月 30 免费额度**;Pro(`$12/月` · 1,500 额度)、按量包(`$10 / 800 额度`)与 Team(`$29/席位/月`)已开放早鸟预约。
182
+
183
+ ## 去 AI 味效果基准测试(`dislop-bench v2`)
184
+
185
+ 一键离线复现 `112` 份跨媒介检测样本(Node/Python 双端一致性核验)与 `18` 组端到端文案/设计改稿任务:
186
+
187
+ ```bash
188
+ node scripts/run_benchmark.mjs --assert
189
+ ```
190
+
191
+ 最新离线实测结果(完整报告见 [benchmarks/REPORT.md](./benchmarks/REPORT.md) 与 [benchmarks/PATTERN-BENCHMARK.md](./benchmarks/PATTERN-BENCHMARK.md)):
192
+
193
+ - **核心检测基准(`Suite A`,112 样本 = 48 基准 + 16 `holdout-v1` + 48 `text-hard-v2`)**:准确率 `100.0%` · 召回率 `100.0%` · 干净原稿误报率 `0.0%` · 易误报近邻样本误报率 `0.0%` · 二阶 AI 口号召回率 `100.0%` · Node/Python 规则与统计画像一致率 `100.0%`。
194
+ - **多角度反模式基准(`154` 样本 = 48 + 16 + 62 `pattern-challenge-v2` + 28 `holdout-v2`)**:准确率 `100.0%` · 召回率 `100.0%` · F1 `100.0%` · 干净误报率 `0.0%` · Node/Python 一致率 `100.0%`。
195
+ - **内置轻量模型(`stealth-vapor-v1`,24 份配对样本;含留出集 36 份盲测)**:`14.6 KB` gzip(原始 `49.0 KB`)、`< 0.5 ms`、F1 `100.0%`、干净误报 `0.0%`。
196
+ - **端到端改稿效果(`Suite B`,18 题 = 12 `revision-v1` + 6 `revision-hard-v2`,权重 `D1=45 / D2=20 / D3=25 / D4=10`)**:模型原稿 `raw_ai` **60.8 / 100** → 普通改写 `naive_humanizer` **70.8 / 100**(三阶结构味翻倍且漏改或编造数字)→ 按 dislop 规矩改稿 `dislop_clean` **100.0 / 100**(`18/18` 全过)。
197
+ - **5 模型真实在线对比([benchmarks/MODEL-COMPARISON.md](./benchmarks/MODEL-COMPARISON.md))**:实测 `Gemini 3.1/3.5 Flash-Lite`、`Gemini 3.5/3.8 Flash` 与 `Qwen 3.8 Flash`,在 `revision-v1` 的 10 题在线子集上裸 Prompt 仅得 `76.0–84.2 / 100`(`2/10–4/10` 全过),接入 `dislop` 云端复检改写流水线后全线提升 **+15.8 至 +22.3 分**(达 `97.0–100.0 / 100`、`8/10–10/10` 全过;其中 `Gemini 3.1 Flash-Lite` 中位延迟仅 `1.2 秒`、每千次调用约 `$0.09`,得分 `98.5 / 100`)。
198
+
199
+ 详见 [benchmarks/README.zh-CN.md](./benchmarks/README.zh-CN.md),支持评测任意模型/Prompt/Skill/云端端点(`--eval`)以及导出随机盲评表(`--export-blind-sheet`)。
200
+
201
+ ## 这个仓库自己也过这道门
202
+
203
+ GitHub Actions CI 在每次提交时跑完双端 `dislop pack-test`(164 项样本断言)、26 项 Python `unittest` 一致性与引擎单测(覆盖 `test_conformance`、`test_engine`、`test_pattern_library`、`test_pocket_and_local_models`)、反模式库核验(`node scripts/pattern_lab.mjs verify` 与 `assert`)、官网校验测试(`tests/test_site.mjs`),并对仓库自己的文档、`awesome/` 与 `site/` 执行 `dislop check . --fail-on warning`。
204
+
205
+ ## 文档与目录
206
+
207
+ - [产品定义(Product Brief)](./PRODUCT.md) · [文案与视觉基准](./docs/brand-and-voice-guide.zh-CN.md)([English](./docs/brand-and-voice-guide.md))
208
+ - [架构说明](./docs/architecture.zh-CN.md)([English](./docs/architecture.md))· [设计规范](./docs/design-system.zh-CN.md)([English](./docs/design-system.md))
209
+ - [路线图与协作计划](./ROADMAP.zh-CN.md)([English](./ROADMAP.md))· [发版与多平台上线规范](./docs/releasing.zh-CN.md) · [贡献指南](./CONTRIBUTING.md) · [调研索引](./docs/research/README.md) · [变更记录](./CHANGELOG.md)
210
+
211
+ ```text
212
+ dislop/
213
+ ├── .agents/plugins/ # OpenAI Codex 市场清单(marketplace.json)
214
+ ├── .claude-plugin/ # Claude Code 插件与市场清单(纯文档 Skill + 官方云端 MCP)
215
+ ├── .codex-plugin/ # OpenAI Codex 原生插件清单与卡片配置
216
+ ├── plugin.json # Agent Plugins 1.0 跨平台标准清单(配根目录 mcp.json)
217
+ ├── gemini-extension.json # Gemini CLI 扩展画廊清单
218
+ ├── server.json # 官方 MCP Registry 清单(官方云端 HTTP MCP)
219
+ ├── action.yml # 可复用的 GitHub Marketplace 增量检查 Action
220
+ ├── awesome/ # Awesome Anti-Slop 中英文工具清单(87 条)
221
+ ├── benchmarks/ # 去 AI 味效果基准测试数据集(CC0-1.0)与离线实测报告
222
+ ├── bin/ # Node.js CLI(dislop.mjs)与兼容入口(dislop-mcp.mjs)
223
+ ├── src/
224
+ │ ├── core.mjs # 零依赖纯 ES 模块内核,由 Node CLI、MCP 与浏览器工作台共用
225
+ │ ├── pattern-engine.mjs # 多角度 11 条扩展模式库扫描器
226
+ │ ├── pocket-model.mjs# 14.6 KB gzip 零依赖传统集成水文评分与场景路由模型
227
+ │ ├── local-model.mjs# 本机内存/芯片探测与可选本地小模型推荐(Node.js)
228
+ │ ├── binary-node.mjs# Node.js 零依赖 ZIP 解析层(.docx / .pptx)
229
+ │ └── dislop/ # 零依赖 Python 3.10+ 核心引擎、模式库扫描、本地模型探测、CLI 与 MCP 服务
230
+ ├── packs/ # 声明式 dislop.pack/2 规则包(全部 7 套内置包,42 条规则,160 项样本断言)
231
+ ├── patterns/ # 6 维度 7 角度 53 条结构化反模式库(patterns/dimensions/*.json)
232
+ ├── skills/dislop/ # 跨宿主标准 Agent Skill(SKILL.md + 本地 ./references/ + openai.yaml)
233
+ ├── tests/ # 26 项 Python 单测、Node/Python 跨运行时一致性测试与官网校验测试
234
+ ├── scripts/ # 清单同源同步(sync_manifests.mjs)、官网编译器与基准脚本
235
+ ├── site/ # 编译产物:dislop.com 工作台、/awesome/ 清单与 /llms.txt
236
+ ├── assets/ # 校对删除号标识、浅/深色横幅与 1200x630 分享图
237
+ └── docs/ # 品牌基准、架构、视觉规范、路线与调研资料
238
+ ```
239
+
240
+ ## 开源许可
241
+
242
+ [Apache License 2.0](./LICENSE)
package/action.yml ADDED
@@ -0,0 +1,90 @@
1
+ name: "dislop Anti-Slop Check"
2
+ author: "dislop-ai"
3
+ description: "Linter for AI Slop in Markdown, Word (.docx), PowerPoint (.pptx), and HTML/CSS/JSX — zero dependencies."
4
+ branding:
5
+ icon: "edit-3"
6
+ color: "red"
7
+
8
+ inputs:
9
+ paths:
10
+ description: "Newline- or whitespace-separated file or directory paths to inspect (ignored when `changed` is set)."
11
+ required: false
12
+ default: "."
13
+ pack:
14
+ description: "Optional pack override (`auto`, `business-brief`, `engineering-spec`, `regulated-comms`, `literary-essay`, `deck-and-ui`, `executive-deck`)."
15
+ required: false
16
+ default: ""
17
+ fail-on:
18
+ description: "Minimum severity that exits non-zero (`error`, `warning`, `info`, `never`)."
19
+ required: false
20
+ default: "error"
21
+ changed:
22
+ description: "Git base ref for incremental line-level checking (for example `origin/main`)."
23
+ required: false
24
+ default: ""
25
+ format:
26
+ description: "Output format (`github`, `text`, `json`, `sarif`, `md`)."
27
+ required: false
28
+ default: "github"
29
+ lang:
30
+ description: "Message language (`en` or `zh`)."
31
+ required: false
32
+ default: "en"
33
+ sarif-file:
34
+ description: "Optional file path to write SARIF 2.1.0 output when `format: sarif` is selected."
35
+ required: false
36
+ default: ""
37
+
38
+ runs:
39
+ using: "composite"
40
+ steps:
41
+ - name: Set up Node.js 22
42
+ uses: actions/setup-node@v7
43
+ with:
44
+ node-version: "22"
45
+
46
+ - name: Run dislop deterministic check
47
+ shell: bash
48
+ env:
49
+ INPUT_PATHS: ${{ inputs.paths }}
50
+ INPUT_PACK: ${{ inputs.pack }}
51
+ INPUT_FAIL_ON: ${{ inputs.fail-on }}
52
+ INPUT_CHANGED: ${{ inputs.changed }}
53
+ INPUT_FORMAT: ${{ inputs.format }}
54
+ INPUT_LANG: ${{ inputs.lang }}
55
+ INPUT_SARIF_FILE: ${{ inputs.sarif-file }}
56
+ ACTION_DIR: ${{ github.action_path }}
57
+ run: |
58
+ set -euo pipefail
59
+ ARGS=("check" "--fail-on" "${INPUT_FAIL_ON}" "--format" "${INPUT_FORMAT}" "--lang" "${INPUT_LANG}")
60
+ if [ -n "${INPUT_PACK}" ]; then
61
+ ARGS+=("--pack" "${INPUT_PACK}")
62
+ fi
63
+ if [ -n "${INPUT_CHANGED}" ]; then
64
+ ARGS+=("--changed" "${INPUT_CHANGED}")
65
+ else
66
+ NONEMPTY_LINES=()
67
+ while IFS= read -r line; do
68
+ trimmed="${line#"${line%%[![:space:]]*}"}"
69
+ trimmed="${trimmed%"${trimmed##*[![:space:]]}"}"
70
+ [ -n "${trimmed}" ] && NONEMPTY_LINES+=("${trimmed}")
71
+ done <<< "${INPUT_PATHS}"
72
+ if [ "${#NONEMPTY_LINES[@]}" -gt 1 ]; then
73
+ for item in "${NONEMPTY_LINES[@]}"; do
74
+ ARGS+=("${item}")
75
+ done
76
+ elif [ "${#NONEMPTY_LINES[@]}" -eq 1 ]; then
77
+ only="${NONEMPTY_LINES[0]}"
78
+ if [ -e "${only}" ]; then
79
+ ARGS+=("${only}")
80
+ else
81
+ read -r -a words <<< "${only}"
82
+ ARGS+=("${words[@]}")
83
+ fi
84
+ fi
85
+ fi
86
+ if [ "${INPUT_FORMAT}" = "sarif" ] && [ -n "${INPUT_SARIF_FILE}" ]; then
87
+ node "${ACTION_DIR}/bin/dislop.mjs" "${ARGS[@]}" > "${INPUT_SARIF_FILE}"
88
+ else
89
+ node "${ACTION_DIR}/bin/dislop.mjs" "${ARGS[@]}"
90
+ fi
@@ -0,0 +1,8 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="512" height="512" fill="none" role="img" aria-label="dislop proofreader dele mark">
2
+ <title>dislop — Proofreader's Dele Mark</title>
3
+ <rect width="64" height="64" rx="12" fill="#14171A"/>
4
+ <!-- Manuscript line being struck -->
5
+ <line x1="10" y1="38" x2="54" y2="38" stroke="#F4F5F3" stroke-width="4.5" stroke-linecap="round" stroke-opacity="0.26"/>
6
+ <!-- GB/T 14706 / Western galley delete mark (dele loop crossing cleanly) -->
7
+ <path d="M10 38H34C44.5 38 52 30.8 52 21.5C52 14.5 47.2 10 41.2 10C34.8 10 30.5 15 30.5 22.2C30.5 33.8 39.5 45.5 53 51" stroke="#F04438" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
8
+ </svg>
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ if (!process.argv.includes("--mcp")) {
3
+ process.argv.push("--mcp");
4
+ }
5
+ await import("./dislop.mjs");