dislop 0.7.0 → 0.8.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 (46) 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/patterns/README.md +0 -39
  43. package/skills/dislop/references/business-and-rfc.md +0 -26
  44. package/skills/dislop/references/editorial-and-essay.md +0 -20
  45. package/skills/dislop/references/regulated-and-precision.md +0 -27
  46. package/skills/dislop/references/web-ui-and-deck.md +0 -26
@@ -1,39 +0,0 @@
1
- # AI-Slop Pattern Library (`patterns/`)
2
-
3
- `patterns/` stores `dislop`'s versioned catalog of observable AI-writing, cadence, discourse, Web UI, and slide deck patterns as plain JSON assets.
4
-
5
- ## Directory Layout
6
-
7
- - `patterns/taxonomy.json`: canonical 6 dimensions (`artifacts`, `lexical`, `syntactic`, `rhythm`, `discourse`, `visual-and-deck`), 7 detection angles, and 3 evidence levels.
8
- - `patterns/dimensions/*.json`: 53 cataloged patterns linking all 42 active rules in `packs/*/pack.json` plus 11 extended pattern-bank rules in `patterns/banks/*.json`. Every entry records its mechanism, tags, false-positive guards, model tendencies, and a `bad -> trap -> good` example.
9
- - `patterns/banks/*.json`: declarative signal lists and calibrated thresholds executed directly by `src/pattern-engine.mjs` (Node/Browser) and `src/dislop/pattern_engine.py` (Python) with 100% parity:
10
- - `discourse-rhythm.json`: repetitive sentence openers, inline bold saturation, paragraph-length uniformity, and mechanical discourse signposts.
11
- - `lexical-signals.json`: weighted translation-calque clusters and empirically over-represented phrase clusters.
12
- - `syntactic-frames.json`: balanced concession frames and pull-quote closers (with quotation guard).
13
- - `visual-deck.json`: Web UI glassmorphism overuse and thick left accent-stripe card stacks (`>= 4px`).
14
- - `composite-fusion.json`: cross-dimension stealth-slop co-occurrence rules damped by concrete fact density (numbers with units, timestamps, code spans, filenames).
15
-
16
- ## Common Commands
17
-
18
- ```bash
19
- # Search the catalog across packs/ and patterns/
20
- node bin/dislop.mjs catalog --dimension rhythm --lang en
21
- PYTHONPATH=src python3 -m dislop.cli catalog --query "slogan" --json
22
-
23
- # Run the multi-angle Pattern Library scanner on a file or stdin
24
- node bin/dislop.mjs patterns README.md --lang en
25
- node bin/dislop.mjs check README.md --patterns --lang en
26
- printf "Furthermore, this initiative plays a pivotal role in delivering transformative value across teams." | node bin/dislop.mjs patterns - --stdin-filename draft.md --json
27
-
28
- # Validate asset schemas, run multi-angle ablation, and enforce benchmark gates
29
- node scripts/pattern_lab.mjs verify
30
- node scripts/pattern_lab.mjs ablation
31
- node scripts/pattern_lab.mjs assert
32
- ```
33
-
34
- ## Adding a New Pattern
35
-
36
- 1. Add the pattern entry to the matching file under `patterns/dimensions/` with bilingual `name`, `mechanism`, `tags`, `falsePositiveGuards`, and an original `exemplar`.
37
- 2. Add any new lexical signals, regex frames, or thresholds to `patterns/banks/*.json` so both JS and Python engines pick them up automatically.
38
- 3. Add at least one positive sample and one adversarial clean near-miss sample to `benchmarks/datasets/pattern-challenge-v2.json` or `benchmarks/datasets/holdout-v2.json`.
39
- 4. Run `node scripts/pattern_lab.mjs verify`, `node scripts/pattern_lab.mjs assert`, and `PYTHONPATH=src python3 -m unittest tests/test_pattern_library.py`.
@@ -1,26 +0,0 @@
1
- # Business Briefs, Technical Specs, RFCs & Postmortems
2
-
3
- Local progressive-disclosure reference bundled with `skills/dislop/` (0 network calls required).
4
-
5
- ## Recommended Built-in Packs
6
-
7
- - General proposals, memos, PRDs, and release notes: `--pack business-brief`
8
- - Engineering RFCs, pull-request descriptions, and incident postmortems: `--pack engineering-spec`
9
-
10
- ```bash
11
- dislop check <path> --pack engineering-spec --profile --format json
12
- ```
13
-
14
- ## Five High-Frequency Failure Modes to Eliminate
15
-
16
- 1. **Macro-trend preamble and future-gazing closer**: Cut openers like `"In an era defined by..."` and closers like `"Looking ahead..."`. Open on the ticket, metric, component, or customer decision.
17
- 2. **Subtle corporate verb clusters in low-fact paragraphs**: Words like `streamline`, `leverage`, or `robust` pass once in concrete prose, yet piling two or more into a paragraph with zero numbers or file paths signals padding (`cooccurrence-slop-cluster`).
18
- 3. **PR diff-parroting (`eng-pr-diff-parrot`)**: Never open a PR or changelog entry with `"This PR updates X to ensure a more seamless and maintainable experience"`. State what failed, which invariant changed, and how it was tested.
19
- 4. **Stop-thinking root causes (`eng-shallow-root-cause`)**: Never end an incident analysis at `"Root cause: human error"`. Name the missing automated check, schema validator, or canary rollback threshold that let a manual step cause impact.
20
- 5. **Wishful action items (`eng-vague-action-item`)**: Replace `"Add more monitoring"` with a binary-verifiable item naming the service, alert threshold, owner, and due date.
21
-
22
- ## Before / Trap / Clean Pattern
23
-
24
- - **Raw AI**: ``Certainly! This PR refactors connection pooling to ensure a seamless, robust experience.``
25
- - **2nd-order trap**: ``This isn't a routine refactor — it's a resilience milestone for connection management.``
26
- - **Clean**: ``Fixes #412: release stale Redis sockets on timeout so idle pool count stays <= 64 under 2h load test.``
@@ -1,20 +0,0 @@
1
- # Long-Form Essays, Columns & Narrative Non-Fiction
2
-
3
- Local progressive-disclosure reference bundled with `skills/dislop/` (0 network calls required).
4
-
5
- ## Recommended Built-in Pack
6
-
7
- - Essays, narrative reporting, interviews, and opinion columns: `--pack literary-essay`
8
-
9
- ```bash
10
- dislop check <essay.md> --pack literary-essay --profile
11
- dislop voice <past-essay-1.md> <past-essay-2.md> -o .dislop.local/voice.json
12
- ```
13
-
14
- ## Cadence & Structural Guardrails
15
-
16
- 1. **Break metronome sentence lengths (`low-burstiness-vapor`)**: Autoregressive smoothing produces 5+ consecutive medium-length sentences (`CV < 0.24`) with zero concrete nouns. Mix short declarative turns (5–8 words) with fuller explanatory clauses grounded in time, place, and physical objects.
17
- 2. **Cut staged self-Q&A and semicolon tricolons**: Skip `"Why does this matter? Because..."`, `"The result?"`, and 3-part balanced semicolon sentences (`clause A; clause B; clause C`).
18
- 3. **Avoid 5-comma run-on chains (`comma-chain-runon`)**: Split sprawling comma-spliced sentences into 2–3 distinct thoughts with clear causal verbs.
19
- 4. **End on the last concrete scene (`en-essay-moralizing-ending`)**: Delete closing paragraphs that zoom out into universal life lessons (`"Ultimately, this reminds us..."`, `"In the end, what truly matters..."`). Stop on the final observation, quote, or action.
20
- 5. **Preserve the author's statistical voice (`dislop.voice/1`)**: Run `dislop voice` on 3–5 clean past pieces to measure natural sentence-length range and em-dash frequency instead of prompting with vague adjectives like `"write punchily"`.
@@ -1,27 +0,0 @@
1
- # Regulated External Comms & Rewrite Precision
2
-
3
- Local progressive-disclosure reference bundled with `skills/dislop/` (0 network calls required).
4
-
5
- ## Recommended Built-in Pack
6
-
7
- - Customer announcements, security or SLA briefs, investor updates, and regulated external copy: `--pack regulated-comms`
8
-
9
- ```bash
10
- dislop check <draft.md> --pack regulated-comms --fail-on warning
11
- ```
12
-
13
- ## Regulated & External Copy Traps
14
-
15
- 1. **No absolute compliance promises (`reg-unsubstantiated-superlative`)**: Replace `"100% secure"`, `"zero-risk migration"`, or `"industry-leading guarantee"` with specific encryption standards, audit scope, and contracted SLA percentages (`99.95% monthly uptime`).
16
- 2. **No unanchored multipliers (`reg-unanchored-multiplier`)**: Never write `"10x faster"` or `"orders of magnitude better"` without stating the exact before and after baseline in the same sentence (`"cuts 40M-row queries from 19s to 1.9s"`).
17
-
18
- ## Precision Discipline During Manual & Automated Rewrites
19
-
20
- When trimming AI clichés from technical or regulated drafts, keep four token classes untouched:
21
-
22
- 1. **Bounding qualifiers attached to numbers**: Keep `"up to 12 minutes"`, `"at least 99.95%"`, `"no more than 5%"`, and `"as of Q4"` intact. Dropping `"up to"` turns an upper bound into a false point guarantee.
23
- 2. **Exact numbers, units, versions, and percentiles**: Never replace `1,200 -> 4,800 TPS` or `P99 42ms` with vague words like `"massive speedup"`, and never invent numbers absent from the source.
24
- 3. **Inline code identifiers and file paths**: Preserve config keys, CLI flags, issue numbers, and file paths verbatim.
25
- 4. **URLs and citations**: Keep real links and `[n]` or `(Author, Year)` citations attached to their claims (`unsourced-attribution`).
26
-
27
- Automated rewrites via `dislop deslop --local` or hosted cloud `dislop_deslop` run an internal numeric and qualifier retention guard automatically and revert any paragraph that alters protected figures.
@@ -1,26 +0,0 @@
1
- # Web UI, Front-End Components & Executive Slide Decks
2
-
3
- Local progressive-disclosure reference bundled with `skills/dislop/` (0 network calls required).
4
-
5
- ## Recommended Built-in Packs
6
-
7
- - Web pages, CSS, JSX/TSX components, and general slides: `--pack deck-and-ui`
8
- - Board readouts, consulting decks, and strategy `.pptx` files: `--pack executive-deck`
9
-
10
- ```bash
11
- dislop check <deck.pptx-or-dir> --pack executive-deck --fail-on warning
12
- ```
13
-
14
- ## Web UI Anti-Slop Rules
15
-
16
- 1. **Zero dead controls (`ui-dead-control`, severity `error`)**: Never ship `<a href="#">`, empty `href=""`, or unexplained `<button disabled>`. Wire real routes, add `title` or `aria-describedby` explaining why a control is disabled, or remove unbuilt mockup buttons.
17
- 2. **Skip both generations of default AI templates**:
18
- - Generation 1: indigo-purple-pink neon gradients (`ui-ai-gradient`), `bg-clip-text text-transparent` hero titles, `> 6` `rounded-full` pill badges per view (`ui-pill-soup`), triple nested bordered boxes (`ui-box-in-box`), and `"AI-Powered"` or `"Zero Hallucination"` eyebrow badges (`ui-prompt-echo-badge`).
19
- - Generation 2: generic warm-beige `#F7F5F0` cards with identical 3-column icon boxes.
20
- 3. **Positive layout grammar**: Favor explicit structural `1px` rules or clear typographic hierarchy, `tabular-nums` on aligned metrics, monotonic dark-mode surface lightness (`stage < sheet < raised`), and system or deliberate editorial type stacks.
21
-
22
- ## Slide Deck & `.pptx` Rules
23
-
24
- 1. **Conclusion-first headlines (`slide-weak-topic-title`, `slide-process-not-finding-title`)**: Replace `"Overview"`, `"Analysis of Q3 Churn"`, or `"Review of Deployment Pipeline"` with the one-sentence takeaway and measured delta (`"Simplified KYC Cut Week-1 Drop-off from 34% to 19%"`).
25
- 2. **Readable slide density**: Keep each visible slide `<= 120` words, `<= 5–6` bullets, and `100%` text scale (`normAutofit >= 80%`).
26
- 3. **Break cross-slide layout monotony (`pptx-layout-monotony`)**: Do not repeat identical plain-bullet skeletons across 4+ consecutive slides; convert comparisons into tables and trends into charts.