chaffjs 0.20.0 → 0.21.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 (567) hide show
  1. package/README.md +5 -4
  2. package/dist/api.d.ts +16 -1
  3. package/dist/api.d.ts.map +1 -1
  4. package/dist/api.js.map +1 -1
  5. package/dist/cli-text.d.ts +2 -0
  6. package/dist/cli-text.d.ts.map +1 -1
  7. package/dist/cli-text.js +14 -5
  8. package/dist/cli-text.js.map +1 -1
  9. package/dist/cli.d.ts.map +1 -1
  10. package/dist/cli.js +4 -0
  11. package/dist/cli.js.map +1 -1
  12. package/dist/command-help.d.ts +7 -0
  13. package/dist/command-help.d.ts.map +1 -0
  14. package/dist/command-help.js +18 -0
  15. package/dist/command-help.js.map +1 -0
  16. package/dist/commands/eval.js +2 -2
  17. package/dist/commands/eval.js.map +1 -1
  18. package/dist/commands/fix-plan.d.ts.map +1 -1
  19. package/dist/commands/fix-plan.js +11 -1
  20. package/dist/commands/fix-plan.js.map +1 -1
  21. package/dist/commands/help.d.ts +4 -0
  22. package/dist/commands/help.d.ts.map +1 -0
  23. package/dist/commands/help.js +7 -0
  24. package/dist/commands/help.js.map +1 -0
  25. package/dist/config/load.d.ts +2 -0
  26. package/dist/config/load.d.ts.map +1 -1
  27. package/dist/config/load.js +1 -0
  28. package/dist/config/load.js.map +1 -1
  29. package/dist/config/option-problems.js +2 -2
  30. package/dist/config/option-problems.js.map +1 -1
  31. package/dist/config/rule-problems.js +2 -2
  32. package/dist/config/rule-problems.js.map +1 -1
  33. package/dist/custom/checked.d.ts +9 -0
  34. package/dist/custom/checked.d.ts.map +1 -0
  35. package/dist/custom/checked.js +3 -0
  36. package/dist/custom/checked.js.map +1 -0
  37. package/dist/custom/dsl-fields.d.ts +27 -0
  38. package/dist/custom/dsl-fields.d.ts.map +1 -0
  39. package/dist/custom/dsl-fields.js +86 -0
  40. package/dist/custom/dsl-fields.js.map +1 -0
  41. package/dist/custom/load.d.ts.map +1 -1
  42. package/dist/custom/load.js +2 -0
  43. package/dist/custom/load.js.map +1 -1
  44. package/dist/custom/parse.d.ts +14 -3
  45. package/dist/custom/parse.d.ts.map +1 -1
  46. package/dist/custom/parse.js +44 -40
  47. package/dist/custom/parse.js.map +1 -1
  48. package/dist/custom/problems.d.ts.map +1 -1
  49. package/dist/custom/problems.js +11 -1
  50. package/dist/custom/problems.js.map +1 -1
  51. package/dist/detectors/blank-structure.d.ts.map +1 -1
  52. package/dist/detectors/blank-structure.js +6 -4
  53. package/dist/detectors/blank-structure.js.map +1 -1
  54. package/dist/detectors/clause-shape.d.ts +22 -0
  55. package/dist/detectors/clause-shape.d.ts.map +1 -0
  56. package/dist/detectors/clause-shape.js +149 -0
  57. package/dist/detectors/clause-shape.js.map +1 -0
  58. package/dist/detectors/code-fences.d.ts +34 -0
  59. package/dist/detectors/code-fences.d.ts.map +1 -0
  60. package/dist/detectors/code-fences.js +100 -0
  61. package/dist/detectors/code-fences.js.map +1 -0
  62. package/dist/detectors/cross-definitions.d.ts +4 -0
  63. package/dist/detectors/cross-definitions.d.ts.map +1 -0
  64. package/dist/detectors/cross-definitions.js +43 -0
  65. package/dist/detectors/cross-definitions.js.map +1 -0
  66. package/dist/detectors/cross-facts.d.ts +4 -0
  67. package/dist/detectors/cross-facts.d.ts.map +1 -0
  68. package/dist/detectors/cross-facts.js +53 -0
  69. package/dist/detectors/cross-facts.js.map +1 -0
  70. package/dist/detectors/cross-registry/cross-doc-duplicate-definition.d.ts +3 -0
  71. package/dist/detectors/cross-registry/cross-doc-duplicate-definition.d.ts.map +1 -0
  72. package/dist/detectors/cross-registry/cross-doc-duplicate-definition.js +3 -0
  73. package/dist/detectors/cross-registry/cross-doc-duplicate-definition.js.map +1 -0
  74. package/dist/detectors/cross-registry/cross-doc-fact-conflict.d.ts +3 -0
  75. package/dist/detectors/cross-registry/cross-doc-fact-conflict.d.ts.map +1 -0
  76. package/dist/detectors/cross-registry/cross-doc-fact-conflict.js +3 -0
  77. package/dist/detectors/cross-registry/cross-doc-fact-conflict.js.map +1 -0
  78. package/dist/detectors/custom.d.ts.map +1 -1
  79. package/dist/detectors/custom.js +4 -1
  80. package/dist/detectors/custom.js.map +1 -1
  81. package/dist/detectors/defined-term-form.d.ts +25 -0
  82. package/dist/detectors/defined-term-form.d.ts.map +1 -0
  83. package/dist/detectors/defined-term-form.js +170 -0
  84. package/dist/detectors/defined-term-form.js.map +1 -0
  85. package/dist/detectors/email-letter.d.ts +46 -0
  86. package/dist/detectors/email-letter.d.ts.map +1 -0
  87. package/dist/detectors/email-letter.js +234 -0
  88. package/dist/detectors/email-letter.js.map +1 -0
  89. package/dist/detectors/impossible-date.d.ts +20 -0
  90. package/dist/detectors/impossible-date.d.ts.map +1 -0
  91. package/dist/detectors/impossible-date.js +105 -0
  92. package/dist/detectors/impossible-date.js.map +1 -0
  93. package/dist/detectors/impossible-time.d.ts +18 -0
  94. package/dist/detectors/impossible-time.d.ts.map +1 -0
  95. package/dist/detectors/impossible-time.js +116 -0
  96. package/dist/detectors/impossible-time.js.map +1 -0
  97. package/dist/detectors/link-shape.d.ts +11 -0
  98. package/dist/detectors/link-shape.d.ts.map +1 -0
  99. package/dist/detectors/link-shape.js +56 -0
  100. package/dist/detectors/link-shape.js.map +1 -0
  101. package/dist/detectors/mark-shape.d.ts +53 -0
  102. package/dist/detectors/mark-shape.d.ts.map +1 -0
  103. package/dist/detectors/mark-shape.js +160 -0
  104. package/dist/detectors/mark-shape.js.map +1 -0
  105. package/dist/detectors/registry/adverb-polarity.d.ts +3 -0
  106. package/dist/detectors/registry/adverb-polarity.d.ts.map +1 -0
  107. package/dist/detectors/registry/adverb-polarity.js +3 -0
  108. package/dist/detectors/registry/adverb-polarity.js.map +1 -0
  109. package/dist/detectors/registry/attachment-missing.d.ts +3 -0
  110. package/dist/detectors/registry/attachment-missing.d.ts.map +1 -0
  111. package/dist/detectors/registry/attachment-missing.js +3 -0
  112. package/dist/detectors/registry/attachment-missing.js.map +1 -0
  113. package/dist/detectors/registry/bare-url-mix.d.ts +3 -0
  114. package/dist/detectors/registry/bare-url-mix.d.ts.map +1 -0
  115. package/dist/detectors/registry/bare-url-mix.js +3 -0
  116. package/dist/detectors/registry/bare-url-mix.js.map +1 -0
  117. package/dist/detectors/registry/caps-shouting.d.ts +3 -0
  118. package/dist/detectors/registry/caps-shouting.d.ts.map +1 -0
  119. package/dist/detectors/registry/caps-shouting.js +3 -0
  120. package/dist/detectors/registry/caps-shouting.js.map +1 -0
  121. package/dist/detectors/registry/code-fence-language.d.ts +3 -0
  122. package/dist/detectors/registry/code-fence-language.d.ts.map +1 -0
  123. package/dist/detectors/registry/code-fence-language.js +3 -0
  124. package/dist/detectors/registry/code-fence-language.js.map +1 -0
  125. package/dist/detectors/registry/defined-name-repeated.d.ts +3 -0
  126. package/dist/detectors/registry/defined-name-repeated.d.ts.map +1 -0
  127. package/dist/detectors/registry/defined-name-repeated.js +3 -0
  128. package/dist/detectors/registry/defined-name-repeated.js.map +1 -0
  129. package/dist/detectors/registry/defined-term-form.d.ts +3 -0
  130. package/dist/detectors/registry/defined-term-form.d.ts.map +1 -0
  131. package/dist/detectors/registry/defined-term-form.js +3 -0
  132. package/dist/detectors/registry/defined-term-form.js.map +1 -0
  133. package/dist/detectors/registry/email-frame.d.ts +3 -0
  134. package/dist/detectors/registry/email-frame.d.ts.map +1 -0
  135. package/dist/detectors/registry/email-frame.js +3 -0
  136. package/dist/detectors/registry/email-frame.js.map +1 -0
  137. package/dist/detectors/registry/email-subject.d.ts +3 -0
  138. package/dist/detectors/registry/email-subject.d.ts.map +1 -0
  139. package/dist/detectors/registry/email-subject.js +3 -0
  140. package/dist/detectors/registry/email-subject.js.map +1 -0
  141. package/dist/detectors/registry/ending-run.d.ts +3 -0
  142. package/dist/detectors/registry/ending-run.d.ts.map +1 -0
  143. package/dist/detectors/registry/ending-run.js +3 -0
  144. package/dist/detectors/registry/ending-run.js.map +1 -0
  145. package/dist/detectors/registry/heading-command.d.ts +3 -0
  146. package/dist/detectors/registry/heading-command.d.ts.map +1 -0
  147. package/dist/detectors/registry/heading-command.js +3 -0
  148. package/dist/detectors/registry/heading-command.js.map +1 -0
  149. package/dist/detectors/registry/hyphen-dash.d.ts +3 -0
  150. package/dist/detectors/registry/hyphen-dash.d.ts.map +1 -0
  151. package/dist/detectors/registry/hyphen-dash.js +3 -0
  152. package/dist/detectors/registry/hyphen-dash.js.map +1 -0
  153. package/dist/detectors/registry/image-file-name-alt.d.ts +3 -0
  154. package/dist/detectors/registry/image-file-name-alt.d.ts.map +1 -0
  155. package/dist/detectors/registry/image-file-name-alt.js +3 -0
  156. package/dist/detectors/registry/image-file-name-alt.js.map +1 -0
  157. package/dist/detectors/registry/impossible-date.d.ts +3 -0
  158. package/dist/detectors/registry/impossible-date.d.ts.map +1 -0
  159. package/dist/detectors/registry/impossible-date.js +3 -0
  160. package/dist/detectors/registry/impossible-date.js.map +1 -0
  161. package/dist/detectors/registry/impossible-time.d.ts +3 -0
  162. package/dist/detectors/registry/impossible-time.d.ts.map +1 -0
  163. package/dist/detectors/registry/impossible-time.js +3 -0
  164. package/dist/detectors/registry/impossible-time.js.map +1 -0
  165. package/dist/detectors/registry/latin-abbreviation.d.ts +3 -0
  166. package/dist/detectors/registry/latin-abbreviation.d.ts.map +1 -0
  167. package/dist/detectors/registry/latin-abbreviation.js +3 -0
  168. package/dist/detectors/registry/latin-abbreviation.js.map +1 -0
  169. package/dist/detectors/registry/link-text-url-mismatch.d.ts +3 -0
  170. package/dist/detectors/registry/link-text-url-mismatch.d.ts.map +1 -0
  171. package/dist/detectors/registry/link-text-url-mismatch.js +3 -0
  172. package/dist/detectors/registry/link-text-url-mismatch.js.map +1 -0
  173. package/dist/detectors/registry/mark-consistency.d.ts +3 -0
  174. package/dist/detectors/registry/mark-consistency.d.ts.map +1 -0
  175. package/dist/detectors/registry/mark-consistency.js +3 -0
  176. package/dist/detectors/registry/mark-consistency.js.map +1 -0
  177. package/dist/detectors/registry/origin-particle.d.ts +3 -0
  178. package/dist/detectors/registry/origin-particle.d.ts.map +1 -0
  179. package/dist/detectors/registry/origin-particle.js +3 -0
  180. package/dist/detectors/registry/origin-particle.js.map +1 -0
  181. package/dist/detectors/registry/request-without-deadline.d.ts +3 -0
  182. package/dist/detectors/registry/request-without-deadline.d.ts.map +1 -0
  183. package/dist/detectors/registry/request-without-deadline.js +3 -0
  184. package/dist/detectors/registry/request-without-deadline.js.map +1 -0
  185. package/dist/detectors/registry/sentence-spacing.d.ts +3 -0
  186. package/dist/detectors/registry/sentence-spacing.d.ts.map +1 -0
  187. package/dist/detectors/registry/sentence-spacing.js +3 -0
  188. package/dist/detectors/registry/sentence-spacing.js.map +1 -0
  189. package/dist/detectors/registry/shell-prompt.d.ts +3 -0
  190. package/dist/detectors/registry/shell-prompt.d.ts.map +1 -0
  191. package/dist/detectors/registry/shell-prompt.js +3 -0
  192. package/dist/detectors/registry/shell-prompt.js.map +1 -0
  193. package/dist/detectors/registry/step-statement.d.ts +3 -0
  194. package/dist/detectors/registry/step-statement.d.ts.map +1 -0
  195. package/dist/detectors/registry/step-statement.js +3 -0
  196. package/dist/detectors/registry/step-statement.js.map +1 -0
  197. package/dist/detectors/registry/unpaired-parallel.d.ts +3 -0
  198. package/dist/detectors/registry/unpaired-parallel.d.ts.map +1 -0
  199. package/dist/detectors/registry/unpaired-parallel.js +3 -0
  200. package/dist/detectors/registry/unpaired-parallel.js.map +1 -0
  201. package/dist/detectors/request-owner.d.ts +23 -0
  202. package/dist/detectors/request-owner.d.ts.map +1 -0
  203. package/dist/detectors/request-owner.js +110 -0
  204. package/dist/detectors/request-owner.js.map +1 -0
  205. package/dist/detectors/technical-docs.d.ts +32 -0
  206. package/dist/detectors/technical-docs.d.ts.map +1 -0
  207. package/dist/detectors/technical-docs.js +199 -0
  208. package/dist/detectors/technical-docs.js.map +1 -0
  209. package/dist/extension/pack-read.d.ts +21 -0
  210. package/dist/extension/pack-read.d.ts.map +1 -0
  211. package/dist/extension/pack-read.js +117 -0
  212. package/dist/extension/pack-read.js.map +1 -0
  213. package/dist/extension/plugin-load.d.ts.map +1 -1
  214. package/dist/extension/plugin-load.js +44 -10
  215. package/dist/extension/plugin-load.js.map +1 -1
  216. package/dist/extension/plugin-parse.d.ts.map +1 -1
  217. package/dist/extension/plugin-parse.js +10 -3
  218. package/dist/extension/plugin-parse.js.map +1 -1
  219. package/dist/facts/address-values.d.ts +5 -0
  220. package/dist/facts/address-values.d.ts.map +1 -0
  221. package/dist/facts/address-values.js +64 -0
  222. package/dist/facts/address-values.js.map +1 -0
  223. package/dist/facts/cross-facts.d.ts +20 -0
  224. package/dist/facts/cross-facts.d.ts.map +1 -0
  225. package/dist/facts/cross-facts.js +41 -0
  226. package/dist/facts/cross-facts.js.map +1 -0
  227. package/dist/fix-plan/chosen-depth.d.ts +10 -0
  228. package/dist/fix-plan/chosen-depth.d.ts.map +1 -0
  229. package/dist/fix-plan/chosen-depth.js +24 -0
  230. package/dist/fix-plan/chosen-depth.js.map +1 -0
  231. package/dist/fix-plan/mode.d.ts +13 -4
  232. package/dist/fix-plan/mode.d.ts.map +1 -1
  233. package/dist/fix-plan/mode.js +38 -7
  234. package/dist/fix-plan/mode.js.map +1 -1
  235. package/dist/fix-plan/plan.d.ts +20 -0
  236. package/dist/fix-plan/plan.d.ts.map +1 -1
  237. package/dist/fix-plan/plan.js +23 -5
  238. package/dist/fix-plan/plan.js.map +1 -1
  239. package/dist/fix-plan/render.d.ts.map +1 -1
  240. package/dist/fix-plan/render.js +24 -0
  241. package/dist/fix-plan/render.js.map +1 -1
  242. package/dist/fix-plan/text.d.ts +8 -0
  243. package/dist/fix-plan/text.d.ts.map +1 -1
  244. package/dist/fix-plan/text.js +36 -10
  245. package/dist/fix-plan/text.js.map +1 -1
  246. package/dist/genre-load.d.ts +1 -1
  247. package/dist/genre-load.d.ts.map +1 -1
  248. package/dist/genre-load.js +7 -4
  249. package/dist/genre-load.js.map +1 -1
  250. package/dist/genre-parse.d.ts +6 -0
  251. package/dist/genre-parse.d.ts.map +1 -1
  252. package/dist/genre-parse.js +18 -0
  253. package/dist/genre-parse.js.map +1 -1
  254. package/dist/init.js +10 -10
  255. package/dist/init.js.map +1 -1
  256. package/dist/known-genres.d.ts +8 -0
  257. package/dist/known-genres.d.ts.map +1 -0
  258. package/dist/known-genres.js +17 -0
  259. package/dist/known-genres.js.map +1 -0
  260. package/dist/link-shape.d.ts +20 -0
  261. package/dist/link-shape.d.ts.map +1 -0
  262. package/dist/link-shape.js +58 -0
  263. package/dist/link-shape.js.map +1 -0
  264. package/dist/reasons.d.ts.map +1 -1
  265. package/dist/reasons.js +15 -4
  266. package/dist/reasons.js.map +1 -1
  267. package/dist/render/explain.d.ts.map +1 -1
  268. package/dist/render/explain.js +11 -2
  269. package/dist/render/explain.js.map +1 -1
  270. package/dist/render/friendly.js +1 -1
  271. package/dist/render/friendly.js.map +1 -1
  272. package/dist/render/rules-json.d.ts.map +1 -1
  273. package/dist/render/rules-json.js +12 -3
  274. package/dist/render/rules-json.js.map +1 -1
  275. package/dist/render/rules-table.js +6 -6
  276. package/dist/render/rules-table.js.map +1 -1
  277. package/dist/render/semantic.js +2 -2
  278. package/dist/render/semantic.js.map +1 -1
  279. package/dist/render/suppressions.js +2 -2
  280. package/dist/render/suppressions.js.map +1 -1
  281. package/dist/rewrite-depth.d.ts +22 -0
  282. package/dist/rewrite-depth.d.ts.map +1 -0
  283. package/dist/rewrite-depth.js +42 -0
  284. package/dist/rewrite-depth.js.map +1 -0
  285. package/dist/rule-fields.d.ts +23 -0
  286. package/dist/rule-fields.d.ts.map +1 -0
  287. package/dist/rule-fields.js +64 -0
  288. package/dist/rule-fields.js.map +1 -0
  289. package/dist/rule-guide.d.ts +3 -0
  290. package/dist/rule-guide.d.ts.map +1 -1
  291. package/dist/rule-guide.js +6 -0
  292. package/dist/rule-guide.js.map +1 -1
  293. package/dist/rule-load.d.ts.map +1 -1
  294. package/dist/rule-load.js +13 -5
  295. package/dist/rule-load.js.map +1 -1
  296. package/dist/rule-offs.d.ts +14 -0
  297. package/dist/rule-offs.d.ts.map +1 -0
  298. package/dist/rule-offs.js +45 -0
  299. package/dist/rule-offs.js.map +1 -0
  300. package/dist/structure/build.d.ts.map +1 -1
  301. package/dist/structure/build.js +14 -1
  302. package/dist/structure/build.js.map +1 -1
  303. package/dist/structure/cross-definitions.d.ts +23 -0
  304. package/dist/structure/cross-definitions.d.ts.map +1 -0
  305. package/dist/structure/cross-definitions.js +34 -0
  306. package/dist/structure/cross-definitions.js.map +1 -0
  307. package/genres.yaml +14 -313
  308. package/package.json +3 -3
  309. package/rules/absolute-exception.yaml +3 -1
  310. package/rules/abstract-length.yaml +7 -1
  311. package/rules/acronym-expansion-conflict.yaml +2 -1
  312. package/rules/adverb-overuse.yaml +7 -1
  313. package/rules/adverb-without-negation.yaml +60 -0
  314. package/rules/adversative-ga-repeat.yaml +2 -1
  315. package/rules/agentless-passive.yaml +10 -1
  316. package/rules/agreement-slip.yaml +4 -1
  317. package/rules/ai-generated-composite.yaml +6 -1
  318. package/rules/ai-structure.yaml +8 -2
  319. package/rules/ai-tell.yaml +7 -1
  320. package/rules/all-caps-shouting.yaml +61 -0
  321. package/rules/announced-count-mismatch.yaml +3 -1
  322. package/rules/announcing-opener.yaml +7 -1
  323. package/rules/article-sound.yaml +6 -2
  324. package/rules/assistant-residue.yaml +4 -1
  325. package/rules/attachment-not-attached.yaml +112 -0
  326. package/rules/baito-keigo.yaml +64 -0
  327. package/rules/bare-url-mix.yaml +86 -0
  328. package/rules/bold-density.yaml +1 -0
  329. package/rules/bold-label-list.yaml +9 -1
  330. package/rules/bracket-nesting.yaml +2 -1
  331. package/rules/bracket-width-consistency.yaml +64 -0
  332. package/rules/broken-link.yaml +1 -1
  333. package/rules/chat-citation-residue.yaml +2 -1
  334. package/rules/citation-reference-mismatch.yaml +7 -1
  335. package/rules/citation-style-mix.yaml +7 -1
  336. package/rules/clause-chain.yaml +6 -1
  337. package/rules/closing-cliche.yaml +7 -0
  338. package/rules/code-fence-language-mix.yaml +176 -0
  339. package/rules/colloquial-opener.yaml +62 -0
  340. package/rules/colon-lead-in.yaml +7 -1
  341. package/rules/concrete-evidence-density.yaml +6 -0
  342. package/rules/contraction-consistency.yaml +4 -1
  343. package/rules/contrast-framing.yaml +7 -1
  344. package/rules/cross-doc-duplicate-definition.yaml +70 -0
  345. package/rules/cross-doc-fact-conflict.yaml +64 -0
  346. package/rules/cushion-phrase-density.yaml +8 -1
  347. package/rules/dangling-figure-reference.yaml +3 -1
  348. package/rules/dangling-reference.yaml +3 -1
  349. package/rules/date-format-consistency.yaml +3 -2
  350. package/rules/date-order.yaml +3 -1
  351. package/rules/date-range-reversed.yaml +3 -1
  352. package/rules/date-weekday-mismatch.yaml +3 -1
  353. package/rules/date-without-year.yaml +4 -3
  354. package/rules/defined-name-repeated.yaml +97 -0
  355. package/rules/defined-term-form.yaml +113 -0
  356. package/rules/demonstrative-opener-run.yaml +2 -1
  357. package/rules/double-keigo.yaml +6 -1
  358. package/rules/double-negative.yaml +5 -1
  359. package/rules/doubled-nado.yaml +2 -1
  360. package/rules/doubled-punctuation.yaml +1 -1
  361. package/rules/doubled-word.yaml +4 -1
  362. package/rules/duplicate-definition.yaml +3 -1
  363. package/rules/duplicate-heading.yaml +1 -1
  364. package/rules/duration-mismatch.yaml +2 -1
  365. package/rules/elapsed-years-mismatch.yaml +4 -1
  366. package/rules/email-greeting-closing.yaml +122 -0
  367. package/rules/email-subject-length.yaml +112 -0
  368. package/rules/emoji-density.yaml +3 -1
  369. package/rules/emoji-heading.yaml +7 -1
  370. package/rules/empty-intensifier.yaml +4 -0
  371. package/rules/empty-list-item.yaml +2 -1
  372. package/rules/empty-section.yaml +1 -1
  373. package/rules/empty-table-cell.yaml +2 -1
  374. package/rules/excessive-hedging.yaml +7 -1
  375. package/rules/exclamation-width-consistency.yaml +64 -0
  376. package/rules/expletive-construction.yaml +7 -1
  377. package/rules/fact-conflict.yaml +4 -1
  378. package/rules/figure-reference-order.yaml +7 -1
  379. package/rules/fullwidth-alnum-consistency.yaml +2 -2
  380. package/rules/hankaku-kana.yaml +1 -1
  381. package/rules/heading-command-missing.yaml +109 -0
  382. package/rules/heading-echo.yaml +6 -1
  383. package/rules/heading-level-skip.yaml +3 -3
  384. package/rules/heading-numbering-mix.yaml +4 -3
  385. package/rules/hiragana-fukushi.yaml +4 -1
  386. package/rules/homophone-slip.yaml +5 -1
  387. package/rules/humble-for-others.yaml +63 -0
  388. package/rules/hyphen-as-dash.yaml +59 -0
  389. package/rules/idiom-misuse.yaml +4 -1
  390. package/rules/image-file-name-alt.yaml +83 -0
  391. package/rules/impossible-date.yaml +79 -0
  392. package/rules/impossible-time.yaml +76 -0
  393. package/rules/internal-jargon.yaml +1 -1
  394. package/rules/invisible-character.yaml +1 -1
  395. package/rules/katakana-density.yaml +2 -1
  396. package/rules/katakana-long-vowel.yaml +1 -1
  397. package/rules/known-misspelling.yaml +2 -1
  398. package/rules/kutoten-consistency.yaml +1 -1
  399. package/rules/latin-abbreviation-form.yaml +58 -0
  400. package/rules/latin-spacing.yaml +6 -2
  401. package/rules/link-text-url-mismatch.yaml +72 -0
  402. package/rules/list-item-form-mix.yaml +7 -1
  403. package/rules/max-kanji-continuous.yaml +10 -2
  404. package/rules/max-paragraph-length.yaml +4 -1
  405. package/rules/max-sentence-length.yaml +29 -21
  406. package/rules/max-ten.yaml +4 -1
  407. package/rules/misconversion.yaml +2 -1
  408. package/rules/modal-conflict.yaml +2 -1
  409. package/rules/name-variant.yaml +4 -3
  410. package/rules/ngram-repetition.yaml +5 -0
  411. package/rules/no-doubled-joshi.yaml +5 -1
  412. package/rules/no-em-dash.yaml +4 -1
  413. package/rules/no-lead.yaml +6 -1
  414. package/rules/no-mixed-desumasu.yaml +5 -2
  415. package/rules/no-nakaguro-parallel.yaml +3 -0
  416. package/rules/nominalization.yaml +5 -1
  417. package/rules/number-style-consistency.yaml +6 -1
  418. package/rules/number-without-unit.yaml +2 -1
  419. package/rules/numbering-gap.yaml +1 -1
  420. package/rules/one-sentence-paragraph-run.yaml +5 -1
  421. package/rules/orthographic-variant.yaml +4 -1
  422. package/rules/outside-announced-list.yaml +2 -1
  423. package/rules/oxford-comma-consistency.yaml +3 -1
  424. package/rules/padded-intro.yaml +7 -0
  425. package/rules/paragraph-length-variance.yaml +7 -1
  426. package/rules/paragraph-restatement.yaml +6 -1
  427. package/rules/percent-sum-mismatch.yaml +3 -1
  428. package/rules/person-consistency.yaml +4 -1
  429. package/rules/preamble-length.yaml +6 -0
  430. package/rules/preferred-term.yaml +1 -1
  431. package/rules/proper-noun-density.yaml +8 -1
  432. package/rules/quote-style-consistency.yaml +66 -0
  433. package/rules/ra-nuki.yaml +4 -1
  434. package/rules/redundant-expression.yaml +4 -1
  435. package/rules/reference-title-mismatch.yaml +4 -3
  436. package/rules/reference-topic-missing.yaml +2 -1
  437. package/rules/relative-date-mismatch.yaml +2 -1
  438. package/rules/repeated-conjunction.yaml +4 -1
  439. package/rules/repeated-sentence-ending.yaml +62 -0
  440. package/rules/repeated-sentence-head.yaml +4 -0
  441. package/rules/request-without-deadline.yaml +92 -0
  442. package/rules/required-sections.yaml +1 -1
  443. package/rules/requirement-modal.yaml +1 -1
  444. package/rules/requirement-smell.yaml +12 -4
  445. package/rules/rule-of-three.yaml +8 -1
  446. package/rules/sasete-itadaku.yaml +7 -1
  447. package/rules/section-length-uniformity.yaml +7 -1
  448. package/rules/sentence-initial-conjunction-run.yaml +5 -1
  449. package/rules/sentence-initial-so.yaml +6 -1
  450. package/rules/sentence-rhythm.yaml +8 -1
  451. package/rules/sentence-spacing-consistency.yaml +63 -0
  452. package/rules/shell-prompt-mix.yaml +128 -0
  453. package/rules/space-before-punctuation.yaml +1 -1
  454. package/rules/spelling-consistency.yaml +3 -1
  455. package/rules/step-statement-mix.yaml +76 -0
  456. package/rules/stock-transition.yaml +8 -1
  457. package/rules/stray-space.yaml +2 -2
  458. package/rules/summary-fact-mismatch.yaml +4 -1
  459. package/rules/table-header-variant.yaml +2 -1
  460. package/rules/taigen-dome-in-prose.yaml +6 -0
  461. package/rules/tari-unpaired.yaml +58 -0
  462. package/rules/teki-overuse.yaml +2 -1
  463. package/rules/title-case-consistency.yaml +1 -1
  464. package/rules/title-length.yaml +7 -1
  465. package/rules/topic-predicate-distance.yaml +6 -1
  466. package/rules/total-mismatch.yaml +3 -1
  467. package/rules/translationese-density.yaml +4 -1
  468. package/rules/unbalanced-bracket.yaml +3 -3
  469. package/rules/undefined-acronym.yaml +8 -1
  470. package/rules/unfilled-placeholder.yaml +1 -1
  471. package/rules/unit-mismatch.yaml +2 -1
  472. package/rules/unknown-word.yaml +4 -1
  473. package/rules/unqualified-superlative.yaml +6 -1
  474. package/rules/unused-definition.yaml +4 -3
  475. package/rules/url-run-on.yaml +1 -1
  476. package/rules/use-before-definition.yaml +4 -3
  477. package/rules/vague-figure-reference.yaml +3 -1
  478. package/rules/vague-link-text.yaml +2 -1
  479. package/rules/vague-word-density.yaml +2 -1
  480. package/rules/very-adjective.yaml +5 -1
  481. package/rules/weasel-word.yaml +6 -1
  482. package/rules/wordy-phrase.yaml +6 -1
  483. package/rules/yori-as-from.yaml +61 -0
  484. package/src/api.ts +13 -1
  485. package/src/cli-text.ts +18 -7
  486. package/src/cli.ts +3 -0
  487. package/src/command-help.ts +26 -0
  488. package/src/commands/eval.ts +2 -2
  489. package/src/commands/fix-plan.ts +13 -1
  490. package/src/commands/help.ts +8 -0
  491. package/src/config/load.ts +3 -0
  492. package/src/config/option-problems.ts +2 -2
  493. package/src/config/rule-problems.ts +2 -2
  494. package/src/custom/checked.ts +8 -0
  495. package/src/custom/dsl-fields.ts +102 -0
  496. package/src/custom/load.ts +2 -0
  497. package/src/custom/parse.ts +72 -50
  498. package/src/custom/problems.ts +18 -2
  499. package/src/detectors/blank-structure.ts +12 -4
  500. package/src/detectors/clause-shape.ts +199 -0
  501. package/src/detectors/code-fences.ts +113 -0
  502. package/src/detectors/cross-definitions.ts +49 -0
  503. package/src/detectors/cross-facts.ts +60 -0
  504. package/src/detectors/cross-registry/cross-doc-duplicate-definition.ts +4 -0
  505. package/src/detectors/cross-registry/cross-doc-fact-conflict.ts +4 -0
  506. package/src/detectors/custom.ts +10 -2
  507. package/src/detectors/defined-term-form.ts +200 -0
  508. package/src/detectors/email-letter.ts +262 -0
  509. package/src/detectors/impossible-date.ts +141 -0
  510. package/src/detectors/impossible-time.ts +151 -0
  511. package/src/detectors/link-shape.ts +70 -0
  512. package/src/detectors/mark-shape.ts +202 -0
  513. package/src/detectors/registry/adverb-polarity.ts +4 -0
  514. package/src/detectors/registry/attachment-missing.ts +4 -0
  515. package/src/detectors/registry/bare-url-mix.ts +4 -0
  516. package/src/detectors/registry/caps-shouting.ts +4 -0
  517. package/src/detectors/registry/code-fence-language.ts +4 -0
  518. package/src/detectors/registry/defined-name-repeated.ts +4 -0
  519. package/src/detectors/registry/defined-term-form.ts +4 -0
  520. package/src/detectors/registry/email-frame.ts +4 -0
  521. package/src/detectors/registry/email-subject.ts +4 -0
  522. package/src/detectors/registry/ending-run.ts +4 -0
  523. package/src/detectors/registry/heading-command.ts +4 -0
  524. package/src/detectors/registry/hyphen-dash.ts +4 -0
  525. package/src/detectors/registry/image-file-name-alt.ts +4 -0
  526. package/src/detectors/registry/impossible-date.ts +4 -0
  527. package/src/detectors/registry/impossible-time.ts +4 -0
  528. package/src/detectors/registry/latin-abbreviation.ts +4 -0
  529. package/src/detectors/registry/link-text-url-mismatch.ts +4 -0
  530. package/src/detectors/registry/mark-consistency.ts +4 -0
  531. package/src/detectors/registry/origin-particle.ts +4 -0
  532. package/src/detectors/registry/request-without-deadline.ts +4 -0
  533. package/src/detectors/registry/sentence-spacing.ts +4 -0
  534. package/src/detectors/registry/shell-prompt.ts +4 -0
  535. package/src/detectors/registry/step-statement.ts +4 -0
  536. package/src/detectors/registry/unpaired-parallel.ts +4 -0
  537. package/src/detectors/request-owner.ts +141 -0
  538. package/src/detectors/technical-docs.ts +230 -0
  539. package/src/extension/pack-read.ts +128 -0
  540. package/src/extension/plugin-load.ts +49 -9
  541. package/src/extension/plugin-parse.ts +10 -3
  542. package/src/facts/address-values.ts +74 -0
  543. package/src/facts/cross-facts.ts +54 -0
  544. package/src/fix-plan/chosen-depth.ts +28 -0
  545. package/src/fix-plan/mode.ts +57 -11
  546. package/src/fix-plan/plan.ts +37 -5
  547. package/src/fix-plan/render.ts +24 -0
  548. package/src/fix-plan/text.ts +47 -10
  549. package/src/genre-load.ts +7 -4
  550. package/src/genre-parse.ts +19 -0
  551. package/src/init.ts +10 -10
  552. package/src/known-genres.ts +19 -0
  553. package/src/link-shape.ts +62 -0
  554. package/src/reasons.ts +16 -4
  555. package/src/render/explain.ts +14 -2
  556. package/src/render/friendly.ts +1 -1
  557. package/src/render/rules-json.ts +14 -3
  558. package/src/render/rules-table.ts +6 -6
  559. package/src/render/semantic.ts +2 -2
  560. package/src/render/suppressions.ts +2 -2
  561. package/src/rewrite-depth.ts +60 -0
  562. package/src/rule-fields.ts +95 -0
  563. package/src/rule-guide.ts +9 -0
  564. package/src/rule-load.ts +10 -4
  565. package/src/rule-offs.ts +50 -0
  566. package/src/structure/build.ts +21 -1
  567. package/src/structure/cross-definitions.ts +60 -0
@@ -0,0 +1,64 @@
1
+ id: bracket-width-consistency
2
+ layer: L1
3
+ status: stable
4
+ how_to_find: mark-consistency
5
+ word_list: bracket-width
6
+ languages: [ja]
7
+ severity: info
8
+
9
+ name:
10
+ ja: 丸括弧の全角と半角の混在
11
+ en: Full-width and half-width parentheses mixed
12
+
13
+ why:
14
+ ja: 日本語の文の中で、丸括弧を全角(())と半角(())で混ぜて書くと、別々の所から貼り合わせた文書に見えます。どちらが正しいかは決めません。日本語の字に接する括弧だけを数え、文書の中で少ないほうを指します。
15
+ en: In a Japanese document, parentheses written both full-width () and half-width () make it look pasted together. chaff does not pick a side; it counts only brackets touching Japanese text and points at the less common way.
16
+
17
+ message:
18
+ ja: 括弧を「{mark}」と書いています(この文書はふつう「{usual}」。{of} 箇所のうち {count} 箇所が違う)
19
+ en: 'The parenthesis "{mark}" here, where the document usually writes "{usual}" ({count} of {of})'
20
+
21
+ # 少ないほうが 5 箇所以上で、全体の 2 割を超えるとき。書き損じではなく書き方が二通りあるので、1 件にまとめて両方の数を言う。
22
+ messages:
23
+ mixed:
24
+ ja: "丸括弧を、全角で {spaced} 箇所、半角で {touching} 箇所書いています。この文書には書き方が二通りあります"
25
+ en: "Parentheses are written two ways in this document ({spaced} full-width, {touching} half-width)"
26
+
27
+ how_to_fix:
28
+ ja: 文書の多いほうの書き方に合わせてください。
29
+ en: Match the way the rest of the document writes it.
30
+
31
+ levels: { strict: 1, normal: 1, relaxed: 3 }
32
+
33
+ use_for: [business, technical, blog, legal, docs, academic, literature, speech]
34
+
35
+ group: consistency
36
+ summary:
37
+ ja: 日本語の文の中で、丸括弧の全角(())と半角(())が混ざっている所
38
+ en: Full-width () and half-width () parentheses mixed in one Japanese document
39
+ example:
40
+ ja:
41
+ before: |
42
+ 会議(定例)は月曜です。報告(月次)は金曜です。資料(最新版)を配ります。
43
+ after: |
44
+ 会議(定例)は月曜です。報告(月次)は金曜です。資料(最新版)を配ります。
45
+
46
+ not_flagged:
47
+ ja: 日本語の字に接する括弧だけを数えます。英語の中の括弧(f(x)、API(s))、コード、鉤括弧で引いたものの中は数えません。
48
+ en: Only brackets touching Japanese text. Brackets in English text (f(x)), code, and 「」 quotations are not counted.
49
+ level_meaning:
50
+ ja: 少ないほうの書き方が {limit} 箇所あれば指摘
51
+ en: reported once the less common way appears {limit} times
52
+ rewrite:
53
+ depth: light
54
+ ja:
55
+ direction: 指された括弧だけを、文書の多いほうの書き方(全角か半角)に替えてください。
56
+ pairs:
57
+ - before: 資料(最新版)を配ります。
58
+ after: 資料(最新版)を配ります。
59
+ - before: 期限(今週金曜)までに出します。
60
+ after: 期限(今週金曜)までに出します。
61
+ keep:
62
+ - 括弧の中の言葉
63
+ avoid:
64
+ - 英語やコードの中の括弧まで替える
@@ -1,6 +1,6 @@
1
1
  id: broken-link
2
2
  layer: L1
3
- status: experimental
3
+ status: stable
4
4
  how_to_find: broken-link
5
5
  requires: [markdown]
6
6
  severity: warning
@@ -1,6 +1,6 @@
1
1
  id: chat-citation-residue
2
2
  layer: L2
3
- status: experimental
3
+ status: stable
4
4
  how_to_find: chat-citation-residue
5
5
  word_list: chat-citation-marker
6
6
  severity: warning
@@ -49,6 +49,7 @@ level_meaning:
49
49
  ja: 名残の印が {limit} 個あれば指摘
50
50
  en: reported once there are {limit}
51
51
  rewrite:
52
+ depth: light
52
53
  ja:
53
54
  direction: リンク先を開いて、その文の出典になっているかを確かめてから、チャットの印だけを消してください。出典にならないリンクは消し、確かめた出典に替えます。
54
55
  pairs:
@@ -1,6 +1,6 @@
1
1
  id: citation-reference-mismatch
2
2
  layer: L3
3
- status: experimental
3
+ status: stable
4
4
  how_to_find: citation-entry
5
5
  severity: warning
6
6
 
@@ -31,6 +31,11 @@ how_to_fix:
31
31
  levels: { strict: error, normal: warning, relaxed: info }
32
32
 
33
33
  use_for: [academic, legal, docs, literature, speech]
34
+ off_for:
35
+ legal: "A paper's citations, figures and abstract: only the academic paper genre turns these on."
36
+ docs: "A paper's citations, figures and abstract: only the academic paper genre turns these on."
37
+ literature: "A paper's citations, figures and abstract: only the academic paper genre turns these on."
38
+ speech: "A paper's citations, figures and abstract: only the academic paper genre turns these on."
34
39
 
35
40
  group: facts
36
41
  summary:
@@ -82,6 +87,7 @@ not_flagged:
82
87
  ja: 「参考文献」「References」のような見出しの下に文献一覧が無い文書、番号も著者と年も読み取れない文献、文献が一つしか無い一覧は見ません。番号で引く引用と番号の文献、著者と年で引く引用と著者と年の文献は、それぞれの組の中だけで比べます。論文のジャンルでだけ見ます。
83
88
  en: 'A document without a list under a heading such as "References", entries that give neither a number nor an author and a year, and a list of one entry are left alone. Numbered citations are compared only with numbered entries, and author-year citations only with author-year entries. Only the academic paper genre runs this rule.'
84
89
  rewrite:
90
+ depth: light
85
91
  ja:
86
92
  direction: 引用と文献一覧のどちらがずれたのかを書き手に確かめ、ずれたほうを直してください。番号を推測で書き換えず、確かめられないときはその旨を書き手に伝えます。引かない文献は、消すか、引く所を書き手に尋ねます。
87
93
  pairs:
@@ -1,6 +1,6 @@
1
1
  id: citation-style-mix
2
2
  layer: L3
3
- status: experimental
3
+ status: stable
4
4
  how_to_find: citation-style
5
5
  severity: info
6
6
 
@@ -23,6 +23,11 @@ how_to_fix:
23
23
  levels: { strict: 3, normal: 2, relaxed: 1 }
24
24
 
25
25
  use_for: [academic, legal, docs, literature, speech]
26
+ off_for:
27
+ legal: "A paper's citations, figures and abstract: only the academic paper genre turns these on."
28
+ docs: "A paper's citations, figures and abstract: only the academic paper genre turns these on."
29
+ literature: "A paper's citations, figures and abstract: only the academic paper genre turns these on."
30
+ speech: "A paper's citations, figures and abstract: only the academic paper genre turns these on."
26
31
 
27
32
  group: consistency
28
33
  summary:
@@ -81,6 +86,7 @@ level_meaning:
81
86
  ja: 少ないほうの書き方が {limit} 箇所以下のとき指摘
82
87
  en: reported when the minority style appears {limit} times or fewer
83
88
  rewrite:
89
+ depth: light
84
90
  ja:
85
91
  direction: 少数の書き方の引用を、論文で最も多い書き方に書き直してください。番号の方式なら、その文献の文献一覧での番号を使います。番号が分からなければ、書き手に確かめます。
86
92
  pairs:
@@ -1,6 +1,6 @@
1
1
  id: clause-chain
2
2
  layer: L3
3
- status: experimental
3
+ status: stable
4
4
  how_to_find: clause-chain
5
5
  requires: [pos]
6
6
  languages: [ja]
@@ -24,6 +24,10 @@ how_to_fix:
24
24
 
25
25
  levels: { strict: 4, normal: 5, relaxed: 7 }
26
26
 
27
+ # 法令と契約は、要件を節でつないで一文に書く。既定の上限では group の文書の過半に出たので、測って上げた(spec §21.1)。
28
+ by_genre:
29
+ legal: { strict: 7, normal: 8, relaxed: 10 }
30
+
27
31
  use_for: [business, technical, blog, legal, docs, academic, literature, speech]
28
32
 
29
33
  group: readability
@@ -44,6 +48,7 @@ level_meaning:
44
48
  ja: 一文の節 {limit} つまで
45
49
  en: up to {limit} clauses in one sentence
46
50
  rewrite:
51
+ depth: light
47
52
  ja:
48
53
  direction: 節のつなぎ目(「〜が、」「〜ので、」「〜て、」)のどこかで文を切り、切った所の関係を次の文の頭で言い直してください。
49
54
  pairs:
@@ -29,6 +29,12 @@ levels:
29
29
  relaxed: 2
30
30
 
31
31
  use_for: [blog, legal, docs, academic, literature, speech]
32
+ off_for:
33
+ legal: "Legal drafting repeats its terms and its sentence heads on purpose, puts the actor in the passive (shall be deemed), and joins long noun compounds (個人情報取扱事業者). This rule would only flag the form."
34
+ docs: "A help page repeats its heading in its first line (To upload a file, ...) and states no claims to back up."
35
+ academic: "Science writes in the passive, hedges its claims on purpose (may, suggest) and cites numbers as its evidence."
36
+ literature: "Length, rhythm, repetition and register are the author's choices in literature, and dialogue mixes styles. Only what one work can hold itself to runs: consistent spacing and commas, and numbering without gaps."
37
+ speech: "A speech opens with greetings and closes with thanks: that is its form, not padding."
32
38
 
33
39
  group: wording
34
40
  summary:
@@ -63,6 +69,7 @@ level_meaning:
63
69
  ja: 当てはまる結びが {limit} 箇所あれば指摘
64
70
  en: reported once there are {limit}
65
71
  rewrite:
72
+ depth: light
66
73
  ja:
67
74
  direction: 決まり文句の結びを消してください。本文の結論がすでに最後にあれば、そこで終えます。無ければ、本文で分かったことのうち持ち帰ってほしい一つを一文で書きます。
68
75
  pairs:
@@ -0,0 +1,176 @@
1
+ id: code-fence-language-mix
2
+ layer: L1
3
+ status: stable
4
+ how_to_find: code-fence-language
5
+ requires: [markdown]
6
+ severity: info
7
+
8
+ name:
9
+ ja: 言語名の無いコードブロックが混ざっている
10
+ en: Code blocks with and without a language
11
+
12
+ why:
13
+ ja: コードブロックに言語名(```bash、```json)を付けると、読み手の画面で色が付き、何の言語かがひと目で分かります。ほとんどのブロックに付けているのに一部だけ無いと、そのブロックだけ色が付かず、付け忘れに見えます。どちらに揃えるかは決めず、少ないほうを指します(markdownlint の MD040 は、すべてのブロックに言語名を求めます)。
14
+ en: "A language on a code block (```bash, ```json) gives it highlighting on the reader's screen and says at a glance what it is. When most blocks name their language and a few do not, those few show plain and look forgotten. chaff does not decide which way to go; it points at the fewer (markdownlint's MD040 asks for a language on every block)."
15
+
16
+ message:
17
+ ja: このコードブロックだけ言語名がありません(言語名のあるブロック {tagged} 個)
18
+ en: This code block names no language, unlike the others ({tagged} blocks name one)
19
+
20
+ how_to_fix:
21
+ ja: 「```」の後ろに言語名を書いてください。出力や平文なら「text」と書きます。
22
+ en: Add the language after the opening ```. For output or plain text, write "text".
23
+
24
+ levels: { strict: 3, normal: 2, relaxed: 1 }
25
+
26
+ use_for: [technical, docs, blog, legal, academic, literature, speech]
27
+ off_for:
28
+ legal: "Code blocks, shell prompts, command headings and numbered steps belong to technical writing."
29
+ academic: "Code blocks, shell prompts, command headings and numbered steps belong to technical writing."
30
+ literature: "Code blocks, shell prompts, command headings and numbered steps belong to technical writing."
31
+ speech: "Code blocks, shell prompts, command headings and numbered steps belong to technical writing."
32
+
33
+ group: consistency
34
+ summary:
35
+ ja: ほとんどのコードブロックに言語名があるのに、一部だけ無い所
36
+ en: A code block without a language among blocks that name theirs
37
+ example:
38
+ ja:
39
+ config: { genre: docs/manual }
40
+ before: |
41
+ # 使い方
42
+
43
+ インストールします。
44
+
45
+ ```bash
46
+ npm install chaffjs
47
+ ```
48
+
49
+ 設定を書きます。
50
+
51
+ ```yaml
52
+ genre: technical/readme
53
+ ```
54
+
55
+ 確かめます。
56
+
57
+ ```
58
+ npx chaffjs README.md
59
+ ```
60
+ after: |
61
+ # 使い方
62
+
63
+ インストールします。
64
+
65
+ ```bash
66
+ npm install chaffjs
67
+ ```
68
+
69
+ 設定を書きます。
70
+
71
+ ```yaml
72
+ genre: technical/readme
73
+ ```
74
+
75
+ 確かめます。
76
+
77
+ ```bash
78
+ npx chaffjs README.md
79
+ ```
80
+ en:
81
+ config: { genre: docs/manual }
82
+ before: |
83
+ # Usage
84
+
85
+ Install it.
86
+
87
+ ```bash
88
+ npm install chaffjs
89
+ ```
90
+
91
+ Write the settings.
92
+
93
+ ```yaml
94
+ genre: technical/readme
95
+ ```
96
+
97
+ Check a file.
98
+
99
+ ```
100
+ npx chaffjs README.md
101
+ ```
102
+ after: |
103
+ # Usage
104
+
105
+ Install it.
106
+
107
+ ```bash
108
+ npm install chaffjs
109
+ ```
110
+
111
+ Write the settings.
112
+
113
+ ```yaml
114
+ genre: technical/readme
115
+ ```
116
+
117
+ Check a file.
118
+
119
+ ```bash
120
+ npx chaffjs README.md
121
+ ```
122
+
123
+ not_flagged:
124
+ ja: 字下げだけのコードブロック、引用の中のブロックは見ません。言語名の無いブロックが {limit} 個を超えるとき、または言語名のあるブロックより多いときは、使い分けとみなして指しません。
125
+ en: Indented code blocks and blocks inside a quotation are not read. When more than {limit} blocks lack a language, or they are as many as those with one, it is taken as a choice and not reported.
126
+ level_meaning:
127
+ ja: 言語名の無いブロックが {limit} 個以下で、ある方より少ないとき指摘
128
+ en: reported when {limit} or fewer blocks lack a language and they are fewer than those with one
129
+ rewrite:
130
+ depth: light
131
+ ja:
132
+ direction: 言語名の無いブロックに、中身の言語名を付けてください。コマンドなら bash、設定なら yaml や json、出力や平文なら text です。中身から言語が決められなければ text にします。コードは変えません。
133
+ pairs:
134
+ - before: |
135
+ ```
136
+ npx chaffjs README.md
137
+ ```
138
+ after: |
139
+ ```bash
140
+ npx chaffjs README.md
141
+ ```
142
+ - before: |
143
+ ```
144
+ 3 findings
145
+ ```
146
+ after: |
147
+ ```text
148
+ 3 findings
149
+ ```
150
+ keep:
151
+ - ブロックの中身
152
+ avoid:
153
+ - 中身と違う言語名を付ける
154
+ en:
155
+ direction: Give each block without a language the language of its content. Commands are bash, settings yaml or json, output or plain text text. If the content does not settle it, use text. Do not change the code.
156
+ pairs:
157
+ - before: |
158
+ ```
159
+ npx chaffjs README.md
160
+ ```
161
+ after: |
162
+ ```bash
163
+ npx chaffjs README.md
164
+ ```
165
+ - before: |
166
+ ```
167
+ 3 findings
168
+ ```
169
+ after: |
170
+ ```text
171
+ 3 findings
172
+ ```
173
+ keep:
174
+ - the block's content
175
+ avoid:
176
+ - naming a language the content is not in
@@ -0,0 +1,62 @@
1
+ id: colloquial-opener
2
+ layer: L2
3
+ status: stable
4
+ how_to_find: opener-pile
5
+ word_list: colloquial-opener
6
+ requires: [pos]
7
+ languages: [ja]
8
+ severity: info
9
+
10
+ name:
11
+ ja: 文頭の話し言葉の接続詞
12
+ en: A spoken conjunction opening a sentence
13
+
14
+ why:
15
+ ja: 文の頭の「なので」「でも」「だけど」は話し言葉の接続詞です。報告書や案内の中にあると、そこだけ口調が砕けて聞こえます。書き言葉には同じ働きの語(そのため、したがって、しかし)があります。文の途中の「〜なので」は普通の書き方なので見ません。
16
+ en: In Japanese, なので, でも and だけど at the head of a sentence are spoken conjunctions. In a report or a notice they make that sentence sound casual. Written Japanese has words that do the same job (そのため, しかし). なので inside a sentence is ordinary and not checked.
17
+
18
+ message:
19
+ ja: 「{matched}」で始まる文が {count} 個あります({limit} 個から)
20
+ en: '{count} {count|sentence opens|sentences open} with "{matched}" ({limit} needed)'
21
+
22
+ how_to_fix:
23
+ ja: 書き言葉の接続詞に替えてください(なので → そのため、でも → しかし)。
24
+ en: Use the written conjunction (なので → そのため, でも → しかし).
25
+
26
+ levels: { strict: 1, normal: 1, relaxed: 2 }
27
+
28
+ use_for: [business, technical, legal, docs, academic, literature, speech]
29
+ off_for:
30
+ literature: "Spoken 全然大丈夫, なので and より in a character's voice; classical verse has a たり that does not list."
31
+ speech: "Spoken Japanese says 全然大丈夫, opens with なので and greets with より参りました."
32
+
33
+ group: wording
34
+ summary:
35
+ ja: 「なので、」「でも、」のような話し言葉の接続詞で始まる文
36
+ en: A Japanese sentence opening with a spoken conjunction (なので, でも)
37
+ example:
38
+ ja:
39
+ before: |
40
+ 在庫が足りません。なので、出荷は来週になります。
41
+ after: |
42
+ 在庫が足りません。そのため、出荷は来週になります。
43
+
44
+ not_flagged:
45
+ ja: 文の途中の「〜なので」「〜でも」と、書き言葉の接続詞(そのため、しかし、したがって)は指しません。ブログ、文芸、話し言葉のジャンルでは動きません。
46
+ en: なので and でも inside a sentence, and written conjunctions (そのため, しかし), are not reported. Off for blogs, literature and speech.
47
+ level_meaning:
48
+ ja: 話し言葉の接続詞で始まる文が {limit} 個あれば指摘
49
+ en: reported from {limit} sentences opening with a spoken conjunction
50
+ rewrite:
51
+ depth: light
52
+ ja:
53
+ direction: 文頭の話し言葉の接続詞を、同じ働きの書き言葉に替えてください(なので → そのため、でも → しかし、だけど → しかし)。
54
+ pairs:
55
+ - before: 在庫が足りません。なので、出荷は来週になります。
56
+ after: 在庫が足りません。そのため、出荷は来週になります。
57
+ - before: 費用は増えます。でも、作業は半分になります。
58
+ after: 費用は増えます。しかし、作業は半分になります。
59
+ keep:
60
+ - 前の文とのつながりの向き(理由、逆接)
61
+ avoid:
62
+ - 接続詞を消して、つながりの向きを読み手に推させる
@@ -1,6 +1,6 @@
1
1
  id: colon-lead-in
2
2
  layer: L1
3
- status: experimental
3
+ status: stable
4
4
  how_to_find: colon-lead-in
5
5
  # English human writing hands off to a list after a colon as a matter of course: two in a short self-written English
6
6
  # document already passed any limit that the generated-style samples reached. Japanese only until a limit separates them.
@@ -27,6 +27,11 @@ how_to_fix:
27
27
  levels: { strict: 1, normal: 2, relaxed: 4 }
28
28
 
29
29
  use_for: [technical/readme, blog, business, legal, docs, academic, literature, speech]
30
+ off_for:
31
+ legal: "Legal drafting repeats its terms and its sentence heads on purpose, puts the actor in the passive (shall be deemed), and joins long noun compounds (個人情報取扱事業者). This rule would only flag the form."
32
+ docs: "A help page repeats its heading in its first line (To upload a file, ...) and states no claims to back up."
33
+ literature: "Length, rhythm, repetition and register are the author's choices in literature, and dialogue mixes styles. Only what one work can hold itself to runs: consistent spacing and commas, and numbering without gaps."
34
+ speech: "A speech opens with greetings and closes with thanks: that is its form, not padding."
30
35
 
31
36
  group: ai-tells
32
37
  summary:
@@ -58,6 +63,7 @@ level_meaning:
58
63
  ja: コロンで箇条書きへ渡す文が 1000 字あたり {limit} 個まで
59
64
  en: "colon lead-ins to lists: up to {limit} per 1000 characters"
60
65
  rewrite:
66
+ depth: structure
61
67
  ja:
62
68
  direction: コロンで箇条書きへ渡す所のうち、項目が二つか三つで互いに繋がっているものを文に戻してください。手順や部品の一覧は箇条書きのままにします。
63
69
  pairs:
@@ -25,6 +25,12 @@ how_to_fix:
25
25
  levels: { strict: 1, normal: 3, relaxed: 6 }
26
26
 
27
27
  use_for: [blog, business, legal, docs, academic, literature, speech]
28
+ off_for:
29
+ legal: "Legal drafting repeats its terms and its sentence heads on purpose, puts the actor in the passive (shall be deemed), and joins long noun compounds (個人情報取扱事業者). This rule would only flag the form."
30
+ docs: "A help page repeats its heading in its first line (To upload a file, ...) and states no claims to back up."
31
+ academic: "Science writes in the passive, hedges its claims on purpose (may, suggest) and cites numbers as its evidence."
32
+ literature: "Length, rhythm, repetition and register are the author's choices in literature, and dialogue mixes styles. Only what one work can hold itself to runs: consistent spacing and commas, and numbering without gaps."
33
+ speech: "A speech opens with greetings and closes with thanks: that is its form, not padding."
28
34
 
29
35
  group: structure
30
36
  summary:
@@ -1,6 +1,6 @@
1
1
  id: contraction-consistency
2
2
  layer: L2
3
- status: experimental
3
+ status: stable
4
4
  how_to_find: contraction-mix
5
5
  word_list: contraction
6
6
  languages: [en]
@@ -26,6 +26,9 @@ how_to_fix:
26
26
  levels: { strict: 4, normal: 2, relaxed: 1 }
27
27
 
28
28
  use_for: [blog, business, technical, legal, docs, academic, literature, speech]
29
+ off_for:
30
+ literature: "Length, rhythm, repetition and register are the author's choices in literature, and dialogue mixes styles. Only what one work can hold itself to runs: consistent spacing and commas, and numbering without gaps."
31
+ speech/transcript: "A transcript records what was said: its sentences, repeats and register are the speaker's, not the writer's to fix."
29
32
 
30
33
  group: consistency
31
34
  summary:
@@ -1,6 +1,6 @@
1
1
  id: contrast-framing
2
2
  layer: L2
3
- status: experimental
3
+ status: stable
4
4
  how_to_find: contrast-framing
5
5
  word_list: contrast-frame
6
6
  # 打ち消し(it's not)と、それを返す語(it's、but)。後ろに返しが来たときだけ対比の枠になる。
@@ -30,6 +30,11 @@ levels:
30
30
  en: { strict: 2, normal: 3, relaxed: 6 }
31
31
 
32
32
  use_for: [technical/readme, blog, business, legal, docs, academic, literature, speech]
33
+ off_for:
34
+ legal: "Legal drafting repeats its terms and its sentence heads on purpose, puts the actor in the passive (shall be deemed), and joins long noun compounds (個人情報取扱事業者). This rule would only flag the form."
35
+ docs: "A help page repeats its heading in its first line (To upload a file, ...) and states no claims to back up."
36
+ literature: "Length, rhythm, repetition and register are the author's choices in literature, and dialogue mixes styles. Only what one work can hold itself to runs: consistent spacing and commas, and numbering without gaps."
37
+ speech: "A speech opens with greetings and closes with thanks: that is its form, not padding."
33
38
 
34
39
  group: ai-tells
35
40
  summary:
@@ -56,6 +61,7 @@ level_meaning:
56
61
  ja: 1000 字あたり対比の枠 {limit} 個まで
57
62
  en: up to {limit} contrast frames per 1000 words
58
63
  rewrite:
64
+ depth: light
59
65
  ja:
60
66
  direction: 打ち消している側(X)を消し、言いたい側(Y)を普通の文で書いてください。X が誰かの実際の誤解なら、その誤解を書いたうえで一度だけ打ち消してください。
61
67
  pairs:
@@ -0,0 +1,70 @@
1
+ id: cross-doc-duplicate-definition
2
+ layer: L3
3
+ status: experimental
4
+ how_to_find: cross-doc-duplicate-definition
5
+ # documents: compares the files of one run, so it runs only when chaff is given two or more files, or a folder.
6
+ requires: [structure, documents]
7
+ # The words that make a sentence a definition (をいう, means), per language.
8
+ extra_word_lists: [definition-statement]
9
+ severity: warning
10
+
11
+ name:
12
+ ja: ファイルによって違う定義
13
+ en: One term defined differently in different files
14
+
15
+ why:
16
+ ja: 契約書の束や説明書では、同じ語をいくつものファイルで定義することがあります(本契約と別紙、用語集と各ページ)。後から一方だけを直すと、ファイルによって定義が食い違い、どちらの意味で読めばよいか分からなくなります。一度に渡したファイルどうしで、同じ語の定義(「『X』とは、…をいう」"X" means …)の、語の後ろの言葉を比べ、多くのファイルと違う言葉で定義したファイルを指します。全角半角、空白、両端の句読点の違いは問いません。言葉が違っても意味が同じかは機械では決まらないので、確かめる場所を示すだけです。
17
+ en: 'A bundle of contracts or a manual often defines the same term in several files (the agreement and its schedule, the glossary and the pages). When one is changed later and the other is not, the files disagree on what the term means. Across the files given together, the words after the term in each definition ("X" means …, 「X」とは、…をいう) are compared, and a file that defines the term in other words than most files do is pointed out. Width, spaces and the punctuation at either end do not count. Whether two wordings mean the same is not something a machine can decide, so chaff only shows where to look.'
18
+
19
+ message:
20
+ ja: 「{term}」を、一緒に見たほかの {count} ファイルと違う言葉で定義しています(例:{example})
21
+ en: '"{term}" is defined in other words than in {count} other {count|file|files} checked with it (as in {example})'
22
+
23
+ how_to_fix:
24
+ ja: 定義を一か所(用語集や本契約)にまとめ、ほかのファイルからはそこを参照してください。意味を変えているなら、別の語にします。
25
+ en: Keep the definition in one place (the glossary, the main agreement) and refer to it from the other files. If the meaning is meant to differ, use a different term.
26
+
27
+ placeholders:
28
+ term:
29
+ ja: 〇〇
30
+ en: the term
31
+
32
+ levels: { strict: error, normal: warning, relaxed: info }
33
+
34
+ use_for: [business, technical, blog, legal, docs, academic, literature, speech]
35
+
36
+ group: structure
37
+ summary:
38
+ ja: 同じ語を、ファイルによって違う言葉で定義している所
39
+ en: The same term defined in other words in different files
40
+ example:
41
+ ja:
42
+ other: |
43
+ # 用語集
44
+
45
+ 「メンバー」とは、ワークスペースに招かれた人のことです。
46
+ before: |
47
+ # はじめに
48
+
49
+ 「メンバー」とは、料金を払った人のことです。
50
+ after: |
51
+ # はじめに
52
+
53
+ 「メンバー」とは、ワークスペースに招かれた人のことです。
54
+ en:
55
+ other: |
56
+ # Glossary
57
+
58
+ "Member" means a person invited to a workspace.
59
+ before: |
60
+ # Getting started
61
+
62
+ "Member" means a person who pays the fee.
63
+ after: |
64
+ # Getting started
65
+
66
+ "Member" means a person invited to a workspace.
67
+
68
+ not_flagged:
69
+ ja: 範囲を限った定義(「この条において『X』とは」)と、語の後ろに意味を書かない定義(「以下『X』という。」)は比べません。一つのファイルの中で二度定義した語は、最初の定義で比べます(二度目は duplicate-definition が見ます)。全角半角、空白、両端の句読点だけが違う定義は同じとみなします。
70
+ en: Definitions limited to a part ("In this section, X means") and those that give the meaning before the term ('(the "Vendor")') are not compared. A file that defines a term twice is compared by its first definition (duplicate-definition reports the second). Definitions that differ only in width, spaces or the punctuation at either end are taken as the same.
@@ -0,0 +1,64 @@
1
+ id: cross-doc-fact-conflict
2
+ layer: L3
3
+ status: experimental
4
+ how_to_find: cross-doc-fact-conflict
5
+ # documents: compares the files of one run, so it runs only when chaff is given two or more files, or a folder.
6
+ requires: [quantities, documents]
7
+ uses: [pos]
8
+ severity: warning
9
+
10
+ name:
11
+ ja: ファイルによって違う値が書いてある項目
12
+ en: One item given different values in different files
13
+
14
+ why:
15
+ ja: 説明書や文書の束では、料金・版・締切・問い合わせ先のような同じ項目を、いくつものページに書きます。値を直したときに一つのページだけ直し忘れると、ページによって値が食い違い、読み手はどれを信じればよいか分かりません。一度に渡したファイルどうしで、「項目:値」「項目は値です」と書いた所と表の升を読み、同じ項目名(全角半角、大文字小文字は揃えて比べます)に、同じ単位で違う値を書いたファイルを指します。メールアドレスと、三つ以上に区切った版(2.4.1、v3)も値として読みます。どちらが正しいかは決めず、その値を書いたファイルの少ないほうを指します。
16
+ en: 'A manual or a bundle of documents repeats the same items, such as a fee, a version, a deadline or a contact address, on page after page. When a value changes and one page is missed, the pages disagree and the reader cannot tell which to trust. Across the files given together, values written as "Item: value" or "The item is value", and table cells, are read; a file that gives the same item name (case and width aside) a different value in the same unit is pointed out. Email addresses and versions of three parts or more (2.4.1, v3) are read as values too. chaff does not decide which is right; it points at the value fewer files give.'
17
+
18
+ message:
19
+ ja: 「{label}」が {value} と書かれていますが、一緒に見たほかの {count} ファイルでは {other} です(例:{example})
20
+ en: '"{label}" is {value} here, but {other} in {count} other {count|file|files} checked with it (as in {example})'
21
+
22
+ how_to_fix:
23
+ ja: どちらの値が正しいかを確かめて、違うほうを直してください。別のもの(別のプラン、別の版)の値なら、項目名にそれを書き分けてください(「プロプランの月額料金」)。
24
+ en: Check which value is right and correct the other. If they are values of different things (another plan, another release), say so in the item name ("Pro plan monthly fee").
25
+
26
+ levels: { normal: warning, relaxed: info }
27
+
28
+ use_for: [business, technical, blog, legal, docs, academic, literature, speech]
29
+
30
+ group: facts
31
+ summary:
32
+ ja: 同じ項目(料金、版、締切、問い合わせ先)に、ファイルによって違う値を書いた所
33
+ en: The same item (a fee, a version, a deadline, a contact address) given different values in different files
34
+ example:
35
+ ja:
36
+ other: |
37
+ # 料金
38
+
39
+ 月額料金:1,200円
40
+ before: |
41
+ # よくある質問
42
+
43
+ 月額料金:1,500円
44
+ after: |
45
+ # よくある質問
46
+
47
+ 月額料金:1,200円
48
+ en:
49
+ other: |
50
+ # Pricing
51
+
52
+ Monthly fee: $12
53
+ before: |
54
+ # Questions
55
+
56
+ Monthly fee: $15
57
+ after: |
58
+ # Questions
59
+
60
+ Monthly fee: $12
61
+
62
+ not_flagged:
63
+ ja: 一つのファイルの中で同じ項目に二つ以上の値を書いたファイルは数えません(プランごとの料金のような一覧か、ファイルの中の食い違いで、そちらは fact-conflict が見ます)。ファイルどうしで値が三通り以上に分かれる項目も、一覧と読んで何も言いません。単位の違う値、記録の欄(同じ名前が行の頭に何度も出る欄)、値の後ろに条件が続くもの(「1,200円から」)も比べません。
64
+ en: A file that gives an item two or more values is not counted (it is a list, such as a fee per plan, or a conflict within the file, which fact-conflict reports). An item whose values split three or more ways across the files is read as a list and left alone. Values in different units, record fields (the same name at the start of many lines), and values followed by a condition ("$12 per seat") are not compared.