checkwright 0.23.0 → 0.24.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 (321) hide show
  1. package/README.md +172 -10
  2. package/lib/common/lock.sh +7 -0
  3. package/lib/common/recipe.sh +1 -1
  4. package/lib/diff.sh +2 -0
  5. package/lib/init.sh +40 -16
  6. package/lib/uninstall.sh +2 -0
  7. package/package.json +2 -2
  8. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  9. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  10. package/payload/canon-kit/SPEC.md +125 -13
  11. package/payload/canon-kit/checks/check-amendment-queue.gate +3 -0
  12. package/payload/canon-kit/checks/check-docs-link-convention.gate +3 -0
  13. package/payload/canon-kit/checks/check-knob-default-coupling.gate +3 -0
  14. package/payload/canon-kit/checks/check-prose-tells.gate +3 -0
  15. package/payload/canon-kit/checks/check-spec-embedded-source.gate +3 -0
  16. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-orphan.md +6 -0
  17. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +7 -2
  18. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +8 -0
  19. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.sh +3 -0
  20. package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +1 -0
  21. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
  22. package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +4 -4
  23. package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +2 -2
  24. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/SPEC-wire.md +18 -0
  25. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/expect.txt +3 -1
  26. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/widget.proto +13 -0
  27. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC-wire.md +22 -0
  28. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC.md +17 -0
  29. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/widget.proto +13 -0
  30. package/payload/canon-kit/smoke/install.sh +1 -1
  31. package/payload/context-kit/README.md +6 -4
  32. package/payload/context-kit/SPEC.md +239 -70
  33. package/payload/context-kit/bin/always-loaded.sh +5 -21
  34. package/payload/context-kit/bin/env-probe.sh +2 -17
  35. package/payload/context-kit/checks/check-brevity.gate +3 -0
  36. package/payload/context-kit/checks/check-footprint-fresh.gate +3 -0
  37. package/payload/context-kit/checks/check-memory-off.gate +3 -0
  38. package/payload/context-kit/checks/check-settings-paths.gate +3 -0
  39. package/payload/context-kit/checks/check-settings-pins.gate +3 -0
  40. package/payload/context-kit/gate-tests/check-brevity.test.sh +3 -2
  41. package/payload/context-kit/gate-tests/check-memory-off/bad/scripts/context-config.sh +4 -0
  42. package/payload/context-kit/gate-tests/check-memory-off/good/scripts/context-config.sh +4 -0
  43. package/payload/context-kit/gate-tests/check-memory-off.test.sh +18 -4
  44. package/payload/context-kit/gate-tests/check-settings-pins.test.sh +70 -0
  45. package/payload/context-kit/index-tests/expected/toolfloor.txt +5 -5
  46. package/payload/context-kit/index-tests/toolfloor-cases.sh +5 -5
  47. package/payload/context-kit/lib/context.sh +56 -0
  48. package/payload/context-kit/lib/toolfloor.sh +1 -1
  49. package/payload/context-kit/smoke/agents-md.sh +16 -4
  50. package/payload/context-kit/smoke/install.sh +3 -2
  51. package/payload/context-kit/templates/session-context.sh +5 -5
  52. package/payload/delegation-kit/SPEC.md +284 -9
  53. package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +3 -0
  54. package/payload/delegation-kit/checks/check-gate-tamper.gate +3 -0
  55. package/payload/delegation-kit/checks/check-rule-citation.gate +3 -0
  56. package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/added-exemptions +5 -0
  57. package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/expect.txt +2 -0
  58. package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +108 -0
  59. package/payload/delegation-kit/smoke/install.sh +1 -1
  60. package/payload/delegation-kit/templates/agent-execution.md +71 -4
  61. package/payload/doctrine-kit/SPEC.md +1 -1
  62. package/payload/doctrine-kit/checks/check-doctrine-registration.gate +3 -0
  63. package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +2 -3
  64. package/payload/doctrine-kit/smoke/install.sh +17 -4
  65. package/payload/drift-kit/README.md +2 -2
  66. package/payload/drift-kit/SPEC.md +71 -7
  67. package/payload/drift-kit/bin/stage-economics.sh +1 -1
  68. package/payload/drift-kit/lib/drift.sh +43 -0
  69. package/payload/drift-kit/smoke/install.sh +21 -14
  70. package/payload/evidence-kit/README.md +3 -1
  71. package/payload/evidence-kit/SPEC.md +160 -19
  72. package/payload/evidence-kit/checks/check-battery-roster.gate +3 -0
  73. package/payload/evidence-kit/checks/check-evidence-baseline.gate +3 -0
  74. package/payload/evidence-kit/checks/check-evidence-manifest.gate +3 -0
  75. package/payload/evidence-kit/checks/check-producer-liveness.sh +42 -2
  76. package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +4 -3
  77. package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +8 -5
  78. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/WORKFLOW-STATE.txt +1 -1
  79. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/scripts/evidence-config.sh +9 -0
  80. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/WORKFLOW-STATE.txt +1 -1
  81. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/scripts/evidence-config.sh +9 -0
  82. package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +6 -4
  83. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +42 -1
  84. package/payload/evidence-kit/lib/evidence.sh +2 -0
  85. package/payload/evidence-kit/smoke/install.sh +1 -1
  86. package/payload/gate-sdk/README.md +10 -7
  87. package/payload/gate-sdk/SPEC.md +3916 -265
  88. package/payload/gate-sdk/bin/install-hooks.sh +14 -2
  89. package/payload/gate-sdk/bin/port-blockers.sh +37 -9
  90. package/payload/gate-sdk/bin/run-gate-tests.sh +1 -2
  91. package/payload/gate-sdk/bin/run-gates.sh +22 -0
  92. package/payload/gate-sdk/bin/upgrade-smoke.sh +21 -16
  93. package/payload/gate-sdk/checks/check-action-run-shell.sh +1 -0
  94. package/payload/gate-sdk/checks/check-commit-msg.gate +3 -0
  95. package/payload/gate-sdk/checks/check-commit-subject.gate +3 -0
  96. package/payload/gate-sdk/checks/check-core-files.gate +3 -0
  97. package/payload/gate-sdk/checks/check-crate-arms.sh +1 -0
  98. package/payload/gate-sdk/checks/check-enforcement-fresh.gate +3 -0
  99. package/payload/gate-sdk/checks/check-exec-bit.gate +3 -0
  100. package/payload/gate-sdk/checks/check-gate-assertions.sh +1 -0
  101. package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +3 -0
  102. package/payload/gate-sdk/checks/check-gate-exemption-tasks.gate +3 -0
  103. package/payload/gate-sdk/checks/check-gate-fail-closed.gate +3 -0
  104. package/payload/gate-sdk/checks/check-gate-fixture-coverage.gate +3 -0
  105. package/payload/gate-sdk/checks/check-gate-output.gate +3 -0
  106. package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +78 -14
  107. package/payload/gate-sdk/checks/check-graph.gate +3 -0
  108. package/payload/gate-sdk/checks/check-hook-exec-bit.gate +3 -0
  109. package/payload/gate-sdk/checks/check-identity.gate +3 -0
  110. package/payload/gate-sdk/checks/check-install-disposition.sh +1 -0
  111. package/payload/gate-sdk/checks/check-kit-enum.gate +3 -0
  112. package/payload/gate-sdk/checks/check-readme-roster.gate +3 -0
  113. package/payload/gate-sdk/checks/check-reads-couples.gate +3 -0
  114. package/payload/gate-sdk/checks/check-root-tiering.gate +3 -0
  115. package/payload/gate-sdk/checks/check-shellcheck.sh +1 -0
  116. package/payload/gate-sdk/checks/check-template-copy-parity.gate +3 -0
  117. package/payload/gate-sdk/checks/check-tree-terms.sh +1 -0
  118. package/payload/gate-sdk/checks/check-workflow-tiering.gate +3 -0
  119. package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +17 -12
  120. package/payload/gate-sdk/gate-tests/check-core-files.test.sh +4 -5
  121. package/payload/gate-sdk/gate-tests/check-exec-bit/bad/dump.txt +2 -1
  122. package/payload/gate-sdk/gate-tests/check-exec-bit/bad/expect.txt +2 -1
  123. package/payload/gate-sdk/gate-tests/check-exec-bit/good/dump.txt +3 -0
  124. package/payload/gate-sdk/gate-tests/check-exec-bit/good/expect.txt +1 -1
  125. package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +3 -4
  126. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +26 -4
  127. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/args +6 -1
  128. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +2 -0
  129. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored-descriptor.gate +4 -0
  130. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored.sh +14 -0
  131. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-descriptor.gate +4 -0
  132. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-held.sh +8 -0
  133. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/args +8 -1
  134. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +3 -0
  135. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored-descriptor.gate +4 -0
  136. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored.sh +14 -0
  137. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-descriptor.gate +4 -0
  138. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-held.sh +8 -0
  139. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks.test.sh +77 -0
  140. package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +4 -5
  141. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +7 -0
  142. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +1 -0
  143. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-bare.sh +4 -0
  144. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-both.sh +5 -0
  145. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-heldtwice.sh +5 -0
  146. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +2 -0
  147. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-twice.sh +5 -0
  148. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +4 -0
  149. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +2 -1
  150. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +1 -0
  151. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-held.sh +4 -0
  152. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +1 -0
  153. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +49 -4
  154. package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +15 -5
  155. package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +12 -0
  156. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-example-gate.md +27 -5
  157. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +12 -0
  158. package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +5 -4
  159. package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +14 -12
  160. package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +43 -17
  161. package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +190 -0
  162. package/payload/gate-sdk/gate-tests/check-identity/bad/gh-hosts.yml +9 -0
  163. package/payload/gate-sdk/gate-tests/check-identity/bad/identity.conf +4 -2
  164. package/payload/gate-sdk/gate-tests/check-identity/bad/scripts/gate-sdk-config.sh +10 -0
  165. package/payload/gate-sdk/gate-tests/check-identity/good/gh-hosts.yml +11 -0
  166. package/payload/gate-sdk/gate-tests/check-identity/good/identity.conf +5 -1
  167. package/payload/gate-sdk/gate-tests/check-identity/good/scripts/gate-sdk-config.sh +10 -0
  168. package/payload/gate-sdk/gate-tests/check-identity.test.sh +114 -0
  169. package/payload/gate-sdk/gate-tests/check-kit-enum/bad/check-native-sample.gate +3 -0
  170. package/payload/gate-sdk/gate-tests/check-kit-enum/bad/gates.list +4 -1
  171. package/payload/gate-sdk/gate-tests/check-kit-enum/good/check-native-sample.gate +3 -0
  172. package/payload/gate-sdk/gate-tests/check-kit-enum/good/expect.txt +1 -1
  173. package/payload/gate-sdk/gate-tests/check-kit-enum/good/gates.list +5 -2
  174. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/args +3 -1
  175. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/README.md +15 -0
  176. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-one.gate +2 -0
  177. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-two.sh +3 -0
  178. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/expect.txt +3 -1
  179. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +1 -1
  180. package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +3 -1
  181. package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/README.md +13 -0
  182. package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/checks/check-delta-one.gate +2 -0
  183. package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/README.md +14 -0
  184. package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-one.sh +3 -0
  185. package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-two.gate +2 -0
  186. package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +1 -1
  187. package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +87 -89
  188. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/agent-budget-guard.sh +4 -0
  189. package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +56 -0
  190. package/payload/gate-sdk/gate-tests/declaration-lib-parity.test.sh +211 -0
  191. package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +16 -15
  192. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +94 -1
  193. package/payload/gate-sdk/lib/gate.sh +232 -25
  194. package/payload/gate-sdk/smoke/install.sh +5 -1
  195. package/payload/guard-kit/SPEC.md +207 -28
  196. package/payload/guard-kit/bin/run-guard-tests.sh +6 -1
  197. package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +105 -0
  198. package/payload/guard-kit/guard-tests/cases.tsv +37 -9
  199. package/payload/guard-kit/lib/guard.sh +170 -6
  200. package/payload/lifecycle-kit/README.md +3 -2
  201. package/payload/lifecycle-kit/SPEC.md +507 -75
  202. package/payload/lifecycle-kit/bin/enter-stage.sh +72 -33
  203. package/payload/lifecycle-kit/bin/file-gap.sh +2 -2
  204. package/payload/lifecycle-kit/checks/check-close-surfaces.gate +3 -0
  205. package/payload/lifecycle-kit/checks/check-stage-entry.gate +3 -0
  206. package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +4 -4
  207. package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +1 -1
  208. package/payload/lifecycle-kit/gate-tests/check-stage-entry/bad/.workflow/WORKFLOW-STATE.txt +3 -3
  209. package/payload/lifecycle-kit/gate-tests/check-stage-entry/good/.workflow/WORKFLOW-STATE.txt +3 -3
  210. package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +22 -22
  211. package/payload/lifecycle-kit/gate-tests/check-stage-evidence/bad/.workflow/WORKFLOW-STATE.txt +2 -2
  212. package/payload/lifecycle-kit/gate-tests/check-stage-evidence/good/.workflow/WORKFLOW-STATE.txt +2 -2
  213. package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +120 -10
  214. package/payload/lifecycle-kit/gate-tests/gap-inbox-route.test.sh +123 -0
  215. package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +11 -11
  216. package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +16 -5
  217. package/payload/lifecycle-kit/lib/stages.sh +5 -0
  218. package/payload/lifecycle-kit/smoke/install.sh +29 -15
  219. package/payload/lifecycle-kit/templates/lead.md +24 -0
  220. package/payload/lifecycle-kit/templates/stages/align.md +20 -2
  221. package/payload/lifecycle-kit/templates/stages/build.md +3 -3
  222. package/payload/lifecycle-kit/templates/stages/close.md +20 -6
  223. package/payload/lifecycle-kit/templates/stages/scope.md +20 -1
  224. package/payload/lifecycle-kit/templates/stages/spec.md +1 -1
  225. package/payload/lifecycle-kit/templates/stages/validate.md +1 -1
  226. package/payload/lifecycle-kit/templates/workflow-state-guard.sh +1 -1
  227. package/payload/queue-kit/README.md +10 -10
  228. package/payload/queue-kit/SPEC.md +301 -84
  229. package/payload/queue-kit/bin/queue-counts.sh +1 -1
  230. package/payload/queue-kit/checks/check-queue-entry-budget.gate +1 -1
  231. package/payload/queue-kit/checks/check-queue-prose-precondition.gate +3 -0
  232. package/payload/queue-kit/checks/check-roadmap-fresh.gate +3 -0
  233. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +15 -0
  234. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +2 -0
  235. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +7 -0
  236. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/expect.txt +4 -0
  237. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/expect.txt +1 -1
  238. package/payload/queue-kit/gate-tests/queue-counts.test.sh +1 -1
  239. package/payload/queue-kit/gate-tests/queue-index.test.sh +55 -119
  240. package/payload/queue-kit/gate-tests/roadmap.test.sh +22 -12
  241. package/payload/queue-kit/lib/queue.sh +0 -49
  242. package/payload/queue-kit/smoke/install.sh +1 -1
  243. package/payload/site-kit/SPEC.md +29 -2
  244. package/payload/site-kit/checks/check-docs-cname-parity.gate +3 -0
  245. package/payload/site-kit/checks/check-docs-render-fidelity.sh +1 -0
  246. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +5 -4
  247. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +6 -5
  248. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/checks/check-sample.gate +3 -0
  249. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/expect.txt +1 -1
  250. package/payload/site-kit/smoke/install.sh +1 -1
  251. package/payload/canon-kit/checks/check-amendment-queue.sh +0 -117
  252. package/payload/canon-kit/checks/check-docs-link-convention.sh +0 -79
  253. package/payload/canon-kit/checks/check-knob-default-coupling.sh +0 -240
  254. package/payload/canon-kit/checks/check-prose-tells.sh +0 -208
  255. package/payload/canon-kit/checks/check-spec-embedded-source.sh +0 -134
  256. package/payload/context-kit/bin/footprint.sh +0 -144
  257. package/payload/context-kit/checks/check-brevity.sh +0 -124
  258. package/payload/context-kit/checks/check-footprint-fresh.sh +0 -39
  259. package/payload/context-kit/checks/check-memory-off.sh +0 -113
  260. package/payload/context-kit/checks/check-settings-paths.sh +0 -94
  261. package/payload/context-kit/checks/check-settings-pins.sh +0 -111
  262. package/payload/context-kit/gate-tests/check-memory-off/bad/args +0 -1
  263. package/payload/context-kit/gate-tests/check-memory-off/good/args +0 -1
  264. package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +0 -62
  265. package/payload/delegation-kit/checks/check-gate-tamper.sh +0 -140
  266. package/payload/delegation-kit/checks/check-rule-citation.sh +0 -77
  267. package/payload/doctrine-kit/checks/check-doctrine-registration.sh +0 -246
  268. package/payload/drift-kit/bin/trajectory.sh +0 -242
  269. package/payload/evidence-kit/checks/check-battery-roster.sh +0 -87
  270. package/payload/evidence-kit/checks/check-evidence-baseline.sh +0 -104
  271. package/payload/evidence-kit/checks/check-evidence-manifest.sh +0 -105
  272. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/args +0 -3
  273. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/args +0 -3
  274. package/payload/gate-sdk/bin/enforcement-map.sh +0 -273
  275. package/payload/gate-sdk/checks/check-commit-msg.sh +0 -51
  276. package/payload/gate-sdk/checks/check-commit-subject.sh +0 -44
  277. package/payload/gate-sdk/checks/check-core-files.sh +0 -76
  278. package/payload/gate-sdk/checks/check-enforcement-fresh.sh +0 -38
  279. package/payload/gate-sdk/checks/check-exec-bit.sh +0 -96
  280. package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +0 -107
  281. package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +0 -106
  282. package/payload/gate-sdk/checks/check-gate-fail-closed.sh +0 -85
  283. package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +0 -93
  284. package/payload/gate-sdk/checks/check-gate-output.sh +0 -103
  285. package/payload/gate-sdk/checks/check-graph.sh +0 -632
  286. package/payload/gate-sdk/checks/check-hook-exec-bit.sh +0 -46
  287. package/payload/gate-sdk/checks/check-identity.sh +0 -135
  288. package/payload/gate-sdk/checks/check-kit-enum.sh +0 -95
  289. package/payload/gate-sdk/checks/check-readme-roster.sh +0 -108
  290. package/payload/gate-sdk/checks/check-reads-couples.sh +0 -200
  291. package/payload/gate-sdk/checks/check-root-tiering.sh +0 -67
  292. package/payload/gate-sdk/checks/check-template-copy-parity.sh +0 -127
  293. package/payload/gate-sdk/checks/check-workflow-tiering.sh +0 -85
  294. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/args +0 -1
  295. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/args +0 -1
  296. package/payload/gate-sdk/gate-tests/check-identity/bad/args +0 -1
  297. package/payload/gate-sdk/gate-tests/check-identity/good/args +0 -1
  298. package/payload/lifecycle-kit/bin/close-surfaces.sh +0 -94
  299. package/payload/lifecycle-kit/checks/check-close-surfaces.sh +0 -64
  300. package/payload/lifecycle-kit/checks/check-stage-entry.sh +0 -198
  301. package/payload/queue-kit/bin/queue-index.sh +0 -182
  302. package/payload/queue-kit/bin/roadmap.sh +0 -76
  303. package/payload/queue-kit/checks/check-queue-prose-precondition.sh +0 -64
  304. package/payload/queue-kit/checks/check-roadmap-fresh.sh +0 -111
  305. package/payload/site-kit/checks/check-docs-cname-parity.sh +0 -81
  306. /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/{gates → scripts}/check-sample.sh +0 -0
  307. /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/{gates → scripts}/check-sample.sh +0 -0
  308. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{check-gamma.sh → scripts/check-gamma.sh} +0 -0
  309. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
  310. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
  311. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gates.list → scripts/gates.list} +0 -0
  312. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{check-beta.sh → scripts/check-beta.sh} +0 -0
  313. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
  314. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
  315. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gates.list → scripts/gates.list} +0 -0
  316. /package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/{site-config.sh → scripts/site-config.sh} +0 -0
  317. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/CNAME +0 -0
  318. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/index.md +0 -0
  319. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/docs → docs}/posts/2026-01-01-legacy.md +0 -0
  320. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/pkg → pkg}/gate-tests/fixture.md +0 -0
  321. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{site-config.sh → scripts/site-config.sh} +0 -0
@@ -76,7 +76,9 @@ pattern): wired as the harness's session-start hook via
76
76
  Every step is guarded and degrades silently — the hook never fails a
77
77
  session. Steps, in order:
78
78
 
79
- 1. **Queue index** — via queue-kit's `queue-index.sh`, collapsing the
79
+ 1. **Queue index** — via queue-kit's `queue-index` arm, reached through the
80
+ battery runner's `--emit` front-end (queue-kit/SPEC.md §The queue-index arm),
81
+ collapsing the
80
82
  Deferred section to a tally except on the close and scope stages. The stage
81
83
  it routes on comes from the cursor — `CONTEXT_KIT_STATE_FILE`'s last data
82
84
  line — with an empty cursor (no such file, or one truncated to its preamble
@@ -91,7 +93,7 @@ session. Steps, in order:
91
93
  A configured icebox tier rides **both** branches as a one-line tally, so
92
94
  this step needs no new stage routing: a dormant entry is already one line,
93
95
  so there is no full listing of it to withhold, and the eviction work that
94
- reads the tier reads `queue-index.sh --icebox-candidates` rather than this
96
+ reads the tier reads `--emit queue-index --icebox-candidates` rather than this
95
97
  index.
96
98
  2. **Dirty-surface pre-run** — for each component with uncommitted
97
99
  changes, pre-run the matching surface index (default: `pub-index` over
@@ -304,7 +306,7 @@ The constrained members and what forces each:
304
306
  the battery at all rather than failing one gate. The representative member is
305
307
  the binary carrying a forcing construct, which is also the floor predicate's
306
308
  own comparison tool.
307
- - `cargo:1.56::contributor` — a **contributor-side** floor, never a runtime one,
309
+ - `cargo:1.71::contributor` — a **contributor-side** floor, never a runtime one,
308
310
  and that reading is now declared on the element and read by name rather than
309
311
  left as an aside: the audience field is what the consumer-side predicate
310
312
  above resolves, so the sentence is enforced instead of merely written. It
@@ -316,14 +318,27 @@ The constrained members and what forces each:
316
318
  this repo today, its first cohort having landed. Everywhere else it stays the weaker
317
319
  **contributor/build** floor: a consumer tree receives a prebuilt binary and never
318
320
  a crate, so nothing there compiles at commit time. Both tiers rest on the same
319
- forcing fact —
320
- the `native/` crate's `edition = "2021"`, the first edition rustc accepts at
321
- 1.56. `cargo` is the member rather than `rustc` because `cargo build` is what the
321
+ forcing fact — the **highest MSRV in the crate's resolved dependency graph**,
322
+ which since the settings cohort took the crate's first dependency
323
+ (gate-sdk/SPEC.md §The settings cohort, and the crate's first dependency) is
324
+ above the `edition = "2021"` floor of 1.56 that governed while the graph was
325
+ empty. It is re-derived against the lock at any dependency change rather than
326
+ recalled, and a move carries every surface stating it — including **§The
327
+ rendered verdict below and `docs/site-architecture.md`, both of which quote
328
+ this element as a *format example***, and both machine-checked by nothing. That
329
+ pair is named rather than described because a format example is the shape a
330
+ floor move keeps missing: it reads as illustration, so it survives the grep a
331
+ reader runs for the surface. The 1.56 → 1.71 move missed
332
+ `docs/site-architecture.md` at authoring and this section's own example at the
333
+ merge, the second caught only by a close-stage audit. It is also a `check-crate-arms` input: clippy
334
+ suppresses a lint whose suggested API postdates the declared floor, so raising
335
+ the floor un-suppresses lints against code no change touched.
336
+ `cargo` is the member rather than `rustc` because `cargo build` is what the
322
337
  contributor routine and the `gates` workflow actually invoke, and the two ship as
323
338
  one toolchain sharing a version banner — the representative-member rule the
324
- `sort::coreutils` entry above states. The floor tracks the edition the crate
325
- declares, not whatever rustc a given box happens to carry; pinning the latter
326
- would be exactly the aspiration this section's rule forbids. Runtime is
339
+ `sort::coreutils` entry above states. The floor tracks what the crate and its
340
+ graph actually require, not whatever rustc a given box happens to carry; pinning
341
+ the latter would be exactly the aspiration this section's rule forbids. Runtime is
327
342
  unaffected: git remains the sole runtime dependency of a ported gate, shelled out
328
343
  rather than embedded (TRAJECTORY.md §The closed rulings owns that constraint).
329
344
  Every other member is a bare name — no construct in the battery forces a version
@@ -351,7 +366,7 @@ not one.
351
366
  for a constrained member, the constraint and its verdict — `` (floor 4.3, ok) ``,
352
367
  `` (requires GNU — below contract) ``, `` (floor 4.3 — unverified) ``; an
353
368
  unconstrained member carries no parenthetical. A member carrying an audience
354
- carries it here too, as `` (floor 1.56, contributor-only, ok) ``, and every line
369
+ carries it here too, as `` (floor 1.71, contributor-only, ok) ``, and every line
355
370
  that names such a member is marked the same way — the absent list and the
356
371
  below-contract list included, because those are the two lines on which *below a
357
372
  floor that is yours* and *below a floor you are not on the hook for* would
@@ -395,8 +410,8 @@ nothing unbidden.
395
410
  `bin/always-loaded.sh` measures the standing surface: the summed line
396
411
  count of the configured surface files (default `CLAUDE.md`) plus the
397
412
  steady-state hook body, approximated by the configured hook-body command
398
- (default: queue-kit's `queue-index.sh --collapse-deferred` when
399
- resolvable). The approximation is deliberate: the meter must never run the
413
+ (default: queue-kit's `queue-index` arm through the battery runner's `--emit`
414
+ front-end, `--collapse-deferred`, when resolvable). The approximation is deliberate: the meter must never run the
400
415
  session-context hook itself — the hook emits this meter's own output line,
401
416
  so self-measurement would recurse and inflate.
402
417
 
@@ -424,7 +439,7 @@ the measurement.
424
439
 
425
440
  ## bin/footprint
426
441
 
427
- `bin/footprint.sh` publishes the kits' measured context footprint — the
442
+ The footprint emitter publishes the kits' measured context footprint — the
428
443
  adoption-cost evidence a consumer weighs before vendoring, the concrete form of
429
444
  the token-economics positioning. Where the meter reads one consumer's live
430
445
  always-loaded total, this reads the tracked kit surfaces and attributes the cost
@@ -458,17 +473,31 @@ honest. The exclusion is also a determinism requirement: the freshness gate
458
473
  byte-compares the emission, so every measured surface must be a static tracked
459
474
  file — a live hook run, being state-dependent, could never be byte-gated.
460
475
 
461
- **Emission.** Bare invocation prints a human header plus the per-kit table;
462
- `--emit` prints the committed `docs/footprint.md` page whole (front matter,
463
- method and exclusion prose, then the table with a totals row) — the `--emit`
464
- symmetry the sibling emitters (`always-loaded.sh`, drift-kit's `trajectory.sh`)
465
- share. Advisory by construction: exit is always zero and the script never joins
466
- `gates.list`; the freshness gate (§check-footprint-fresh) is what blocks a stale
476
+ **Emission, and the substrate it runs on.** The emitter is a **non-gate arm of
477
+ the gate binary**, `--emit-footprint` (gate-sdk/SPEC.md §The non-gate arm), and
478
+ it prints the committed `docs/footprint.md` page whole: front matter, method and
479
+ exclusion prose, then the table with a totals row. It is reached as
480
+ `bash gate-sdk/bin/run-gates.sh --emit footprint`, because an arm receives no
481
+ configuration of its own and that front-end resolves `CONTEXT_KIT_SURFACES`
482
+ across the config bridge before invoking it.
483
+
484
+ The emission is a **library function** the arm wraps rather than the arm itself,
485
+ which is what lets §check-footprint-fresh call it in-process and the value
486
+ rollup consume its per-kit figures as data rather than re-parsing the rendered
467
487
  page.
468
488
 
489
+ **The advisory bare mode did not survive the port**, and its loss is the ported
490
+ script's deletion rather than a separate decision: the shell emitter printed a
491
+ human header plus the table on a bare invocation, and the replacement arm's
492
+ contract is exactly what `--emit` printed. The table is still reachable — it is
493
+ in the emitted page — so what went is the header, which had no reader that the
494
+ page does not serve. Advisory by construction is unchanged: the arm never joins
495
+ `gates.list`, and the freshness gate (§check-footprint-fresh) is what blocks a
496
+ stale page.
497
+
469
498
  ## The brevity gate
470
499
 
471
- `checks/check-brevity.sh` — a section-agnostic name: the governed section
500
+ `check-brevity` — a section-agnostic name: the governed section
472
501
  is a knob, so no section name binds the gate (a consumer's
473
502
  `check-convention-brevity` would be its section-specific counterpart). It scans one designated
474
503
  always-loaded file for a bulleted section where each `- **name:**` bullet
@@ -594,25 +623,75 @@ dir, the untracked local settings) is a local-environment scan, CI-neutral
594
623
 
595
624
  ## check-settings-pins
596
625
 
597
- `checks/check-settings-pins.sh` (hermetic, `precommit`) is the identity.conf
598
- pattern pointed at harness config. Every pin in `CONTEXT_KIT_SETTINGS_PINS`
626
+ `checks/check-settings-pins.gate` (hermetic, `precommit`, dispatched to the gate
627
+ binary — gate-sdk/SPEC.md §The settings cohort, and the crate's first dependency)
628
+ is the identity.conf pattern pointed at harness config. Every pin in
629
+ `CONTEXT_KIT_SETTINGS_PINS`
599
630
  (default `${GATE_SDK_GATES_DIR:-scripts}/settings-pins.conf`) holds against
600
631
  the tracked settings file `CONTEXT_KIT_SETTINGS_FILE` (default
601
- `.claude/settings.json`). Grammar: one `<jq path> = <expected JSON>` per line,
602
- `#` comments and blanks ignored; the expected side is the exact `jq -c`
603
- rendering (`false`, `"1"`, `{"k":1}`). General-purpose by construction — any
632
+ `.claude/settings.json`). Grammar: one `<path> = <expected JSON>` per line,
633
+ `#` comments and blanks ignored. General-purpose by construction — any
604
634
  settings key is pinnable — this consumer's first pins hold the
605
635
  auto-memory-disabling keys.
606
636
 
637
+ **The left-hand side is a path expression, not a `jq` filter**, and the grammar
638
+ is complete:
639
+
640
+ ```
641
+ path := '.' | step+
642
+ step := '.' ident | '.' '"' string '"' | '[' '"' string '"' ']' | '[' int ']'
643
+ ident := [A-Za-z_][A-Za-z0-9_]*
644
+ int := '-'? [0-9]+
645
+ ```
646
+
647
+ A path **opens with `.`**; everything else — pipes, filters, `?` error
648
+ suppression, slices, iteration, functions, arithmetic — is refused, and the gate
649
+ turns that refusal into **exit 2 naming the offending pin, the knob it came from,
650
+ and the construct**. The leading-`.` rule is load-bearing rather than tidy: `jq`
651
+ reads a leading `["k"]` as an array *literal* and returns `["k"]`, so admitting
652
+ one would answer a question `jq` was never asked. This is a narrowing of a
653
+ consumer config surface, taken openly and refusing loudly outside the subset — not
654
+ the silent mis-scan the ERE cohort's foreclosure forbids, which binds *sizing an
655
+ implementation* to one consumer's usage while the documented grammar stays wider.
656
+ The knob's whole documented job is naming a settings key, which a path expression
657
+ expresses in full. Operator-ruled 2026-08-14, with a filter crate (`jaq`) priced
658
+ against it and declined; a later reader must not reopen it on the observation that
659
+ such a crate exists, because that observation is what the ruling was made against.
660
+
661
+ **The right-hand side is a JSON value, and the comparison is structural** — the
662
+ `jq -c` *rendering* is not the contract. A byte-rendering contract is unachievable
663
+ across `jq` versions and therefore cannot be a parity target: `jq` 1.6 re-renders
664
+ every number through a double where 1.7 preserves an unmutated literal, so
665
+ `{"x":1e3}` renders `1000` under one and `1e3` under the other, and a crate
666
+ holding byte parity with "`jq -c`" would be holding parity with whichever `jq` the
667
+ comparison ran against. Structural comparison has no such dependency and diverges
668
+ from the shell only in the forgiving direction — an expected side written with
669
+ non-canonical spacing now matches. Part of what *structural* means is one explicit
670
+ rule the object model does not give free: **numbers compare by their `f64` value
671
+ wherever they occur, every other shape by the parsed value's own equality**. The
672
+ parser's own equality separates `1` from `1.0` by variant where `jq` calls them
673
+ one value, and `jq`'s equality is not shallow, so a pin nested one level deep
674
+ would otherwise report a mismatch nobody would think to test for.
675
+
676
+ Two semantics are **preserved deliberately rather than improved**, because a port
677
+ proves parity and does not repair rules. A path evaluating to `null` is the
678
+ **absent** branch, whether the key is absent or explicitly `null`: the shell
679
+ cannot tell the two apart and the compiled form can, so reproducing the
680
+ conflation is the faithful port, and a session wanting the distinction files an
681
+ entry against this section. And **indexing follows `jq`'s own type rules** — a
682
+ field step on `null` yields `null`; a field step on a string, number, boolean or
683
+ array, and an index step on an object, are errors the gate classifies as a
684
+ malformed pin.
685
+
607
686
  Dispositions: a pin whose path resolves to the expected value passes; a path
608
687
  present with a different value is the legible violation (exit 1, each finding
609
688
  reading path, expected, and actual). Fail-closed (exit 2) on an unreadable or
610
- non-JSON settings file, no `jq`, a malformed pin line, or a pin naming a key
611
- **absent** from the settings file — an absent key is a desynced manifest (the
612
- pins and the settings are one repo's tracked config, edited together), not the
613
- legible drift a red is for. Absent pins file: the opt-in-off state, a clean
614
- skip. Ships a `good/`+`bad/` fixture pair and registers in the consumer's
615
- `gates.list` (this repo's included).
689
+ non-JSON settings file, a malformed pin line, a pin outside the path grammar, or
690
+ a pin naming a key **absent** from the settings file — an absent key is a desynced
691
+ manifest (the pins and the settings are one repo's tracked config, edited
692
+ together), not the legible drift a red is for. Absent pins file: the opt-in-off
693
+ state, a clean skip. Ships a `good/`+`bad/` fixture pair and registers in the
694
+ consumer's `gates.list` (this repo's included).
616
695
 
617
696
  **What a pin is worth depends on which tiers can outrank the file it pins**, and
618
697
  the gate reads exactly one tier. The harness resolves settings across five, in
@@ -631,7 +710,9 @@ the session starts.
631
710
 
632
711
  ## check-settings-paths
633
712
 
634
- `checks/check-settings-paths.sh` (hermetic, `precommit`) holds the second
713
+ `checks/check-settings-paths.gate` (hermetic, `precommit`, dispatched to the gate
714
+ binary alongside its sibling — gate-sdk/SPEC.md §The settings cohort, and the
715
+ crate's first dependency) holds the second
635
716
  invariant over the same tracked file: every entry in
636
717
  `CONTEXT_KIT_SETTINGS_FILE`'s `permissions.allow[]` whose command token is a
637
718
  **literal** repo-relative `.sh` path resolves in the working tree. The knob is
@@ -658,17 +739,19 @@ standing shape for a grant taking arguments is a bare entry beside a
658
739
  `*`-suffixed twin, and the twin's path is as literal — and as strandable — as
659
740
  the bare form's, so it stays in scope.
660
741
 
661
- Splitting the grant into tokens must not expand it. An unquoted array
662
- assignment would glob a pattern grant against the tree and then assert an
663
- arbitrary first match, which greens the whole pattern class instead of skipping
664
- it while leaving the checked count silently inflated; the implementation splits
665
- with `read -ra`, which does not expand.
742
+ Splitting the grant into tokens must not expand it. Globbing a pattern grant
743
+ against the tree and then asserting an arbitrary first match would green the whole
744
+ pattern class instead of skipping it, while leaving the checked count silently
745
+ inflated. The shell form protected that with `read -ra`, which does not expand;
746
+ the compiled form splits on ASCII whitespace, which has no expansion to suppress.
747
+ The property is the same and it is the property, not the idiom, that the fixture
748
+ pair's checked count pins.
666
749
 
667
750
  Dispositions: exit 1 lists each violating entry verbatim beside the path that
668
751
  did not resolve, so the reader can repoint or drop the grant without re-deriving
669
752
  which token was read. The clean line reports the **checked count**, which is
670
753
  what distinguishes a predicate that scoped to the array from one that vacuously
671
- matched nothing. Fail-closed (exit 2) on no `jq`, and on a settings file that is
754
+ matched nothing. Fail-closed (exit 2) on a settings file that is
672
755
  unreadable or not JSON — the sibling gate reads the same file on the same terms,
673
756
  and the file is this gate's sole subject rather than an opt-in manifest, so
674
757
  there is no absent-surface skip to grant. A `--fixture <dir>` mode reads
@@ -695,13 +778,17 @@ The trigger is a partial route by construction: the generated hook reads staged
695
778
  the ordinary edit that strands a grant; what catches the cohort is the full
696
779
  battery, which runs whole-tree with no trigger filter.
697
780
 
698
- `jq` is not on `GATE_SDK_PROGRAM_FLOOR`, so this gate fails port criterion 7 the
699
- day it lands and owes designed-away work at its port. That is recorded here
700
- rather than discovered there: criterion 7 is an ordering signal, not an
701
- eligibility screen, and hand-rolling a JSON-array scan over floor programs would
702
- buy a fragile parser to dodge a dependency the sibling gate already carries on
703
- the same file. One parsing story for the settings file across every reader in
704
- the tree is worth more than the criterion.
781
+ **The criterion-7 debt this gate landed carrying is paid, and this paragraph is
782
+ the record that it was.** `jq` is not on `GATE_SDK_PROGRAM_FLOOR`, so the gate
783
+ failed port criterion 7 the day it landed and owed designed-away work at its port.
784
+ That work is the settings cohort (gate-sdk/SPEC.md §The settings cohort, and the
785
+ crate's first dependency), which retired the requirement for this member and its
786
+ sibling by taking a JSON reader into the crate rather than by hand-rolling a
787
+ parser to dodge a dependency — the outcome this paragraph predicted when it said
788
+ one parsing story for the settings file is worth more than the criterion. `jq`
789
+ remains required by `check-installer-no-deps` alone (excluded with cause) now that
790
+ `check-memory-off` has taken the same reader, so it is retired from the battery
791
+ but for that one member, and not from the shipped install path at all.
705
792
 
706
793
  **The gate is not the prune.** It reads the settings file and writes nothing,
707
794
  but it reds the moment it registers on a tree carrying stranded entries, and the
@@ -710,10 +797,10 @@ landing order is therefore fixed: the operator prunes, then the gate registers.
710
797
 
711
798
  ## check-memory-off
712
799
 
713
- `checks/check-memory-off.sh` (local-environment class, the check-identity
714
- precedent) scans the operator's machine, not the tree — its `# graph:`
715
- manifest couples the pins file it reads and triggers on `*`, because the
716
- surfaces it guards (the memory dir and the untracked local settings) never
800
+ `checks/check-memory-off.gate` (local-environment class, binary-dispatched, the
801
+ check-identity precedent) scans the operator's machine, not the tree — its
802
+ `# graph:` manifest couples the pins file it reads and triggers on `*`, because
803
+ the surfaces it guards (the memory dir and the untracked local settings) never
717
804
  stage. Two red conditions:
718
805
 
719
806
  - the harness's per-project memory dir holds content — any regular file that
@@ -726,13 +813,38 @@ stage. Two red conditions:
726
813
  scan; its default derives the current project's dir from the harness layout
727
814
  (§Layout and configuration). CI-neutral: where the surface is absent the gate
728
815
  is clean, and the clean line states the fail-open caveat — an absent dir
729
- proves nothing about another clone. It fails closed only when it cannot read
730
- what is present to check: a local settings file with no `jq`.
816
+ proves nothing about another clone.
817
+
818
+ **It has one arm, and the knobs are it.** The `--fixture <dir>` arm the shell
819
+ form carried is deleted: every path it redirected — the scanned dirs, the pins
820
+ manifest, the local settings file derived from `CONTEXT_KIT_SETTINGS_FILE` by
821
+ swapping `.json` for `.local.json` — a knob already redirects, so the arm bought
822
+ a shorter spelling and paid for it with a second code path that never drove the
823
+ derivation being checked. The pair and `check-memory-off.test.sh` reach the gate
824
+ through the three knobs instead, which is what makes them a parity oracle for the
825
+ live arm rather than for a fixture-only one.
826
+
827
+ **Comparison is structural and a null actual is a skip**, and the two are
828
+ recorded because they part company with `check-settings-pins` over one manifest.
829
+ The pins file declares *expected JSON*, not an expected byte form, so `1` and
830
+ `1.0` are one value here as they already are there; a right-hand side that is not
831
+ JSON cannot be compared structurally at all and is skipped on this member's one
832
+ disposition for a pin it cannot read — that same line of that same manifest is
833
+ what the sibling gate fail-closes on, so the condition is graded, not lost. A
834
+ path evaluating to **null**, by contrast, is this gate's ordinary clean case: the
835
+ local file simply sets no override for that key. `check-settings-pins` reads a
836
+ null as an absent pin and refuses, which is right for the tracked file it reads
837
+ and would be a correctness regression here, reddening every clone whose local
838
+ settings merely omit a pinned key.
839
+
840
+ Fail-closed (exit 2) when it cannot read what is present to check: a local
841
+ settings file that is unreadable or not valid JSON, a memory dir it cannot walk,
842
+ or a `HOME` it cannot read when the default derivation is the one in play.
731
843
 
732
844
  ## check-footprint-fresh
733
845
 
734
- `checks/check-footprint-fresh.sh` (hermetic, `precommit`) byte-compares the
735
- committed `docs/footprint.md` against `footprint.sh --emit`, the
846
+ `checks/check-footprint-fresh.gate` (hermetic, `precommit`) byte-compares the
847
+ committed `docs/footprint.md` against the footprint emitter, the
736
848
  `check-docs-mirror-fresh`/`check-trajectory-fresh` posture: a generated,
737
849
  freshness-gated projection is Derivation-first's sanctioned copy, so the
738
850
  maintainer re-runs the emitter after any change to a measured surface and a
@@ -740,8 +852,16 @@ stale page reddens the battery. Its `# graph:` manifest couples the measured
740
852
  surfaces — the configured agent file and each kit's `templates/` tree — so an
741
853
  edit to what the page counts re-fires the gate.
742
854
 
855
+ **It is a registry member of the gate binary, and its emitter is a function call
856
+ rather than a spawn.** The comparator and the emitter ported in one unit, so
857
+ where the shell form ran `bash <emitter> --emit` in a subprocess, the compiled
858
+ member calls the emitter module's `emit()` **in-process** — which is what
859
+ retires the family's `bash` hop for this member (gate-sdk/SPEC.md §The first
860
+ cohort, and the rule that selects the next). The `CONTEXT_KIT_SURFACES` the
861
+ emitter reads arrives across the config bridge, declared by this member.
862
+
743
863
  Bare, it runs the live emitter; a two-argument form
744
- (`check-footprint-fresh.sh <projection> <emit>`) compares two pre-baked files,
864
+ (`check-footprint-fresh <projection> <emit>`) compares two pre-baked files,
745
865
  the hermetic mode the `good/`+`bad/` fixture pair drives. Fail-closed (exit 2)
746
866
  on a missing projection or emit source; the stale byte-compare is the exit-1
747
867
  violation. The page's generated numbers ride the `docs/evidence-data.md`
@@ -756,18 +876,18 @@ context-kit/
756
876
  bin/md-index.sh
757
877
  bin/md-section.sh
758
878
  bin/pub-index.sh # dispatcher over the per-language extractors
879
+ lib/context.sh # sourced config loader + the kit's knob defaults; the config bridge sources it
759
880
  lib/toolfloor.sh # sourceable owner: the probe roster + the floor predicate
760
881
  lib/pub-lang/rust.sh # shipped extractor: Rust public items
761
882
  lib/pub-lang/ts.sh # shipped extractor: TypeScript export surface
762
883
  bin/always-loaded.sh
763
- bin/footprint.sh # per-kit two-tier footprint; --emit is docs/footprint.md
764
884
  bin/env-probe.sh # derives the marker-bounded local env profile
765
885
  bin/run-index-tests.sh # expected-output runner for the bin tools
766
- checks/check-brevity.sh
767
- checks/check-settings-pins.sh # hermetic: pins hold against the settings file
768
- checks/check-settings-paths.sh # hermetic: literal .sh grants resolve in the tree
769
- checks/check-memory-off.sh # local-environment: memory dir + local overrides
770
- checks/check-footprint-fresh.sh # hermetic: docs/footprint.md byte-fresh vs the emitter
886
+ checks/check-brevity.gate # hermetic, binary-dispatched: the budgeted section's over-budget pointer bullets
887
+ checks/check-settings-pins.gate # hermetic, binary-dispatched: pins hold against the settings file
888
+ checks/check-settings-paths.gate # hermetic, binary-dispatched: literal .sh grants resolve in the tree
889
+ checks/check-memory-off.gate # local-environment, binary-dispatched: memory dir + local overrides
890
+ checks/check-footprint-fresh.gate # hermetic, binary-dispatched: docs/footprint.md byte-fresh vs the emitter it calls in-process
771
891
  gate-tests/check-brevity/{good,bad}/
772
892
  gate-tests/check-settings-pins/{good,bad}/
773
893
  gate-tests/check-settings-paths/{good,bad}/
@@ -775,6 +895,7 @@ context-kit/
775
895
  gate-tests/check-footprint-fresh/{good,bad}/
776
896
  gate-tests/check-brevity.test.sh # the unmatched-section axis the pair cannot hold
777
897
  gate-tests/check-memory-off.test.sh # the local-override axis the pair cannot hold
898
+ gate-tests/check-settings-pins.test.sh # the refusal axis the pair cannot hold
778
899
  index-tests/ # fixture corpus + expected outputs
779
900
  templates/session-context.sh # consumer copy: marked consumer sections
780
901
  templates/settings-sessionstart.json
@@ -801,6 +922,38 @@ what the consumer left unset, and a set-but-missing `CONTEXT_KIT_CONFIG_FILE`
801
922
  exits 2 rather than silently running on defaults. Knobs (this repo's layout
802
923
  as defaults):
803
924
 
925
+ ### lib/context.sh
926
+
927
+ **The one home of the consumer-config load and of every knob default above**, a
928
+ sourceable library on queue-kit's `lib/queue.sh` shape: it loads the consumer
929
+ config first, then defaults each knob the consumer left unset, then refuses a
930
+ malformed value rather than running on it. Every context-kit gate and `bin/` tool
931
+ sources it instead of re-defaulting, which is the single-home form
932
+ `check-knob-default-coupling` asserts and what keeps a shell-side and a bridged
933
+ value one value rather than two.
934
+
935
+ **The config bridge is what forces a library rather than a convention.**
936
+ gate-sdk's config bridge resolves each declared knob by sourcing one kit's
937
+ library in a subshell, and **exits 2 on a knob that library does not define**
938
+ (gate-sdk/SPEC.md §lib/gate.sh), so a
939
+ `.gate`-dispatched member whose knobs were defaulted inside a check script would
940
+ resolve none of them. That mechanism is indifferent to what any crate links: a
941
+ member receives its knobs this way whatever the binary carries.
942
+
943
+ **Every default here is repo-relative, and that is a bridge requirement rather
944
+ than a style.** A bridged value is baked verbatim into the tracked pre-commit
945
+ hook, so an absolute path would pin one clone's layout into a committed artifact.
946
+ The one knob whose natural value *is* absolute — `CONTEXT_KIT_MEMORY_DIRS`,
947
+ naming a harness directory under `HOME` — defaults to **empty**, and the empty
948
+ value means "derive it" rather than "no dir": the derivation belongs to the one
949
+ member that reads the knob (`native/src/gates/memory_off.rs`), which folds `/`
950
+ and `.` to `-` in the repo toplevel exactly as the harness names each project's
951
+ dir. Deriving it lazily at that reader is also what keeps a `git` subprocess off
952
+ the path of every unrelated knob resolution. The shell library once carried the
953
+ derivation as `context_memory_dir_default()`; it left with the shell gate that
954
+ was its only caller, so the layout rule has one implementation rather than two
955
+ agreeing ones.
956
+
804
957
  - `CONTEXT_KIT_SURFACES` — array of always-loaded files; default
805
958
  `("CLAUDE.md")`. The measured surface is agent-file-name-agnostic: a consumer
806
959
  whose harness reads `AGENTS.md` (or any other always-loaded agent file) sets
@@ -817,7 +970,7 @@ as defaults):
817
970
  default `${GATE_SDK_GATES_DIR:-scripts}/pub-lang`.
818
971
  - `CONTEXT_KIT_HOOK_CMD` — command whose output line count approximates
819
972
  the steady-state hook body; default queue-kit's
820
- `queue-index.sh --collapse-deferred` when resolvable, else empty
973
+ `run-gates.sh --emit queue-index --collapse-deferred` when resolvable, else empty
821
974
  (surfaces only).
822
975
  - `CONTEXT_KIT_DRIFT_REPORT` — path to the consumer's drift-report script;
823
976
  the session-context hook runs it with `--trend` for the brief's drift
@@ -848,7 +1001,16 @@ as defaults):
848
1001
  - `CONTEXT_KIT_SETTINGS_FILE` — the tracked harness settings file
849
1002
  check-settings-pins and check-settings-paths each verify, on a different
850
1003
  invariant, and whose `.local.json` sibling check-memory-off scans; default
851
- `.claude/settings.json`.
1004
+ `.claude/settings.json`. **Explicitly setting it to a path that does not exist
1005
+ is refused (exit 2) by `lib/context.sh` at resolution time**, while leaving it
1006
+ unset and having no file at the default path is not-adopted and degrades at
1007
+ each reader. The refusal lives in the library because that is the last place
1008
+ *set-ness* is visible: once the value crosses gate-sdk's config bridge a
1009
+ compiled reader sees one path string and cannot tell the misconfigured case
1010
+ from the unadopted one. Emptiness is **not** the signal here — the config
1011
+ validation below rejects an empty value as malformed, an invariant older than
1012
+ the bridge — which is why this knob refuses where `DRIFT_KIT_KPIS_FILE`
1013
+ resolves empty (drift-kit/SPEC.md §lib/drift.sh).
852
1014
  - `CONTEXT_KIT_SETTINGS_PINS` — the pins manifest; default
853
1015
  `${GATE_SDK_GATES_DIR:-scripts}/settings-pins.conf`.
854
1016
  - `CONTEXT_KIT_MEMORY_DIRS` — space-separated glob list of harness memory dirs
@@ -889,16 +1051,19 @@ each a case, the emptiness rule being the part of the grammar a reader is
889
1051
  likeliest to get wrong.
890
1052
  The runner registers as its own evidence-kit validate suite
891
1053
  (`index_tests`, the `demo` precedent): the golden the refactor leans on now
892
- has an automated validate-stage consumer. `footprint.sh` is advisory the same way, but its
1054
+ has an automated validate-stage consumer. The footprint emitter is advisory the same way, but its
893
1055
  projection is gated rather than runner-tested: `check-footprint-fresh` byte-holds
894
1056
  `docs/footprint.md` against `--emit`. `check-brevity`, `check-settings-pins`,
895
1057
  `check-memory-off`, and `check-footprint-fresh` are gates and carry the standard
896
1058
  fixture pair; the footprint pair drives the hermetic two-argument mode
897
1059
  (`<projection> <emit>`), the `check-trajectory-fresh` precedent. Both
898
- memory-off gates take a `--fixture <dir>` injection (the check-identity
899
- precedent): the settings-pins pair reads `<dir>/settings.json` against
900
- `<dir>/settings-pins.conf`; the memory-off pair scans `<dir>/memory` for
901
- content. Two direct unit tests hold the axes the pairs fix and so cannot
1060
+ memory-off pairs reach their subject differently, and the difference is the
1061
+ point: the settings-pins pair takes a `--fixture <dir>` injection (the
1062
+ check-identity precedent) reading `<dir>/settings.json` against
1063
+ `<dir>/settings-pins.conf`, while the memory-off pair drives
1064
+ `CONTEXT_KIT_MEMORY_DIRS` from its own case-dir config, because that member's
1065
+ fixture arm was deleted for being a code path its live arm never took.
1066
+ Three direct unit tests hold the axes the pairs fix and so cannot
902
1067
  express: `check-brevity.test.sh` holds the unmatched-section resolution (the
903
1068
  pair fixes `CONTEXT_KIT_BREVITY_SECTION` at the stock default and always
904
1069
  supplies a file carrying it, so neither case can express a section that
@@ -906,7 +1071,11 @@ resolves to nothing — an unmatched section is exit 2, a broken machine rather
906
1071
  than a clean tree). The memory-off local-override axis — an untracked
907
1072
  `settings.local.json` that re-enables a pinned key past an empty dir — cannot
908
1073
  be a good/bad pair (the pair fixes the dir axis), so `check-memory-off.test.sh`
909
- holds it.
1074
+ holds it. `check-settings-pins.test.sh` holds the **refusal** axis: the pair
1075
+ fixes the holds-vs-mismatch axis (exit 0 vs exit 1) alone, so a pin outside
1076
+ the documented path grammar — a jq filter, an iteration, a slice, an array
1077
+ literal — needs its own case to prove the refusal is exit 2, loud and naming
1078
+ the pin, the knob and the construct, never a silent clean verdict.
910
1079
 
911
1080
  `smoke/install.sh` copies the templates into the scratch consumer (config
912
1081
  into the gates dir, hook wiring into the harness settings), runs the hook
@@ -928,8 +1097,8 @@ mechanics (gate-sdk/SPEC.md §Consumer smoke), converts its agent file from
928
1097
  `CLAUDE.md` to `AGENTS.md`, sets the agent-file knobs in the consumer's config
929
1098
  seams (`GATE_SDK_AGENT_FILE`, `LIFECYCLE_KIT_AGENT_FILE`, `DOCTRINE_KIT_AGENT_FILE`,
930
1099
  `CANON_KIT_MANIFEST_FILES`, `CONTEXT_KIT_SURFACES`, `CONTEXT_KIT_BREVITY_FILE`),
931
- then asserts the battery is green, `always-loaded.sh` and `footprint.sh` measure
932
- the `AGENTS.md` surface, and `check-root-tiering`'s built-in allowlist accepts
1100
+ then asserts the battery is green, `always-loaded.sh` and the footprint emitter
1101
+ measure the `AGENTS.md` surface, and `check-root-tiering`'s built-in allowlist accepts
933
1102
  `AGENTS.md` at root while rejecting a stray second agent file. It is a standalone
934
1103
  harness — not driven by `run-consumer-smoke.sh`, which asserts the kit defaults
935
1104
  under zero config — and registers as its own evidence-kit validate suite
@@ -10,31 +10,15 @@ cd "$REPO_ROOT" 2>/dev/null || { echo "always-loaded: cannot enter repo root" >&
10
10
  UPDATE=0
11
11
  [[ "${1:-}" == "--update-baseline" ]] && UPDATE=1
12
12
 
13
- _ck_cfg="${CONTEXT_KIT_CONFIG_FILE:-}"
14
- if [[ -n "$_ck_cfg" ]]; then
15
- [[ -f "$_ck_cfg" ]] || {
16
- echo "context-kit: CONTEXT_KIT_CONFIG_FILE not found: $_ck_cfg" >&2
17
- exit 2
18
- }
19
- # shellcheck source=/dev/null # consumer config path is resolved at runtime
20
- source "$_ck_cfg"
21
- else
22
- _ck_cfg="${GATE_SDK_GATES_DIR:-scripts}/context-config.sh"
23
- if [[ -f "$_ck_cfg" ]]; then
24
- # shellcheck source=/dev/null # consumer config path is resolved at runtime
25
- source "$_ck_cfg"
26
- fi
27
- fi
28
- unset _ck_cfg
29
-
30
- declare -p CONTEXT_KIT_SURFACES >/dev/null 2>&1 || CONTEXT_KIT_SURFACES=("CLAUDE.md")
31
- : "${CONTEXT_KIT_BASELINE_FILE:=${GATE_SDK_WORKFLOW_DIR:-.workflow}/always-loaded-baseline.txt}"
13
+ # shellcheck source=../lib/context.sh
14
+ source "$KIT/lib/context.sh"
32
15
 
16
+ # spec: context-kit/SPEC.md §The always-loaded meter — the default resolves the battery runner's --emit front-end, consumer-first, keeping the two-candidate shape and the empty-on-unresolvable behaviour: the front-end sources the shell library and bridges the arm's knobs, so a consumer's overrides reach the rendering this meter counts (gate-sdk/SPEC.md §The non-gate arm)
33
17
  if [[ -z "${CONTEXT_KIT_HOOK_CMD+x}" ]]; then
34
18
  CONTEXT_KIT_HOOK_CMD=""
35
- for _qi in "${GATE_SDK_GATES_DIR:-scripts}/queue-index.sh" "$KIT/../queue-kit/bin/queue-index.sh"; do
19
+ for _qi in "${GATE_SDK_GATES_DIR:-scripts}/run-gates.sh" "$KIT/../gate-sdk/bin/run-gates.sh"; do
36
20
  if [[ -f "$_qi" ]]; then
37
- CONTEXT_KIT_HOOK_CMD="bash $_qi --collapse-deferred"
21
+ CONTEXT_KIT_HOOK_CMD="bash $_qi --emit queue-index --collapse-deferred"
38
22
  break
39
23
  fi
40
24
  done
@@ -10,24 +10,9 @@ cd "$REPO_ROOT" 2>/dev/null || { echo "env-probe: cannot enter repo root" >&2; e
10
10
  # shellcheck source=../../gate-sdk/lib/inject.sh
11
11
  source "$SDK/lib/inject.sh"
12
12
 
13
- _ck_cfg="${CONTEXT_KIT_CONFIG_FILE:-}"
14
- if [[ -n "$_ck_cfg" ]]; then
15
- [[ -f "$_ck_cfg" ]] || {
16
- echo "context-kit: CONTEXT_KIT_CONFIG_FILE not found: $_ck_cfg" >&2
17
- exit 2
18
- }
19
- # shellcheck source=/dev/null # consumer config path is resolved at runtime
20
- source "$_ck_cfg"
21
- else
22
- _ck_cfg="${GATE_SDK_GATES_DIR:-scripts}/context-config.sh"
23
- if [[ -f "$_ck_cfg" ]]; then
24
- # shellcheck source=/dev/null # consumer config path is resolved at runtime
25
- source "$_ck_cfg"
26
- fi
27
- fi
28
- unset _ck_cfg
13
+ # shellcheck source=../lib/context.sh
14
+ source "$KIT/lib/context.sh"
29
15
 
30
- : "${CONTEXT_KIT_ENV_PROFILE_FILE:=ENV.local.md}"
31
16
  BEGIN="<!-- context-kit:env:begin -->"
32
17
  END="<!-- context-kit:env:end -->"
33
18
 
@@ -0,0 +1,3 @@
1
+ # graph: couples=CLAUDE.md dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+ # spec: context-kit/SPEC.md §The brevity gate — over-budget bullets in the budgeted always-loaded section that cite a deeper doc
@@ -0,0 +1,3 @@
1
+ # graph: couples=docs/footprint.md,CLAUDE.md,kit:templates/*.md,lifecycle-kit/templates/stages/*.md,native/src/gates/footprint_fresh.rs,native/src/emit/footprint.rs,native/src/fresh.rs,native/src/diff.rs dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: context-kit/SPEC.md §check-footprint-fresh — docs/footprint.md is the byte-fresh projection of the footprint emitter, which this member calls in-process rather than spawning
@@ -0,0 +1,3 @@
1
+ # graph: couples=scripts/settings-pins.conf dir=one valve=none tier=precommit trigger=*
2
+ # install: on-surface
3
+ # spec: context-kit/SPEC.md §check-memory-off — local-environment scan: the per-project harness memory dir stays empty and no local settings override re-enables a pinned key
@@ -0,0 +1,3 @@
1
+ # graph: couples=.claude/settings.json,kit:checks/*.sh,scripts/check-*.sh dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: context-kit/SPEC.md §check-settings-paths — every committed allow-list entry whose command token is a literal repo-relative .sh path resolves in the working tree
@@ -0,0 +1,3 @@
1
+ # graph: couples=.claude/settings.json,scripts/settings-pins.conf dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: context-kit/SPEC.md §check-settings-pins — every pin in the pins file holds against the tracked harness settings file
@@ -11,7 +11,6 @@ set -uo pipefail
11
11
  source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
12
12
 
13
13
  DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # context-kit/
14
- GATE="$DIR/checks/check-brevity.sh"
15
14
  SANDBOX="$(mktemp -d)"
16
15
  trap 'rm -rf "$SANDBOX"' EXIT
17
16
 
@@ -50,7 +49,9 @@ EOF
50
49
  check_case() { # $1=label $2=want-rc $3=want-substring $4=file $5..=env assignments
51
50
  local label="$1" want="$2" sub="$3" file="$4"; shift 4
52
51
  local out rc
53
- out="$(env "$@" "$GATE" "$SANDBOX/$file" 2>&1)"; rc=$?
52
+ # spec: gate-sdk/SPEC.md §lib/gate.sh — the overrides are exported rather than passed through
53
+ # `env`, because the config bridge resolves this member's knobs before the argv it builds runs
54
+ out="$(export "$@"; gate_run check-brevity "$DIR/checks" "$SANDBOX/$file" 2>&1)"; rc=$?
54
55
  if [[ "$rc" -ne "$want" ]]; then
55
56
  echo " FAIL [$label]: want exit $want, got $rc -- $out"; fails=$((fails + 1)); return
56
57
  fi
@@ -0,0 +1,4 @@
1
+ # shellcheck shell=bash
2
+ # comment-tier-exempt: the case's own config seam — a knob is how a case reaches this gate now that the `--fixture` arm is gone, and it is what makes the pair drive the code path the live battery drives
3
+ # shellcheck disable=SC2034 # consumed by check-memory-off through the config bridge after sourcing
4
+ CONTEXT_KIT_MEMORY_DIRS="memory"
@@ -0,0 +1,4 @@
1
+ # shellcheck shell=bash
2
+ # comment-tier-exempt: the case's own config seam — a knob is how a case reaches this gate now that the `--fixture` arm is gone, and it is what makes the pair drive the code path the live battery drives
3
+ # shellcheck disable=SC2034 # consumed by check-memory-off through the config bridge after sourcing
4
+ CONTEXT_KIT_MEMORY_DIRS="memory"