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
@@ -6,14 +6,14 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Official dislop plugin marketplace: pure-doc Agent Skill and Official Cloud MCP.",
9
- "version": "0.9.0"
9
+ "version": "1.0.1"
10
10
  },
11
11
  "plugins": [
12
12
  {
13
13
  "name": "dislop",
14
14
  "source": "./",
15
- "description": "Cutting AI slop is real productivity. Linter for AI Slop with vetted rules (7 packs, 53 rules, 65 patterns) across pure-doc Skill, offline CLI, and Official Cloud MCP.",
16
- "version": "0.9.0",
15
+ "description": "Cutting AI slop is real productivity. Pluggable editorial and artifact linter (11 modular Packs across docs, web UI, slides, and Office) via pure-doc Skill, offline CLI, local stdio MCP, and Official Cloud MCP.",
16
+ "version": "1.0.1",
17
17
  "author": {
18
18
  "name": "dislop-ai",
19
19
  "url": "https://dislop.com"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dislop",
3
- "version": "0.9.0",
4
- "description": "Cutting AI slop is real productivity. Linter for AI Slop with vetted rules (7 packs, 53 rules, 65 patterns) across pure-doc Skill, offline CLI, and Official Cloud MCP.",
3
+ "version": "1.0.1",
4
+ "description": "Cutting AI slop is real productivity. Pluggable editorial and artifact linter (11 modular Packs across docs, web UI, slides, and Office) via pure-doc Skill, offline CLI, local stdio MCP, and Official Cloud MCP.",
5
5
  "author": {
6
6
  "name": "dislop-ai",
7
7
  "url": "https://dislop.com"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dislop",
3
- "version": "0.9.0",
4
- "description": "Cutting AI slop is real productivity. Linter for AI Slop with vetted rules (7 packs, 53 rules, 65 patterns) across pure-doc Skill, offline CLI, and Official Cloud MCP.",
3
+ "version": "1.0.1",
4
+ "description": "Cutting AI slop is real productivity. Pluggable editorial and artifact linter (11 modular Packs across docs, web UI, slides, and Office) via pure-doc Skill, offline CLI, local stdio MCP, and Official Cloud MCP.",
5
5
  "author": {
6
6
  "name": "dislop-ai",
7
7
  "url": "https://dislop.com"
@@ -13,7 +13,6 @@
13
13
  "anti-slop",
14
14
  "de-slop",
15
15
  "ai-slop",
16
- "humanizer",
17
16
  "writing",
18
17
  "linter",
19
18
  "proofreading",
@@ -26,8 +25,8 @@
26
25
  "mcpServers": "./.mcp.json",
27
26
  "interface": {
28
27
  "displayName": "dislop",
29
- "shortDescription": "Linter for AI Slop",
30
- "longDescription": "Cutting AI slop is real productivity. Linter for AI Slop with vetted rules (7 packs, 53 rules, 65 patterns) across pure-doc Skill, offline CLI, and Official Cloud MCP.",
28
+ "shortDescription": "Pluggable Editorial & Artifact Linter",
29
+ "longDescription": "Cutting AI slop is real productivity. Pluggable editorial and artifact linter (11 modular Packs across docs, web UI, slides, and Office) via pure-doc Skill, offline CLI, local stdio MCP, and Official Cloud MCP.",
31
30
  "developerName": "dislop-ai",
32
31
  "category": "Productivity",
33
32
  "capabilities": [
@@ -40,9 +39,9 @@
40
39
  "logo": "./assets/logo.svg",
41
40
  "logoDark": "./assets/logo.svg",
42
41
  "defaultPrompt": [
43
- "Check my draft for AI slop, replacement slogans, and template UI while keeping every number and qualifier intact.",
44
- "Audit docs/ and slides for AI artifacts, clichés, and rhythm monotony with dislop.",
45
- "Review this HTML/JSX page with the deck-and-ui pack for dead links, neon gradients, and pill soup."
42
+ "Check my draft for delivery defects and AI scaffolding while keeping every number, unit, and entity intact.",
43
+ "Audit docs/ and slides for placeholders, raw Markdown leaks, and word-walls with dislop.",
44
+ "Review this HTML/JSX page for dead links, unexplained disabled buttons, neon gradients, and pill soup."
46
45
  ],
47
46
  "brandColor": "#F04438",
48
47
  "screenshots": []
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dislop",
3
- "version": "0.9.0",
4
- "description": "Cutting AI slop is real productivity. Linter for AI Slop with vetted rules (7 packs, 53 rules, 65 patterns) across pure-doc Skill, offline CLI, and Official Cloud MCP.",
3
+ "version": "1.0.1",
4
+ "description": "Cutting AI slop is real productivity. Pluggable editorial and artifact linter (11 modular Packs across docs, web UI, slides, and Office) via pure-doc Skill, offline CLI, local stdio MCP, and Official Cloud MCP.",
5
5
  "author": {
6
6
  "name": "dislop-ai",
7
7
  "url": "https://dislop.com"
@@ -13,7 +13,6 @@
13
13
  "anti-slop",
14
14
  "de-slop",
15
15
  "ai-slop",
16
- "humanizer",
17
16
  "writing",
18
17
  "linter",
19
18
  "proofreading",
@@ -1,13 +1,6 @@
1
1
  - id: dislop-check
2
- name: dislop anti-slop check (core AI artifacts)
3
- description: Catch stray chatbot greetings, unfilled placeholders, raw Markdown in Office docs, and dead UI controls before commit.
4
- entry: dislop check --fail-on error
5
- language: python
6
- files: \.(md|mdx|txt|html|htm|css|jsx|tsx|svg|docx|pptx)$
7
-
8
- - id: dislop-check-strict
9
- name: dislop anti-slop strict check (fail on warning)
10
- description: Fail commit on both core AI artifacts and scenario cliché/template warnings.
11
- entry: dislop check --fail-on warning
12
- language: python
13
- files: \.(md|mdx|txt|html|htm|css|jsx|tsx|svg|docx|pptx)$
2
+ name: dislop anti-slop check (deterministic defect gate)
3
+ description: Catch stray chatbot wrappers, unfilled placeholders, broken local links, raw Markdown in Office/HTML docs, and dead UI controls before commit.
4
+ entry: npx --yes dislop check --no-llm
5
+ language: system
6
+ files: \.(md|mdx|txt|html|htm|css|jsx|tsx|svg|docx|pptx|pdf)$
package/PRODUCT.md CHANGED
@@ -1,67 +1,29 @@
1
1
  # dislop Product Brief
2
2
 
3
- All website copy, `README` files, marketplace manifests, visual assets, and outbound materials derive from this document. Voice and visual rules live in [docs/brand-and-voice-guide.md](./docs/brand-and-voice-guide.md) ([简体中文](./docs/brand-and-voice-guide.zh-CN.md)).
3
+ ## Slogan
4
4
 
5
- ---
6
-
7
- ## English (Primary / Global Baseline)
8
-
9
- ### Slogan
10
5
  Cutting AI slop is real productivity.
11
6
 
12
- ### Positioning
13
- **Linter for AI Slop.** Helps you (and your agent) catch and fix AI-sounding text and template layouts in docs, web pages, and slides before sending.
14
-
15
- ### Global-First Priority & Single-Domain Strategy
16
- - **English (Global) first across code, docs, and assets**: Rule precision on native English prose/UI/decks, CLI/MCP/Skill schemas, canonical documentation (`*.md`), and primary visual assets (`og-card.png`, `-en-v2` demos, `@dislop_ai`) always come first. Chinese (`*.zh-CN.md`, `zh-*` rules, `-zh-v2` demos) is maintained in lockstep as a native localized counterpart, never the upstream source for machine translation.
17
- - **Strategic horizon**: Short-term rollout pairs global package/MCP/skill registries and flagship English benchmarks with fast community seed validation; medium-to-long-term growth focuses on winning the default pre-flight slot across global Agent ecosystems and international team workflows, while serving localized office document cleanup as a complementary track on the same engine.
18
- - **One brand, one repository, one domain (`dislop.com`)**: Never split into separate regional subdomains or separate codebases. The site serves native English at the root `dislop.com/` (`x-default`) and native Chinese under `dislop.com/zh/`, with automatic browser language routing, a one-click manual toggle, and `301` redirects on legacy `/en/*` paths.
19
- - **Strict language separation**: English and Chinese materials use their own native examples, banners, social cards, and single-language accounts (`@dislop_ai` publishes exclusively in English), never word-for-word translations and never mixed inside one page or post.
20
-
21
- ### Users
22
- First coding agent users, then office agent users, and finally everyone who delivers work with AI. Their agents are direct users too, and can find and run `dislop` on their own.
23
-
24
- ### Product Form
25
- 1. **Skill (open-source, Markdown only)**: Genre-specific writing and UI reference cards with no bundled scripts. Your agent reads the matching card before drafting and can run the CLI afterward to check its work.
26
- 2. **CLI & Local Plugins (open-source, local)**: Zero-dependency local checker that flags AI leftovers and stock templates across docs, web UI, Word, and PowerPoint in terminals, editors, Git hooks, and CI. Developers can also plug in their own model API key for deeper review.
27
- 3. **Official MCP & Web Workbench (cloud service)**: Sign in to connect office or coding agents to the remote MCP with no local setup, or use the web workbench directly. The cloud service runs multi-model review by genre, returns structured issues and edit guidance for your local agent to apply in context, and handles Word and PowerPoint files while keeping their layout.
28
-
29
- ### Selling Points
30
- 1. **Curated community work**: Combines vetted open-source rules, corpus findings, and an indexed 90-tool directory across docs, web UI, Word, and PowerPoint, without hunting down scattered prompts.
31
- 2. **Broad host and scenario fit**: Ships domain packs for engineering, business, UI, and decks across Skill, Plugin, CLI, and Cloud MCP, connecting to major agents and editors in one command.
32
- 3. **Local, offline, private**: The CLI and local plugins run on your machine with zero uploads, keeping private drafts and source code local.
33
-
34
- ### One-Sentence Pitch
35
- A dedicated linter for AI slop. It brings together vetted community rules and practices to help your agent find and fix AI slop in docs, web UI, and slides. Connects to major agents and editors in one command and can run completely offline.
36
-
37
- ---
38
-
39
- ## 中文(独立原生适配)
40
-
41
- ### Slogan
42
- 去 AI 味才是真正的生产力!
43
-
44
- ### 定位
45
- **AI 味检查工具。** 帮你(的 Agent)在文档、网页和 PPT 发出前,挑出并改掉里面的 AI 味。
7
+ ## Positioning
46
8
 
47
- ### 全球英文优先与单域名兼容原则
48
- - **技术、文档与主物料以英文(全球)为第一基准**:地道英文语料检出精度与零误报边界、CLI/MCP/Skill 协议字段、主干英文文档(`*.md`)及默认视觉物料(`og-card.png`、`-en-v2` 动图、`@dislop_ai`)始终优先建设与验收;中文文档(`*.zh-CN.md`)、`zh-*` 专属规则与中文演示物料面向中文场景原生独立编写,不做英译中或中译英套翻。
49
- - **短中长期节奏统一**:短期同步推进全球注册表/目录上架、中文技术社区快速种子验证与英文旗舰实测发布;中长期坚定以全球英语 Agent 生态标准和国际团队协作工作流为主战场,同时在同一套底座上承接中文免配置网页工作台与办公文档去味需求。
50
- - **单品牌、单仓库、单域名(`dislop.com`)**:不拆独立子域名或第二套代码库。站点路由以根路径 `dislop.com/` 默认提供纯英文静态页(`x-default`),以子路径 `dislop.com/zh/` 提供原生中文静态页,支持按浏览器语言自动引导、一键手动切换与旧路径 `/en/*` `301` 跳转。
51
- - **单页单帖严格不混排**:中英文各自使用独立案例、视觉卡片与单语社交账号(官方号 `@dislop_ai` 固定纯英文发布),同一页面或单条帖子内绝不中英混排。
9
+ **Pluggable Editorial & Artifact Linter.** Built on a Node.js (`>= 20`) micro-kernel for coding agents, office agents, CI pipelines, and human writers. Catches objective delivery defects and AI-sounding scaffolding across docs, web UI, slides, and Office documents before publication.
52
10
 
53
- ### 用户
54
- 第一批是 Coding Agent 用户,第二批是办公 Agent 用户,最后是所有用 AI 交付成果的人;他们的 Agent 也是直接使用者,能自己找到并调用。
11
+ ## Architectural Pillars
55
12
 
56
- ### 产品形态
57
- 1. **Skill(开源,纯文档)**:按文体整理的写作与界面避坑参考卡,不带可执行脚本。Agent 动笔前按需读取,写完后可调用 CLI 自检。
58
- 2. **CLI 与本地插件(开源,本地运行)**:零依赖本地检查工具,快速标出文档、网页和 Word/PPT 里的 AI 残留硬伤与常见套话,适合终端、编辑器、Git 钩子与 CI。开发者也可以配自有模型密钥做深度审校。
59
- 3. **官方 MCP 与网页工作台(云端服务)**:不用配本地环境,登录就能在办公或编码 Agent 里接入远程 MCP,或者直接在网页工作台使用。云端按文体做多模型深度审校,返回具体问题和改法建议,交给你的 Agent 结合本地上下文去改,也支持保留原排版的 Word/PPT 处理。
13
+ 1. **Micro-Kernel + Multi-Modal Packs (`dislop/sdk`)**:
14
+ - Core owns document coordinate parsing (`DocumentModel`), immutable safety invariants, the Dual Fact Gate, 3-Tier LLM routing, lossless coordinate patching, and CI exit-code arbitration.
15
+ - Rules and modality probes live in pluggable Packs organized by scope/language and scenario (`packs/common/*`, `packs/en/*`, `packs/zh/*`), local `.mjs` modules, or zero-code `.pack.md` files.
16
+ 2. **Dual-Track Taxonomy (`Defect` vs. `Suggestion`)**:
17
+ - Editorial prose findings are `Suggestion`s (`strong | moderate | hint`) and never block CI (`Exit Code 0`).
18
+ - Objective delivery bugs (placeholders, chatbot residue, broken links, raw Markdown leaks in `.docx`/`.pptx`) are `Defect`s (`error | warning`) emitted strictly by deterministic `pack.check()` hooks (`Exit Code 1` on unresolved `Defect: error`).
19
+ 3. **Local-First Default with Optional Semantic Tiers**:
20
+ - Runs locally with zero network uploads by default (`--engine local`), while prompting users and agents toward Tier 1 Official Cloud (`dislop login`), Tier 2 BYOK/Loopback (`--engine byok`), or Tier 3 Managed Local Models (`dislop model pull`) for deeper semantic review.
21
+ 4. **High-Restraint Editorial Discipline & Strict Single-Language Purity**:
22
+ - Built-in prose packs flag only zero-information scaffolding and self-contained syntactic AI tics—never nagging authors over ordinary abstract verbs when repository context is unavailable.
23
+ - English and Chinese packs, prompts, and documentation stay strictly separated into single-language files and directory levels.
60
24
 
61
- ### 卖点
62
- 1. **社区规则和工具一处拿全**:整合经过核验的开源去味规则、语料经验与 90 条精选工具,覆盖文稿、网页和 Word/PPT,不用自己到处搜集拼凑。
63
- 2. **多端与多场景兼容**:内置研发、商务、前端与演示等场景包,提供 Skill、Plugin、CLI 与官方 MCP,快速接入主流 Agent 和编辑器。
64
- 3. **本地离线保护隐私**:CLI 与本地插件支持纯本地运行、零上传,私密文稿与代码不出本机。
25
+ ## Product Surfaces
65
26
 
66
- ### 一句话介绍
67
- 专用的 AI 味检查工具。整合社区验证过的去味规则与经验,帮你和你的 Agent 发现并改掉文档、网页和 PPT 里的 AI 味。一行命令接入主流 Agent 与编辑器,可纯本地离线运行。
27
+ 1. **Agent Skills (`skills/`)**: Pure-Markdown genre reference cards read before drafting and paired with `dislop check --format agent` + `dislop verify`.
28
+ 2. **Node.js CLI, SDK & Local MCP (`bin/dislop.mjs`, `bin/dislop-mcp.mjs`, `dislop/sdk`)**: Local-first checker, interactive `git add -p` hunk reviewer (`dislop fix`), batch safe fixer (`dislop fix --auto`), standalone Fact Gate verifier (`dislop verify`), and local stdio MCP server.
29
+ 3. **Official Cloud Service (`dislop.com`)**: Hosted multi-model review and layout-preserving Office workflows (see [docs/MIGRATION-TODO.md](./docs/MIGRATION-TODO.md) for pending static-site extraction and API schema alignment).