ai-text-check 1.0.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 (150) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +36 -0
  3. package/README.md +174 -0
  4. package/SOURCES.md +34 -0
  5. package/dist/cli.js +13834 -0
  6. package/dist/index.cjs +13366 -0
  7. package/dist/index.d.cts +36 -0
  8. package/dist/index.d.ts +36 -0
  9. package/dist/index.js +13351 -0
  10. package/dist/node.cjs +13581 -0
  11. package/dist/node.d.cts +41 -0
  12. package/dist/node.d.ts +41 -0
  13. package/dist/node.js +13564 -0
  14. package/dist/types-BlvvRFG5.d.cts +153 -0
  15. package/dist/types-BlvvRFG5.d.ts +153 -0
  16. package/package.json +115 -0
  17. package/slop-gate.config.json +3 -0
  18. package/vale/styles/AiTextCheck/DiveDeep.yml +5 -0
  19. package/vale/styles/AiTextCheck/Furthermore.yml +5 -0
  20. package/vale/styles/AiTextCheck/ImportantToNote.yml +5 -0
  21. package/vale/styles/AiTextCheck/InTodaysWorld.yml +5 -0
  22. package/vale/styles/AiTextCheck/LeverageUtilize.yml +5 -0
  23. package/vale/styles/AiTextCheck/meta.json +3 -0
  24. package/vale/styles/Google/AMPM.yml +9 -0
  25. package/vale/styles/Google/Acronyms.yml +64 -0
  26. package/vale/styles/Google/Colons.yml +8 -0
  27. package/vale/styles/Google/Contractions.yml +30 -0
  28. package/vale/styles/Google/DateFormat.yml +9 -0
  29. package/vale/styles/Google/Ellipses.yml +9 -0
  30. package/vale/styles/Google/EmDash.yml +12 -0
  31. package/vale/styles/Google/Exclamation.yml +12 -0
  32. package/vale/styles/Google/FirstPerson.yml +13 -0
  33. package/vale/styles/Google/Gender.yml +9 -0
  34. package/vale/styles/Google/GenderBias.yml +43 -0
  35. package/vale/styles/Google/HeadingPunctuation.yml +13 -0
  36. package/vale/styles/Google/Headings.yml +29 -0
  37. package/vale/styles/Google/LICENSE +21 -0
  38. package/vale/styles/Google/Latin.yml +11 -0
  39. package/vale/styles/Google/LyHyphens.yml +14 -0
  40. package/vale/styles/Google/OptionalPlurals.yml +12 -0
  41. package/vale/styles/Google/Ordinal.yml +7 -0
  42. package/vale/styles/Google/OxfordComma.yml +7 -0
  43. package/vale/styles/Google/Parens.yml +7 -0
  44. package/vale/styles/Google/Passive.yml +184 -0
  45. package/vale/styles/Google/Periods.yml +7 -0
  46. package/vale/styles/Google/Quotes.yml +7 -0
  47. package/vale/styles/Google/Ranges.yml +7 -0
  48. package/vale/styles/Google/Semicolons.yml +8 -0
  49. package/vale/styles/Google/Slang.yml +11 -0
  50. package/vale/styles/Google/Spacing.yml +10 -0
  51. package/vale/styles/Google/Spelling.yml +10 -0
  52. package/vale/styles/Google/Units.yml +8 -0
  53. package/vale/styles/Google/We.yml +11 -0
  54. package/vale/styles/Google/Will.yml +7 -0
  55. package/vale/styles/Google/WordList.yml +80 -0
  56. package/vale/styles/Google/meta.json +4 -0
  57. package/vale/styles/Google/vocab.txt +0 -0
  58. package/vale/styles/ai-tells/AIAdjectiveNounPairs.yml +8 -0
  59. package/vale/styles/ai-tells/AICompoundPhrases.yml +139 -0
  60. package/vale/styles/ai-tells/AbsoluteAssertions.yml +21 -0
  61. package/vale/styles/ai-tells/AffirmativeFormulas.yml +101 -0
  62. package/vale/styles/ai-tells/AnnouncementHeadings.yml +16 -0
  63. package/vale/styles/ai-tells/AnthropomorphicJustification.yml +115 -0
  64. package/vale/styles/ai-tells/ClosingPleasantries.yml +120 -0
  65. package/vale/styles/ai-tells/ColloquialAssessments.yml +47 -0
  66. package/vale/styles/ai-tells/ColonUsage.yml +18 -0
  67. package/vale/styles/ai-tells/ConclusionMarkers.yml +23 -0
  68. package/vale/styles/ai-tells/ContrastiveFormulas.yml +188 -0
  69. package/vale/styles/ai-tells/ContrastiveNegation.yml +22 -0
  70. package/vale/styles/ai-tells/DefensiveHedges.yml +63 -0
  71. package/vale/styles/ai-tells/DespiteChallenges.yml +32 -0
  72. package/vale/styles/ai-tells/EmDashUsage.yml +9 -0
  73. package/vale/styles/ai-tells/EmphaticCopula.yml +30 -0
  74. package/vale/styles/ai-tells/EmptyPadding.yml +10 -0
  75. package/vale/styles/ai-tells/EmptyPaddingStacked.yml +11 -0
  76. package/vale/styles/ai-tells/ExplainerHeadings.yml +20 -0
  77. package/vale/styles/ai-tells/FalseBalance.yml +31 -0
  78. package/vale/styles/ai-tells/FalseExclusivity.yml +41 -0
  79. package/vale/styles/ai-tells/FigurativeLands.yml +79 -0
  80. package/vale/styles/ai-tells/FillerPhrases.yml +78 -0
  81. package/vale/styles/ai-tells/FormalRegister.yml +58 -0
  82. package/vale/styles/ai-tells/FormalTransitions.yml +74 -0
  83. package/vale/styles/ai-tells/GrowthMetaphors.yml +28 -0
  84. package/vale/styles/ai-tells/HedgingPhrases.yml +85 -0
  85. package/vale/styles/ai-tells/LICENSE +21 -0
  86. package/vale/styles/ai-tells/ListIntroductions.yml +22 -0
  87. package/vale/styles/ai-tells/MarketingHeadings.yml +19 -0
  88. package/vale/styles/ai-tells/Metacommentary.yml +113 -0
  89. package/vale/styles/ai-tells/MicDrop.yml +205 -0
  90. package/vale/styles/ai-tells/MicDropHeadings.yml +20 -0
  91. package/vale/styles/ai-tells/NarrativePivots.yml +59 -0
  92. package/vale/styles/ai-tells/OpeningCliches.yml +98 -0
  93. package/vale/styles/ai-tells/OrganicConsequence.yml +38 -0
  94. package/vale/styles/ai-tells/OverusedVocabulary.yml +185 -0
  95. package/vale/styles/ai-tells/OverusedVocabularyVerbs.yml +7 -0
  96. package/vale/styles/ai-tells/ParallelStaccato.yml +34 -0
  97. package/vale/styles/ai-tells/ParticipialPadding.yml +74 -0
  98. package/vale/styles/ai-tells/PromotionalPuffery.yml +63 -0
  99. package/vale/styles/ai-tells/RedundantPrecaution.yml +8 -0
  100. package/vale/styles/ai-tells/ResonateOveruse.yml +13 -0
  101. package/vale/styles/ai-tells/RestatementMarkers.yml +36 -0
  102. package/vale/styles/ai-tells/RhetoricalDevices.yml +53 -0
  103. package/vale/styles/ai-tells/RhetoricalSelfAnswer.yml +51 -0
  104. package/vale/styles/ai-tells/SelfReference.yml +52 -0
  105. package/vale/styles/ai-tells/SemicolonUsage.yml +31 -0
  106. package/vale/styles/ai-tells/SequencingMarkers.yml +41 -0
  107. package/vale/styles/ai-tells/ServesAsDodge.yml +66 -0
  108. package/vale/styles/ai-tells/ShipOveruse.yml +16 -0
  109. package/vale/styles/ai-tells/StackedAnaphora.yml +185 -0
  110. package/vale/styles/ai-tells/StrategyBuzzwords.yml +32 -0
  111. package/vale/styles/ai-tells/StructureAnnouncements.yml +22 -0
  112. package/vale/styles/ai-tells/SycophancyMarkers.yml +26 -0
  113. package/vale/styles/ai-tells/UnpackExplore.yml +21 -0
  114. package/vale/styles/ai-tells/UrgencyInflation.yml +70 -0
  115. package/vale/styles/ai-tells/VagueAttributions.yml +67 -0
  116. package/vale/styles/ai-tells/VerbTricolon.yml +78 -0
  117. package/vale/styles/ai-tells/VerbTricolonDensity.yml +7 -0
  118. package/vale/styles/ai-tells/WrapUpHeadings.yml +22 -0
  119. package/vale/styles/signs-of-ai-writing/AspectOveruse.yml +13 -0
  120. package/vale/styles/signs-of-ai-writing/ChatGPTArtifacts.yml +12 -0
  121. package/vale/styles/signs-of-ai-writing/ChatbotCommunication.yml +21 -0
  122. package/vale/styles/signs-of-ai-writing/CitationArtifacts.yml +10 -0
  123. package/vale/styles/signs-of-ai-writing/ColonOveruse.yml +11 -0
  124. package/vale/styles/signs-of-ai-writing/Enumeration.yml +11 -0
  125. package/vale/styles/signs-of-ai-writing/Hedging.yml +6 -0
  126. package/vale/styles/signs-of-ai-writing/Intensifiers.yml +17 -0
  127. package/vale/styles/signs-of-ai-writing/KnowledgeCutoff.yml +14 -0
  128. package/vale/styles/signs-of-ai-writing/LICENSE +12 -0
  129. package/vale/styles/signs-of-ai-writing/Lists.yml +8 -0
  130. package/vale/styles/signs-of-ai-writing/Narrative.yml +15 -0
  131. package/vale/styles/signs-of-ai-writing/Passive.yml +16 -0
  132. package/vale/styles/signs-of-ai-writing/Placeholders.yml +17 -0
  133. package/vale/styles/signs-of-ai-writing/ScareQuotes.yml +6 -0
  134. package/vale/styles/signs-of-ai-writing/Symbolism.yml +23 -0
  135. package/vale/styles/signs-of-ai-writing/Transitions.yml +17 -0
  136. package/vale/styles/signs-of-ai-writing/UTMParameters.yml +10 -0
  137. package/vale/styles/signs-of-ai-writing/Vocabulary.yml +27 -0
  138. package/vale/styles/signs-of-ai-writing/meta.json +4 -0
  139. package/vale/styles/write-good/Cliches.yml +702 -0
  140. package/vale/styles/write-good/E-Prime.yml +32 -0
  141. package/vale/styles/write-good/Illusions.yml +11 -0
  142. package/vale/styles/write-good/LICENSE +21 -0
  143. package/vale/styles/write-good/Passive.yml +183 -0
  144. package/vale/styles/write-good/README.md +27 -0
  145. package/vale/styles/write-good/So.yml +5 -0
  146. package/vale/styles/write-good/ThereIs.yml +6 -0
  147. package/vale/styles/write-good/TooWordy.yml +221 -0
  148. package/vale/styles/write-good/Weasel.yml +29 -0
  149. package/vale/styles/write-good/meta.json +4 -0
  150. package/vale/vale.ini +38 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pritam Ghosh <contact.meghoshpritam@gmail.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/NOTICE ADDED
@@ -0,0 +1,36 @@
1
+ ai-text-check
2
+ Copyright (c) 2026 Pritam Ghosh <contact.meghoshpritam@gmail.com>
3
+
4
+ This product is licensed under the MIT License. See LICENSE.
5
+
6
+ The following third-party Vale styles are vendored under vale/styles/ and
7
+ keep their upstream licenses. Copies of those licenses sit next to each style.
8
+
9
+ Google
10
+ License: MIT
11
+ Copyright (c) 2018-2019 Joseph Kato
12
+ https://github.com/errata-ai/Google
13
+
14
+ write-good
15
+ License: MIT
16
+ Copyright (c) 2019 errata.ai
17
+ Based on write-good by Brian Ford (Copyright (c) 2014 Brian Ford)
18
+ https://github.com/errata-ai/write-good
19
+
20
+ ai-tells
21
+ License: MIT
22
+ Copyright (c) 2025-2026 Tony Burns
23
+ https://github.com/tbhb/vale-ai-tells
24
+
25
+ signs-of-ai-writing
26
+ License: Creative Commons Attribution-ShareAlike 4.0 International
27
+ https://github.com/ammil-industries/vale-signs-of-ai-writing
28
+ Derived from Wikipedia, "Signs of AI writing"
29
+ https://creativecommons.org/licenses/by-sa/4.0/
30
+
31
+ AiTextCheck
32
+ License: MIT
33
+ Copyright (c) 2026 Pritam Ghosh
34
+ Custom Vale rules extracted from mepritam-revamp-26
35
+
36
+ Runtime npm dependencies retain their own licenses.
package/README.md ADDED
@@ -0,0 +1,174 @@
1
+ # ai-text-check
2
+
3
+ One-point checker for AI writing tells, grammar, and synthetic typography in any JavaScript or TypeScript project.
4
+
5
+ It runs the mepritam.dev content-quality stack together with Vale, slop-gate, write-good, retext, is-this-ai-slop, Veldica, and clean-writing-lint, then returns a single scored report. See [SOURCES.md](./SOURCES.md) for the file-by-file map.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -D ai-text-check
11
+ ```
12
+
13
+ Node.js 20+ is required. The package ships dual **ESM and CommonJS** builds with TypeScript types. Vale and slop-gate are regular dependencies, not optional peers.
14
+
15
+ ## What it checks
16
+
17
+ | Engine | What it catches |
18
+ | ------------------- | ---------------------------------------------------------------------------------------------------------- |
19
+ | **polish** | Custom AI tells (`delve`, `in today's world`, antithesis), readability, markdown structure/SEO, typography |
20
+ | **slop-gate** | Vocabulary pack (`nestled`, `treasure trove`, `leverage`, …) |
21
+ | **write-good** | Weasel words, clichés, wordy phrases, passive voice |
22
+ | **retext** | Passive voice, readability grade, simplify, repeated words |
23
+ | **is-this-ai-slop** | Clichés, buzzwords, em-dash spam, antithesis, sycophancy |
24
+ | **veldica** | Stock LLM transitions and AI-style markers |
25
+ | **clean-writing** | Banned constructions, marketing adjectives, filler, intensifiers |
26
+ | **vale** | Vendored styles: write-good, Google, AiTextCheck, ai-tells, signs-of-ai-writing |
27
+
28
+ Safe auto-fixes can strip filler openers and collapse extra whitespace without rewriting code fences.
29
+
30
+ ## TypeScript
31
+
32
+ ```ts
33
+ import { checkText, defineConfig, personalizeText } from "ai-text-check";
34
+
35
+ const config = defineConfig({
36
+ preset: "default",
37
+ failOn: "warn",
38
+ ignoreRules: ["leverage-utilize"],
39
+ engines: { vale: true },
40
+ });
41
+
42
+ const report = checkText(draft, {
43
+ format: "markdown",
44
+ applyFixes: true,
45
+ config,
46
+ });
47
+
48
+ if (report.score < 70) {
49
+ console.error(report.issues);
50
+ }
51
+ ```
52
+
53
+ ## JavaScript (CJS or ESM)
54
+
55
+ ```js
56
+ const { checkText, sanitizeText } = require("ai-text-check");
57
+
58
+ const report = checkText("In today's fast-paced world, we leverage synergy.");
59
+ console.log(report.score, report.issues, report.enginesRun);
60
+
61
+ const cleaned = sanitizeText("Wait—what? “Hello” …");
62
+ ```
63
+
64
+ ```js
65
+ import { checkText } from "ai-text-check";
66
+ ```
67
+
68
+ ## Node file API
69
+
70
+ ```ts
71
+ import { checkFile, checkFiles, loadConfig } from "ai-text-check/node";
72
+
73
+ const config = await loadConfig();
74
+ const summary = checkFiles(["content", "README.md"], {
75
+ config,
76
+ writeFixes: true,
77
+ });
78
+
79
+ if (summary.failed) process.exit(1);
80
+ ```
81
+
82
+ `loadConfig()` reads, in order:
83
+
84
+ 1. `ai-text-check.config.json` / `.js` / `.mjs` / `.cjs`
85
+ 2. `package.json` → `"ai-text-check"`
86
+
87
+ Unknown keys and invalid types fail with a validation error. Vale findings are merged into the same `issues` array (use `--no-vale` or `engines.vale: false` to skip).
88
+
89
+ ## CLI
90
+
91
+ ```bash
92
+ npx ai-text-check
93
+ npx ai-text-check content README.md
94
+ npx ai-text-check --fix --min-score 70 docs
95
+ npx ai-text-check --preset ai --json
96
+ npx ai-text-check --sanitize
97
+ npx ai-text-check --no-vale
98
+ npx ai-text-check init
99
+ ```
100
+
101
+ | Flag | Meaning |
102
+ | --------------------------------------- | ---------------------------------- |
103
+ | `--fix` | Apply safe automatic fixes |
104
+ | `--sanitize` | Normalize AI typography on disk |
105
+ | `--json` | Machine-readable report |
106
+ | `--fail-on error\|warn\|info` | CI threshold (default `warn`) |
107
+ | `--min-score N` | Fail if any file scores below N |
108
+ | `--preset default\|strict\|ai\|grammar` | Rule pack |
109
+ | `--format auto\|plain\|markdown` | Input format |
110
+ | `--no-vale` | Skip Vale |
111
+ | `--no-slop` | Skip slop-gate and is-this-ai-slop |
112
+ | `--no-write-good` | Skip write-good |
113
+ | `--no-retext` | Skip retext |
114
+ | `--ignore-rule ID` | Skip a rule (repeatable) |
115
+
116
+ Exit code `1` when issues meet the fail threshold.
117
+
118
+ ## Config
119
+
120
+ `ai-text-check.config.json`:
121
+
122
+ ```json
123
+ {
124
+ "preset": "default",
125
+ "failOn": "warn",
126
+ "minScore": 0,
127
+ "extensions": [".md", ".mdx", ".markdown", ".txt"],
128
+ "ignoreRules": [],
129
+ "checks": {
130
+ "ai": true,
131
+ "grammar": true,
132
+ "readability": true,
133
+ "structure": true,
134
+ "seo": true,
135
+ "typography": true
136
+ },
137
+ "engines": {
138
+ "polish": true,
139
+ "slopGate": true,
140
+ "writeGood": true,
141
+ "retext": true,
142
+ "isThisAiSlop": true,
143
+ "veldica": true,
144
+ "cleanWriting": true,
145
+ "vale": true
146
+ }
147
+ }
148
+ ```
149
+
150
+ Presets:
151
+
152
+ - `default`: every check and every engine
153
+ - `strict`: default plus extra slop-gate punctuation
154
+ - `ai`: AI tells + typography (polish, slop-gate, is-this-ai-slop, Veldica, clean-writing, Vale)
155
+ - `grammar`: grammar + readability (write-good, retext, clean-writing, Vale)
156
+
157
+ ## Scripts
158
+
159
+ ```bash
160
+ npm run test
161
+ npm run lint
162
+ npm run typecheck
163
+ npm run format:check
164
+ npm run check
165
+ npm run build
166
+ ```
167
+
168
+ ## License
169
+
170
+ [MIT](./LICENSE) © 2026 Pritam Ghosh.
171
+
172
+ The checker itself, including the custom `AiTextCheck` Vale rules, is MIT. Vendored Vale styles keep their upstream licenses; see [NOTICE](./NOTICE).
173
+
174
+ `vale/styles/signs-of-ai-writing` is [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/).
package/SOURCES.md ADDED
@@ -0,0 +1,34 @@
1
+ # Rule sources
2
+
3
+ The default checker combines the mepritam.dev content-quality stack with extra
4
+ local, deterministic packages. Nothing here calls a hosted detector or needs an
5
+ API key. Vale (`@vvago/vale`) is the prose engine the user referred to as Vale
6
+ (sometimes heard as “VILE”).
7
+
8
+ | Library piece | Source |
9
+ | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
10
+ | Custom AI tells, auto-fixes, readability, structure, SEO | `mepritam-revamp-26/scripts/lib/content-polish.ts` |
11
+ | Special-character sanitizer | `mepritam-revamp-26/lib/sanitize-special-chars.ts` |
12
+ | `personalizeText()` | `mepritam-revamp-26/lib/personalize-text.ts` |
13
+ | slop-gate vocabulary / punctuation JSON | `slop-gate` 0.4.3 packs copied from mepritam; CLI from `slop-gate` |
14
+ | Vale styles (`write-good`, `ai-tells`, `signs-of-ai-writing`, `Google`, `AiTextCheck`) | `mepritam-revamp-26/.vale/styles` |
15
+ | Vale runner | `@vvago/vale` native binary + bundled `vale/vale.ini` |
16
+ | write-good | `write-good` npm (same So/ThereIs disables as `.vale.ini`) |
17
+ | retext | `retext-english` + `retext-passive` + `retext-readability` + `retext-simplify` + `retext-repeated-words` |
18
+ | is-this-ai-slop | `is-this-ai-slop` (`analyze()`) |
19
+ | Veldica AI markers | `@veldica/prose-linter` (`inventoryMarkers()`) |
20
+ | Clean Writing / STE subset | `clean-writing-lint` (`lint()`), with contraction and 20-word sentence rules off |
21
+
22
+ Skipped after research (not a fit for Node 20 in-process checks):
23
+
24
+ - `slopsift` / WritingLint — requires Node 24+
25
+ - `slopless` — textlint-only, async
26
+ - `wsc-lint` / `tacheles` — CLI-only, no stable in-process API
27
+ - Hosted classifiers (GPTZero, Originality, etc.) — need secrets / upload text
28
+
29
+ Default `checkFiles` order: polish + slop-gate JSON + write-good + retext +
30
+ is-this-ai-slop + Veldica + clean-writing, then Vale JSON merged onto the same
31
+ report.
32
+
33
+ Licenses for this package and the vendored Vale styles are in [LICENSE](./LICENSE)
34
+ and [NOTICE](./NOTICE).