@nielspeter/eess-ts 0.2.1 → 0.5.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 (467) hide show
  1. package/README.md +61 -35
  2. package/dist/builders/call-rule-builder.d.ts +66 -26
  3. package/dist/builders/call-rule-builder.d.ts.map +1 -1
  4. package/dist/builders/call-rule-builder.js +75 -32
  5. package/dist/builders/call-rule-builder.js.map +1 -1
  6. package/dist/builders/class-rule-builder.d.ts +125 -26
  7. package/dist/builders/class-rule-builder.d.ts.map +1 -1
  8. package/dist/builders/class-rule-builder.js +141 -55
  9. package/dist/builders/class-rule-builder.js.map +1 -1
  10. package/dist/builders/correspondence-builder.d.ts +287 -0
  11. package/dist/builders/correspondence-builder.d.ts.map +1 -0
  12. package/dist/builders/correspondence-builder.js +385 -0
  13. package/dist/builders/correspondence-builder.js.map +1 -0
  14. package/dist/builders/correspondence-findings.d.ts +104 -0
  15. package/dist/builders/correspondence-findings.d.ts.map +1 -0
  16. package/dist/builders/correspondence-findings.js +301 -0
  17. package/dist/builders/correspondence-findings.js.map +1 -0
  18. package/dist/builders/cross-layer-builder.d.ts +99 -16
  19. package/dist/builders/cross-layer-builder.d.ts.map +1 -1
  20. package/dist/builders/cross-layer-builder.js +182 -35
  21. package/dist/builders/cross-layer-builder.js.map +1 -1
  22. package/dist/builders/function-rule-builder.d.ts +144 -25
  23. package/dist/builders/function-rule-builder.d.ts.map +1 -1
  24. package/dist/builders/function-rule-builder.js +177 -39
  25. package/dist/builders/function-rule-builder.js.map +1 -1
  26. package/dist/builders/jsx-rule-builder.d.ts +70 -14
  27. package/dist/builders/jsx-rule-builder.d.ts.map +1 -1
  28. package/dist/builders/jsx-rule-builder.js +73 -14
  29. package/dist/builders/jsx-rule-builder.js.map +1 -1
  30. package/dist/builders/module-rule-builder.d.ts +2 -2
  31. package/dist/builders/module-rule-builder.d.ts.map +1 -1
  32. package/dist/builders/module-rule-builder.js +16 -19
  33. package/dist/builders/module-rule-builder.js.map +1 -1
  34. package/dist/builders/scoped-function-rule-builder.d.ts +11 -0
  35. package/dist/builders/scoped-function-rule-builder.d.ts.map +1 -1
  36. package/dist/builders/scoped-function-rule-builder.js +12 -0
  37. package/dist/builders/scoped-function-rule-builder.js.map +1 -1
  38. package/dist/builders/slice-discovery-message.d.ts +36 -0
  39. package/dist/builders/slice-discovery-message.d.ts.map +1 -0
  40. package/dist/builders/slice-discovery-message.js +181 -0
  41. package/dist/builders/slice-discovery-message.js.map +1 -0
  42. package/dist/builders/slice-rule-builder.d.ts +151 -12
  43. package/dist/builders/slice-rule-builder.d.ts.map +1 -1
  44. package/dist/builders/slice-rule-builder.js +243 -35
  45. package/dist/builders/slice-rule-builder.js.map +1 -1
  46. package/dist/builders/type-rule-builder.d.ts +95 -24
  47. package/dist/builders/type-rule-builder.d.ts.map +1 -1
  48. package/dist/builders/type-rule-builder.js +109 -42
  49. package/dist/builders/type-rule-builder.js.map +1 -1
  50. package/dist/{helpers → builders}/within.d.ts +2 -2
  51. package/dist/builders/within.d.ts.map +1 -0
  52. package/dist/{helpers → builders}/within.js +1 -1
  53. package/dist/builders/within.js.map +1 -0
  54. package/dist/cli/commands/baseline.d.ts +8 -3
  55. package/dist/cli/commands/baseline.d.ts.map +1 -1
  56. package/dist/cli/commands/baseline.js +111 -7
  57. package/dist/cli/commands/baseline.js.map +1 -1
  58. package/dist/cli/commands/check.d.ts +7 -2
  59. package/dist/cli/commands/check.d.ts.map +1 -1
  60. package/dist/cli/commands/check.js +385 -47
  61. package/dist/cli/commands/check.js.map +1 -1
  62. package/dist/cli/commands/doctor.d.ts +29 -0
  63. package/dist/cli/commands/doctor.d.ts.map +1 -0
  64. package/dist/cli/commands/doctor.js +224 -0
  65. package/dist/cli/commands/doctor.js.map +1 -0
  66. package/dist/cli/commands/explain.d.ts +2 -1
  67. package/dist/cli/commands/explain.d.ts.map +1 -1
  68. package/dist/cli/commands/explain.js +19 -10
  69. package/dist/cli/commands/explain.js.map +1 -1
  70. package/dist/cli/commands/init.d.ts +9 -3
  71. package/dist/cli/commands/init.d.ts.map +1 -1
  72. package/dist/cli/commands/init.js +162 -137
  73. package/dist/cli/commands/init.js.map +1 -1
  74. package/dist/cli/import-rule-module.d.ts +29 -0
  75. package/dist/cli/import-rule-module.d.ts.map +1 -0
  76. package/dist/cli/import-rule-module.js +47 -0
  77. package/dist/cli/import-rule-module.js.map +1 -0
  78. package/dist/cli/index.d.ts +2 -2
  79. package/dist/cli/index.d.ts.map +1 -1
  80. package/dist/cli/index.js +101 -43
  81. package/dist/cli/index.js.map +1 -1
  82. package/dist/cli/load-rules.d.ts +6 -11
  83. package/dist/cli/load-rules.d.ts.map +1 -1
  84. package/dist/cli/load-rules.js +25 -32
  85. package/dist/cli/load-rules.js.map +1 -1
  86. package/dist/cli/resolve-config.d.ts +0 -8
  87. package/dist/cli/resolve-config.d.ts.map +1 -1
  88. package/dist/cli/resolve-config.js +25 -55
  89. package/dist/cli/resolve-config.js.map +1 -1
  90. package/dist/cli/rule-file-findings.d.ts +178 -0
  91. package/dist/cli/rule-file-findings.d.ts.map +1 -0
  92. package/dist/cli/rule-file-findings.js +351 -0
  93. package/dist/cli/rule-file-findings.js.map +1 -0
  94. package/dist/cli/watch.d.ts +17 -34
  95. package/dist/cli/watch.d.ts.map +1 -1
  96. package/dist/cli/watch.js +14 -129
  97. package/dist/cli/watch.js.map +1 -1
  98. package/dist/conditions/body-analysis-function.d.ts.map +1 -1
  99. package/dist/conditions/body-analysis-function.js +16 -7
  100. package/dist/conditions/body-analysis-function.js.map +1 -1
  101. package/dist/conditions/body-analysis-module.d.ts.map +1 -1
  102. package/dist/conditions/body-analysis-module.js +14 -9
  103. package/dist/conditions/body-analysis-module.js.map +1 -1
  104. package/dist/conditions/body-analysis.d.ts.map +1 -1
  105. package/dist/conditions/body-analysis.js +16 -7
  106. package/dist/conditions/body-analysis.js.map +1 -1
  107. package/dist/conditions/call.d.ts.map +1 -1
  108. package/dist/conditions/call.js +41 -19
  109. package/dist/conditions/call.js.map +1 -1
  110. package/dist/conditions/catch-analysis.d.ts +2 -1
  111. package/dist/conditions/catch-analysis.d.ts.map +1 -1
  112. package/dist/conditions/catch-analysis.js.map +1 -1
  113. package/dist/conditions/cross-layer.d.ts +2 -10
  114. package/dist/conditions/cross-layer.d.ts.map +1 -1
  115. package/dist/conditions/cross-layer.js +227 -23
  116. package/dist/conditions/cross-layer.js.map +1 -1
  117. package/dist/conditions/dependency.d.ts +35 -6
  118. package/dist/conditions/dependency.d.ts.map +1 -1
  119. package/dist/conditions/dependency.js +299 -45
  120. package/dist/conditions/dependency.js.map +1 -1
  121. package/dist/conditions/exports.d.ts.map +1 -1
  122. package/dist/conditions/exports.js +41 -37
  123. package/dist/conditions/exports.js.map +1 -1
  124. package/dist/conditions/function.d.ts.map +1 -1
  125. package/dist/conditions/function.js +19 -5
  126. package/dist/conditions/function.js.map +1 -1
  127. package/dist/conditions/helpers.d.ts +2 -1
  128. package/dist/conditions/helpers.d.ts.map +1 -1
  129. package/dist/conditions/helpers.js +4 -1
  130. package/dist/conditions/helpers.js.map +1 -1
  131. package/dist/conditions/jsx.d.ts.map +1 -1
  132. package/dist/conditions/jsx.js +7 -2
  133. package/dist/conditions/jsx.js.map +1 -1
  134. package/dist/conditions/match-identity.d.ts +43 -0
  135. package/dist/conditions/match-identity.d.ts.map +1 -0
  136. package/dist/conditions/match-identity.js +43 -0
  137. package/dist/conditions/match-identity.js.map +1 -0
  138. package/dist/conditions/members.d.ts.map +1 -1
  139. package/dist/conditions/members.js +20 -6
  140. package/dist/conditions/members.js.map +1 -1
  141. package/dist/conditions/reverse-dependency.d.ts +18 -5
  142. package/dist/conditions/reverse-dependency.d.ts.map +1 -1
  143. package/dist/conditions/reverse-dependency.js +155 -93
  144. package/dist/conditions/reverse-dependency.js.map +1 -1
  145. package/dist/conditions/slice.d.ts +86 -2
  146. package/dist/conditions/slice.d.ts.map +1 -1
  147. package/dist/conditions/slice.js +234 -53
  148. package/dist/conditions/slice.js.map +1 -1
  149. package/dist/conditions/structural.d.ts.map +1 -1
  150. package/dist/conditions/structural.js +16 -4
  151. package/dist/conditions/structural.js.map +1 -1
  152. package/dist/core/check-all.d.ts +19 -0
  153. package/dist/core/check-all.d.ts.map +1 -0
  154. package/dist/core/check-all.js +150 -0
  155. package/dist/core/check-all.js.map +1 -0
  156. package/dist/core/combinators.d.ts +48 -0
  157. package/dist/core/combinators.d.ts.map +1 -0
  158. package/dist/core/combinators.js +49 -0
  159. package/dist/core/combinators.js.map +1 -0
  160. package/dist/core/descendant-cache.d.ts +36 -0
  161. package/dist/core/descendant-cache.d.ts.map +1 -0
  162. package/dist/core/descendant-cache.js +117 -0
  163. package/dist/core/descendant-cache.js.map +1 -0
  164. package/dist/core/diagnose.d.ts +234 -0
  165. package/dist/core/diagnose.d.ts.map +1 -0
  166. package/dist/core/diagnose.js +390 -0
  167. package/dist/core/diagnose.js.map +1 -0
  168. package/dist/core/disk-set.d.ts +48 -0
  169. package/dist/core/disk-set.d.ts.map +1 -0
  170. package/dist/core/disk-set.js +218 -0
  171. package/dist/core/disk-set.js.map +1 -0
  172. package/dist/core/element-cache.d.ts +75 -0
  173. package/dist/core/element-cache.d.ts.map +1 -0
  174. package/dist/core/element-cache.js +32 -0
  175. package/dist/core/element-cache.js.map +1 -0
  176. package/dist/core/empty-project-advice.d.ts +75 -0
  177. package/dist/core/empty-project-advice.d.ts.map +1 -0
  178. package/dist/core/empty-project-advice.js +61 -0
  179. package/dist/core/empty-project-advice.js.map +1 -0
  180. package/dist/core/exclusion-comments.d.ts +19 -0
  181. package/dist/core/exclusion-comments.d.ts.map +1 -0
  182. package/dist/core/exclusion-comments.js +7 -0
  183. package/dist/core/exclusion-comments.js.map +1 -0
  184. package/dist/core/execute-rule.d.ts +158 -0
  185. package/dist/core/execute-rule.d.ts.map +1 -0
  186. package/dist/core/execute-rule.js +666 -0
  187. package/dist/core/execute-rule.js.map +1 -0
  188. package/dist/core/glob-diagnosis.d.ts +78 -0
  189. package/dist/core/glob-diagnosis.d.ts.map +1 -0
  190. package/dist/core/glob-diagnosis.js +134 -0
  191. package/dist/core/glob-diagnosis.js.map +1 -0
  192. package/dist/core/glob-evaluator.d.ts +48 -0
  193. package/dist/core/glob-evaluator.d.ts.map +1 -0
  194. package/dist/core/glob-evaluator.js +89 -0
  195. package/dist/core/glob-evaluator.js.map +1 -0
  196. package/dist/core/import-candidates.d.ts +60 -0
  197. package/dist/core/import-candidates.d.ts.map +1 -0
  198. package/dist/core/import-candidates.js +93 -0
  199. package/dist/core/import-candidates.js.map +1 -0
  200. package/dist/core/import-options.d.ts +55 -2
  201. package/dist/core/import-options.d.ts.map +1 -1
  202. package/dist/core/import-options.js +64 -0
  203. package/dist/core/import-options.js.map +1 -1
  204. package/dist/core/invalidate-on-modify.d.ts +20 -0
  205. package/dist/core/invalidate-on-modify.d.ts.map +1 -0
  206. package/dist/core/invalidate-on-modify.js +26 -0
  207. package/dist/core/invalidate-on-modify.js.map +1 -0
  208. package/dist/core/line-index.d.ts +3 -0
  209. package/dist/core/line-index.d.ts.map +1 -0
  210. package/dist/core/line-index.js +227 -0
  211. package/dist/core/line-index.js.map +1 -0
  212. package/dist/core/metric-violation.d.ts +86 -0
  213. package/dist/core/metric-violation.d.ts.map +1 -0
  214. package/dist/core/metric-violation.js +132 -0
  215. package/dist/core/metric-violation.js.map +1 -0
  216. package/dist/core/module-edges.d.ts +361 -0
  217. package/dist/core/module-edges.d.ts.map +1 -0
  218. package/dist/core/module-edges.js +593 -0
  219. package/dist/core/module-edges.js.map +1 -0
  220. package/dist/core/object-literal-functions.d.ts +42 -0
  221. package/dist/core/object-literal-functions.d.ts.map +1 -0
  222. package/dist/core/object-literal-functions.js +75 -0
  223. package/dist/core/object-literal-functions.js.map +1 -0
  224. package/dist/core/orphan-exclusions.d.ts +44 -0
  225. package/dist/core/orphan-exclusions.d.ts.map +1 -0
  226. package/dist/core/orphan-exclusions.js +224 -0
  227. package/dist/core/orphan-exclusions.js.map +1 -0
  228. package/dist/core/pair-condition.d.ts +32 -3
  229. package/dist/core/pair-condition.d.ts.map +1 -1
  230. package/dist/core/path-universe.d.ts +22 -0
  231. package/dist/core/path-universe.d.ts.map +1 -0
  232. package/dist/core/path-universe.js +45 -0
  233. package/dist/core/path-universe.js.map +1 -0
  234. package/dist/core/per-root-compiler-options.d.ts +20 -0
  235. package/dist/core/per-root-compiler-options.d.ts.map +1 -0
  236. package/dist/core/per-root-compiler-options.js +57 -0
  237. package/dist/core/per-root-compiler-options.js.map +1 -0
  238. package/dist/core/project-relative.d.ts +98 -0
  239. package/dist/core/project-relative.d.ts.map +1 -0
  240. package/dist/core/project-relative.js +185 -0
  241. package/dist/core/project-relative.js.map +1 -0
  242. package/dist/core/project.d.ts +7 -1
  243. package/dist/core/project.d.ts.map +1 -1
  244. package/dist/core/project.js +29 -4
  245. package/dist/core/project.js.map +1 -1
  246. package/dist/core/rule-builder.d.ts +303 -0
  247. package/dist/core/rule-builder.d.ts.map +1 -0
  248. package/dist/core/rule-builder.js +463 -0
  249. package/dist/core/rule-builder.js.map +1 -0
  250. package/dist/core/rule-declaration.d.ts +32 -0
  251. package/dist/core/rule-declaration.d.ts.map +1 -0
  252. package/dist/core/rule-declaration.js +88 -0
  253. package/dist/core/rule-declaration.js.map +1 -0
  254. package/dist/core/terminal-builder.d.ts +629 -0
  255. package/dist/core/terminal-builder.d.ts.map +1 -0
  256. package/dist/core/terminal-builder.js +807 -0
  257. package/dist/core/terminal-builder.js.map +1 -0
  258. package/dist/core/terminal-execution.d.ts +39 -0
  259. package/dist/core/terminal-execution.d.ts.map +1 -0
  260. package/dist/core/terminal-execution.js +103 -0
  261. package/dist/core/terminal-execution.js.map +1 -0
  262. package/dist/core/ts-comment-mask.d.ts +2 -0
  263. package/dist/core/ts-comment-mask.d.ts.map +1 -0
  264. package/dist/core/ts-comment-mask.js +102 -0
  265. package/dist/core/ts-comment-mask.js.map +1 -0
  266. package/dist/core/vacuity-diagnosis.d.ts +103 -0
  267. package/dist/core/vacuity-diagnosis.d.ts.map +1 -0
  268. package/dist/core/vacuity-diagnosis.js +415 -0
  269. package/dist/core/vacuity-diagnosis.js.map +1 -0
  270. package/dist/core/violation.d.ts +16 -11
  271. package/dist/core/violation.d.ts.map +1 -1
  272. package/dist/core/violation.js +33 -13
  273. package/dist/core/violation.js.map +1 -1
  274. package/dist/graphql/graphql-rule-builder.d.ts +95 -0
  275. package/dist/graphql/graphql-rule-builder.d.ts.map +1 -0
  276. package/dist/graphql/graphql-rule-builder.js +127 -0
  277. package/dist/graphql/graphql-rule-builder.js.map +1 -0
  278. package/dist/graphql/index.d.ts +1 -0
  279. package/dist/graphql/index.d.ts.map +1 -1
  280. package/dist/graphql/index.js +2 -1
  281. package/dist/graphql/index.js.map +1 -1
  282. package/dist/graphql/resolver-rule-builder.d.ts +44 -23
  283. package/dist/graphql/resolver-rule-builder.d.ts.map +1 -1
  284. package/dist/graphql/resolver-rule-builder.js +80 -72
  285. package/dist/graphql/resolver-rule-builder.js.map +1 -1
  286. package/dist/graphql/schema-loader.d.ts +21 -0
  287. package/dist/graphql/schema-loader.d.ts.map +1 -1
  288. package/dist/graphql/schema-loader.js +82 -12
  289. package/dist/graphql/schema-loader.js.map +1 -1
  290. package/dist/graphql/schema-predicates.d.ts.map +1 -1
  291. package/dist/graphql/schema-predicates.js +17 -12
  292. package/dist/graphql/schema-predicates.js.map +1 -1
  293. package/dist/graphql/schema-rule-builder.d.ts +15 -24
  294. package/dist/graphql/schema-rule-builder.d.ts.map +1 -1
  295. package/dist/graphql/schema-rule-builder.js +39 -77
  296. package/dist/graphql/schema-rule-builder.js.map +1 -1
  297. package/dist/helpers/baseline-diagnostics.d.ts +45 -0
  298. package/dist/helpers/baseline-diagnostics.d.ts.map +1 -0
  299. package/dist/helpers/baseline-diagnostics.js +168 -0
  300. package/dist/helpers/baseline-diagnostics.js.map +1 -0
  301. package/dist/helpers/baseline-generator.d.ts +28 -0
  302. package/dist/helpers/baseline-generator.d.ts.map +1 -0
  303. package/dist/helpers/baseline-generator.js +27 -0
  304. package/dist/helpers/baseline-generator.js.map +1 -0
  305. package/dist/helpers/baseline.d.ts +336 -0
  306. package/dist/helpers/baseline.d.ts.map +1 -0
  307. package/dist/helpers/baseline.js +664 -0
  308. package/dist/helpers/baseline.js.map +1 -0
  309. package/dist/helpers/body-traversal.d.ts +27 -2
  310. package/dist/helpers/body-traversal.d.ts.map +1 -1
  311. package/dist/helpers/body-traversal.js +135 -16
  312. package/dist/helpers/body-traversal.js.map +1 -1
  313. package/dist/helpers/callback-extractor.d.ts.map +1 -1
  314. package/dist/helpers/callback-extractor.js +53 -84
  315. package/dist/helpers/callback-extractor.js.map +1 -1
  316. package/dist/helpers/complexity.d.ts +13 -5
  317. package/dist/helpers/complexity.d.ts.map +1 -1
  318. package/dist/helpers/complexity.js +15 -6
  319. package/dist/helpers/complexity.js.map +1 -1
  320. package/dist/helpers/diff-aware.d.ts +16 -0
  321. package/dist/helpers/diff-aware.d.ts.map +1 -0
  322. package/dist/helpers/diff-aware.js +16 -0
  323. package/dist/helpers/diff-aware.js.map +1 -0
  324. package/dist/helpers/matchers.d.ts +68 -7
  325. package/dist/helpers/matchers.d.ts.map +1 -1
  326. package/dist/helpers/matchers.js +164 -86
  327. package/dist/helpers/matchers.js.map +1 -1
  328. package/dist/helpers/slice-graph.d.ts +100 -8
  329. package/dist/helpers/slice-graph.d.ts.map +1 -1
  330. package/dist/helpers/slice-graph.js +126 -34
  331. package/dist/helpers/slice-graph.js.map +1 -1
  332. package/dist/helpers/tarjan.d.ts +0 -14
  333. package/dist/helpers/tarjan.d.ts.map +1 -1
  334. package/dist/helpers/tarjan.js +29 -16
  335. package/dist/helpers/tarjan.js.map +1 -1
  336. package/dist/index.d.ts +55 -19
  337. package/dist/index.d.ts.map +1 -1
  338. package/dist/index.js +67 -15
  339. package/dist/index.js.map +1 -1
  340. package/dist/models/arch-call.d.ts +3 -2
  341. package/dist/models/arch-call.d.ts.map +1 -1
  342. package/dist/models/arch-call.js.map +1 -1
  343. package/dist/models/arch-function.d.ts +54 -8
  344. package/dist/models/arch-function.d.ts.map +1 -1
  345. package/dist/models/arch-function.js +145 -8
  346. package/dist/models/arch-function.js.map +1 -1
  347. package/dist/models/arch-jsx-element.d.ts.map +1 -1
  348. package/dist/models/arch-jsx-element.js +18 -19
  349. package/dist/models/arch-jsx-element.js.map +1 -1
  350. package/dist/models/slice.d.ts +33 -9
  351. package/dist/models/slice.d.ts.map +1 -1
  352. package/dist/models/slice.js +129 -19
  353. package/dist/models/slice.js.map +1 -1
  354. package/dist/predicates/call.d.ts.map +1 -1
  355. package/dist/predicates/call.js +5 -0
  356. package/dist/predicates/call.js.map +1 -1
  357. package/dist/predicates/identity.d.ts +21 -0
  358. package/dist/predicates/identity.d.ts.map +1 -1
  359. package/dist/predicates/identity.js +75 -3
  360. package/dist/predicates/identity.js.map +1 -1
  361. package/dist/predicates/index.d.ts +1 -1
  362. package/dist/predicates/index.d.ts.map +1 -1
  363. package/dist/predicates/index.js +1 -1
  364. package/dist/predicates/index.js.map +1 -1
  365. package/dist/predicates/jsx.d.ts.map +1 -1
  366. package/dist/predicates/jsx.js +2 -1
  367. package/dist/predicates/jsx.js.map +1 -1
  368. package/dist/predicates/metrics.d.ts +4 -2
  369. package/dist/predicates/metrics.d.ts.map +1 -1
  370. package/dist/predicates/metrics.js +4 -2
  371. package/dist/predicates/metrics.js.map +1 -1
  372. package/dist/predicates/module.d.ts +4 -12
  373. package/dist/predicates/module.d.ts.map +1 -1
  374. package/dist/predicates/module.js +57 -37
  375. package/dist/predicates/module.js.map +1 -1
  376. package/dist/presets/agent-guardrails.d.ts +49 -16
  377. package/dist/presets/agent-guardrails.d.ts.map +1 -1
  378. package/dist/presets/agent-guardrails.js +308 -19
  379. package/dist/presets/agent-guardrails.js.map +1 -1
  380. package/dist/presets/boundaries.d.ts +46 -3
  381. package/dist/presets/boundaries.d.ts.map +1 -1
  382. package/dist/presets/boundaries.js +132 -23
  383. package/dist/presets/boundaries.js.map +1 -1
  384. package/dist/presets/data-layer.d.ts +23 -3
  385. package/dist/presets/data-layer.d.ts.map +1 -1
  386. package/dist/presets/data-layer.js +58 -16
  387. package/dist/presets/data-layer.js.map +1 -1
  388. package/dist/presets/index.d.ts +10 -5
  389. package/dist/presets/index.d.ts.map +1 -1
  390. package/dist/presets/index.js +19 -3
  391. package/dist/presets/index.js.map +1 -1
  392. package/dist/presets/layered.d.ts +47 -3
  393. package/dist/presets/layered.d.ts.map +1 -1
  394. package/dist/presets/layered.js +66 -29
  395. package/dist/presets/layered.js.map +1 -1
  396. package/dist/presets/recommended.d.ts +81 -10
  397. package/dist/presets/recommended.d.ts.map +1 -1
  398. package/dist/presets/recommended.js +25 -23
  399. package/dist/presets/recommended.js.map +1 -1
  400. package/dist/presets/shared.d.ts +267 -2
  401. package/dist/presets/shared.d.ts.map +1 -1
  402. package/dist/presets/shared.js +367 -4
  403. package/dist/presets/shared.js.map +1 -1
  404. package/dist/rules/code-quality.d.ts.map +1 -1
  405. package/dist/rules/code-quality.js +15 -6
  406. package/dist/rules/code-quality.js.map +1 -1
  407. package/dist/rules/hygiene.d.ts +1 -1
  408. package/dist/rules/hygiene.js +1 -1
  409. package/dist/rules/metrics-function.d.ts +2 -1
  410. package/dist/rules/metrics-function.d.ts.map +1 -1
  411. package/dist/rules/metrics-function.js +63 -39
  412. package/dist/rules/metrics-function.js.map +1 -1
  413. package/dist/rules/metrics.d.ts +2 -1
  414. package/dist/rules/metrics.d.ts.map +1 -1
  415. package/dist/rules/metrics.js +80 -47
  416. package/dist/rules/metrics.js.map +1 -1
  417. package/dist/smells/clusters.d.ts +78 -0
  418. package/dist/smells/clusters.d.ts.map +1 -0
  419. package/dist/smells/clusters.js +124 -0
  420. package/dist/smells/clusters.js.map +1 -0
  421. package/dist/smells/duplicate-bodies.d.ts +92 -5
  422. package/dist/smells/duplicate-bodies.d.ts.map +1 -1
  423. package/dist/smells/duplicate-bodies.js +203 -73
  424. package/dist/smells/duplicate-bodies.js.map +1 -1
  425. package/dist/smells/duplicate-report.d.ts +90 -0
  426. package/dist/smells/duplicate-report.d.ts.map +1 -0
  427. package/dist/smells/duplicate-report.js +344 -0
  428. package/dist/smells/duplicate-report.js.map +1 -0
  429. package/dist/smells/fingerprint.d.ts +20 -1
  430. package/dist/smells/fingerprint.d.ts.map +1 -1
  431. package/dist/smells/fingerprint.js +27 -3
  432. package/dist/smells/fingerprint.js.map +1 -1
  433. package/dist/smells/inconsistent-siblings.d.ts +128 -7
  434. package/dist/smells/inconsistent-siblings.d.ts.map +1 -1
  435. package/dist/smells/inconsistent-siblings.js +288 -86
  436. package/dist/smells/inconsistent-siblings.js.map +1 -1
  437. package/dist/smells/sibling-files.d.ts +47 -0
  438. package/dist/smells/sibling-files.d.ts.map +1 -0
  439. package/dist/smells/sibling-files.js +104 -0
  440. package/dist/smells/sibling-files.js.map +1 -0
  441. package/dist/smells/similar-pairs.d.ts +28 -0
  442. package/dist/smells/similar-pairs.d.ts.map +1 -0
  443. package/dist/smells/similar-pairs.js +134 -0
  444. package/dist/smells/similar-pairs.js.map +1 -0
  445. package/dist/smells/smell-builder.d.ts +57 -12
  446. package/dist/smells/smell-builder.d.ts.map +1 -1
  447. package/dist/smells/smell-builder.js +112 -14
  448. package/dist/smells/smell-builder.js.map +1 -1
  449. package/dist/smells/variation.d.ts +47 -0
  450. package/dist/smells/variation.d.ts.map +1 -0
  451. package/dist/smells/variation.js +90 -0
  452. package/dist/smells/variation.js.map +1 -0
  453. package/dist/tsconfig/index.d.ts +19 -0
  454. package/dist/tsconfig/index.d.ts.map +1 -0
  455. package/dist/tsconfig/index.js +20 -0
  456. package/dist/tsconfig/index.js.map +1 -0
  457. package/dist/tsconfig/tsconfig-builder.d.ts +42 -9
  458. package/dist/tsconfig/tsconfig-builder.d.ts.map +1 -1
  459. package/dist/tsconfig/tsconfig-builder.js +65 -16
  460. package/dist/tsconfig/tsconfig-builder.js.map +1 -1
  461. package/package.json +4 -2
  462. package/dist/core/module-dependencies.d.ts +0 -28
  463. package/dist/core/module-dependencies.d.ts.map +0 -1
  464. package/dist/core/module-dependencies.js +0 -35
  465. package/dist/core/module-dependencies.js.map +0 -1
  466. package/dist/helpers/within.d.ts.map +0 -1
  467. package/dist/helpers/within.js.map +0 -1
@@ -0,0 +1,463 @@
1
+ import { selectMatching, recordPredicate, matchingElements } from '@nielspeter/eess/internal';
2
+ import { conditionContextFrom } from '@nielspeter/eess/internal';
3
+ import { assertionAdviceOf, buildRuleDescription, describeRuleOf, globsOf, } from './rule-declaration.js';
4
+ import { TerminalBuilder } from './terminal-builder.js';
5
+ import { assertsCardinality, collectResult } from '@nielspeter/eess';
6
+ /**
7
+ * Abstract base class for the predicate/condition rule builders.
8
+ *
9
+ * Concrete entry points (plans 0007+) extend this and:
10
+ * 1. Implement `getElements()` to return the elements to check
11
+ * 2. Add predicate methods that call `addPredicate()`
12
+ * 3. Add condition methods that call `addCondition()`
13
+ *
14
+ * The builder accumulates predicates and conditions. Nothing executes
15
+ * until a terminal method (`.check()`, `.warn()`, `.severity()`) is called.
16
+ *
17
+ * Extends `TerminalBuilder`, which owns everything that is not about the
18
+ * predicate/condition pipeline: `because`, `rule`, `excluding`, `violations`,
19
+ * `check`, `warn`, `asSeverity`, `severity`. Those used to exist twice, once
20
+ * here and once there, and the two copies had already drifted — this class's
21
+ * `excluding()` documented matching against element/file/message while the
22
+ * other still claimed element only, and the more accurate one was the one
23
+ * fewer builders inherited.
24
+ *
25
+ * The cost of the second root was not duplication, it was silent
26
+ * non-coverage: the materialized subject set (plan 0064) and the
27
+ * empty-selector guard (plan 0067) were added here and never reached the
28
+ * seven builders on the other branch. Plan 0069 needs `globs()` to reach all
29
+ * thirteen, so it goes on the root and the root is now singular.
30
+ */
31
+ export class RuleBuilder extends TerminalBuilder {
32
+ project;
33
+ _predicates = [];
34
+ _conditions = [];
35
+ _phase = 'predicate';
36
+ // Plan 0070: state for the assertion-less remedies. `_phase` cannot carry
37
+ // either fact — `.should().that()` legally returns to the predicate phase,
38
+ // so `_phase === 'predicate'` does not mean `.should()` was never reached,
39
+ // and a predicate applied after `should()` leaves no other trace.
40
+ _reachedShould = false;
41
+ _misplaced = [];
42
+ /** `.expectEmpty()` — plan 0074. Asserts the selection is empty, and fails when it is not. */
43
+ constructor(project) {
44
+ super();
45
+ this.project = project;
46
+ }
47
+ // --- Chain methods (grammar transitions) ---
48
+ /**
49
+ * Begin the predicate phase. Returns a COPY, per bug 0016 — a held selection
50
+ * is never edited by narrowing it. Every ordinary chain is unaffected,
51
+ * because the copy is what the chain continues on; what changed is that
52
+ * `held.that()...` no longer reaches back into `held`.
53
+ * Purely a readability marker — `.that().haveNameMatching(...)` reads like English.
54
+ * Explicitly resets phase to 'predicate' — defensive against `.should().that()` misuse.
55
+ */
56
+ that() {
57
+ const next = this.copy();
58
+ next._phase = 'predicate';
59
+ return next;
60
+ }
61
+ /**
62
+ * Add another predicate (AND). Returns `this` for chaining.
63
+ * `.that().extend('Base').and().resideInFolder('src/repos/**')` means both must match.
64
+ */
65
+ and() {
66
+ return this;
67
+ }
68
+ /**
69
+ * Begin the condition phase. Returns a forked builder for named selection safety.
70
+ * Creates a fresh builder with the same predicates but empty conditions.
71
+ * Sets phase to 'condition' so dual-use methods dispatch correctly.
72
+ */
73
+ should() {
74
+ const fork = this.fork();
75
+ fork._phase = 'condition';
76
+ fork._reachedShould = true;
77
+ return fork;
78
+ }
79
+ /**
80
+ * Add another condition that must ALSO pass (AND).
81
+ * `.should().notContain(call('x')).andShould().notContain(call('y'))` means both must hold.
82
+ */
83
+ andShould() {
84
+ return this;
85
+ }
86
+ /**
87
+ * Plug in a custom predicate or condition.
88
+ *
89
+ * After `.that()` — pass a `Predicate<T>` to filter elements.
90
+ * After `.should()` — pass a `Condition<T>` to assert against filtered elements.
91
+ *
92
+ * Dispatch is structural: if the object has a `test` method it is treated
93
+ * as a predicate; if it has `evaluate` it is treated as a condition.
94
+ */
95
+ satisfy(custom) {
96
+ if ('test' in custom) {
97
+ return this.addPredicate(custom);
98
+ }
99
+ return this.addCondition(custom);
100
+ }
101
+ // --- Terminal methods ---
102
+ /**
103
+ * Return the predicate-filtered elements as a labelled `Selection<T>` for
104
+ * cross-validation (`crossProject()`). The set is exactly the elements this
105
+ * rule would evaluate — the same filtering `.check()` applies.
106
+ *
107
+ * **Restored in plan 0165 Phase 2.** `select()` is eess's, not upstream's: it
108
+ * is the side of the kernel's two-sided join, and `@nielspeter/eess-crossvalidate`
109
+ * is built entirely on it — four of its five source files failed `tsc` and 33 of
110
+ * its tests failed without it. The wholesale engine copy of plan 0165 dropped it
111
+ * along with the rest of eess's `RuleBuilder`.
112
+ *
113
+ * Stateless by construction, which is why it can live here while the kernel keeps
114
+ * its own copy: it reads `getElements()` and `_predicates` and returns a plain
115
+ * object. The duplication that matters — and that Phase 1 measured breaking — is
116
+ * module-level STATE, not a pure method.
117
+ *
118
+ * @param opts.label - human-readable name of this side ("diagram class")
119
+ * @param opts.identify - map an element to its message metadata (name/file/line)
120
+ */
121
+ select(opts) {
122
+ // The kernel's — this was byte-identical, and the hierarchies differ, so a
123
+ // free function is the only way the two builders can share it.
124
+ return selectMatching(this.getElements(), this._predicates, opts);
125
+ }
126
+ /** This rule as declared — the input every description and advice reads. */
127
+ asDeclared() {
128
+ return {
129
+ predicates: this._predicates,
130
+ conditions: this._conditions,
131
+ misplaced: this._misplaced,
132
+ reachedShould: this._reachedShould,
133
+ metadata: this._metadata,
134
+ reason: this._reason,
135
+ };
136
+ }
137
+ /**
138
+ * Return a structured description of this rule without executing it.
139
+ * Used by the `explain` CLI subcommand.
140
+ */
141
+ describeRule() {
142
+ return describeRuleOf(this.asDeclared());
143
+ }
144
+ /**
145
+ * Return the subject set this rule would evaluate: the elements matched by
146
+ * the predicate chain (`.that()...`), before any condition runs. Executes the
147
+ * predicate filter and returns the materialized set.
148
+ *
149
+ * Distinct from the abstract `getElements()`, which is the *pre-filter*
150
+ * population. This is the materialization contract (F1, plan 0064) that
151
+ * composable primitives build on — `crossProject().side(selection, keyFn)`
152
+ * keys each subject, and `.expectNonEmpty()` (plan 0064+) asserts the set is
153
+ * non-empty. It does not evaluate conditions and never warns about their
154
+ * absence, so it is safe to call on a bare `.that()` selection.
155
+ *
156
+ * Note (ADR-007): the returned `T` is the builder's element type (e.g. a
157
+ * ts-morph `ClassDeclaration` for `classes()`), so this is an acknowledged
158
+ * raw-node seam for callers that derive keys from subjects.
159
+ */
160
+ subjects() {
161
+ return this.filterElements();
162
+ }
163
+ /**
164
+ * The selector and condition globs this rule declares.
165
+ *
166
+ * `position` is derived, not declared: a predicate registered while
167
+ * `_phase` is `'predicate'` is a selector, one registered after `.should()`
168
+ * is a condition. That is a structural fact about where the code is, which
169
+ * is why it is not on `DeclaredGlob` for an author to get wrong.
170
+ */
171
+ globs() {
172
+ return globsOf(this.asDeclared());
173
+ }
174
+ /**
175
+ * The project this rule was built against.
176
+ *
177
+ * Used by `within()` to create scoped builders, and by `doctor` to find the
178
+ * project to compare globs against — which must be the one the rules
179
+ * actually ran on, not one the CLI guessed at.
180
+ */
181
+ /**
182
+ * Plan 0074: is EVERY condition satisfied by an empty selection?
183
+ *
184
+ * `.every()`, not `.some()` — `andShould()` ANDs, so a rule reading
185
+ * `.should().notExist().andShould().beExported()` still asserts something
186
+ * about subjects that exist, and exempting it on the strength of one
187
+ * cardinality condition would silence the other. 0069's appendix names this
188
+ * as an implementation constraint; the first cut used `.some()`.
189
+ *
190
+ * An empty condition list is NOT exempt: `[].every()` is `true`, and a rule
191
+ * with no conditions is the assertion-less case that its own gate reports.
192
+ */
193
+ assertsCardinality() {
194
+ if (this._conditions.length === 0)
195
+ return false;
196
+ return this._conditions.every((condition) => assertsCardinality(condition));
197
+ }
198
+ /**
199
+ * The project this rule was built against.
200
+ *
201
+ * Public because the empty-project and dead-glob findings are constructed by
202
+ * `TerminalBuilder`, which has no project of its own to consult.
203
+ */
204
+ getProject() {
205
+ return this.project;
206
+ }
207
+ /**
208
+ * Whether this rule asserts anything about the elements it selected.
209
+ *
210
+ * `.that()...` with no `.should()` selects a set and then says nothing about
211
+ * it, so it can never fail — proposal 019. Exposed as a method because
212
+ * `_conditions` is protected and `doctor` must not duck-type a private name.
213
+ *
214
+ * **A misplaced predicate disqualifies the rule even when conditions exist**,
215
+ * which `_conditions.length > 0` alone did not. Measured on the shipped 0.23.0
216
+ * branch, and it is the worst shape of the seven rather than a corner:
217
+ *
218
+ * functions(p).that().haveNameMatching(/^parse/).should().notExist().areAsync()
219
+ * subjects 4 -> 0 violations 4 -> 0 diagnose() [] check() passes
220
+ *
221
+ * `areAsync()` after `.should()` lands in `addPredicate` and retroactively
222
+ * narrows the set every condition is evaluated over — here to nothing, so
223
+ * `notExist` holds vacuously. The rule reads as deliberate, its description
224
+ * reads as deliberate, and it certifies nothing. Every other assertion-less
225
+ * shape at least looks unfinished; this one does not, so the author has no
226
+ * reason to look. Under ADR-008 the finding is not optional: the remedy is
227
+ * one method call and nothing about it is a judgement call.
228
+ */
229
+ assertsSomething() {
230
+ return this._conditions.length > 0 && this._misplaced.length === 0;
231
+ }
232
+ /**
233
+ * Three assertion-less states, three remedies (plan 0070). Branching on
234
+ * `_reachedShould`/`_misplaced`, never `_phase` — `.should().that()` lands
235
+ * in the predicate phase having reached `.should()`, and would be told a
236
+ * verifiable falsehood by any phase-derived message.
237
+ */
238
+ assertionAdvice() {
239
+ return assertionAdviceOf(this.asDeclared());
240
+ }
241
+ /**
242
+ * The root's collection hook. `evaluate()` is this builder's pipeline —
243
+ * filter by predicates, run conditions, add the empty-selector finding —
244
+ * and the root's terminal methods do the rest.
245
+ */
246
+ collectViolations() {
247
+ // Plan 0098. The unit is the POST-predicate set — what the conditions
248
+ // actually receive — not `getElements()`. `filterElements()` is memoized per
249
+ // builder (`element-cache.ts`), so asking here and again inside `evaluate()`
250
+ // walks once.
251
+ return collectResult(this.evaluate(), { examined: this.examinedUnits() });
252
+ }
253
+ /**
254
+ * Units this rule examined — plan 0098: the POST-predicate subjects, which is
255
+ * exactly what `subjects()` returns and what the conditions receive.
256
+ *
257
+ * Public for the same structural reason as `assertsSomething()`: `diagnose()`
258
+ * reads it through a structural interface and a protected member cannot
259
+ * satisfy one. One definition, two readers — `collectViolations()` above and
260
+ * the preview — so the number the gate carries and the number the preview
261
+ * reports cannot drift apart.
262
+ */
263
+ examinedUnits() {
264
+ return this.filterElements().length;
265
+ }
266
+ // --- Protected: for subclasses ---
267
+ /**
268
+ * Register a predicate. Called by concrete builder methods like
269
+ * `.haveNameMatching()`, `.extend()`, etc.
270
+ */
271
+ addPredicate(predicate) {
272
+ const next = this.copy();
273
+ // The kernel's. The two copies differed only in comment wording and braces.
274
+ recordPredicate(predicate, next._predicates, next._misplaced, next._phase);
275
+ return next;
276
+ }
277
+ /**
278
+ * Register a DUAL-USE method's condition or predicate, according to phase.
279
+ *
280
+ * Sixteen builder methods across four builders wrote this dispatch out —
281
+ * `no-copy-paste` reported them as two clusters at 100%. The dispatch is the
282
+ * only thing they share; the pair handed to it is what each method IS.
283
+ *
284
+ * Both sides are constructed eagerly rather than passed as thunks. Every one
285
+ * of the sixteen pairs is pure object construction — checked, none of the
286
+ * modules they come from (`conditions/structural`, `conditions/class`,
287
+ * `conditions/dependency`, `predicates/identity`, `predicates/module`)
288
+ * throws — so building the unused half costs an object and changes nothing.
289
+ * Thunks would buy laziness nobody needs at the price of two closures per
290
+ * call, and would hide the pair behind a lambda in every reader's way.
291
+ *
292
+ * A dual-use method is NOT the same as a predicate-only one. `areExported()`
293
+ * written after `.should()` still filters and is reported by the assertion
294
+ * gate as a misplaced predicate; a dual-use method written there asserts.
295
+ * That difference is a property of the method, so it stays at the method.
296
+ */
297
+ dualUse(condition, predicate) {
298
+ return this._phase === 'condition' ? this.addCondition(condition) : this.addPredicate(predicate);
299
+ }
300
+ /**
301
+ * Register a condition. Called by concrete builder methods like
302
+ * `.notContain()`, `.notExist()`, etc.
303
+ */
304
+ addCondition(condition) {
305
+ const next = this.copy();
306
+ next._conditions.push(condition);
307
+ return next;
308
+ }
309
+ /**
310
+ * An independent copy, carrying **both** lists. See `TerminalBuilder.copy`.
311
+ *
312
+ * Nothing on this class clears the conditions any more (bug 0020): a rule
313
+ * that asserted something must never be turned into one that asserts nothing
314
+ * by a chain method, which is what `.should()` used to do via `fork()`.
315
+ * `.should().beExported().that().areAsync()` keeps `beExported`, and a second
316
+ * `.should()` accumulates exactly as `.andShould()` does.
317
+ */
318
+ copy() {
319
+ const clone = super.copy();
320
+ clone._predicates = [...this._predicates];
321
+ clone._conditions = [...this._conditions];
322
+ clone._misplaced = [...this._misplaced];
323
+ return clone;
324
+ }
325
+ /**
326
+ * A copy carrying everything, including the conditions, with `_reason`
327
+ * resolved from metadata. The only caller is `.should()`.
328
+ *
329
+ * **The name is historical.** It used to clear the conditions, which is what
330
+ * distinguished it from `copy()`, and that clearing was
331
+ * [bug 0156](../../../../work/bugs/fixed/0156-should-twice-silently-drops-the-first-assertion.md):
332
+ * a second `.should()` on a builder that already carried a condition discarded
333
+ * it, so `.should().notExist().should().beExported()` enforced only the second
334
+ * and lost four findings with no output. Measured. Removed in 0.23.0 —
335
+ * conditions accumulate, and a second `.should()` behaves as `.andShould()`.
336
+ *
337
+ * What is left is `copy()` plus the `_reason` resolution, so the method is now
338
+ * thin enough to inline. It stays because it is `protected` on an exported
339
+ * class: deleting it is a compile break for an external subclass that
340
+ * overrides or calls it, which is the same compatibility argument that keeps
341
+ * `globs()` concrete and `assertsSomething()` exempt-by-default. Do not read
342
+ * the name as a description of the behaviour.
343
+ */
344
+ fork() {
345
+ const fork = this.copy();
346
+ fork._reason = fork._metadata?.because ?? this._reason;
347
+ return fork;
348
+ }
349
+ // --- Private: execution engine ---
350
+ /**
351
+ * Materialize the subject set: all elements narrowed by the predicate chain
352
+ * (the post-`.that()` set), before any condition runs. Shared by the
353
+ * `RuleBuilder` execution pipeline (`evaluate`) and the public `subjects()`
354
+ * accessor so those two cannot diverge (F1). Note: a few builders keep their
355
+ * own separate materialization for other paths (e.g. `CallRuleBuilder`'s
356
+ * `within()` matcher) — those are not routed through here.
357
+ */
358
+ filterElements() {
359
+ // AND semantics — every predicate must match.
360
+ return matchingElements(this.getElements(), this._predicates);
361
+ }
362
+ /**
363
+ * Build the config-level meta-finding for an empty selector under
364
+ * `.expectNonEmpty()`. A typed literal (no `createViolation` — there is no
365
+ * Node), ADR-005-clean, flagged `bypassFilters` so diff/baseline keep it.
366
+ */
367
+ emptySelectionViolation() {
368
+ const description = buildRuleDescription(this.asDeclared()) || 'selector';
369
+ // The TEXT comes from the shared producer; the ATTRIBUTION stays here.
370
+ //
371
+ // Plan 0099 keeps this family's block because it is the better-attributed
372
+ // implementation — it names the chain and carries the author's `because`.
373
+ // What it must not keep is its own wording: two texts for one state is the
374
+ // plan-0070 drift shape, and its copy carried the three defects 0098's
375
+ // user-perspective review found.
376
+ //
377
+ // Fields are assigned LITERALLY rather than spread, and that is not style.
378
+ // The config-finding census scans for a `bypassFilters: true`
379
+ // PropertyAssignment and for a literal `suggestion`; a spread made this
380
+ // producer invisible to it, which silently dropped its census row — through
381
+ // the exact route the census docstring claims is impossible ("no spreads that
382
+ // introduce the flag"). Review measured that regression.
383
+ //
384
+ // `element` keeps the rule id: unlike the expiry finding, N rules that cannot
385
+ // enforce ARE one edit, so `dedupeConfigFindings` collapsing them is correct.
386
+ const shared = this.zeroSubjectsViolation(this.project);
387
+ return {
388
+ rule: description,
389
+ ruleId: this._metadata?.id,
390
+ element: this._metadata?.id ?? description,
391
+ file: '',
392
+ line: 0,
393
+ message: shared.message,
394
+ suggestion: shared.suggestion,
395
+ // The author's rationale, which the shared producer has no access to. Not
396
+ // their `suggestion`/`docs` (bug 0021): this finding says the selector
397
+ // matched nothing, and the author's remedy is for a violation of the rule.
398
+ because: this._reason,
399
+ bypassFilters: true,
400
+ };
401
+ }
402
+ /**
403
+ * Execute the full pipeline: filter elements with predicates,
404
+ * evaluate conditions, return violations.
405
+ */
406
+ evaluate() {
407
+ // Step 1+2: Get elements and narrow by predicates (see filterElements).
408
+ const filtered = this.filterElements();
409
+ // Step 3: the selection is empty — a FAULT by default since plan 0074.
410
+ //
411
+ // The inversion R3b exists for. A condition reports a violation when SOME
412
+ // subject fails; over an empty set that is vacuously false, so every rule
413
+ // passed and the suite counted it as coverage. `.expectNonEmpty()` was the
414
+ // opt-in, and terminal-builder.ts records why that was not enough: it is
415
+ // "the opt-in this whole plan exists because nobody uses".
416
+ //
417
+ // Read the exemptions in this order — most specific first.
418
+ if (filtered.length === 0) {
419
+ // The author said so, in the rule, where a reader sees it. Not a
420
+ // silencer: the non-empty branch below fails the day it matches.
421
+ if (this._expectEmpty)
422
+ return [];
423
+ // Every condition is satisfied BY emptiness — `.should().notExist()`, the
424
+ // pre-emptive guard. `.every()`, because `andShould()` ANDs.
425
+ if (this.assertsCardinality())
426
+ return [];
427
+ return [this.emptySelectionViolation()];
428
+ }
429
+ // NO expiry branch here. Plan 0099 moved it to the root
430
+ // (`TerminalBuilder.collectWithAssertionGuard`), because this family's copy
431
+ // and the root's would both fire and double-report one fault.
432
+ //
433
+ // The property it enforced is unchanged and is now enforced for EVERY family
434
+ // rather than this one: a false declaration fails, and — the part plan 0089's
435
+ // review measured — it does not swallow the violations underneath it. The
436
+ // root appends them, so a fanned-out preset id whose one non-empty instance
437
+ // used to replace a genuine `imports "lodash" which matches forbidden` with a
438
+ // config error now reports both.
439
+ // Step 4: Build context for conditions
440
+ const context = this.buildConditionContext();
441
+ // Step 5: Evaluate all conditions (AND — all must pass)
442
+ const violations = [];
443
+ for (const condition of this._conditions) {
444
+ violations.push(...condition.evaluate(filtered, context));
445
+ }
446
+ return violations;
447
+ }
448
+ /**
449
+ * Build the `ConditionContext` passed to each condition.
450
+ *
451
+ * Subclasses with builder-specific context fields (e.g. `CallRuleBuilder`'s
452
+ * `_identifyByArgument`) override this to extend the base context.
453
+ * Call `super.buildConditionContext()` and spread the result.
454
+ */
455
+ buildConditionContext() {
456
+ return conditionContextFrom({
457
+ metadata: this._metadata,
458
+ reason: this._reason,
459
+ rule: buildRuleDescription(this.asDeclared()),
460
+ });
461
+ }
462
+ }
463
+ //# sourceMappingURL=rule-builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-builder.js","sourceRoot":"","sources":["../../src/core/rule-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAEhE,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,OAAO,GACR,MAAM,uBAAuB,CAAA;AAS9B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,MAAM,OAAgB,WAAe,SAAQ,eAAe;IAY3B;IAXrB,WAAW,GAAmB,EAAE,CAAA;IAChC,WAAW,GAAmB,EAAE,CAAA;IAChC,MAAM,GAA8B,WAAW,CAAA;IACzD,0EAA0E;IAC1E,2EAA2E;IAC3E,2EAA2E;IAC3E,kEAAkE;IACxD,cAAc,GAAG,KAAK,CAAA;IACtB,UAAU,GAAa,EAAE,CAAA;IACnC,8FAA8F;IAE9F,YAA+B,OAAoB;QACjD,KAAK,EAAE,CAAA;QADsB,YAAO,GAAP,OAAO,CAAa;IAEnD,CAAC;IAED,8CAA8C;IAE9C;;;;;;;OAOG;IACH,IAAI;QACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAA;QACxB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAA;QACzB,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;OAGG;IACH,GAAG;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;OAIG;IACH,MAAM;QACJ,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CA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D,EAAE;QACF,6EAA6E;QAC7E,8EAA8E;QAC9E,0EAA0E;QAC1E,4EAA4E;QAC5E,8EAA8E;QAC9E,iCAAiC;QAEjC,uCAAuC;QACvC,MAAM,OAAO,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAA;QAE5C,wDAAwD;QACxD,MAAM,UAAU,GAAoB,EAAE,CAAA;QACtC,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACzC,UAAU,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAA;QAC3D,CAAC;QAED,OAAO,UAAU,CAAA;IACnB,CAAC;IAED;;;;;;OAMG;IACO,qBAAqB;QAC7B,OAAO,oBAAoB,CAAC;YAC1B,QAAQ,EAAE,IAAI,CAAC,SAAS;YACxB,MAAM,EAAE,IAAI,CAAC,OAAO;YACpB,IAAI,EAAE,oBAAoB,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;SAC9C,CAAC,CAAA;IACJ,CAAC;CACF"}
@@ -0,0 +1,32 @@
1
+ import type { Condition, GlobNode, Predicate, RuleDescription } from '@nielspeter/eess';
2
+ /**
3
+ * A rule as DECLARED — what was chained onto the builder, before anything runs.
4
+ *
5
+ * The description, the imperative and the assertion advice are all functions of
6
+ * this and nothing else. Keeping them as methods only meant the class carried
7
+ * them; they read no evaluation state and call nothing back.
8
+ */
9
+ export interface DeclaredRule {
10
+ readonly predicates: readonly Predicate<unknown>[];
11
+ readonly conditions: readonly Condition<unknown>[];
12
+ readonly misplaced: readonly string[];
13
+ readonly reachedShould: boolean;
14
+ readonly metadata: {
15
+ id?: string;
16
+ imperative?: string;
17
+ suggestion?: string;
18
+ docs?: string;
19
+ } | undefined;
20
+ readonly reason: string | undefined;
21
+ }
22
+ /**
23
+ * Build the rule description from predicates and conditions.
24
+ */
25
+ export declare function buildRuleDescription(declared: DeclaredRule): string;
26
+ /** The value behind `RuleBuilder.globs()`. */
27
+ export declare function globsOf(declared: DeclaredRule): readonly GlobNode[];
28
+ /** The value behind `RuleBuilder.assertionAdvice()`. */
29
+ export declare function assertionAdviceOf(declared: DeclaredRule): string;
30
+ /** The value behind `RuleBuilder.describeRule()`. */
31
+ export declare function describeRuleOf(declared: DeclaredRule): RuleDescription;
32
+ //# sourceMappingURL=rule-declaration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-declaration.d.ts","sourceRoot":"","sources":["../../src/core/rule-declaration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAIvF;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,CAAC,OAAO,CAAC,EAAE,CAAA;IAClD,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,CAAC,OAAO,CAAC,EAAE,CAAA;IAClD,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAA;IACrC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC,QAAQ,EACb;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GACxE,SAAS,CAAA;IACb,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CACpC;AAkCD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,CAInE;AAwBD,8CAA8C;AAC9C,wBAAgB,OAAO,CAAC,QAAQ,EAAE,YAAY,GAAG,SAAS,QAAQ,EAAE,CAKnE;AAED,wDAAwD;AACxD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,CAchE;AAED,qDAAqD;AACrD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,YAAY,GAAG,eAAe,CAOtE"}
@@ -0,0 +1,88 @@
1
+ import { declaredGlobsOf } from '@nielspeter/eess/internal';
2
+ import { ruleDescriptionOf, ruleDescriptionFrom } from '@nielspeter/eess/internal';
3
+ /**
4
+ * Advice for predicates that landed after `.should()`.
5
+ *
6
+ * Extracted from {@link assertionAdvice} so that method reads as its three
7
+ * outcomes rather than as one of them. Two remedies live here, and the
8
+ * distinction is the point: with conditions present the rule is not
9
+ * "asserting nothing" — it asserts something over a set the misplaced
10
+ * predicate silently shrank, which is a different fault and a different fix
11
+ * (move it; do NOT add another condition). Telling that author to "add a
12
+ * condition" names a fix that leaves the rule exactly as broken (ADR-008
13
+ * rule 2).
14
+ */
15
+ function misplacedPredicateAdvice(declared) {
16
+ const names = declared.misplaced.map((d) => `"${d}"`).join(', ');
17
+ const one = declared.misplaced.length === 1;
18
+ const verb = one ? 'is a predicate, which filters' : 'are predicates, which filter';
19
+ const it = one ? 'it' : 'them';
20
+ if (declared.conditions.length > 0) {
21
+ return (`this rule's ${names} ${verb} subjects rather than asserting anything about them, ` +
22
+ `and ${one ? 'it comes' : 'they come'} after .should() — so ${it} narrowed the ` +
23
+ "selection this rule's conditions are evaluated over, and if that narrowed it to " +
24
+ `nothing the conditions hold vacuously. Move ${it} before .should(), where the ` +
25
+ 'filtering is explicit.');
26
+ }
27
+ return (`this rule asserts nothing: ${names} ${verb} subjects rather than asserting ` +
28
+ `anything about them. Move ${it} before .should(), then add a condition.`);
29
+ }
30
+ /**
31
+ * Build the rule description from predicates and conditions.
32
+ */
33
+ export function buildRuleDescription(declared) {
34
+ // The kernel's. This package's copy differed only in taking a `DeclaredRule`
35
+ // rather than the two lists.
36
+ return ruleDescriptionOf(declared.predicates, declared.conditions);
37
+ }
38
+ /**
39
+ * Build an imperative "Do NOT … / MUST …" sentence for AI-agent system
40
+ * prompts (`explain --format agent`). Heuristic FALLBACK — a rule author's
41
+ * `.rule({ imperative })` overrides it.
42
+ */
43
+ function buildImperative(declared) {
44
+ // The Do-NOT/MUST transform only reads the polarity of a single condition.
45
+ // For zero or multiple (`and`-joined) conditions, negating the joined string
46
+ // would mis-handle mixed polarity ("not X and not Y"), so fall back to the
47
+ // plain, always-correct rule description.
48
+ const [only] = declared.conditions;
49
+ if (declared.conditions.length !== 1 || only === undefined) {
50
+ return buildRuleDescription(declared) || 'Follow the architecture rule.';
51
+ }
52
+ const cond = only.description;
53
+ const isNegative = /^(not|no)\b/i.test(cond);
54
+ const body = cond.replace(/^(not|no)\s+/i, '');
55
+ const scope = declared.predicates.map((p) => p.description).join(' and ');
56
+ const scopeSuffix = scope ? ` (in code that ${scope})` : '';
57
+ return `${isNegative ? 'Do NOT' : 'MUST'} ${body}${scopeSuffix}`;
58
+ }
59
+ /** The value behind `RuleBuilder.globs()`. */
60
+ export function globsOf(declared) {
61
+ // The kernel's, not a copy. This package carried a 94%-similar version whose
62
+ // one real difference — honouring `originLabel` — the kernel has now adopted,
63
+ // so there is nothing left here but the shape of the argument.
64
+ return declaredGlobsOf(declared.predicates, declared.conditions);
65
+ }
66
+ /** The value behind `RuleBuilder.assertionAdvice()`. */
67
+ export function assertionAdviceOf(declared) {
68
+ if (!declared.reachedShould) {
69
+ return ('this rule never reached .should(), so it asserts nothing and can never fail. ' +
70
+ 'Add .should() and a condition, or delete the rule.');
71
+ }
72
+ if (declared.misplaced.length > 0)
73
+ return misplacedPredicateAdvice(declared);
74
+ return ('this rule reached .should() but no condition follows, so it asserts nothing and can ' +
75
+ 'never fail. Add a condition after .should() — or, if this rule is generated from ' +
76
+ 'configuration, skip generating it when there is nothing to assert; if it comes from ' +
77
+ 'a preset (ruleId "preset/..."), report it to the preset\'s author.');
78
+ }
79
+ /** The value behind `RuleBuilder.describeRule()`. */
80
+ export function describeRuleOf(declared) {
81
+ return ruleDescriptionFrom({
82
+ metadata: declared.metadata,
83
+ reason: declared.reason,
84
+ rule: buildRuleDescription(declared),
85
+ imperativeFallback: buildImperative(declared),
86
+ });
87
+ }
88
+ //# sourceMappingURL=rule-declaration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-declaration.js","sourceRoot":"","sources":["../../src/core/rule-declaration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAoBlF;;;;;;;;;;;GAWG;AACH,SAAS,wBAAwB,CAAC,QAAsB;IACtD,MAAM,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAChE,MAAM,GAAG,GAAG,QAAQ,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,CAAA;IAC3C,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,8BAA8B,CAAA;IACnF,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAA;IAC9B,IAAI,QAAQ,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACnC,OAAO,CACL,eAAe,KAAK,IAAI,IAAI,uDAAuD;YACnF,OAAO,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,yBAAyB,EAAE,gBAAgB;YAChF,kFAAkF;YAClF,+CAA+C,EAAE,+BAA+B;YAChF,wBAAwB,CACzB,CAAA;IACH,CAAC;IACD,OAAO,CACL,8BAA8B,KAAK,IAAI,IAAI,kCAAkC;QAC7E,6BAA6B,EAAE,0CAA0C,CAC1E,CAAA;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,QAAsB;IACzD,6EAA6E;IAC7E,6BAA6B;IAC7B,OAAO,iBAAi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