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
@@ -79,6 +79,12 @@ design *ruling* is design work — it goes to the deferred section
79
79
  `[design-pending]` until scope rules on it. Enforced by
80
80
  `check-amendment-queue`.
81
81
 
82
+ An amendment file is **outside the governed manifest**: `CANON_KIT_MANIFEST_FILES`
83
+ globs `*/SPEC.md`, which `SPEC-<name>.md` does not match, so the prose and knob
84
+ gates never scan one. Their obligations attach at the merge rather than at the
85
+ amendment — an amendment may carry a citation or a knob mention that would red
86
+ once integrated, and §Merging an amendment step 2 is where that debt comes due.
87
+
82
88
  The tag is a **checksum on the promotion move**, not a second source of the
83
89
  state its section already carries. Its redundancy is the mechanism: a
84
90
  promotion crosses a section boundary *and* swaps the tag, so
@@ -103,7 +109,7 @@ so the litmus runs at filing time, in the scope skill's triage.
103
109
  ### The causal-completeness check
104
110
 
105
111
  Before an amendment is ready, every new state, event, and interface it
106
- introduces passes four points:
112
+ introduces passes five points:
107
113
 
108
114
  1. **Producer named and reachable** — what code path, call, or timer
109
115
  triggers it; a named producer whose enabling config no deployed
@@ -116,6 +122,18 @@ introduces passes four points:
116
122
  name the consumer that reads it and the transition where it is read; a
117
123
  field with no reader is removed, and a field read at one transition is
118
124
  not populated at others.
125
+ 5. **Each reader's red condition named, not merely its subject** — binding
126
+ on a delta that *narrows* a corpus (a prune, a tighter glob, a dropped
127
+ file). A reader is safe to clear **by inspection** under a narrowing only
128
+ if its verdict is monotone in the violation set, and three ordinary shapes
129
+ are not: a reader that reds on *finding none*, one asserting an exact
130
+ count, and one holding a minimum or a coverage floor. So enumerate what
131
+ makes each reader **red**, never what it is about, and inspect only the
132
+ monotone ones. Attested: pruning the file that held a declaration's sole
133
+ instance flips `check-install-claim` green to red, because its
134
+ red condition is a zero count — the narrowing *added* a violation.
135
+ "A narrower corpus can only remove violations" is false, and it is the
136
+ first argument a narrowing delta reaches for.
119
137
 
120
138
  A cross-component causal gap that surfaces during build is not a deferred
121
139
  TODO: stop, resolve it that session, update the spec before resuming.
@@ -132,10 +150,28 @@ supplies the checklist they invoke and the gate behind the promotion rule.
132
150
  embedded wire-delta becomes a citation to the now-existing contract
133
151
  file — the amendment's exemption is file-scoped, so once step 3 deletes
134
152
  the file `check-spec-embedded-source` re-arms and a kept embed goes red.
135
- 3. Delete the amendment file; verify none remain for the component.
153
+ 3. Delete the amendment file; verify none remain for the component. **The
154
+ none-remain half is discharged at the iteration, not at the commit** — with
155
+ sibling amendments in flight for one component, only the batch merging the
156
+ last of them can satisfy it, and the earlier batches' identical assertions are
157
+ unsatisfiable at their own commits. The horizon is the iteration because the
158
+ build stage stays resident until the queue empties and close refuses entry on
159
+ a non-empty active queue.
136
160
  4. Move the queue entry to `## Done`, dropping its `[spec:]` tag — the
137
161
  amendment it referenced is gone, and `check-amendment-queue` requires
138
162
  every `[spec:]` ref to resolve to a file on disk.
163
+ **Unless the entry outlives the amendment.** Where an entry's deliverable is a
164
+ *corpus* and the amendment delivered one **increment** of it, the terminal move
165
+ is a **demotion** rather than a Done move: drop the `[spec:]` tag and return the
166
+ entry to the deferred section under its design-pending tag, so the next
167
+ increment re-promotes with a fresh amendment. A Done move there asserts a
168
+ finished deliverable that is not finished. It also costs a second thing that is
169
+ easy to miss: a done entry is a bare slug, so **every** tag the entry carried
170
+ goes with it — including any tag a generated public projection reads, which
171
+ silently drops the item from that projection while the work remains outstanding.
172
+ This is the branch to state explicitly because it is the uncatchable one — the
173
+ Done-move contract has no gate behind either half, so the wrong terminal move
174
+ reds nothing and is found only by a later reader.
139
175
  5. Propagate removals (grep every spec for names the change retired), file
140
176
  discovered gaps as debt tasks, and commit the merge with the work.
141
177
 
@@ -163,7 +199,12 @@ own instance); the kit's rules are the topology itself:
163
199
  instead (`check-manifest-count` bans a bare cardinal quantifying a
164
200
  governed collection in a manifest — the collection is the count's owner).
165
201
  A literal stays verbatim only when load-bearing, and then only
166
- gate-coupled. A **user-facing** claim takes the same treatment when a reader
202
+ gate-coupled — and `check-measured-claim` is the mechanism that clause names:
203
+ a `measured:` marker binds the literal to an oracle the gate re-runs, which
204
+ turns a transcribed number into a generated, freshness-gated copy and is the
205
+ second remedy this bullet offers beside citing the owner. Prefer citing the
206
+ owner where the number need not be stated; mark it where a reader is served by
207
+ reading it. A **user-facing** claim takes the same treatment when a reader
167
208
  acts on it: `check-install-claim` gives the primary-install-path claim one
168
209
  declared owner and holds every governed install section to it, so the topology
169
210
  reaches beyond the internal facts the rules above are stated over.
@@ -208,8 +249,16 @@ gate-sdk) holds the brand-token side honest tree-wide: every slash- or
208
249
  line-anchored `<name>-kit` / `gate-sdk` path segment must name a
209
250
  `gate_kit_roots` dir, and every live-prefix kit knob must resolve to a tracked
210
251
  kit knob (check-docs-cmd's resolver, reused so the non-uniform knob-prefix map
211
- has one home). It valves the surfaces that legitimately name design-ahead or
212
- frozen brands — `gate-tests/` fixture bodies, `docs/posts/*`, the generated
252
+ has one home). **A knob resolves through a family stem in either direction**: a
253
+ scanned `<FAMILY>_` stem resolves when kit source defines any member under it,
254
+ and a scanned member resolves when kit source defines the stem. The second
255
+ direction is what a **dispatch-composed** knob name needs — gate-sdk's
256
+ `GATE_SDK_KNOB_<NAME>` bridge builds the full name at runtime from the knob it
257
+ is carrying (gate-sdk/SPEC.md §lib/gate.sh), so kit source contains the stem and
258
+ never the members. Spelling the members out to satisfy an exact match would be a
259
+ hardcoded roster of consumer knob names in a kit literal, which is the one shape
260
+ that crosses the provenance seam here. It valves the surfaces that legitimately
261
+ name design-ahead or frozen brands — `gate-tests/` fixture bodies, `docs/posts/*`, the generated
213
262
  trajectory data, `SPEC-*.md` amendments, and the queue — so a rename cannot
214
263
  leave a dangle without turning a gate red.
215
264
 
@@ -237,11 +286,12 @@ unset, and the loader exits 2 on a malformed config. Knobs:
237
286
  `CANON_KIT_DOD_MODE` — `exactly-one` (the default) or `at-most-one`
238
287
  (a reference-spec corpus like this repo's kits carries no DoD).
239
288
  - `CANON_KIT_SCAN_KIT_ROOTS` — `0` (default) or `1`. At `0` the shared finders
240
- skip vendored kit roots (`gate_kit_roots`): a kit's `SPEC.md`/`SPEC-*.md` is
241
- a dependency's documentation, not governed content, so the `exactly-one`
242
- default holds out of the box on a tree that merely vendored the kits beside
243
- gate-sdk. Set `1` when the kit SPECs are the consumer's own first-party
244
- content (this repo does, and keeps `at-most-one` for them).
289
+ skip vendored kit roots (`gate_kit_roots`): a kit's `SPEC.md`/`SPEC-*.md` and
290
+ its `README.md` alike are a dependency's documentation, not governed content,
291
+ so the `exactly-one` default holds out of the box on a tree that merely
292
+ vendored the kits beside gate-sdk and no consumer is asked to answer for a
293
+ dependency's own internal links. Set `1` when the kit docs are the consumer's
294
+ own first-party content (this repo does, and keeps `at-most-one` for them).
245
295
  - `CANON_KIT_BANNED_HEADINGS` — array, default
246
296
  `("Directory Structure" "Public API" "Cargo.toml Dependencies")`;
247
297
  `CANON_KIT_DERIVABLE_DENSITY` — default `60` (percent fenced);
@@ -268,7 +318,8 @@ unset, and the loader exits 2 on a malformed config. Knobs:
268
318
  This repo sets `("*/templates/*.md" ".claude/agents/*.md")`.
269
319
  `CANON_KIT_TEMPORAL_MARKERS` — the temporal-narration marker set scanned by
270
320
  `check-manifest-temporal`, default a generic-English list (`previously`,
271
- `formerly`, `renamed from`, …), matched case-insensitively;
321
+ `formerly`, `renamed from`, …), matched case-insensitively and extended
322
+ through `CANON_KIT_TEMPORAL_MARKERS_EXTRA` under the `_EXTRA` semantics below;
272
323
  `CANON_KIT_TEMPORAL_EXEMPT_SECTIONS` — array of heading names whose whole
273
324
  section is exempt, default empty (this repo sets `Out of scope`).
274
325
  - `CANON_KIT_MDREF_EXCLUDE` — array of globs, default empty: manifest-set docs
@@ -298,7 +349,33 @@ unset, and the loader exits 2 on a malformed config. Knobs:
298
349
  vocabulary is one project's distribution model, so no spelling of it ships as a
299
350
  kit literal (the provenance seam). This repo sets
300
351
  `bash scripts/install-transports.sh`, `^(Quick start|Install)`, and
301
- `("docs/posts/*")`.
352
+ `("docs/posts/*")`. `CANON_KIT_INSTALL_TRANSPORT_IDS` /
353
+ `CANON_KIT_INSTALL_TRANSPORT_PATTERNS` — the index-aligned halves of that
354
+ command's parsed output, default empty arrays, filled by this kit's library only
355
+ while one of the two is the knob under resolution; they are the bridged form the
356
+ compiled member reads and are not a consumer-authored knob (§lib/spec.sh).
357
+ - `CANON_KIT_PAYLOAD_CLAIMS_CMD` — a consumer command emitting the payload
358
+ disclosure classes `check-payload-claim` holds, one `<claim-id>`⇥`<ERE>` line
359
+ per class, default empty ⇒ clean skip (the correct posture for a tree whose
360
+ payload discloses one thing only). `CANON_KIT_PAYLOAD_CLAIM_EXCLUDE` — array
361
+ of globs dropped from that gate's scanned set on top of
362
+ `CANON_KIT_MDREF_EXCLUDE`, default empty. A spelling of what a payload
363
+ discloses is one project's distribution model, so it is consumer config for
364
+ the same provenance-seam reason the transport vocabulary above is. This repo
365
+ sets `bash scripts/payload-claims.sh` and `("docs/posts/*")`.
366
+ `CANON_KIT_PAYLOAD_CLAIM_IDS` / `CANON_KIT_PAYLOAD_CLAIM_PATTERNS` — that
367
+ command's parsed output in the same bridged, index-aligned shape as the
368
+ transport pair above, default empty arrays.
369
+ - `CANON_KIT_MEASURED_CLAIMS_CMD` — a consumer command emitting the oracle
370
+ `check-measured-claim` re-runs, one `<key>`⇥`<value>` line per measurable fact,
371
+ default empty ⇒ clean skip (no oracle, so no marker has anything to disagree
372
+ with). `CANON_KIT_MEASURED_SURFACE_GLOBS` — array of globs naming the scanned
373
+ surface, default empty ⇒ empty corpus and a clean gate; the two are set
374
+ together or not at all. What a project measures is that project's vocabulary,
375
+ so no key ships as a kit literal (the provenance seam). This repo sets
376
+ `bash scripts/measured-claims.sh` and the `CANON_KIT_MANIFEST_FILES` globs plus
377
+ `.claude/commands/*.md` — the shims the manifest set omits and the prose surface
378
+ excludes on a copy-shape ownership this rule is not covered by.
302
379
  - `CANON_KIT_COMMENT_MACHINE` / `CANON_KIT_COMMENT_REASON` — arrays, default
303
380
  empty: extra directive prefixes appended to the built-in kit-mechanism
304
381
  roster (a consumer's product vocabulary). `CANON_KIT_COMMENT_SURFACE` —
@@ -329,10 +406,12 @@ unset, and the loader exits 2 on a malformed config. Knobs:
329
406
  phrases matched case-insensitively, default a bundled generic-English set
330
407
  (`It's worth noting`, `That said`, …); `CANON_KIT_PROSE_TELL_ABBR_ALLOW` —
331
408
  array of abbreviations exempt from the undefined-abbreviation tell, default a
332
- bundled universal set (`API`, `CLI`, `URL`, …). A consumer extends either
333
- array with its own vocabulary through the matching `_EXTRA` knob —
334
- `CANON_KIT_PROSE_TELL_PHRASES_EXTRA` and
335
- `CANON_KIT_PROSE_TELL_ABBR_ALLOW_EXTRA`, both default empty — which the lib
409
+ bundled universal set (`API`, `CLI`, `URL`, …). A consumer extends any
410
+ bundled vocabulary — these two and `CANON_KIT_TEMPORAL_MARKERS` above — with
411
+ its own through the matching `_EXTRA` knob:
412
+ `CANON_KIT_PROSE_TELL_PHRASES_EXTRA`,
413
+ `CANON_KIT_PROSE_TELL_ABBR_ALLOW_EXTRA` and
414
+ `CANON_KIT_TEMPORAL_MARKERS_EXTRA`, all default empty, which the lib
336
415
  unions onto the base after the base defaults resolve: the effective set is
337
416
  base plus extra. Extension therefore costs one token, never a restatement of
338
417
  the bundled default that would silently diverge from it. Assigning a base
@@ -352,6 +431,16 @@ each degrading to "no icebox" rather than to a wrong section when left unset. Va
352
431
 
353
432
  ## Per-component contracts
354
433
 
434
+ Each gate below owns its own section — the assertion, its fixture pair, and the
435
+ reason for any bespoke unit test beside it. The bespoke unit tests are named
436
+ together here, because a roster spread across per-gate sections is one no reader
437
+ and no oracle sees whole: `check-comment-tier.test.sh`,
438
+ `check-deprecation-task.test.sh`, `check-docs-link-convention.test.sh`,
439
+ `check-knob-citation.test.sh`, `check-knob-default-coupling.test.sh`,
440
+ `check-manifest-count.test.sh`, `check-md-refs.test.sh`,
441
+ `check-measured-claim.test.sh`, `check-prose-enum.test.sh`,
442
+ `check-spec-dod-singleton.test.sh` and `check-tracking-claim.test.sh`.
443
+
355
444
  ### lib/spec.sh
356
445
 
357
446
  The sourced config loader plus shared adapters — values and adapters only,
@@ -366,8 +455,35 @@ same shapes:
366
455
  plus a configured icebox, built as one regex so the tag rule and the walk can
367
456
  never disagree on the set — and a done slug for a bare-slug bullet outside
368
457
  them; the single grammar `check-todo-task-liveness`
369
- and `check-deprecation-task` resolve a `task: <slug>` binding through (each
370
- caller builds its own live/done map and fail-closes on the walk status).
458
+ and `check-deprecation-task` resolve a `task: <slug>` binding through. **The
459
+ walk is `native/src/spec.rs`'s `queue_slugs` and the section builders are the
460
+ shell library's**: both members compile, so the shell walk went with its last
461
+ caller, while `check-amendment-queue` still reads `SPEC_ACTIVE_RE` and its
462
+ siblings here. That walk's bullet lead-line predicate is written again in the
463
+ crate rather than pointed at `native/src/queue.rs`'s adapters, which keeps
464
+ canon-kit one of the format's independent holders under the
465
+ re-implement-and-cite-from-both-ends rule
466
+ (queue-kit/SPEC.md §The queue format) — two modules in one crate are still two
467
+ holders where one shared function is not; the holder census and the residue it
468
+ leaves live at gate-sdk/SPEC.md §check-gate-exemption-tasks.
469
+ - **The governed comment surface:** `comment_surface` in `native/src/spec.rs` —
470
+ the one corpus primitive `check-spec-pointer`, `check-comment-tier`,
471
+ `check-todo-task-liveness` and `check-deprecation-task` all call, its single
472
+ parameter deciding whether `templates/` sources are pruned. Its file set spans
473
+ **both gate declaration spellings, the ported implementation, and the workflow
474
+ directory's tracked tier**: `*.sh`, the `*.gate` descriptor, `*.rs`, and every
475
+ tracked member of `GATE_SDK_WORKFLOW_DIR` whatever its extension. Stated once
476
+ here rather than at each of the four callers, since a gate whose rule became a
477
+ compiled subcommand must not have its `# spec:` pointer, its comment tier, or a
478
+ `TODO(task:)` marker silently drop out of coverage — the widening is made at the
479
+ shared primitive so no caller can inherit a narrower corpus than its siblings
480
+ (gate-sdk/SPEC.md §Meta-gate conservation for the binary substrate). The shell
481
+ forms are **deleted rather than duplicated**: all four callers compiled in one
482
+ cohort, so criterion 6 is satisfied in the form it calls strongest — the
483
+ duplication is absent rather than machine-held. A consumer whose own gate called
484
+ `spec_comment_surface`, `spec_comment_surface_with_templates` or
485
+ `spec_comment_whitelisted` shadows the gate, which is the answer this section
486
+ already gives for the finder-choice question below.
371
487
  - **Finders:** the canonical-spec / amendment finders the spec-scanning gates
372
488
  share, and the manifest-set finder the narration-gate family shares —
373
489
  canonical specs plus `README.md`/`CLAUDE.md`, amendments excluded — so its
@@ -377,30 +493,99 @@ same shapes:
377
493
  grammar lifecycle-kit/SPEC.md §templates/stages/ owns) and no
378
494
  `CONSUMER BINDING` header. A slot-bearing candidate is silently excluded — a template still
379
495
  awaiting binding is a placeholder, not finished prose, and its coverage stays
380
- the shim/binding gates (§Layout and configuration states the knob). The
381
- canonical-spec / amendment finders skip a
382
- `templates/` skeleton (a copyable stub, not governed content — the same
383
- rationale as the gate-tests prune) and, unless `CANON_KIT_SCAN_KIT_ROOTS=1`,
384
- any vendored kit root under the scan root (a dependency's docs; an ancestor
385
- kit root — the case when a kit's own fixture dir is the scan root — never
386
- prunes).
496
+ the shim/binding gates (§Layout and configuration states the knob). All three
497
+ markdown finders — canonical specs, amendments, and the manifest set's
498
+ `README.md` half — skip a `templates/` skeleton (a copyable stub, not governed
499
+ content, the same rationale as the gate-tests prune) and, unless
500
+ `CANON_KIT_SCAN_KIT_ROOTS=1`, any vendored kit root under the scan root. The
501
+ kit-root prune reaches the README because the knob's rationale turns on whose
502
+ documentation a file is, not on which filename carries it: a vendored kit's
503
+ `README.md` is a dependency's docs exactly as its `SPEC.md` is, and pruning
504
+ one while governing the other reds a consumer on a dependency's own internal
505
+ links — measured, on a profile that vendors canon-kit without queue-kit, where
506
+ `canon-kit/README.md`'s `../queue-kit/` link dangles on a bare install tree.
507
+ An ancestor kit root — the case when a kit's own fixture dir is the scan
508
+ root — never prunes.
509
+
510
+ **One asymmetry inside the manifest set, written down because a port that
511
+ tidies it changes the corpus.** The canonical-spec half and the `README.md`
512
+ half are both `templates/`-filtered and kit-root pruned; the **`CLAUDE.md`
513
+ half is neither**. A consumer's agent manifest is governed content wherever it
514
+ sits, including inside a vendored kit root and inside a `templates/`
515
+ skeleton — so regularizing the three finders into one loop silently drops two
516
+ files that belong in the set. The rule is the asymmetry, not the tidy form.
517
+
518
+ **Which primitive is on which substrate.** `spec_manifest_files` has a Rust
519
+ implementation (`native/src/spec.rs`) carrying all three branches — explicit
520
+ globs, the default walk, and the prose-surface fold — plus the kit-root path
521
+ prune, because its family is partly compiled; the shell form stays, since
522
+ members outside that family still call it. That module carries the claim-gate
523
+ primitives too: the declaration grammar, the declaration roster, the
524
+ governed-doc set behind its two exclude valves, and the bridged vocabulary
525
+ loader. The shell kept a copy of the last two per member; the compiled form has
526
+ one, ported once and proved by each member that calls it. `comment_surface` and
527
+ `queue_slugs` are **compiled only**, and so are all four of their callers
528
+ (gate-sdk/SPEC.md §The first cohort, and the rule that selects the next): where
529
+ the manifest finder is dual because members outside its family still call it,
530
+ these two emptied their caller sets in one cohort and their shell forms were
531
+ removed in the same commit.
532
+ The two implementations of the manifest finder are held together by the config
533
+ bridge rather than by a copied default: every knob either reads crosses it as
534
+ a resolved value, so there is exactly one place each is computed
535
+ (gate-sdk/SPEC.md §The port-candidate criteria, criterion 6).
536
+ - **The emitter-backed vocabularies** — the enum sets, the install transports
537
+ and the payload-disclosure classes a consumer supplies as a *command*. For a
538
+ compiled member the command's **output** is the interface, never the command:
539
+ the library runs the emitter at knob-resolution time and the binary receives
540
+ data, so no compiled gate spawns an interpreter to read consumer config and no
541
+ spelling of a consumer's vocabulary becomes a kit literal. A pair rides two
542
+ index-aligned arrays (`CANON_KIT_ENUM_SET_NAMES` / `..._MEMBERS`) because the
543
+ bridge's wire format separates elements with a tab and refuses one inside an
544
+ element, so a `<name>`⇥`<member>` line cannot cross as a single string. The
545
+ resolution is gated on `GATE_SDK_RESOLVING_KNOB` (gate-sdk/SPEC.md
546
+ §lib/gate.sh), because it costs a subprocess and this library is sourced once
547
+ per declared knob per gate. Three vocabularies ride that shape, one pair each:
548
+ the enum sets, `CANON_KIT_INSTALL_TRANSPORT_IDS` / `..._PATTERNS`, and
549
+ `CANON_KIT_PAYLOAD_CLAIM_IDS` / `..._PATTERNS` (§Layout and configuration). The
550
+ emitting **command** knob is bridged beside each pair, because it is what tells
551
+ *none configured* from *configured, and it declared nothing* — the two clean
552
+ skips a claim gate reports apart. The tab a POSIX ERE may legitimately carry
553
+ cannot reach the bridge: `spec_claim_vocabulary` below rejects a line with an
554
+ extra tab before the value is ever serialized.
387
555
  - **The count adapter** the restated-total gates share, so a consumer's
388
556
  `CANON_KIT_COUNT_COLLECTIONS` vocabulary enters once and every such gate
389
557
  matches the same total shapes — including a total whose cardinal and noun
390
558
  straddle a prose wrap, reported at the cardinal's physical line. The boundary
391
559
  rule and the mechanical exemptions live in one shared fragment, so no sibling
392
- drifts from another in what it counts as a total (§check-manifest-count).
560
+ drifts from another in what it counts as a total (§check-manifest-count). That
561
+ boundary guards a prose **noun** against gluing to a following word ("gate"
562
+ inside "gatekeepers") — a different rule from the enum matcher's **identifier**
563
+ boundary (§check-prose-enum), which the two once spelled alike and only
564
+ half-alike at that. English nouns do not compound across underscores, so the
565
+ noun rule stays as it is; the shared spelling was never a shared rule.
393
566
  - **The enum sets** arrive through the consumer's `CANON_KIT_ENUM_SETS_CMD`,
394
567
  validated and fail-closing (exit 2) on a command error or an unparsable line
395
568
  (§check-prose-enum).
396
- - **The install transports** arrive the same way, through
397
- `CANON_KIT_INSTALL_TRANSPORTS_CMD`, and `spec_install_transports` carries the
569
+ - **The claim vocabularies** arrive the same way, through
570
+ `spec_claim_vocabulary <command> <label>` — one loader for every
571
+ `<id>`⇥`<ERE>` vocabulary a claim gate reads, taking the command as an
572
+ argument rather than from one named knob so a second claim axis costs a caller
573
+ and not a second copy. It carries the
398
574
  same fail-closed contract its enum-set sibling does — a command error, an
399
- unparsable line, an id that is not slug-shaped, or a repeated id is exit 2. The
400
- duplicate check is what a bare emit grammar cannot express and the gate needs:
401
- two lines claiming one id would give a transport two patterns and make its
402
- match order arbitrary (§check-install-claim).
403
- - **The comment-surface adapters:** the comment gates read *different* surfaces.
575
+ unparsable line, an id that is not slug-shaped, or a repeated id is exit 2 —
576
+ and the `<label>` it is given names the failing vocabulary in every message,
577
+ so a fail-closed exit still says which one failed. The duplicate check is what
578
+ a bare emit grammar cannot express and both gates need: two lines claiming one
579
+ id would give a class two patterns and make its match order arbitrary. Its
580
+ callers are `spec_install_transports`, over
581
+ `CANON_KIT_INSTALL_TRANSPORTS_CMD` (§check-install-claim);
582
+ `check-payload-claim` directly, over `CANON_KIT_PAYLOAD_CLAIMS_CMD`
583
+ (§check-payload-claim); and `spec_measured_claims`, over
584
+ `CANON_KIT_MEASURED_CLAIMS_CMD` (§check-measured-claim) — whose second field is
585
+ a measured value rather than an ERE, which the loader neither interprets nor
586
+ needs to, since every check it makes is on the line's shape.
587
+ - **The comment-surface adapters:** the comment gates read *different* surfaces,
588
+ which is the one thing the primitive's parameter decides.
404
589
  `check-spec-pointer` scans the template-pruned surface — a template's `spec:`
405
590
  line is an unresolvable-by-design placeholder (§check-spec-pointer);
406
591
  `check-comment-tier` scans the with-templates surface — a copied-out
@@ -500,7 +685,9 @@ narration-marker KPI is superseded by this gate (drift-kit/SPEC.md
500
685
  The scanned set is the shared `spec_manifest_files` finder (§lib/spec.sh):
501
686
  canonical specs, `README.md` at any depth, and `CLAUDE.md`; amendments are
502
687
  excluded by construction (a transition artifact describes change — that is its
503
- nature). Markers are `CANON_KIT_TEMPORAL_MARKERS`, matched case-insensitively;
688
+ nature). Markers are `CANON_KIT_TEMPORAL_MARKERS`, the base array merged with
689
+ `CANON_KIT_TEMPORAL_MARKERS_EXTRA` (§Layout and configuration), matched
690
+ case-insensitively;
504
691
  fenced code blocks are skipped and a marker inside an inline-code span is a
505
692
  meta-reference, not narration — so a gate-output example or this section's own
506
693
  vocabulary may name one. Three valves suppress a legitimately past line: a
@@ -517,6 +704,17 @@ narration governance). Producer: the generated pre-commit hook /
517
704
  marker hit is read at the single scan transition (file, line, marker in the
518
705
  message), no persistent state. Fail-closed on an unreadable manifest.
519
706
 
707
+ The rule is a **compiled subcommand** (gate-sdk/SPEC.md §The POSIX ERE matcher):
708
+ each marker is a consumer-supplied ERE, compiled through the crate's matcher
709
+ before the first corpus line is read, so a pattern outside the POSIX grammar
710
+ exits 2 naming the pattern and the knob rather than scanning past what it meant.
711
+ Two fidelity points a transliteration loses, recorded because both are invisible
712
+ in a green run: the marker test runs against a **case-folded subject** and the
713
+ pattern is not folded, so a marker written with an upper-case letter matches
714
+ nothing; and `CANON_KIT_TEMPORAL_MARKERS_EXTRA` unions onto the base array inside
715
+ this kit's library *before* the bridge reads it, so the compiled member declares
716
+ the base knob alone and a second `_EXTRA` knob would double every added marker.
717
+
520
718
  Calibration: the marker set is tuned against this repo as the FP corpus — bare
521
719
  `used to` is excluded (it collides with instrumental "used to build/filter").
522
720
  At build every hit is dispositioned: reword (preferred — narration is standing
@@ -570,6 +768,19 @@ the consumer governs); and the per-site `manifest-count-exempt: <reason>` marker
570
768
  on the line or the one above. The exact operator and phrase tokens each context
571
769
  recognizes are the check's own regex, generic-English mechanism rather than
572
770
  config.
771
+
772
+ **The sanctioned discharge is the `measured:` marker** (§check-measured-claim),
773
+ and it is the only one of the four that *answers* the ban rather than stepping
774
+ around it: the objection this invariant encodes is a transcribed total with no
775
+ owner, and a marker binds the total to an oracle a gate re-runs. So a cardinal
776
+ under a `<!-- measured: <key>=<value> -->` line satisfies the ban the way a
777
+ generated copy satisfies derivation-first, which strictly shrinks this gate's
778
+ violation set. It rides the same per-site window the exempt marker does — the
779
+ marker line and the claim below it — so the two discharges are one behavior with
780
+ two spellings rather than a second walk. Rewording to cite the owning collection
781
+ stays preferred where the total is not worth stating at all; the exempt tag drops
782
+ to a genuine last resort, because "deliberately unchecked" is now the one thing
783
+ it means.
573
784
  Producer: the generated pre-commit hook / `run-gates.sh`; consumer: the
574
785
  committing operator via the output contract; each hit read at the single scan
575
786
  transition (file, line, matched span in the message), no persistent state.
@@ -582,8 +793,132 @@ extend `CANON_KIT_COUNT_ALLOWED_PHRASES` (a genuinely fixed set), or site-exempt
582
793
  with reason. The good/bad pair covers every match shape and the mechanical
583
794
  exemptions;
584
795
  `check-manifest-count.test.sh` covers the config-driven paths (a consumer-governed
585
- noun and the allowlist containment) the stock defaults cannot reach. `precommit`
586
- tier.
796
+ noun and the allowlist containment) the stock defaults cannot reach, and the
797
+ measured-marker discharge's *window* — that the marked claim is exempt and the
798
+ next paragraph is not, which a pair cannot spell because a fixture file either
799
+ trips or does not. `precommit` tier.
800
+
801
+ ### check-measured-claim
802
+
803
+ Invariant: a measured count or extent claim that names an oracle agrees with it.
804
+ The class this closes is a claim authored into governed prose with **no** oracle
805
+ at all — a total, a corpus size, a swept set — which goes stale the moment the
806
+ thing it measured moves, and whose detection is a human re-measuring by hand at
807
+ review time if at all. The sibling ban (§check-manifest-count) reaches the
808
+ tractable slice of that class by refusing a bare cardinal over a governed
809
+ collection; it cannot reach a claim carrying no cardinal, and an *extent* claim
810
+ ("the kit SPECs came back clean") is exactly that shape. Both halves need the
811
+ author to say what was measured, so this is a **marker** an author applies rather
812
+ than a scanner inferring intent: a scanner triggers on a numeral, and the claims
813
+ that cost the most carry none.
814
+
815
+ **The marker binds a claim to an oracle key and its measured value**, as a
816
+ full-line HTML comment on the line immediately above the claim:
817
+
818
+ ```
819
+ <!-- measured: <key>=<value> -->
820
+ ```
821
+
822
+ It joins the family `install-primary:` (§check-install-claim) and
823
+ `payload-discloses:` (§check-payload-claim) rather than inventing a form — a
824
+ full-line comment pairing a prose claim with a machine-readable id drawn from a
825
+ consumer-owned vocabulary behind a `*_CMD` knob. It is deliberately **not** the
826
+ `-exempt:` family: those are suppression valves that make a gate look away, and
827
+ this is an attachment that gives a gate something to check. The reader-facing
828
+ form of the claim stays prose; the marker is the tier beside it.
829
+
830
+ **The oracle is consumer-owned.** `CANON_KIT_MEASURED_CLAIMS_CMD` names a command
831
+ emitting one `<key>`⇥`<value>` line per measurable fact, loaded through
832
+ `spec_claim_vocabulary` (§lib/spec.sh) and so carrying that loader's fail-closed
833
+ contract. The marker grammar and the comparison are kit mechanism; every key,
834
+ every oracle command and every measured fact is consumer config, because a kit
835
+ literal enumerating what a project measures would publish that project's
836
+ vocabulary. An unset knob means the gate has no oracle and reports clean — the
837
+ inactive-by-default posture its `*_CMD` siblings take.
838
+
839
+ **Three arms.**
840
+
841
+ - **A — the oracle disagrees.** Red when the emitter's current value for `<key>`
842
+ differs from the marker's `<value>`. This is the point: the number in the
843
+ document is now checked against the tree.
844
+ - **B — the key is unknown.** Fail closed (exit 2) when `<key>` is absent from
845
+ the emitter's roster. A marker naming a key nobody emits is a claim with no
846
+ oracle wearing the costume of one, which is worse than an unmarked claim. A
847
+ marker that does not parse fails closed for the same reason.
848
+ - **C — the marker drifted off its own sentence.** When `<value>` is a bare
849
+ cardinal, red unless that cardinal appears as a token in the claim the marker
850
+ binds. Without arm C the marker and the prose can disagree while the marker and
851
+ the oracle agree, and the gate would go green over a false sentence — the exact
852
+ failure being closed.
853
+
854
+ Arm C's cardinal grammar is §check-manifest-count's, read as a value: a digit run
855
+ or a spelled `two`…`twelve` normalized to digits, so a marker's `12` and a
856
+ sentence's "twelve" are one cardinal rather than two. The claim a marker binds is
857
+ the paragraph below it, ending at a blank line, a fence, a second marker or the
858
+ end of file. **The authoring contract arm C prices:** a bound claim carrying more
859
+ than one distinct cardinal is ambiguous, and the gate fails closed rather than
860
+ guessing which one the marker holds — the remedy in the help line is to split the
861
+ sentence or move the marker onto the clause that carries the measurement. That
862
+ cost is bounded: it applies only to sentences an author chose to mark.
863
+
864
+ **Extent claims are covered by arms A and B alone, and that is the design rather
865
+ than a gap.** An extent claim carries no cardinal, so arm C does not apply and arm
866
+ A does the work, with `<value>` whatever the author declares the extent to be and
867
+ the emitter recomputes: a corpus size, a sorted membership list, a digest over
868
+ the swept set. This is the axis no scanner reaches and it costs nothing extra —
869
+ the same arms, with a set-valued rather than integer-valued oracle. Because the
870
+ config bridge refuses an element containing a tab and tab is this protocol's own
871
+ field separator, a set-valued oracle joins its members with something else.
872
+
873
+ **The known limit, stated rather than hidden: a claim nobody marks is uncaught
874
+ here.** What narrows it is §check-manifest-count's discharge, which makes marking
875
+ pressured rather than voluntary wherever the ban already bites.
876
+
877
+ The scanned surface is its own glob knob, `CANON_KIT_MEASURED_SURFACE_GLOBS`,
878
+ **not** the manifest set. The motivating class ranges over SPEC sections and
879
+ binding shims alike, and neither existing surface reaches a shim: the manifest set
880
+ excludes them by omission, with no documented rationale (a reader should not infer
881
+ a ruling from a silent absence), and the prose surface (§lib/spec.sh) excludes them
882
+ by a documented decision about which gate *owns* a shim — `check-shim-restatement`,
883
+ which holds copy shape. That ownership is not this rule's: a restatement that is
884
+ **wrong** has diverged from its owner's wording and is therefore not a copy. So
885
+ reusing either surface would under-scan by exactly the instance that motivated the
886
+ class. Fenced blocks are skipped (a fence is grammar being shown, not a claim being
887
+ made), and a per-site `measured-claim-exempt: <reason>` marker on the line or the
888
+ one above suppresses a marker a document is exhibiting rather than asserting.
889
+
890
+ **The valve stays, and its zero live uses are not evidence against it** (ruled at
891
+ the `native-cohort-canon-kit` close, on a filed observation that it shipped unused).
892
+ The use count was taken over *this* tree, which is the wrong corpus: canon-kit is a
893
+ kit, so the valve's readers are adopters whose prose this repo cannot see. It is a
894
+ fail-safe for an author who must exhibit a full-line marker outside a fence, and a
895
+ fail-safe carrying live uses would mean the fence-and-inline escapes had already
896
+ failed. It stands beside the family boundary drawn above rather than against it —
897
+ that boundary rules what the `measured:` marker *is*, not whether a suppression
898
+ valve may accompany it.
899
+
900
+ Producer: the generated pre-commit hook / `run-gates.sh`; consumer: the committing
901
+ operator via the output contract; each marker read at the single scan transition
902
+ (file, line, key, value), no persistent state. `precommit` tier.
903
+
904
+ **Born native, and this is the first gate with no shell original** — operator-ruled
905
+ 2026-08-12 with the cost below in view. TRAJECTORY.md §The objectives' sixth
906
+ shrinks the interpreter surface to the unavoidable, so a new shell gate is debt
907
+ created knowingly; landing it as a Rust module plus a `.gate` descriptor avoids
908
+ that, and it needs no unbuilt substrate (its glob corpus is served by the walker
909
+ already in production, which is why the corpus was designed as its own surface
910
+ rather than a union with the manifest set). The port criteria govern *ports*, so a
911
+ gate with one implementation has no second substrate to prove parity against: its
912
+ oracle is its `good/`+`bad/` pair, exactly like any new shell gate's, with
913
+ `check-measured-claim.test.sh` holding the fail-closed arms a pair cannot spell.
914
+ **The accepted cost:** a `.gate`-declared member is omitted from the `gates.list` of
915
+ a consumer whose host the release publishes no artifact for, so on an uncovered
916
+ platform this gate does not run where a shell gate would have. That is the port's
917
+ standing cost, already accepted for the members whose shell forms were deleted, and
918
+ it is why the omit-and-declare path exists — a paid price, not an open risk. What
919
+ stays open is only its reach: this settles *this* gate, and a reader weighing a
920
+ second born-native gate weighs the cost again rather than citing this one as
921
+ blanket precedent.
587
922
 
588
923
  ### check-prose-enum
589
924
 
@@ -606,8 +941,25 @@ Set declarations are consumer config, never gate literals (the provenance seam):
606
941
  emitting one `<set-name>`⇥`<member>` line per member, loaded through
607
942
  `spec_enum_sets` (§lib/spec.sh); a command that fails or a line that does not
608
943
  parse is fail-closed (exit 2). A member matches word-bounded — bracketed
609
- (`[spec:]`) or bare (`spec`), neither an alphanumeric nor a hyphen abutting, so a
610
- stem never matches inside a longer tag — and the attested drift used bare stems.
944
+ (`[spec:]`) or bare (`spec`), neither an alphanumeric, a hyphen, nor an
945
+ underscore abutting, so a stem never matches inside a longer tag, and an
946
+ **underscore-separated identifier never reads as present inside a longer
947
+ sibling**: `guard_allow` is named by "the `guard_allow` helper" and not by "the
948
+ `guard_allow_match` pair", which is what a reader means by both sentences. A
949
+ member that falsely reads as present is one the gate stops asking about, so the
950
+ paragraph omitting it reports clean — the silent direction, and the reason the
951
+ class holds the whole identifier rather than most of it. `.` and `/` stay
952
+ *outside* the class deliberately, and that is what makes the identifier reading
953
+ exactly one character wide: a basename member matches prose spelling the file
954
+ kit-relative, repo-relative or bare (below), which admitting either would break.
955
+ The attested drift used bare stems.
956
+ The grammar stays two fields. A third, scoping a set to a whole file rather than
957
+ a paragraph, was weighed against a **cross-document** absence — members spread
958
+ over per-section prose, which a paragraph-scoped judge structurally cannot see —
959
+ and refused: it changes a wire grammar whose fail-closed rule rejects a third
960
+ field, and a document-scoped completeness test has a far worse false-positive
961
+ profile, since any mention anywhere satisfies it. Reshaping such prose into a
962
+ roster the paragraph judge can read closes the same case with no grammar change.
611
963
 
612
964
  The scanned set and the paragraph walk are the shared `spec_manifest_files`
613
965
  finder and `spec_manifest_walk_awk` driver (§lib/spec.sh); this gate's
@@ -637,12 +989,50 @@ two roles are separate sets because a paragraph naming one role's tags is not
637
989
  enumerating the other. A set a consumer can only hand-list is that consumer's
638
990
  own drift to own; the kit contract asks only for the emit grammar.
639
991
 
992
+ The same emitter adds two roster families over the kit tree, one set per kit
993
+ root: a `<kit>-lib` set of the tracked top-level `lib/*.sh` basenames and a
994
+ `<kit>-gate-test` set of the tracked top-level `gate-tests/*.test.sh` basenames,
995
+ with the roots read from `gate_kit_roots_rel` (gate-sdk/SPEC.md §lib/gate.sh) so
996
+ the sets cannot enumerate a tree the battery does not. A new kit, lib or unit
997
+ test enrols with no edit, which is the property a hand correction per stale
998
+ roster would not have. Members are basenames rather than paths because a
999
+ basename matches prose spelling the file kit-relative, repo-relative or bare —
1000
+ the boundary rule above accepts the leading slash. The families fail closed
1001
+ where an empty result contradicts the shape they read (no kit roots at all, or a
1002
+ `lib/` tracking no top-level `*.sh`) and stay silent where emptiness is real: a
1003
+ `gate-tests/` holding only `good/`+`bad/` fixture directories ships no bespoke
1004
+ unit test, and that is a normal kit.
1005
+
1006
+ Two further families — a per-lib set of its function names, and a per-lib set of
1007
+ the files sourcing it — were derived, measured against this tree and refused;
1008
+ the reason is recorded so neither is re-minted. Both fail on one property: a
1009
+ lib's functions and its sourcers are a vocabulary prose *discusses*, not a set
1010
+ prose *rosters*, so the set-difference is real while the finding is false. The
1011
+ function family reported an omission at every passage explaining how two helpers
1012
+ interact, none of them a roster — the measurement that is dispositive on its own,
1013
+ and the one that produced the rule this paragraph ends on. The refusal rests on
1014
+ that ground alone. It rests **not at all** on the matcher, which bounds an
1015
+ identifier on the underscore too (above), so `guard_allow` is absent from a
1016
+ paragraph naming only `guard_allow_match`: a refusal resting partly on a broken
1017
+ matcher would invite exactly the wrong inference — fix the matcher, re-mint the
1018
+ family. That matcher defect was sighted while measuring this very family, which
1019
+ is where the identifier boundary rule came from and why the family is named here
1020
+ as its origin rather than as a second reason to refuse.
1021
+ The caller family's one intended site is a caller roster written as narrative, which
1022
+ the hand-list adjacency rule correctly declines to judge, so it was inert there
1023
+ while still firing falsely on a README row naming two of a kit's tools. The rule
1024
+ the pair teaches: declare a derived set when the tree shape it reads is one the
1025
+ prose rosters — a layout is such a shape, an incidental relation is not.
1026
+
640
1027
  Calibration follows the count gate's procedure: tuned against this tree, every
641
1028
  hit dispositioned — cite the set, complete the list, or site-exempt with reason.
642
1029
  The good/bad pair covers a bare comma hand list dropping a member and the
643
1030
  marked-subset cases; `check-prose-enum.test.sh` covers the config-driven paths
644
1031
  (the empty-default skip, the fail-closed escapes, bracketed matching, multi-set
645
- independence, the exempt escapes) the pair cannot reach. `precommit` tier.
1032
+ independence, the exempt escapes, and the identifier boundary's prefix-sibling
1033
+ pair) the pair cannot reach — the boundary case needs a declared set holding
1034
+ underscore members, which is a config no pair running on the consumer's own
1035
+ hyphenated sets can supply. `precommit` tier.
646
1036
 
647
1037
  ### check-knob-citation
648
1038
 
@@ -785,7 +1175,11 @@ topology exists). `align-only` tier.
785
1175
 
786
1176
  Invariant: every full-line comment on a governed source is one of — a
787
1177
  machine directive (a comment a tool parses: `graph:`, `shellcheck`,
788
- `contract:`), a reason directive (a spec pointer, usage synopsis, or
1178
+ `contract:`, `install:`, `smoke-unregistered:` — the last two read off a kit's
1179
+ vendored source, `install:` by the installer's recipe module and
1180
+ `check-install-disposition`, `smoke-unregistered:` by `run-consumer-smoke.sh`
1181
+ off `smoke/install.sh`, gate-sdk/SPEC.md §The install disposition and
1182
+ §Consumer smoke), a reason directive (a spec pointer, usage synopsis, or
789
1183
  positional justification: `spec:`, `usage:`, `exception-list:`,
790
1184
  `no-fixture:`, `assertion`, `permanent:`, `TODO(task:`,
791
1185
  `TODO(spec-ambiguity)`, which blesses a bounded window — its own line plus
@@ -810,6 +1204,16 @@ second copy no gate reads. `comment-tier-exempt: <reason>` is the honest
810
1204
  directive for a genuinely-local fact below SPEC altitude that neither tier
811
1205
  owns.
812
1206
 
1207
+ The governed-source corpus reaches the **implementation of a ported gate**, not
1208
+ just shell — `comment_surface` with templates kept (§lib/spec.sh), which owns
1209
+ the file set. This is the load-bearing half of the reader
1210
+ partition gate-sdk/SPEC.md §The `# graph:` manifest states — locality-class
1211
+ directives bind to a line of implementation and therefore stay there, so the
1212
+ tier rule has to follow them across the substrate or go dark exactly where it
1213
+ still applies. A descriptor's own lines are directives by construction. Marker
1214
+ matching is on the **token**, independent of the comment leader, so `//` and `#`
1215
+ carry the same directives and no language earns a quieter standard.
1216
+
813
1217
  One shape overrides the window: a full-line comment carrying a **restated
814
1218
  collection total** — the count grammar of §check-manifest-count, over the same
815
1219
  `CANON_KIT_COUNT_COLLECTIONS` vocabulary — is flagged even where a directive
@@ -857,7 +1261,16 @@ this gate governs them, where
857
1261
  workflow directory's **tracked** members blessing only `contract:`/`see`,
858
1262
  whatever their extension (the capture tier is gitignored and headerless, so
859
1263
  tracking is the filter, not the suffix — gate-sdk/SPEC.md §The workflow
860
- directory);
1264
+ directory). On a **markdown** member of that directory a `##`-or-deeper line is
1265
+ the surface's own block grammar rather than a comment, and is read as an
1266
+ ordinary content line: a workflow surface whose records *are* `## ` blocks
1267
+ (lifecycle-kit/SPEC.md §The survey record) would otherwise have every record
1268
+ heading flagged as untagged prose, and no tagging is available that would not
1269
+ put a directive inside the data. The narrowing costs no coverage — the member's
1270
+ `# contract:` header is still classified here, and its tier and header payload
1271
+ are `check-workflow-tiering`'s (gate-sdk/SPEC.md §The workflow directory) — and
1272
+ it is deliberately extension-scoped rather than content-sniffed, so a `.txt`
1273
+ data member's `#` lines stay comments;
861
1274
  slash-comment parsing (`//`, `/* */`, doc-comments, heredoc skipping) ships
862
1275
  as mechanism and activates when a consumer widens `CANON_KIT_COMMENT_SURFACE`
863
1276
  to a language that needs it. Positional rescue is language-agnostic — its
@@ -870,6 +1283,18 @@ sources ride `CANON_KIT_COMMENT_WHITELIST` (its array tagged
870
1283
  `# exception-list:`, each `# until:` a live drain task per
871
1284
  `check-gate-exemption-tasks`), draining kit by kit. `precommit` tier.
872
1285
 
1286
+ **Declared by `check-comment-tier.gate`, dispatching to the binary**, with the
1287
+ four members of this family ported as one cohort
1288
+ (gate-sdk/SPEC.md §The first cohort, and the rule that selects the next). Its
1289
+ `couples=` carries `*.gate` and `*.rs` as **bare globs** beside the shell and
1290
+ workflow spellings: the corpus scans both declaration forms and the ported
1291
+ implementation, and a token naming this repo's crate directory would publish one
1292
+ consumer's layout into a kit file (CLAUDE.md §The provenance seam) and be false
1293
+ for every other. The gate reads no regex engine — its blessing roster is a set of
1294
+ literal directive tokens, matched as a substring for a `keyword:` and
1295
+ non-alphanumeric-bounded for a bare word, which is joining rather than
1296
+ interpreting (gate-sdk/SPEC.md §The POSIX ERE matcher).
1297
+
873
1298
  ### check-spec-pointer
874
1299
 
875
1300
  Invariant, two passes, forward direction only: every `spec:` / `contract:`
@@ -878,8 +1303,14 @@ pointer **directive** on a governed source resolves, and every free-prose
878
1303
  directive set is exactly what `check-comment-tier` blesses by shape: full-line
879
1304
  `spec:` / `contract:` comments on the governed sources, plus the `# contract:`
880
1305
  headers on the workflow directory's **tracked** members (gate-sdk/SPEC.md §The
881
- workflow directory owns that tier; a version-marker payload resolves as no path
882
- and rides `CANON_KIT_COMMENT_WHITELIST`). A directive's target grammar is
1306
+ workflow directory owns that tier). That section rules two `contract:` payloads,
1307
+ and this gate honours both: a **version-marker** payload (`<format-name> v<N>`,
1308
+ matched on that section's own anchored shape, and only after `contract:` — a
1309
+ `spec:` directive wearing the shape still resolves as a path) is a wire-format
1310
+ version its owning gate parses, so it names no path, resolves as none, and is
1311
+ counted on the clean line rather than skipped silently. Discriminating it here is
1312
+ what keeps the form usable without a per-consumer whitelist entry. A directive's
1313
+ target grammar is
883
1314
  `<path> [§<heading>]`: `<path>` (repo-relative) must be a tracked file, and when
884
1315
  a `§<heading>` fragment is present the file must carry a matching markdown
885
1316
  heading; a pointer without `§` resolves file-only. Reddens on a missing or
@@ -921,9 +1352,9 @@ no inbound pointer as uncovered code — needs a "what counts as a requirement"
921
1352
  notion that risks false positives against the cheap-and-FP-free bar, so it is
922
1353
  ruled out (a separate task with its own ruling if ever wanted; this gate
923
1354
  reserves no syntax for it). Configuration is shared with `check-comment-tier` —
924
- the `spec_comment_whitelisted` adapter in `lib/spec.sh` and the same
1355
+ the whitelist predicate and the same
925
1356
  `CANON_KIT_COMMENT_*` knobs, so no new config knob — but this gate scans
926
- `spec_comment_surface`, which prunes `templates/` shell sources where
1357
+ the **pruned** comment surface, which drops `templates/` sources where
927
1358
  `check-comment-tier` keeps them. The split is by design, not a "SPECs don't
928
1359
  travel" claim: a template's `spec: <your SPEC> §check-<area>` line is a
929
1360
  placeholder the consumer fills in, unresolvable *by design* in the kit's own
@@ -946,6 +1377,13 @@ under that doctrine, not re-gated here. Dropping the slot would also orphan
946
1377
  the citation coverage the convention carries — the reason a dedicated
947
1378
  script↔doc citation gate stays unbuilt.
948
1379
 
1380
+ **Declared by `check-spec-pointer.gate`, dispatching to the binary**, with its
1381
+ `couples=` widened to `*.gate`, `*.rs` and every tracked workflow member on the
1382
+ same terms `check-comment-tier`'s is. The gate that reads a `# spec:` directive
1383
+ is now itself declared by one, so a member of this family reads its own cohort's
1384
+ descriptors — which is why the fixture pair carries a descriptor arm rather than
1385
+ resting on the live tree to exercise it.
1386
+
949
1387
  ### check-todo-task-liveness
950
1388
 
951
1389
  Invariant: every `TODO(task: <slug>)` marker on a governed source resolves to a
@@ -972,10 +1410,10 @@ separate ruling if the need attests.
972
1410
 
973
1411
  Placement: the marker is a comment directive on the governed comment surface, so
974
1412
  it is canon-kit's, not queue-kit's (which disclaims source-file conventions in
975
- its Out of scope). The gate scans `spec_comment_surface`, pruning `templates/`
1413
+ its Out of scope). The gate scans the pruned comment surface, dropping `templates/`
976
1414
  as placeholders-by-design like `check-spec-pointer`, and reads the queue through
977
1415
  `CANON_KIT_QUEUE_FILE` with no new knob — the live/done split is the shared
978
- `spec_queue_slugs` adapter (§lib/spec.sh), one queue walk reading a bare-slug
1416
+ `queue_slugs` adapter (§lib/spec.sh), one queue walk reading a bare-slug
979
1417
  bullet outside the active and deferred sections as the queue's done shape. That
980
1418
  `task: <slug>` binding grammar — a `task:` key naming a slug that must resolve
981
1419
  to a live queue entry — is one grammar both liveness gates share:
@@ -983,7 +1421,10 @@ to a live queue entry — is one grammar both liveness gates share:
983
1421
  deprecation marker through the same adapter (§check-deprecation-task). Latent at landing: no such marker exists in
984
1422
  the tree yet — the gate ships before the first one, so a future `TODO(task:)`
985
1423
  cannot outlive its task silently. A queue-read failure is fail-closed (exit 2).
986
- `precommit` tier.
1424
+ `precommit` tier. **Declared by `check-todo-task-liveness.gate`, dispatching to
1425
+ the binary**, its `couples=` widened to `*.gate` and `*.rs` and its
1426
+ `.workflow/*.txt` spelling corrected to `.workflow/*`, which is the tier the
1427
+ corpus actually takes.
987
1428
 
988
1429
  ### check-deprecation-task
989
1430
 
@@ -1004,13 +1445,26 @@ A marker line carrying no `task: <slug>` is **unbound**; a bound slug sitting in
1004
1445
  slug absent from the queue is **unresolved**. All three redden — each finding
1005
1446
  names the file, the line, the matched marker, and the offending slug. The
1006
1447
  binding grammar and the queue-resolution pass are `check-todo-task-liveness`'s:
1007
- the same `task: <slug>` key over the same `spec_queue_slugs` adapter
1448
+ the same `task: <slug>` key over the same `queue_slugs` adapter
1008
1449
  (§check-todo-task-liveness, §lib/spec.sh), one grammar both liveness gates
1009
- share. The gate scans `spec_comment_surface` (templates pruned as
1450
+ share. The gate scans the pruned comment surface (templates dropped as
1010
1451
  placeholders-by-design) and reads the queue through `CANON_KIT_QUEUE_FILE`, no
1011
1452
  new knob beyond the roster. An unreadable queue or source is fail-closed
1012
1453
  (exit 2); an empty roster is the clean skip, not an error.
1013
1454
 
1455
+ **Declared by `check-deprecation-task.gate`, dispatching to the binary**, with
1456
+ the same widened `couples=` its twin carries. The roster is where this member
1457
+ parts from its three siblings: it is a consumer array joined into one alternation
1458
+ and **interpreted**, so the compiled form compiles it through the crate's POSIX
1459
+ ERE matcher (gate-sdk/SPEC.md §The POSIX ERE matcher) and reports the offending
1460
+ knob by name on a pattern the engine refuses. One shell defect went with the
1461
+ port, found by widening the fixture pair rather than by review: the unbound
1462
+ finding named the marker as `''`, because the record carried an empty slug field
1463
+ *between* two populated ones and `IFS=$'\t' read` collapses a tab run. It was
1464
+ repaired in the shell before the port, so the parity run proves the repaired
1465
+ message on both substrates rather than freezing the defect into the compiled
1466
+ form.
1467
+
1014
1468
  This repo sets no roster, so the gate clean-skips here — the good/bad fixture
1015
1469
  pair and `check-deprecation-task.test.sh` carry the resolved and reddened paths
1016
1470
  under a fixture-local roster (the `check-manifest-count` config-path precedent).
@@ -1110,7 +1564,8 @@ tracked file, or a directory holding tracked files; a `#anchor` — alone
1110
1564
  (same-file) or trailing a path — must match the GitHub heading slug of a
1111
1565
  heading in the target file. External URLs (`scheme://`, `mailto:`) are out of
1112
1566
  scope: the network is not a gate dependency. The doc set is the manifest set
1113
- (kit READMEs and CLAUDE.md included) minus the `CANON_KIT_MDREF_EXCLUDE` globs
1567
+ (`CLAUDE.md` included; a vendored kit's own `README.md` only where
1568
+ `CANON_KIT_SCAN_KIT_ROOTS` re-includes it) minus the `CANON_KIT_MDREF_EXCLUDE` globs
1114
1569
  (default empty, for a consumer's generated docs); the scan runs over tracked
1115
1570
  sources only, so an untracked local-only file (`BRIEF.local.md`) is a legitimate
1116
1571
  link *source* that is never scanned and, being git-ignored-and-present, a
@@ -1147,6 +1602,21 @@ documentation of the current tree, so a reference link pins to the default
1147
1602
  branch (this repo's `master`), and a tag-pinned reference copy would buy
1148
1603
  staleness, not stability.
1149
1604
 
1605
+ **Coverage the good/bad pair cannot hold**, and where it lives:
1606
+ `gate-tests/check-md-refs.test.sh`. The harness resolves exactly one `good/` and
1607
+ one `bad/` case dir per gate, and this gate's pair is spent on the core
1608
+ link-resolution logic, so two behaviors ride a bespoke test instead. The
1609
+ self-repo pass is the first: each case builds a throwaway repo with a controlled
1610
+ `origin`, which a case dir run inside this repo cannot do. The kit-root prune on
1611
+ the manifest set's README half is the second, and the two cases differ only in
1612
+ `CANON_KIT_SCAN_KIT_ROOTS` over one tree — a shape the pair's
1613
+ one-tree-per-verdict form cannot express even with a slot free. That second half
1614
+ is the **only** executable oracle the prune has: this repo sets the knob, so its
1615
+ battery is a no-op on it, and a consumer's knob is `0` either way, so no
1616
+ consumer-smoke run distinguishes a knob-gated prune from an unconditional one.
1617
+ The sibling `gate-tests/check-spec-dod-singleton.test.sh` carries the same
1618
+ prune's canonical-spec half for the same reason.
1619
+
1150
1620
  ### The reference-link grammar
1151
1621
 
1152
1622
  A docs-site page cites two kinds of in-repo target, and the grammar splits on
@@ -1160,13 +1630,17 @@ gate body, config, a directory: files the site does not render — cites the tre
1160
1630
  with an absolute GitHub blob link
1161
1631
  `https://<host>/<owner>/<repo>/blob/<ref>/<path>[#anchor]`, anchored when it
1162
1632
  names a section, because a relative link into the unrendered surrounding tree
1163
- would 404 on a site that serves `docs/` alone. Both are the downward-citation
1164
- shape of the tiering topology, one on-site and one off. Resolution of the blob
1165
- form belongs to `check-md-refs`' self-repo pass (identity derivation and the
1166
- ref knob live there); `check-docs-link-convention` owns the shape of the
1167
- relative links that stay inside `docs/`. The mirror is what a site opts into,
1168
- not a precondition of the grammar: absent a published mirror, rendered-document
1169
- references fall back to the same off-site blob form as source references.
1633
+ would 404 on a site that serves `docs/` alone. **That prescription is held by
1634
+ `check-docs-link-convention`'s off-root rule** (§check-docs-link-convention
1635
+ below): a relative link whose target resolves outside the site root is a
1636
+ violation, so the requirement above is enforced rather than merely stated.
1637
+ Both are the downward-citation shape of the tiering topology, one on-site and
1638
+ one off. Resolution of the blob form belongs to `check-md-refs`' self-repo pass
1639
+ (identity derivation and the ref knob live there); `check-docs-link-convention`
1640
+ owns the shape of the relative links that stay inside `docs/`. The mirror is
1641
+ what a site opts into, not a precondition of the grammar: absent a published
1642
+ mirror, rendered-document references fall back to the same off-site blob form
1643
+ as source references.
1170
1644
 
1171
1645
  ### check-docs-link-convention
1172
1646
 
@@ -1187,6 +1661,20 @@ there:
1187
1661
  back to that same kit's own `README.md` or `SPEC.md` must carry a `#section`
1188
1662
  anchor. A page cites downward into a *named* section, never at the whole spec —
1189
1663
  the anti-restatement doctrine expressed as a link shape.
1664
+ - **No off-root relative link.** A relative link whose target *resolves* to an
1665
+ existing path outside `CANON_KIT_LINK_ROOT` must instead cite the absolute
1666
+ self-repo blob form (§The reference-link grammar). The rule turns on the
1667
+ resolved path, not the link text, so a `../`-prefixed link that resolves back
1668
+ under the root is silent. Only resolving targets are classified — a relative
1669
+ target that resolves to nothing is `check-md-refs`' finding alone, and this
1670
+ rule does not double-report it; a directory target outside the root still
1671
+ satisfies the first rule's predicate first and is reported there, once.
1672
+ Anchors and absolute URLs never fire, by the gate's existing scope. Generated
1673
+ mirror pages (`generated: true` front matter) are in scope, deliberately: their
1674
+ off-root conformance is a property of the generator that emits them, which is a
1675
+ thing that can regress, and exempting them would blind the corpus's larger half.
1676
+ The existing `docs-link-exempt: <reason>` valve suppresses this rule as it does
1677
+ the other two — no second valve.
1190
1678
 
1191
1679
  The scanned tree is `CANON_KIT_LINK_ROOT` (default `docs`; the fixture pair
1192
1680
  overrides it with a positional arg pointing at a synthetic tree), walked for
@@ -1264,6 +1752,19 @@ per transport through `CANON_KIT_INSTALL_TRANSPORTS_CMD`, loaded by
1264
1752
  `spec_install_transports` (§lib/spec.sh) — because a kit literal spelling a
1265
1753
  transport publishes one project's distribution model as a kit fact.
1266
1754
 
1755
+ **Where this gate ends and §check-payload-claim begins.** The two answer
1756
+ different questions and share only the vocabulary loader. This one is
1757
+ **positional and install-section-scoped**: naming a secondary transport is
1758
+ correct prose, so what it judges is which transport a selected section *leads*
1759
+ with. Its sibling is **membership over the whole governed document**, because a
1760
+ disclosure class other than the declared one has no correct-but-secondary form —
1761
+ it is wrong wherever it appears. The scopes do not coincide either, so neither
1762
+ gate is the other's second assertion pair: an install section under this repo's
1763
+ section regex is not where the disclosure claim is ruled, and folding a
1764
+ whole-document membership rule into a section-scoped positional gate would make
1765
+ this gate's name false and give one gate two unrelated calibrations to reason
1766
+ about on a red.
1767
+
1267
1768
  The scanned set is `check-md-refs`' governed doc set (the manifest set minus
1268
1769
  `CANON_KIT_MDREF_EXCLUDE`) minus `CANON_KIT_INSTALL_CLAIM_EXCLUDE`. Two
1269
1770
  assertions:
@@ -1284,6 +1785,25 @@ assertions:
1284
1785
  exactly where a transport shows, but a fenced line is never read as a heading;
1285
1786
  the declaration line is skipped, since a claim is not evidence for itself.
1286
1787
 
1788
+ **The rule is a compiled subcommand, and one piece of it is load-bearing beyond
1789
+ this gate.** The section regex and every transport pattern are consumer EREs
1790
+ compiled through the crate's matcher (gate-sdk/SPEC.md §The POSIX ERE matcher);
1791
+ the `install-primary:` declaration grammar and the `^#{2,6}[[:space:]]+` heading
1792
+ grammar are kit literals. The heading one goes through the matcher anyway, and
1793
+ deliberately: taking a heading's text is a **span** read, so routing it through
1794
+ `find` gives the matcher's leftmost-longest span API a production reader on every
1795
+ invocation of a precommit-tier gate, rather than one alive only in unit tests.
1796
+
1797
+ **One declaration grammar, where two spellings once disagreed.** The declaration
1798
+ is detected and its id extracted by the same grammar, so the terminator is part
1799
+ of it: an id run and the `-->` that closes the comment share the hyphen, and the
1800
+ run gives hyphens back until the terminator matches. A space-less
1801
+ `<!--install-primary:tarball-->` therefore declares `tarball`, and the rule runs.
1802
+ The compiled form is the single spelling; a detecting pattern that required the
1803
+ terminator beside an extracting one that did not made that same line read as a
1804
+ declaration of `tarball--` and fail-closed on a vocabulary it was never checked
1805
+ against.
1806
+
1287
1807
  Assertion B is the answer to the leading-versus-mentioning question: naming a
1288
1808
  secondary transport is correct prose and must stay green, so the rule is
1289
1809
  positional. **The scope in which "leading" is well-defined is the install
@@ -1326,6 +1846,90 @@ select, and a published note the path valve keeps out of the scanned set. The
1326
1846
  `# graph:` manifest couples the gate to the doc set and `scripts/*.sh`, so a
1327
1847
  transport rename re-fires it over the docs. `precommit` tier.
1328
1848
 
1849
+ ### check-payload-claim
1850
+
1851
+ Invariant: exactly one governed doc declares what a gate on the vendored payload
1852
+ discloses, and no scanned governed doc asserts a different disclosure class. Two
1853
+ assertions: (A) **singleton owner** — exactly one declaration exists across the
1854
+ scanned set; (B) **no contradicting assertion** — no scanned line matches the
1855
+ pattern of a class other than the declared one.
1856
+
1857
+ The claim's machine-readable owner is a full-line
1858
+ `<!-- payload-discloses: <claim-id> -->` HTML comment, the same
1859
+ tier-beside-the-prose shape §check-install-claim uses and for the same reason:
1860
+ the reader-facing form of this claim already exists as prose and must stay prose.
1861
+ It belongs in the section that rules the fact, which in this repo is
1862
+ gate-sdk/SPEC.md §Consumer payload. The disclosure vocabulary is consumer config
1863
+ — one `<claim-id>`⇥`<ERE>` line per class through
1864
+ `CANON_KIT_PAYLOAD_CLAIMS_CMD`, loaded by `spec_claim_vocabulary` (§lib/spec.sh)
1865
+ — because a spelling of what a payload discloses is one project's distribution
1866
+ model, and a kit literal carrying one would publish it. The scanned set is
1867
+ `check-md-refs`' governed doc set (the manifest set minus
1868
+ `CANON_KIT_MDREF_EXCLUDE`) minus `CANON_KIT_PAYLOAD_CLAIM_EXCLUDE` — the same
1869
+ composition its sibling uses, so a consumer configures one scanned-set idiom
1870
+ rather than two.
1871
+
1872
+ **Assertion A.** Zero declarations is the defect the gate exists for: nothing
1873
+ owns the claim, so an unbounded number of surfaces drift with nothing watching,
1874
+ and no reader can tell which surface is the one to believe. Two owners is that
1875
+ same defect wearing a different shape. A `<claim-id>` outside the configured
1876
+ vocabulary is **fail-closed (exit 2)** rather than a violation — with no
1877
+ resolvable declared class the gate holds nothing to compare a line against, so
1878
+ it must not run rather than pass.
1879
+
1880
+ **Assertion B.** Across each scanned document, any line matching the pattern of a
1881
+ class other than the declared one is a violation, wherever in the document it
1882
+ sits. Membership rather than position, because a non-declared disclosure class
1883
+ has no correct secondary form. The declaration line itself is skipped, since a
1884
+ claim is not evidence for itself. Fenced content is scanned, because a quoted
1885
+ recipe is exactly where a disclosure claim shows up in passing. The report names
1886
+ the offending class, because "wrong disclosure class" alone would leave the
1887
+ reader grepping.
1888
+
1889
+ The rule is a **compiled subcommand** — structurally the simplest consumer of the
1890
+ crate's matcher, membership over the whole document rather than position inside a
1891
+ section, so the engine and the vocabulary bridge were both proved by its two
1892
+ cohort siblings before it landed. It shares the declaration grammar
1893
+ §check-install-claim states, including that section's single-spelling rule.
1894
+
1895
+ **The declared class's own pattern is latent rather than unread.** Assertion B
1896
+ matches only the classes that are *not* declared, so the declared one's pattern
1897
+ does no work while it holds the declaration — and starts doing it the moment the
1898
+ declaration moves to another class. The vocabulary is a set of classes, not a set
1899
+ of live matchers, so a class is emitted with its pattern whether or not it is
1900
+ currently the declared one.
1901
+
1902
+ **One claim axis rather than a claim registry.** The shape behind this gate and
1903
+ its sibling — a declared owner, an id vocabulary, a scanned corpus — invites a
1904
+ registry keyed by claim name. Refused for now, with the reason recorded so it is
1905
+ not re-derived: one axis exists, this gate and its sibling already share the only
1906
+ piece worth sharing (the vocabulary loader), and a registry would mint an
1907
+ axis-name knob and an indirection to hold a single member. The refusal is cheap to reverse — a
1908
+ second axis is the trigger, and both gates would collapse into the registry with
1909
+ their vocabularies unchanged.
1910
+
1911
+ **Honest limits.** The gate is only as sharp as the emitted patterns, and a
1912
+ loosely-written one wins matches by accident — the same consumer-owned drift
1913
+ §check-install-claim states, since the kit contract asks for the emit grammar and
1914
+ never for the patterns. A claim phrased in a shape no emitted pattern recognizes
1915
+ is out of reach; what the gate converts is an unbounded prose corpus into a
1916
+ checkable one, not an English-language reader. And the scanned set is the
1917
+ manifest set, so a claim made on a surface the consumer has not brought into that
1918
+ set stays unheld.
1919
+
1920
+ Producer: the maintainer editing the section that rules the fact, plus the
1921
+ consumer's disclosure command; both are live tracked configuration in this repo,
1922
+ not fixture-only. Consumer: the committing operator via the output contract, and
1923
+ both assertions read the declaration's one field — at the membership check, at
1924
+ the declared-versus-other comparison, and in the violation report.
1925
+
1926
+ The good/bad pair covers the reintroduction path itself — one corrected sentence
1927
+ restored verbatim to its original overclaiming form — beside the near-miss
1928
+ sentences the pattern boundary must stay silent on and a published dated note the
1929
+ path valve keeps out of the scanned set. The `# graph:` manifest couples the gate
1930
+ to the governed doc set and `scripts/*.sh`, so an edit to a claim surface or to
1931
+ the vocabulary re-fires it. `precommit` tier.
1932
+
1329
1933
  ### check-prose-tells
1330
1934
 
1331
1935
  The mechanical subset of the AI-prose tells — the machine-detectable patterns
@@ -1386,7 +1990,10 @@ by `check-prose-tells` at scan time and no other component.
1386
1990
 
1387
1991
  ### templates/
1388
1992
 
1389
- `canon-config.sh` — the consumer config template documenting every knob.
1993
+ `canon-config.sh` — the consumer config template: a two-line `# spec:` pointer
1994
+ to the §Layout and configuration knob table, so the table stays the one owner
1995
+ of the knob roster rather than a parallel copy in the template drifting
1996
+ against it.
1390
1997
  `SPEC-amendment.md` — the amendment skeleton: delta sections plus the
1391
1998
  Definition-of-Done checklist (causal completeness, no information lost on
1392
1999
  merge, amendment deleted, none remaining, gaps filed as debt).