@hailstails/hone 2.0.0-pre.4 → 2.0.0-pre.5

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 (133) hide show
  1. package/ADOPTING.md +4 -15
  2. package/CHANGELOG.md +34 -0
  3. package/MIGRATING.md +6 -6
  4. package/README.md +3 -4
  5. package/chunks/{chunk-FPIP7JEC.js → chunk-4AJQHZ7I.js} +1 -1
  6. package/chunks/{chunk-CXM5KBZX.js → chunk-6LTJRJOE.js} +1 -1
  7. package/chunks/{chunk-PVSC4SE3.js → chunk-BISP2JOL.js} +4 -6
  8. package/chunks/{chunk-YGMO5Z6U.js → chunk-EFUWHLZK.js} +187 -193
  9. package/chunks/{chunk-BRANVR7K.js → chunk-FRE5IA3C.js} +1 -1
  10. package/chunks/{chunk-E4D5WDRX.js → chunk-GMLT3MHO.js} +252 -254
  11. package/chunks/chunk-M4VSJ27S.js +139 -0
  12. package/chunks/chunk-ND3EOGDK.js +2350 -0
  13. package/chunks/chunk-ONDBACCR.js +14332 -0
  14. package/chunks/{chunk-LD766VWU.js → chunk-U6W65ZOF.js} +31 -2
  15. package/chunks/{chunk-BKQ3K766.js → chunk-WPEOCLTP.js} +39 -33
  16. package/chunks/{chunk-A3RL4O5V.js → chunk-XNIXPQQ5.js} +35 -2
  17. package/docs/extending.md +2 -2
  18. package/methods/lenses/function-first.md +2 -2
  19. package/package.json +1 -1
  20. package/rules/README.md +5 -3
  21. package/rules/SPIRIT.md +1 -1
  22. package/rules/numbers.md +4 -4
  23. package/rules/principles/no-leak-across-a-boundary.md +1 -1
  24. package/rules/principles.md +1 -1
  25. package/rules/record-kinds/authorised-location.md +1 -1
  26. package/rules/records.md +11 -19
  27. package/rules/rules.md +5 -5
  28. package/rules/sources.md +6 -7
  29. package/rules/typescript/checks.md +55 -387
  30. package/rules/typescript/recipes/adapter-per-outside-party.md +10 -5
  31. package/rules/typescript/recipes/assert-to-narrow.md +114 -4
  32. package/rules/typescript/recipes/closure-factory.md +5 -5
  33. package/rules/typescript/recipes/companion-test-file.md +5 -3
  34. package/rules/typescript/recipes/composed-orchestrator.md +6 -4
  35. package/rules/typescript/recipes/composition-root.md +5 -3
  36. package/rules/typescript/recipes/{bounded-context-generic.md → constrained-context-generic.md} +6 -4
  37. package/rules/typescript/recipes/copy-never-write-in.md +6 -4
  38. package/rules/typescript/recipes/declared-not-bundled.md +5 -3
  39. package/rules/typescript/recipes/dependency-record.md +5 -3
  40. package/rules/typescript/recipes/domain-vocabulary-list.md +5 -3
  41. package/rules/typescript/recipes/entity-module.md +8 -5
  42. package/rules/typescript/recipes/exact-pins-and-a-lock-file.md +5 -3
  43. package/rules/typescript/recipes/extension-outside-the-vendored-code.md +5 -3
  44. package/rules/typescript/recipes/failure-asserted-as-a-value.md +44 -4
  45. package/rules/typescript/recipes/failure-mapping-at-the-adapter.md +8 -5
  46. package/rules/typescript/recipes/fix-the-declaration-not-the-value.md +5 -3
  47. package/rules/typescript/recipes/functional-iteration.md +8 -3
  48. package/rules/typescript/recipes/guard-clauses.md +5 -3
  49. package/rules/typescript/recipes/integration-test-owns-its-scratch.md +5 -3
  50. package/rules/typescript/recipes/integration-test-suffix.md +5 -3
  51. package/rules/typescript/recipes/it-each-over-typed-rows.md +117 -0
  52. package/rules/typescript/recipes/map-out-at-the-adapter.md +36 -4
  53. package/rules/typescript/recipes/meaning-in-names-not-comments.md +5 -5
  54. package/rules/typescript/recipes/named-exported-type.md +5 -3
  55. package/rules/typescript/recipes/narrow-ports.md +5 -3
  56. package/rules/typescript/recipes/one-argument-object.md +8 -3
  57. package/rules/typescript/recipes/{port-in-the-domain.md → port-in-a-module-of-its-own.md} +7 -5
  58. package/rules/typescript/recipes/ports-in-the-argument.md +5 -3
  59. package/rules/typescript/recipes/repo-scripts-only.md +5 -3
  60. package/rules/typescript/recipes/result-union.md +5 -5
  61. package/rules/typescript/recipes/screaming-folders.md +5 -5
  62. package/rules/typescript/recipes/shared-strict-base-config.md +5 -5
  63. package/rules/typescript/recipes/stub-with-vi-fn.md +130 -0
  64. package/rules/typescript/recipes/tagged-union-and-exhaustive-switch.md +5 -3
  65. package/rules/typescript/recipes/whole-words.md +5 -3
  66. package/rules/typescript/recipes/whole-written-out-expectation.md +284 -4
  67. package/rules/typescript/recipes/world-values-through-a-port.md +5 -3
  68. package/rules/typescript/recipes/zod-at-the-producers-adapter.md +8 -3
  69. package/rules/typescript/recipes.md +567 -21
  70. package/rules/typescript/symptoms/ambient-randomness.md +1 -1
  71. package/rules/typescript/symptoms/answer-set-in-a-hook.md +1 -1
  72. package/rules/typescript/symptoms/{assertion-outside-a-test → assertion-outside-a-test-body}/assertion-site.md +1 -1
  73. package/rules/typescript/symptoms/{assertion-outside-a-test.md → assertion-outside-a-test-body.md} +1 -1
  74. package/rules/typescript/symptoms/branch-in-a-test/test-body.md +10 -184
  75. package/rules/typescript/symptoms/branch-in-a-test.md +11 -1
  76. package/rules/typescript/symptoms/claimed-type/non-null-assertions.md +1 -1
  77. package/rules/typescript/symptoms/{code-or-prose-read-as-text.md → code-or-prose-read-as-text-in-a-test.md} +2 -2
  78. package/rules/typescript/symptoms/computed-value-in-a-test/test-body.md +26 -117
  79. package/rules/typescript/symptoms/computed-value-in-a-test.md +1 -1
  80. package/rules/typescript/symptoms/date-used-directly.md +1 -1
  81. package/rules/typescript/symptoms/default-for-a-required-value.md +1 -1
  82. package/rules/typescript/symptoms/double-with-a-body/logic-in-a-passed-function.md +1 -18
  83. package/rules/typescript/symptoms/double-with-a-body.md +1 -1
  84. package/rules/typescript/symptoms/{export-from-a-test-file.md → export-from-a-test.md} +1 -1
  85. package/rules/typescript/symptoms/failure-shaped-as-success.md +1 -1
  86. package/rules/typescript/symptoms/inherited-environment-in-a-subprocess/git-spawn-environment.md +1 -1
  87. package/rules/typescript/symptoms/inner-layer-imports-outer.md +1 -1
  88. package/rules/typescript/symptoms/library-class-built-in-place.md +1 -1
  89. package/rules/typescript/symptoms/loop-keyword/loop-statement.md +1 -1
  90. package/rules/typescript/symptoms/outside-import-past-a-boundary/import-or-require.md +1 -0
  91. package/rules/typescript/symptoms/outside-import-past-a-boundary.md +5 -4
  92. package/rules/typescript/symptoms/outside-type-in-a-signature.md +2 -2
  93. package/rules/typescript/symptoms/{port-outside-the-domain.md → port-beside-its-adapter.md} +2 -2
  94. package/rules/typescript/symptoms/port-named-for-a-mechanism.md +1 -1
  95. package/rules/typescript/symptoms/process-global-used-in-place.md +1 -1
  96. package/rules/typescript/symptoms/rebinding/test-body.md +1 -18
  97. package/rules/typescript/symptoms/rebinding.md +11 -1
  98. package/rules/typescript/symptoms/schema-past-its-adapter.md +2 -2
  99. package/rules/typescript/symptoms/text-past-its-reader/test-body.md +2 -17
  100. package/rules/typescript/symptoms/text-past-its-reader.md +1 -1
  101. package/rules/typescript/symptoms/throw-or-catch-in-a-test/try-block.md +1 -25
  102. package/rules/typescript/symptoms/type-declared-in-a-test/test-type-declaration.md +1 -1
  103. package/rules/typescript/symptoms/unasserted-call.md +1 -1
  104. package/rules/typescript/symptoms.md +35 -35
  105. package/src/domain/language-layer/authored-item-types.d.ts +21 -5
  106. package/src/domain/runner/runner-result-types.d.ts +1 -2
  107. package/src/eslint-plugin.js +40 -38
  108. package/src/hone.js +15 -13638
  109. package/src/infrastructure/disciplines-file/version-one-names.json +4 -5
  110. package/src/infrastructure/engines/eslint/runner/runner.js +55 -45
  111. package/src/infrastructure/engines/walker/{assertion-outside-a-test → assertion-outside-a-test-body}/assertion-site/assertion-site.js +1 -1
  112. package/src/infrastructure/engines/walker/branch-in-a-test/test-body/test-body-logic.js +39 -65
  113. package/src/infrastructure/engines/walker/{code-or-prose-read-as-text → code-or-prose-read-as-text-in-a-test}/raw-read/raw-read.js +1 -1
  114. package/src/infrastructure/engines/walker/{export-from-a-test-file → export-from-a-test}/test-file-export/test-file-export.js +1 -1
  115. package/src/infrastructure/engines/walker/runner/runner.js +10 -10
  116. package/src/infrastructure/engines/walker/strictness-weakened/strict/compiler-overrides.js +3 -3
  117. package/src/infrastructure/engines/walker/type-declared-in-a-test/test-type-declaration/test-type-declaration.examples.json +15 -3
  118. package/src/infrastructure/engines/walker/type-declared-in-a-test/test-type-declaration/test-type-declaration.js +118 -4
  119. package/src/measure-engines.process.js +80 -0
  120. package/src/testing.js +81 -9
  121. package/chunks/chunk-7FVSZ2VL.js +0 -1304
  122. package/chunks/chunk-BIDD2YWP.js +0 -398
  123. package/rules/record-kinds/boundary-record.md +0 -9
  124. package/rules/typescript/recipes/iteach-over-typed-rows.md +0 -18
  125. package/rules/typescript/recipes/stub-with-vifn.md +0 -20
  126. /package/rules/typescript/symptoms/{code-or-prose-read-as-text → code-or-prose-read-as-text-in-a-test}/raw-read.md +0 -0
  127. /package/rules/typescript/symptoms/{export-from-a-test-file → export-from-a-test}/test-file-export.md +0 -0
  128. /package/src/infrastructure/engines/walker/{assertion-outside-a-test → assertion-outside-a-test-body}/assertion-site/assertion-site.examples.json +0 -0
  129. /package/src/infrastructure/engines/walker/{assertion-outside-a-test → assertion-outside-a-test-body}/assertion-site/piece.json +0 -0
  130. /package/src/infrastructure/engines/walker/{code-or-prose-read-as-text → code-or-prose-read-as-text-in-a-test}/raw-read/piece.json +0 -0
  131. /package/src/infrastructure/engines/walker/{code-or-prose-read-as-text → code-or-prose-read-as-text-in-a-test}/raw-read/raw-read.examples.json +0 -0
  132. /package/src/infrastructure/engines/walker/{export-from-a-test-file → export-from-a-test}/test-file-export/piece.json +0 -0
  133. /package/src/infrastructure/engines/walker/{export-from-a-test-file → export-from-a-test}/test-file-export/test-file-export.examples.json +0 -0
package/ADOPTING.md CHANGED
@@ -289,21 +289,10 @@ To print less, set `"reportOutput"` in `hone.config.json`, or pass `--report-out
289
289
  Before recording anything, take the chain in [the spirit of the rules](rules/SPIRIT.md#when-the-check-is-red): measure the sites for each failing check, ask what each group points at using the `symptoms` section of the report, the "May indicate" and "Breach usually sits" lines of each symptom on [the symptoms page](rules/typescript/symptoms.md) and the check's section in `disciplines.assessment.md` (step 5a), then decide. Fix the cause where you can; a record is not the first move. Where a finding is correct in a place, or owed and cannot be fixed yet, answer it with a record in `<repo>/hone-records`, one file for each kind and symptom or recipe:
290
290
 
291
291
  - **Debt** is known debt in one file: `hone-records/debt/<symptom>.json` with the symptom's name as `answers`, or `<symptom>#<check>` to reach one check of it, and the `file`. It is forfeited, and fails the run, as soon as that file changes since `--base-revision`. An `eslint-disable` comment or a `@ts-expect-error`, `@ts-ignore` or `@ts-nocheck` directive in a file is held only by a record on its check and file: until one holds it, such a comment is `unrecorded` and fails the run; once held, it is listed under `held` with the record that holds it. Step 7a writes that debt for the findings and for such comments.
292
- - **An authorised location** says the symptom is correct in that file, for example the single adapter that reads the real clock when the catalogue lists that case: `hone-records/authorised-locations/<symptom>.json`. `hone authorise` writes one from the arguments it is given, with the why-chain the person supplies.
293
- - **A boundary record** says a module is where an outside party is met, such as the clock adapter, in `hone-records/boundary-records.json`:
294
-
295
- ```json
296
- {
297
- "version": 2,
298
- "records": [
299
- { "module": "src/clock.ts", "outsideParty": "runtime:clock", "ports": ["Clock"] }
300
- ]
301
- }
302
- ```
303
-
292
+ - **An authorised location** says a check's finding is correct in that file, such as `date-used-directly#clock-sources` in `src/clock.ts`, the single adapter that reads the real clock: `hone-records/authorised-locations/<symptom>.json`. `hone authorise` writes one from the arguments it is given, with the why-chain the person supplies. For Outside import past a boundary it also takes `--outside-party`, the package or `node:` module the adapter is for.
304
293
  - **A deviation** says why a file does not follow a recipe the catalogue gives, in `hone-records/deviations/<recipe>.json`. **A dependency record** says why a package is used where the platform's own way exists, in `hone-records/dependency-records.json`.
305
294
 
306
- Which kind answers a finding is in the `symptoms` section of the report: each symptom's note lists the situations that are correct uses of it and the record kind that expresses each. [README.md](README.md#hone-records) gives every kind's fields. A record that answers nothing is `stale` and fails the run, except a dependency record, which no check reads yet and so is never stale, so record only what a finding needs: debt while the check still finds it, a location or boundary where the symptom is correct. If the check is not a true measure of the rule here, or cannot work here, list it as `"not-run"` instead; if the rule does not apply, list it as `"not-adopted"` (step 4).
295
+ Which kind answers a finding is in the `symptoms` section of the report: each symptom's note lists the situations that are correct uses of it and the record kind that expresses each. [README.md](README.md#hone-records) gives every kind's fields. A record that answers nothing is `stale` and fails the run, except a dependency record, which no check reads yet and so is never stale, so record only what a finding needs: debt while the check still finds it, a location where the symptom is correct. If the check is not a true measure of the rule here, or cannot work here, list it as `"not-run"` instead; if the rule does not apply, list it as `"not-adopted"` (step 4).
307
296
 
308
297
  An authorised location needs its `case`, its `owes` and a `whyChain` shaped like this, with exactly five steps in `whys`; debt needs none:
309
298
 
@@ -333,7 +322,7 @@ Existing debt needs no chain and no case: a debt record names only its symptom a
333
322
 
334
323
  A repository with existing code usually has more findings than the change that adopts Hone can fix. `hone record-debt` writes a debt record for each symptom, check and file the check finds broken, and for each inline disable or TypeScript directive that hides one, so the first passing run does not wait on hundreds of records written by hand. Do this after the assessment (step 5a), and after fixing what you are going to fix in this change.
335
324
 
336
- 1. **Decide the permanent exceptions first.** List each file or folder that breaks a check on purpose and always will, such as the one adapter that reads the real clock. Those are not debt. They get an authorised location with its `whyChain`, or a boundary record, written by a person, so keep them out of the generated records with `--leave`.
325
+ 1. **Decide the permanent exceptions first.** List each file or folder that breaks a check on purpose and always will, such as the one adapter that reads the real clock. Those are not debt. They get an authorised location with its `whyChain`, written by a person, so keep them out of the generated records with `--leave`.
337
326
  2. **Leave `hone.config.json` as it is.** Debt needs no why-chain and no case, so the command needs no setting and never sets one. The same command records debt a later change uncovers, such as a newly listed check or a newer edition: run it again against the branch's base.
338
327
  3. **Finish every source file this change edits.** Forfeiture is assessed against the branch's base, the revision your pre-push hook and CI pass to the check (step 5), such as `origin/main`, not against the commit you run from. A file the adopting change edits has changed since that base, so a record for it is forfeited there, even after you commit the edit; the command writes none for such a file and says so. In each file this change edits, fix every finding of each check, or take the edit out of this change and make it later in a change that fixes the file. A file this change adds has no record to lose: point 4 reports it `touched`.
339
328
  4. **Run it once, with the branch's base as `--base-revision`**, one `--leave` for each path from point 1. Fetch the base first, so the revision is current:
@@ -343,7 +332,7 @@ A repository with existing code usually has more findings than the change that a
343
332
  node_modules/.bin/hone record-debt --repo . --base-revision origin/main --leave src/clock.ts --leave src/adapters
344
333
  ```
345
334
 
346
- It prints one line per finding and per native exception, saying what it recorded and, for each it did not, why and what to do instead. Files under a `--leave` path need their authorised locations or boundary records from point 1 written now. Files this change created or changed need fixing.
335
+ It prints one line per finding and per native exception, saying what it recorded and, for each it did not, why and what to do instead. Files under a `--leave` path need their authorised locations from point 1 written now. Files this change created or changed need fixing.
347
336
  5. **Re-project and check against the same base.** With any `eslint` check, run `npm run --silent hone:project`. Then run `npm run --silent hone:check -- --forfeiture this-run --base-revision origin/main` (with pnpm, `pnpm run --silent hone:check --forfeiture this-run --base-revision origin/main`). `--forfeiture this-run` makes this run assess forfeiture whatever `forfeiture` says, as the run that assesses it for your repository does: the pre-push hook with `"forfeiture": "elsewhere"` (step 5), or CI without it. A `forfeited` line names a file this change edits: go back to point 3 for it. A check against `HEAD` hides those lines, because nothing has changed since `HEAD`, and the hook or CI then fails where this run passed. What stays under `unrecorded` is what no record can hold; point 4's line for each says what to do.
348
337
  6. **Review the diff.** Nothing takes effect until you commit it. Each generated record is debt holding only its symptom, check and file: inherited debt that nobody has reviewed, and the reviewer of the adopting change reads it as that. Note them in each check's Debt line in `disciplines.assessment.md`.
349
338
 
package/CHANGELOG.md CHANGED
@@ -2,6 +2,40 @@
2
2
 
3
3
  Every release of Hone, newest first. `pnpm run release-pull-request` writes each new section from the commits merged to `main` since the previous release tag, whose subjects are the squash-merged pull request titles; README.md's Compatibility section says what each kind of release may change. The sections below were written by hand from the merged pull requests when the changelog started.
4
4
 
5
+ ## 2.0.0-pre.5
6
+
7
+ ### Breaking changes
8
+
9
+ - an authorised location binds what its symptom declares, and boundary records go (#477)
10
+ - hone upgrade runs the record tools and ends in a passing check (#478)
11
+ - hone upgrade carries no names from 2.0 prereleases (#483)
12
+ - findings reach recipe examples through symptom, case and rule (#484)
13
+
14
+ ### Features
15
+
16
+ - an engines stage measures in a child process, so a rewritten config takes effect (#464)
17
+ - a local speed baseline compares hone check CPU time against a pinned revision (#454)
18
+
19
+ ### Fixes
20
+
21
+ - self-check fails on findings and unrecorded native exceptions (#445)
22
+ - a moved file keeps its debt, and records follow renames (#447)
23
+ - type-declared-in-a-test spares a row typed only by imported types (#450)
24
+ - the child measurement replies on its own pipe, so adopter output can't break it (#476)
25
+
26
+ ### Other changes
27
+
28
+ - Hone's record tools run without asking (#442)
29
+ - record the applied agent definitions (#443)
30
+ - the upgrade proof decides its effects as data (#448)
31
+ - AGENTS.md holds the naming, test-layout and rules-over-checks rulings (#456)
32
+ - freeze the version 2 names (#449)
33
+ - the package plan finds every process entry by one convention (#463)
34
+ - leave Hone's own debt forfeiture to another run until 2.0 ships (#468)
35
+ - the ESLint integration tests prove only what real ESLint adds (#470)
36
+ - Hone's own check prints only what needs action (#471)
37
+ - records and checks refer to symptoms by address (#472)
38
+
5
39
  ## 2.0.0-pre.4
6
40
 
7
41
  ### Breaking changes
package/MIGRATING.md CHANGED
@@ -394,16 +394,16 @@ Nothing must be migrated. Selections, exception records and findings still use t
394
394
 
395
395
  ## 20. Moving from version 1 to version 2
396
396
 
397
- Version 2 keeps its settings in `hone.config.json`, its records in the `hone-records` folder and its native configuration in `hone.<engine>.mjs`, where version 1 kept them in `disciplines.json`, the exception records and `disciplines.<mechanism>.mjs`. `hone upgrade` moves a repository from one to the other in one run, and refuses, changing nothing, when it cannot show that version 2 reports what version 1 reported.
397
+ Version 2 keeps its settings in `hone.config.json`, its records in the `hone-records` folder and its native configuration in `hone.<engine>.mjs`, where version 1 kept them in `disciplines.json`, the exception records and `disciplines.<mechanism>.mjs`. `hone upgrade` moves a repository from one to the other in one run, and refuses, changing nothing, when version 2's check does not pass on the result. Version 2 is a major release, so its findings may differ from version 1's: the upgrade records the differences as debt.
398
398
 
399
- 1. **Install version 2 on a branch, with a clean working tree,** the way [ADOPTING.md](ADOPTING.md#10-update-and-remove) section 10 installs a release, and **commit the install**, which changes the pin and the lock, so the working tree is clean before the upgrade. Then stop: run neither `hone:project` nor the check before the upgrade. With version 2 installed both still run version 1's code on a version 1 repository, because `disciplines.json` is what chooses the version, and version 1's `project` rewrites any `disciplines.eslint.mjs` it finds out of date, which leaves uncommitted changes under the upgrade; the upgrade runs version 1's check and `project` itself and refuses when `project` rewrites a file it had already measured. Whatever you run before the upgrade prints version 1's wording, such as `file carve-outs cannot be checked for decay`, so the version 2 lines quoted from step 4 on apply after the upgrade. The working tree is the only rollback: a refusal after files were written puts them back, and names any it could not put back, so you can restore them from version control.
399
+ 1. **Before installing version 2, get your 1.x check passing.** The upgrade records as debt whatever version 2 then finds. **Then install version 2 on a branch, with a clean working tree,** the way [ADOPTING.md](ADOPTING.md#10-update-and-remove) section 10 installs a release, and **commit the install**, which changes the pin and the lock, so the working tree is clean before the upgrade. Run neither `hone:project` nor the check before the upgrade: on a version 1 repository version 2's commands stop with `upgrade-needed`. The upgrade runs version 1's `project` itself, and refuses when that rewrites a file it had already measured. The working tree is the only rollback: a refusal after files were written puts them back, and names any it could not put back, so you can restore them from version control.
400
400
  2. **Run it:**
401
401
 
402
402
  ```bash
403
403
  node_modules/.bin/hone upgrade --repo .
404
404
  ```
405
405
 
406
- It runs version 1 over your repository, plans the version 2 files, writes them, runs version 2 and compares the two runs. A version 1 `reportOutput` of `failures-only` is written as `actionable`, its version 2 name, and `--report-output failures-only` is refused on a version 2 repository. Only when they agree does it remove the version 1 files. If they do not, it changes nothing. Each refusal states whether anything was changed, and lists any file it could not put back.
406
+ It writes the version 2 files, removes the records it carried that answer nothing, runs `record-debt`, `prune-debt` and `project`, then runs version 2's check. A version 1 `reportOutput` of `failures-only` is written as `actionable`, its version 2 name, and `--report-output failures-only` is refused on a version 2 repository. Only when version 2's check passes does it remove the version 1 files. If it fails, the upgrade puts everything back and prints the failing lines. Each refusal states whether anything was changed, and lists any file it could not put back.
407
407
  3. **Commit** what the upgrade wrote and removed, as its own commit after the install: the version 2 files together with the removal of the version 1 files, `git add .`, then your commit. That includes each `hone.eslint.d.mts`, which the check compares with what `hone project` writes and reports under `projection-problems` when it is missing or out of date.
408
408
 
409
409
  After the upgrade, `hone split-records` does not run on version 2 files, and the records stay in `hone-records`. Before it, version 1's `hone authorise` stops and sends you here.
@@ -415,7 +415,7 @@ It exits `0` on success, listing each file it wrote, rewrote or removed: commit
415
415
 
416
416
  ### Your records, and what the check judges
417
417
 
418
- A file carve-out that version 1 held with a `provenance`, as `hone record-debt` writes, or with a `whyChain`, and every authorised location move to `hone-records` word for word, under a `carried` key. These are the carried records. A location is filed at the check or checks that the findings it answers sit at, so one for a clause bound to the audit mechanism lands under the symptom those findings belong to, such as `hone-records/authorised-locations/claimed-type.json`, not under its clause. A file carve-out with neither moves as a debt record with the `reason` as its `note`, and so does one that held up an inline disable or a TypeScript directive and exempted no finding, once for each check the suppression reaches.
418
+ A file carve-out that version 1 held with a `provenance`, as `hone record-debt` writes, or with a `whyChain`, and every authorised location move to `hone-records` word for word, under a `carried` key. These are the carried records. A location is filed at the check or checks that the findings it answers sit at, so one for a clause bound to the audit mechanism lands under the symptom those findings belong to, such as `hone-records/authorised-locations/claimed-type.json`, not under its clause. A `CD-19` location becomes one record for each package in its `confinedPackages`, plus one for `node:` modules, as version 1 confined them, and the upgrade removes the ones that answer nothing. A file carve-out with neither moves as a debt record with the `reason` as its `note`, and so does one that held up an inline disable or a TypeScript directive and exempted no finding, once for each check the suppression reaches.
419
419
 
420
420
  The check lists the carried records under `carried`, one line each, `<records file> records[<index>] <standing>`, followed by `lacks` and the keys it lacks when the record lacks any. A carried authorised location lacks `case`, `owes` and `whyChain`, which version 1 did not hold, and its line says so. With a base revision, it judges each one: it is `established` when the base revision held that record unchanged, whether as a version 1 entry or as a version 2 record, so a base from before the upgrade works. A carried record changed since the base is refused as `carried-changed-since-base`, so leave carried records as they are. Without a base revision the standing is `unjudged`: under `"forfeiture": "this-run"`, the default, the run fails with `import-unmeasured no-base-revision`, so every run needs `--base-revision`, local runs and hooks included; under `"forfeiture": "elsewhere"` it prints `carried standing elsewhere` and leaves them to the run that has a base. Version 2 names each finding by its check, such as `authored-class-or-this#class-keyword`, where version 1 named it by its clause, such as `CD-14#class-syntax`.
421
421
 
@@ -442,6 +442,6 @@ Each refusal an ESLint repository meets names the config or projection and what
442
442
  A team rule set still in version 1's layout, `rules/<ID>/discipline.json` beside `mechanisms/`, is converted by the same run. Before it, do these by hand, in a commit of their own:
443
443
 
444
444
  1. **Name and define what version 2 needs.** Names and definitions are your team's judgement, so the upgrade asks for them rather than writing its own: write `version-two-names.json` at the rule set's root. `clauses` gives each mechanical clause a check of its own, not one of Hone's, and a title, such as `"ACME-1#console-calls": { "check": "direct-console#console-calls", "title": "Console calls" }`. `symptoms`, `cases`, `principles` and `rules` define each symptom those checks see, and what each symptom points at, with the same facts as their items in [docs/extending.md](docs/extending.md); a symptom's `seen` is taken from its clauses' summaries. Anything missing refuses the upgrade, and the refusal lists every entry to add.
445
- 2. **Update the pieces to version 2's piece API,** which [docs/extending.md](docs/extending.md) describes: a walker piece reads `bindings` and reports at `binding.address` where it read clauses, it imports from `@hailstails/hone/walker`, and its tests use `@hailstails/hone/testing`. The upgrade runs the pieces to prove the two runs agree, so they must run under version 2 first.
445
+ 2. **Update the pieces to version 2's piece API,** which [docs/extending.md](docs/extending.md) describes: a walker piece reads `bindings` and reports at `binding.address` where it read clauses, it imports from `@hailstails/hone/walker`, and its tests use `@hailstails/hone/testing`. The upgrade runs the pieces in version 2's check, so they must run under version 2 first.
446
446
 
447
- The upgrade writes the definitions, symptoms and checks under the rule set's `rules/` folder and each clause's cases as its check's examples, moves each piece's folder to `engines/<engine>/<symptom>/<check>/`, and removes the version 1 files and the names file. A folder that several clauses share is split: each clause's module and its test go to that clause's check, and the other files go once to the check of the clause first by name. Each moved file's relative imports, `require` calls and test-double module paths are rewritten for where it now sits. The upgrade refuses a folder whose one module serves several clauses, and an import or module path written as an expression rather than a string; give each clause a module of its own, or write the path as a string, first. The rule set takes Hone's record kinds, and its records land under `hone-records/<rule set>/`. An upgrade that stopped part way leaves version 1 discipline files beside version 2 items, and a second `hone upgrade` refuses that rule set until they are removed or it is restored.
447
+ The upgrade writes the definitions, symptoms and checks under the rule set's `rules/` folder and each clause's cases as its check's examples, moves each piece's folder to `engines/<engine>/<symptom>/<check>/`, and removes the version 1 files and the names file. An authorised location on a moved piece becomes debt, for you to re-authorise at its new path. A folder that several clauses share is split: each clause's module and its test go to that clause's check, and the other files go once to the check of the clause first by name. Each moved file's relative imports, `require` calls and test-double module paths are rewritten for where it now sits. The upgrade refuses a folder whose one module serves several clauses, and an import or module path written as an expression rather than a string; give each clause a module of its own, or write the path as a string, first. The rule set takes Hone's record kinds, and its records land under `hone-records/<rule set>/`. An upgrade that stopped part way leaves version 1 discipline files beside version 2 items, and a second `hone upgrade` refuses that rule set until they are removed or it is restored.
package/README.md CHANGED
@@ -39,7 +39,7 @@ Without `--base-revision`, Hone cannot tell which files were touched, so debt ca
39
39
 
40
40
  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.
41
41
 
42
- 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`, and writes nothing for:
42
+ It never writes anything that needs an owner's reason: no authorised location, no deviation, no dependency record and no setting. It prints one line per finding and per native exception under `unrecorded`, and writes nothing for:
43
43
 
44
44
  - a symptom and file that already hold debt;
45
45
  - a file under a `--leave` path. `--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 a why chain;
@@ -135,9 +135,8 @@ The keys version 1's `disciplines.json` used under other names are refused, each
135
135
  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": [...] }`. A file in the wrong folder or under a name that is not a catalogue name is refused, naming where each record belongs. Each record names what it reaches by the symptom's name, or by `<symptom>#<check>` to reach one check of it. [rules/records.md](rules/records.md) says what each kind is for.
136
136
 
137
137
  - **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.
138
- - **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.
138
+ - **An authorised location** is in `hone-records/authorised-locations/<symptom>.json`: `answers` as `<symptom>#<check>`, `file`, `case` and `owes`, naming the case the file is and the principle it owes, and a `whyChain`. It says the check's finding is correct in that file. A symptom whose authorised-location correct use binds an outside party, such as Outside import past a boundary, also takes `outsideParty`: a package's name or a module such as `node:fs`, and the record answers only that party's imports. A symptom with no authorised-location correct use takes none. [`hone authorise`](#commands) writes one from the arguments it is given.
139
139
  - **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.
140
- - **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.
141
140
  - **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.
142
141
 
143
142
  An authorised location's `whyChain` follows the [why-chain contract](docs/why-chain-contract.md), which gives its shape, what Hone refuses and what review still judges.
@@ -241,7 +240,7 @@ This repository is self-contained: it holds its own configuration and its own lo
241
240
 
242
241
  Hone checks itself with its own `hone.config.json` and the records in `hone-records/`. The consumer folders `install-proof` copies out are excluded, since they are other repositories checked by their own Hone run.
243
242
 
244
- `self-check` prints Hone's full report on itself, then one `self-check:` line. It fails when the selection, the records or the projection are not sound, and not on findings, which it prints and counts. CI runs it on every change with the pull request's base, or the previous `main`, as the base revision.
243
+ `self-check` prints Hone's full report on itself, then one `self-check:` line. It fails when any failing section of the report holds an entry, findings and unrecorded native exceptions included. CI runs it on every change with the pull request's base, or the previous `main`, as the base revision.
245
244
 
246
245
  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.
247
246
 
@@ -6,7 +6,7 @@ import {
6
6
  namedPieceFolderSegmentsOf,
7
7
  parsedJson,
8
8
  pieceFileSchema
9
- } from "./chunk-BKQ3K766.js";
9
+ } from "./chunk-WPEOCLTP.js";
10
10
  import {
11
11
  isRuleSetName
12
12
  } from "./chunk-OO5KV7KN.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createDefaultPathPort,
3
3
  installRootAboveEntry
4
- } from "./chunk-BKQ3K766.js";
4
+ } from "./chunk-WPEOCLTP.js";
5
5
 
6
6
  // src/infrastructure/node/modules/package-location-port.ts
7
7
  var path = createDefaultPathPort({});
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  clauseAddressObjectSchema
3
- } from "./chunk-BRANVR7K.js";
3
+ } from "./chunk-FRE5IA3C.js";
4
4
  import {
5
5
  snippetSchema
6
6
  } from "./chunk-Z6JHBNDS.js";
@@ -11,7 +11,7 @@ import {
11
11
  isCheckAddressText,
12
12
  repoPathSchema,
13
13
  ruleSetIdentitySchema
14
- } from "./chunk-BKQ3K766.js";
14
+ } from "./chunk-WPEOCLTP.js";
15
15
 
16
16
  // src/infrastructure/engines/protocol/runner-module/runner-result-schema.ts
17
17
  import { z as z3 } from "zod";
@@ -62,12 +62,10 @@ var nativeExceptionKindSchema = z3.enum([
62
62
  "inline-rule-config",
63
63
  "command-line-option"
64
64
  ]);
65
- var PAGE_SECTION = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
66
- var PAGE_UNDER_ITS_FOLDER = /^(?:[A-Za-z0-9_-][A-Za-z0-9_.-]*\/)*[A-Za-z0-9_-][A-Za-z0-9_.-]*\.md$/;
65
+ var FORM_NAME = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
67
66
  var remedySchema = z3.object({
68
67
  fix: z3.string().min(1),
69
- page: z3.string().regex(PAGE_UNDER_ITS_FOLDER),
70
- section: z3.string().regex(PAGE_SECTION)
68
+ form: z3.string().regex(FORM_NAME)
71
69
  }).readonly();
72
70
  var hitSchema = z3.object({
73
71
  clause: clauseAddressObjectSchema,