dislop 0.9.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/.codex-plugin/plugin.json +7 -8
  4. package/.cursor-plugin/plugin.json +2 -3
  5. package/.pre-commit-hooks.yaml +5 -12
  6. package/PRODUCT.md +19 -57
  7. package/README.md +360 -252
  8. package/README.zh-CN.md +390 -240
  9. package/action.yml +30 -39
  10. package/bin/dislop-mcp.mjs +3 -4
  11. package/bin/dislop.mjs +4 -4582
  12. package/gemini-extension.json +2 -2
  13. package/llms-install.md +68 -0
  14. package/package.json +17 -55
  15. package/packs/common/artifact-qa/pack.json +5 -0
  16. package/packs/common/artifact-qa/prompts/rules.md +11 -0
  17. package/packs/common/artifact-qa/scripts/index.mjs +173 -0
  18. package/packs/common/slide-deck/pack.json +6 -0
  19. package/packs/common/slide-deck/prompts/rules.md +11 -0
  20. package/packs/common/slide-deck/scripts/index.mjs +62 -0
  21. package/packs/common/web-ui/pack.json +6 -0
  22. package/packs/common/web-ui/prompts/rules.md +11 -0
  23. package/packs/common/web-ui/scripts/index.mjs +80 -0
  24. package/packs/en/artifact-qa/pack.json +6 -0
  25. package/packs/en/artifact-qa/prompts/rules.md +14 -0
  26. package/packs/en/artifact-qa/scripts/index.mjs +90 -0
  27. package/packs/en/prose/pack.json +7 -0
  28. package/packs/en/prose/prompts/rules.md +26 -0
  29. package/packs/en/prose/scripts/index.mjs +290 -0
  30. package/packs/en/slide-deck/pack.json +7 -0
  31. package/packs/en/slide-deck/prompts/rules.md +17 -0
  32. package/packs/en/slide-deck/scripts/index.mjs +81 -0
  33. package/packs/en/web-ui/pack.json +7 -0
  34. package/packs/en/web-ui/prompts/rules.md +20 -0
  35. package/packs/en/web-ui/scripts/index.mjs +103 -0
  36. package/packs/zh/artifact-qa/pack.json +6 -0
  37. package/packs/zh/artifact-qa/prompts/rules.md +14 -0
  38. package/packs/zh/artifact-qa/scripts/index.mjs +89 -0
  39. package/packs/zh/prose/pack.json +7 -0
  40. package/packs/zh/prose/prompts/rules.md +26 -0
  41. package/packs/zh/prose/scripts/index.mjs +305 -0
  42. package/packs/zh/slide-deck/pack.json +7 -0
  43. package/packs/zh/slide-deck/prompts/rules.md +17 -0
  44. package/packs/zh/slide-deck/scripts/index.mjs +75 -0
  45. package/packs/zh/web-ui/pack.json +7 -0
  46. package/packs/zh/web-ui/prompts/rules.md +20 -0
  47. package/packs/zh/web-ui/scripts/index.mjs +98 -0
  48. package/plugin.json +5 -6
  49. package/server.json +8 -2
  50. package/skills/deslop-docs/SKILL.md +10 -8
  51. package/skills/deslop-slides-docx/SKILL.md +7 -8
  52. package/skills/deslop-verify/SKILL.md +7 -8
  53. package/skills/deslop-web-ui/SKILL.md +7 -8
  54. package/skills/dislop/SKILL.md +16 -28
  55. package/skills/dislop/references/essay.md +1 -1
  56. package/skills/dislop/references/essay.zh-CN.md +1 -1
  57. package/skills/dislop/references/office.md +1 -1
  58. package/skills/dislop/references/office.zh-CN.md +1 -1
  59. package/skills/dislop/references/web-ui.md +1 -1
  60. package/skills/dislop/references/web-ui.zh-CN.md +1 -1
  61. package/skills/dislop/references/work-docs.md +1 -1
  62. package/skills/dislop/references/work-docs.zh-CN.md +1 -1
  63. package/src/cli-main.mjs +210 -0
  64. package/src/commands/check-fix.mjs +169 -0
  65. package/src/commands/doctor.mjs +110 -0
  66. package/src/commands/init.mjs +49 -0
  67. package/src/commands/login.mjs +82 -0
  68. package/src/commands/model.mjs +130 -0
  69. package/src/commands/packs.mjs +44 -0
  70. package/src/commands/verify.mjs +133 -0
  71. package/src/commands/voice.mjs +84 -0
  72. package/src/kernel/config.mjs +232 -0
  73. package/src/kernel/document-model.mjs +1412 -0
  74. package/src/kernel/fact-gate.mjs +615 -0
  75. package/src/kernel/file-discovery.mjs +139 -0
  76. package/src/{binary-node.mjs → kernel/ooxml-binary.mjs} +532 -893
  77. package/src/kernel/pack-loader.mjs +715 -0
  78. package/src/kernel/patcher.mjs +341 -0
  79. package/src/kernel/pipeline.mjs +267 -0
  80. package/src/kernel/prompt-assembler.mjs +307 -0
  81. package/src/kernel/voice-profile.mjs +177 -0
  82. package/src/mcp/stdio-server.mjs +372 -0
  83. package/src/runners/auto-fix.mjs +59 -0
  84. package/src/runners/interactive-tty.mjs +461 -0
  85. package/src/runners/reporters.mjs +256 -0
  86. package/src/runtime/chunker.mjs +87 -0
  87. package/src/runtime/json-extract.mjs +144 -0
  88. package/src/runtime/privacy-gate.mjs +97 -0
  89. package/src/runtime/providers/anthropic.mjs +65 -0
  90. package/src/runtime/providers/cloud.mjs +136 -0
  91. package/src/runtime/providers/gemini.mjs +91 -0
  92. package/src/runtime/providers/local-model.mjs +139 -0
  93. package/src/runtime/providers/openai-compat.mjs +130 -0
  94. package/src/runtime/router.mjs +315 -0
  95. package/src/sdk/index.mjs +137 -0
  96. package/models/manifest.json +0 -90
  97. package/models/pocket-slop-v1.json +0 -1
  98. package/packs/business-brief/pack.json +0 -937
  99. package/packs/core/pack.json +0 -209
  100. package/packs/deck-and-ui/pack.json +0 -539
  101. package/packs/engineering-spec/pack.json +0 -144
  102. package/packs/executive-deck/pack.json +0 -98
  103. package/packs/literary-essay/pack.json +0 -344
  104. package/packs/regulated-comms/pack.json +0 -99
  105. package/patterns/ai-tic-rubric.json +0 -252
  106. package/patterns/banks/composite-fusion.json +0 -48
  107. package/patterns/banks/discourse-rhythm.json +0 -95
  108. package/patterns/banks/lexical-signals.json +0 -92
  109. package/patterns/banks/syntactic-frames.json +0 -52
  110. package/patterns/banks/visual-deck.json +0 -44
  111. package/patterns/dimensions/artifacts.json +0 -121
  112. package/patterns/dimensions/discourse.json +0 -438
  113. package/patterns/dimensions/lexical.json +0 -198
  114. package/patterns/dimensions/rhythm.json +0 -258
  115. package/patterns/dimensions/syntactic.json +0 -285
  116. package/patterns/dimensions/visual-and-deck.json +0 -530
  117. package/patterns/taxonomy.json +0 -112
  118. package/src/core.mjs +0 -5497
  119. package/src/dislop/review-picker.vim +0 -114
  120. package/src/local-model.mjs +0 -997
  121. package/src/pattern-engine.mjs +0 -1003
  122. package/src/pocket-model.mjs +0 -729
  123. package/src/review-apply.mjs +0 -151
  124. package/src/review-client.mjs +0 -1073
@@ -1,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
  "mcpServers": {
6
6
  "dislop": {
7
7
  "httpUrl": "https://dislop.com/mcp"
@@ -0,0 +1,68 @@
1
+ # Installing dislop for AI Coding Agents
2
+
3
+ Use this specification to install and verify `dislop` in Cline, Roo Code, Cursor, Claude Code, Codex, Antigravity, or Gemini CLI.
4
+
5
+ ## 1. Remote Streamable HTTP MCP (No Local Dependencies)
6
+
7
+ Connect directly to the hosted MCP endpoint at `https://dislop.com/mcp` using OAuth 2.1 discovery at `https://dislop.com/.well-known/oauth-authorization-server`.
8
+
9
+ ```json
10
+ {
11
+ "mcpServers": {
12
+ "dislop": {
13
+ "type": "http",
14
+ "url": "https://dislop.com/mcp"
15
+ }
16
+ }
17
+ }
18
+ ```
19
+
20
+ ## 2. Local Offline stdio MCP (Zero Network Uploads, Node.js 20+)
21
+
22
+ Run the micro-kernel locally over stdio when drafts cannot leave the machine (`dislop_check`, `dislop_fix_safe`, `dislop_verify`, and `dislop_packs`):
23
+
24
+ ```json
25
+ {
26
+ "mcpServers": {
27
+ "dislop": {
28
+ "command": "npx",
29
+ "args": ["--yes", "dislop-mcp"]
30
+ }
31
+ }
32
+ }
33
+ ```
34
+
35
+ ## 3. Pure-Markdown Agent Skills
36
+
37
+ Install the router skill or individual workflow skills directly into agent skill directories:
38
+
39
+ ```bash
40
+ npx --yes skills add dislop-ai/dislop --skill dislop
41
+ ```
42
+
43
+ Focused workflow skills in `dislop-ai/dislop`:
44
+
45
+ - `deslop-docs`: Markdown docs, READMEs, RFCs, and release notes
46
+ - `deslop-slides-docx`: PowerPoint (`.pptx`), Word (`.docx`), PDF, and image deliverables
47
+ - `deslop-web-ui`: HTML, CSS, JSX, TSX, and SVG web interfaces
48
+ - `deslop-verify`: Fact preservation, direction-reversal, polarity, and anti-degradation checks against original text or git `HEAD`
49
+
50
+ ## 4. Verify Installation
51
+
52
+ Run a local CLI check against any Markdown file:
53
+
54
+ ```bash
55
+ npx --yes dislop check README.md --no-llm --format agent
56
+ ```
57
+
58
+ Exit codes:
59
+
60
+ - `0`: Pass (zero unresolved `Defect: error` items; prose `Suggestion`s never fail CI)
61
+ - `1`: Unresolved `Defect: error` found (or Fact Gate failure in `dislop verify`)
62
+ - `2`: Invalid CLI arguments, configuration error, or unreadable file
63
+
64
+ For edits to an existing tracked file, verify that all numbers, units, URLs, code spans, proper nouns, and polarities survived:
65
+
66
+ ```bash
67
+ npx --yes dislop verify --git HEAD README.md
68
+ ```
package/package.json CHANGED
@@ -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 in docs, web UI, and slides — Skill, Plugin, CLI & MCP.",
3
+ "version": "1.0.1",
4
+ "description": "Pluggable Editorial & Artifact Linter (Node.js Micro-Kernel) — Dual-track Defect & Suggestion engine with local-first 3-Tier LLM routing, Fact Gate, interactive hunk review, and MCP.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://dislop.com",
7
7
  "repository": {
@@ -16,38 +16,19 @@
16
16
  "node": ">=20.0.0"
17
17
  },
18
18
  "exports": {
19
- ".": "./src/core.mjs",
20
- "./core": "./src/core.mjs",
21
- "./pattern-engine": "./src/pattern-engine.mjs",
22
- "./pocket-model": "./src/pocket-model.mjs",
23
- "./local-model": "./src/local-model.mjs",
24
- "./binary-node": "./src/binary-node.mjs"
19
+ ".": "./src/sdk/index.mjs",
20
+ "./sdk": "./src/sdk/index.mjs"
25
21
  },
26
22
  "bin": {
27
- "dislop": "bin/dislop.mjs",
28
- "dislop-mcp": "bin/dislop-mcp.mjs"
23
+ "dislop": "./bin/dislop.mjs",
24
+ "dislop-mcp": "./bin/dislop-mcp.mjs"
29
25
  },
30
26
  "scripts": {
31
- "test": "node bin/dislop.mjs pack-test && node tests/test_site.mjs",
32
- "test:patterns": "node scripts/pattern_lab.mjs verify && node scripts/pattern_lab.mjs assert",
33
- "test:models": "PYTHONPATH=src python3 scripts/train_pocket_models.py --eval-only",
34
- "bench": "node scripts/run_benchmark.mjs",
35
- "bench:assert": "node scripts/run_benchmark.mjs --assert",
36
- "bench:skill": "node scripts/run_skill_benchmark.mjs --assert",
37
- "bench:patterns": "node scripts/pattern_lab.mjs ablation",
38
- "bench:visual": "node scripts/run_visual_benchmark.mjs",
39
- "bench:visual:vlm": "node scripts/run_visual_vlm_bench.mjs",
40
- "build:site": "node scripts/build_site.mjs",
41
- "sync:manifests": "node scripts/sync_manifests.mjs",
42
- "check:manifests": "node scripts/sync_manifests.mjs --check",
43
- "release:check": "node scripts/release.mjs --check",
44
- "release:status": "node scripts/release.mjs --status",
45
- "release": "node scripts/release.mjs",
46
- "dogfood": "node bin/dislop.mjs check . --fail-on warning && node bin/dislop.mjs check site/ --fail-on info && node scripts/media/audit_visual_assets.mjs --assert",
47
- "media:render": "python3 scripts/media/render_gifs.py",
48
- "media:verify": "python3 scripts/media/verify_demos.py",
49
- "media:bench": "python3 scripts/media/bench_encoders.py",
50
- "media:audit": "node scripts/media/audit_visual_assets.mjs --assert"
27
+ "test": "node --test tests/*.test.mjs",
28
+ "check:security": "node ./scripts/verify-packs-security.mjs",
29
+ "bench": "node ./scripts/run-benchmark.mjs",
30
+ "bench:assert": "node ./scripts/run-benchmark.mjs --assert",
31
+ "dogfood": "node ./bin/dislop.mjs check README.md README.zh-CN.md CONTRIBUTING.md PRODUCT.md AGENTS.md SECURITY.md docs/architecture.md docs/MIGRATION-TODO.md benchmarks/README.md benchmarks/REPORT.md skills/ --no-llm"
51
32
  },
52
33
  "files": [
53
34
  ".agents/plugins/marketplace.json",
@@ -61,21 +42,10 @@
61
42
  "mcp.json",
62
43
  "plugin.json",
63
44
  "server.json",
45
+ "llms-install.md",
64
46
  "bin/",
65
- "src/core.mjs",
66
- "src/review-client.mjs",
67
- "src/review-apply.mjs",
68
- "src/dislop/review-picker.vim",
69
- "src/pattern-engine.mjs",
70
- "src/pocket-model.mjs",
71
- "src/local-model.mjs",
72
- "src/binary-node.mjs",
73
- "models/",
47
+ "src/",
74
48
  "packs/",
75
- "patterns/taxonomy.json",
76
- "patterns/ai-tic-rubric.json",
77
- "patterns/dimensions/",
78
- "patterns/banks/",
79
49
  "skills/",
80
50
  "assets/logo.svg",
81
51
  "README.md",
@@ -83,28 +53,20 @@
83
53
  "PRODUCT.md",
84
54
  "LICENSE"
85
55
  ],
56
+ "mcpName": "io.github.dislop-ai/dislop",
86
57
  "keywords": [
87
58
  "anti-slop",
88
59
  "de-slop",
89
60
  "ai-slop",
90
- "humanizer",
91
61
  "linter",
62
+ "editorial",
92
63
  "proofreading",
93
- "agent-skill",
94
- "claude-code",
95
- "codex",
96
- "cursor",
97
- "llms-txt",
98
- "mcp",
99
- "model-context-protocol",
100
64
  "markdown",
101
65
  "docx",
102
66
  "pptx",
103
- "editorial",
104
- "typography",
105
- "quality-gate"
67
+ "mcp",
68
+ "agent-skill"
106
69
  ],
107
- "mcpName": "io.github.dislop-ai/dislop",
108
70
  "publishConfig": {
109
71
  "registry": "https://registry.npmjs.org/",
110
72
  "access": "public"
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "common/artifact-qa",
3
+ "version": "1.0.0",
4
+ "description": "Language-neutral structural and semantic delivery QA: placeholder tokens, leaked tool citations, broken links, raw Markdown leaks in OOXML/HTML, and uncleaned draft/option residue."
5
+ }
@@ -0,0 +1,11 @@
1
+ ---
2
+ roleHint: "Scope: language-neutral pre-publication delivery residue."
3
+ rules:
4
+ - id: unchosen-draft-options
5
+ priority: strong
6
+ - id: meta-editing-note
7
+ priority: strong
8
+ ---
9
+
10
+ 1. **unchosen-draft-options**: Fires when inline text retains multiple mutually exclusive draft phrasings generated during brainstorming (e.g., 'Option A: ... / Option B: ...') where the author forgot to pick one. Do not flag genuine product comparison tables or documented user options. Fix suggestion: keep the single intended option and remove the remaining draft alternatives.
11
+ 2. **meta-editing-note**: Fires on stray editorial commentary explaining how a passage was revised in response to a prompt (e.g., 'Note: I shortened paragraph two for clarity') that does not belong in the published document. Do not flag legitimate document footnotes or reader-facing caveats. Fix suggestion: remove the stray editorial meta-note.
@@ -0,0 +1,173 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ import { definePackScripts, maskInlineCode } from "dislop/sdk";
4
+
5
+ const UNIVERSAL_PLACEHOLDER_PATTERNS = [
6
+ /\[(?:TODO|TBD|FIXME|XXX)(?:[:\s][^\][\n]{0,60})?\](?!\s*\()/i,
7
+ /\{\{\s*[A-Za-z_][A-Za-z0-9_.-]{0,40}\s*\}\}/,
8
+ /<INSERT_[A-Z0-9_]{1,40}>/,
9
+ ];
10
+
11
+ const CITATION_ARTIFACT_RE =
12
+ /(?::contentReference\[oaicite:\d+\](?:\{[^}]*\})?|\[(?:oaicite|turn\d+search\d+|citation):\s*[^\]]+\])/i;
13
+
14
+ function isExternalOrSpecialScheme(url) {
15
+ return /^(?:[a-zA-Z][a-zA-Z0-9+.-]*:|\/\/)/.test(url);
16
+ }
17
+
18
+ function localTargetExists(docDir, cleanRel) {
19
+ const resolvedTarget = path.resolve(docDir, cleanRel);
20
+ const candidates = [
21
+ resolvedTarget,
22
+ `${resolvedTarget}.html`,
23
+ `${resolvedTarget}.md`,
24
+ path.join(resolvedTarget, "index.html"),
25
+ path.join(resolvedTarget, "index.md"),
26
+ ];
27
+ if (candidates.some((c) => fs.existsSync(c))) {
28
+ return true;
29
+ }
30
+ for (const staticSubdir of ["site", "dist", "public"]) {
31
+ const altBase = path.resolve(docDir, "..", staticSubdir, cleanRel);
32
+ if (
33
+ fs.existsSync(altBase) ||
34
+ fs.existsSync(`${altBase}.html`) ||
35
+ fs.existsSync(path.join(altBase, "index.html"))
36
+ ) {
37
+ return true;
38
+ }
39
+ }
40
+ return false;
41
+ }
42
+
43
+ export default definePackScripts({
44
+ check(doc, ctx) {
45
+ for (const seg of doc.segments) {
46
+ const proseOnly = maskInlineCode(seg.text);
47
+
48
+ for (const re of UNIVERSAL_PLACEHOLDER_PATTERNS) {
49
+ const m = proseOnly.match(re);
50
+ if (m) {
51
+ const hitQuote = seg.text.slice(m.index, m.index + m[0].length);
52
+ ctx.reportDefect({
53
+ ruleId: "unfilled-placeholder",
54
+ severity: "error",
55
+ targetId: seg.id,
56
+ line: seg.line,
57
+ originalQuote: hitQuote,
58
+ fixSafety: "manual",
59
+ actionType: "prompt",
60
+ reason: "Unfilled developer or template token left in deliverable.",
61
+ rewritePrompt: `Replace '${hitQuote}' with the real value before publishing, or remove the unfinished sentence.`,
62
+ });
63
+ break;
64
+ }
65
+ }
66
+
67
+ const citeMatch = proseOnly.match(CITATION_ARTIFACT_RE);
68
+ if (citeMatch) {
69
+ const hitQuote = seg.text.slice(citeMatch.index, citeMatch.index + citeMatch[0].length);
70
+ ctx.reportDefect({
71
+ ruleId: "chatbot-citation-leak",
72
+ severity: "error",
73
+ targetId: seg.id,
74
+ line: seg.line,
75
+ originalQuote: hitQuote,
76
+ fixSafety: "safe",
77
+ actionType: "delete",
78
+ suggestedReplacement: "",
79
+ reason: "Internal AI search/citation token leaked into output text.",
80
+ });
81
+ }
82
+ }
83
+
84
+ const docDir = doc.filePath ? path.dirname(path.resolve(ctx.cwd, doc.filePath)) : ctx.cwd;
85
+ for (const link of doc.artifacts.links || []) {
86
+ const url = String(link.url || "").trim();
87
+
88
+ if (url === "") {
89
+ ctx.reportDefect({
90
+ ruleId: "empty-link-target",
91
+ severity: "error",
92
+ targetId: link.segmentId || null,
93
+ line: link.line,
94
+ originalQuote: link.raw || link.url,
95
+ fixSafety: "manual",
96
+ actionType: "prompt",
97
+ reason: "Link has an empty destination URL.",
98
+ rewritePrompt: "Provide a valid destination URL or unwrap the link.",
99
+ locator: link.locator,
100
+ });
101
+ continue;
102
+ }
103
+
104
+ if (url === "#" || /^javascript:\s*(?:void\(0\)|;)?$/i.test(url)) {
105
+ ctx.reportDefect({
106
+ ruleId: "placeholder-dead-link",
107
+ severity: doc.modality === "markup" ? "error" : "warning",
108
+ targetId: link.segmentId || null,
109
+ line: link.line,
110
+ originalQuote: link.raw || url,
111
+ fixSafety: "manual",
112
+ actionType: "prompt",
113
+ reason: `Placeholder non-navigating link target '${url}'.`,
114
+ rewritePrompt: "Wire a real destination URL or use a <button type=\"button\"> control.",
115
+ locator: link.locator,
116
+ });
117
+ continue;
118
+ }
119
+
120
+ if (!url.startsWith("#") && !url.startsWith("/") && !isExternalOrSpecialScheme(url)) {
121
+ const cleanRel = decodeURIComponent(url.split("#")[0].split("?")[0]);
122
+ if (cleanRel && doc.filePath && fs.existsSync(doc.filePath)) {
123
+ const isExtensionlessRoute =
124
+ doc.modality === "markup" && cleanRel.endsWith("/") && !path.extname(cleanRel.replace(/\/+$/, ""));
125
+ if (!isExtensionlessRoute && !localTargetExists(docDir, cleanRel)) {
126
+ ctx.reportDefect({
127
+ ruleId: "broken-local-link",
128
+ severity: "error",
129
+ targetId: link.segmentId || null,
130
+ line: link.line,
131
+ originalQuote: link.raw || url,
132
+ fixSafety: "manual",
133
+ actionType: "prompt",
134
+ reason: `Broken relative link: target '${cleanRel}' does not exist on disk.`,
135
+ rewritePrompt: `Fix path '${cleanRel}' to point to an existing file.`,
136
+ locator: link.locator,
137
+ });
138
+ }
139
+ }
140
+ }
141
+ }
142
+
143
+ for (const leak of doc.artifacts.rawFormattingLeaks || []) {
144
+ let safeCleanup = "";
145
+ let fixSafety = "manual";
146
+ if (leak.pattern === "bold-asterisks" && /^\*\*([^*]+)\*\*$/.test(leak.text)) {
147
+ const seg = doc.segments.find((s) => s.id === leak.segmentId);
148
+ if (seg) {
149
+ safeCleanup = seg.text.replace(/\*\*([^*\n]+)\*\*/g, "$1");
150
+ fixSafety = "safe";
151
+ }
152
+ }
153
+
154
+ ctx.reportDefect({
155
+ ruleId: "raw-markdown-leak",
156
+ severity: "error",
157
+ targetId: leak.segmentId,
158
+ line: leak.line,
159
+ originalQuote:
160
+ fixSafety === "safe"
161
+ ? doc.segments.find((s) => s.id === leak.segmentId)?.text || leak.text
162
+ : leak.text,
163
+ fixSafety,
164
+ actionType: fixSafety === "safe" ? "replace" : "prompt",
165
+ suggestedReplacement: safeCleanup,
166
+ reason: `Unrendered raw Markdown syntax (${leak.pattern}) leaked into ${doc.format.toUpperCase()} content.`,
167
+ ...(fixSafety === "manual"
168
+ ? { rewritePrompt: "Convert raw Markdown syntax into native document formatting." }
169
+ : {}),
170
+ });
171
+ }
172
+ },
173
+ });
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "common/slide-deck",
3
+ "version": "1.0.0",
4
+ "description": "Multi-modal PowerPoint (.pptx), PDF, and raster image layout, cadence & metadata hygiene checks (deterministic scripts + prompt-based slide structure review).",
5
+ "formats": ["pptx", "pdf", "png", "jpg", "jpeg", "webp", "gif"]
6
+ }
@@ -0,0 +1,11 @@
1
+ ---
2
+ roleHint: "Scope: cross-slide narrative cadence and scannability. {{deckSummary}}"
3
+ rules:
4
+ - id: repetitive-slide-skeleton
5
+ priority: moderate
6
+ - id: cross-slide-recap-padding
7
+ priority: hint
8
+ ---
9
+
10
+ 1. **repetitive-slide-skeleton**: Fires when 3 or more consecutive slides repeat an identical mechanical bullet skeleton (such as three symmetrical 'Noun: abstract clause' bullets per slide) regardless of content type. Fix suggestion: vary layout to match the content (direct takeaway line, metric comparison, or concise fact bullets).
11
+ 2. **cross-slide-recap-padding**: Fires on transitional sentences on a slide that only restate the previous slide's topic without introducing new facts or decisions. Fix suggestion: remove the recap sentence so the slide opens directly on its own point.
@@ -0,0 +1,62 @@
1
+ import { definePackScripts } from "dislop/sdk";
2
+
3
+ export default definePackScripts({
4
+ check(doc, ctx) {
5
+ const deck = doc.artifacts.deckSignals;
6
+ if (deck?.slides) {
7
+ for (const slide of deck.slides) {
8
+ if (slide.autofitFontScale < 80) {
9
+ ctx.reportDefect({
10
+ ruleId: "slide-autofit-shrink",
11
+ severity: "warning",
12
+ targetId: slide.firstSegmentId,
13
+ originalQuote: slide.title || `Slide ${slide.index}`,
14
+ fixSafety: "manual",
15
+ actionType: "prompt",
16
+ reason: `Slide ${slide.index} shrinks body text to ${slide.autofitFontScale}% via normAutofit to force overflowing copy onto one slide.`,
17
+ rewritePrompt: `Trim copy on Slide ${slide.index} or split across two slides so text renders at 100% scale.`,
18
+ });
19
+ }
20
+
21
+ if (slide.wordCount > 120 || slide.cjkCount > 280) {
22
+ ctx.reportSuggestion({
23
+ ruleId: "slide-word-wall",
24
+ priority: "strong",
25
+ fixSafety: "manual",
26
+ actionType: "prompt",
27
+ targetId: slide.firstSegmentId,
28
+ originalQuote: slide.title || `Slide ${slide.index}`,
29
+ reason: `Slide ${slide.index} packs ${slide.wordCount} words (${slide.cjkCount} CJK chars), creating an unreadable slide wall.`,
30
+ rewritePrompt: `Distill Slide ${slide.index} to key takeaways and move dense prose to speaker notes.`,
31
+ });
32
+ }
33
+
34
+ if (slide.bulletCount > 6) {
35
+ ctx.reportSuggestion({
36
+ ruleId: "slide-bullet-overload",
37
+ priority: "moderate",
38
+ fixSafety: "manual",
39
+ actionType: "prompt",
40
+ targetId: slide.firstSegmentId,
41
+ originalQuote: slide.title || `Slide ${slide.index}`,
42
+ reason: `Slide ${slide.index} stacks ${slide.bulletCount} bullet items (> 6 recommended maximum).`,
43
+ rewritePrompt: `Group or trim bullets on Slide ${slide.index} to at most 4-5 distinct points.`,
44
+ });
45
+ }
46
+ }
47
+ }
48
+
49
+ const media = doc.artifacts.mediaSignals;
50
+ if (media?.aiWorkflowResidue) {
51
+ ctx.reportDefect({
52
+ ruleId: "image-ai-workflow-residue",
53
+ severity: "warning",
54
+ originalQuote: doc.filePath,
55
+ fixSafety: "manual",
56
+ actionType: "prompt",
57
+ reason: "Image contains unstripped ComfyUI / Automatic1111 generation prompt parameters in metadata.",
58
+ rewritePrompt: "Strip embedded generation workflow chunks from the image before publishing.",
59
+ });
60
+ }
61
+ },
62
+ });
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "common/web-ui",
3
+ "version": "1.0.0",
4
+ "description": "Multi-modal HTML, CSS, JSX, TSX, and SVG structural & AI-template chrome checks (deterministic scripts + prompt-based UI hierarchy review).",
5
+ "formats": ["html", "css", "jsx", "tsx", "svg"]
6
+ }
@@ -0,0 +1,11 @@
1
+ ---
2
+ roleHint: "Scope: UI component hierarchy and stock layout-copy patterns. {{uiSummary}}"
3
+ rules:
4
+ - id: redundant-heading-subcopy
5
+ priority: moderate
6
+ - id: fabricated-stat-tile
7
+ priority: strong
8
+ ---
9
+
10
+ 1. **redundant-heading-subcopy**: Fires when a card or section subcopy merely restates its immediately preceding heading in rearranged words without adding concrete detail, constraints, or examples. Fix suggestion: remove the redundant subcopy or replace it with a specific capability or boundary.
11
+ 2. **fabricated-stat-tile**: Fires on suspiciously generic round hero stat tiles (e.g., '10,000+ Happy Users', '99.99% Uptime', '500+ Integrations') surrounded by template traits with no verifiable product context. Do not flag attributed or product-specific operational metrics. Fix suggestion: supply a verified production figure or remove the stock stat tile.
@@ -0,0 +1,80 @@
1
+ import { definePackScripts } from "dislop/sdk";
2
+
3
+ export default definePackScripts({
4
+ check(doc, ctx) {
5
+ const ui = doc.artifacts.uiSignals;
6
+ if (!ui) return;
7
+
8
+ if (ui.missingSvgViewBox) {
9
+ ctx.reportDefect({
10
+ ruleId: "svg-missing-viewbox",
11
+ severity: "warning",
12
+ originalQuote: "<svg>",
13
+ fixSafety: "manual",
14
+ actionType: "prompt",
15
+ reason: "SVG root element omits a 'viewBox' attribute, breaking responsive scaling.",
16
+ rewritePrompt: "Add an explicit viewBox=\"0 0 <width> <height>\" on the root <svg> element.",
17
+ });
18
+ }
19
+
20
+ for (const btn of ui.disabledButtonsWithoutTitle || []) {
21
+ ctx.reportDefect({
22
+ ruleId: "unexplained-disabled-button",
23
+ severity: "warning",
24
+ originalQuote: btn.text.slice(0, 100),
25
+ fixSafety: "manual",
26
+ actionType: "prompt",
27
+ reason: "Disabled <button> has no title or aria-label explaining why it is inactive.",
28
+ rewritePrompt: "Wire the button handler, remove the dead control, or add an explanatory title/aria-label.",
29
+ });
30
+ }
31
+
32
+ if ((ui.purplePinkGradients || []).length > 0) {
33
+ ctx.reportSuggestion({
34
+ ruleId: "neon-ai-gradient",
35
+ priority: "moderate",
36
+ fixSafety: "manual",
37
+ actionType: "prompt",
38
+ originalQuote: ui.purplePinkGradients[0].text.slice(0, 100),
39
+ reason: "Stock purple-to-pink gradient strongly signals default AI-generated landing page chrome.",
40
+ rewritePrompt: "Replace stock purple-pink gradients with a restrained brand neutral or single accent token.",
41
+ });
42
+ }
43
+
44
+ if ((ui.glowBlobs || []).length > 0) {
45
+ ctx.reportSuggestion({
46
+ ruleId: "glow-blob-backdrop",
47
+ priority: "hint",
48
+ fixSafety: "manual",
49
+ actionType: "prompt",
50
+ originalQuote: ui.glowBlobs[0].text.slice(0, 100),
51
+ reason: "Blurred floating glow-orb backdrop is a recognizable stock AI UI trope.",
52
+ rewritePrompt: "Remove decorative blur-3xl orbs unless required by an established brand system.",
53
+ });
54
+ }
55
+
56
+ if ((ui.pillBadges || []).length >= 4) {
57
+ ctx.reportSuggestion({
58
+ ruleId: "pill-badge-soup",
59
+ priority: "moderate",
60
+ fixSafety: "manual",
61
+ actionType: "prompt",
62
+ originalQuote: ui.pillBadges[0].text.slice(0, 100),
63
+ reason: `Dense cluster of ${ui.pillBadges.length} rounded-full pill badges creates visual clutter.`,
64
+ rewritePrompt: "Consolidate decorative pill kickers into plain typographic labels or metadata rows.",
65
+ });
66
+ }
67
+
68
+ if ((ui.backdropBlurCount || 0) >= 3) {
69
+ ctx.reportSuggestion({
70
+ ruleId: "glassmorphism-overuse",
71
+ priority: "hint",
72
+ fixSafety: "manual",
73
+ actionType: "prompt",
74
+ originalQuote: `backdrop-blur (${ui.backdropBlurCount} regions)`,
75
+ reason: `Page stacks ${ui.backdropBlurCount} frosted-glass backdrop-blur panels, a common AI UI template default.`,
76
+ rewritePrompt: "Use crisp solid surfaces with 1px borders and reserve backdrop-blur for transient overlays.",
77
+ });
78
+ }
79
+ },
80
+ });
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "en/artifact-qa",
3
+ "version": "1.0.0",
4
+ "description": "English delivery artifact QA (deterministic scripts + prompt-based audit): unreplaced copy placeholders, explicit & implicit assistant wrappers, disguised writer instructions, and pasted refusals.",
5
+ "languages": ["en"]
6
+ }
@@ -0,0 +1,14 @@
1
+ ---
2
+ roleHint: "Scope: English AI-chat handoff residue, author-facing instructions, and unreplaced placeholder entities."
3
+ rules:
4
+ - id: implicit-assistant-framing
5
+ priority: strong
6
+ - id: disguised-placeholder-prose
7
+ priority: strong
8
+ - id: synthetic-example-entity
9
+ priority: moderate
10
+ ---
11
+
12
+ 1. **implicit-assistant-framing**: Fires on conversational openers or sign-offs that address the prompt author rather than the document's intended reader (e.g., 'Based on the notes you shared, I have organized...', 'Below is a breakdown tailored to your audience.', 'Let me know if you want a shorter version.'). Do not flag genuine first-person author introductions addressed to readers. Fix suggestion: remove the assistant handoff sentence.
13
+ 2. **disguised-placeholder-prose**: Fires on prose sentences written as reminders to the writer rather than finished reader-facing copy (e.g., 'Mention the Q3 churn rate once finance confirms.', 'Include a link to the staging dashboard here.'). Fix suggestion: supply the confirmed figure or link before publishing, or omit the unfinished line.
14
+ 3. **synthetic-example-entity**: Fires on unreplaced stock dummy names, companies, or addresses ('Acme Corp', 'WidgetCo', 'john.doe@example.com', '123 Main St') inside real deliverables. Do not flag API documentation, test tutorials, or RFC examples where placeholder domains are intentional. Fix suggestion: replace with the real organization or contact details.