checkwright 0.21.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (489) hide show
  1. package/README.md +1013 -50
  2. package/lib/common/digest.sh +18 -0
  3. package/lib/common/lock.sh +40 -0
  4. package/lib/common/profile.sh +33 -0
  5. package/lib/common/recipe.sh +56 -43
  6. package/lib/diff.sh +64 -0
  7. package/lib/doctor.sh +81 -7
  8. package/lib/init.sh +167 -52
  9. package/lib/uninstall.sh +212 -0
  10. package/lib/update.sh +34 -0
  11. package/package.json +2 -2
  12. package/payload/artifact/targets.list +30 -0
  13. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  14. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -0
  15. package/payload/canon-kit/README.md +2 -0
  16. package/payload/canon-kit/SPEC.md +666 -59
  17. package/payload/canon-kit/checks/check-amendment-queue.sh +1 -0
  18. package/payload/canon-kit/checks/check-comment-tier.gate +3 -0
  19. package/payload/canon-kit/checks/check-deprecation-task.gate +3 -0
  20. package/payload/canon-kit/checks/check-docs-cmd.gate +3 -0
  21. package/payload/canon-kit/checks/check-docs-link-convention.sh +12 -4
  22. package/payload/canon-kit/checks/check-install-claim.gate +3 -0
  23. package/payload/canon-kit/checks/check-knob-citation.gate +3 -0
  24. package/payload/canon-kit/checks/check-knob-default-coupling.sh +1 -0
  25. package/payload/canon-kit/checks/check-manifest-count.gate +3 -0
  26. package/payload/canon-kit/checks/check-manifest-temporal.gate +3 -0
  27. package/payload/canon-kit/checks/check-md-refs.gate +3 -0
  28. package/payload/canon-kit/checks/check-measured-claim.gate +3 -0
  29. package/payload/canon-kit/checks/check-payload-claim.gate +3 -0
  30. package/payload/canon-kit/checks/check-prose-enum.gate +3 -0
  31. package/payload/canon-kit/checks/check-prose-tells.sh +1 -0
  32. package/payload/canon-kit/checks/check-spec-derivable-section.gate +3 -0
  33. package/payload/canon-kit/checks/check-spec-dod-singleton.gate +3 -0
  34. package/payload/canon-kit/checks/check-spec-embedded-source.sh +1 -0
  35. package/payload/canon-kit/checks/check-spec-fence-balance.gate +3 -0
  36. package/payload/canon-kit/checks/check-spec-pointer.gate +3 -0
  37. package/payload/canon-kit/checks/check-surface-duplication.sh +1 -0
  38. package/payload/canon-kit/checks/check-todo-task-liveness.gate +3 -0
  39. package/payload/canon-kit/checks/check-tracking-claim.gate +3 -0
  40. package/payload/canon-kit/gate-tests/check-comment-tier/bad/.workflow/fixture-state.txt +4 -0
  41. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.gate +4 -0
  42. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.rs +5 -0
  43. package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +4 -0
  44. package/payload/canon-kit/gate-tests/check-comment-tier/bad/templates/bad-tmpl.sh +4 -0
  45. package/payload/canon-kit/gate-tests/check-comment-tier/good/.workflow/fixture-state.txt +3 -0
  46. package/payload/canon-kit/gate-tests/check-comment-tier/good/expect.txt +1 -1
  47. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.gate +4 -0
  48. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.rs +5 -0
  49. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
  50. package/payload/canon-kit/gate-tests/check-comment-tier/good/templates/good-tmpl.sh +5 -0
  51. package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +29 -5
  52. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/.workflow/fixture-state.txt +3 -0
  53. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.gate +2 -0
  54. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.rs +4 -0
  55. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/expect.txt +3 -0
  56. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +6 -5
  57. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/templates/tmpl.sh +5 -0
  58. package/payload/canon-kit/gate-tests/check-deprecation-task/good/.workflow/fixture-state.txt +3 -0
  59. package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -1
  60. package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.gate +2 -0
  61. package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.rs +4 -0
  62. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +6 -5
  63. package/payload/canon-kit/gate-tests/check-deprecation-task/good/templates/tmpl.sh +5 -0
  64. package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +4 -3
  65. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/OUTSIDE.md +4 -0
  66. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/docs/index.md +3 -0
  67. package/payload/canon-kit/gate-tests/check-docs-link-convention/good/OUTSIDE.md +4 -0
  68. package/payload/canon-kit/gate-tests/check-docs-link-convention/good/docs/methodology.md +8 -0
  69. package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +94 -0
  70. package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +2 -2
  71. package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +4 -0
  72. package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +32 -8
  73. package/payload/canon-kit/gate-tests/check-md-refs.test.sh +61 -9
  74. package/payload/canon-kit/gate-tests/check-measured-claim/bad/SPEC.md +12 -0
  75. package/payload/canon-kit/gate-tests/check-measured-claim/bad/expect.txt +3 -0
  76. package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.sh +6 -0
  77. package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +23 -0
  78. package/payload/canon-kit/gate-tests/check-measured-claim/good/expect.txt +1 -0
  79. package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.sh +6 -0
  80. package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +90 -0
  81. package/payload/canon-kit/gate-tests/check-payload-claim/bad/README.md +15 -0
  82. package/payload/canon-kit/gate-tests/check-payload-claim/bad/expect.txt +2 -0
  83. package/payload/canon-kit/gate-tests/check-payload-claim/bad/install.md +19 -0
  84. package/payload/canon-kit/gate-tests/check-payload-claim/bad/posts/note.md +6 -0
  85. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.sh +8 -0
  86. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/payload-claims.sh +7 -0
  87. package/payload/canon-kit/gate-tests/check-payload-claim/good/README.md +15 -0
  88. package/payload/canon-kit/gate-tests/check-payload-claim/good/expect.txt +2 -0
  89. package/payload/canon-kit/gate-tests/check-payload-claim/good/install.md +20 -0
  90. package/payload/canon-kit/gate-tests/check-payload-claim/good/posts/note.md +6 -0
  91. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.sh +8 -0
  92. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/payload-claims.sh +7 -0
  93. package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +27 -4
  94. package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +21 -7
  95. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/.workflow/fixture-state.txt +2 -0
  96. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.gate +2 -0
  97. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.rs +4 -0
  98. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +4 -0
  99. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/templates/tmpl.sh +5 -0
  100. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/widget.sh +1 -0
  101. package/payload/canon-kit/gate-tests/check-spec-pointer/good/.workflow/fixture-state.txt +2 -0
  102. package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -1
  103. package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.gate +2 -0
  104. package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.rs +4 -0
  105. package/payload/canon-kit/gate-tests/check-spec-pointer/good/templates/tmpl.sh +5 -0
  106. package/payload/canon-kit/gate-tests/check-spec-pointer/good/widget.sh +1 -0
  107. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/.workflow/fixture-state.txt +3 -0
  108. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.gate +2 -0
  109. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.rs +4 -0
  110. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/expect.txt +3 -0
  111. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/templates/tmpl.sh +5 -0
  112. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/.workflow/fixture-state.txt +3 -0
  113. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/expect.txt +1 -1
  114. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.gate +2 -0
  115. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.rs +4 -0
  116. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/templates/tmpl.sh +5 -0
  117. package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +1 -2
  118. package/payload/canon-kit/lib/spec.sh +109 -70
  119. package/payload/canon-kit/smoke/install.sh +21 -1
  120. package/payload/canon-kit/templates/SPEC-amendment.md +9 -2
  121. package/payload/context-kit/README.md +4 -1
  122. package/payload/context-kit/SPEC.md +166 -9
  123. package/payload/context-kit/bin/env-probe.sh +19 -6
  124. package/payload/context-kit/checks/check-brevity.sh +1 -0
  125. package/payload/context-kit/checks/check-footprint-fresh.sh +1 -0
  126. package/payload/context-kit/checks/check-memory-off.sh +1 -0
  127. package/payload/context-kit/checks/check-settings-paths.sh +94 -0
  128. package/payload/context-kit/checks/check-settings-pins.sh +1 -0
  129. package/payload/context-kit/gate-tests/check-settings-paths/bad/args +1 -0
  130. package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +3 -0
  131. package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +12 -0
  132. package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/real-tool.sh +4 -0
  133. package/payload/context-kit/gate-tests/check-settings-paths/good/args +1 -0
  134. package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +1 -0
  135. package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +16 -0
  136. package/payload/context-kit/gate-tests/check-settings-paths/good/tools/real-tool.sh +4 -0
  137. package/payload/context-kit/index-tests/expected/toolfloor.txt +9 -0
  138. package/payload/context-kit/index-tests/toolfloor-cases.sh +20 -0
  139. package/payload/context-kit/lib/toolfloor.sh +15 -4
  140. package/payload/context-kit/smoke/agents-md.sh +12 -1
  141. package/payload/context-kit/smoke/install.sh +4 -1
  142. package/payload/delegation-kit/README.md +3 -3
  143. package/payload/delegation-kit/SPEC.md +499 -26
  144. package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +97 -0
  145. package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +1 -0
  146. package/payload/delegation-kit/checks/check-gate-tamper.sh +2 -1
  147. package/payload/delegation-kit/checks/check-rule-citation.sh +1 -0
  148. package/payload/delegation-kit/lib/delegation.sh +1 -0
  149. package/payload/delegation-kit/smoke/install.sh +2 -1
  150. package/payload/delegation-kit/templates/agent-dispatch-guard.sh +61 -0
  151. package/payload/delegation-kit/templates/agent-execution.md +127 -12
  152. package/payload/delegation-kit/templates/delegation-config.sh +4 -0
  153. package/payload/delegation-kit/templates/dispatch-checklists.md +1 -1
  154. package/payload/delegation-kit/templates/statusline-usage.sh +23 -1
  155. package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +30 -0
  156. package/payload/doctrine-kit/DOCTRINE.md +112 -11
  157. package/payload/doctrine-kit/README.md +12 -3
  158. package/payload/doctrine-kit/SPEC.md +163 -11
  159. package/payload/doctrine-kit/bin/install-doctrine.sh +167 -17
  160. package/payload/doctrine-kit/checks/check-doctrine-registration.sh +41 -11
  161. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/DOCTRINE.md +3 -0
  162. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/DOCTRINE.md +3 -0
  163. package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +82 -2
  164. package/payload/doctrine-kit/smoke/install.sh +167 -1
  165. package/payload/drift-kit/README.md +3 -2
  166. package/payload/drift-kit/SPEC.md +264 -22
  167. package/payload/drift-kit/bin/kfric.sh +21 -2
  168. package/payload/drift-kit/bin/stage-economics.sh +157 -3
  169. package/payload/drift-kit/kpis/kpi-incident-recurrence.sh +42 -0
  170. package/payload/drift-kit/smoke/install.sh +183 -1
  171. package/payload/drift-kit/templates/economics.md +9 -0
  172. package/payload/drift-kit/templates/kpis.list +6 -1
  173. package/payload/evidence-kit/README.md +20 -6
  174. package/payload/evidence-kit/SPEC.md +355 -17
  175. package/payload/evidence-kit/bin/run-validate.sh +51 -9
  176. package/payload/evidence-kit/checks/check-battery-roster.sh +87 -0
  177. package/payload/evidence-kit/checks/check-evidence-baseline.sh +1 -0
  178. package/payload/evidence-kit/checks/check-evidence-manifest.sh +1 -0
  179. package/payload/evidence-kit/checks/check-producer-liveness.sh +35 -0
  180. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/args +1 -0
  181. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/expect.txt +1 -0
  182. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/runner.md +14 -0
  183. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.sh +7 -0
  184. package/payload/evidence-kit/gate-tests/check-battery-roster/good/args +1 -0
  185. package/payload/evidence-kit/gate-tests/check-battery-roster/good/expect.txt +1 -0
  186. package/payload/evidence-kit/gate-tests/check-battery-roster/good/runner.md +14 -0
  187. package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.sh +7 -0
  188. package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +68 -0
  189. package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/args +1 -0
  190. package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/expect.txt +1 -0
  191. package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/run-validate.lock +1 -0
  192. package/payload/evidence-kit/gate-tests/check-producer-liveness/good/args +1 -0
  193. package/payload/evidence-kit/gate-tests/check-producer-liveness/good/expect.txt +2 -0
  194. package/payload/evidence-kit/gate-tests/check-producer-liveness/good/run-validate.lock +1 -0
  195. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +109 -0
  196. package/payload/evidence-kit/lib/evidence.sh +18 -0
  197. package/payload/evidence-kit/smoke/install.sh +17 -3
  198. package/payload/gate-sdk/README.md +17 -1
  199. package/payload/gate-sdk/SPEC.md +4427 -92
  200. package/payload/gate-sdk/bin/build-native.sh +38 -0
  201. package/payload/gate-sdk/bin/enforcement-map.sh +2 -1
  202. package/payload/gate-sdk/bin/gen-pre-commit.sh +32 -2
  203. package/payload/gate-sdk/bin/port-blockers.sh +445 -0
  204. package/payload/gate-sdk/bin/run-consumer-smoke.sh +129 -2
  205. package/payload/gate-sdk/bin/run-gate-tests.sh +61 -9
  206. package/payload/gate-sdk/bin/run-gates.sh +37 -2
  207. package/payload/gate-sdk/bin/upgrade-smoke.sh +55 -7
  208. package/payload/gate-sdk/checks/check-action-gh-repo.gate +3 -0
  209. package/payload/gate-sdk/checks/check-action-pinning.gate +3 -0
  210. package/payload/gate-sdk/checks/check-action-run-shell.sh +4 -1
  211. package/payload/gate-sdk/checks/check-assertion-strength.gate +3 -0
  212. package/payload/gate-sdk/checks/check-commit-msg.sh +1 -0
  213. package/payload/gate-sdk/checks/check-commit-subject.sh +1 -0
  214. package/payload/gate-sdk/checks/check-core-files.sh +28 -4
  215. package/payload/gate-sdk/checks/check-crate-arms.sh +61 -0
  216. package/payload/gate-sdk/checks/check-enforcement-fresh.sh +1 -0
  217. package/payload/gate-sdk/checks/check-exec-bit.sh +21 -1
  218. package/payload/gate-sdk/checks/check-gate-assertions.sh +31 -6
  219. package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +107 -0
  220. package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +7 -7
  221. package/payload/gate-sdk/checks/check-gate-fail-closed.sh +1 -0
  222. package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +1 -0
  223. package/payload/gate-sdk/checks/check-gate-output.sh +41 -3
  224. package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +333 -0
  225. package/payload/gate-sdk/checks/check-graph.sh +5 -5
  226. package/payload/gate-sdk/checks/check-hook-exec-bit.sh +1 -0
  227. package/payload/gate-sdk/checks/check-identity.sh +1 -0
  228. package/payload/gate-sdk/checks/check-install-disposition.sh +92 -0
  229. package/payload/gate-sdk/checks/check-kit-enum.sh +1 -0
  230. package/payload/gate-sdk/checks/check-kit-registration.gate +3 -0
  231. package/payload/gate-sdk/checks/check-readme-roster.sh +6 -0
  232. package/payload/gate-sdk/checks/check-reads-couples.sh +71 -21
  233. package/payload/gate-sdk/checks/check-root-tiering.sh +1 -0
  234. package/payload/gate-sdk/checks/check-shellcheck.sh +1 -0
  235. package/payload/gate-sdk/checks/check-smoke-entry-guard.gate +3 -0
  236. package/payload/gate-sdk/checks/check-template-copy-parity.sh +1 -0
  237. package/payload/gate-sdk/checks/check-template-registry-parity.gate +3 -0
  238. package/payload/gate-sdk/checks/check-test-hermetic.gate +3 -0
  239. package/payload/gate-sdk/checks/check-tree-terms.sh +1 -0
  240. package/payload/gate-sdk/checks/check-workflow-tiering.sh +2 -1
  241. package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +16 -1
  242. package/payload/gate-sdk/gate-tests/check-core-files.test.sh +64 -0
  243. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/Cargo.toml +7 -0
  244. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/src/lib.rs +12 -0
  245. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/expect.txt +5 -0
  246. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.sh +2 -0
  247. package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/Cargo.toml +7 -0
  248. package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/src/lib.rs +11 -0
  249. package/payload/gate-sdk/gate-tests/check-crate-arms/good/expect.txt +2 -0
  250. package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.sh +2 -0
  251. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -1
  252. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/args +2 -0
  253. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/expect.txt +5 -0
  254. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/kitroot/checks/check-vendored.gate +2 -0
  255. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/check-ported.gate +2 -0
  256. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.sh +2 -0
  257. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gates.list +4 -0
  258. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stamp.txt +1 -0
  259. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stub-bin +6 -0
  260. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/args +2 -0
  261. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/expect.txt +5 -0
  262. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/kitroot/checks/check-vendored.gate +2 -0
  263. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/check-ported.gate +2 -0
  264. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.sh +2 -0
  265. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gates.list +4 -0
  266. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stamp.txt +1 -0
  267. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stub-bin +5 -0
  268. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +81 -0
  269. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +3 -1
  270. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +3 -1
  271. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/gates/check-sample.sh +3 -1
  272. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +1 -0
  273. package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-native-sample.gate +3 -0
  274. package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-sample.sh +1 -0
  275. package/payload/gate-sdk/gate-tests/check-gate-output/bad/expect.txt +3 -0
  276. package/payload/gate-sdk/gate-tests/check-gate-output/bad/gates.list +1 -0
  277. package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/Cargo.toml +4 -0
  278. package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/src/gates/native_sample.rs +7 -0
  279. package/payload/gate-sdk/gate-tests/check-gate-output/good/check-native-sample.gate +3 -0
  280. package/payload/gate-sdk/gate-tests/check-gate-output/good/check-sample.sh +1 -0
  281. package/payload/gate-sdk/gate-tests/check-gate-output/good/expect.txt +1 -0
  282. package/payload/gate-sdk/gate-tests/check-gate-output/good/gates.list +1 -0
  283. package/payload/gate-sdk/gate-tests/check-gate-output/good/native/Cargo.toml +4 -0
  284. package/payload/gate-sdk/gate-tests/check-gate-output/good/native/src/gates/native_sample.rs +11 -0
  285. package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +111 -0
  286. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/args +2 -0
  287. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/conservation.md +7 -0
  288. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +12 -0
  289. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/impl/gate.rs +2 -0
  290. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kitroot/check-orphan.rs +3 -0
  291. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/publish.yml +15 -0
  292. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +3 -0
  293. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.gate +1 -0
  294. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.sh +3 -0
  295. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +1 -0
  296. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.sh +6 -0
  297. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +3 -0
  298. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/stub-bin +3 -0
  299. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/targets.list +3 -0
  300. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/args +2 -0
  301. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/conservation.md +8 -0
  302. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +7 -0
  303. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/impl/gate.rs +2 -0
  304. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/kitroot/check-other.rs +3 -0
  305. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/publish.yml +15 -0
  306. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +3 -0
  307. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-ported.gate +2 -0
  308. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.sh +6 -0
  309. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +2 -0
  310. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/stub-bin +3 -0
  311. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/targets.list +2 -0
  312. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +184 -0
  313. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-alpha.sh +6 -0
  314. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-delta.sh +5 -0
  315. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-epsilon.sh +6 -0
  316. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/smoke/install.sh +7 -0
  317. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/args +6 -0
  318. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/expect.txt +1 -0
  319. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/installer/lib/common/recipe.sh +9 -0
  320. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/scripts/gate-sdk-config.sh +5 -0
  321. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-alpha.sh +6 -0
  322. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-beta.gate +3 -0
  323. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-gamma.sh +6 -0
  324. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/smoke/install.sh +8 -0
  325. package/payload/gate-sdk/gate-tests/check-install-disposition/good/args +6 -0
  326. package/payload/gate-sdk/gate-tests/check-install-disposition/good/expect.txt +1 -0
  327. package/payload/gate-sdk/gate-tests/check-install-disposition/good/installer/lib/common/recipe.sh +10 -0
  328. package/payload/gate-sdk/gate-tests/check-install-disposition/good/scripts/gate-sdk-config.sh +5 -0
  329. package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +6 -5
  330. package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +139 -0
  331. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/templates/widgets.list +4 -0
  332. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-one.sh +3 -0
  333. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-two.sh +3 -0
  334. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/args +4 -0
  335. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/expect.txt +1 -0
  336. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/scripts/gate-sdk-config.sh +5 -0
  337. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/templates/widgets.list +4 -0
  338. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-one.sh +3 -0
  339. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-two.sh +3 -0
  340. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/args +8 -0
  341. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/rules.list +5 -0
  342. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/table.tsv +4 -0
  343. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/expect.txt +1 -0
  344. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.sh +5 -0
  345. package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +2 -3
  346. package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +4 -4
  347. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +151 -1
  348. package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +73 -0
  349. package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +144 -0
  350. package/payload/gate-sdk/lib/consumer-smoke.sh +41 -4
  351. package/payload/gate-sdk/lib/gate.sh +208 -9
  352. package/payload/gate-sdk/lib/inject.sh +46 -1
  353. package/payload/gate-sdk/lib/test-hermetic.sh +26 -0
  354. package/payload/gate-sdk/smoke/install.sh +61 -1
  355. package/payload/guard-kit/README.md +18 -14
  356. package/payload/guard-kit/SPEC.md +366 -72
  357. package/payload/guard-kit/bin/compare-settings-allow.sh +40 -7
  358. package/payload/guard-kit/bin/run-guard-tests.sh +1 -0
  359. package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +64 -0
  360. package/payload/guard-kit/gate-tests/guard-read-path.test.sh +52 -0
  361. package/payload/guard-kit/guard-tests/cases.tsv +49 -7
  362. package/payload/guard-kit/lib/guard.sh +277 -54
  363. package/payload/guard-kit/templates/close-triage.md +38 -10
  364. package/payload/guard-kit/templates/guard-config.sh +3 -0
  365. package/payload/guard-kit/templates/settings-hooks.json +7 -1
  366. package/payload/lifecycle-kit/README.md +12 -1
  367. package/payload/lifecycle-kit/SPEC.md +991 -41
  368. package/payload/lifecycle-kit/bin/cite-survey.sh +81 -0
  369. package/payload/lifecycle-kit/bin/enter-stage.sh +139 -13
  370. package/payload/lifecycle-kit/bin/file-gap.sh +60 -2
  371. package/payload/lifecycle-kit/bin/file-survey.sh +69 -0
  372. package/payload/lifecycle-kit/checks/check-close-surfaces.sh +1 -0
  373. package/payload/lifecycle-kit/checks/check-gap-inbox-neutrality.gate +3 -0
  374. package/payload/lifecycle-kit/checks/check-lesson-disposition.gate +3 -0
  375. package/payload/lifecycle-kit/checks/check-lifecycle-registration.gate +3 -0
  376. package/payload/lifecycle-kit/checks/check-merge-attrs.gate +3 -0
  377. package/payload/lifecycle-kit/checks/check-scratch-citation.gate +3 -0
  378. package/payload/lifecycle-kit/checks/check-shim-restatement.gate +3 -0
  379. package/payload/lifecycle-kit/checks/check-skill-binding.gate +3 -0
  380. package/payload/lifecycle-kit/checks/check-stage-entry.sh +1 -0
  381. package/payload/lifecycle-kit/checks/check-stage-evidence.gate +3 -0
  382. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +3 -0
  383. package/payload/lifecycle-kit/checks/check-survey-record.gate +3 -0
  384. package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +1 -2
  385. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/args +2 -0
  386. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/expect.txt +3 -0
  387. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/gap-inbox.md +5 -0
  388. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/args +2 -0
  389. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/expect.txt +1 -0
  390. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/gap-inbox.md +4 -0
  391. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +2 -3
  392. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +2 -3
  393. package/payload/lifecycle-kit/gate-tests/check-merge-attrs/bad/.gitattributes +1 -0
  394. package/payload/lifecycle-kit/gate-tests/check-merge-attrs/good/.gitattributes +1 -0
  395. package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +3 -3
  396. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/expect.txt +1 -0
  397. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.sh +4 -0
  398. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/surfaces/queue.md +13 -0
  399. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/expect.txt +1 -0
  400. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.sh +4 -0
  401. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/queue.md +31 -0
  402. package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +2 -3
  403. package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +2 -3
  404. package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +2 -3
  405. package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +9 -5
  406. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/args +2 -0
  407. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/expect.txt +4 -0
  408. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/record.md +18 -0
  409. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/args +2 -0
  410. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -0
  411. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +13 -0
  412. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +83 -0
  413. package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +122 -0
  414. package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +142 -0
  415. package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +102 -0
  416. package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +100 -0
  417. package/payload/lifecycle-kit/lib/stages.sh +12 -2
  418. package/payload/lifecycle-kit/smoke/install.sh +83 -4
  419. package/payload/lifecycle-kit/templates/consult.md +73 -0
  420. package/payload/lifecycle-kit/templates/lead.md +139 -7
  421. package/payload/lifecycle-kit/templates/stages/align.md +12 -0
  422. package/payload/lifecycle-kit/templates/stages/build.md +8 -0
  423. package/payload/lifecycle-kit/templates/stages/close.md +45 -5
  424. package/payload/lifecycle-kit/templates/stages/scope.md +42 -3
  425. package/payload/lifecycle-kit/templates/stages/spec.md +13 -1
  426. package/payload/lifecycle-kit/templates/stages/validate.md +8 -0
  427. package/payload/lifecycle-kit/templates/workflow-state-guard.sh +29 -0
  428. package/payload/queue-kit/README.md +6 -1
  429. package/payload/queue-kit/SPEC.md +350 -6
  430. package/payload/queue-kit/bin/queue-counts.sh +35 -0
  431. package/payload/queue-kit/bin/queue-edges.sh +78 -0
  432. package/payload/queue-kit/checks/check-queue-entry-budget.gate +3 -0
  433. package/payload/queue-kit/checks/check-queue-hygiene.gate +3 -0
  434. package/payload/queue-kit/checks/check-queue-prose-precondition.sh +1 -0
  435. package/payload/queue-kit/checks/check-queue-sections.gate +3 -0
  436. package/payload/queue-kit/checks/check-queue-slug-liveness.gate +3 -0
  437. package/payload/queue-kit/checks/check-queue-wrap.gate +3 -0
  438. package/payload/queue-kit/checks/check-roadmap-fresh.sh +1 -0
  439. package/payload/queue-kit/checks/check-tag-lead-line.gate +3 -0
  440. package/payload/queue-kit/checks/check-task-conservation.gate +4 -0
  441. package/payload/queue-kit/checks/check-task-names.gate +3 -0
  442. package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +5 -0
  443. package/payload/queue-kit/gate-tests/queue-counts.test.sh +116 -0
  444. package/payload/queue-kit/gate-tests/queue-edges.test.sh +130 -0
  445. package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +215 -0
  446. package/payload/queue-kit/lib/queue.sh +4 -19
  447. package/payload/queue-kit/smoke/install.sh +4 -1
  448. package/payload/queue-kit/templates/TASK-QUEUE.md +3 -0
  449. package/payload/site-kit/SPEC.md +64 -27
  450. package/payload/site-kit/checks/check-docs-cname-parity.sh +1 -0
  451. package/payload/site-kit/checks/check-docs-render-fidelity.sh +1 -0
  452. package/payload/site-kit/smoke/install.sh +9 -1
  453. package/profiles.list +36 -8
  454. package/payload/canon-kit/checks/check-comment-tier.sh +0 -211
  455. package/payload/canon-kit/checks/check-deprecation-task.sh +0 -90
  456. package/payload/canon-kit/checks/check-docs-cmd.sh +0 -153
  457. package/payload/canon-kit/checks/check-install-claim.sh +0 -146
  458. package/payload/canon-kit/checks/check-knob-citation.sh +0 -117
  459. package/payload/canon-kit/checks/check-manifest-count.sh +0 -46
  460. package/payload/canon-kit/checks/check-manifest-temporal.sh +0 -83
  461. package/payload/canon-kit/checks/check-md-refs.sh +0 -128
  462. package/payload/canon-kit/checks/check-prose-enum.sh +0 -115
  463. package/payload/canon-kit/checks/check-spec-derivable-section.sh +0 -69
  464. package/payload/canon-kit/checks/check-spec-dod-singleton.sh +0 -45
  465. package/payload/canon-kit/checks/check-spec-fence-balance.sh +0 -42
  466. package/payload/canon-kit/checks/check-spec-pointer.sh +0 -180
  467. package/payload/canon-kit/checks/check-todo-task-liveness.sh +0 -80
  468. package/payload/canon-kit/checks/check-tracking-claim.sh +0 -136
  469. package/payload/gate-sdk/checks/check-action-gh-repo.sh +0 -321
  470. package/payload/gate-sdk/checks/check-action-pinning.sh +0 -55
  471. package/payload/gate-sdk/checks/check-assertion-strength.sh +0 -134
  472. package/payload/gate-sdk/checks/check-kit-registration.sh +0 -68
  473. package/payload/gate-sdk/checks/check-smoke-entry-guard.sh +0 -53
  474. package/payload/gate-sdk/checks/check-test-hermetic.sh +0 -119
  475. package/payload/lifecycle-kit/checks/check-lesson-disposition.sh +0 -98
  476. package/payload/lifecycle-kit/checks/check-lifecycle-registration.sh +0 -54
  477. package/payload/lifecycle-kit/checks/check-merge-attrs.sh +0 -69
  478. package/payload/lifecycle-kit/checks/check-shim-restatement.sh +0 -97
  479. package/payload/lifecycle-kit/checks/check-skill-binding.sh +0 -59
  480. package/payload/lifecycle-kit/checks/check-stage-evidence.sh +0 -81
  481. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.sh +0 -47
  482. package/payload/queue-kit/checks/check-queue-entry-budget.sh +0 -104
  483. package/payload/queue-kit/checks/check-queue-hygiene.sh +0 -81
  484. package/payload/queue-kit/checks/check-queue-sections.sh +0 -44
  485. package/payload/queue-kit/checks/check-queue-slug-liveness.sh +0 -63
  486. package/payload/queue-kit/checks/check-queue-wrap.sh +0 -56
  487. package/payload/queue-kit/checks/check-tag-lead-line.sh +0 -70
  488. package/payload/queue-kit/checks/check-task-conservation.sh +0 -50
  489. package/payload/queue-kit/checks/check-task-names.sh +0 -128
@@ -25,6 +25,7 @@ link — an application of the load-trigger residency rule to the doctrine itsel
25
25
  ground truth. One owner means one thing to keep true.
26
26
  *Enforced by:* the anti-restatement gate family — the comment-tier and
27
27
  manifest/prose gates in [canon-kit/SPEC.md](../canon-kit/SPEC.md).
28
+ *Digest:* one content tier per surface; point, never restate.
28
29
 
29
30
  2. **Enforcement-first.** On any fix or redundancy finding, name the defect
30
31
  class *and* the mechanism that catches it, and land both in one unit; a green
@@ -57,6 +58,7 @@ link — an application of the load-trigger residency rule to the doctrine itsel
57
58
  a gate is the only carrier of intent that survives a fresh context window.
58
59
  *Enforced by:* the meta-gate contracts every gate must satisfy —
59
60
  [gate-sdk/SPEC.md](../gate-sdk/SPEC.md).
61
+ *Digest:* the fix and the gate that catches it land in one unit; removing the duplication outranks gating it.
60
62
 
61
63
  3. **De-literalization.** Prose cites names; code or the owning SPEC owns values.
62
64
  Knob defaults, shared constants, and derivable rosters are stated once at
@@ -83,6 +85,7 @@ link — an application of the load-trigger residency rule to the doctrine itsel
83
85
  `internal-identifier-restatement` seed member of the close-stage audit
84
86
  roster (`.workflow/audit-roster.txt`), a stated authoring duty due on
85
87
  heavy-SPEC contract edits and at release prep.
88
+ *Digest:* prose cites names; code or the owning SPEC owns values.
86
89
 
87
90
  4. **Derivation-first.** A fact a tool can derive from the tree is derived at
88
91
  use time, never maintained as its own surface. The ladder: derive; else
@@ -104,6 +107,7 @@ link — an application of the load-trigger residency rule to the doctrine itsel
104
107
  [gate-sdk/SPEC.md](../gate-sdk/SPEC.md) §check-graph, and the
105
108
  bare-cardinal gate in [canon-kit/SPEC.md](../canon-kit/SPEC.md)
106
109
  §check-manifest-count.
110
+ *Digest:* derive the derivable (a roster, a count), never maintain it; a needed copy is generated and freshness-gated.
107
111
 
108
112
  5. **Always-loaded shape.** A rule in the always-loaded agent file is one line —
109
113
  the convention plus a pointer; its mechanism, rosters, and defaults live
@@ -113,6 +117,7 @@ link — an application of the load-trigger residency rule to the doctrine itsel
113
117
  task; a one-line pointer pays once and loads the detail only when needed.
114
118
  *Enforced by:* the brevity budget in
115
119
  [context-kit/SPEC.md](../context-kit/SPEC.md) §The brevity gate.
120
+ *Digest:* one line per rule here; the mechanism behind the pointer.
116
121
 
117
122
  6. **Load-trigger residency.** The always-loaded file earns a rule only when no
118
123
  stage, skill, or tool-call trigger exists to load it; anything a trigger can
@@ -124,6 +129,7 @@ link — an application of the load-trigger residency rule to the doctrine itsel
124
129
  [lifecycle-kit/SPEC.md](../lifecycle-kit/SPEC.md) and the tool-call hook seam in
125
130
  [guard-kit/SPEC.md](../guard-kit/SPEC.md), which give every triggered rule a home
126
131
  that loads on demand.
132
+ *Digest:* resident only when no stage, skill, or tool loads it.
127
133
 
128
134
  7. **Widest-true-tier placement.** A fact lands at the widest tier where it holds
129
135
  for every reader of that tier: kit-shipped surface when true for every
@@ -136,6 +142,7 @@ link — an application of the load-trigger residency rule to the doctrine itsel
136
142
  *Enforced by:* the binding-slot grammar in
137
143
  [lifecycle-kit/SPEC.md](../lifecycle-kit/SPEC.md) §check-skill-binding, the seam
138
144
  marker between kit-shipped and consumer-tracked tiers.
145
+ *Digest:* the widest tier true for every reader of it.
139
146
 
140
147
  8. **Oracle-first.** A check's output is its interface: run the gate instead of
141
148
  emulating it, and treat a red run — including a red commit attempt, where the
@@ -160,6 +167,7 @@ link — an application of the load-trigger residency rule to the doctrine itsel
160
167
  [gate-sdk/SPEC.md](../gate-sdk/SPEC.md) — the `clean` and `help:` lines are
161
168
  written to be that interface — and the targeted-run resolver reachable through
162
169
  the generated hook.
170
+ *Digest:* run the gate, never emulate it; a red run is the feedback channel.
163
171
 
164
172
  9. **Spec-over-precedent.** A gate-enforced doc is ground truth: read the
165
173
  owner, never mine git history or a prior session's artifacts for how to do
@@ -176,6 +184,7 @@ link — an application of the load-trigger residency rule to the doctrine itsel
176
184
  a fact with no owner gets one, shrinking the space where history is the
177
185
  only oracle. No scanner sees *how* a session derived a choice; this rule
178
186
  is judgment with a capture mechanism, not a gate.
187
+ *Digest:* the owner doc is ground truth; history answers what happened, never what is correct.
179
188
 
180
189
  10. **Gap disposition.** A gap a session surfaces but will not close this
181
190
  session — a coverage hole, a design defect, an escaping class — is *costed*,
@@ -198,6 +207,7 @@ link — an application of the load-trigger residency rule to the doctrine itsel
198
207
  queue's Deferred section for design gaps and the knowledge-friction log
199
208
  ([drift-kit/SPEC.md](../drift-kit/SPEC.md) §The knowledge-friction loop) for
200
209
  fact gaps.
210
+ *Digest:* a gap you defer is costed and filed, never flagged-and-skipped.
201
211
 
202
212
  11. **Scope-gated intake.** Delivery work enters only through the scope gate. A
203
213
  new initiative raised mid-session — an operator or lead feature request, a
@@ -222,10 +232,48 @@ link — an application of the load-trigger residency rule to the doctrine itsel
222
232
  intake it names is scope's — the survey that bounds an iteration's units
223
233
  ([lifecycle-kit/SPEC.md](../lifecycle-kit/SPEC.md) §The state machine) — and the
224
234
  filed form rides the queue's Deferred section.
235
+ *Digest:* a mid-session initiative is filed as a costed Deferred entry by default, never started; work enters only through scope.
236
+
237
+ 12. **Probe-before-assertion.** A claim about the tree, the harness, or a tool's
238
+ behavior that one cheap command would settle is probed before it is
239
+ asserted, and what the probe returned travels with the claim. The bar is
240
+ *availability, not confidence*: a claim is unprobed if a command that would
241
+ have settled it was there to run and was not, however well-reasoned the
242
+ assertion. This is Oracle-first's design-time sibling and the two divide
243
+ cleanly — that rule governs the claim a gate already decides and says run the
244
+ gate; this one governs the claim made at scope, at spec, in a survey, or in a
245
+ dispatch, where no oracle is running and standing one up costs a grep. It
246
+ binds a *relayed* claim as hard as an authored one: forwarding an unverified
247
+ premise is asserting it, and the forwarder owns the probe the originator
248
+ skipped. It binds **outbound** claims too, and that reach does not follow
249
+ from the inward examples: proposing that the operator file a report, open an
250
+ issue, or escalate to a vendor asserts the thing is *unreported* — a claim
251
+ about the world the proposal presumes, and one search from settled. Attested:
252
+ a session drafted a complete vendor bug report and handed it over; the issue
253
+ was already documented upstream, with duplicates. The operator searched, the
254
+ session had not — and that same session had been corrected once that day for
255
+ relaying an unverified premise, so holding the general rule is what failed to
256
+ prevent the outbound instance. That is why the case is named here rather than
257
+ left to be derived from the rule.
258
+ *Under agent work:* an agent's prose reads identically whether it was
259
+ measured or inferred, so an unprobed premise enters the record
260
+ indistinguishable from a verified one and is inherited downstream as settled
261
+ fact. Each hand-off raises its apparent authority without adding evidence,
262
+ and the correction cost lands on whichever later session finally runs the
263
+ command — by which point the claim has shaped the work built on it.
264
+ *Enforced by:* judgment with a capture mechanism, not a gate — whether a
265
+ claim was probed is not machine-decidable (the Enforcement-first
266
+ false-positive carve-out, on Gap disposition's model). Its capture surfaces
267
+ are the survey record's witness discipline and the queue's practice of
268
+ dating premise corrections into entry bodies
269
+ ([lifecycle-kit/SPEC.md](../lifecycle-kit/SPEC.md) §The survey record);
270
+ `probe-before-assertion-doctrine` in the queue holds the open question of
271
+ whether any slice of the class is mechanizable.
272
+ *Digest:* a claim one cheap command would settle is probed before it is asserted; relaying an unverified premise is asserting it.
225
273
 
226
274
  ## Engineering-craft rules
227
275
 
228
- 12. **Spec-invariant test naming.** A test of a spec-mandated invariant encodes
276
+ 13. **Spec-invariant test naming.** A test of a spec-mandated invariant encodes
229
277
  that invariant in its *name*; the SPEC's test-requirement section owns which
230
278
  invariants a test must cover. A spec-clause *comment* on the test is not a
231
279
  substitute — it duplicates what the name should carry and rots silently when
@@ -239,7 +287,7 @@ link — an application of the load-trigger residency rule to the doctrine itsel
239
287
  carry the invariant.
240
288
  *Stages:* build, validate
241
289
 
242
- 13. **Test from the real consumer's runtime.** Verify a contract from the runtime
290
+ 14. **Test from the real consumer's runtime.** Verify a contract from the runtime
243
291
  of its real consumer, never a more lenient stand-in; a failure at a higher
244
292
  test layer with no failing test at the layer below is a coverage gap in the
245
293
  lower layer, closed there first.
@@ -252,7 +300,7 @@ link — an application of the load-trigger residency rule to the doctrine itsel
252
300
  baseline turns a dropped layer into a red validate.
253
301
  *Stages:* build, validate
254
302
 
255
- 14. **Inspectable-run discipline.** A component a test or an automation spawns
303
+ 15. **Inspectable-run discipline.** A component a test or an automation spawns
256
304
  must emit a readable log to an inspectable path — never a muted sink; on a
257
305
  failure, read that evidence before theorizing. A run you cannot inspect
258
306
  barely beats a guess.
@@ -265,7 +313,7 @@ link — an application of the load-trigger residency rule to the doctrine itsel
265
313
  trusting its self-report.
266
314
  *Stages:* build, validate
267
315
 
268
- 15. **Rename is a full-surface sweep.** A rename sweeps every surface in
316
+ 16. **Rename is a full-surface sweep.** A rename sweeps every surface in
269
317
  lockstep — prose, fixtures, and docs, not only the compiler-checked
270
318
  identifiers; the done-gate is a text-level completeness check, not the
271
319
  type-checker, and an in-progress rename is verified by a completeness scan
@@ -280,7 +328,7 @@ link — an application of the load-trigger residency rule to the doctrine itsel
280
328
  vocabulary stays with the consumer.
281
329
  *Stages:* build
282
330
 
283
- 16. **Config edits are merges, not rewrites.** Edit a config or settings file
331
+ 17. **Config edits are merges, not rewrites.** Edit a config or settings file
284
332
  with targeted, string-scoped edits, never a full-file write reconstructed
285
333
  from a partial read — a whole-file write built from part of the file
286
334
  silently drops everything the write did not carry. And validate an
@@ -297,7 +345,7 @@ link — an application of the load-trigger residency rule to the doctrine itsel
297
345
  gate asserts a given edit was a merge rather than a rewrite.
298
346
  *Stages:* build
299
347
 
300
- 17. **Re-verify volatile state before a git history rewrite.** Verify HEAD
348
+ 18. **Re-verify volatile state before a git history rewrite.** Verify HEAD
301
349
  (`git log --oneline -3`) before an amend or squash; after a `git reset
302
350
  --soft`, re-stage and verify the staged content (`git show :<path>`) before
303
351
  committing — the soft reset keeps the old index snapshot; write any `git
@@ -315,7 +363,7 @@ link — an application of the load-trigger residency rule to the doctrine itsel
315
363
  because each command is legitimate.
316
364
  *Stages:* build, close
317
365
 
318
- 18. **Entering another repo's tree, read its governance first.** A cross-repo
366
+ 19. **Entering another repo's tree, read its governance first.** A cross-repo
319
367
  edit re-reads that repo's agent file and README and checks its branch
320
368
  freshness every time — a second repo's model drifts independently of this
321
369
  one's, so a remembered version of its rules is a stale premise.
@@ -327,7 +375,7 @@ link — an application of the load-trigger residency rule to the doctrine itsel
327
375
  governance was reread.
328
376
  *Stages:* build
329
377
 
330
- 19. **Naming: drop the qualifier the context supplies — only when every consumer
378
+ 20. **Naming: drop the qualifier the context supplies — only when every consumer
331
379
  has that context.** A name that travels into a flat namespace keeps its
332
380
  qualifier; default to the shorter form and reject the vacuous one, but a
333
381
  name that loses the context which disambiguated it must carry the qualifier
@@ -342,7 +390,7 @@ link — an application of the load-trigger residency rule to the doctrine itsel
342
390
  is its written form.
343
391
  *Stages:* scope, build
344
392
 
345
- 20. **Reuse a co-located consumer's data before designing a new path.** For an
393
+ 21. **Reuse a co-located consumer's data before designing a new path.** For an
346
394
  embedded or co-located actor, first ask whether it can read a co-located
347
395
  consumer's already-fetched data before minting a new stream, grant, or
348
396
  fetch — a "which path" framing can hide a "no path needed" answer.
@@ -355,7 +403,7 @@ link — an application of the load-trigger residency rule to the doctrine itsel
355
403
  reaching for an existing owner before minting a second source.
356
404
  *Stages:* scope, build
357
405
 
358
- 21. **A resolver gate's flagged key is a fork, not a verdict.** A name-resolution
406
+ 22. **A resolver gate's flagged key is a fork, not a verdict.** A name-resolution
359
407
  gate that finds a silent drop has found either dead config to remove *or*
360
408
  promised-but-unwired config to build — one signature, opposite fixes; only
361
409
  the owning SPEC distinguishes them, so verify intent against the SPEC before
@@ -371,7 +419,7 @@ link — an application of the load-trigger residency rule to the doctrine itsel
371
419
  never which way it should be closed.
372
420
  *Stages:* build
373
421
 
374
- 22. **Quiet green, loud red.** A batch runner's success is one summary line
422
+ 23. **Quiet green, loud red.** A batch runner's success is one summary line
375
423
  carrying its scope counts (the count doubling as the roster-collapse
376
424
  tripwire); failure output is verbatim and never quiets. Per-item success
377
425
  banners are an opt-in reading, not the default — the red path is the
@@ -384,3 +432,56 @@ link — an application of the load-trigger residency rule to the doctrine itsel
384
432
  contract and the quiet-default run surfaces
385
433
  ([gate-sdk/SPEC.md](../gate-sdk/SPEC.md) §run-gates).
386
434
  *Stages:* build
435
+
436
+ 24. **An assertion reports the size of the set it ranged over.** A verification a
437
+ session writes — a scan, a probe, a predicate under edit — whose subject is a
438
+ set prints that set's size beside its verdict, because an exit code cannot
439
+ distinguish *asserted and held* from *asserted nothing*: both are zero
440
+ failures. The corollary governs the probe that proves an assertion bites — a
441
+ mutation is valid only against a target the assertion actually ranges over,
442
+ or it reports an empty red set and reads as a pass. *Quiet green, loud red*
443
+ puts that count on a batch runner's summary line; this is the same tripwire
444
+ one altitude down, for the one-off verification a session writes and reads
445
+ inside the session.
446
+ *Under agent work:* an agent writes the check and reads its verdict in one
447
+ motion, so the exit code is the only evidence it holds that the check bit —
448
+ and a predicate just rewritten (a regex carried between dialects, a path list
449
+ narrowed) fails by matching nothing, which is indistinguishable from success.
450
+ A printed count is the one signal that survives the rewrite.
451
+ *Enforced by:* judgment, over a class only partly mechanizable — stated
452
+ honestly rather than promised to a scanner. Shipped: the vacuous-pass
453
+ tripwire in [gate-sdk/SPEC.md](../gate-sdk/SPEC.md) §run-gates, and the
454
+ `good/`+`bad/` fixture pair every gate already owes
455
+ ([gate-sdk/SPEC.md](../gate-sdk/SPEC.md) §The gate model), which exercises a
456
+ predicate rather than trusting it. Buildable but unbuilt: a branch-coverage
457
+ assertion over a check's fixture corpus, for the arm that ships with no
458
+ fixture to run it. Unreachable: whether a session's mutation probe targeted
459
+ something its assertion ranges over is a property of a session act that
460
+ leaves no residue in the tree, so that third stays judgment.
461
+ *Stages:* build, validate
462
+
463
+ 25. **A third-party tool's behavior is a configuration question first.** Before
464
+ designing any mitigation around a tool you do not control, probe its
465
+ configuration surface and its issue tracker; a design question is what is
466
+ left after both come back empty. Repeated confirmation of a *behavior* is
467
+ evidence about the behavior and none at all about its *mutability*, so an
468
+ attestation count pushes confidence the wrong way — each re-confirmation
469
+ makes the mechanism feel settled and suppresses the config probe that would
470
+ retire it. The corollary reads the mitigation rather than the tool: a
471
+ workaround that keeps *growing* — more candidates, more unenforceable prose,
472
+ a hand payment per use — is itself evidence of solving the wrong problem,
473
+ because a correct fix converges and this shape accretes. When the workaround
474
+ outgrows the thing it works around, stop and re-probe the premise.
475
+ *Under agent work:* an agent inherits a prior session's symptom evidence as a
476
+ settled mechanism and designs against it, and symptom evidence accumulates
477
+ across sessions without any hand-off ever bearing on whether the symptom is
478
+ configurable — so the premise hardens exactly as the sessions that could
479
+ cheaply falsify it multiply.
480
+ *Enforced by:* judgment, not a gate, and for the reason Probe-before-assertion
481
+ states — whether a session probed a vendor's settings schema leaves no residue
482
+ in the tree. The two divide by *target*: that rule governs a claim about the
483
+ tree or the harness that a local command settles; this one governs a claim
484
+ about an external tool, where the probe leaves the tree entirely. Its capture
485
+ surface is the queue's design-pending tier, where a mitigation's growing
486
+ candidate list is the readable signal the corollary names.
487
+ *Stages:* scope, spec, build
@@ -13,12 +13,16 @@ doctrine upgrade. See [SPEC.md](SPEC.md#the-doctrine-deliverable) for why that
13
13
  reference-not-copy boundary is the mechanism.
14
14
 
15
15
  The installer — `bin/install-doctrine.sh` — inserts or replaces the reference
16
- block between fixed markers, idempotently. The gate —
16
+ block between fixed markers, idempotently. It does not carry the digest: each
17
+ bullet is derived from the summary its rule states in a `*Digest:*` trailer, so
18
+ the digest names every methodology rule by construction and a rule cannot land
19
+ in the doctrine but miss the block every consumer installs. The gate —
17
20
  `check-doctrine-registration` — holds the block honest: it asserts the
18
21
  always-loaded file carries the markdown link *and* keeps its methodology-rule
19
22
  digest in per-rule lockstep with the doctrine (each rule digested or declared
20
- trimmed, no digest bullet orphaned), and every engineering-craft rule carries a
21
- well-formed `*Stages:*` routing trailer, fail-closed when a scanned file or
23
+ trimmed, no digest bullet orphaned), and that each rule carries its one
24
+ well-formed per-rule trailer — `*Stages:*` routing on the craft register,
25
+ `*Digest:*` on the methodology register — fail-closed when a scanned file or
22
26
  heading is missing.
23
27
 
24
28
  The emitter — `bin/stage-rules.sh <stage>` — reads those trailers and prints the
@@ -62,6 +66,11 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
62
66
  inside the digest section. The gate holds the digest in per-rule lockstep with
63
67
  the doctrine modulo declared trims, so a silent omission stays red; point
64
68
  `DOCTRINE_KIT_DIGEST_SECTION` at your heading if it is not `## Delivery doctrine`.
69
+ The declaration survives the next run: the installer reads your block before it
70
+ rewrites it and carries each declared marker back into the trimmed rule's
71
+ position, so re-vendoring never restores a rule you removed. That is the only
72
+ customization it preserves — see
73
+ [SPEC.md](SPEC.md#install-doctrine) for the bound and the two findings it reports.
65
74
 
66
75
  ## Test
67
76
 
@@ -52,34 +52,172 @@ updated where it sits. A begin marker without its end is a malformed target: the
52
52
  installer refuses (exit 2) rather than guess the block bounds. The agent file
53
53
  must already exist — the installer edits an always-loaded file, it does not mint
54
54
  one — so a missing target is exit 2. The marker insert/replace itself is not
55
- this installer's code: it rides gate-sdk's shared `lib/inject.sh` helper
56
- (`inject_marker_block`), the single copy `lifecycle-kit`'s injector also uses;
57
- `install-doctrine.sh` supplies only the block content (the digest) on stdin.
55
+ this installer's code: it rides gate-sdk's shared `lib/inject.sh` helpers
56
+ (`inject_marker_block` to write, `read_marker_block` to read the block as it
57
+ stands), the single copy `lifecycle-kit`'s injector also uses;
58
+ `install-doctrine.sh` supplies the block content (the digest) on stdin and owns
59
+ every rule about what survives from one run to the next.
58
60
 
59
61
  The block is the always-loaded shape applied to the doctrine itself: a one-line
60
62
  digest of the methodology-maintenance rules plus a markdown link to the doctrine
61
63
  file. The engineering-craft register is not digested — it is load-triggered and
62
64
  reached through the link, so the always-loaded surface carries only what bears
63
- on every edit. The installer is the single source of the block text, so a manual
64
- insertion for a harness-less consumer copies what the tool would emit; the README
65
- documents that manual path. The installed digest names every methodology rule,
66
- so a fresh consumer is in per-rule lockstep out of the box (installer and gate
67
- agree on the `## Delivery doctrine` heading — that agreement is part of
65
+ on every edit. The installer is the single source of the block *text* — the
66
+ heading, the link paragraph, the bullet shape — so a manual insertion for a
67
+ harness-less consumer copies what the tool would emit; the README documents that
68
+ manual path. It is not the source of the block's *content*: the rule bullets are
69
+ derived from `DOCTRINE.md` (below), so the installed digest names every
70
+ methodology rule by construction rather than by an author remembering to, and a
71
+ fresh consumer is in per-rule lockstep out of the box (installer and gate agree
72
+ on the `## Delivery doctrine` heading — that agreement is part of
68
73
  check-doctrine-registration's contract). Trimming a rule the consumer does not
69
74
  keep resident stays legal, but rides a declared-trim marker rather than a silent
70
75
  deletion: the gate asserts name-lockstep modulo declared trims (§check-doctrine-registration
71
76
  assertion B).
72
77
 
78
+ **The digest is derived from the doctrine, one bullet per rule.** Each
79
+ methodology rule carries a `*Digest:* <one-line summary>` trailer, and the
80
+ installer emits that rule's bullet as `- **<name>** — <summary>`: the name read
81
+ exactly as §check-doctrine-registration assertion C reads it, the summary taken
82
+ from the trailer verbatim. The bullet roster is therefore the rule roster, and
83
+ the two cannot come to differ in count — the drift axis is removed rather than
84
+ watched, which is what Derivation-first asks for before Enforcement-first is
85
+ even consulted. A hand-maintained bullet list is what this replaces, and its
86
+ failure mode was not hypothetical: a rule that landed in `DOCTRINE.md` and in
87
+ this repo's own agent file never reached the installer's list, so every fresh
88
+ install vendored a digest one rule short while the consumer-side gate stayed
89
+ green — the skew is invisible from the tree that has both copies right.
90
+
91
+ *Why a trailer and not the rule's own prose.* The obvious cheaper design is to
92
+ extract the summary from the rule body's opening sentence and add no format at
93
+ all. It was measured rather than assumed, and it does not hold: of the twelve
94
+ bullets the digest shipped, **none** occurs as contiguous text anywhere in
95
+ `DOCTRINE.md`. The digest register is deliberately terser and more imperative
96
+ than the doctrine's statement register — the rule states the convention and its
97
+ scope, the bullet is what survives in a file read in full at every session start
98
+ — so extraction would either degrade the doctrine's own prose into digest
99
+ shorthand or invent a summary the author never wrote. The trailer is the
100
+ authoring surface that makes derivation honest: the summary is authored once,
101
+ beside the rule it summarizes, and read from there by everything that needs it.
102
+
103
+ **The derivation's refusals.** A rule carrying no `*Digest:*` trailer, or two,
104
+ leaves its bullet undecidable, and the installer exits 2 naming the rule rather
105
+ than emitting a digest silently short — the exact defect the derivation
106
+ replaced, so failing closed is the point rather than a courtesy. A missing
107
+ doctrine file and a methodology section that resolves to nothing are exit 2 on
108
+ the same ground: the digest cannot be certified against an unreadable rule set.
109
+ The derivation runs **once, at top level**, before the block is composed —
110
+ `digest()` is read through process substitution, where an exit would end only
111
+ the subshell and let the malformed doctrine through as a short digest, which is
112
+ the failure mode being guarded. §check-doctrine-registration assertion E is the
113
+ tree-side half of the same guard, so an untrailered rule reds at commit time
114
+ instead of waiting for a consumer install to discover it.
115
+
116
+ **What this asks of a consumer.** Nothing, for a consumer who re-vendors
117
+ `DOCTRINE.md` unchanged — the kit ships it, and its rules ship trailered. A
118
+ consumer who *appends a local rule* to their vendored copy now owes that rule a
119
+ `*Digest:*` trailer. That is a real obligation and worth stating rather than
120
+ claiming zero impact, but it replaces a larger one: assertion B already required
121
+ such a rule to be reflected in the digest, and the trailer is what makes its
122
+ bullet generate rather than have to be hand-written and kept in step.
123
+
124
+ **The declared-trim round-trip.** A generated block that is unconditionally
125
+ rewritten would revoke that right on the next run — and revoke it *silently*,
126
+ because a trim the installer restores to a bullet leaves an agent file whose
127
+ hash matches what the installer last recorded. So the run is read-compute-emit
128
+ rather than emit: `read_marker_block` returns the block as it stands, the
129
+ installer harvests every
130
+ `<!-- doctrine-digest-trim: <rule name> — <reason> -->` line out of it, and each
131
+ digest rule is emitted as **either** its bullet **or** — when that rule's name is
132
+ trimmed — the harvested marker line verbatim, **in the bullet's position**.
133
+ Substitution, not addition: a block carrying the trim *and* its bullet would
134
+ satisfy assertions B and C while handing the consumer back the rule they
135
+ removed, which is the customization defeated while appearing honored. In-place
136
+ rather than appended so the consumer's reason stays where the rule it answers
137
+ would have been; the gate accepts the marker anywhere in the digest section, so
138
+ readability decides. The rule names the substitution keys on are the digest's
139
+ own bullet names, read exactly as assertion C reads them — installer and gate
140
+ never disagree about which rule a marker names.
141
+
142
+ Four behaviors the round-trip fixes:
143
+
144
+ - **No trims declared → byte-identical output.** Load-bearing rather than
145
+ incidental: without it every consumer's agent file churns on every upgrade,
146
+ and the installer's caller starts reporting a file nobody edited.
147
+ - **A trim naming no rule in the current digest** — a rule renamed or dropped
148
+ upstream — is carried forward *and* reported. It has no bullet position to
149
+ take, so it is carried at the digest's end. Surfacing it at the re-vendor
150
+ moment is the declared-not-silent design working: that is the moment the
151
+ consumer's decision gets reconciled.
152
+ - **Duplicate trims for one rule** — the first is carried, the duplicate
153
+ dropped and reported. Silently collapsing them would be the same class of
154
+ quiet edit-loss one layer up.
155
+ - **The report has two channels, and the split is deliberate.** The standing
156
+ rule it instances: an installer a machine may drive puts **findings on
157
+ stderr** and narration on stdout, and stays silent on a clean run — stderr
158
+ chatter on success is how a channel gets ignored. So each finding above goes
159
+ to stderr, and the action line on stdout gains the count of trims carried and
160
+ a tally of those findings. What makes the rule binding here rather than merely
161
+ tidy is the caller class this script has: a vendoring installer whose own
162
+ stdout is a machine-read channel of seeded paths must discard this script's,
163
+ so stdout is exactly where a reconciliation the consumer owes would be lost.
164
+ The honest consequence is that under such a caller the count has no reader —
165
+ the carried trims are read from the commit that install makes — while every
166
+ finding still reaches whoever ran it.
167
+
168
+ **The honest bound.** The block is generated, and the declared trim is the only
169
+ customization preserved across a run. An unsanctioned edit *inside* the span — a
170
+ reworded bullet, an added line — is reverted by design, and would red
171
+ §check-doctrine-registration assertion C independently; everything *outside* the
172
+ markers is the adopter's and is never read or written. Stating the bound is what
173
+ makes the preserved case a contract rather than an accident.
174
+
175
+ **The removal mode.** `install-doctrine.sh --remove [agent-file]` is the insert
176
+ path reversed over the same marker pair, riding gate-sdk's `remove_marker_block`
177
+ exactly as the insert path rides its sibling — so the marker strings keep their
178
+ one writer and a caller reversing an installation needs no copy of them. It
179
+ harvests no trims and emits no digest: a removal has nothing to carry forward,
180
+ which is what makes it the reverse of the round-trip above rather than a second,
181
+ emptier pass through it — and, for the same reason, it reads no doctrine file
182
+ and so none of the derivation's refusals can arise on this path. An agent file
183
+ carrying **no block is not an error** —
184
+ the run says there was nothing to remove and exits 0, so a second `--remove` is
185
+ as quiet as the first and a caller that cannot know whether the block was ever
186
+ written there needs no way to ask. Its refusals are the two the insert path
187
+ holds before it reads any doctrine, unchanged and the only two on this path: a
188
+ missing agent file is exit 2, and a begin marker without its end is exit 2
189
+ rather than a guess at the block bounds. What it removes is the
190
+ reference block and nothing else — everything outside the markers is the
191
+ adopter's, on the same terms the honest bound above states for a rewrite.
192
+
193
+ The round-trip's acceptor is `smoke/install.sh`, per the coverage tier
194
+ gate-sdk/SPEC.md §lib/inject.sh sets for a sourced library with no gate surface:
195
+ it declares a trim in the block the installer just emitted, re-runs the
196
+ installer, and holds that the marker survived in the trimmed bullet's position,
197
+ that the bullet is gone, and that the gate is green across the re-run. The same
198
+ acceptor covers the removal mode on that tier and for that reason: it strips the
199
+ block, holds that a second `--remove` is an idempotent no-op, and reinstalls to
200
+ restore the baseline. It also drives the derivation's refusals, on the same tier
201
+ and for a further reason: a refusal is the installer's behavior rather than the
202
+ gate's, so no gate fixture can reach it. Pointed by the positional overrides at
203
+ a scratch doctrine whose second rule carries no `*Digest:*` trailer — and again
204
+ at one whose second rule carries two — it holds that the run exits 2, that the
205
+ message names the offending rule, and that the agent file is byte-unchanged.
206
+ That last assertion is the one worth having: an installer that refuses after
207
+ writing has failed closed in its exit status only.
208
+
73
209
  Positional overrides `install-doctrine.sh [agent-file [doctrine-file]]` let a
74
210
  smoke or a fixture point both paths at a scratch tree without touching consumer
75
211
  config; unset, they fall to the knob defaults.
76
212
 
77
213
  ## check-doctrine-registration
78
214
 
79
- Invariant, in four assertions: the configured agent file (A) carries a markdown
215
+ Invariant, in five assertions: the configured agent file (A) carries a markdown
80
216
  link to the configured doctrine file and (B, C) holds its methodology-rule digest
81
- in per-rule lockstep with the doctrine, and the doctrine's craft register (D)
82
- tags every rule with exactly one stage-routing trailer. The digest is the surface the
217
+ in per-rule lockstep with the doctrine, and the doctrine's two registers tag
218
+ every rule with exactly one per-rule trailer — the craft register with a
219
+ stage-routing trailer (D), the methodology register with the digest trailer its
220
+ bullet is generated from (E). The digest is the surface the
83
221
  always-loaded-shape rule requires, and a re-vendored `DOCTRINE.md` that adds or
84
222
  renames a methodology-maintenance rule staling every consumer's digest *by
85
223
  construction* — on the exact path the kit advertises as its upgrade story — is
@@ -120,6 +258,20 @@ already couples the agent file and the doctrine file).
120
258
  unasserted — doctrine-kit does not depend on lifecycle-kit's stage config, and
121
259
  the emitter's empty-output posture already covers an unknown stage; the gate
122
260
  holds only that the trailer is present and well-formed.
261
+ - **Assertion E (digest-trailer coverage).** Every numbered rule under the
262
+ doctrine's `## Methodology-maintenance rules` section carries exactly one
263
+ `*Digest:*` trailer with a non-empty value. This is D's sibling one register
264
+ over, and the sentence D is argued from transposes exactly: a re-vendored
265
+ `DOCTRINE.md` that adds an untrailered methodology rule reddens here instead of
266
+ silently dropping out of the digest the installer derives (§install-doctrine).
267
+ Zero trailers and two are both findings, for the reason they are on D — a rule
268
+ with two has no decidable bullet, and picking one silently is exactly the guess
269
+ a gate exists to refuse. The value is graded only for emptiness: what makes a
270
+ one-line summary *good* is not machine-decidable, and a check that pretended
271
+ otherwise would be the noisy gate the Enforcement-first carve-out warns
272
+ against. D and E run one walk over a register's numbered rules, parameterized
273
+ by the trailer name and by how its value is graded, so the two registers cannot
274
+ drift apart in how a rule is read.
123
275
 
124
276
  Section resolution fails closed. The digest section is the agent-file heading
125
277
  named by `DOCTRINE_KIT_DIGEST_SECTION` (Layout and configuration); a configured