@hailstails/hone 1.4.0 → 2.0.0-pre.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (608) hide show
  1. package/ADOPTING.md +239 -168
  2. package/CHANGELOG.md +141 -0
  3. package/MIGRATING.md +145 -45
  4. package/README.md +148 -182
  5. package/chunks/chunk-5HRMJ4O2.js +608 -0
  6. package/chunks/chunk-5U4JMWNV.js +9 -0
  7. package/chunks/{chunk-FEWCJU7H.js → chunk-ASUN4AVC.js} +31 -12
  8. package/chunks/chunk-DGOLOS5A.js +9 -0
  9. package/chunks/{chunk-HJA4CX7C.js → chunk-FBZBSDED.js} +1 -1
  10. package/chunks/{chunk-Y2KPZDDV.js → chunk-GNOMK7CR.js} +201 -98
  11. package/chunks/chunk-IX2VZTBO.js +887 -0
  12. package/chunks/{chunk-QWA6OVLC.js → chunk-K2W3D3NB.js} +8 -2
  13. package/chunks/chunk-L7BGRC6D.js +22 -0
  14. package/chunks/chunk-M6SOGWT7.js +82 -0
  15. package/chunks/chunk-MWLBA4B3.js +849 -0
  16. package/chunks/chunk-NRIQD3PI.js +38 -0
  17. package/chunks/chunk-OKLYWD2Z.js +823 -0
  18. package/chunks/{chunk-3HFJHJDO.js → chunk-QP5TLOBY.js} +17 -8
  19. package/chunks/chunk-R75QELTA.js +481 -0
  20. package/chunks/chunk-RANAKCTW.js +31 -0
  21. package/chunks/{chunk-NA5L6PUE.js → chunk-RANIXNWY.js} +1 -2
  22. package/chunks/chunk-RFR3ITBS.js +9 -0
  23. package/chunks/{chunk-Z4UBS7WI.js → chunk-RGSHTPLA.js} +26 -7
  24. package/chunks/{chunk-T32FOWZA.js → chunk-TNY2PASL.js} +14 -18
  25. package/chunks/{chunk-Y4SMWOD2.js → chunk-UJONWHA4.js} +2 -2
  26. package/chunks/{chunk-WF3PPYRR.js → chunk-VYBO2Q65.js} +4 -2
  27. package/chunks/chunk-Z6JHBNDS.js +15 -0
  28. package/chunks/eslint-10-boundary-A4JIQ734.js +14 -0
  29. package/chunks/eslint-9-boundary-CL5DDBHX.js +34 -0
  30. package/docs/adding-a-discipline-or-mechanism.md +23 -19
  31. package/docs/extending.md +6 -5
  32. package/docs/output-contract.md +713 -16
  33. package/docs/why-chain-contract.md +6 -6
  34. package/methods/README.md +2 -2
  35. package/methods/assessment-template.md +3 -3
  36. package/methods/lenses/clean-architecture.md +26 -62
  37. package/methods/lenses/decomposition.md +7 -7
  38. package/methods/lenses/defended-on-intent.md +6 -6
  39. package/methods/lenses/di-discipline.md +18 -21
  40. package/methods/lenses/errors-as-data.md +6 -6
  41. package/methods/lenses/function-first.md +25 -27
  42. package/methods/lenses/naming.md +6 -6
  43. package/methods/lenses/test-discipline.md +8 -8
  44. package/methods/lenses/type-soundness.md +6 -6
  45. package/methods/lenses/zod-boundary.md +9 -9
  46. package/package.json +30 -28
  47. package/rules/README.md +335 -54
  48. package/rules/SPIRIT.md +4 -4
  49. package/rules/cases/a-value-is-one-of-several-kinds-or-states.md +20 -0
  50. package/rules/cases/an-adopter-is-not-handed-our-risk.md +17 -0
  51. package/rules/cases/an-operation-can-fail.md +20 -0
  52. package/rules/cases/builds-the-real-implementations.md +25 -0
  53. package/rules/cases/causes-an-effect.md +26 -0
  54. package/rules/cases/checks-a-value-that-may-be-one-of-several-outcomes.md +20 -0
  55. package/rules/cases/checks-conditions-before-its-work.md +20 -0
  56. package/rules/cases/coordinates-other-units.md +20 -0
  57. package/rules/cases/does-one-job.md +23 -0
  58. package/rules/cases/explains-something-in-prose.md +20 -0
  59. package/rules/cases/gives-a-value-its-type.md +26 -0
  60. package/rules/cases/gives-each-unit-its-test.md +20 -0
  61. package/rules/cases/keeps-state-or-settings-across-calls.md +20 -0
  62. package/rules/cases/makes-a-new-value-from-what-it-has.md +17 -0
  63. package/rules/cases/names-something.md +20 -0
  64. package/rules/cases/needs-the-current-time-a-random-value-a-new-id-or-an-outside-ordering.md +26 -0
  65. package/rules/cases/puts-code-in-a-file-or-folder.md +20 -0
  66. package/rules/cases/reads-data-from-outside.md +23 -0
  67. package/rules/cases/reuses-behaviour-from-another-unit-or-type.md +20 -0
  68. package/rules/cases/sends-data-out-of-the-program.md +20 -0
  69. package/rules/cases/sets-how-strictly-the-checker-works.md +14 -0
  70. package/rules/cases/ships-code-for-others.md +17 -0
  71. package/rules/cases/states-what-the-unit-gives-back-for-one-case-or-several.md +20 -0
  72. package/rules/cases/takes-an-outside-dependency.md +38 -0
  73. package/rules/cases/tests-across-units-or-against-a-real-system.md +20 -0
  74. package/rules/cases/uses-a-system-or-service-outside-the-program.md +29 -0
  75. package/rules/cases/uses-what-a-collaborator-gives-back.md +20 -0
  76. package/rules/cases/writes-basic-logic.md +17 -0
  77. package/rules/cases.md +71 -0
  78. package/rules/numbers.md +155 -0
  79. package/rules/principles/external-behaviour-sits-at-a-boundary.md +12 -0
  80. package/rules/principles/no-hidden-effects.md +17 -0
  81. package/rules/principles/no-leak-across-a-boundary.md +19 -0
  82. package/rules/principles/one-place-decides.md +12 -0
  83. package/rules/principles/our-code-reads-in-the-common-language.md +12 -0
  84. package/rules/principles/outside-risk-is-carried-on-purpose.md +13 -0
  85. package/rules/principles/tests-are-ours.md +12 -0
  86. package/rules/principles/the-type-checker-proves-it.md +12 -0
  87. package/rules/principles.md +93 -0
  88. package/rules/record-kinds/authorised-location.md +26 -0
  89. package/rules/record-kinds/boundary-record.md +9 -0
  90. package/rules/record-kinds/debt.md +23 -0
  91. package/rules/record-kinds/dependency-record.md +9 -0
  92. package/rules/record-kinds/deviation.md +9 -0
  93. package/rules/records.md +137 -0
  94. package/rules/rules/declared-not-asserted.md +16 -0
  95. package/rules/rules/doer-or-orchestrator.md +16 -0
  96. package/rules/rules/failures-are-values.md +15 -0
  97. package/rules/rules/fixed-versions.md +11 -0
  98. package/rules/rules/guard-first.md +14 -0
  99. package/rules/rules/handed-what-it-uses.md +16 -0
  100. package/rules/rules/kinds-are-named.md +16 -0
  101. package/rules/rules/one-reason-per-module.md +18 -0
  102. package/rules/rules/one-word-everywhere.md +19 -0
  103. package/rules/rules/outside-dependencies-justified.md +14 -0
  104. package/rules/rules/outside-dependencies-stay-at-boundaries.md +18 -0
  105. package/rules/rules/ports-declared-inside.md +22 -0
  106. package/rules/rules/shipped-risk-declared.md +11 -0
  107. package/rules/rules/straight-through-tests.md +15 -0
  108. package/rules/rules/tested-where-its-owned.md +20 -0
  109. package/rules/rules/tools-live-in-the-repo.md +11 -0
  110. package/rules/rules/upstream-stays-untouched.md +11 -0
  111. package/rules/rules/written-out-answers.md +17 -0
  112. package/rules/rules.md +185 -0
  113. package/rules/sources.md +142 -0
  114. package/rules/typescript/checks.md +1685 -0
  115. package/rules/typescript/recipes/adapter-per-outside-party.md +18 -0
  116. package/rules/typescript/recipes/assert-to-narrow.md +18 -0
  117. package/rules/typescript/recipes/bounded-context-generic.md +19 -0
  118. package/rules/typescript/recipes/closure-factory.md +20 -0
  119. package/rules/typescript/recipes/companion-test-file.md +18 -0
  120. package/rules/typescript/recipes/composed-orchestrator.md +18 -0
  121. package/rules/typescript/recipes/composition-root.md +18 -0
  122. package/rules/typescript/recipes/copy-never-write-in.md +18 -0
  123. package/rules/typescript/recipes/declared-not-bundled.md +17 -0
  124. package/rules/typescript/recipes/dependency-record.md +20 -0
  125. package/rules/typescript/recipes/domain-vocabulary-list.md +18 -0
  126. package/rules/typescript/recipes/entity-module.md +20 -0
  127. package/rules/typescript/recipes/exact-pins-and-a-lock-file.md +18 -0
  128. package/rules/typescript/recipes/extension-outside-the-vendored-code.md +18 -0
  129. package/rules/typescript/recipes/failure-asserted-as-a-value.md +18 -0
  130. package/rules/typescript/recipes/failure-mapping-at-the-adapter.md +20 -0
  131. package/rules/typescript/recipes/fix-the-declaration-not-the-value.md +18 -0
  132. package/rules/typescript/recipes/functional-iteration.md +18 -0
  133. package/rules/typescript/recipes/guard-clauses.md +18 -0
  134. package/rules/typescript/recipes/integration-test-owns-its-scratch.md +18 -0
  135. package/rules/typescript/recipes/integration-test-suffix.md +18 -0
  136. package/rules/typescript/recipes/iteach-over-typed-rows.md +18 -0
  137. package/rules/typescript/recipes/map-out-at-the-adapter.md +18 -0
  138. package/rules/typescript/recipes/meaning-in-names-not-comments.md +22 -0
  139. package/rules/typescript/recipes/named-exported-type.md +18 -0
  140. package/rules/typescript/recipes/narrow-ports.md +18 -0
  141. package/rules/typescript/recipes/one-argument-object.md +19 -0
  142. package/rules/typescript/recipes/port-in-the-domain.md +19 -0
  143. package/rules/typescript/recipes/ports-in-the-argument.md +18 -0
  144. package/rules/typescript/recipes/repo-scripts-only.md +18 -0
  145. package/rules/typescript/recipes/result-union.md +22 -0
  146. package/rules/typescript/recipes/screaming-folders.md +20 -0
  147. package/rules/typescript/recipes/shared-strict-base-config.md +20 -0
  148. package/rules/typescript/recipes/stub-with-vifn.md +20 -0
  149. package/rules/typescript/recipes/tagged-union-and-exhaustive-switch.md +18 -0
  150. package/rules/typescript/recipes/whole-words.md +18 -0
  151. package/rules/typescript/recipes/whole-written-out-expectation.md +18 -0
  152. package/rules/typescript/recipes/world-values-through-a-port.md +18 -0
  153. package/rules/typescript/recipes/zod-at-the-producers-adapter.md +19 -0
  154. package/rules/typescript/recipes.md +390 -0
  155. package/rules/typescript/symptoms/absence-standing-for-a-state.md +36 -0
  156. package/rules/typescript/symptoms/adapter-built-outside-the-root.md +30 -0
  157. package/rules/typescript/symptoms/ambient-randomness.md +36 -0
  158. package/rules/typescript/symptoms/answer-set-in-a-hook.md +45 -0
  159. package/rules/typescript/symptoms/authored-class-or-this/class-keyword.md +30 -0
  160. package/rules/typescript/symptoms/authored-class-or-this/static-members-only.md +18 -0
  161. package/rules/typescript/symptoms/authored-class-or-this.md +49 -0
  162. package/rules/typescript/symptoms/behaviour-tested-away-from-its-owner.md +44 -0
  163. package/rules/typescript/symptoms/boolean-in-a-signature/boolean-annotation.md +30 -0
  164. package/rules/typescript/symptoms/boolean-in-a-signature.md +43 -0
  165. package/rules/typescript/symptoms/branch-in-a-test/test-body.md +213 -0
  166. package/rules/typescript/symptoms/branch-in-a-test.md +48 -0
  167. package/rules/typescript/symptoms/bundled-dependency.md +28 -0
  168. package/rules/typescript/symptoms/catch-all-failure-kind.md +37 -0
  169. package/rules/typescript/symptoms/change-spread-across-modules.md +27 -0
  170. package/rules/typescript/symptoms/claimed-type/cast-to-any.md +29 -0
  171. package/rules/typescript/symptoms/claimed-type/non-null-assertions.md +34 -0
  172. package/rules/typescript/symptoms/claimed-type/unlisted-cast-site.md +34 -0
  173. package/rules/typescript/symptoms/claimed-type.md +56 -0
  174. package/rules/typescript/symptoms/computed-value-in-a-test/test-body.md +144 -0
  175. package/rules/typescript/symptoms/computed-value-in-a-test.md +36 -0
  176. package/rules/typescript/symptoms/coverage-gate.md +27 -0
  177. package/rules/typescript/symptoms/date-used-directly/clock-sources.md +31 -0
  178. package/rules/typescript/symptoms/date-used-directly.md +46 -0
  179. package/rules/typescript/symptoms/default-for-a-required-value.md +45 -0
  180. package/rules/typescript/symptoms/default-on-a-closed-union/default-arm.md +32 -0
  181. package/rules/typescript/symptoms/default-on-a-closed-union.md +32 -0
  182. package/rules/typescript/symptoms/dependency-without-a-record.md +33 -0
  183. package/rules/typescript/symptoms/doer-calling-our-own-unit.md +36 -0
  184. package/rules/typescript/symptoms/double-with-a-body/logic-in-a-passed-function.md +32 -0
  185. package/rules/typescript/symptoms/double-with-a-body/stub-implementation.md +31 -0
  186. package/rules/typescript/symptoms/double-with-a-body.md +55 -0
  187. package/rules/typescript/symptoms/drawer-path/drawer-names.md +28 -0
  188. package/rules/typescript/symptoms/drawer-path.md +32 -0
  189. package/rules/typescript/symptoms/duplicate-decision.md +36 -0
  190. package/rules/typescript/symptoms/edit-inside-vendored-code.md +33 -0
  191. package/rules/typescript/symptoms/failure-shaped-as-success.md +28 -0
  192. package/rules/typescript/symptoms/floating-version.md +27 -0
  193. package/rules/typescript/symptoms/inherited-environment-in-a-subprocess/git-spawn-environment.md +30 -0
  194. package/rules/typescript/symptoms/inherited-environment-in-a-subprocess.md +33 -0
  195. package/rules/typescript/symptoms/inner-layer-imports-outer.md +33 -0
  196. package/rules/typescript/symptoms/integration-heavy-suite.md +29 -0
  197. package/rules/typescript/symptoms/large-input-for-a-few-fields.md +37 -0
  198. package/rules/typescript/symptoms/library-class-built-in-place.md +42 -0
  199. package/rules/typescript/symptoms/long-function/function-length.md +47 -0
  200. package/rules/typescript/symptoms/long-function.md +75 -0
  201. package/rules/typescript/symptoms/loop-keyword/loop-statement.md +34 -0
  202. package/rules/typescript/symptoms/loop-keyword.md +49 -0
  203. package/rules/typescript/symptoms/machine-touched-in-a-unit-test.md +40 -0
  204. package/rules/typescript/symptoms/many-spellings-of-one-concept.md +29 -0
  205. package/rules/typescript/symptoms/module-level-state.md +30 -0
  206. package/rules/typescript/symptoms/module-or-global-patched/module-mock-call.md +29 -0
  207. package/rules/typescript/symptoms/module-or-global-patched.md +38 -0
  208. package/rules/typescript/symptoms/name-off-its-casing/filename-case.md +16 -0
  209. package/rules/typescript/symptoms/name-off-its-casing/naming-convention.md +20 -0
  210. package/rules/typescript/symptoms/name-off-its-casing.md +31 -0
  211. package/rules/typescript/symptoms/no-lock-file.md +27 -0
  212. package/rules/typescript/symptoms/orchestrator-that-computes.md +27 -0
  213. package/rules/typescript/symptoms/outside-dependency-vocabulary-for-basic-logic.md +33 -0
  214. package/rules/typescript/symptoms/outside-import-past-a-boundary/import-or-require.md +44 -0
  215. package/rules/typescript/symptoms/outside-import-past-a-boundary.md +45 -0
  216. package/rules/typescript/symptoms/outside-type-in-a-signature.md +37 -0
  217. package/rules/typescript/symptoms/own-type-guard.md +36 -0
  218. package/rules/typescript/symptoms/port-named-for-a-mechanism.md +34 -0
  219. package/rules/typescript/symptoms/port-outside-the-domain.md +28 -0
  220. package/rules/typescript/symptoms/positional-parameters/parameter-count.md +30 -0
  221. package/rules/typescript/symptoms/positional-parameters.md +43 -0
  222. package/rules/typescript/symptoms/process-global-used-in-place.md +53 -0
  223. package/rules/typescript/symptoms/prose-in-code.md +27 -0
  224. package/rules/typescript/symptoms/rebinding/parameter-reassignment.md +18 -0
  225. package/rules/typescript/symptoms/rebinding/test-body.md +32 -0
  226. package/rules/typescript/symptoms/rebinding.md +36 -0
  227. package/rules/typescript/symptoms/schema-past-its-adapter.md +41 -0
  228. package/rules/typescript/symptoms/shorthand-name/identifier-names.md +29 -0
  229. package/rules/typescript/symptoms/shorthand-name.md +32 -0
  230. package/rules/typescript/symptoms/strictness-weakened/exact-optional-property-types.md +51 -0
  231. package/rules/typescript/symptoms/strictness-weakened/no-fallthrough-cases-in-switch.md +51 -0
  232. package/rules/typescript/symptoms/strictness-weakened/no-implicit-override.md +51 -0
  233. package/rules/typescript/symptoms/strictness-weakened/no-property-access-from-index-signature.md +51 -0
  234. package/rules/{CD-3/CHECKS.md → typescript/symptoms/strictness-weakened/no-unchecked-indexed-access.md} +23 -38
  235. package/rules/typescript/symptoms/strictness-weakened/strict.md +51 -0
  236. package/rules/typescript/symptoms/strictness-weakened/use-unknown-in-catch-variables.md +51 -0
  237. package/rules/typescript/symptoms/strictness-weakened.md +32 -0
  238. package/rules/typescript/symptoms/tangled-function/cognitive-complexity.md +42 -0
  239. package/rules/typescript/symptoms/tangled-function.md +75 -0
  240. package/rules/typescript/symptoms/test-of-the-type-checker.md +24 -0
  241. package/rules/typescript/symptoms/test-switched-off/focused-tests.md +15 -0
  242. package/rules/typescript/symptoms/test-switched-off/skipped-tests.md +15 -0
  243. package/rules/typescript/symptoms/test-switched-off.md +25 -0
  244. package/rules/typescript/symptoms/text-past-its-reader/test-body.md +30 -0
  245. package/rules/typescript/symptoms/text-past-its-reader.md +71 -0
  246. package/rules/typescript/symptoms/throw-between-our-units.md +46 -0
  247. package/rules/typescript/symptoms/throw-or-catch-in-a-test/throw-statement.md +32 -0
  248. package/rules/typescript/symptoms/throw-or-catch-in-a-test/try-block.md +39 -0
  249. package/rules/typescript/symptoms/throw-or-catch-in-a-test.md +35 -0
  250. package/rules/typescript/symptoms/thrown-non-error/throw-only-error.md +15 -0
  251. package/rules/typescript/symptoms/thrown-non-error.md +27 -0
  252. package/rules/typescript/symptoms/tool-fetched-at-run-time.md +27 -0
  253. package/rules/typescript/symptoms/tuple-as-data.md +29 -0
  254. package/rules/typescript/symptoms/type-derived-from-code/factory-return-types.md +29 -0
  255. package/rules/typescript/symptoms/type-derived-from-code.md +41 -0
  256. package/rules/typescript/symptoms/types-only-file.md +36 -0
  257. package/rules/typescript/symptoms/unasserted-call.md +29 -0
  258. package/rules/typescript/symptoms/unit-without-a-running-test/companion-test-file.md +28 -0
  259. package/rules/typescript/symptoms/unit-without-a-running-test.md +28 -0
  260. package/rules/{CD-5/CHECKS.md → typescript/symptoms/untracked-escape/directive-pointers.md} +12 -23
  261. package/rules/typescript/symptoms/untracked-escape.md +32 -0
  262. package/rules/typescript/symptoms/untyped-value/explicit-any.md +14 -0
  263. package/rules/typescript/symptoms/untyped-value/implicit-any-let.md +14 -0
  264. package/rules/typescript/symptoms/untyped-value.md +36 -0
  265. package/rules/typescript/symptoms/wide-input.md +37 -0
  266. package/rules/typescript/symptoms/wide-port.md +32 -0
  267. package/rules/typescript/symptoms/work-inside-a-condition/else-after-an-exit.md +40 -0
  268. package/rules/typescript/symptoms/work-inside-a-condition.md +41 -0
  269. package/rules/typescript/symptoms/write-into-a-parameter/parameter-mutation.md +33 -0
  270. package/rules/typescript/symptoms/write-into-a-parameter.md +34 -0
  271. package/rules/typescript/symptoms.md +821 -0
  272. package/{core → src/application}/conformance/conformance-testing-types.d.ts +16 -6
  273. package/src/audit.d.ts +20 -0
  274. package/{api → src}/audit.js +6 -5
  275. package/{core/rule-set-reader → src/domain/rule-set}/authored-rule-set-types.d.ts +2 -2
  276. package/{core/values → src/domain/rule-set}/edition-types.d.ts +3 -3
  277. package/{core/values → src/domain/rule-set}/identifier-types.d.ts +2 -2
  278. package/{core/conformance → src/domain/runner}/conformance-types.d.ts +1 -1
  279. package/{core/mechanism-port → src/domain/runner}/piece-failure-types.d.ts +1 -1
  280. package/{core/mechanism-port → src/domain/runner}/runner-module-types.d.ts +4 -4
  281. package/src/domain/runner/runner-result-types.d.ts +88 -0
  282. package/src/eslint-plugin.d.ts +16 -0
  283. package/src/eslint-plugin.js +72 -0
  284. package/src/hone.js +13385 -0
  285. package/src/infrastructure/disciplines-file/version-one-names.json +634 -0
  286. package/src/infrastructure/engines/eslint/authored-class-or-this/class-keyword/class-keyword.examples.json +84 -0
  287. package/{mechanisms/eslint/CD-14/cd14/cd14.eslint-plugin.js → src/infrastructure/engines/eslint/authored-class-or-this/class-keyword/eslint-plugin.js} +9 -10
  288. package/src/infrastructure/engines/eslint/authored-class-or-this/class-keyword/piece.json +12 -0
  289. package/src/infrastructure/engines/eslint/authored-class-or-this/static-members-only/piece.json +24 -0
  290. package/src/infrastructure/engines/eslint/authored-class-or-this/static-members-only/static-members-only.examples.json +36 -0
  291. package/src/infrastructure/engines/eslint/claimed-type/non-null-assertions/eslint-plugin.js +16 -0
  292. package/src/infrastructure/engines/eslint/claimed-type/non-null-assertions/non-null-assertions.examples.json +48 -0
  293. package/src/infrastructure/engines/eslint/claimed-type/non-null-assertions/piece.json +22 -0
  294. package/src/infrastructure/engines/eslint/long-function/function-length/function-length.examples.json +42 -0
  295. package/src/infrastructure/engines/eslint/long-function/function-length/piece.json +16 -0
  296. package/{mechanisms/eslint/CD-7/cd7/cd7.eslint-plugin.js → src/infrastructure/engines/eslint/name-off-its-casing/filename-case/eslint-plugin.js} +5 -4
  297. package/src/infrastructure/engines/eslint/name-off-its-casing/filename-case/filename-case.examples.json +60 -0
  298. package/src/infrastructure/engines/eslint/name-off-its-casing/filename-case/piece.json +11 -0
  299. package/src/infrastructure/engines/eslint/name-off-its-casing/naming-convention/eslint-plugin.js +16 -0
  300. package/src/infrastructure/engines/eslint/name-off-its-casing/naming-convention/naming-convention.examples.json +78 -0
  301. package/src/infrastructure/engines/eslint/name-off-its-casing/naming-convention/piece.json +214 -0
  302. package/src/infrastructure/engines/eslint/positional-parameters/parameter-count/eslint-plugin.js +16 -0
  303. package/src/infrastructure/engines/eslint/positional-parameters/parameter-count/parameter-count.examples.json +30 -0
  304. package/src/infrastructure/engines/eslint/positional-parameters/parameter-count/piece.json +18 -0
  305. package/src/infrastructure/engines/eslint/rebinding/parameter-reassignment/eslint-plugin.js +16 -0
  306. package/src/infrastructure/engines/eslint/rebinding/parameter-reassignment/parameter-reassignment.examples.json +30 -0
  307. package/src/infrastructure/engines/eslint/rebinding/parameter-reassignment/piece.json +17 -0
  308. package/{mechanisms → src/infrastructure/engines}/eslint/runner/README.md +5 -5
  309. package/{mechanisms/eslint/runner → src/infrastructure/engines/eslint/runner/pieces}/eslint-piece-settings-types.d.ts +1 -1
  310. package/{mechanisms → src/infrastructure/engines}/eslint/runner/runner.js +2189 -1371
  311. package/{mechanisms/eslint/CD-41 → src/infrastructure/engines/eslint/tangled-function/cognitive-complexity}/README.md +1 -1
  312. package/src/infrastructure/engines/eslint/tangled-function/cognitive-complexity/cognitive-complexity.examples.json +48 -0
  313. package/{mechanisms/eslint/CD-41/cd41/cd41.eslint-plugin.js → src/infrastructure/engines/eslint/tangled-function/cognitive-complexity/eslint-plugin.js} +58 -14
  314. package/src/infrastructure/engines/eslint/tangled-function/cognitive-complexity/piece.json +12 -0
  315. package/{mechanisms/eslint/CD-27/cd27/cd27.eslint-plugin.js → src/infrastructure/engines/eslint/test-switched-off/focused-tests/eslint-plugin.js} +5 -4
  316. package/src/infrastructure/engines/eslint/test-switched-off/focused-tests/focused-tests.examples.json +60 -0
  317. package/src/infrastructure/engines/eslint/test-switched-off/focused-tests/piece.json +12 -0
  318. package/src/infrastructure/engines/eslint/test-switched-off/skipped-tests/piece.json +16 -0
  319. package/src/infrastructure/engines/eslint/test-switched-off/skipped-tests/skipped-tests.examples.json +54 -0
  320. package/{mechanisms/eslint/CD-10/cd10/cd10.eslint-plugin.js → src/infrastructure/engines/eslint/thrown-non-error/throw-only-error/eslint-plugin.js} +5 -4
  321. package/src/infrastructure/engines/eslint/thrown-non-error/throw-only-error/piece.json +12 -0
  322. package/src/infrastructure/engines/eslint/thrown-non-error/throw-only-error/throw-only-error.examples.json +54 -0
  323. package/{mechanisms/eslint/CD-1/cd1/cd1.eslint-plugin.js → src/infrastructure/engines/eslint/untyped-value/explicit-any/eslint-plugin.js} +14 -9
  324. package/src/infrastructure/engines/eslint/untyped-value/explicit-any/explicit-any.examples.json +36 -0
  325. package/src/infrastructure/engines/eslint/untyped-value/explicit-any/piece.json +12 -0
  326. package/src/infrastructure/engines/eslint/untyped-value/implicit-any-let/implicit-any-let.examples.json +48 -0
  327. package/src/infrastructure/engines/eslint/untyped-value/implicit-any-let/piece.json +16 -0
  328. package/src/infrastructure/engines/eslint/work-inside-a-condition/else-after-an-exit/else-after-an-exit.examples.json +36 -0
  329. package/{mechanisms/eslint/CD-42/cd42/cd42.eslint-plugin.js → src/infrastructure/engines/eslint/work-inside-a-condition/else-after-an-exit/eslint-plugin.js} +29 -13
  330. package/src/infrastructure/engines/eslint/work-inside-a-condition/else-after-an-exit/piece.json +12 -0
  331. package/src/infrastructure/engines/walker/authored-class-or-this/class-keyword/class-keyword.examples.json +84 -0
  332. package/{mechanisms/audit/CD-14 → src/infrastructure/engines/walker/authored-class-or-this/class-keyword}/class-syntax.js +6 -3
  333. package/src/infrastructure/engines/walker/authored-class-or-this/class-keyword/piece.json +10 -0
  334. package/src/infrastructure/engines/walker/boolean-in-a-signature/boolean-annotation/boolean-annotation.examples.json +42 -0
  335. package/{mechanisms/audit/CD-43 → src/infrastructure/engines/walker/boolean-in-a-signature/boolean-annotation}/boolean-signatures.js +14 -6
  336. package/src/infrastructure/engines/walker/boolean-in-a-signature/boolean-annotation/piece.json +9 -0
  337. package/src/infrastructure/engines/walker/branch-in-a-test/test-body/piece.json +95 -0
  338. package/{mechanisms/audit/CD-27 → src/infrastructure/engines/walker/branch-in-a-test/test-body}/test-body-logic.js +188 -56
  339. package/src/infrastructure/engines/walker/branch-in-a-test/test-body/test-body.examples.json +280 -0
  340. package/{mechanisms/audit/CD-1 → src/infrastructure/engines/walker/claimed-type/cast-to-any}/any-cast.js +7 -4
  341. package/src/infrastructure/engines/walker/claimed-type/cast-to-any/cast-to-any.examples.json +48 -0
  342. package/src/infrastructure/engines/walker/claimed-type/cast-to-any/piece.json +9 -0
  343. package/{mechanisms/audit/CD-2 → src/infrastructure/engines/walker/claimed-type/unlisted-cast-site}/cast-expressions.js +13 -6
  344. package/src/infrastructure/engines/walker/claimed-type/unlisted-cast-site/piece.json +14 -0
  345. package/src/infrastructure/engines/walker/claimed-type/unlisted-cast-site/unlisted-cast-site.examples.json +54 -0
  346. package/src/infrastructure/engines/walker/computed-value-in-a-test/test-body/piece.json +18 -0
  347. package/src/infrastructure/engines/walker/date-used-directly/clock-sources/clock-sources.examples.json +30 -0
  348. package/src/infrastructure/engines/walker/date-used-directly/clock-sources/clock-sources.js +36 -0
  349. package/src/infrastructure/engines/walker/date-used-directly/clock-sources/piece.json +9 -0
  350. package/src/infrastructure/engines/walker/default-on-a-closed-union/default-arm/default-arm.examples.json +36 -0
  351. package/src/infrastructure/engines/walker/default-on-a-closed-union/default-arm/piece.json +9 -0
  352. package/src/infrastructure/engines/walker/default-on-a-closed-union/default-arm/switch-defaults.js +54 -0
  353. package/src/infrastructure/engines/walker/double-with-a-body/logic-in-a-passed-function/piece.json +18 -0
  354. package/{mechanisms/audit/CD-25 → src/infrastructure/engines/walker/double-with-a-body/stub-implementation}/dependency-isolation.js +8 -4
  355. package/src/infrastructure/engines/walker/double-with-a-body/stub-implementation/piece.json +9 -0
  356. package/src/infrastructure/engines/walker/double-with-a-body/stub-implementation/stub-implementation.examples.json +36 -0
  357. package/{mechanisms/audit/CD-7 → src/infrastructure/engines/walker/drawer-path/drawer-names}/categorical-paths.js +23 -8
  358. package/src/infrastructure/engines/walker/drawer-path/drawer-names/drawer-names.examples.json +42 -0
  359. package/src/infrastructure/engines/walker/drawer-path/drawer-names/piece.json +9 -0
  360. package/src/infrastructure/engines/walker/inherited-environment-in-a-subprocess/git-spawn-environment/git-spawn-environment.examples.json +36 -0
  361. package/{mechanisms/audit/CD-47 → src/infrastructure/engines/walker/inherited-environment-in-a-subprocess/git-spawn-environment}/hermetic-git-spawns.js +13 -4
  362. package/src/infrastructure/engines/walker/inherited-environment-in-a-subprocess/git-spawn-environment/piece.json +9 -0
  363. package/src/infrastructure/engines/walker/loop-keyword/loop-statement/loop-statement.examples.json +48 -0
  364. package/{mechanisms/audit/CD-15 → src/infrastructure/engines/walker/loop-keyword/loop-statement}/loops.js +12 -4
  365. package/src/infrastructure/engines/walker/loop-keyword/loop-statement/piece.json +9 -0
  366. package/src/infrastructure/engines/walker/module-or-global-patched/module-mock-call/module-mock-call.examples.json +36 -0
  367. package/{mechanisms/audit/CD-26 → src/infrastructure/engines/walker/module-or-global-patched/module-mock-call}/module-mocking.js +8 -4
  368. package/src/infrastructure/engines/walker/module-or-global-patched/module-mock-call/piece.json +9 -0
  369. package/src/infrastructure/engines/walker/outside-import-past-a-boundary/import-or-require/import-boundaries.js +133 -0
  370. package/src/infrastructure/engines/walker/outside-import-past-a-boundary/import-or-require/import-or-require.examples.json +42 -0
  371. package/src/infrastructure/engines/walker/outside-import-past-a-boundary/import-or-require/piece.json +14 -0
  372. package/src/infrastructure/engines/walker/rebinding/test-body/piece.json +18 -0
  373. package/{mechanisms/audit/runner → src/infrastructure/engines/walker/runner/pieces}/walker-piece.d.ts +8 -14
  374. package/{mechanisms/audit → src/infrastructure/engines/walker}/runner/runner.js +194 -121
  375. package/{mechanisms/audit/runner → src/infrastructure/engines/walker/runner/toolchain}/typescript-parse.d.ts +1 -0
  376. package/src/infrastructure/engines/walker/shorthand-name/identifier-names/identifier-names.examples.json +42 -0
  377. package/{mechanisms/audit/CD-6 → src/infrastructure/engines/walker/shorthand-name/identifier-names}/identifier-names.js +32 -15
  378. package/src/infrastructure/engines/walker/shorthand-name/identifier-names/piece.json +9 -0
  379. package/src/infrastructure/engines/walker/strictness-weakened/exact-optional-property-types/exact-optional-property-types.examples.json +71 -0
  380. package/src/infrastructure/engines/walker/strictness-weakened/exact-optional-property-types/piece.json +17 -0
  381. package/src/infrastructure/engines/walker/strictness-weakened/no-fallthrough-cases-in-switch/no-fallthrough-cases-in-switch.examples.json +71 -0
  382. package/src/infrastructure/engines/walker/strictness-weakened/no-fallthrough-cases-in-switch/piece.json +17 -0
  383. package/src/infrastructure/engines/walker/strictness-weakened/no-implicit-override/no-implicit-override.examples.json +71 -0
  384. package/src/infrastructure/engines/walker/strictness-weakened/no-implicit-override/piece.json +17 -0
  385. package/src/infrastructure/engines/walker/strictness-weakened/no-property-access-from-index-signature/no-property-access-from-index-signature.examples.json +71 -0
  386. package/src/infrastructure/engines/walker/strictness-weakened/no-property-access-from-index-signature/piece.json +17 -0
  387. package/src/infrastructure/engines/walker/strictness-weakened/no-unchecked-indexed-access/no-unchecked-indexed-access.examples.json +71 -0
  388. package/src/infrastructure/engines/walker/strictness-weakened/no-unchecked-indexed-access/piece.json +17 -0
  389. package/{mechanisms/audit/CD-3 → src/infrastructure/engines/walker/strictness-weakened/strict}/compiler-overrides.js +102 -38
  390. package/src/infrastructure/engines/walker/strictness-weakened/strict/piece.json +13 -0
  391. package/src/infrastructure/engines/walker/strictness-weakened/strict/strict.examples.json +64 -0
  392. package/src/infrastructure/engines/walker/strictness-weakened/use-unknown-in-catch-variables/piece.json +17 -0
  393. package/src/infrastructure/engines/walker/strictness-weakened/use-unknown-in-catch-variables/use-unknown-in-catch-variables.examples.json +71 -0
  394. package/src/infrastructure/engines/walker/text-past-its-reader/test-body/piece.json +18 -0
  395. package/src/infrastructure/engines/walker/throw-or-catch-in-a-test/throw-statement/piece.json +9 -0
  396. package/src/infrastructure/engines/walker/throw-or-catch-in-a-test/throw-statement/throw-statement.examples.json +36 -0
  397. package/{mechanisms/audit/CD-10 → src/infrastructure/engines/walker/throw-or-catch-in-a-test/throw-statement}/throws-in-tests.js +6 -3
  398. package/src/infrastructure/engines/walker/throw-or-catch-in-a-test/try-block/piece.json +18 -0
  399. package/src/infrastructure/engines/walker/type-derived-from-code/factory-return-types/factory-return-types.examples.json +36 -0
  400. package/{mechanisms/audit/CD-7a → src/infrastructure/engines/walker/type-derived-from-code/factory-return-types}/factory-return-types.js +5 -3
  401. package/src/infrastructure/engines/walker/type-derived-from-code/factory-return-types/piece.json +9 -0
  402. package/src/infrastructure/engines/walker/unit-without-a-running-test/companion-test-file/companion-test-file.examples.json +36 -0
  403. package/{mechanisms/audit/CD-23 → src/infrastructure/engines/walker/unit-without-a-running-test/companion-test-file}/export-test-sibling.js +7 -4
  404. package/src/infrastructure/engines/walker/unit-without-a-running-test/companion-test-file/piece.json +9 -0
  405. package/{mechanisms/audit/CD-5 → src/infrastructure/engines/walker/untracked-escape/directive-pointers}/comments-directives.js +40 -19
  406. package/src/infrastructure/engines/walker/untracked-escape/directive-pointers/directive-pointers.examples.json +96 -0
  407. package/src/infrastructure/engines/walker/untracked-escape/directive-pointers/piece.json +16 -0
  408. package/src/infrastructure/engines/walker/write-into-a-parameter/parameter-mutation/parameter-mutation.examples.json +42 -0
  409. package/{mechanisms/audit/CD-44 → src/infrastructure/engines/walker/write-into-a-parameter/parameter-mutation}/parameter-mutation.js +22 -7
  410. package/src/infrastructure/engines/walker/write-into-a-parameter/parameter-mutation/piece.json +9 -0
  411. package/src/rule-set.d.ts +4 -0
  412. package/src/testing.d.ts +7 -0
  413. package/src/testing.js +524 -0
  414. package/api/audit.d.ts +0 -20
  415. package/api/rule-set.d.ts +0 -4
  416. package/api/testing.d.ts +0 -5
  417. package/api/testing.js +0 -238
  418. package/chunks/chunk-335ITLPO.js +0 -7
  419. package/chunks/chunk-6SM3HKWO.js +0 -1912
  420. package/chunks/chunk-E6VR3VRV.js +0 -268
  421. package/chunks/chunk-FR4FASVM.js +0 -108
  422. package/chunks/chunk-LDQUT742.js +0 -15
  423. package/chunks/chunk-MXSIQPCV.js +0 -13
  424. package/chunks/chunk-RWQ4UNKY.js +0 -24
  425. package/core/check/tool-command.js +0 -2586
  426. package/core/mechanism-port/runner-result-types.d.ts +0 -15
  427. package/mechanisms/audit/CD-1/piece.json +0 -13
  428. package/mechanisms/audit/CD-10/piece.json +0 -13
  429. package/mechanisms/audit/CD-14/piece.json +0 -13
  430. package/mechanisms/audit/CD-15/piece.json +0 -13
  431. package/mechanisms/audit/CD-17/clock-sources.js +0 -28
  432. package/mechanisms/audit/CD-17/piece.json +0 -13
  433. package/mechanisms/audit/CD-19/import-boundaries.js +0 -99
  434. package/mechanisms/audit/CD-19/piece.json +0 -18
  435. package/mechanisms/audit/CD-2/piece.json +0 -18
  436. package/mechanisms/audit/CD-23/piece.json +0 -13
  437. package/mechanisms/audit/CD-25/piece.json +0 -13
  438. package/mechanisms/audit/CD-26/piece.json +0 -13
  439. package/mechanisms/audit/CD-27/piece.json +0 -17
  440. package/mechanisms/audit/CD-3/piece.json +0 -77
  441. package/mechanisms/audit/CD-43/piece.json +0 -13
  442. package/mechanisms/audit/CD-44/piece.json +0 -13
  443. package/mechanisms/audit/CD-47/piece.json +0 -13
  444. package/mechanisms/audit/CD-5/piece.json +0 -20
  445. package/mechanisms/audit/CD-6/piece.json +0 -13
  446. package/mechanisms/audit/CD-7/piece.json +0 -13
  447. package/mechanisms/audit/CD-7a/piece.json +0 -13
  448. package/mechanisms/audit/CD-8/piece.json +0 -13
  449. package/mechanisms/audit/CD-8/switch-defaults.js +0 -42
  450. package/mechanisms/eslint/CD-1/piece.json +0 -23
  451. package/mechanisms/eslint/CD-10/piece.json +0 -15
  452. package/mechanisms/eslint/CD-14/piece.json +0 -31
  453. package/mechanisms/eslint/CD-2/cd2/cd2.eslint-plugin.js +0 -15
  454. package/mechanisms/eslint/CD-2/piece.json +0 -25
  455. package/mechanisms/eslint/CD-27/piece.json +0 -23
  456. package/mechanisms/eslint/CD-40/cd40/cd40.eslint-plugin.js +0 -15
  457. package/mechanisms/eslint/CD-40/piece.json +0 -21
  458. package/mechanisms/eslint/CD-41/piece.json +0 -23
  459. package/mechanisms/eslint/CD-42/piece.json +0 -15
  460. package/mechanisms/eslint/CD-44/cd44/cd44.eslint-plugin.js +0 -15
  461. package/mechanisms/eslint/CD-44/piece.json +0 -20
  462. package/mechanisms/eslint/CD-6/cd6/cd6.eslint-plugin.js +0 -15
  463. package/mechanisms/eslint/CD-6/piece.json +0 -217
  464. package/mechanisms/eslint/CD-7/piece.json +0 -15
  465. package/rules/CD-1/CHECKS.md +0 -39
  466. package/rules/CD-1/README.md +0 -28
  467. package/rules/CD-1/discipline.json +0 -195
  468. package/rules/CD-10/CHECKS.md +0 -49
  469. package/rules/CD-10/README.md +0 -27
  470. package/rules/CD-10/discipline.json +0 -133
  471. package/rules/CD-11/CHECKS.md +0 -13
  472. package/rules/CD-11/README.md +0 -25
  473. package/rules/CD-11/discipline.json +0 -12
  474. package/rules/CD-12/CHECKS.md +0 -13
  475. package/rules/CD-12/README.md +0 -25
  476. package/rules/CD-12/discipline.json +0 -12
  477. package/rules/CD-13/CHECKS.md +0 -13
  478. package/rules/CD-13/README.md +0 -25
  479. package/rules/CD-13/discipline.json +0 -12
  480. package/rules/CD-14/CHECKS.md +0 -49
  481. package/rules/CD-14/README.md +0 -28
  482. package/rules/CD-14/discipline.json +0 -173
  483. package/rules/CD-15/CHECKS.md +0 -42
  484. package/rules/CD-15/README.md +0 -30
  485. package/rules/CD-15/discipline.json +0 -73
  486. package/rules/CD-16/CHECKS.md +0 -7
  487. package/rules/CD-16/README.md +0 -15
  488. package/rules/CD-17/CHECKS.md +0 -37
  489. package/rules/CD-17/README.md +0 -28
  490. package/rules/CD-17/discipline.json +0 -51
  491. package/rules/CD-18/CHECKS.md +0 -13
  492. package/rules/CD-18/README.md +0 -25
  493. package/rules/CD-18/discipline.json +0 -12
  494. package/rules/CD-19/CHECKS.md +0 -49
  495. package/rules/CD-19/README.md +0 -29
  496. package/rules/CD-19/discipline.json +0 -63
  497. package/rules/CD-2/CHECKS.md +0 -58
  498. package/rules/CD-2/README.md +0 -30
  499. package/rules/CD-2/discipline.json +0 -151
  500. package/rules/CD-20/CHECKS.md +0 -7
  501. package/rules/CD-20/README.md +0 -15
  502. package/rules/CD-21/CHECKS.md +0 -13
  503. package/rules/CD-21/README.md +0 -24
  504. package/rules/CD-21/discipline.json +0 -12
  505. package/rules/CD-22/CHECKS.md +0 -13
  506. package/rules/CD-22/README.md +0 -24
  507. package/rules/CD-22/discipline.json +0 -12
  508. package/rules/CD-23/CHECKS.md +0 -35
  509. package/rules/CD-23/README.md +0 -26
  510. package/rules/CD-23/discipline.json +0 -57
  511. package/rules/CD-24/CHECKS.md +0 -7
  512. package/rules/CD-24/README.md +0 -15
  513. package/rules/CD-25/CHECKS.md +0 -38
  514. package/rules/CD-25/README.md +0 -31
  515. package/rules/CD-25/discipline.json +0 -57
  516. package/rules/CD-26/CHECKS.md +0 -36
  517. package/rules/CD-26/README.md +0 -29
  518. package/rules/CD-26/discipline.json +0 -57
  519. package/rules/CD-27/CHECKS.md +0 -451
  520. package/rules/CD-27/README.md +0 -29
  521. package/rules/CD-27/discipline.json +0 -437
  522. package/rules/CD-28/CHECKS.md +0 -13
  523. package/rules/CD-28/README.md +0 -25
  524. package/rules/CD-28/discipline.json +0 -12
  525. package/rules/CD-29/CHECKS.md +0 -13
  526. package/rules/CD-29/README.md +0 -23
  527. package/rules/CD-29/discipline.json +0 -12
  528. package/rules/CD-3/README.md +0 -26
  529. package/rules/CD-3/discipline.json +0 -641
  530. package/rules/CD-30/CHECKS.md +0 -13
  531. package/rules/CD-30/README.md +0 -24
  532. package/rules/CD-30/discipline.json +0 -12
  533. package/rules/CD-31/CHECKS.md +0 -13
  534. package/rules/CD-31/README.md +0 -23
  535. package/rules/CD-31/discipline.json +0 -12
  536. package/rules/CD-32/CHECKS.md +0 -13
  537. package/rules/CD-32/README.md +0 -24
  538. package/rules/CD-32/discipline.json +0 -12
  539. package/rules/CD-33/CHECKS.md +0 -13
  540. package/rules/CD-33/README.md +0 -24
  541. package/rules/CD-33/discipline.json +0 -12
  542. package/rules/CD-34/CHECKS.md +0 -13
  543. package/rules/CD-34/README.md +0 -23
  544. package/rules/CD-34/discipline.json +0 -12
  545. package/rules/CD-39/CHECKS.md +0 -13
  546. package/rules/CD-39/README.md +0 -24
  547. package/rules/CD-39/discipline.json +0 -12
  548. package/rules/CD-4/CHECKS.md +0 -13
  549. package/rules/CD-4/README.md +0 -26
  550. package/rules/CD-4/discipline.json +0 -12
  551. package/rules/CD-40/CHECKS.md +0 -39
  552. package/rules/CD-40/README.md +0 -29
  553. package/rules/CD-40/discipline.json +0 -58
  554. package/rules/CD-41/CHECKS.md +0 -64
  555. package/rules/CD-41/README.md +0 -31
  556. package/rules/CD-41/discipline.json +0 -138
  557. package/rules/CD-42/CHECKS.md +0 -47
  558. package/rules/CD-42/README.md +0 -25
  559. package/rules/CD-42/discipline.json +0 -61
  560. package/rules/CD-43/CHECKS.md +0 -37
  561. package/rules/CD-43/README.md +0 -27
  562. package/rules/CD-43/discipline.json +0 -65
  563. package/rules/CD-44/CHECKS.md +0 -48
  564. package/rules/CD-44/README.md +0 -26
  565. package/rules/CD-44/discipline.json +0 -111
  566. package/rules/CD-45/CHECKS.md +0 -13
  567. package/rules/CD-45/README.md +0 -25
  568. package/rules/CD-45/discipline.json +0 -12
  569. package/rules/CD-46/CHECKS.md +0 -7
  570. package/rules/CD-46/README.md +0 -25
  571. package/rules/CD-47/CHECKS.md +0 -37
  572. package/rules/CD-47/README.md +0 -31
  573. package/rules/CD-47/discipline.json +0 -57
  574. package/rules/CD-5/README.md +0 -28
  575. package/rules/CD-5/discipline.json +0 -131
  576. package/rules/CD-6/CHECKS.md +0 -51
  577. package/rules/CD-6/README.md +0 -28
  578. package/rules/CD-6/discipline.json +0 -165
  579. package/rules/CD-7/CHECKS.md +0 -46
  580. package/rules/CD-7/README.md +0 -29
  581. package/rules/CD-7/discipline.json +0 -142
  582. package/rules/CD-7a/CHECKS.md +0 -38
  583. package/rules/CD-7a/README.md +0 -26
  584. package/rules/CD-7a/discipline.json +0 -57
  585. package/rules/CD-8/CHECKS.md +0 -42
  586. package/rules/CD-8/README.md +0 -26
  587. package/rules/CD-8/discipline.json +0 -57
  588. package/rules/CD-9/CHECKS.md +0 -13
  589. package/rules/CD-9/README.md +0 -26
  590. package/rules/CD-9/discipline.json +0 -12
  591. /package/{core/values → src/domain/finding}/anchor.d.ts +0 -0
  592. /package/{core/values → src/domain/repository}/branded.d.ts +0 -0
  593. /package/{core/values → src/domain/repository}/repo-path-types.d.ts +0 -0
  594. /package/{core/values → src/domain}/result.d.ts +0 -0
  595. /package/{core/values → src/domain/rule-set}/clause-address-types.d.ts +0 -0
  596. /package/{core/values → src/domain/settings/json-values}/json-value.d.ts +0 -0
  597. /package/{mechanisms/eslint/CD-14 → src/infrastructure/engines/eslint/authored-class-or-this/class-keyword}/README.md +0 -0
  598. /package/{mechanisms/eslint/CD-2 → src/infrastructure/engines/eslint/claimed-type/non-null-assertions}/README.md +0 -0
  599. /package/{mechanisms/eslint/CD-7 → src/infrastructure/engines/eslint/name-off-its-casing/filename-case}/README.md +0 -0
  600. /package/{mechanisms/eslint/CD-6 → src/infrastructure/engines/eslint/name-off-its-casing/naming-convention}/README.md +0 -0
  601. /package/{mechanisms/eslint/CD-40 → src/infrastructure/engines/eslint/positional-parameters/parameter-count}/README.md +0 -0
  602. /package/{mechanisms/eslint/CD-44 → src/infrastructure/engines/eslint/rebinding/parameter-reassignment}/README.md +0 -0
  603. /package/{mechanisms/eslint/CD-27 → src/infrastructure/engines/eslint/test-switched-off/focused-tests}/README.md +0 -0
  604. /package/{mechanisms/eslint/CD-10 → src/infrastructure/engines/eslint/thrown-non-error/throw-only-error}/README.md +0 -0
  605. /package/{mechanisms/eslint/CD-1 → src/infrastructure/engines/eslint/untyped-value/explicit-any}/README.md +0 -0
  606. /package/{mechanisms/eslint/CD-42 → src/infrastructure/engines/eslint/work-inside-a-condition/else-after-an-exit}/README.md +0 -0
  607. /package/{mechanisms/audit → src/infrastructure/engines/walker}/runner/README.md +0 -0
  608. /package/{api → src}/rule-set.js +0 -0
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![Supported Node versions on the latest dist-tag](https://img.shields.io/node/v/%40hailstails%2Fhone/latest)](https://www.npmjs.com/package/@hailstails/hone)
7
7
  [![Licence](https://img.shields.io/npm/l/%40hailstails%2Fhone)](LICENSE)
8
8
 
9
- Hone checks a repository against the disciplines it has chosen to adopt. It is a tool, not a framework: it reads what the repository selected, hands each selected clause to the mechanism that checks it, applies the repository's recorded exceptions, and prints one verdict. Its core enforces nothing and names no discipline and no mechanism. A discipline (for example CD-14, no authored classes) is data under `rules/`, and a mechanism is a runner under `mechanisms/`; the core reaches both only through files and one module contract.
9
+ Hone checks a repository against the disciplines it has chosen to adopt. It is a tool, not a framework: it reads what the repository selected, hands each selected clause to the mechanism that checks it, applies the repository's recorded exceptions, and prints one verdict. Its core enforces nothing and names no discipline and no mechanism. A discipline (for example the one that flags an [authored class](rules/typescript/symptoms.md#authored-class-or-this)) is data under `rules/`, and a mechanism is a runner under `mechanisms/`; the core reaches both only through files and one module contract.
10
10
 
11
11
  **Install the npm package `@hailstails/hone`.** The unscoped name `hone` on npm belongs to an unrelated package: never run `npm install hone`. `@hailstails/hone` installs one command, `hone`:
12
12
 
@@ -17,7 +17,7 @@ npm install --save-dev --save-exact @hailstails/hone@<version>
17
17
 
18
18
  With pnpm the second command is `pnpm add -D --save-exact @hailstails/hone@<version>`. Stable releases are published to npm under the dist-tag `latest` and pre-releases under `next`; the badge above shows the version `latest` installs. Pin the exact version rather than installing by tag: a major release can remove or rename a clause address, config key or flag, and an install by tag can record a range. The alternative is the tarball attached to each [GitHub release](https://github.com/HailsTails/hone/releases), installed with `npm install --save-dev <path-to-tarball>`. A repository on the package's old name, `honed`, moves with [MIGRATING.md](MIGRATING.md#11-moving-from-honed-to-hailstailshone). [ADOPTING.md](ADOPTING.md#2-install-the-hone-package) step 2 has the steps, and the alternative of building the tarball from a pinned commit.
19
19
 
20
- Two mechanisms ship: `audit`, a standalone TypeScript syntax walker, and `eslint`, which runs the clause as an ESLint rule inside the team's own ESLint setup. [rules/README.md](rules/README.md) lists every shared discipline with its clauses: the audit mechanism checks 20 disciplines, and ESLint pieces check clauses of CD-1, CD-6, CD-7, CD-10, CD-14, CD-27, CD-40, CD-41, CD-42 and CD-44. The rest are judgement rules, applied in review with the review methods in [methods/](methods/README.md).
20
+ Two engines ship: `walker`, a standalone TypeScript syntax walker that version 1 called `audit`, and `eslint`, which runs the check as an ESLint rule inside the team's own ESLint setup. Rules are referred to by name; a number is only a clause address. [rules/numbers.md](rules/numbers.md#every-numbered-discipline) lists every shared discipline with its clauses, and [rules/README.md](rules/README.md) explains how the named pages read: the walker checks 20 disciplines, and ESLint pieces check eleven symptoms: [Untyped value](rules/typescript/symptoms.md#untyped-value), [Claimed type](rules/typescript/symptoms.md#claimed-type), [Name off its casing](rules/typescript/symptoms.md#name-off-its-casing), [Thrown non-error](rules/typescript/symptoms.md#thrown-non-error), [Authored class or this](rules/typescript/symptoms.md#authored-class-or-this), [Test switched off](rules/typescript/symptoms.md#test-switched-off), [Positional parameters](rules/typescript/symptoms.md#positional-parameters), [Tangled function](rules/typescript/symptoms.md#tangled-function), [Long function](rules/typescript/symptoms.md#long-function), [Work inside a condition](rules/typescript/symptoms.md#work-inside-a-condition) and [Rebinding](rules/typescript/symptoms.md#rebinding). The rest are judgement rules, applied in review with the review methods in [methods/](methods/README.md).
21
21
 
22
22
  To adopt Hone in another repository, follow [ADOPTING.md](ADOPTING.md) step by step. A repository already using the older standalone route, or a copy of Hone's source, follows [MIGRATING.md](MIGRATING.md) instead.
23
23
 
@@ -25,284 +25,250 @@ A team adds its own disciplines as a rule set in its own repository, with ESLint
25
25
 
26
26
  ## Commands
27
27
 
28
- The package ships one command, `hone`, with five subcommands. `check` and `project` run through a `package.json` script as [ADOPTING.md](ADOPTING.md#2-install-the-hone-package) shows; `record-debt` runs once, when a repository adopts Hone; `prune-debt` runs when the check names it, to remove the records of files that no longer exist; `split-records` runs once, when a repository moves its records to [the split layout](#the-split-layout):
28
+ The package ships one command, `hone`, with six subcommands for a version 2 repository, and a seventh, `hone split-records`, which belongs to version 1 and prints `load failure: not-ready-yet` on a version 2 repository. `check` and `project` run through a `package.json` script as [ADOPTING.md](ADOPTING.md#2-install-the-hone-package) shows; `record-debt` runs once, when a repository adopts Hone; `prune-debt` runs when the check names it, to remove the records of debt that is paid; `authorise` writes one authorised location; `upgrade` runs once, to move a version 1 repository to version 2, as [MIGRATING.md](MIGRATING.md#20-moving-from-version-1-to-version-2) section 20 shows:
29
29
 
30
30
  ```text
31
- hone check --repo <dir> [--base-revision <revision>] [--report-output <full|failures-only|counts|verdict-only>] [--forfeiture <this-run|elsewhere>]
31
+ hone check --repo <dir> [--base-revision <revision>] [--report-output <full|actionable|counts|verdict-only>] [--forfeiture <this-run|elsewhere>]
32
32
  hone project --repo <dir>
33
33
  hone record-debt --repo <dir> --base-revision <revision> [--leave <path>]...
34
34
  hone prune-debt --repo <dir> [--base-revision <revision>] [--forfeiture <this-run|elsewhere>]
35
- hone split-records --repo <dir>
35
+ hone authorise --repo <dir> --answers <address> --file <path> --case <case> --owes <principle> --why <question>... --because <answer>... --evidence <evidence>... --root-cause <text> --root-evidence <text> --readback <text> --owner <owner>
36
+ hone upgrade --repo <dir>
36
37
  hone --help
37
38
  hone --version
38
39
  ```
39
40
 
40
- `--repo` is the folder that holds `disciplines.json`, usually the repository root. `hone --help` lists the commands, `hone check --help`, `hone project --help`, `hone record-debt --help`, `hone prune-debt --help` and `hone split-records --help` list each one's options and exit codes, and `hone --version` prints the installed version. A command typed wrongly is a load failure `arguments-invalid` that says what was wrong, a `--repo` folder with no `disciplines.json` is the load failure `selection-absent`, and an error Hone did not expect is the load failure `unexpected-error`; each exits `2`. Everything Hone prints goes to standard output, so exit `1` always comes with `verdict: fail`. From a source checkout the same command is `node core/check/tool-command.ts check --repo <dir>`.
41
+ `--repo` is the folder that holds `hone.config.json`, usually the repository root; for `hone upgrade` it is the folder that holds `disciplines.json`. `hone --help` lists the commands, `hone check --help`, `hone project --help`, `hone record-debt --help`, `hone prune-debt --help`, `hone authorise --help` and `hone upgrade --help` list each one's options and exit codes, and `hone --version` prints the installed version. `hone --help` always prints this version's help. A command's `--help` prints the 1.x help only when it is given a `--repo` folder that holds `disciplines.json`, and `hone split-records --help` always prints it. A command typed wrongly is a load failure `arguments-invalid` that says what was wrong, a `--repo` folder with neither `hone.config.json` nor `disciplines.json` is the load failure `config-absent`, saying it holds no `hone.config.json`, from every command, and an error Hone did not expect is the load failure `unexpected-error`; each exits `2`. Everything Hone prints goes to standard output, so exit `1` always comes with `verdict: fail`. From a source checkout the same command is `node core/check/tool-command.ts check --repo <dir>`.
41
42
 
42
43
  [docs/output-contract.md](docs/output-contract.md) lists every line `hone` prints, exactly as it prints it, with the exit codes and which parts are stable for hooks, CI and agents to rely on. A test renders every kind of line and checks it against that page, both ways.
43
44
 
44
- `hone check` loads the repository's selection, exceptions, rule sets and pieces; works out which files changed since `--base-revision`; runs each selected mechanism once over the repository's tracked `.ts`, `.tsx`, `.mts` and `.cts` files; applies the exceptions; and prints a plain-text report ending in `verdict: pass` or `verdict: fail`, followed by ` (partial assessment)` when the run left part of the assessment to another run. It exits `0` when the verdict is `pass`, `1` when it is `fail`, and `2` on a load failure, which prints one line, `load failure: <kind> <fields>`. `hone project`, `hone record-debt`, `hone prune-debt` and `hone split-records` exit `0` or `2`.
45
+ `hone check` loads the repository's `hone.config.json`, the symptom catalogue and the records in `hone-records`; works out which files changed since `--base-revision`; runs each engine its listed checks name once over the repository's tracked files, the ESLint engine over its `.ts`, `.tsx`, `.mts` and `.cts` files; answers each finding by the records; and prints a plain-text report ending in `verdict: pass` or `verdict: fail`, followed by ` (partial assessment)` when the run left part of the assessment to another run. It exits `0` when the verdict is `pass`, `1` when it is `fail`, and `2` on a load failure, which prints one line, `load failure: <kind> <fields>`. `hone project`, `hone record-debt`, `hone prune-debt` and `hone authorise` exit `0` or `2`.
45
46
 
46
- The report lists the excluded paths, the clauses not adopted, the clauses adopted with their mechanism not run, the edition each clause with more than one edition ran, findings, exempted findings, uncovered clauses, stale, forfeited, unrecorded and doubly-held exceptions, invalid exception records, unmeasured checks, projection problems, any part of the assessment left to another run and, last, where to read first for each clause with findings and the command that removes the records of files that no longer exist, each with its count. The verdict is `pass` only when every list except the excluded paths, clauses not adopted, clauses not run, editions, exempted findings, assessment and where to read first is empty.
47
+ The report lists the excluded paths, the checks not adopted, the checks adopted with their engine not run, the edition each check with more than one edition ran, findings, answered findings, the checks available to list, stale and forfeited records, unrecorded native exceptions, misnamed inline disables, paid debt, refused records, what the run could not measure, projection problems, any part of the assessment left to another run, the notes on the settings and on records, the records carried from version 1 and, last, one note for each symptom the findings name, each with its count. The verdict is `pass` only when no failing section has an entry: the findings, stale and forfeited records, unrecorded native exceptions, misnamed inline disables, refused records, unmeasured checks and projection problems. Paid debt, answered findings, checks available to list, carried records, notes, the assessment and the symptom notes never fail a run; [the output contract](docs/output-contract.md#the-version-2-report) gives every section's role.
47
48
 
48
- An `unrecorded` line is `<clause> <mechanism> <kind> <detail>`. Two kinds end with a note:
49
+ An `unrecorded` line is `<check> <engine> <kind> <detail>`. Two kinds end with a note:
49
50
 
50
51
  | Kind | Line |
51
52
  | --- | --- |
52
- | `inline-disable` naming no rule | `<clause> eslint inline-disable <file>:<line> <comment> names no rule and escapes every selected clause: naming the rule is the cheap fix` |
53
- | `command-line-option` that weakens the run | `<clause> eslint command-line-option <package.json> <script> <option> weakens the script's whole run, so no record can cover it: remove it from the script` |
54
- | `command-line-option` Hone cannot judge, because another command comes before `eslint` in its script | `<clause> eslint command-line-option <package.json> <script> <option>: <command> is not the first command of its script, so Hone cannot tell what the option does to the files under check; give <command> a script of its own, such as "<invocation>"` |
55
- | `command-line-option` Hone cannot judge, because something before `eslint` in its own command is not a package runner or a `NAME=value` setting | `<clause> eslint command-line-option <package.json> <script> <option>: "<wrapper>" comes before <command> and is neither a package runner nor a NAME=value setting, so Hone cannot tell what the option does to the files under check; put only package runners and NAME=value settings before <command>` |
56
- | `command-line-option` Hone cannot judge, because a quote in a script naming `eslint` has no partner; the whole script stands in for the option | `<clause> eslint command-line-option <package.json> <script> <script text>: a quote in the script has no partner, so Hone cannot read what the script passes to <command> or tell what that does to the files under check; pair every quote in the script` |
53
+ | `inline-disable` naming no rule | `<check> eslint inline-disable <file>:<line> <comment> names no rule and escapes every selected check: naming the rule is the cheap fix` |
54
+ | `command-line-option` that weakens the run | `<check> eslint command-line-option <package.json> <script> <option> weakens the script's whole run, so no record can cover it: remove it from the script` |
55
+ | `command-line-option` Hone cannot judge, because another command comes before `eslint` in its script | `<check> eslint command-line-option <package.json> <script> <option>: <command> is not the first command of its script, so Hone cannot tell what the option does to the files under check; give <command> a script of its own, such as <invocation>` |
56
+ | `command-line-option` Hone cannot judge, because something before `eslint` in its own command is not a package runner or a `NAME=value` setting | `<check> eslint command-line-option <package.json> <script> <option>: <wrapper> comes before <command> and is neither a package runner nor a NAME=value setting, so Hone cannot tell what the option does to the files under check; put only package runners and NAME=value settings before <command>` |
57
+ | `command-line-option` Hone cannot judge, because a quote in a script naming `eslint` has no partner; the whole script stands in for the option | `<check> eslint command-line-option <package.json> <script> <script text>: a quote in the script has no partner, so Hone cannot read what the script passes to <command> or tell what that does to the files under check; pair every quote in the script` |
57
58
 
58
59
  `<command>` is the `eslint` call as the script writes it, `<invocation>` is its whole command with its settings and options, from the same script, and `<wrapper>` is the first token before it that Hone does not read, such as `env` or a runner flag like `-y` or `-C`. `cross-env` followed only by `NAME=value` settings counts as a setting. Once only package runners and settings come first, Hone judges the option: `-c` naming the config ESLint already finds, and `--ignore-pattern` that ignores no checked file, are then not reported.
59
60
 
60
- `readFirst` comes last, just before the verdict, so a reader who looks only at the end of a failing report lands on it. It has one line per clause with findings, not one per finding, in the order the findings first name the clauses. Each line points at the Spirit section of the clause's rule page, `rules/<ID>/README.md` in the clause's rule set, and, where the repository has written one, at the clause's own section in `disciplines.assessment.md` at the repository root first. That file is where a repository records its own causes, forward goal and steps for a clause; [ADOPTING step 5a](ADOPTING.md#5a-write-the-assessment) says how to write it. Paths are printed with forward slashes, relative to the `--repo` folder; a page on another drive is printed as its absolute path.
61
+ The `symptoms` section comes last, just before the verdict, so a reader who looks only at the end of a failing report lands on it. It has one note for each symptom a finding names, in the order the findings first name them, each printed once however many findings name it: what the symptom may indicate, where the breach usually sits, the recipes that answer it, the situations that are correct uses of it and where to record each, and the page that explains it. A finding that names its check also says what that check may indicate and, where the check has one, what to write instead and the page that says so. A finding of a clause the symptom catalogue gives no check, such as one in a team's rule set, prints its clause address and its mechanism and no note. A run with no findings prints no `symptoms` section. When the check finds debt that is paid, the `paid` section names the exact `hone prune-debt` command for this repository, as [Pruning paid debt](#pruning-paid-debt) shows.
61
62
 
62
- When `disciplines.assessment.md` is not written yet, or cannot be read, one note line comes first and says so, naming ADOPTING step 5a; each clause line then names its rule page only. The note counts as an entry, so a report with two failing clauses and no assessment file prints `readFirst (3)`. A clause line names the clause's section when the file has one, and says `disciplines.assessment.md does not assess this clause` when the file is there without it. When the check finds a `stale` or `forfeited` `file-carve-out` on a file that no longer exists, one more line comes last and names the exact `hone prune-debt` command for this repository, as [Pruning paid debt](#pruning-paid-debt) shows. [The output contract](docs/output-contract.md#report-lines) lists every `readFirst` line exactly.
63
+ `--report-output` sets how much of the report is printed for one run, overriding `reportOutput` in `hone.config.json`; with neither, the output is `full`. `full` prints every non-empty section, `actionable` leaves out the informational sections and keeps the failing, next-step and guidance sections, `counts` prints each section's heading line only, with `informational`, `next-step` or `guidance` after the sections that never fail the run, and `verdict-only` prints the verdict line alone; [the output contract](docs/output-contract.md#the-version-2-report) shows each.
63
64
 
64
- A file that does not assess a clause is normal: the assessment covers the clauses the repository chose to describe, and the rule page's Spirit is the read for the rest.
65
+ The output changes only what is printed: the verdict and exit code always come from the whole report. An unknown `--report-output` value is a load failure `arguments-invalid`; an unknown `reportOutput` value is a load failure in `hone.config.json`, even when `--report-output` is given. Load failures print the same in every output.
65
66
 
66
- A clause's section is a level-2 heading whose text is exactly the clause address as the report prints it (`## CD-15#loops`, `## team/TM-1#no-tmp-files`). Trailing spaces, a carriage return and a byte order mark at the start of the file are ignored. Nothing else is normalised: `## CD-15#loops ##`, `## CD-15#loops`, `### CD-15#loops` and `## hone/CD-15#loops` are not that clause's section, and a heading inside a fenced code block (opened by three or more backticks or tildes, closed by at least as many of the same character) is not counted.
67
-
68
- Hone matches the heading only; it never reads the section's text. A missing file or section never fails the run. A run with no findings prints no `readFirst` section and reads neither file, so its report is unchanged; a run with findings reads `disciplines.assessment.md` once and checks that each failing clause's rule page exists.
69
-
70
- `--report-output` sets how much of the report is printed for one run, overriding `reportOutput` in `disciplines.json`; with neither, the output is `full`. `full` prints every non-empty section, `failures-only` leaves out the informational sections and keeps `readFirst`, `counts` prints each section's heading line only, with `informational` or `guidance` after the sections that never fail the run, and `verdict-only` prints the verdict line alone; [the output contract](docs/output-contract.md#the-report) shows each.
71
-
72
- The output changes only what is printed: the verdict and exit code always come from the whole report. An unknown `--report-output` value is a load failure `arguments-invalid`; an unknown `reportOutput` value makes `disciplines.json` `file-malformed`, even when `--report-output` is given. Load failures print the same in every output.
73
-
74
- Without `--base-revision`, Hone cannot tell which files were touched, so a file carve-out cannot be forfeited; if any file carve-out exists the report lists `forfeiture-unmeasured` and the run fails. For the same reason it cannot tell whether an entry with an earlier-contract why-chain is unchanged; if one exists the report lists `legacy-chain-unmeasured` and the run fails. Each line says what Hone needs:
67
+ Without `--base-revision`, Hone cannot tell which files were touched, so debt cannot be forfeited; if any debt exists the report lists `forfeiture-unmeasured` and the run fails. For the same reason it cannot compare a record carried from version 1 against the base; if one exists the report lists `import-unmeasured` and the run fails, unless forfeiture is left elsewhere, below. Each line says what Hone needs:
75
68
 
76
69
  ```text
77
- forfeiture-unmeasured no-base-revision: no --base-revision was given, so file carve-outs cannot be checked for decay; pass --base-revision with the branch's base, such as origin/main, or leave decay to another run with "assessment": { "forfeiture": "elsewhere" } in disciplines.json or --forfeiture elsewhere
78
- import-unmeasured no-base-revision: no --base-revision was given, so imported records cannot be checked against it; pass --base-revision with the branch's base, such as origin/main
79
- legacy-chain-unmeasured no-base-revision: no --base-revision was given, so legacy-chain records cannot be checked against it; pass --base-revision with the branch's base, such as origin/main
70
+ forfeiture-unmeasured no-base-revision: no --base-revision was given, so debt cannot be checked for forfeiture; pass --base-revision with the branch's base, such as origin/main, or leave forfeiture to another run with "forfeiture": "elsewhere" in hone.config.json or --forfeiture elsewhere
71
+ import-unmeasured no-base-revision: no --base-revision was given, so carried records cannot be checked against it; pass --base-revision with the branch's base, such as origin/main
80
72
  ```
81
73
 
82
- A `--base-revision` that git cannot use gives the same kinds as `base-git-failed`, naming the revision in double quotes, escaped as in JSON, with git's own first line:
74
+ A `--base-revision` that git cannot use gives the same kinds as `base-git-failed`, naming the revision in double quotes, escaped as in JSON, with git's own message:
83
75
 
84
76
  ```text
85
- forfeiture-unmeasured base-git-failed "origin/main": git could not list the files changed since that revision and said "<git's first line>"; Hone needs that revision and the history back to where this branch left it, or leave decay to another run with "assessment": { "forfeiture": "elsewhere" } in disciplines.json or --forfeiture elsewhere
86
- import-unmeasured base-git-failed "origin/main": git could not read the exception records at that revision and said "<git's first line>"; Hone needs the exception records as they were at that revision
87
- legacy-chain-unmeasured base-git-failed "origin/main": git could not read the exception records at that revision and said "<git's first line>"; Hone needs the exception records as they were at that revision
77
+ forfeiture-unmeasured base-git-failed "origin/main": git could not list the files changed since that revision and said "<git's message>"; Hone needs that revision and the history back to where this branch left it, or leave forfeiture to another run with "forfeiture": "elsewhere" in hone.config.json or --forfeiture elsewhere
78
+ import-unmeasured base-git-failed "origin/main": git could not read hone-records at that revision and said "<git's message>"; Hone needs hone-records as it was at that revision
88
79
  ```
89
80
 
90
- `--forfeiture elsewhere` makes a run leave carve-out decay to another run, such as a pre-push hook given a base revision, overriding `assessment.forfeiture` in `disciplines.json`; `--forfeiture this-run`, the default, assesses it in this run. A run with forfeiture elsewhere asks git for no change set, forfeits no file carve-out and never reports `forfeiture-unmeasured`, with or without `--base-revision`. It ends its report with an `assessment` section, printed whenever the run assesses less than the default, and marks its verdict line in every output:
81
+ `--forfeiture elsewhere` makes a run leave debt forfeiture to another run, such as a pre-push hook given a base revision, overriding `forfeiture` in `hone.config.json`; `--forfeiture this-run`, the default, assesses it in this run. A run with forfeiture elsewhere asks git for no change set for debt, forfeits no debt and never reports `forfeiture-unmeasured`, with or without `--base-revision`. It adds an `assessment` section to its report, printed whenever the run assesses less than the default, and marks its verdict line in every output:
91
82
 
92
83
  ```text
93
84
  assessment (1)
94
- forfeiture elsewhere: 37 file carve-outs not checked for decay in this run
85
+ forfeiture elsewhere: 37 debt records not checked for forfeiture in this run
95
86
  verdict: pass (partial assessment)
96
87
  ```
97
88
 
98
- The `assessment` section is informational and the marker does not change the exit code. Forfeiture elsewhere changes nothing else: `--base-revision` given with it is used only to check imported entries and legacy chains, and a run without a base revision still reports `import-unmeasured` and `legacy-chain-unmeasured` as above.
89
+ The `assessment` section is informational and the marker does not change the exit code. Records carried from version 1 follow the same setting, as [MIGRATING.md](MIGRATING.md#20-moving-from-version-1-to-version-2) says: with forfeiture elsewhere, a run given no base leaves them to the run that has one and prints `carried standing elsewhere` with how many; a run given a base judges them against it; and if no run is ever given a base they are never judged. A base that is given but cannot be read prints `import-unmeasured base-git-failed` and fails under either setting.
99
90
 
100
- `hone project` writes the native configuration each embedded mechanism needs, and prints `<path> <effect>` per file: `written`, `unchanged`, `removed` for a package slice Hone wrote whose folder is no longer a config root, or `left-in-place` for such a file whose bytes are not what Hone would write there. The audit mechanism is standalone and writes nothing, so with only the walker selected the command prints nothing and exits `0`.
91
+ `hone project` writes the native configuration each engine that runs a listed check through one needs, and prints `<path> <effect>` per file: `written` or `unchanged`. For the ESLint engine the files are `hone.eslint.mjs` and, beside it, `hone.eslint.d.mts`, which types the projection. The walker is standalone and writes nothing, so with only the walker listed the command prints nothing and exits `0`.
101
92
 
102
93
  ### Recording inherited debt
103
94
 
104
- `hone record-debt` gives a repository that adopts Hone with existing code a file record for each debt it cannot fix on day one. [ADOPTING.md](ADOPTING.md#7a-record-the-debt-you-inherit) step 7a is the procedure. The command runs the check with the `--base-revision` it is given, then adds one `file-carve-out` to the exception records, `discipline-exceptions.json` or the discipline's file in [the split layout](#the-split-layout), for each clause and file that has a finding, or an inline disable or TypeScript directive under `unrecorded`. Each is the record a person would write, so nothing downstream treats it differently: it names only its `kind`, `clause` and `file`. A file carve-out is debt and needs no `reason` and no `whyChain`, so the command needs no setting in `disciplines.json` and never sets one. Add a `reason` by hand afterwards if you want to leave a note for future developers on what the debt signals.
95
+ `hone record-debt` gives a repository that adopts Hone with existing code a debt record for each finding it cannot fix on day one. [ADOPTING.md](ADOPTING.md#7a-record-the-debt-you-inherit) step 7a is the procedure. The command runs the check with the `--base-revision` it is given, then writes one debt record under `hone-records/debt/<symptom>.json` for each symptom, check and file that has a finding, and for each inline disable or TypeScript directive under `unrecorded`, since debt on its check and file is what holds one. Each is the record a person would write, so nothing downstream treats it differently: it names only its symptom, or its symptom and check as `<symptom>#<check>`, and its file. Debt needs no why-chain and no case, so the command needs no setting in `hone.config.json` and never sets one. Add a `note` by hand afterwards if you want to leave a note for future developers on what the debt signals.
105
96
 
106
- Give it the base that the run assessing decay is given, such as `origin/main` for a branch: a record for a file changed since that base is forfeited by that run, and a check against a later revision, such as `HEAD`, does not show it.
97
+ Give it the base that the run assessing forfeiture is given, such as `origin/main` for a branch: a record for a file changed since that base is forfeited by that run, so the command writes none for such a file and says so, and a check against a later revision, such as `HEAD`, would not show it.
107
98
 
108
- The records it writes give no `reason`. A Hone from before file carve-outs could leave out `reason` refuses such a record: the whole check stops with `load failure: file-malformed <records file> … at exceptions[<index>].reason` and exits `2`. So before the command writes any record, update the Hone that every pre-push hook, CI job and other machine runs to this release or later, as [ADOPTING.md](ADOPTING.md#10-update-and-remove) step 10 says, or that check stops.
99
+ It never writes anything that needs an owner's reason: no authorised location, no boundary record, no deviation, no dependency record and no setting. It prints one line per finding and per native exception under `unrecorded`, `recorded` for each record it added, and writes nothing for:
109
100
 
110
- It never writes anything wider than one clause in one file: no `authorised-location`, no `clause-wide-carve-out`, no `exclude` entry and no setting. It prints one line per clause and file, `recorded` for each record it added, and writes nothing for:
101
+ - a symptom and file that already hold debt (`already-recorded`), which the check explains by saying why it does not answer;
102
+ - a file under a `--leave` path (`left`). `--leave` takes an exact file or folder, as `exclude` does, and may be given once for each path. It names the deliberate, permanent exceptions, which a person records as an authorised location with its own reason;
103
+ - a file this change created or changed, when the run assesses forfeiture (`touched`), since a finding there is the change's own breach: fix it there, or for an inline disable or directive, fix what the comment hides and remove the comment. With `forfeiture` set to `elsewhere` the check forfeits nothing, so the command writes debt on such a file like any other;
104
+ - a finding the catalogue gives no symptom or check to record against, such as one of a team rule set's clauses (`unrecordable`);
105
+ - a native exception no debt record can hold (`unrecordable`). A `config-override` is never recorded, since debt holds what is owed and an override on a clean file owes nothing: a file under it that breaks the check gets its debt from the finding, because Hone's own run does not read the override, so remove the override or narrow it. An `ignore` and a `suppression-entry` hide nothing from Hone's run, which has already recorded what it finds in the file, so remove them; a generated or vendored file under an `ignore` can instead be listed in `exclude`, which Hone's run then honours too, so no `ignore` line is printed for it. An inline rule configuration changes what the rule checks: remove the comment. A lint-script option gets the advice for why Hone could not judge it, the same as its `unrecorded` line.
111
106
 
112
- - a pair that already has an `authorised-location` or `file-carve-out`, such as one the check forfeits (`already-recorded`);
113
- - a file under a `--leave` path (`left`). `--leave` takes an exact file or folder, as `exclude` does, and may be given once for each path. It names the deliberate, permanent exceptions, which a person records as an `authorised-location` with its own reason;
114
- - a file the base revision does not hold, since nothing in it was inherited (`new-file`);
115
- - a clause whose discipline refuses exceptions (`refused`);
116
- - a file that loads its own ESLint config inside a folder holding its own `disciplines.json` (`nested-configuration`). The projection never reaches that config, so the record could not take effect and the next check would fail on it. Nested Hone configurations are not supported yet ([#72](https://github.com/HailsTails/hone/issues/72)).
107
+ When it recorded anything, a last line, `run <project command> to put the recorded debt into effect`, names the command that writes the projection those records need. [ADOPTING.md](ADOPTING.md#6-read-the-report) step 6 says what to do with each `unrecorded` line.
117
108
 
118
- Other native exceptions under `unrecorded`, such as a `config-override` or a lint-script option, are not recorded: [ADOPTING.md](ADOPTING.md#6-read-the-report) step 6 says what to do with each.
109
+ It adds each record to its symptom's file, writing the file when there is none yet, and leaves every record already there as written. It stages and commits nothing: the diff of `hone-records` is the review, and nothing takes effect until a person commits it. It never removes or rewrites a record, so running it again writes nothing the second time. A record whose debt is paid is removed by `hone prune-debt`, below. Run `hone project` after it when any listed check runs on `eslint`, so the projection carries the new records.
119
110
 
120
- It adds the new entries after the last one and leaves every entry already in the file as written. It stages and commits nothing: the diff of the exception records is the review, and nothing takes effect until a person commits it. It never removes or rewrites a record, so running it again adds records only for pairs that still have none. A record on a file that no longer exists is removed by `hone prune-debt`, below. Run `hone project` after it when any clause is `eslint`, so the projection carries the new records.
121
-
122
- The command does not refuse to run again later, and has no flag for it. Forfeiture is what stops it turning new findings into carve-outs: a file carve-out is forfeited once its file changes since `--base-revision`, so a record written for a file someone has just changed fails the next check that assesses forfeiture, and a file that is new since the base gets no record at all. That holds only where forfeiture is assessed. In an arrangement that leaves it elsewhere, such as `"assessment": { "forfeiture": "elsewhere" }` with the pre-push hook that assesses it bypassed, such a record is not caught until a run that does assess it.
111
+ The command does not refuse to run again later, and has no flag for it. Forfeiture is what stops it turning new findings into debt: debt is forfeited once its file changes since `--base-revision`, so a record written for a file someone has just changed fails the next check that assesses forfeiture, and a file that is new or changed since the base gets no record at all. That holds only where forfeiture is assessed. In an arrangement that leaves it elsewhere, such as `"forfeiture": "elsewhere"` with the pre-push hook that assesses it bypassed, such a record is not caught until a run that does assess it.
123
112
 
124
113
  ### Pruning paid debt
125
114
 
126
- A `file-carve-out` is debt, and once the debt is paid the record should go. `hone prune-debt` removes the records whose file no longer exists: each `file-carve-out` under `stale` or `forfeited` whose file is gone from the repository, unless the report still lists a finding or a native exception on its clause and file.
127
-
128
- Every other record stays for a person:
115
+ Debt is a record that a finding is owed, and once the debt is paid the record should go. `hone prune-debt` removes the debt a run lists under `paid`, `stale` or `forfeited`: debt that another record answers in place of, debt on a file that is gone, a file the settings exclude, or a file whose check its engine measured there with nothing found, and debt on a file this change touched, whether or not that file still breaks its check. The `stale` line and the `prune-debt` line say which of the three it was. Only the engine knows what it measured. A file it was handed and skipped, a file outside the checked set and an engine that did not run are not measured, so their debt is unjudged: it is not listed as stale and the command leaves it.
129
116
 
130
- - **A `stale` `file-carve-out` on a file that still exists:** the command does not remove it. Delete it by hand, then run `hone project` when its clause is `eslint`.
131
- - **A `forfeited` record on a file that still exists:** fix the file and delete the record, as for any forfeited record. While the file still breaks its clause, the record keeps failing the run.
132
- - **An `authorised-location` or `clause-wide-carve-out` under `stale`:** it carries a person's judgement, so delete it by hand.
117
+ Every other record stays for a person, such as a `stale` authorised location whose finding is gone: it carries a person's judgement, so delete it by hand.
133
118
 
134
- The command runs the check with the `--base-revision` and `--forfeiture` it is given, so give it what the check was given. A check that finds a `file-carve-out` on a file that no longer exists names the command exactly in its last `readFirst` line, just above the verdict, with `hone project` after it when any of the records is for an `eslint` clause:
119
+ The command runs the check with the `--base-revision` and `--forfeiture` it is given, so give it what the check was given. A check that finds debt that is paid names the command exactly in the `paid` section:
135
120
 
136
121
  ```text
137
- prune-debt: 3 file carve-outs under stale or forfeited still record debt that is paid; run node /work/shop/node_modules/@hailstails/hone/core/check/tool-command.js prune-debt --repo /work/shop --base-revision origin/main to remove what is paid, then run node /work/shop/node_modules/@hailstails/hone/core/check/tool-command.js project --repo /work/shop and commit the exception records with every disciplines.eslint.mjs it writes
122
+ paid (1)
123
+ claimed-type debt src/a.ts answered by authorised-location; run node /work/shop/node_modules/@hailstails/hone/core/check/tool-command.js prune-debt --repo /work/shop --base-revision origin/main to remove the paid debt
138
124
  ```
139
125
 
140
- It prints `<clause> removed <file>` for each record it removed, ordered by file and then by clause, and nothing when it removed none. Like `hone record-debt`, it writes the exception records in whichever layout the repository keeps them, keeps every other record's text byte for byte, stages and commits nothing, and does not write the projection: run `hone project` after it when any clause is `eslint`, so the projection drops the records' off-switches. When it removes the last record from a file, it follows the layout: in [the split layout](#the-split-layout) it deletes that rule's file, as `hone split-records` writes a file only for a rule that holds records; a single `discipline-exceptions.json` is left holding an empty list. It has no dry run, as no other Hone command has: the `stale` and `forfeited` lines naming a file that no longer exists name what it removes, and the diff of the records is the review.
126
+ It prints `<symptom> removed <file>: <why>` for each record it removed, where `<why>` is `paid`, `stale` (followed by `, its file is no longer in the repository` or `, its file is excluded by the settings` when that is why) or `forfeited`, and nothing when it removed none. Like `hone record-debt`, it writes `hone-records`, keeps every other record's text as written, stages and commits nothing, and does not write the projection: run `hone project` after it when any check runs on `eslint`, so the projection drops the records' off-switches. When it removes the last record from a file, it deletes the file. It has no dry run, as no other Hone command has: the `prune-debt` lines name what it removes, and the diff of `hone-records` is the review.
141
127
 
142
- For an `eslint` clause, the off-switch the projection writes for a record is Hone's own. The check does not list it as a `config-override`, so it never counts as a native exception the record holds, and a record whose file no longer breaks its clause is `stale` like any other. A `config-override` on a clause and file no record holds is reported as before. While a record holds a file, the team's own off-switch for that rule and file cannot be told from the projection's, and the record holds the file either way. Once the record is removed, a team off-switch placed after the projection is listed under `unrecorded` as a `config-override`, and one placed before it never takes effect, since the projection turns the rule on after it, so ESLint and the check both flag the file. A team block placed after the projection that sets a recorded file's rule to `"warn"` or `"error"` leaves the projection out of effect, and the check says `not-included`, as before.
128
+ For an `eslint` check, the off-switch the projection writes for a record is Hone's own. The check does not list it as a `config-override`, so it never counts as a native exception the record holds. A `config-override` on a check and file no record holds is reported under `unrecorded`, and `hone record-debt` never records it: remove the override or narrow it. Once a record is removed, a team off-switch placed after the projection is listed under `unrecorded` as a `config-override`, and one placed before it never takes effect, since the projection turns the rule on after it, so ESLint and the check both flag the file. A team block placed after the projection that sets a recorded file's rule to `"warn"` or `"error"` leaves the projection out of effect, and the check says `not-included`.
143
129
 
144
130
  ## Adopting the ESLint mechanism
145
131
 
146
- With any clause selected for `eslint`, run `hone project`. It writes `disciplines.eslint.mjs` at the repository root: one block per piece enabling its selected rules at `"error"` on `**/*.{ts,tsx,mts,cts}`, then one block per set of clauses that files are excepted from, listing those files and turning the rules `"off"` for them, and one block per clause-wide carve-out turning its rules `"off"` everywhere. Commit it, and spread its default export last in the repository's flat config:
132
+ With any check listed for `eslint`, run `hone project`. It writes `hone.eslint.mjs` at the repository root: one block enabling the listed checks' rules at `"error"` on `**/*.{ts,tsx,mts,cts}`, then one block for each group of files whose records answer the same checks, turning the rules of those checks `"off"` there. Beside it, it writes `hone.eslint.d.mts`, which types the projection's default export as ESLint's `Linter.Config[]`. Commit both, and spread the default export of the projection last in the repository's flat config:
147
133
 
148
134
  ```js
149
- import disciplines from "./disciplines.eslint.mjs";
135
+ import hone from "./hone.eslint.mjs";
150
136
 
151
137
  export default [
152
138
  // the team's own blocks
153
- ...disciplines,
139
+ ...hone,
154
140
  ];
155
141
  ```
156
142
 
157
- This is the only supported way to adopt the rules. On every check, Hone reads the team's resolved configuration for each checked file and fails the run if the projection is missing, not in effect, or differs from what `hone project` would write now, with the line that says what to do:
143
+ This is the only supported way to adopt the checks. On every run, Hone reads the team's resolved configuration for each checked file and fails the run if the projection is missing, not in effect, or differs from what `hone project` would write now, with the line that says what to do:
158
144
 
159
145
  ```text
160
- mechanism-not-run eslint missing: disciplines.eslint.mjs is not written; run node /work/shop/node_modules/@hailstails/hone/core/check/tool-command.js project --repo /work/shop and commit every disciplines.eslint.mjs it writes
161
- mechanism-not-run eslint not-included: the eslint configuration leaves the projection out of effect for a file under check; spread the default export of disciplines.eslint.mjs, or of a package's own disciplines.eslint.mjs in that package, last in the configuration that file loads, after every other block (an import placed last without the spread applies nothing), or, where a tool such as sku generates the configuration, last in the configuration the tool takes
162
- eslint out-of-date: disciplines.eslint.mjs differs from what hone project writes now; run node /work/shop/node_modules/@hailstails/hone/core/check/tool-command.js project --repo /work/shop and commit every disciplines.eslint.mjs it writes
146
+ engine-not-run eslint missing: hone.eslint.mjs is not written; run node /work/shop/node_modules/@hailstails/hone/core/check/tool-command.js project --repo /work/shop and commit every file it writes
147
+ engine-not-run eslint not-included: the eslint configuration leaves the projection out of effect for a file under check; spread the default export of hone.eslint.mjs, or of a package's own hone.eslint.mjs in that package, last in the configuration that file loads, after every other block (an import placed last without the spread applies nothing), or, where a tool such as sku generates the configuration, last in the configuration the tool takes
148
+ eslint out-of-date: hone.eslint.mjs differs from what hone project writes now; run node /work/shop/node_modules/@hailstails/hone/core/check/tool-command.js project --repo /work/shop and commit every file it writes
163
149
  ```
164
150
 
165
- The command on these lines runs the entry file of the Hone that ran the check with `node`, with the repository the check measured, both as absolute paths with forward slashes, so it runs as printed from any directory; the lines above show an install at `/work/shop`. Re-run `hone project` after changing the selection or the exceptions.
151
+ The command on these lines runs the entry file of the Hone that ran the check with `node`, with the repository the check measured, both as absolute paths with forward slashes, so it runs as printed from any directory; the lines above show an install at `/work/shop`. Re-run `hone project` after changing the checks or the records.
166
152
 
167
153
  ### Package slices
168
154
 
169
- A package that runs ESLint from its own folder resolves the `files` of its config against that folder, so spreading the root projection there loses every carve-out written with a root-relative path. `hone project` therefore writes one projection per config root. The repository root gets `disciplines.eslint.mjs` as above. Under the nearest-to-file lookup, each package folder with a tracked `eslint.config.*` is a config root; under the repository-root lookup a package's own config is never loaded, so it gets no slice. Each folder `disciplines.json` lists under `eslintConfigRoots` is a config root under either lookup. Each package config root gets its own `disciplines.eslint.mjs` beside it: the same pieces, imported by a path relative to that folder, and only the records for files under it, with paths relative to it; clause-wide carve-outs go in every slice. Each package config spreads its own slice:
155
+ A package that runs ESLint from its own folder resolves the `files` of its config against that folder, so spreading the root projection there loses every record written with a root-relative path. `hone project` therefore writes one projection per config root, and beside each a `hone.eslint.d.mts` that types its default export as ESLint's `Linter.Config[]`, so a TypeScript config can import the projection and spread it. Commit both files in every folder. The repository root gets `hone.eslint.mjs` as above. Under the nearest-to-file lookup, each package folder with a tracked `eslint.config.*` is a config root; under the repository-root lookup a package's own config is never loaded, so it gets no slice. Each folder `hone.config.json` lists under `eslintConfigRoots` is a config root under either lookup. Each package config root gets its own `hone.eslint.mjs` beside it: the same checks, imported by a path relative to that folder, and only the records for files under it, with paths relative to it; every slice also carries the block that turns the listed checks' rules on. Each package config spreads its own slice:
170
156
 
171
157
  ```js
172
- import disciplines from "./disciplines.eslint.mjs";
158
+ import hone from "./hone.eslint.mjs";
173
159
 
174
- export default [{ files: ["**/*.{ts,tsx,mts,cts}"] }, ...disciplines];
160
+ export default [{ files: ["**/*.{ts,tsx,mts,cts}"] }, ...hone];
175
161
  ```
176
162
 
177
- A package with no `eslint.config.*` of its own is linted by the nearest config above it, so its records stay in that config's slice. A file is governed by the deepest config root that contains it. A folder holding its own `disciplines.json` gets no slice, and nor does anything under it: its ESLint configuration is not managed from this repository, and nested Hone configurations are not supported yet ([#72](https://github.com/HailsTails/hone/issues/72)). When that folder's own config leaves a carve-out recorded there out of effect, the `mechanism-not-run` line it explains adds the folder, which `--report-output failures-only` prints too. Governing the folder from this repository works today: remove its `disciplines.json`, keep its records here, and `hone project` writes its slice. With package slices also reported, the line points at them:
163
+ A package with no `eslint.config.*` of its own is linted by the nearest config above it, so its records stay in that config's slice. A file is governed by the deepest config root that contains it. A folder holding its own `hone.config.json` is a nested Hone configuration, which is not supported yet ([#72](https://github.com/HailsTails/hone/issues/72)): when the ESLint engine would check a file under it, `check` and `project` stop before anything is checked or written, while a run that lists only walker checks does not stop, as `load failure: not-ready-yet eslint-config-roots: this release does not run a repository that holds other version 2 repositories yet; folders holding hone.config.json: <folders>; move them out of this repository, and run each on its own with --repo`. A folder holding one and no file the run would check gets no slice, and nor does anything under it. Either fix works today: run the folder on its own with `--repo`, as the line says, or govern it from this repository by removing its `hone.config.json` and keeping its records here, after which `hone project` writes its slice.
178
164
 
179
- ```text
180
- mechanism-not-run eslint not-included: the eslint configuration leaves the projection out of effect for a file under check; spread the default export of disciplines.eslint.mjs, or of a package's own disciplines.eslint.mjs in that package, last in the configuration that file loads, after every other block (an import placed last without the spread applies nothing), or, where a tool such as sku generates the configuration, last in the configuration the tool takes; the eslint lines under projectionProblems name the package slices involved; fixtures/a hold their own disciplines.json, and nested Hone configurations are not supported yet (https://github.com/HailsTails/hone/issues/72): to govern such a folder from this repository, remove its disciplines.json and keep its records here, then run node /work/shop/node_modules/@hailstails/hone/core/check/tool-command.js project --repo /work/shop, which writes its slice
181
- ```
182
-
183
- A config root keeps its slice even where a config above it ignores its folder: a lint run from that folder loads its own config and never reads the ignores above it, so `hone project` writes the same slices from the same inputs every time. `not-applied` for such a package judges each recorded file by its nearest config, the one that lint loads. A repository with only a root config gets exactly the projection it had before.
165
+ A config root keeps its slice even where a config above it ignores its folder: a lint run from that folder loads its own config and never reads the ignores above it, so `hone project` writes the same slices from the same inputs every time. A repository with only a root config gets exactly the projection it had before.
184
166
 
185
- The check reports each package slice under the mechanism, naming the slice: out of date, missing, or, when ESLint resolves each file from its nearest config and a package's carve-outs are not in effect, for example because its config spreads the root projection or nothing instead of its slice, not applied, beside `mechanism-not-run eslint not-included`. A folder listed under `eslintConfigRoots` with no `eslint.config.*` on disk is unconfigured: nothing there can load its slice, so Hone would otherwise say nothing about that package; generate its config before the check runs, as a tool such as sku does on any of its commands:
167
+ The check reports each package slice under the engine, naming the slice, whether it is the projection or its `hone.eslint.d.mts` that is out of date or missing. A package whose config spreads the root projection or nothing instead of its slice has its records out of effect, so the check reports `engine-not-run eslint not-included` rather than trusting a finding it could not have measured. A package that spreads the root projection is reported only once a record answers a file in it, since until then both projections give that package the same rules; one that spreads nothing is reported at once. A folder listed under `eslintConfigRoots` with no `eslint.config.*` on disk is unconfigured: nothing there can load its slice, so Hone would otherwise say nothing about that package; generate its config before the check runs, as a tool such as sku does on any of its commands:
186
168
 
187
169
  ```text
188
- eslint out-of-date packages/a/disciplines.eslint.mjs: that slice differs from what hone project writes now; run node /work/shop/node_modules/@hailstails/hone/core/check/tool-command.js project --repo /work/shop and commit every disciplines.eslint.mjs it writes
189
- eslint missing packages/a/disciplines.eslint.mjs: that slice is not written; run node /work/shop/node_modules/@hailstails/hone/core/check/tool-command.js project --repo /work/shop and commit every disciplines.eslint.mjs it writes
190
- eslint not-applied packages/a/disciplines.eslint.mjs: the eslint configuration for packages/a leaves records of that slice out of effect; spread the default export of packages/a/disciplines.eslint.mjs last in that package's configuration, in place of any other projection it spreads, or, where a tool such as sku generates the configuration, last in the configuration the tool takes
191
- eslint unconfigured packages/a/disciplines.eslint.mjs: packages/a has no eslint configuration file on disk, so nothing loads that slice; run the tool that generates it (for sku, sku configure) before the check
170
+ eslint out-of-date packages/a/hone.eslint.mjs: that slice differs from what hone project writes now; run node /work/shop/node_modules/@hailstails/hone/core/check/tool-command.js project --repo /work/shop and commit every file it writes
171
+ eslint missing packages/a/hone.eslint.mjs: that slice is not written; run node /work/shop/node_modules/@hailstails/hone/core/check/tool-command.js project --repo /work/shop and commit every file it writes
172
+ eslint unconfigured packages/a/hone.eslint.mjs: packages/a has no eslint configuration file on disk, so nothing loads that slice; run the tool that generates it (for sku, sku configure) before the check
192
173
  ```
193
174
 
194
- A slice is not-applied only when a recorded file under check in that package is not excepted; a package with no file exceptions gets the same rules from either projection, so the check is silent there until the package has one.
195
-
196
- `hone project` removes a tracked `disciplines.eslint.mjs` whose folder is no longer a config root only when its bytes are exactly what Hone would write for that folder now, so a file Hone did not write is never deleted; any other such file is reported `left-in-place`. Under the repository-root lookup no package folder is a config root, so `hone project` removes each package slice it wrote; a package config that still imports its slice then fails to load when someone lints from that package. List such a package under `eslintConfigRoots` to keep its slice, or stop importing it.
197
- A file carve-out stays in the projection after it is forfeited, so the team's own ESLint run keeps ignoring that file; Hone's check is what fails it, as `forfeited`.
175
+ A debt record stays in the projection after it is forfeited, so the team's own ESLint run keeps ignoring that file; Hone's check is what fails it, as `forfeited`.
198
176
 
199
- Hone's own ESLint run uses only the runner's configuration, with ignores, suppressions and inline configuration off, so nothing in the team's setup can change a finding. Every way the team's setup can weaken a selected rule (a native channel) is reported instead, and only an override that matches an exception record is accepted. The guide has the table.
177
+ Hone's own ESLint run uses only the runner's configuration, with ignores, suppressions and inline configuration off, so nothing in the team's setup can change a finding. Every way the team's setup can weaken a selected rule (a native channel) is reported instead, and only an override that matches a record is accepted.
178
+ ## hone.config.json
200
179
 
201
- ## disciplines.json
202
-
203
- At the repository root. It selects clauses and the mechanism that checks each one.
180
+ At the repository root. It lists the checks the repository runs and the engine that runs each one. The example lists the checks `authored-class-or-this#class-keyword` and `authored-class-or-this#static-members-only` on ESLint and a team's check on the walker.
204
181
 
205
182
  ```json
206
183
  {
207
- "version": 1,
184
+ "version": 2,
208
185
  "ruleSets": { "team": "tools/disciplines" },
209
- "clauses": {
210
- "CD-14#class-syntax": "eslint",
211
- "CD-14#static-only-class": "eslint",
212
- "team/TD-1#some-clause": "audit"
186
+ "checks": {
187
+ "authored-class-or-this#class-keyword": "eslint",
188
+ "authored-class-or-this#static-members-only": "eslint",
189
+ "team/some-symptom#some-check": "walker"
213
190
  },
214
191
  "exclude": ["vendor", "generated"]
215
192
  }
216
193
  ```
217
194
 
218
- - `ruleSets` names the repository's own rule sets, each a directory relative to the repository root. The name `hone` is reserved for the rule set shipped with the tool; `hone/CD-15#loops` and `CD-15#loops` are the same address. A rule-set name may not start with `hone-`, and no declared name may be another declared name plus `-<suffix>`.
219
- - `clauses` maps a clause address to a mechanism id, to `"not-run"` or to `"not-adopted"`. An address is `[<ruleSet>/]<DisciplineId>#<clauseId>`; no prefix means the `hone` rule set. The mechanism must be one the clause lists.
220
- - Listing a clause adopts its discipline. Mechanical clauses of an adopted discipline that are not listed are reported as uncovered, and fail the run.
221
- - `"not-run"` states that the clause is adopted and binds the repository, but its mechanism is not run: the check is not a true measure of the rule's intent here, or cannot work here. The rule is enforced by review. `"not-adopted"` states that the clause does not apply to the repository. Either way the clause is never run and never projected, and its mechanism is not loaded unless another clause uses it. The report lists it under `notRun`, as `<clause> adopted, mechanism not run: enforced by review`, or under `notAdopted`; both are informational, and the run is still a whole assessment. An exception record on it is invalid as `clause-not-run` or `clause-not-adopted`, and `clauseSettings` for it make `disciplines.json` `file-malformed`: remove them. The clause must still exist and be mechanical, in any rule set; a judgement clause is never listed in either state and fails the run as `judgement-clause-listed`. No mechanism may be named `not-run` or `not-adopted`.
222
- - A judgement clause cannot be selected; it is enforced by review.
195
+ - `ruleSets` names the repository's own rule sets, each a folder relative to the repository root, or `"."` for the root. The name `hone` is reserved for the rule set shipped with the tool; `hone/authored-class-or-this#class-keyword` and `authored-class-or-this#class-keyword` are the same address. A rule-set name may not start with `hone-`, and no declared name may be another declared name plus `-<suffix>`.
196
+ - `checks` maps a check address to an engine id, to `"not-run"` or to `"not-adopted"`. An address is `[<ruleSet>/]<symptom>#<check>`; no prefix means the `hone` rule set. The engine must be one the check lists.
197
+ - Listing a check adopts it, and only a listed check runs. A check of a symptom that a listed check sees, listed nowhere, is offered under `available`; it never fails the run, so a new check in a later Hone never turns a run red by itself.
198
+ - `"not-run"` states that the check is adopted and binds the repository, but its engine is not run: the check is not a true measure of the rule's intent here, or cannot work here. The rule is enforced by review. `"not-adopted"` states that the check does not apply to the repository. Either way the check is never run and never projected, and its engine is not loaded unless another check uses it. The report lists it under `not-run`, as `<check> adopted, engine not run: enforced by review`, or under `not-adopted`; both are informational, and the run is still a whole assessment. No engine may be named `not-run` or `not-adopted`.
223
199
  - `eslintConfigLookup`, optional, is `"nearest-to-file"` or `"repository-root"` and says which `eslint.config.*` the team's own ESLint run applies to a file; see [Runtime](#runtime). Leave it out to let Hone detect it.
224
200
  - `eslintConfigRoots`, optional, lists repository folders that get their own projection slice under either lookup although they track no `eslint.config.*`, such as a package whose config a tool generates and ignores; see [Package slices](#package-slices). Globs are refused. Each entry must be a folder git tracks files under outside every `exclude` path, spelled exactly as git spells it; any other entry stops the run before anything is checked or written, as `load failure: config-root-untracked <folder>:` with what to fix.
225
- - `fileExceptionWhyChains`, optional, is `"required"` (the default) or `"optional"`. It governs authorised locations only: `"optional"` lets an `authorised-location` entry give only its `reason`, which will be refused in the next major release; see [discipline-exceptions.json](#discipline-exceptionsjson). A `file-carve-out` needs no `whyChain` under either value.
226
- - `reportOutput`, optional, is `"full"` (the default), `"failures-only"`, `"counts"` or `"verdict-only"`: the repository's default for how much of the report the check prints. `--report-output` overrides it for one run; see [Commands](#commands).
227
- - `checkEditions`, optional, is `"pinned"` (the default) or `"latest"`. A clause whose check has been tightened has more than one edition, listed on its CHECKS.md. `"pinned"` runs each clause's default edition, which changes only in a major release; `"latest"` runs the newest edition the installed Hone has for every selected clause, so a minor release can add findings. `"edition"` in a clause's `clauseSettings` holds that one clause to the edition it names over either. The report lists the edition each such clause ran under `editions`.
228
- - `clauseSettings`, optional, maps a selected clause address to an object of that clause's settings, for a clause whose CHECKS.md lists settings. Each key must be one the clause's piece declares, and its value must be the same JSON kind as the declared default and, where the piece lists choices, one of them; the value replaces the default. Anything else makes `disciplines.json` malformed, naming the clause, the key and what is accepted: settings for a clause the file does not select or names twice, for a clause that takes none, under an undeclared key, or of the wrong kind or choice.
229
- - `assessment`, optional, says which run assesses each concern. Its one key, `forfeiture`, is `"this-run"` (the default) or `"elsewhere"`; `--forfeiture` overrides it for one run; see [Commands](#commands). `waivedClauses`, which earlier releases accepted, is removed: it makes `disciplines.json` `file-malformed`, naming the clause states that replace it; see [MIGRATING.md](MIGRATING.md#12-moving-off-waivedclauses). Any other key makes it `file-malformed`, naming the key as not available in this version.
230
- - `exclude`, optional, lists repository folders or exact files that no mechanism checks. A folder entry covers everything under it. Globs are refused: an entry containing `*` makes `disciplines.json` malformed. The report lists the active entries under `excluded`. Exclude Hone's own install when it is vendored inside the repository.
201
+ - `forfeiture`, optional, is `"this-run"` (the default) or `"elsewhere"`, and says which run assesses whether debt is forfeited; `--forfeiture` overrides it for one run; see [Commands](#commands).
202
+ - `reportOutput`, optional, is `"full"` (the default), `"actionable"`, `"counts"` or `"verdict-only"`: the repository's default for how much of the report the check prints. `--report-output` overrides it for one run; see [Commands](#commands).
203
+ - `checkEditions`, optional, is `"pinned"` (the default) or `"latest"`. A check that has been tightened has more than one edition, listed on its check page. `"pinned"` runs each check's default edition, which changes only in a major release; `"latest"` runs the newest edition the installed Hone has for every listed check, so a minor release can add findings. `"edition"` in a check's `checkSettings` holds that one check to the edition it names over either. The report lists the edition each such check ran under `editions`.
204
+ - `checkSettings`, optional, maps a listed check address to an object of that check's settings, for a check whose page lists settings. Each key must be one the check's piece declares, and its value must be the same JSON kind as the declared default and, where the piece lists choices, one of them; the value replaces the default. Anything else makes `hone.config.json` malformed, naming the check, the key and what is accepted; `confinedPackages` is refused there, as the setting is now `confinedOutsideDependencies`.
205
+ - `exclude`, optional, lists repository folders or exact files that no engine checks. A folder entry covers everything under it. Globs are refused: an entry containing `*` makes `hone.config.json` malformed. The report lists the active entries under `excluded`. Exclude Hone's own install when it is vendored inside the repository.
206
+ - `generated` and `layers`, optional, are declared for checks that will read them; no check reads either yet, and the report says so under `settings-notes`.
207
+
208
+ The keys version 1's `disciplines.json` used under other names are refused, each naming what replaces it: `clauses` is `checks`, `clauseSettings` is `checkSettings`, `assessment` is `forfeiture`, and `fileExceptionWhyChains` is gone, since every record shows its why-chain. [MIGRATING.md](MIGRATING.md#20-moving-from-version-1-to-version-2) section 20 lists what moved.
231
209
 
232
- ## discipline-exceptions.json
210
+ ## hone-records
233
211
 
234
- At the repository root, or split by rule into the `discipline-exceptions` folder as [the split layout](#the-split-layout) describes; neither means no exceptions. Each entry names a selected clause, and applies to the mechanism that clause is selected for.
212
+ A folder at the repository root; without it, no record answers any finding. It holds the records that answer findings, one file for each kind and symptom or recipe, each a document `{ "version": 2, "records": [...] }`:
213
+
214
+ ```text
215
+ hone-records/
216
+ debt/
217
+ claimed-type.json
218
+ authorised-locations/
219
+ claimed-type.json
220
+ deviations/
221
+ adapter-per-outside-party.json
222
+ boundary-records.json
223
+ dependency-records.json
224
+ ```
225
+
226
+ A file in the wrong folder or under a name that is not a catalogue name is still read, and its records are refused as `misplaced` or `not-a-records-name`, naming where each belongs. Each record answers the findings it reaches, and names what it reaches by the symptom's name, or by `<symptom>#<check>` to reach one check of it.
235
227
 
236
228
  ```json
237
229
  {
238
- "version": 1,
239
- "exceptions": [
240
- { "kind": "authorised-location", "clause": "CD-14#class-syntax", "file": "src/adapter.ts", "reason": "..." },
241
- { "kind": "file-carve-out", "clause": "CD-14#class-syntax", "file": "src/legacy.ts", "reason": "..." },
242
- { "kind": "clause-wide-carve-out", "clause": "CD-14#class-syntax", "reason": "...", "whyChain": { } }
230
+ "version": 2,
231
+ "records": [
232
+ { "answers": "claimed-type#cast-expressions", "file": "src/legacy.ts", "note": "..." }
243
233
  ]
244
234
  }
245
235
  ```
246
236
 
247
- - An `authorised-location` says the clause does not apply to that file.
248
- - A `file-carve-out` is debt in one file. It is forfeited once the file is touched.
249
- - A `clause-wide-carve-out` exempts the clause's findings everywhere. It does not hold an inline exception.
250
- - An inline exception, an `eslint-disable` comment naming a selected rule or no rule, or a `@ts-expect-error`, `@ts-ignore` or `@ts-nocheck` directive under `CD-2#cast-expressions`, is held only by an `authorised-location` or `file-carve-out` on its clause and file. A comment naming no rule escapes every selected ESLint clause and needs one per clause. Without a record it is listed under `unrecorded` and fails the run. A lint-script option that weakens the whole run, such as `--rule`, `--suppress-all` or `-c` naming another config, cannot be recorded.
251
- - A `file-carve-out` is debt: it needs only its `kind`, `clause` and `file`, never a `whyChain`, under either `fileExceptionWhyChains` value. Its `reason` is optional, a note to future developers on what the debt signals, and nothing reads it. Forfeiture is what holds it: it is forfeited once its file is touched. Every other entry needs a `whyChain` (an `authorised-location` may leave it out while `fileExceptionWhyChains` is `"optional"`; see below) that follows the [why-chain contract](docs/why-chain-contract.md): exactly five `{ "why", "because", "evidence" }` steps chained cause to cause, then `rootCause`, `rootCheck`, `readback` and `owner`. The contract lists what Hone refuses and what review still judges:
252
-
253
- ```json
254
- "whyChain": {
255
- "whys": [
256
- { "why": "...", "because": "...", "evidence": "..." },
257
- { "why": "...", "because": "...", "evidence": "..." },
258
- { "why": "...", "because": "...", "evidence": "..." },
259
- { "why": "...", "because": "...", "evidence": "..." },
260
- { "why": "...", "because": "...", "evidence": "..." }
261
- ],
262
- "rootCause": "...",
263
- "rootCheck": "...",
264
- "readback": "...",
265
- "owner": "..."
266
- }
267
- ```
268
- - A chain with neither `rootCheck` nor `readback` was written to the earlier contract. It is accepted only while the `--base-revision` holds its entry unchanged; a new or edited one is refused as `why-chain-refused`, and a run with such a chain and no `--base-revision` is `legacy-chain-unmeasured`.
269
- - An entry carried over from an earlier system may give `provenance` instead of a `whyChain`: `{ "kind": "inherited-debt", "source", "decision" }` on a file carve-out, `{ "kind": "existing-authorisation", "source" }` on an authorised location, where `decision` is optional. `source` names the old record entry as `<directory>/cd-<id>.json#<index>`: `.constitution-carve-outs` for inherited debt, `.constitution-authorised-locations` for an existing authorisation, the old file for the record's discipline, and the entry's position in its array. Such an entry is imported, and is accepted only while the `--base-revision` already holds it unchanged, or, when the base holds no record for that kind, clause and file, while the `source` entry at that revision lists the file in its `files`. A new or edited entry without a `whyChain` is refused as `import-unverified`, and a run with imported entries and no `--base-revision` is `import-unmeasured`. The report names each imported entry it exempts by.
270
- - A `file-carve-out` without a `whyChain` or `provenance` is not checked against `--base-revision`, but a run with any file carve-out still needs `--base-revision`: without it the report lists `forfeiture-unmeasured` and the run fails, and with it a file carve-out is forfeited once its file is touched. A `whyChain` or `provenance` a file carve-out gives anyway is still judged as above.
271
- - With `"fileExceptionWhyChains": "optional"` in `disciplines.json`, an `authorised-location` entry may give only its `reason`, which then carries why the exception exists and must not be blank. This is deprecated: a reason-only `authorised-location` will be refused in the next major release, so give it a `whyChain`. A `whyChain` or `provenance` the entry gives anyway is still judged as above. A `clause-wide-carve-out` still needs its `whyChain`.
272
- - A clause whose `discipline.json` declares `"exceptions": "refused"` cannot be exempted. No shipped discipline declares it, so every shipped clause can be.
273
- - Files are exact repository paths, never globs.
274
- - An entry that exempts nothing is stale, a file both authorised and carved for one clause is doubly held, and an entry that cannot be parsed is invalid. Each fails the run.
275
-
276
- ### The split layout
237
+ - **Debt** is in `hone-records/debt/<symptom>.json`: `answers`, `file` and an optional `note`, a note to future developers on what the debt signals, which nothing reads. It says a finding in one file is owed. It needs no case and no why-chain; forfeiture is what holds it: it is forfeited once its file is touched.
238
+ - **An authorised location** is in `hone-records/authorised-locations/<symptom>.json`: `answers`, `file`, `case` and `owes`, naming the case the file is and the principle it owes, and a `whyChain`. It says the symptom is correct in that file. [`hone authorise`](#commands) writes one from the arguments it is given.
239
+ - **A deviation** is in `hone-records/deviations/<recipe>.json`: `recipe`, `file`, `recipeReason`, `reasonFails`, `evidence` and `ruleHolds`. It says why a file does not follow a recipe the catalogue gives.
240
+ - **A boundary record** is in `hone-records/boundary-records.json`: `module`, `outsideParty` (a runtime facility such as `runtime:clock`, or an outside module's specifier), the `ports` the module declares and an optional `conformist`. It says the module is where an outside party is met.
241
+ - **A dependency record** is in `hone-records/dependency-records.json`: `dependency`, `nativeWay`, `whyNotEnough` and an optional `peerRisk`. It says why a package is used where the platform's own way exists.
277
242
 
278
- A repository can keep the same records in a `discipline-exceptions` folder instead of `discipline-exceptions.json`: a folder for each record kind, and in it one file for each discipline. The name of a changed file then says which rule and which kind a change touches, and a code owner can own one rule's exceptions.
243
+ An `authorised-location` follows the [why-chain contract](docs/why-chain-contract.md): exactly five `{ "why", "because", "evidence" }` steps chained cause to cause, then `rootCause`, `rootEvidence`, `readback` and `owner`. The contract lists what Hone refuses and what review still judges:
279
244
 
280
- ```text
281
- discipline-exceptions/
282
- authorised-locations/
283
- cd-19.json
284
- file-carve-outs/
285
- cd-19.json
286
- cd-27.json
287
- clause-wide-carve-outs/
288
- team/
289
- tm-1.json
245
+ ```json
246
+ "whyChain": {
247
+ "whys": [
248
+ { "why": "...", "because": "...", "evidence": "..." },
249
+ { "why": "...", "because": "...", "evidence": "..." },
250
+ { "why": "...", "because": "...", "evidence": "..." },
251
+ { "why": "...", "because": "...", "evidence": "..." },
252
+ { "why": "...", "because": "...", "evidence": "..." }
253
+ ],
254
+ "rootCause": "...",
255
+ "rootEvidence": "...",
256
+ "readback": "...",
257
+ "owner": "..."
258
+ }
290
259
  ```
291
260
 
292
- - Each file has the format above, `{ "version": 1, "exceptions": [...] }`, and holds only records of its folder's kind on its discipline. The file is named for the discipline ID in lower case, such as `cd-7a.json`, inside a folder named for the rule set when the clause is in a team's rule set rather than Hone's own. Each record keeps its `kind` and `clause`, so a record reads the same in either layout.
293
- - A record in another discipline's or kind's file, or any other file or folder under `discipline-exceptions`, makes the load fail as `file-malformed`, naming the file; for a misplaced record it names the file it belongs in.
294
- - Hone reads whichever layout is present. `discipline-exceptions.json` stays the default, and nothing changes for a repository that keeps it. A repository holding both is refused with `records-in-both-layouts` rather than merged.
295
- - An `invalidRecords` line names the file that holds the record and its index there. `hone record-debt` adds each record to its discipline's `file-carve-outs` file, writing the file when there is none yet.
296
- - The `--base-revision` may hold either layout, so the change that moves a repository to the split layout is checked against `discipline-exceptions.json` at its base: imported and legacy-chain records are still verified.
297
- - Records are read in path order: the kind folders in the order of their names, then the files in the order of their paths. A section that lists records, such as `stale`, lists them in that order, not in the order `discipline-exceptions.json` had.
298
-
299
- `hone split-records --repo .` moves a repository to the split layout. It writes each file, with its records in the order they had in `discipline-exceptions.json`, then removes that file, and prints `<path> written` for each file and `discipline-exceptions.json removed`. Each file is written as `JSON.stringify` writes it with two-space indentation, with each record's fields in the order `kind`, `clause`, `file`, `reason`, `whyChain`, `provenance`. A record already in that form, as `hone record-debt` writes it, keeps its text byte for byte. Any other record keeps its values but not its text: one with its fields in another order is rewritten in that order, and a `\u` escape of a character that needs none is written as the character. It writes nothing and changes nothing for a repository already split or without records. It refuses with a load failure, writing nothing, a repository holding both layouts, a record whose clause names no discipline, and a `discipline-exceptions.json` holding keys other than `version` and `exceptions`, such as `$schema`, since no split file keeps them. [MIGRATING.md](MIGRATING.md#16-moving-to-the-split-layout) section 16 is the procedure.
261
+ - A record that `hone upgrade` moved from version 1 keeps its old entry word for word under a `carried` key, in place of the keys version 1 did not hold. The check lists it under `carried`, with what it lacks, and judges it against `--base-revision`: it is `established` when the base held it unchanged and `unjudged` when the run could not compare it; a carried record changed since the base is refused as `carried-changed-since-base`. [MIGRATING.md](MIGRATING.md#20-moving-from-version-1-to-version-2) section 20 describes them.
262
+ - A record the catalogue does not recognise, or whose form is wrong, is refused with its records file and index, and the run fails. A record that names a case or an `owes` the catalogue does not list is kept, with a note under `record-notes`.
263
+ - A record that answers no finding and holds no native exception is stale where the checks it reaches were measured at its place, or its place is gone or excluded; a record whose checks were not measured there is unjudged, not stale, and a dependency record, which no check reads yet, is never stale. Debt on a file this change touched is forfeited, and a record that duplicates another is refused. Each fails the run. Debt that another record answers in place of is paid, which does not.
264
+ - An inline exception, an `eslint-disable` comment naming a selected rule or no rule, or a `@ts-expect-error`, `@ts-ignore` or `@ts-nocheck` directive under `claimed-type#unlisted-cast-site`, is held only by a record on its check and file. A comment naming no rule escapes every selected ESLint check and needs one per check. Without a record it is listed under `unrecorded` and fails the run. A lint-script option that weakens the whole run, such as `--rule`, `--suppress-all` or `-c` naming another config, cannot be recorded.
265
+ - Files are exact repository paths, never globs.
300
266
 
301
267
  ## Installing
302
268
 
303
- Hone installs as one npm package, `@hailstails/hone`, installed from npm at an exact version, `@hailstails/hone@<version>` with `--save-exact`, downloaded as the tarball `hailstails-hone-<version>.tgz` attached to a GitHub release, or built by `pnpm run pack-package` into `artefacts/hailstails-hone-<version>.tgz`, the file name `npm pack` gives the scoped package, and added to the repository root as a development dependency; [ADOPTING.md](ADOPTING.md#2-install-the-hone-package) step 2 has the steps. The package is plain JavaScript holding only Hone's own code. It declares `zod`, `jsonc-parser` and `@eslint/plugin-kit` as `dependencies`, each as a caret range starting at the version `pnpm-lock.yaml` locks, so the package manager installs them from the registry, and the repository's own audit tools see them as it does any other dependency. Which release inside each range is installed is decided by the repository's own lockfile and overrides, so a patched release can be taken without waiting for a new Hone. It declares the toolchain as `peerDependencies`, `typescript` required and the ESLint packages optional, and exposes one command, `hone`, whose subcommands `hone check` and `hone project` are described under Commands. It ships the rule data and pages, both mechanisms, the review methods and the why-chain contract, and no TypeScript source, only the declaration files of the public type entries below.
269
+ Hone installs as one npm package, `@hailstails/hone`, installed from npm at an exact version, `@hailstails/hone@<version>` with `--save-exact`, downloaded as the tarball `hailstails-hone-<version>.tgz` attached to a GitHub release, or built by `pnpm run pack-package` into `artefacts/hailstails-hone-<version>.tgz`, the file name `npm pack` gives the scoped package, and added to the repository root as a development dependency; [ADOPTING.md](ADOPTING.md#2-install-the-hone-package) step 2 has the steps. The package is plain JavaScript holding only Hone's own code. It declares `zod`, `jsonc-parser` and `@eslint/plugin-kit` as `dependencies`, each as a caret range starting at the version `pnpm-lock.yaml` locks, so the package manager installs them from the registry, and the repository's own audit tools see them as it does any other dependency. Which release inside each range is installed is decided by the repository's own lockfile and overrides, so a patched release can be taken without waiting for a new Hone. It declares the toolchain as `peerDependencies`, `typescript` required and the ESLint packages optional, and exposes one command, `hone`, whose six subcommands are described under [Commands](#commands). It ships the rule data and pages, both mechanisms, the review methods and the why-chain contract, and no TypeScript source, only the declaration files of the public type entries below.
304
270
 
305
- With the ESLint mechanism selected, a packaged install's projection imports each piece by package name, `@hailstails/hone/mechanisms/eslint/<DisciplineId>/...`, so the repository's ESLint must resolve the package from the repository root. Hone compares the committed projection `disciplines.eslint.mjs` byte for byte with what `hone project` would write now.
271
+ With the ESLint mechanism selected, a packaged install's projection imports one plugin, `@hailstails/hone/eslint-plugin`, registered under the namespace `hone`, so the repository's ESLint must resolve the package from the repository root. Hone compares the committed projection `hone.eslint.mjs` and its declaration `hone.eslint.d.mts` byte for byte with what `hone project` would write now.
306
272
 
307
273
  ## Public type entries
308
274
 
@@ -322,36 +288,36 @@ Each resolves with `moduleResolution` `"nodenext"` or `"bundler"`. `install-proo
322
288
  - The package: Node `^22.18.0 || >=24` (its `engines.node`). It is plain JavaScript, so Node never strips types from it, and from 22.18.0 Node strips types from a rule set's `.ts` piece modules, within the limits [ADOPTING.md](ADOPTING.md#1-check-the-prerequisites) lists.
323
289
  - git 2.24 or later. Older git rejects `--end-of-options`, so the changed-file query fails and forfeiture is reported unmeasured.
324
290
  - Hone's own packages, `zod`, `jsonc-parser` and `@eslint/plugin-kit`, declared in `dependencies` as caret ranges whose floor is the version `pnpm-lock.yaml` locks, which is the version Hone is tested on. A caret range keeps to one major version, and for a `0.x` package to one minor. The repository's package manager installs a release inside each range, and the packages it depends on, where Hone resolves it; the repository's lockfile, and any override it sets, decides which release. They are implementation details: nothing of theirs crosses into the repository's code or configuration. A repository that uses `zod` itself may share one copy with Hone when its version is inside Hone's range, as package managers do for compatible versions, and otherwise keeps its own copy beside Hone's.
325
- - The repository's own toolchain, declared as `peerDependencies`: `typescript` `>=4.8.4 <7.0.0`, a required peer because every audit clause needs it, and for the ESLint mechanism the optional peers `eslint` `^9.28.0 || ^10.0.0`, `@typescript-eslint/parser` `^8.56.0` and `@typescript-eslint/eslint-plugin` `^8.56.0`. npm 7 and later install a missing required peer on their own, so declare `typescript` at the root at the version the repository uses. Each floor is the oldest release Hone is tested on: TypeScript 4.8 is the oldest whose syntax API the audit uses (`getModifiers`), ESLint 9.28.0 the first 9.x with every bulk-suppressions option a carve-out kept in `eslint-suppressions.json` relies on (`--pass-on-unpruned-suppressions` came last), and typescript-eslint 8.56.0 the first whose peer range accepts ESLint 10. TypeScript stops below 7 because TypeScript 7's compiler API is a different one. Yarn Plug'n'Play is not supported.
291
+ - The repository's own toolchain, declared as `peerDependencies`: `typescript` `>=4.8.4 <7.0.0`, a required peer because every audit clause needs it, and for the ESLint mechanism the optional peers `eslint` `^9.39.5 || ^10.15.0`, `@typescript-eslint/parser` `^8.73.0` and `@typescript-eslint/eslint-plugin` `^8.73.0`. npm 7 and later install a missing required peer on their own, so declare `typescript` at the root at the version the repository uses. Hone supports the latest release of each supported major, ESLint 9.39.5 and 10.15.0 and typescript-eslint 8.73.0, and raises those floors deliberately as new releases land. TypeScript 4.8 is the oldest whose syntax API the audit uses (`getModifiers`). TypeScript stops below 7 because TypeScript 7's compiler API is a different one. Yarn Plug'n'Play is not supported.
326
292
 
327
- Hone loads the toolchain by Node's own resolution, upward from the install directory, which is the same resolution the pieces' plugin modules get when the team's ESLint loads the projection. Hone's query of the team's configuration, its governance run and the pieces therefore all use one copy, the repository's. Keep the toolchain resolvable from the repository root: declare it in the root `package.json` (in a pnpm workspace, `pnpm add -Dw`). A package may install a different ESLint for its own lint script; Hone's verdict still comes from the root's, its governance behaviour is the same on either supported line, and the pieces that wrap native rules wrap the root's copies there too. Hone's tests run the governance path and every piece's shared cases on four ESLint lines, 9.28.0 and 10.0.0 with typescript-eslint 8.56.0 and 9.39.5 and 10.11.0 with 8.71.2, and the audit pieces' shared cases on TypeScript 4.8.4 and 6.0.3; the in-process consumer fixtures run on ESLint 10.11.0, and `install-proof` runs real consumers on each floor.
293
+ Hone loads the toolchain by Node's own resolution, upward from the install directory, which is the same resolution the pieces' plugin modules get when the team's ESLint loads the projection. Hone's query of the team's configuration, its governance run and the pieces therefore all use one copy, the repository's. Keep the toolchain resolvable from the repository root: declare it in the root `package.json` (in a pnpm workspace, `pnpm add -Dw`). A package may install a different ESLint for its own lint script; Hone's verdict still comes from the root's, its governance behaviour is the same on either supported line, and the pieces that wrap native rules wrap the root's copies there too. Hone's tests run the governance path and every piece's shared cases on two ESLint lines, 9.39.5 and 10.15.0, with typescript-eslint 8.73.0, and the audit pieces' shared cases on TypeScript 4.8.4 and 6.0.3; the in-process consumer fixtures run on ESLint 10.15.0, and `install-proof` runs real consumers on each supported ESLint major.
328
294
 
329
- A peer that is missing, cannot load, or is outside its range stops the mechanism before any piece loads, with one line such as `load failure: runner-failed eslint toolchain-unavailable eslint found not installed, supported ^9.28.0 || ^10.0.0: add a supported version to the devDependencies of the repository root`. The line names every peer of that mechanism that is unavailable, separated by `; `, and then asks for a supported version of each, so one install fixes them all. A `typescript` that is not installed at all is reported the same way, with the line saying that `typescript` is a required peer of `@hailstails/hone` and the install is incomplete, since a supported install always has it; one that is installed but out of range or unloadable gets the plain line. A peer that resolves from inside the installed package, such as an `eslint` left in `node_modules/@hailstails/hone/node_modules`, stops it as `toolchain-shadowed`, naming where it resolved and the folder to delete before reinstalling core. A source checkout of Hone is its own development install, so its development toolchain in its own `node_modules` is not a shadow.
295
+ A peer that is missing, cannot load, or is outside its range stops the engine before any piece loads, with one line such as `load failure: engine-failed eslint toolchain-unavailable eslint found not installed, supported ^9.39.5 || ^10.15.0: add a supported version to the devDependencies of the repository root`. The line names every peer of that mechanism that is unavailable, separated by `; `, and then asks for a supported version of each, so one install fixes them all. A `typescript` that is not installed at all is reported the same way, with the line saying that `typescript` is a required peer of `@hailstails/hone` and the install is incomplete, since a supported install always has it; one that is installed but out of range or unloadable gets the plain line. A peer that resolves from inside the installed package, such as an `eslint` left in `node_modules/@hailstails/hone/node_modules`, stops it as `toolchain-shadowed`, naming where it resolved and the folder to delete before reinstalling core. A source checkout of Hone is its own development install, so its development toolchain in its own `node_modules` is not a shadow.
330
296
 
331
- A repository can hold one `eslint.config.*` at its root or one per package. Hone resolves the team's configuration the way the team's own ESLint run does. ESLint 10, and ESLint 9 started with `--flag v10_config_lookup_from_file` (or `unstable_config_lookup_from_file`), use the `eslint.config.*` nearest each checked file. Plain ESLint 9 uses only the one in the directory it runs from, so for a repository whose `eslint` resolves to 9.x at `node_modules/eslint` and whose lint scripts carry no such flag, Hone reads the root `eslint.config.*` for every file, and fails the run as `team-config-unloadable` if there is none. When Hone cannot read an installed `eslint` at the repository root it assumes the nearest-to-file lookup. Each config that applies to a file must spread its projection: the root config the root projection, each package config its own slice; see [Package slices](#package-slices). A config that fails to load stops the run as `team-config-unloadable`, naming the config, the checked file it applies to and ESLint's message, then the next step: fix that config. Only if its folder holds nothing Hone should check, add it to `exclude` in `disciplines.json` instead. A broken config in a folder that the repository's own ESLint never enters does not stop the run. Before failing, Hone asks the config that governs that folder, and each config above it up to the root, whether it really ignores both that folder and the file; a file that no `files` block matches is not taken for an ignored one. If one does, the file is treated like any other file the team's ESLint ignores and reported as an `ignore` native exception. Hone asks about a folder through a file inside it, so one gap remains: an ignore that matches every entry directly inside the folder but not the folder itself, such as `gen/*`, counts as ignoring `gen`, and Hone reports its files as ignored where the team's `eslint .` still loads the broken `gen/eslint.config.*` and fails. A file that no `eslint.config.*` applies to stops the run the same way, and the next step is to create one at the repository root that spreads the projection, as [ADOPTING.md](ADOPTING.md) step 4a shows. Detection cannot see how a task runner starts ESLint, so `disciplines.json` can state the lookup: `"eslintConfigLookup": "nearest-to-file"` or `"repository-root"`, which overrides detection. Both lookups are tested against monorepo fixtures with a config per package.
297
+ A repository can hold one `eslint.config.*` at its root or one per package. Hone resolves the team's configuration the way the team's own ESLint run does. ESLint 10, and ESLint 9 started with `--flag v10_config_lookup_from_file` (or `unstable_config_lookup_from_file`), use the `eslint.config.*` nearest each checked file. Plain ESLint 9 uses only the one in the directory it runs from, so for a repository whose `eslint` resolves to 9.x at `node_modules/eslint` and whose lint scripts carry no such flag, Hone reads the root `eslint.config.*` for every file, and fails the run as `team-config-unloadable` if there is none. When Hone cannot read an installed `eslint` at the repository root it assumes the nearest-to-file lookup. Each config that applies to a file must spread its projection: the root config the root projection, each package config its own slice; see [Package slices](#package-slices). A config that fails to load stops the run as `team-config-unloadable`, naming the config, the checked file it applies to and ESLint's message, then the next step: fix that config. Only if its folder holds nothing Hone should check, add it to `exclude` in `hone.config.json` instead. A broken config in a folder that the repository's own ESLint never enters does not stop the run. Before failing, Hone asks the config that governs that folder, and each config above it up to the root, whether it really ignores both that folder and the file; a file that no `files` block matches is not taken for an ignored one. If one does, the file is treated like any other file the team's ESLint ignores and reported as an `ignore` native exception. Hone asks about a folder through a file inside it, so one gap remains: an ignore that matches every entry directly inside the folder but not the folder itself, such as `gen/*`, counts as ignoring `gen`, and Hone reports its files as ignored where the team's `eslint .` still loads the broken `gen/eslint.config.*` and fails. A file that no `eslint.config.*` applies to stops the run the same way, and the next step is to create one at the repository root that spreads the projection, as [ADOPTING.md](ADOPTING.md) step 4a shows. Detection cannot see how a task runner starts ESLint, so `hone.config.json` can state the lookup: `"eslintConfigLookup": "nearest-to-file"` or `"repository-root"`, which overrides detection. Both lookups are tested against monorepo fixtures with a config per package.
332
298
 
333
299
  ## Compatibility
334
300
 
335
301
  Hone's version numbers follow semantic versioning under these rules:
336
302
 
337
- - A new or tightened check ships off by default in a minor release and becomes a default only in a major release. A new check arrives as a new clause, which a repository adopts by selecting it. A tightened check arrives as a new edition of its clause, which runs only for a repository that sets `checkEditions` to `"latest"` or names the edition in the clause's `clauseSettings`; a major release makes it the default edition and may retire older ones.
303
+ - A new or tightened check ships off by default in a minor release and becomes a default only in a major release. A new check arrives as a new check of a symptom, which a repository adopts by listing it. A tightened check arrives as a new edition of the check, which runs only for a repository that sets `checkEditions` to `"latest"` or names the edition in the check's `checkSettings`; a major release makes it the default edition and may retire older ones.
338
304
  - A change to the ESLint config that `hone project` generates, which an adopter must regenerate, is a minor release, with a clear message telling the adopter to regenerate: its changelog entry says to run `hone project` and commit the result, and until then the check reports the projection `out-of-date`.
339
- - Renaming or removing a clause address, a config key in `disciplines.json` or `discipline-exceptions.json`, or a CLI flag, or changing what one means, is a major release. Adding one with a safe default is not.
305
+ - Renaming or removing a check address, a config key in `hone.config.json`, a records file or a key of a record, or a CLI flag, or changing what one means, is a major release. Adding one with a safe default is not.
340
306
  - A change to what [the output contract](docs/output-contract.md) says a tool can parse is a major release: the command and option names, the exit codes and streams, the report's sections, outputs and verdict lines, the load failure kinds, and each line's leading fields up to its first value that may hold a space. What it marks not stable, such as the help text, the wording of `arguments-invalid` and `readFirst` lines and the repair text after a load failure's values, may change in a minor release, and a minor release may add a section, a kind of line or an option.
341
307
  - A breaking change to a type in `@hailstails/hone/rule-set` is a major release. `@hailstails/hone/audit` is experimental: its types may change in a minor release until it is marked stable.
342
308
  - A pre-release previews the release it is numbered towards and is published under the `next` dist-tag. A change no larger than the one a pre-release is numbered towards lands in that release's next pre-release; a larger one starts the line of the larger version it calls for. The changelog lists each change either way.
343
309
 
344
- `disciplines.json` and `discipline-exceptions.json` follow the same rules. A new key with a safe default, where nothing changes for an adopter who does not set it, is not breaking and can arrive in a minor release. A new required key with no safe default is breaking, and so is a change that makes a file that loads today stop loading or mean something else; both wait for a major release.
310
+ `hone.config.json` and the records in `hone-records` follow the same rules. A new key with a safe default, where nothing changes for an adopter who does not set it, is not breaking and can arrive in a minor release. A new required key with no safe default is breaking, and so is a change that makes a file that loads today stop loading or mean something else; both wait for a major release.
345
311
 
346
- A clause that accepts `audit` keeps accepting it: `audit` is never removed from the mechanisms such a clause lists, so a selection that names `audit` for it keeps loading. A clause can only gain mechanisms.
312
+ A check that accepts an engine keeps accepting it: an engine is never removed from the engines a check lists, so a `hone.config.json` that names it for the check keeps loading. A check can only gain engines. The standalone engine's id is `walker`; `audit` was version 1's name for it, and `hone.config.json` naming it is refused as `engine-not-allowed`.
347
313
 
348
314
  Each release's changes are listed in [CHANGELOG.md](CHANGELOG.md), which the package ships: after an upgrade, read `node_modules/@hailstails/hone/CHANGELOG.md` for what changed between the version you had and the one you have now.
349
315
 
350
316
  ## Known limits
351
317
 
352
- The ESLint pieces use the plugin namespace `hone` for CD-14 and `hone-cd<N>` for the others, so a rule id reads `hone/no-class-authoring`. The namespace `hone-core` is reserved for Hone's own machinery, never a discipline's rule: it names the projection's block names, such as `hone-core/piece/hone`, and the governance rule `hone-core/inline-config`, which reports inline configuration comments. No piece may use it.
318
+ The ESLint engine registers one plugin under the namespace `hone`, so a check's rule id is `hone/` followed by the check's address, `hone/<symptom>#<check>`, such as `hone/authored-class-or-this#class-keyword`: the address `hone.config.json` and the records write, character for character. A rule id that splits the address with a slash names no check, and an inline disable that writes one is listed under `misnamed`. The namespace `hone-core` is reserved for Hone's own machinery, never a check's rule: it names the governance rule `hone-core/inline-config`, which reports inline configuration comments. The projection's own blocks are named `hone/checks` and `hone/answered/<reaches>`. No piece may use it.
353
319
 
354
- This is the first release. Its tests cover each supported platform's ordinary paths and drives, and a committed ESLint projection checked out with either LF or CRLF line endings. The cases below are not covered by tests. Some may already work, but none is supported until a consumer needs it and a test is added:
320
+ Hone's tests cover each supported platform's ordinary paths and drives, and a committed ESLint projection checked out with either LF or CRLF line endings. The cases below are not covered by tests. Some may already work, but none is supported until a consumer needs it and a test is added:
355
321
 
356
322
  - File and folder names outside ASCII.
357
323
  - Windows device paths (`\\?\C:\...`).
@@ -365,35 +331,35 @@ This is the first release. Its tests cover each supported platform's ordinary pa
365
331
  - Columns reported on lines holding non-ASCII text.
366
332
  - Lint scripts are read with a simple shell tokenizer, so unusual quoting or a `cd` before `eslint` is not interpreted.
367
333
  - A script whose quotes do not pair as `sh` reads them, such as `echo don't stop`, is passed over when nothing in it names `eslint`. One that names `eslint` is listed as an unreadable `command-line-option` on every selected ESLint clause, since Hone cannot tell what it passes to ESLint.
368
- - Detection reads an ESLint 9 run started from inside a package, or given the lookup flag through the environment or a task runner, as a root-only run; set `eslintConfigLookup` in `disciplines.json` for those repositories.
334
+ - Detection reads an ESLint 9 run started from inside a package, or given the lookup flag through the environment or a task runner, as a root-only run; set `eslintConfigLookup` in `hone.config.json` for those repositories.
369
335
  - Team ESLint configs that imitate projection block names, register a second copy of the plugin, or use processors are not exercised.
370
- - A byte-order mark at the start of `disciplines.json`, `discipline-exceptions.json` or a file of the split layout; save them without one.
336
+ - A byte-order mark at the start of `hone.config.json` or a file under `hone-records`; save them without one.
371
337
 
372
338
  ## Developing Hone
373
339
 
374
- This repository is self-contained: it holds its own configuration and its own lock. `package.json` declares the packages the code imports and the development tools, `pnpm-lock.yaml` locks both, `tsconfig.json` typechecks the code under `strict`, `lint.biome.json` configures the linter, and `vitest.config.ts` runs its tests. `package.json` pins the pnpm version that locks and installs them, `pnpm-workspace.yaml` holds its settings, and pnpm resolves a dependency only to a release that is at least three days old when a dependency is added or updated; installing from the lock does not re-check it. Run `corepack enable` once so that Node provides that pnpm, install with `pnpm install --frozen-lockfile` in this directory, then run a script from it with `pnpm run <script>`:
340
+ This repository is self-contained: it holds its own configuration and its own lock. `package.json` declares the packages the code imports and the development tools, `pnpm-lock.yaml` locks both, `tsconfig.json` typechecks the code under `strict`, `.oxfmtrc.json` configures the formatter, and `vitest.config.ts` runs its tests. `package.json` pins the pnpm version that locks and installs them, `pnpm-workspace.yaml` holds its settings, and pnpm resolves a dependency only to a release that is at least three days old when a dependency is added or updated; installing from the lock does not re-check it. Run `corepack enable` once so that Node provides that pnpm, install with `pnpm install --frozen-lockfile` in this directory, then run a script from it with `pnpm run <script>`:
375
341
 
376
342
  | Script | Runs |
377
343
  | --- | --- |
378
344
  | `typecheck` | `tsc` with `tsconfig.json` |
379
- | `lint` | Biome with `lint.biome.json` |
345
+ | `format` | oxfmt with `.oxfmtrc.json`, writing the formatted files |
380
346
  | `test` | Vitest with `vitest.config.ts` |
381
- | `check` | all three in that order |
347
+ | `check` | typecheck, the oxfmt check and the tests in that order |
382
348
  | `build-package` | `node scripts/build-package.ts`: compiles Hone's own code with esbuild into `dist/`, leaving each declared peer and dependency to be imported by name, and adds the published `package.json`, which declares the dependencies at the ranges `package.json` declares, and the shipped documents and data. It fails if a dependency is not declared as a caret range of one release, if that range's floor is not the version the lock's root importer holds, or if the lock does not hold it, if an output imports anything but a `node:` builtin, a declared peer or a declared dependency, if an output carries an installed package's code, if a command or runner is not emitted at its own path with its own code, or if a shipped page links to a file the package does not ship. The tool's name, package name, command name, shipped rule-set name, reserved ESLint namespace, description, GitHub repository and the unrelated npm name to warn against live in `core/values/tool-identity.ts`, which the build, the install proof, the release text, the command's usage line and the ESLint runner all read. The reserved namespace is its own field, independent of the package name |
383
349
  | `pack-package` | `node scripts/pack-package.ts`: builds `dist/` and packs it with `npm pack` into `artefacts/hailstails-hone-<version>.tgz`, named by the `version` in `package.json` |
384
350
  | `package-determinism` | `node scripts/check-package-determinism.ts`: builds and packs twice into separate temporary roots and fails naming any file that differs, or when the two packed tarballs differ |
385
351
  | `self-check` | `node scripts/self-check.ts check --repo .`: runs Hone's own check on this repository with `disciplines.json` and the exception records in its `discipline-exceptions` folder; pass `--base-revision <rev>` after the script name. See [Core's check on itself](#hones-check-on-itself) |
386
- | `install-proof` | `node scripts/install-proof.ts`: packs the package once into a temporary tarball, or, given `--tarball <path>` after the script name, copies that already packed tarball there instead, and installs it with pnpm into six CommonJS consumers in an OS temporary directory outside the working tree, each copied from its folder under `tests/test-fixtures/consumer-proof/`, which holds only what that consumer's action needs. Each consumer exists for one thing only an installed package shows. The audit consumer, on TypeScript 4.8.4, runs `check` through the installed bin and expects its finding. The ESLint 9.28.0 and 10.0.0 consumers run `project`, expect a projection importing the piece by package name, and expect its finding from `check`. The consumer without `eslint` expects `toolchain-unavailable`. These four run with type stripping off. The team consumer is the example [docs/extending.md](docs/extending.md) follows. On TypeScript 4.8.4 it type-checks a wrong team piece, rule set and ESLint piece settings with its own `tsc`, as described under Public type entries, and expects the three errors. On the development versions, TypeScript 6.0.3, ESLint 10.11.0 and typescript-eslint 8.71.2, it also type-checks its rule set under `nodenext` and `bundler` and a CommonJS file, then runs both commands with type stripping on: its `.ts` pieces load through the installed package and give one finding from each mechanism under the team's `acme/` prefix. Its root says `"type": "commonjs"`, the hard case, so its rule set carries its own `"type": "module"` `package.json`. Each consumer declares its toolchain at exact pins in its own `devDependencies`, as an adopter does: TypeScript 4.8.4 alone for the audit consumer, the consumer without `eslint` and the team consumer on 4.8.4; ESLint 9.28.0 or 10.0.0 with typescript-eslint 8.56.0 and TypeScript 4.8.4 for the two ESLint consumers; and the development versions for the team consumer. It declares the tarball beside them, pins the pnpm version this repository's `package.json` pins, and waits this repository's `minimumReleaseAge`. pnpm's store shares each toolchain package between consumers. The proof prints where pnpm put the installed package, checks that each of Hone's dependencies is installed beside it at a release inside its published range, and expects the report to name its pages through the consumer's `node_modules/@hailstails/hone` instead, and it runs `check` through the package script with its options after `--`, as an adopter's pre-push hook does. A pass once a violation is removed, rule-set naming, plugin namespaces, settings overrides and per-package ESLint configs are proven by unit and in-process tests instead. The temporary directory is removed afterwards |
352
+ | `install-proof` | `node scripts/install-proof.ts`: packs the package once into a temporary tarball, or, given `--tarball <path>` after the script name, copies that already packed tarball there instead, and installs it with pnpm into six CommonJS consumers in an OS temporary directory outside the working tree, each copied from its folder under `tests/test-fixtures/consumer-proof/`, which holds only what that consumer's action needs. Each consumer exists for one thing only an installed package shows. The audit consumer, on TypeScript 4.8.4, runs `check` through the installed bin and expects its finding. The ESLint 9.39.5 and 10.15.0 consumers run `project`, expect a projection importing the piece by package name, and expect its finding from `check`. The consumer without `eslint` expects `toolchain-unavailable`. These four run with type stripping off. The team consumer is the example [docs/extending.md](docs/extending.md) follows. On TypeScript 4.8.4 it type-checks a wrong team piece, rule set and ESLint piece settings with its own `tsc`, as described under Public type entries, and expects the three errors. On the development versions, TypeScript 6.0.3, ESLint 10.15.0 and typescript-eslint 8.73.0, it also type-checks its rule set under `nodenext` and `bundler` and a CommonJS file, then runs both commands with type stripping on: its `.ts` pieces load through the installed package and give one finding from each mechanism under the team's `acme/` prefix. Its root says `"type": "commonjs"`, the hard case, so its rule set carries its own `"type": "module"` `package.json`. Each consumer declares its toolchain at exact pins in its own `devDependencies`, as an adopter does: TypeScript 4.8.4 alone for the audit consumer, the consumer without `eslint` and the team consumer on 4.8.4; ESLint 9.39.5 with typescript-eslint 8.73.0 and TypeScript 4.8.4 for the ESLint 9 consumer; ESLint 10.15.0 with typescript-eslint 8.73.0 and the development TypeScript for the ESLint 10 consumer and the workspace; and the development versions for the team consumer. It declares the tarball beside them, pins the pnpm version this repository's `package.json` pins, and waits this repository's `minimumReleaseAge`. pnpm's store shares each toolchain package between consumers. The proof prints where pnpm put the installed package, checks that each of Hone's dependencies is installed beside it at a release inside its published range, and expects the report to name its pages through the consumer's `node_modules/@hailstails/hone` instead, and it runs `check` through the package script with its options after `--`, as an adopter's pre-push hook does. A pass once a violation is removed, rule-set naming, plugin namespaces, settings overrides and per-package ESLint configs are proven by unit and in-process tests instead. The temporary directory is removed afterwards |
387
353
  | `pull-request-title` | `node scripts/pull-request-title-command.ts <title>`: passes a title shaped as a Conventional Commits subject, `type(scope)!: description`, and fails any other with the expected form. See [Versions and releases](#versions-and-releases) |
388
354
  | `release-pull-request` | `node scripts/release-pull-request-command.ts [pre-release\|stable]`: writes the next release's section into `CHANGELOG.md` and its version into `package.json`, in the working tree only. See [Versions and releases](#versions-and-releases) |
389
355
 
390
356
  ### Hone's check on itself
391
357
 
392
- `disciplines.json` selects every mechanical clause Hone ships, through the mechanism it names, confines the `eslint` package under CD-19's `confinedPackages`, and excludes `tests/test-fixtures/consumer-proof`: those folders are package-test content, the files of other repositories that `install-proof` copies out and checks with their own Hone run. `eslint.config.mjs` spreads the committed `disciplines.eslint.mjs` projection, which `node scripts/self-check.ts project --repo .` regenerates. Hone keeps its exception records in [the split layout](#the-split-layout): `discipline-exceptions/authorised-locations/cd-19.json` holds eight `authorised-location` records for `CD-19#import-boundaries`, each the single file that binds a runtime or third-party surface; seven are imported, with `existing-authorisation` provenance, from the earlier records kept in `.constitution-authorised-locations/cd-19.json`, and the eighth, for `mechanisms/eslint/runner/native-rules.ts`, carries its own why-chain. Strictness lives in `tsconfig.base.json`, which `tsconfig.json` extends; `tsconfig.json` leaves the same consumer folders out, since their files compile against the installed package.
358
+ `disciplines.json` selects every mechanical clause Hone ships, through the mechanism it names, confines the `eslint` package under `confinedPackages`, the setting of `outside-import-past-a-boundary#import-or-require` (clause `CD-19#import-boundaries`), and excludes `tests/test-fixtures/consumer-proof`: those folders are package-test content, the files of other repositories that `install-proof` copies out and checks with their own Hone run. `eslint.config.mjs` spreads the committed `disciplines.eslint.mjs` projection, which `node scripts/self-check.ts project --repo .` regenerates. Hone keeps its exception records in [the split layout](MIGRATING.md#16-moving-to-the-split-layout): `discipline-exceptions/authorised-locations/cd-19.json` holds eight `authorised-location` records for `CD-19#import-boundaries`, each the single file that binds a runtime or third-party surface; seven are imported, with `existing-authorisation` provenance, from the earlier records kept in `.constitution-authorised-locations/cd-19.json`, and the eighth, for `mechanisms/eslint/runner/native-rules.ts`, carries its own why-chain. Strictness lives in `tsconfig.base.json`, which `tsconfig.json` extends; `tsconfig.json` leaves the same consumer folders out, since their files compile against the installed package.
393
359
 
394
360
  `self-check` prints Hone's full report on itself, then one `self-check:` line. It fails when the run cannot load, or when any of `uncovered`, `stale`, `forfeited`, `doublyHeld`, `invalidRecords`, `unmeasured` or `projectionProblems` holds an entry: that is, when the selection, the exception records or the projection are not sound. It does not fail on `findings` or `unrecorded`. Those are printed in full and counted in the `self-check:` line, but they do not gate a change yet: the test fixtures hold deliberate violations, and some of Hone's own code does not meet every selected clause. CI runs `self-check` on every change with the pull request's base, or the previous `main`, as the base revision.
395
361
 
396
- Continuous integration runs on every pull request, drafts included, and on every push to `main`, from `pnpm-lock.yaml` alone, in two jobs, and both are required checks. `Discipline core on Windows` runs where the release packs, on Windows with Node 22.18.0, the oldest Node the package claims. It runs `check`, `self-check` and `package-determinism`, packs the tarball once with `pack-package`, runs `install-proof --tarball` on that tarball, and keeps it for the second job. `Discipline core on Linux` starts once the first passes, on Linux with Node 24, and runs the test suite and `install-proof --tarball` on the tarball the first job packed. Both jobs prove the one tarball `pack-package` wrote: the tests and the installed package on Windows on the oldest claimed Node, and on Linux on Node 24. The typecheck, lint, `self-check` and `package-determinism` run once, on Windows. macOS is not proven in CI. A separate workflow, `pull-request-title.yml`, runs `pull-request-title` on each pull request's title whenever the pull request is opened, edited, reopened, marked ready or pushed to.
362
+ Continuous integration runs on every pull request, drafts included, and on every push to `main`, from `pnpm-lock.yaml` alone, in two jobs, both required checks. They run side by side on the oldest claimed Node. Linux runs `check`, `self-check` and `package-determinism`, packs as the release does, and proves the tarball installs on a newer Node. Windows packs and proves its own tarball. A third job fails when the two tarballs differ. macOS is not proven in CI. A separate workflow, `pull-request-title.yml`, runs `pull-request-title` on each pull request's title whenever the pull request is opened, edited, reopened, marked ready or pushed to.
397
363
 
398
364
  ### Versions and releases
399
365