dislop 0.7.1 → 0.8.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 (45) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/.codex-plugin/plugin.json +4 -3
  4. package/.cursor-plugin/plugin.json +3 -2
  5. package/PRODUCT.md +18 -4
  6. package/README.md +72 -38
  7. package/README.zh-CN.md +70 -40
  8. package/bin/dislop.mjs +2883 -309
  9. package/gemini-extension.json +2 -2
  10. package/package.json +19 -3
  11. package/packs/business-brief/pack.json +336 -6
  12. package/packs/core/pack.json +14 -7
  13. package/packs/deck-and-ui/pack.json +255 -6
  14. package/packs/literary-essay/pack.json +20 -0
  15. package/patterns/ai-tic-rubric.json +252 -0
  16. package/patterns/banks/composite-fusion.json +13 -1
  17. package/patterns/banks/lexical-signals.json +20 -2
  18. package/patterns/banks/syntactic-frames.json +10 -3
  19. package/patterns/banks/visual-deck.json +7 -0
  20. package/patterns/dimensions/discourse.json +26 -0
  21. package/patterns/dimensions/lexical.json +26 -0
  22. package/patterns/dimensions/rhythm.json +52 -0
  23. package/patterns/dimensions/visual-and-deck.json +209 -1
  24. package/plugin.json +4 -3
  25. package/server.json +2 -2
  26. package/skills/dislop/SKILL.md +35 -41
  27. package/skills/dislop/agents/openai.yaml +1 -1
  28. package/skills/dislop/references/essay.md +24 -0
  29. package/skills/dislop/references/essay.zh-CN.md +24 -0
  30. package/skills/dislop/references/office.md +23 -0
  31. package/skills/dislop/references/office.zh-CN.md +23 -0
  32. package/skills/dislop/references/web-ui.md +24 -0
  33. package/skills/dislop/references/web-ui.zh-CN.md +24 -0
  34. package/skills/dislop/references/work-docs.md +25 -0
  35. package/skills/dislop/references/work-docs.zh-CN.md +24 -0
  36. package/src/binary-node.mjs +1716 -1
  37. package/src/core.mjs +3215 -247
  38. package/src/local-model.mjs +31 -11
  39. package/src/pattern-engine.mjs +174 -24
  40. package/src/pocket-model.mjs +27 -5
  41. package/src/review-client.mjs +1064 -0
  42. package/skills/dislop/references/business-and-rfc.md +0 -26
  43. package/skills/dislop/references/editorial-and-essay.md +0 -20
  44. package/skills/dislop/references/regulated-and-precision.md +0 -27
  45. package/skills/dislop/references/web-ui-and-deck.md +0 -26
@@ -0,0 +1,24 @@
1
+ # 随笔、专栏与非虚构长文
2
+
3
+ 适用范围:个人随笔、品牌专栏、人物记事与公众号长文。
4
+ 检查命令:`dislop check <essay.md> --pack literary-essay --profile`(对照个人文风可运行 `dislop voice`)。
5
+
6
+ ## 常见问题与改法
7
+
8
+ 1. **保持长短句自然错落(`low-burstiness-vapor`)**:避免连续 5 句以上长度接近、缺少具体名词的空句子。按时间、地点和动作自然展开,不刻意切碎成三字短句口号。
9
+ 2. **删掉设问过渡与三段分号(`literary-rhetorical-qa`、`literary-semicolon-tricolon`)**:删去 `为什么……?因为……`、`结果呢?` 以及工整排比的三段分号句。
10
+ 3. **只在失控长句处拆句(`comma-chain-runon`)**:一逗到底超过五六个分句且主语不清时再拆成 2 到 3 句,本身节奏通顺的流水句无需强行拆断。
11
+ 4. **停在最后一个现场画面,别强行升华(`zh-essay-moralizing-ending`、`literary-narrative-frame`)**:删掉 `在信息过载的当下……` 开头和 `这或许就是……真正的意义所在` 结尾,落在最后一个动作或原话直接收笔。
12
+ 5. **纠回中文标点、否定转折腔与生硬译文腔(`zh-halfwidth-punctuation`、`literary-negation-pivot`)**:中文正文统一用全角逗号、句号和引号,删掉 `不是……而是……` 句式,并避开 `在他的……上,……着` 这类生硬的欧化状语堆砌。
13
+ 6. **只写笔记实情**:用素材已有的器物、动作、天气和对话自然展开来匹配目标篇幅,绝不外编路人、对话或心理活动凑字数。
14
+
15
+ ## 三段对照
16
+
17
+ - **原句**:``谷雨那天刮了北风,窑口晾了 6 排坯;夜里 21:15,老师傅把 2 块湿布盖上转盘,锁门回家。这或许就是手艺人在喧嚣里留住的本心。``
18
+ - **改过头**:``北风吹过。6 排坯晾在窑口。21:15 他盖好湿布。做陶不是谋生,而是安顿时间。``
19
+ - **改干净**:``谷雨那天刮了北风,窑口晾了 6 排坯;夜里 21:15,老师傅把 2 块湿布盖上转盘,锁门回家。``
20
+
21
+ ## 这些别删
22
+
23
+ - 原文已经具象平实、没有套话的句子和作者口吻,应保持原貌。
24
+ - 采访原话、钟点、地名、物价和现场动作细节。
@@ -0,0 +1,23 @@
1
+ # Word (`.docx`) & PowerPoint (`.pptx`) Decks
2
+
3
+ Scope: Word proposals and reports (`.docx`), executive decks (`.pptx`), slide outlines, and Office XML or document-API edits.
4
+ CLI pack: `dislop check <file.docx-or-pptx> --pack executive-deck` (or `business-brief` for `.docx`).
5
+
6
+ ## Rules & Fixes
7
+
8
+ 1. **Strip leaked Markdown & chat wrappers (`markdown-leak`, `chatbot-artifact`, `unfilled-placeholder`)**: Remove `**bold**`, `## Heading`, backticks, placeholder tags, and conversational wrapper sentences. Delete wrapper nouns whole—never glue partial headings onto body sentences.
9
+ 2. **Keep XML structure, document-API styles & grammar intact**: Preserve valid XML tags (`<w:document>`, `<p:sld>`), document-API paragraph styles, tracked changes (`<w:ins>`, `<w:del>`), comments, and tables. Leave existing text runs and split numbers intact (for example `$18.` + `5M`) unless merging is necessary; after cutting hype modifiers (`Their faultless backup cluster`), keep determiner grammar intact (`Their backup cluster`).
10
+ 3. **Write finding headlines (`slide-weak-topic-title`, `slide-process-not-finding-title`)**: Replace generic headings (`"Overview"`, `"Background"`) with the specific finding and source number (`"North Pier Pump Drew $42k Excess Power"`).
11
+ 4. **Keep slides scannable without repeating numbers (`slide-word-wall`, `slide-bullet-overload`, `slide-autofit-shrink`)**: When drafting slides, stay within 120 words and 5–6 bullets without `<a:normAutofit fontScale="65000"/>`, and avoid repeating the headline number inside bullets. When revising, keep all source facts intact.
12
+ 5. **Break consecutive bullet skeletons (`pptx-layout-monotony`)**: Across 4+ slides, vary layouts with tables for comparisons and charts for trends.
13
+
14
+ ## Contrast
15
+
16
+ - **Original (`slide1.xml`)**: ``Title: Project Overview | Body: Happy to assist! Below is the slide copy. **Finding**: North pier pump drew $42k excess power in May, needing 4x stronger governance.``
17
+ - **Overcorrected**: ``Title: Pumping Reimagined | Body: Summary. This isn't an energy bill — it's an efficiency reset.``
18
+ - **Clean**: ``Title: North Pier Pump Drew $42k Excess Power in May``
19
+
20
+ ## Keep These Intact
21
+
22
+ - Existing Word tracked changes, comments, tables, document-API formatting, and split run boundaries.
23
+ - Structural labels (`Timeline:`), numbers, units, bounds, and hedging words when deleting adjacent hype.
@@ -0,0 +1,23 @@
1
+ # Word(`.docx`)与演示文稿(`.pptx`)
2
+
3
+ 适用范围:Word 交付方案与报告(`.docx`)、汇报幻灯片(`.pptx`)、单页大纲及 Office XML 或文档接口编辑。
4
+ 检查命令:`dislop check <file.docx-or-pptx> --pack executive-deck`(Word 报告用 `business-brief`)。
5
+
6
+ ## 常见问题与改法
7
+
8
+ 1. **清掉裸 Markdown、寒暄与占位符(`markdown-leak`、`chatbot-artifact`、`unfilled-placeholder`)**:删掉 `**加粗**`、`## 标题`、`[待补充]` 和整句模型寒暄(如 `很高兴协助,下方是……`)。寒暄里的名词整句删掉,不要硬粘成 `总体说明:` 这类半截小标题。
9
+ 2. **保住 XML 标签、文档接口样式与语法完整**:修改原始 XML 或通过办公软件文档接口编辑时,保持 `<w:document>/<w:body>/<w:p>/<w:r>/<w:t>` 等标签配平,保留审阅修订、批注、段落样式与真实表格。默认保留原有的 `<w:t>` / `<a:t>` 分段边界,留意跨节点拆开的数字(如 `84.` 与 `6 万千瓦时`)和前面限定词;删掉虚高修饰词后检查主语和限定词是否通顺。
10
+ 3. **把弱标签改成结论标题(`slide-weak-topic-title`、`slide-process-not-finding-title`)**:把 `概述`、`工作背景` 改成一句带数据的结论(如 `西站 6 号闸机早高峰积压 18 分钟`)。
11
+ 4. **控住新建幻灯片密度且不重复数字(`slide-word-wall`、`slide-bullet-overload`、`slide-autofit-shrink`)**:起草单页控制在 120 字和 5–6 条要点以内,不用缩排硬塞,标题写过的数字不要在要点里反复重复;改旧稿时不要为了凑字数删掉原稿事实。
12
+ 5. **打破连续同构模板页(`pptx-layout-monotony`)**:不要连续 4 页全放纯文字要点,对比改表格、趋势改图表。
13
+
14
+ ## 三段对照
15
+
16
+ - **原稿**:``标题:工作背景 | 正文:很高兴协助,下方是方案。**问题**:西站 6 号闸机早高峰积压 18 分钟,急需全面赋能通行效率倍增。``
17
+ - **改过头**:``标题:重塑出行体验 | 正文:说明。这不是排队问题,而是通行效率的代际跃迁。``
18
+ - **改干净**:``标题:西站 6 号闸机早高峰积压 18 分钟``
19
+
20
+ ## 这些别删
21
+
22
+ - 原有的 Word 修订痕迹、批注、表格结构、文档接口样式与 `<w:t>` 节点分段。
23
+ - 正文小标题标签、数字、单位与边界限定词;只删旁边的空话与裸星号。
@@ -0,0 +1,24 @@
1
+ # Web UI, Components & Interface Copy
2
+
3
+ Scope: Web pages, CSS, HTML, JSX/TSX components, dashboards, and browser interface copy.
4
+ CLI pack: `dislop check <dir> --pack deck-and-ui --patterns`
5
+
6
+ ## Rules & Fixes
7
+
8
+ 1. **Zero dead controls (`ui-dead-control`, severity `error`)**: Never emit `<a href="#">`, empty `href=""`, or unexplained `<button disabled>`. Wire only real routes from the codebase or prompt; if an action is unbuilt, omit the control or explain why it is disabled with visible text linked via `aria-describedby`.
9
+ 2. **Skip stock AI chrome (`ui-ai-gradient`, `ui-pill-soup`, `ui-box-in-box`, `ui-prompt-echo-badge`)**: Avoid indigo-purple-pink neon gradients, `bg-clip-text text-transparent` hero titles, `> 6` `rounded-full` pills per view, triple nested bordered boxes, and `"AI-Powered"` or `"Zero Hallucination"` badges.
10
+ 3. **Skip secondary fallback templates (`ui-glassmorphism-overuse`, `ui-accent-stripe-card`)**: Do not replace neon gradients with stacked `backdrop-blur` translucent cards, thick `border-l-4` accent stripes, or warm-beige `#F7F5F0` 3-column icon boxes.
11
+ 4. **Use clean structural grammar**: Use `1px` rules, clear type scale, `tabular-nums` for aligned metrics, and restrained radii (`0–6px`). When revising existing UI, fix flagged issues in place without redesigning working layout or wrapping a snippet prompt in a full `<!DOCTYPE html>` shell unless asked.
12
+ 5. **Keep UI copy exact**: State only requested labels, counts, states, and existing routes without inventing headings or file names.
13
+ 6. **Respect non-UI graphic deliverables (posters, infographics, flowcharts, diagrams, comics)**: Standalone posters are not slide decks—never recommend moving text to speaker notes; open diagram connectors and feedback loops are structural graph edges, never treat them as nested `box-in-box` UI chrome or delete return arrows; keep explicit warm-paper or dark palettes when chosen intentionally.
14
+
15
+ ## Contrast
16
+
17
+ - **Original**: ``<div class="bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500"><span>AI-Powered</span><h2>4 cranes offline</h2><a href="#">Export Schedule</a></div>``
18
+ - **Overcorrected**: ``<div class="backdrop-blur-md bg-white/30 border-l-4 border-purple-500"><span class="rounded-full">Verified Live</span><a href="#">Export Schedule</a></div>``
19
+ - **Clean**: ``<section class="panel"><h2>4 cranes offline</h2></section>``
20
+
21
+ ## Keep These Intact
22
+
23
+ - Existing valid `href` / `src` targets, exact labels, counts, units, and accessibility attributes (`aria-describedby`, `title`, `alt`).
24
+ - Clean layout CSS rules and responsive breakpoints already present in existing UI.
@@ -0,0 +1,24 @@
1
+ # 网页界面、前端组件与界面文案
2
+
3
+ 适用范围:HTML、CSS、JSX/TSX 组件、状态看板与浏览器界面文案。
4
+ 检查命令:`dislop check <dir> --pack deck-and-ui --patterns`
5
+
6
+ ## 常见问题与改法
7
+
8
+ 1. **清零死控件(`ui-dead-control`,硬伤)**:禁止输出 `<a href="#">`、空链接或没有原因说明的 `<button disabled>`。链接只填需求或代码库里真实存在的路径;未实现的功能直接删掉按钮,或用可见说明文字配 `aria-describedby` 写清禁用原因。
9
+ 2. **去掉第一代默认 AI 模板(`ui-ai-gradient`、`ui-pill-soup`、`ui-box-in-box`、`ui-prompt-echo-badge`)**:不用蓝紫粉霓虹渐变、文字渐变标题、单屏超过 6 个圆角胶囊标签、三层套盒边框,以及 `AI 强力驱动`、`零幻觉保证` 徽章。
10
+ 3. **别退回第二代替代模板(`ui-glassmorphism-overuse`、`ui-accent-stripe-card`)**:不要把紫粉渐变换成满屏半透明毛玻璃卡片、粗左侧彩条 `border-l-4`,或暖米白三栏图标卡片。
11
+ 4. **用克制的版面结构呈现数据**:用 `1px` 细线、清晰字号层级与 `tabular-nums` 等宽数字对齐指标,保持按钮与面板克制圆角(`0–6px`)。要求输出片段时直接给组件片段,不要擅自套整页 `<!DOCTYPE html>` 壳;改旧页面时保留本来正常的布局,不无故重做。
12
+ 5. **界面文案直说数字和路径**:只写需求给出的文案标签、计数、状态与真实路径,不塞宣传口号,不自己编维护时间或导出文件名。
13
+ 6. **区分网页组件与海报/信息图/流程图/条漫**:单张海报或信息图不是演示文稿,不要建议“挪进演讲备注”;流程图里的开放连线和反馈回流箭头是结构关系,不要误判成多层套盒或建议删线;刻意设计的暖宣纸、暗底配色与漫画气泡予以保留。
14
+
15
+ ## 三段对照
16
+
17
+ - **原稿**:``<div class="bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500"><span>AI 强力驱动</span><h2>3 座东侧大棚待通风</h2><a href="#">下载日志</a></div>``
18
+ - **改过头**:``<div class="backdrop-blur-md bg-white/30 border-l-4 border-purple-500"><span class="rounded-full">实时可信</span><a href="#">下载日志</a></div>``
19
+ - **改干净**:``<section class="panel"><h2>3 座东侧大棚待通风</h2></section>``
20
+
21
+ ## 这些别删
22
+
23
+ - 原页面里真实可用的 `href` 路径、指定文案、指标数字与单位。
24
+ - 说明禁用原因的可见文字以及 `aria-describedby`、`title` 等可访问性属性。
@@ -0,0 +1,25 @@
1
+ # Work Docs, Technical Specs & Regulated Comms
2
+
3
+ Scope: READMEs, PRDs, RFCs, PR descriptions, postmortems, release notes, CLI help and error copy, emails, and regulated notices.
4
+ CLI pack: `dislop check <path> --pack business-brief` (or `engineering-spec` / `regulated-comms`).
5
+
6
+ ## Rules & Fixes
7
+
8
+ 1. **Strip chat wrappers & placeholders (`chatbot-artifact`, `unfilled-placeholder`)**: Delete opening conversational scaffolding and `[TBD]` markers; start directly on the ticket, release, or decision.
9
+ 2. **Cut macro preambles & future-gazing (`narrative-sandwich-frame`)**: Drop trend openings (`"In an era defined by..."`) and vague outlooks (`"Looking ahead..."`).
10
+ 3. **Break low-fact buzzword clusters (`cooccurrence-slop-cluster`)**: Replace stacked filler verbs (`leverage`, `streamline`, `robust`, `foster`) with the exact mechanism stated in the notes.
11
+ 4. **Keep PRs, CLI copy & postmortems factual (`eng-pr-diff-parrot`, `eng-shallow-root-cause`, `eng-vague-action-item`)**: Copy owners, flags, thresholds, and due dates verbatim; list missing ones as open questions. State the missing check or recovery step directly instead of writing `"Not just X — it's Y"`.
12
+ 5. **Cut absolute claims & unanchored multipliers (`reg-unsubstantiated-superlative`, `reg-unanchored-multiplier`)**: Delete unproven absolutes (`"always guaranteed"`, `"never fails"`) and bare multipliers (`"5x speed gain"`); cite a standard or baseline only when present in the source, and keep hedging words like `projected` intact.
13
+ 6. **No invented attribution or bold list walls (`unsourced-attribution`, `bold-lead-list-wall`)**: Drop filler such as `"Studies show"`, keep source evidence labels (`benchmarked`, `measured`) without upgrading them, and turn stacked `- **Label**: text` lists into plain prose.
14
+ 7. **Honest edits only**: Remove real filler while keeping every distinct point and mechanism intact; never compress multi-paragraph prose into a stub or add fake typos.
15
+
16
+ ## Contrast
17
+
18
+ - **Original**: ``Good afternoon! Attached is a summary of our harbor dredge pump ticket: the PR leverages robust filter-screen inspection to run 5x faster with fail-safe uptime every 72 hours.``
19
+ - **Overcorrected**: ``Not a filter tweak — a harbor reliability leap. Steadier. Cleaner. Ready for work.``
20
+ - **Clean**: ``The harbor dredge pump ticket uses filter-screen inspection every 72 hours.``
21
+
22
+ ## Keep These Intact
23
+
24
+ - Standard `Keep a Changelog` headings (`Added`, `Changed`, `Fixed`), PR checklists, legal `shall`/`must` clauses, and domain terms (`leverage` in finance, `robust` in statistics).
25
+ - Quoted speech, code identifiers, URLs, bounds, relative dates (`yesterday`), and `from X to Y` direction.
@@ -0,0 +1,24 @@
1
+ # 工作简报、研发复盘与对外通告
2
+
3
+ 适用范围:工作简报、技术方案与故障复盘、发版说明、CLI 帮助与报错文案、邮件及对外通告。
4
+ 检查命令:`dislop check <path> --pack business-brief`(研发场景用 `engineering-spec`,合规通告用 `regulated-comms`)。
5
+
6
+ ## 常见问题与改法
7
+
8
+ 1. **清掉寒暄壳与占位符(`chatbot-artifact`、`unfilled-placeholder`)**:删掉 `你好,下面为你附上……` 和 `[待填写]` 标记,第一句落到具体模块、单号或数字。
9
+ 2. **删掉宏大三明治与口号结尾(`narrative-sandwich-frame`)**:删去 `随着……的不断深入`、`展望未来……`、`这标志着……`。
10
+ 3. **拆散公文黑话与四字排比(`zh-bureaucratic-padding`、`zh-four-char-triad`、`cooccurrence-slop-cluster`)**:把 `重要抓手`、`全面赋能`、`精准高效、安全可靠、灵活易用`、`有效推动、持续优化、显著提升` 换成笔记里的真实动作。
11
+ 4. **改实研发复盘、CLI 文案与改进项(`eng-pr-diff-parrot`、`eng-shallow-root-cause`、`eng-vague-action-item`)**:笔记给了负责人、命令参数、阈值和日期就照抄;没给就单独列为待确认问题。直接写缺了哪道校验或具体排查步骤,不要写 `并非单纯人为失误,而是……` 这种转折句。
12
+ 5. **删掉绝对承诺与悬空倍数(`reg-unsubstantiated-superlative`、`reg-unanchored-multiplier`)**:删掉 `绝对安全`、`永不宕机`、`倍速跃升`;原文给了加密协议、合同可用性、预计目标或前后基线才保留。
13
+ 6. **保留原始出处标签,别堆加粗列表,别缩成残句(`unsourced-attribution`、`bold-lead-list-wall`)**:只删模型自己加的 `业内普遍认为` 等空壳背书;笔记里原有 `实测结果` 时直接写结论(如 `升级后……`),不添 `上线后实测`,也别把短列表全堆成 `- **标签**:内容`;删掉空话时保留原句每个独立动作与数字,别硬压缩成一句话。
14
+
15
+ ## 三段对照
16
+
17
+ - **原句**:``你好,下面为你附上变电站巡检脚本说明:本次着力强化定期校时机制,全方位助推无人值守站稳定运行,同步精度提升数倍且零故障。``
18
+ - **改过头**:``这不是一次脚本微调,而是电网巡检的跃迁。更稳;更快;更省心。``
19
+ - **改干净**:``本次调整了无人值守变电站巡检脚本的定期校时规则。``
20
+
21
+ ## 这些别删
22
+
23
+ - 原文在业务影响陈述或行业语境里自然使用的实义动词、人物原话引用、日志固定标题、行内代码与链接。
24
+ - 笔记给出的数字、单位、边界词、相对日期(如 `昨晚`)与变化方向;没提到的原因、归属范围和完成状态一律不补写。