checkwright 0.24.0 → 0.26.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 (1044) hide show
  1. package/README.md +35 -1361
  2. package/bin/checkwright.ps1 +157 -0
  3. package/bin/checkwright.sh +187 -44
  4. package/package.json +15 -14
  5. package/payload/artifact/aarch64-apple-darwin/checkwright-gates +0 -0
  6. package/payload/artifact/aarch64-apple-darwin/checkwright-gates.sha256 +1 -0
  7. package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe +0 -0
  8. package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -0
  9. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates +0 -0
  10. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates.sha256 +1 -0
  11. package/payload/artifact/targets.list +120 -24
  12. package/payload/artifact/x86_64-apple-darwin/checkwright-gates +0 -0
  13. package/payload/artifact/x86_64-apple-darwin/checkwright-gates.sha256 +1 -0
  14. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe +0 -0
  15. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -0
  16. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  17. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  18. package/payload/canon-kit/README.md +25 -37
  19. package/payload/canon-kit/checks/check-amendment-queue.gate +2 -2
  20. package/payload/canon-kit/checks/check-amendment-retired-spelling.gate +3 -0
  21. package/payload/canon-kit/checks/check-amendment-update-target.gate +3 -0
  22. package/payload/canon-kit/checks/check-comment-tier.gate +1 -1
  23. package/payload/canon-kit/checks/check-deprecation-task.gate +2 -1
  24. package/payload/canon-kit/checks/check-docs-cmd.gate +2 -2
  25. package/payload/canon-kit/checks/check-docs-link-convention.gate +1 -1
  26. package/payload/canon-kit/checks/check-docs-restatement-parity.gate +4 -0
  27. package/payload/canon-kit/checks/check-fence-command-head.gate +3 -0
  28. package/payload/canon-kit/checks/check-fence-run.gate +3 -0
  29. package/payload/canon-kit/checks/check-install-claim.gate +2 -1
  30. package/payload/canon-kit/checks/check-knob-citation.gate +1 -1
  31. package/payload/canon-kit/checks/check-manifest-count.gate +1 -1
  32. package/payload/canon-kit/checks/check-manifest-temporal.gate +1 -1
  33. package/payload/canon-kit/checks/check-md-refs.gate +1 -1
  34. package/payload/canon-kit/checks/check-md-unwrapped.gate +3 -0
  35. package/payload/canon-kit/checks/check-measured-claim.gate +2 -1
  36. package/payload/canon-kit/checks/check-payload-claim.gate +2 -1
  37. package/payload/canon-kit/checks/check-prose-bounds.gate +3 -0
  38. package/payload/canon-kit/checks/check-prose-enum.gate +2 -1
  39. package/payload/canon-kit/checks/check-prose-tells.gate +1 -1
  40. package/payload/canon-kit/checks/check-provenance-seam.gate +3 -0
  41. package/payload/canon-kit/checks/check-spec-derivable-section.gate +1 -1
  42. package/payload/canon-kit/checks/check-spec-dod-singleton.gate +1 -1
  43. package/payload/canon-kit/checks/check-spec-embedded-source.gate +1 -1
  44. package/payload/canon-kit/checks/check-spec-fence-balance.gate +1 -1
  45. package/payload/canon-kit/checks/check-spec-pointer.gate +2 -2
  46. package/payload/canon-kit/checks/check-surface-duplication.gate +3 -0
  47. package/payload/canon-kit/checks/check-todo-task-liveness.gate +1 -1
  48. package/payload/canon-kit/checks/check-tracking-claim.gate +1 -1
  49. package/payload/canon-kit/checks/check-unmarked-claim.gate +4 -0
  50. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-tidy.md +3 -0
  51. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +37 -8
  52. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +6 -3
  53. package/payload/canon-kit/gate-tests/check-amendment-queue/good/SPEC-widget.md +7 -0
  54. package/payload/canon-kit/gate-tests/check-amendment-queue/good/TASK-QUEUE.md +11 -3
  55. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/SPEC-nosection.md +16 -0
  56. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/SPEC-thing.md +26 -0
  57. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/expect.txt +8 -0
  58. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/surface/one.md +4 -0
  59. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/surface/two.md +3 -0
  60. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/SPEC-tidy.md +20 -0
  61. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/SPEC-widget.md +37 -0
  62. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/component/README.md +4 -0
  63. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/component/SPEC.md +4 -0
  64. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/expect.txt +1 -0
  65. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/unnamed.md +4 -0
  66. package/payload/canon-kit/gate-tests/check-amendment-update-target/bad/SPEC-thing.md +26 -0
  67. package/payload/canon-kit/gate-tests/check-amendment-update-target/bad/expect.txt +8 -0
  68. package/payload/canon-kit/gate-tests/check-amendment-update-target/good/SPEC-widget.md +47 -0
  69. package/payload/canon-kit/gate-tests/check-amendment-update-target/good/expect.txt +1 -0
  70. package/payload/canon-kit/gate-tests/check-amendment-update-target.test.sh +82 -0
  71. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +1 -1
  72. package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +37 -26
  73. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/TASK-QUEUE.md +3 -1
  74. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.knobs +2 -0
  75. package/payload/canon-kit/gate-tests/check-deprecation-task/good/TASK-QUEUE.md +6 -2
  76. package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -1
  77. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.knobs +2 -0
  78. package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +12 -10
  79. package/payload/canon-kit/gate-tests/check-docs-cmd/good/doc.md +4 -1
  80. package/payload/canon-kit/gate-tests/check-docs-cmd.test.sh +61 -0
  81. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/expect.txt +3 -0
  82. package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +21 -2
  83. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/expect.txt +2 -0
  84. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/kit/README.md +10 -0
  85. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/kit/index.md +11 -0
  86. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/scripts/canon-config.knobs +2 -0
  87. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/scripts/gate-sdk-config.knobs +2 -0
  88. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/expect.txt +1 -0
  89. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/kit/README.md +12 -0
  90. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/kit/index.md +13 -0
  91. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/scripts/canon-config.knobs +2 -0
  92. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/scripts/gate-sdk-config.knobs +2 -0
  93. package/payload/canon-kit/gate-tests/check-fence-command-head/bad/args +1 -0
  94. package/payload/canon-kit/gate-tests/check-fence-command-head/bad/doc.md +16 -0
  95. package/payload/canon-kit/gate-tests/check-fence-command-head/bad/expect.txt +5 -0
  96. package/payload/canon-kit/gate-tests/check-fence-command-head/good/args +1 -0
  97. package/payload/canon-kit/gate-tests/check-fence-command-head/good/bin/run.sh +3 -0
  98. package/payload/canon-kit/gate-tests/check-fence-command-head/good/doc.md +41 -0
  99. package/payload/canon-kit/gate-tests/check-fence-command-head/good/expect.txt +1 -0
  100. package/payload/canon-kit/gate-tests/check-fence-command-head/good/lib/tool.sh +5 -0
  101. package/payload/canon-kit/gate-tests/check-fence-command-head/good/scripts/canon-config.knobs +2 -0
  102. package/payload/canon-kit/gate-tests/check-fence-run/bad/args +1 -0
  103. package/payload/canon-kit/gate-tests/check-fence-run/bad/doc.md +32 -0
  104. package/payload/canon-kit/gate-tests/check-fence-run/bad/expect.txt +7 -0
  105. package/payload/canon-kit/gate-tests/check-fence-run/good/args +1 -0
  106. package/payload/canon-kit/gate-tests/check-fence-run/good/doc.md +31 -0
  107. package/payload/canon-kit/gate-tests/check-fence-run/good/expect.txt +1 -0
  108. package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.knobs +7 -0
  109. package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.knobs +7 -0
  110. package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +42 -7
  111. package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +1 -2
  112. package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
  113. package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +37 -8
  114. package/payload/canon-kit/gate-tests/check-manifest-count/bad/SPEC.md +3 -0
  115. package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +10 -0
  116. package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +6 -6
  117. package/payload/canon-kit/gate-tests/check-md-refs.test.sh +1 -1
  118. package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/doc.md +13 -0
  119. package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/expect.txt +4 -0
  120. package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/scripts/canon-config.knobs +2 -0
  121. package/payload/canon-kit/gate-tests/check-md-unwrapped/good/doc.md +45 -0
  122. package/payload/canon-kit/gate-tests/check-md-unwrapped/good/expect.txt +1 -0
  123. package/payload/canon-kit/gate-tests/check-md-unwrapped/good/scripts/canon-config.knobs +4 -0
  124. package/payload/canon-kit/gate-tests/check-measured-claim/bad/SPEC.md +3 -0
  125. package/payload/canon-kit/gate-tests/check-measured-claim/bad/expect.txt +1 -0
  126. package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.knobs +4 -0
  127. package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +8 -0
  128. package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.knobs +4 -0
  129. package/payload/canon-kit/gate-tests/check-measured-claim/good/worktrees/SPEC.md +12 -0
  130. package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +32 -13
  131. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.knobs +6 -0
  132. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.knobs +6 -0
  133. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/CLAUDE.md +9 -0
  134. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/SPEC.md +11 -0
  135. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/expect.txt +3 -0
  136. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/scripts/canon-config.knobs +3 -0
  137. package/payload/canon-kit/gate-tests/check-prose-bounds/good/CLAUDE.md +10 -0
  138. package/payload/canon-kit/gate-tests/check-prose-bounds/good/SPEC.md +27 -0
  139. package/payload/canon-kit/gate-tests/check-prose-bounds/good/expect.txt +1 -0
  140. package/payload/canon-kit/gate-tests/check-prose-bounds/good/scripts/canon-config.knobs +3 -0
  141. package/payload/canon-kit/gate-tests/check-prose-bounds.test.sh +98 -0
  142. package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.knobs +3 -0
  143. package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.knobs +3 -0
  144. package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +55 -25
  145. package/payload/canon-kit/gate-tests/check-prose-tells/bad/prose.md +2 -0
  146. package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.knobs +5 -0
  147. package/payload/canon-kit/gate-tests/check-prose-tells/good/prose.md +6 -0
  148. package/payload/canon-kit/gate-tests/check-prose-tells/good/scripts/{canon-config.sh → canon-config.knobs} +2 -5
  149. package/payload/canon-kit/gate-tests/check-prose-tells/good/worktrees/prose.md +17 -0
  150. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/TASK-QUEUE.md +15 -0
  151. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/expect.txt +8 -0
  152. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/canon-config.knobs +3 -0
  153. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/gate-sdk-config.knobs +2 -0
  154. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/lifecycle-config.knobs +12 -0
  155. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/widget-toolkit/SPEC.md +27 -0
  156. package/payload/canon-kit/gate-tests/check-provenance-seam/good/TASK-QUEUE.md +15 -0
  157. package/payload/canon-kit/gate-tests/check-provenance-seam/good/expect.txt +1 -0
  158. package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/canon-config.knobs +3 -0
  159. package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/gate-sdk-config.knobs +2 -0
  160. package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/lifecycle-config.knobs +12 -0
  161. package/payload/canon-kit/gate-tests/check-provenance-seam/good/widget-toolkit/SPEC.md +20 -0
  162. package/payload/canon-kit/gate-tests/check-provenance-seam.test.sh +136 -0
  163. package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +1 -1
  164. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/README.md +6 -0
  165. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/SPEC-widget.md +5 -0
  166. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.rs +2 -0
  167. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +4 -0
  168. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.knobs +6 -0
  169. package/payload/canon-kit/gate-tests/check-spec-pointer/good/README.md +15 -0
  170. package/payload/canon-kit/gate-tests/check-spec-pointer/good/SPEC-widget.md +10 -0
  171. package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -1
  172. package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.rs +2 -0
  173. package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.knobs +6 -0
  174. package/payload/canon-kit/gate-tests/check-spec-pointer/good/vendored-kit/notes.txt +4 -0
  175. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/TASK-QUEUE.md +3 -1
  176. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/TASK-QUEUE.md +9 -3
  177. package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +1 -1
  178. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/SPEC.md +14 -0
  179. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/expect.txt +4 -0
  180. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/scripts/canon-config.knobs +4 -0
  181. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/SPEC.md +21 -0
  182. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/expect.txt +1 -0
  183. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/scripts/canon-config.knobs +4 -0
  184. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/worktrees/SPEC.md +11 -0
  185. package/payload/canon-kit/gate-tests/check-unmarked-claim.test.sh +110 -0
  186. package/payload/canon-kit/templates/SPEC-amendment.md +63 -27
  187. package/payload/canon-kit/templates/canon-config.knobs +1 -0
  188. package/payload/context-kit/README.md +33 -61
  189. package/payload/context-kit/checks/check-brevity.gate +2 -2
  190. package/payload/context-kit/checks/check-footprint-fresh.gate +3 -2
  191. package/payload/context-kit/checks/check-memory-off.gate +1 -1
  192. package/payload/context-kit/checks/check-settings-paths.gate +2 -2
  193. package/payload/context-kit/checks/check-settings-pins.gate +1 -1
  194. package/payload/context-kit/checks/check-surface-ratchet.gate +3 -0
  195. package/payload/context-kit/gate-tests/check-brevity/bad/CLAUDE.md +9 -2
  196. package/payload/context-kit/gate-tests/check-brevity/bad/expect.txt +1 -0
  197. package/payload/context-kit/gate-tests/check-brevity/good/CLAUDE.md +9 -4
  198. package/payload/context-kit/gate-tests/check-brevity/good/expect.txt +1 -1
  199. package/payload/context-kit/gate-tests/check-brevity.test.sh +107 -24
  200. package/payload/context-kit/gate-tests/check-footprint-fresh/good/CLAUDE.md +6 -0
  201. package/payload/context-kit/gate-tests/check-footprint-fresh/good/demo-kit/SPEC.md +3 -0
  202. package/payload/context-kit/gate-tests/check-footprint-fresh/good/demo-kit/templates/guide.md +3 -0
  203. package/payload/context-kit/gate-tests/check-footprint-fresh/good/docs/footprint.md +30 -0
  204. package/payload/context-kit/gate-tests/check-memory-off/bad/scripts/{context-config.sh → context-config.knobs} +1 -3
  205. package/payload/context-kit/gate-tests/check-memory-off/good/scripts/{context-config.sh → context-config.knobs} +1 -3
  206. package/payload/context-kit/gate-tests/check-memory-off.test.sh +1 -1
  207. package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +2 -0
  208. package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +21 -0
  209. package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/run-gates.sh +4 -0
  210. package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +2 -1
  211. package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +48 -1
  212. package/payload/context-kit/gate-tests/check-settings-paths/good/tools/run-gates.sh +4 -0
  213. package/payload/context-kit/gate-tests/check-settings-pins.test.sh +1 -1
  214. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/CLAUDE.md +5 -0
  215. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/expect.txt +2 -0
  216. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/scripts/context-config.knobs +4 -0
  217. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/surface-ceiling.txt +2 -0
  218. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/templates/ungoverned.md +3 -0
  219. package/payload/context-kit/gate-tests/check-surface-ratchet/good/CLAUDE.md +3 -0
  220. package/payload/context-kit/gate-tests/check-surface-ratchet/good/expect.txt +1 -0
  221. package/payload/context-kit/gate-tests/check-surface-ratchet/good/scripts/context-config.knobs +4 -0
  222. package/payload/context-kit/gate-tests/check-surface-ratchet/good/surface-ceiling.txt +4 -0
  223. package/payload/context-kit/gate-tests/check-surface-ratchet/good/templates/held.md +4 -0
  224. package/payload/context-kit/gate-tests/check-surface-ratchet.test.sh +76 -0
  225. package/payload/context-kit/index-tests/corpus/baseline.txt +1 -1
  226. package/payload/context-kit/index-tests/corpus/surface.md +1 -6
  227. package/payload/context-kit/index-tests/expected/always-loaded.txt +1 -1
  228. package/payload/context-kit/templates/close-brevity.md +9 -28
  229. package/payload/context-kit/templates/context-config.knobs +1 -0
  230. package/payload/context-kit/templates/session-context.sh +43 -28
  231. package/payload/delegation-kit/README.md +35 -59
  232. package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +1 -1
  233. package/payload/delegation-kit/checks/check-gate-tamper.gate +1 -1
  234. package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +23 -2
  235. package/payload/delegation-kit/templates/agent-execution.md +23 -372
  236. package/payload/delegation-kit/templates/delegation-config.knobs +4 -0
  237. package/payload/delegation-kit/templates/dispatch-checklists.md +8 -45
  238. package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +33 -17
  239. package/payload/doctrine-kit/DOCTRINE.md +92 -458
  240. package/payload/doctrine-kit/README.md +24 -55
  241. package/payload/doctrine-kit/checks/check-doctrine-registration.gate +1 -1
  242. package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +48 -3
  243. package/payload/drift-kit/README.md +43 -89
  244. package/payload/drift-kit/templates/close-knowledge.md +7 -22
  245. package/payload/drift-kit/templates/drift-config.knobs +1 -0
  246. package/payload/drift-kit/templates/economics.md +10 -48
  247. package/payload/drift-kit/templates/kpi-deprecated-surface.sh +31 -9
  248. package/payload/drift-kit/templates/kpis.list +2 -1
  249. package/payload/drift-kit/templates/price-table.tsv +1 -1
  250. package/payload/evidence-kit/README.md +23 -46
  251. package/payload/evidence-kit/checks/check-battery-roster.gate +1 -1
  252. package/payload/evidence-kit/checks/check-evidence-baseline.gate +2 -2
  253. package/payload/evidence-kit/checks/check-evidence-manifest.gate +1 -1
  254. package/payload/evidence-kit/checks/check-producer-liveness.gate +3 -0
  255. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.knobs +7 -0
  256. package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.knobs +7 -0
  257. package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +7 -7
  258. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/TASK-QUEUE.md +3 -1
  259. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/args +1 -0
  260. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/expect.txt +2 -0
  261. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/scripts/evidence-config.knobs +4 -0
  262. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/validate-baseline.txt +1 -0
  263. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/TASK-QUEUE.md +3 -1
  264. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/args +1 -0
  265. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/scripts/evidence-config.knobs +3 -0
  266. package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +134 -14
  267. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/scripts/{evidence-config.sh → evidence-config.knobs} +3 -5
  268. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/scripts/{evidence-config.sh → evidence-config.knobs} +3 -5
  269. package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +5 -4
  270. package/payload/evidence-kit/gate-tests/diff-baseline-status.test.sh +128 -0
  271. package/payload/evidence-kit/gate-tests/evidence-lib.test.sh +51 -45
  272. package/payload/evidence-kit/gate-tests/pre-hook.test.sh +66 -0
  273. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +29 -16
  274. package/payload/evidence-kit/templates/evidence-config.knobs +1 -0
  275. package/payload/gate-sdk/README.md +47 -73
  276. package/payload/gate-sdk/bin/build-native.sh +89 -1
  277. package/payload/gate-sdk/bin/run-gates.ps1 +266 -0
  278. package/payload/gate-sdk/bin/run-gates.sh +60 -182
  279. package/payload/gate-sdk/checks/check-action-gh-repo.gate +1 -1
  280. package/payload/gate-sdk/checks/check-action-job-ref.gate +3 -0
  281. package/payload/gate-sdk/checks/check-action-permissions.gate +3 -0
  282. package/payload/gate-sdk/checks/check-action-pinning.gate +1 -1
  283. package/payload/gate-sdk/checks/check-action-run-path.gate +3 -0
  284. package/payload/gate-sdk/checks/check-action-run-shell.gate +3 -0
  285. package/payload/gate-sdk/checks/check-commit-msg.gate +2 -1
  286. package/payload/gate-sdk/checks/check-commit-subject.gate +1 -1
  287. package/payload/gate-sdk/checks/check-core-files.gate +1 -1
  288. package/payload/gate-sdk/checks/check-crate-arms.gate +3 -0
  289. package/payload/gate-sdk/checks/check-enforcement-fresh.gate +3 -2
  290. package/payload/gate-sdk/checks/check-exec-bit.gate +1 -1
  291. package/payload/gate-sdk/checks/check-front-end-fail-open.gate +3 -0
  292. package/payload/gate-sdk/checks/check-gate-assertions.gate +3 -0
  293. package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +1 -1
  294. package/payload/gate-sdk/checks/check-gate-exemption-tasks.gate +1 -1
  295. package/payload/gate-sdk/checks/check-gate-fail-closed.gate +1 -1
  296. package/payload/gate-sdk/checks/check-gate-fixture-coverage.gate +1 -1
  297. package/payload/gate-sdk/checks/check-gate-output.gate +1 -1
  298. package/payload/gate-sdk/checks/check-gate-substrate-parity.gate +3 -0
  299. package/payload/gate-sdk/checks/check-graph.gate +2 -1
  300. package/payload/gate-sdk/checks/check-hook-exec-bit.gate +1 -1
  301. package/payload/gate-sdk/checks/check-identity.gate +1 -1
  302. package/payload/gate-sdk/checks/check-install-disposition.gate +3 -0
  303. package/payload/gate-sdk/checks/check-kit-enum.gate +1 -1
  304. package/payload/gate-sdk/checks/check-kit-registration.gate +1 -1
  305. package/payload/gate-sdk/checks/check-kit-roots-dialect.gate +3 -0
  306. package/payload/gate-sdk/checks/check-packed-links.gate +3 -0
  307. package/payload/gate-sdk/checks/check-path-dialect.gate +3 -0
  308. package/payload/gate-sdk/checks/check-pipe-membership.gate +3 -0
  309. package/payload/gate-sdk/checks/check-portability-floor.gate +4 -0
  310. package/payload/gate-sdk/checks/check-projection-roster.gate +4 -0
  311. package/payload/gate-sdk/checks/check-reads-couples.gate +1 -1
  312. package/payload/gate-sdk/checks/check-root-tiering.gate +1 -1
  313. package/payload/gate-sdk/checks/check-shellcheck.gate +3 -0
  314. package/payload/gate-sdk/checks/check-template-copy-parity.gate +1 -1
  315. package/payload/gate-sdk/checks/check-tree-terms.gate +4 -0
  316. package/payload/gate-sdk/checks/check-workflow-tiering.gate +1 -1
  317. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/args +2 -0
  318. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/expect.txt +1 -0
  319. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/scripts/gate-sdk-config.knobs +1 -0
  320. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/tree/notes.md +3 -0
  321. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/tree/workflows/ci.yml +8 -0
  322. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/args +3 -0
  323. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/expect.txt +1 -0
  324. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/scripts/gate-sdk-config.knobs +1 -0
  325. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/tree/notes.md +3 -0
  326. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/tree/workflows/ci.yml +8 -0
  327. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/args +3 -0
  328. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/expect.txt +5 -0
  329. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/tree/workflows/empty-allowlist.yml +29 -0
  330. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/tree/workflows/gates.yml +25 -0
  331. package/payload/gate-sdk/gate-tests/check-action-permissions/good/args +5 -0
  332. package/payload/gate-sdk/gate-tests/check-action-permissions/good/expect.txt +1 -0
  333. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/action.yml +9 -0
  334. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/not-actions.yml +7 -0
  335. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/workflows/declared.yml +69 -0
  336. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/workflows/valves.yml +22 -0
  337. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/args +4 -0
  338. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/expect.txt +2 -0
  339. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/tree/scripts/present.sh +3 -0
  340. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/tree/workflows/ci.yml +14 -0
  341. package/payload/gate-sdk/gate-tests/check-action-run-path/good/args +5 -0
  342. package/payload/gate-sdk/gate-tests/check-action-run-path/good/expect.txt +1 -0
  343. package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/scripts/build.sh +3 -0
  344. package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/sub/scripts/inner.sh +3 -0
  345. package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/workflows/ci.yml +36 -0
  346. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/args +4 -2
  347. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/expect.txt +2 -0
  348. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/tree/workflows/runner-dialect.yml +36 -0
  349. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/args +3 -2
  350. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/expect.txt +1 -1
  351. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/tree/workflows/runner-dialect.yml +71 -0
  352. package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +102 -9
  353. package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/smoke/install.sh +1 -1
  354. package/payload/gate-sdk/gate-tests/check-assertion-strength/good/smoke/install.sh +1 -1
  355. package/payload/gate-sdk/gate-tests/check-assertion-strength.test.sh +55 -0
  356. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/expect.txt +1 -0
  357. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/msg.txt +4 -0
  358. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/patterns.list +5 -1
  359. package/payload/gate-sdk/gate-tests/check-commit-msg/good/msg.txt +7 -0
  360. package/payload/gate-sdk/gate-tests/check-commit-msg/good/patterns.list +5 -1
  361. package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +2 -2
  362. package/payload/gate-sdk/gate-tests/check-core-files.test.sh +1 -1
  363. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.knobs +3 -0
  364. package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.knobs +3 -0
  365. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/SPEC.md +3 -0
  366. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/checks/check-demo.gate +1 -0
  367. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/probe.conf +1 -0
  368. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/templates/guide.md +3 -0
  369. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/docs/enforcement.md +33 -0
  370. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/scripts/gate-sdk-config.knobs +1 -0
  371. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/scripts/gates.list +1 -0
  372. package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +1 -1
  373. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/args +3 -0
  374. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/expect.txt +2 -0
  375. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/gate-sdk/bin/run-gates.ps1 +5 -0
  376. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/gate-sdk/bin/run-gates.sh +9 -0
  377. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/args +4 -0
  378. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/expect.txt +1 -0
  379. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/gate-sdk/bin/run-gates.ps1 +5 -0
  380. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/gate-sdk/bin/run-gates.sh +9 -0
  381. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/expect.txt +5 -1
  382. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/SPEC.md +22 -0
  383. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-count.sh +11 -0
  384. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-extra.sh +14 -0
  385. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-zero.sh +7 -0
  386. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -1
  387. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/SPEC.md +30 -0
  388. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/check-qux.sh +13 -0
  389. package/payload/gate-sdk/gate-tests/check-gate-assertions.test.sh +117 -0
  390. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.knobs +2 -0
  391. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.knobs +2 -0
  392. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +6 -12
  393. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +5 -3
  394. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/TASK-QUEUE.md +3 -1
  395. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks.test.sh +4 -2
  396. package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +1 -1
  397. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/ci/build-artifact.sh +9 -0
  398. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/ci.yml +9 -0
  399. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +6 -2
  400. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kit-spec.md +6 -0
  401. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-nospec.sh +4 -0
  402. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-ungrounded.sh +5 -0
  403. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.knobs +5 -0
  404. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +8 -0
  405. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/ci/build-artifact.sh +9 -0
  406. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/ci.yml +16 -0
  407. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +6 -2
  408. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/kit-spec.md +12 -0
  409. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-held.sh +1 -0
  410. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.knobs +5 -0
  411. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +1 -1
  412. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +222 -197
  413. package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +7 -2
  414. package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +4 -0
  415. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +3 -1
  416. package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +1 -1
  417. package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +8 -8
  418. package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +2 -2
  419. package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +49 -14
  420. package/payload/gate-sdk/gate-tests/check-identity/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +4 -4
  421. package/payload/gate-sdk/gate-tests/check-identity/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +4 -4
  422. package/payload/gate-sdk/gate-tests/check-identity.test.sh +1 -1
  423. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-eta.sh +7 -0
  424. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-iota.sh +7 -0
  425. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-theta.sh +7 -0
  426. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-zeta.gate +3 -0
  427. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/smoke/install.sh +1 -1
  428. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/args +8 -5
  429. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/expect.txt +5 -0
  430. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/native/src/installer/recipe.rs +10 -0
  431. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
  432. package/payload/gate-sdk/gate-tests/check-install-disposition/good/args +8 -4
  433. package/payload/gate-sdk/gate-tests/check-install-disposition/good/expect.txt +2 -0
  434. package/payload/gate-sdk/gate-tests/check-install-disposition/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
  435. package/payload/gate-sdk/gate-tests/check-install-disposition/good/{alpha-kit → site-kit}/checks/check-alpha.sh +1 -1
  436. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-beta.gate +3 -0
  437. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-gamma.sh +6 -0
  438. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-omega.sh +7 -0
  439. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-psi.sh +7 -0
  440. package/payload/gate-sdk/gate-tests/check-install-disposition/good/{alpha-kit → site-kit}/smoke/install.sh +2 -2
  441. package/payload/gate-sdk/gate-tests/check-kit-registration/bad/registry-doc.md +15 -12
  442. package/payload/gate-sdk/gate-tests/check-kit-registration/good/args +7 -5
  443. package/payload/gate-sdk/gate-tests/check-kit-registration/good/scripts/gate-sdk-config.knobs +2 -0
  444. package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +2 -2
  445. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/args +5 -0
  446. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/expect.txt +1 -0
  447. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/checks/placeholder.txt +3 -0
  448. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/gate-tests/alpha.test.sh +3 -0
  449. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/lib/alpha.sh +3 -0
  450. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/checks/placeholder.txt +3 -0
  451. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/gate-tests/beta.test.sh +3 -0
  452. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/lib/beta.sh +3 -0
  453. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/gate-sdk/checks/placeholder.txt +3 -0
  454. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/gate-sdk/lib/gate.sh +3 -0
  455. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/scripts/gate-sdk-config.knobs +7 -0
  456. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/scripts/gates.list +3 -0
  457. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/args +7 -0
  458. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/expect.txt +1 -0
  459. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/checks/placeholder.txt +3 -0
  460. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/gate-tests/alpha.test.sh +3 -0
  461. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/lib/alpha.sh +3 -0
  462. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/checks/placeholder.txt +3 -0
  463. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/gate-tests/beta.test.sh +3 -0
  464. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/lib/beta.sh +3 -0
  465. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/gate-sdk/checks/placeholder.txt +3 -0
  466. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/gate-sdk/lib/gate.sh +3 -0
  467. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/scripts/gates.list +3 -0
  468. package/payload/gate-sdk/gate-tests/check-packed-links/bad/alpha-kit/README.md +5 -0
  469. package/payload/gate-sdk/gate-tests/check-packed-links/bad/args +5 -0
  470. package/payload/gate-sdk/gate-tests/check-packed-links/bad/beta-kit/README.md +5 -0
  471. package/payload/gate-sdk/gate-tests/check-packed-links/bad/expect.txt +2 -0
  472. package/payload/gate-sdk/gate-tests/check-packed-links/bad/scripts/gate-sdk-config.knobs +4 -0
  473. package/payload/gate-sdk/gate-tests/check-packed-links/good/alpha-kit/README.md +5 -0
  474. package/payload/gate-sdk/gate-tests/check-packed-links/good/args +8 -0
  475. package/payload/gate-sdk/gate-tests/check-packed-links/good/beta-kit/README.md +9 -0
  476. package/payload/gate-sdk/gate-tests/check-packed-links/good/expect.txt +1 -0
  477. package/payload/gate-sdk/gate-tests/check-packed-links/good/gamma-kit/SPEC.md +4 -0
  478. package/payload/gate-sdk/gate-tests/check-packed-links/good/scripts/gate-sdk-config.knobs +6 -0
  479. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/args +3 -0
  480. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/expect.txt +15 -0
  481. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/primitive.rs +19 -0
  482. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/producer.rs +8 -0
  483. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/walk.rs +13 -0
  484. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/bound-root.sh +5 -0
  485. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/case-arm.sh +6 -0
  486. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/commented.sh +5 -0
  487. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/common-dir.sh +4 -0
  488. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/glob-test.sh +4 -0
  489. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/late-anchor.sh +7 -0
  490. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/logical-readback.sh +5 -0
  491. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/probe.sh +7 -0
  492. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/two-root.sh +5 -0
  493. package/payload/gate-sdk/gate-tests/check-path-dialect/good/args +3 -0
  494. package/payload/gate-sdk/gate-tests/check-path-dialect/good/expect.txt +13 -0
  495. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/commented.rs +5 -0
  496. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/local.rs +12 -0
  497. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/namespace.rs +11 -0
  498. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/typed.rs +10 -0
  499. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/verdict.rs +5 -0
  500. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/walk.rs +24 -0
  501. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/anchored.sh +6 -0
  502. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/cd-only.sh +7 -0
  503. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/commented.sh +6 -0
  504. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/one-root.sh +4 -0
  505. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/probe.sh +8 -0
  506. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/rooted.sh +23 -0
  507. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/subshell.sh +6 -0
  508. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/two-line.sh +8 -0
  509. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/verdict.sh +7 -0
  510. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/args +4 -0
  511. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/expect.txt +6 -0
  512. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/scripts/gate-sdk-config.knobs +1 -0
  513. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/array-grep.sh +6 -0
  514. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/echo-max-count.sh +5 -0
  515. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/gate-tests/membership.test.sh +6 -0
  516. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/loop-head.sh +5 -0
  517. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/tests/relocated.test.sh +6 -0
  518. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/args +5 -0
  519. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/expect.txt +3 -0
  520. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/full-reader.sh +4 -0
  521. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/gate-tests/check-x/bad/violating.test.sh +6 -0
  522. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/gate-tests/clean.test.sh +8 -0
  523. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/loop-membership.sh +8 -0
  524. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/no-pipefail.sh +6 -0
  525. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/one-line-producer.sh +5 -0
  526. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/args +2 -0
  527. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/expect.txt +8 -0
  528. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/patterns.list +4 -0
  529. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/scripts/gate-sdk-config.knobs +4 -0
  530. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/empty-reason-verb +5 -0
  531. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/strings.ps1 +6 -0
  532. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/too-far-verb +5 -0
  533. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/undeclared-verb +3 -0
  534. package/payload/gate-sdk/gate-tests/check-portability-floor/good/args +2 -0
  535. package/payload/gate-sdk/gate-tests/check-portability-floor/good/expect.txt +1 -0
  536. package/payload/gate-sdk/gate-tests/check-portability-floor/good/patterns.list +5 -0
  537. package/payload/gate-sdk/gate-tests/check-portability-floor/good/scripts/gate-sdk-config.knobs +4 -0
  538. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/front.ps1 +7 -0
  539. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/plain-verb +5 -0
  540. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/portability-patterns.list +5 -0
  541. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/upgrade-verb +7 -0
  542. package/payload/gate-sdk/gate-tests/check-portability-floor.test.sh +154 -0
  543. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/demo-kit/checks/check-beta.gate +2 -0
  544. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/docs/roster.md +11 -0
  545. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/expect.txt +7 -0
  546. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-alpha.gate +2 -0
  547. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-gamma.gate +2 -0
  548. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-plain.gate +1 -0
  549. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/gate-sdk-config.knobs +3 -0
  550. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/gates.list +4 -0
  551. package/payload/gate-sdk/gate-tests/check-projection-roster/good/demo-kit/checks/check-beta.gate +2 -0
  552. package/payload/gate-sdk/gate-tests/check-projection-roster/good/docs/roster.md +16 -0
  553. package/payload/gate-sdk/gate-tests/check-projection-roster/good/expect.txt +1 -0
  554. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-alpha.gate +2 -0
  555. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-delta.gate +2 -0
  556. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-epsilon.gate +2 -0
  557. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-plain.gate +1 -0
  558. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/gate-sdk-config.knobs +4 -0
  559. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/gates.list +5 -0
  560. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.knobs +4 -0
  561. package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +1 -1
  562. package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.knobs +4 -0
  563. package/payload/gate-sdk/gate-tests/check-reads-couples/bad/expect.txt +1 -1
  564. package/payload/gate-sdk/gate-tests/check-reads-couples/bad/sandbox-gate.sh +4 -4
  565. package/payload/gate-sdk/gate-tests/check-reads-couples/good/sandbox-gate.sh +4 -4
  566. package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +25 -20
  567. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/alpha-kit/smoke/install.sh +1 -1
  568. package/payload/gate-sdk/gate-tests/{check-template-registry-parity/bad/scripts/gate-sdk-config.sh → check-smoke-entry-guard/bad/scripts/gate-sdk-config.knobs} +2 -3
  569. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/install.sh +1 -1
  570. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/violation.sh +1 -1
  571. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/args +1 -1
  572. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/beta-kit/smoke/install.sh +1 -1
  573. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.knobs +4 -0
  574. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/args +3 -1
  575. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/delegation-kit/templates/session-note.sh +6 -0
  576. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/expect.txt +1 -1
  577. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/session-note.sh +6 -0
  578. package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +1 -1
  579. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/args +2 -0
  580. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/drift-kit/templates/kpis.list +18 -0
  581. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/expect.txt +2 -0
  582. package/payload/gate-sdk/gate-tests/{check-smoke-entry-guard/bad/scripts/gate-sdk-config.sh → check-template-registry-parity/bad/scripts/gate-sdk-config.knobs} +2 -3
  583. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/args +3 -1
  584. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/drift-kit/templates/kpis.list +17 -0
  585. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/expect.txt +1 -1
  586. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.knobs +4 -0
  587. package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +5 -5
  588. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/expect.txt +6 -0
  589. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/patterns.list +4 -0
  590. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/accounts.txt +1 -0
  591. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/multi.txt +4 -0
  592. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/second-leak.txt +2 -0
  593. package/payload/gate-sdk/gate-tests/check-tree-terms/good/expect.txt +1 -1
  594. package/payload/gate-sdk/gate-tests/check-tree-terms/good/patterns.list +7 -0
  595. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/anchored.txt +5 -0
  596. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/handles.txt +2 -0
  597. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/msg-patterns.list +2 -0
  598. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/msg-patterns.local.list +3 -0
  599. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/worktrees/vendored-note.txt +3 -0
  600. package/payload/gate-sdk/gate-tests/check-tree-terms.test.sh +133 -0
  601. package/payload/gate-sdk/gate-tests/emit-arm-shape.test.sh +95 -0
  602. package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +10 -10
  603. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +10 -184
  604. package/payload/gate-sdk/gate-tests/reads-census.test.sh +96 -0
  605. package/payload/gate-sdk/gate-tests/run-arm-contract.test.sh +190 -0
  606. package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +64 -41
  607. package/payload/gate-sdk/gate-tests/run-for-path.test.sh +2 -2
  608. package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +121 -16
  609. package/payload/gate-sdk/gate-tests/run-gates-linked-worktree.test.sh +136 -0
  610. package/payload/gate-sdk/lib/gate.sh +231 -484
  611. package/payload/gate-sdk/lib/test-hermetic.sh +39 -9
  612. package/payload/gate-sdk/templates/check-skeleton.sh +3 -2
  613. package/payload/gate-sdk/templates/gates-workflow.yml +23 -10
  614. package/payload/gate-sdk/templates/msg-patterns.list +14 -5
  615. package/payload/gate-sdk/templates/portability-patterns.list +56 -0
  616. package/payload/guard-kit/README.md +43 -46
  617. package/payload/guard-kit/checks/check-door-binding.gate +3 -0
  618. package/payload/guard-kit/gate-tests/check-door-binding/bad/alpha-kit/README.md +6 -0
  619. package/payload/guard-kit/gate-tests/check-door-binding/bad/alpha-kit/templates/alpha-config.knobs +3 -0
  620. package/payload/guard-kit/gate-tests/check-door-binding/bad/args +5 -0
  621. package/payload/guard-kit/gate-tests/check-door-binding/bad/beta-kit/lib/beta.sh +6 -0
  622. package/payload/guard-kit/gate-tests/check-door-binding/bad/expect.txt +5 -0
  623. package/payload/guard-kit/gate-tests/check-door-binding/bad/scripts/gate-sdk-config.knobs +4 -0
  624. package/payload/guard-kit/gate-tests/check-door-binding/bad/scripts/guard-config.knobs +3 -0
  625. package/payload/guard-kit/gate-tests/check-door-binding/bad/site/banner.md +8 -0
  626. package/payload/guard-kit/gate-tests/check-door-binding/bad/site/landing.md +11 -0
  627. package/payload/guard-kit/gate-tests/check-door-binding/good/alpha-kit/README.md +8 -0
  628. package/payload/guard-kit/gate-tests/check-door-binding/good/alpha-kit/templates/settings-hooks.json +20 -0
  629. package/payload/guard-kit/gate-tests/check-door-binding/good/args +7 -0
  630. package/payload/guard-kit/gate-tests/check-door-binding/good/beta-kit/lib/beta.sh +6 -0
  631. package/payload/guard-kit/gate-tests/check-door-binding/good/expect.txt +1 -0
  632. package/payload/guard-kit/gate-tests/check-door-binding/good/scripts/gate-sdk-config.knobs +4 -0
  633. package/payload/guard-kit/gate-tests/check-door-binding/good/scripts/guard-config.knobs +3 -0
  634. package/payload/guard-kit/gate-tests/check-door-binding/good/site/mirror.md +12 -0
  635. package/payload/guard-kit/gate-tests/check-door-binding/good/site/register.md +24 -0
  636. package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +75 -17
  637. package/payload/guard-kit/gate-tests/consumer-rules.test.sh +189 -0
  638. package/payload/guard-kit/gate-tests/door-binding-corpus.test.sh +72 -0
  639. package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +48 -23
  640. package/payload/guard-kit/gate-tests/guard-config-knobs.test.sh +170 -0
  641. package/payload/guard-kit/gate-tests/rewrite.test.sh +73 -0
  642. package/payload/guard-kit/gate-tests/scan-prompts.test.sh +174 -8
  643. package/payload/guard-kit/gate-tests/scratch-run.test.sh +149 -13
  644. package/payload/guard-kit/gate-tests/worktree-confinement.test.sh +169 -0
  645. package/payload/guard-kit/guard-tests/background-cases.tsv +23 -0
  646. package/payload/guard-kit/guard-tests/cases.tsv +374 -38
  647. package/payload/guard-kit/guard-tests/powershell-background-cases.tsv +29 -0
  648. package/payload/guard-kit/guard-tests/powershell-cases.tsv +81 -0
  649. package/payload/guard-kit/templates/close-triage.md +15 -55
  650. package/payload/guard-kit/templates/guard-config.knobs +26 -0
  651. package/payload/guard-kit/templates/settings-allow.json +15 -0
  652. package/payload/guard-kit/templates/settings-hooks.json +5 -5
  653. package/payload/lifecycle-kit/README.md +48 -76
  654. package/payload/lifecycle-kit/checks/check-audit-roster.gate +3 -0
  655. package/payload/lifecycle-kit/checks/check-close-surfaces.gate +1 -1
  656. package/payload/lifecycle-kit/checks/check-dispatch-entry.gate +3 -0
  657. package/payload/lifecycle-kit/checks/check-gap-inbox-neutrality.gate +1 -1
  658. package/payload/lifecycle-kit/checks/check-lesson-disposition.gate +1 -1
  659. package/payload/lifecycle-kit/checks/check-lifecycle-registration.gate +1 -1
  660. package/payload/lifecycle-kit/checks/check-merge-attrs.gate +1 -1
  661. package/payload/lifecycle-kit/checks/check-scratch-citation.gate +1 -1
  662. package/payload/lifecycle-kit/checks/check-shim-restatement.gate +1 -1
  663. package/payload/lifecycle-kit/checks/check-skill-binding.gate +1 -1
  664. package/payload/lifecycle-kit/checks/check-stage-entry.gate +2 -2
  665. package/payload/lifecycle-kit/checks/check-stage-evidence.gate +1 -1
  666. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +2 -2
  667. package/payload/lifecycle-kit/checks/check-stamp-subject.gate +3 -0
  668. package/payload/lifecycle-kit/checks/check-survey-record.gate +2 -2
  669. package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +93 -18
  670. package/payload/lifecycle-kit/gate-tests/boundary-stage-journal.test.sh +196 -0
  671. package/payload/lifecycle-kit/gate-tests/boundary-worktree-refusal.test.sh +214 -0
  672. package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/args +2 -0
  673. package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/expect.txt +6 -0
  674. package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/roster.txt +34 -0
  675. package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/args +2 -0
  676. package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/expect.txt +1 -0
  677. package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/roster.txt +22 -0
  678. package/payload/lifecycle-kit/gate-tests/check-audit-roster.test.sh +101 -0
  679. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.knobs +2 -0
  680. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/owners/worktrees/inbox.md +5 -0
  681. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.knobs +2 -0
  682. package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +21 -4
  683. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/args +6 -0
  684. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/expect.txt +1 -0
  685. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/head.txt +5 -0
  686. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/marker.txt +1 -0
  687. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/msg.txt +4 -0
  688. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/paths.txt +1 -0
  689. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/staged.txt +5 -0
  690. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/args +6 -0
  691. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/expect.txt +1 -0
  692. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/head.txt +5 -0
  693. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/marker.txt +1 -0
  694. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/msg.txt +4 -0
  695. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/paths.txt +2 -0
  696. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/staged.txt +6 -0
  697. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry.test.sh +60 -0
  698. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +1 -1
  699. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/bad/AGENT.md +1 -5
  700. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/good/AGENT.md +1 -5
  701. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +1 -1
  702. package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +2 -2
  703. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.knobs +2 -0
  704. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.knobs +2 -0
  705. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/worktrees/queue.md +13 -0
  706. package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +1 -1
  707. package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +1 -1
  708. package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +158 -11
  709. package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +27 -2
  710. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/align.md +4 -1
  711. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/build.md +4 -1
  712. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/close.md +5 -0
  713. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/scope.md +4 -1
  714. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/validate.md +1 -1
  715. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/expect.txt +1 -1
  716. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/align.md +4 -1
  717. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/build.md +4 -1
  718. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/close.md +4 -1
  719. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/scope.md +4 -1
  720. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/validate.md +4 -1
  721. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage.test.sh +73 -0
  722. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/args +4 -0
  723. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/expect.txt +1 -0
  724. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/head.txt +5 -0
  725. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/msg.txt +4 -0
  726. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/staged.txt +6 -0
  727. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/args +4 -0
  728. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/expect.txt +1 -0
  729. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/head.txt +5 -0
  730. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/msg.txt +4 -0
  731. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/staged.txt +7 -0
  732. package/payload/lifecycle-kit/gate-tests/check-stamp-subject.test.sh +59 -0
  733. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/expect.txt +3 -0
  734. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/record.md +24 -0
  735. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -1
  736. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +10 -0
  737. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +56 -5
  738. package/payload/lifecycle-kit/gate-tests/dispatch-marker.test.sh +152 -0
  739. package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +23 -48
  740. package/payload/lifecycle-kit/gate-tests/gap-inbox-route.test.sh +7 -5
  741. package/payload/lifecycle-kit/gate-tests/lead-journal-open.test.sh +119 -0
  742. package/payload/lifecycle-kit/gate-tests/preflight-valve.test.sh +170 -0
  743. package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +5 -3
  744. package/payload/lifecycle-kit/gate-tests/ruling-staleness.test.sh +89 -0
  745. package/payload/lifecycle-kit/gate-tests/stamp-before-write.test.sh +66 -0
  746. package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +12 -6
  747. package/payload/lifecycle-kit/templates/consult.md +9 -63
  748. package/payload/lifecycle-kit/templates/lead.md +143 -423
  749. package/payload/lifecycle-kit/templates/lifecycle-config.knobs +1 -0
  750. package/payload/lifecycle-kit/templates/release-sweep.md +6 -35
  751. package/payload/lifecycle-kit/templates/stages/align.md +14 -82
  752. package/payload/lifecycle-kit/templates/stages/build.md +30 -98
  753. package/payload/lifecycle-kit/templates/stages/close.md +21 -170
  754. package/payload/lifecycle-kit/templates/stages/scope.md +42 -167
  755. package/payload/lifecycle-kit/templates/stages/spec.md +31 -97
  756. package/payload/lifecycle-kit/templates/stages/validate.md +22 -59
  757. package/payload/lifecycle-kit/templates/upgrade.md +6 -37
  758. package/payload/queue-kit/README.md +33 -48
  759. package/payload/queue-kit/checks/check-deferred-board-tags.gate +3 -0
  760. package/payload/queue-kit/checks/check-queue-entry-budget.gate +2 -2
  761. package/payload/queue-kit/checks/check-queue-hygiene.gate +2 -2
  762. package/payload/queue-kit/checks/check-queue-prose-precondition.gate +1 -1
  763. package/payload/queue-kit/checks/check-queue-sections.gate +1 -1
  764. package/payload/queue-kit/checks/check-queue-slug-liveness.gate +2 -2
  765. package/payload/queue-kit/checks/check-queue-wrap.gate +2 -2
  766. package/payload/queue-kit/checks/check-roadmap-fresh.gate +3 -2
  767. package/payload/queue-kit/checks/check-tag-lead-line.gate +2 -2
  768. package/payload/queue-kit/checks/check-task-conservation.gate +1 -1
  769. package/payload/queue-kit/checks/check-task-names.gate +2 -2
  770. package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/TASK-QUEUE.md +41 -0
  771. package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/expect.txt +6 -0
  772. package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/widget-kit/README.md +3 -0
  773. package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/TASK-QUEUE.md +39 -0
  774. package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/expect.txt +1 -0
  775. package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/widget-kit/README.md +3 -0
  776. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +76 -31
  777. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +12 -4
  778. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.knobs +4 -0
  779. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +58 -19
  780. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/expect.txt +8 -4
  781. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.knobs +4 -0
  782. package/payload/queue-kit/gate-tests/check-queue-entry-budget.test.sh +124 -0
  783. package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/TASK-QUEUE.md +11 -1
  784. package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/expect.txt +2 -0
  785. package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +30 -11
  786. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/TASK-QUEUE.md +3 -1
  787. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/expect.txt +1 -0
  788. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/good/TASK-QUEUE.md +22 -6
  789. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/TASK-QUEUE.md +3 -1
  790. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/docs/page.md +1 -1
  791. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/expect.txt +3 -1
  792. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.knobs +1 -0
  793. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/TASK-QUEUE.md +6 -2
  794. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/page.md +3 -3
  795. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/worktrees/page.md +4 -0
  796. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.knobs +1 -0
  797. package/payload/queue-kit/gate-tests/check-queue-slug-liveness.test.sh +100 -0
  798. package/payload/queue-kit/gate-tests/check-queue-wrap/bad/TASK-QUEUE.md +3 -1
  799. package/payload/queue-kit/gate-tests/check-queue-wrap/good/TASK-QUEUE.md +20 -6
  800. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/TASK-QUEUE.md +15 -8
  801. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.knobs +5 -0
  802. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/TASK-QUEUE.md +13 -6
  803. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.knobs +5 -0
  804. package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/TASK-QUEUE.md +28 -7
  805. package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/expect.txt +10 -2
  806. package/payload/queue-kit/gate-tests/check-tag-lead-line/good/TASK-QUEUE.md +30 -8
  807. package/payload/queue-kit/gate-tests/check-task-names/bad/TASK-QUEUE.md +18 -3
  808. package/payload/queue-kit/gate-tests/check-task-names/bad/expect.txt +9 -0
  809. package/payload/queue-kit/gate-tests/check-task-names/good/TASK-QUEUE.md +20 -6
  810. package/payload/queue-kit/gate-tests/entry-history.test.sh +197 -0
  811. package/payload/queue-kit/gate-tests/queue-counts.test.sh +77 -73
  812. package/payload/queue-kit/gate-tests/queue-edges.test.sh +168 -87
  813. package/payload/queue-kit/gate-tests/queue-index.test.sh +30 -16
  814. package/payload/queue-kit/gate-tests/roadmap.test.sh +65 -58
  815. package/payload/queue-kit/templates/TASK-QUEUE.md +36 -23
  816. package/payload/queue-kit/templates/queue-config.knobs +1 -0
  817. package/payload/site-kit/README.md +26 -45
  818. package/payload/site-kit/checks/check-docs-cname-parity.gate +1 -1
  819. package/payload/site-kit/checks/check-docs-highlight-coverage.gate +4 -0
  820. package/payload/site-kit/checks/check-docs-liquid-parse.gate +3 -0
  821. package/payload/site-kit/checks/check-docs-render-fidelity.gate +3 -0
  822. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +1 -1
  823. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/scripts/site-config.knobs +2 -0
  824. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +2 -2
  825. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/scripts/site-config.knobs +2 -0
  826. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/docs/_layouts/default.html +11 -0
  827. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/expect.txt +4 -0
  828. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/scripts/highlight-tokens.list +7 -0
  829. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/scripts/site-config.knobs +3 -0
  830. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/docs/_layouts/default.html +14 -0
  831. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/expect.txt +1 -0
  832. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/scripts/highlight-tokens.list +7 -0
  833. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/scripts/site-config.knobs +1 -0
  834. package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/docs/_layouts/default.html +4 -0
  835. package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/docs/span.md +3 -0
  836. package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/expect.txt +2 -0
  837. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/_layouts/default.html +4 -0
  838. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/front.md +7 -0
  839. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/loop.md +5 -0
  840. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/plain.html +1 -0
  841. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/raw.md +3 -0
  842. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/search.json +4 -0
  843. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/expect.txt +1 -0
  844. package/payload/site-kit/gate-tests/check-docs-liquid-parse-parser.test.sh +62 -0
  845. package/payload/site-kit/gate-tests/check-docs-render-fidelity-batch.test.sh +40 -45
  846. package/payload/site-kit/gate-tests/check-docs-render-fidelity-foreign.test.sh +7 -4
  847. package/payload/site-kit/gate-tests/check-docs-render-fidelity-span.test.sh +7 -4
  848. package/payload/site-kit/gate-tests/check-docs-render-fidelity-table.test.sh +7 -4
  849. package/payload/site-kit/templates/site-health.yml +67 -4
  850. package/profiles.list +4 -5
  851. package/lib/common/digest.sh +0 -18
  852. package/lib/common/lock.sh +0 -75
  853. package/lib/common/profile.sh +0 -91
  854. package/lib/common/recipe.sh +0 -106
  855. package/lib/diff.sh +0 -66
  856. package/lib/doctor.sh +0 -164
  857. package/lib/init.sh +0 -428
  858. package/lib/uninstall.sh +0 -214
  859. package/lib/update.sh +0 -34
  860. package/payload/canon-kit/SPEC.md +0 -2129
  861. package/payload/canon-kit/checks/check-surface-duplication.sh +0 -106
  862. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +0 -6
  863. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +0 -6
  864. package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.sh +0 -10
  865. package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.sh +0 -10
  866. package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.sh +0 -6
  867. package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.sh +0 -6
  868. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.sh +0 -8
  869. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.sh +0 -8
  870. package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.sh +0 -4
  871. package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.sh +0 -4
  872. package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.sh +0 -8
  873. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.sh +0 -5
  874. package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.sh +0 -5
  875. package/payload/canon-kit/lib/spec.sh +0 -544
  876. package/payload/canon-kit/smoke/install.sh +0 -56
  877. package/payload/canon-kit/smoke/violation.sh +0 -22
  878. package/payload/canon-kit/templates/canon-config.sh +0 -2
  879. package/payload/context-kit/SPEC.md +0 -1123
  880. package/payload/context-kit/bin/always-loaded.sh +0 -70
  881. package/payload/context-kit/bin/env-probe.sh +0 -142
  882. package/payload/context-kit/bin/md-index.sh +0 -80
  883. package/payload/context-kit/bin/md-section.sh +0 -63
  884. package/payload/context-kit/bin/pub-index.sh +0 -90
  885. package/payload/context-kit/bin/run-index-tests.sh +0 -91
  886. package/payload/context-kit/gate-tests/check-footprint-fresh/good/args +0 -4
  887. package/payload/context-kit/gate-tests/check-footprint-fresh/good/emit.txt +0 -12
  888. package/payload/context-kit/gate-tests/check-footprint-fresh/good/projection.txt +0 -12
  889. package/payload/context-kit/index-tests/expected/toolfloor.txt +0 -23
  890. package/payload/context-kit/index-tests/toolfloor-cases.sh +0 -49
  891. package/payload/context-kit/lib/context.sh +0 -56
  892. package/payload/context-kit/lib/pub-lang/rust.sh +0 -26
  893. package/payload/context-kit/lib/pub-lang/ts.sh +0 -32
  894. package/payload/context-kit/lib/toolfloor.sh +0 -58
  895. package/payload/context-kit/smoke/agents-md.sh +0 -139
  896. package/payload/context-kit/smoke/install.sh +0 -64
  897. package/payload/context-kit/smoke/violation.sh +0 -21
  898. package/payload/context-kit/templates/context-config.sh +0 -2
  899. package/payload/delegation-kit/SPEC.md +0 -1712
  900. package/payload/delegation-kit/bin/run-budget-guard-tests.sh +0 -88
  901. package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +0 -97
  902. package/payload/delegation-kit/bin/run-trend-tests.sh +0 -63
  903. package/payload/delegation-kit/bin/run-usage-tests.sh +0 -226
  904. package/payload/delegation-kit/bin/usage-trend.sh +0 -120
  905. package/payload/delegation-kit/bin/usage-verdict.sh +0 -144
  906. package/payload/delegation-kit/lib/delegation.sh +0 -84
  907. package/payload/delegation-kit/smoke/install.sh +0 -63
  908. package/payload/delegation-kit/smoke/violation.sh +0 -16
  909. package/payload/delegation-kit/templates/agent-budget-guard.sh +0 -18
  910. package/payload/delegation-kit/templates/agent-dispatch-guard.sh +0 -61
  911. package/payload/delegation-kit/templates/delegation-config.sh +0 -6
  912. package/payload/delegation-kit/templates/statusline-usage.sh +0 -101
  913. package/payload/delegation-kit/templates/usage-poller.sh +0 -67
  914. package/payload/delegation-kit/usage-tests/budget-guard-cases.tsv +0 -20
  915. package/payload/doctrine-kit/SPEC.md +0 -385
  916. package/payload/doctrine-kit/bin/install-doctrine.sh +0 -194
  917. package/payload/doctrine-kit/bin/stage-rules.sh +0 -51
  918. package/payload/doctrine-kit/lib/doctrine.sh +0 -29
  919. package/payload/doctrine-kit/smoke/install.sh +0 -203
  920. package/payload/doctrine-kit/smoke/violation.sh +0 -13
  921. package/payload/drift-kit/SPEC.md +0 -1187
  922. package/payload/drift-kit/bin/drift-report.sh +0 -155
  923. package/payload/drift-kit/bin/kfric.sh +0 -61
  924. package/payload/drift-kit/bin/overhead-meter.sh +0 -106
  925. package/payload/drift-kit/bin/stage-economics.sh +0 -465
  926. package/payload/drift-kit/kpis/kpi-always-loaded.sh +0 -39
  927. package/payload/drift-kit/kpis/kpi-amendment-age.sh +0 -33
  928. package/payload/drift-kit/kpis/kpi-deferred-age.sh +0 -46
  929. package/payload/drift-kit/kpis/kpi-gate-backlog.sh +0 -52
  930. package/payload/drift-kit/kpis/kpi-gate-runtime.sh +0 -31
  931. package/payload/drift-kit/kpis/kpi-incident-recurrence.sh +0 -42
  932. package/payload/drift-kit/kpis/kpi-knowledge-friction.sh +0 -21
  933. package/payload/drift-kit/kpis/kpi-overhead.sh +0 -44
  934. package/payload/drift-kit/kpis/kpi-price-table-age.sh +0 -68
  935. package/payload/drift-kit/kpis/kpi-prompt-friction.sh +0 -38
  936. package/payload/drift-kit/kpis/kpi-queue-net-delta.sh +0 -74
  937. package/payload/drift-kit/kpis/kpi-settings-local.sh +0 -21
  938. package/payload/drift-kit/kpis/kpi-task-split.sh +0 -43
  939. package/payload/drift-kit/lib/drift.sh +0 -43
  940. package/payload/drift-kit/smoke/install.sh +0 -537
  941. package/payload/drift-kit/smoke/overhead-fixture.jsonl +0 -4
  942. package/payload/drift-kit/templates/drift-config.sh +0 -2
  943. package/payload/evidence-kit/SPEC.md +0 -740
  944. package/payload/evidence-kit/bin/diff-baseline.sh +0 -34
  945. package/payload/evidence-kit/bin/run-validate.sh +0 -124
  946. package/payload/evidence-kit/checks/check-producer-liveness.sh +0 -75
  947. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.sh +0 -7
  948. package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.sh +0 -7
  949. package/payload/evidence-kit/lib/evidence.sh +0 -193
  950. package/payload/evidence-kit/smoke/install.sh +0 -59
  951. package/payload/evidence-kit/smoke/violation.sh +0 -8
  952. package/payload/evidence-kit/templates/evidence-config.sh +0 -2
  953. package/payload/gate-sdk/SPEC.md +0 -10138
  954. package/payload/gate-sdk/bin/gen-pre-commit.sh +0 -297
  955. package/payload/gate-sdk/bin/install-hooks.sh +0 -60
  956. package/payload/gate-sdk/bin/port-blockers.sh +0 -473
  957. package/payload/gate-sdk/bin/run-consumer-smoke.sh +0 -239
  958. package/payload/gate-sdk/bin/run-gate-tests.sh +0 -179
  959. package/payload/gate-sdk/bin/upgrade-smoke.sh +0 -236
  960. package/payload/gate-sdk/checks/check-action-run-shell.sh +0 -223
  961. package/payload/gate-sdk/checks/check-crate-arms.sh +0 -62
  962. package/payload/gate-sdk/checks/check-gate-assertions.sh +0 -149
  963. package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +0 -397
  964. package/payload/gate-sdk/checks/check-install-disposition.sh +0 -93
  965. package/payload/gate-sdk/checks/check-shellcheck.sh +0 -57
  966. package/payload/gate-sdk/checks/check-tree-terms.sh +0 -67
  967. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.sh +0 -2
  968. package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.sh +0 -2
  969. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/args +0 -4
  970. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/emit.txt +0 -14
  971. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/projection.txt +0 -14
  972. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.sh +0 -2
  973. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.sh +0 -2
  974. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.sh +0 -6
  975. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/stub-bin +0 -3
  976. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.sh +0 -6
  977. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/stub-bin +0 -3
  978. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/installer/lib/common/recipe.sh +0 -9
  979. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-beta.gate +0 -3
  980. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-gamma.sh +0 -6
  981. package/payload/gate-sdk/gate-tests/check-install-disposition/good/installer/lib/common/recipe.sh +0 -10
  982. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +0 -5
  983. package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +0 -5
  984. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.sh +0 -5
  985. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.sh +0 -5
  986. package/payload/gate-sdk/gate-tests/declaration-lib-parity.test.sh +0 -211
  987. package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +0 -112
  988. package/payload/gate-sdk/lib/consumer-smoke.sh +0 -69
  989. package/payload/gate-sdk/lib/declaration.sh +0 -59
  990. package/payload/gate-sdk/lib/inject.sh +0 -80
  991. package/payload/gate-sdk/smoke/install.sh +0 -148
  992. package/payload/gate-sdk/smoke/violation.sh +0 -13
  993. package/payload/guard-kit/SPEC.md +0 -1063
  994. package/payload/guard-kit/bin/compare-settings-allow.sh +0 -91
  995. package/payload/guard-kit/bin/run-guard-tests.sh +0 -92
  996. package/payload/guard-kit/bin/scan-prompts.sh +0 -166
  997. package/payload/guard-kit/bin/scratch-run.sh +0 -34
  998. package/payload/guard-kit/gate-tests/guard-read-path.test.sh +0 -52
  999. package/payload/guard-kit/lib/guard.sh +0 -835
  1000. package/payload/guard-kit/smoke/install.sh +0 -26
  1001. package/payload/guard-kit/templates/bash-guard.sh +0 -18
  1002. package/payload/guard-kit/templates/escalation-guard.sh +0 -27
  1003. package/payload/guard-kit/templates/guard-config.sh +0 -5
  1004. package/payload/guard-kit/templates/wakeup-guard.sh +0 -20
  1005. package/payload/lifecycle-kit/SPEC.md +0 -2884
  1006. package/payload/lifecycle-kit/bin/cite-survey.sh +0 -81
  1007. package/payload/lifecycle-kit/bin/enter-stage.sh +0 -380
  1008. package/payload/lifecycle-kit/bin/file-gap.sh +0 -101
  1009. package/payload/lifecycle-kit/bin/file-survey.sh +0 -69
  1010. package/payload/lifecycle-kit/bin/install-lifecycle.sh +0 -36
  1011. package/payload/lifecycle-kit/bin/session-id.sh +0 -75
  1012. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.sh +0 -4
  1013. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.sh +0 -4
  1014. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.sh +0 -4
  1015. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.sh +0 -4
  1016. package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +0 -100
  1017. package/payload/lifecycle-kit/lib/stages.sh +0 -194
  1018. package/payload/lifecycle-kit/smoke/install.sh +0 -434
  1019. package/payload/lifecycle-kit/smoke/violation.sh +0 -8
  1020. package/payload/lifecycle-kit/templates/lifecycle-config.sh +0 -2
  1021. package/payload/lifecycle-kit/templates/workflow-state-guard.sh +0 -29
  1022. package/payload/queue-kit/SPEC.md +0 -1358
  1023. package/payload/queue-kit/bin/lesson-sink.sh +0 -28
  1024. package/payload/queue-kit/bin/queue-counts.sh +0 -35
  1025. package/payload/queue-kit/bin/queue-edges.sh +0 -78
  1026. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.sh +0 -6
  1027. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.sh +0 -6
  1028. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.sh +0 -3
  1029. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.sh +0 -3
  1030. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.sh +0 -6
  1031. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.sh +0 -6
  1032. package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +0 -215
  1033. package/payload/queue-kit/lib/queue.sh +0 -129
  1034. package/payload/queue-kit/smoke/install.sh +0 -25
  1035. package/payload/queue-kit/smoke/violation.sh +0 -8
  1036. package/payload/queue-kit/templates/queue-config.sh +0 -2
  1037. package/payload/site-kit/SPEC.md +0 -589
  1038. package/payload/site-kit/checks/check-docs-render-fidelity.sh +0 -242
  1039. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/scripts/site-config.sh +0 -7
  1040. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/scripts/site-config.sh +0 -7
  1041. package/payload/site-kit/lib/site.sh +0 -43
  1042. package/payload/site-kit/smoke/install.sh +0 -34
  1043. package/payload/site-kit/smoke/violation.sh +0 -20
  1044. /package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/{check-ported.gate → check-stage-entry.gate} +0 -0
@@ -1,1123 +0,0 @@
1
- # context-kit — token-economics-aware context management
2
-
3
- A stateless agent session pays for context twice. On-demand cost: opening a
4
- large SPEC or source file whole when only one section was needed. Standing
5
- cost: the always-loaded surface — everything injected into *every* session
6
- (the instructions file, the session-start hook output) — where each added
7
- line is a recurring per-session tax that grows silently, because no single
8
- session ever sees the trend. The kit attacks both: an index-first reading
9
- toolset, a session-start hook template that assembles a compact brief, a
10
- meter that tracks the always-loaded surface against a per-iteration
11
- baseline, a brevity gate over the densest always-loaded section, the
12
- close-stage brevity pass that reacts to the meter's delta, and a memory-off
13
- gate pair that keeps the ungoverned harness-memory surface disabled rather
14
- than left to accrete.
15
-
16
- The kit carries the index mechanism, the hook skeleton, the meter, the
17
- brevity machinery, and the memory-off enforcement; a consumer's product-shaped
18
- surfaces (proto and diagram indexes, its doc roster, its harvest pipeline)
19
- stay in the consumer repo (§Out of scope).
20
-
21
- ## Index-first reading
22
-
23
- "Index, then read the one you need" — the pattern every tool serves. All
24
- three are advisory `bin/` tools; none joins `gates.list`.
25
-
26
- - **`md-index.sh [paths…]`** — compact structural index for Markdown:
27
- heading hierarchy with line numbers, each heading followed by its
28
- section's first sentence, plus a per-file line count (the cost signal —
29
- whether to read whole or by section). Defaults to the whole tree,
30
- skipping `.git/`, `node_modules/`, and build dirs.
31
- - **`md-section.sh <file> <heading>`** — prints one section, from the
32
- matched heading to the next heading of the same or higher level. Match
33
- is case-insensitive and tolerates a leading `§` (so a spec citation
34
- pastes directly); headings inside fenced code blocks are not mistaken
35
- for structure. The companion: find the heading in the index, extract
36
- just that body.
37
- - **`pub-index.sh [paths…]`** — compact public API surface: every public
38
- item with kind, name, and line, sorted by kind then name, in a per-file
39
- block headed by a count. It is a **dispatcher over per-language
40
- extractors**: the dispatcher owns traversal (the prune set is `.git`,
41
- `target`, `node_modules`, `dist`, `build`), the kind-then-name sort, and
42
- the row formatting (the index-tests goldens assert the exact shape); each
43
- extractor is a sourced bash file
44
- defining exactly two names — a `PUB_LANG_GLOBS` array (the find globs, e.g.
45
- `*.rs`) and a `pub_lang_extract <file>` function emitting unsorted
46
- `kind name lineno` rows. Two names, both read every run; no other
47
- extractor-file surface is contract.
48
-
49
- Extractors resolve registry-style (the `gates.list` consumer-first
50
- precedent): a shipped extractor lives at `lib/pub-lang/<lang>.sh`, and a
51
- consumer extractor of the same basename under `CONTEXT_KIT_PUB_LANG_DIR`
52
- (default `${GATE_SDK_GATES_DIR:-scripts}/pub-lang`) shadows it. The enabled
53
- set is `CONTEXT_KIT_PUB_LANGS`, whose default is every shipped extractor,
54
- derived from the `lib/pub-lang/` roster at run time — never maintained as a
55
- list (derivation-first). Both knobs are read through the consumer config
56
- seam (`context-config.sh`), which the tool sources like the meter and the
57
- footprint do.
58
-
59
- Two extractors ship: `rust.sh` (every `pub`/`pub(crate)`/`pub(super)` item —
60
- the grep-grade grammar the tool has always carried) and `ts.sh`
61
- (TypeScript: `export`-declared `function`/`class`/`interface`/`type`/`enum`/
62
- `const`/`let`/`var`, `const enum`, and `export default`, over `*.ts` and
63
- `*.tsx` with `.d.ts` included as public surface by construction). Both are
64
- grep-grade: re-exports (`export { x } from`) and multi-line declarations are
65
- stated honest limits, not parsed. The dispatcher shipped when demand named
66
- it — a second adopter's tree carries a TypeScript surface its Rust-only copy
67
- could not index — not before: an unrequested plugin framework would have
68
- been scaffolding, and AST/tree-sitter parsing is above the tool's grep-grade
69
- portability altitude (bare bash + coreutils, Tier one).
70
-
71
- ## The session-context hook (template)
72
-
73
- `templates/session-context.sh` is a consumer copy (the `bash-guard.sh`
74
- pattern): wired as the harness's session-start hook via
75
- `templates/settings-sessionstart.json`, it assembles the session brief.
76
- Every step is guarded and degrades silently — the hook never fails a
77
- session. Steps, in order:
78
-
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
82
- Deferred section to a tally except on the close and scope stages. The stage
83
- it routes on comes from the cursor — `CONTEXT_KIT_STATE_FILE`'s last data
84
- line — with an empty cursor (no such file, or one truncated to its preamble
85
- at an iteration boundary) taking the collapsed branch every non-close,
86
- non-scope stage already takes, so the no-cursor window needs no branch of
87
- its own and can never fail the session.
88
- Deferred is unpickable and only scope (promotion) acts on it; the full
89
- board additionally serves close's backlog review, and — by the
90
- cursor-lag rule below — firing on close is what hands the full board to
91
- the first scope session, which reads `close` at session start. On any
92
- other stage the full listing is pure recurring cost.
93
- A configured icebox tier rides **both** branches as a one-line tally, so
94
- this step needs no new stage routing: a dormant entry is already one line,
95
- so there is no full listing of it to withhold, and the eviction work that
96
- reads the tier reads `--emit queue-index --icebox-candidates` rather than this
97
- index.
98
- 2. **Dirty-surface pre-run** — for each component with uncommitted
99
- changes, pre-run the matching surface index (default: `pub-index` over
100
- top-level dirs containing `src/`), so a resumed session's editing
101
- surface is already in context. Component detection and the index
102
- command live in a marked consumer section of the template — they are
103
- layout assumptions, not mechanism.
104
- 3. **Drift line** — one `drift-report --trend` summary line when the
105
- consumer has a drift report; silently absent otherwise (drift-kit owns
106
- the report; the seam is this optional line).
107
- 4. **Stage-conditioned nudges** — short reminders keyed on a stage set
108
- read from the header (this repo's delegation nudge is the exemplar).
109
- Each keys on {predecessor, own stage} (the cursor-lag rule below) so a
110
- first-of-stage session and a restarted one both receive it. Marked
111
- consumer section: which stages get which nudge is consumer judgment.
112
- Suppressed when the session-role signal (below) marks the session `lead`
113
- — the nudges are executor-facing.
114
- 5. **Memory-off backstop** — one warning line when the harness memory dir
115
- (`CONTEXT_KIT_MEMORY_DIRS`) holds content, pointing the durable fact at its
116
- tracked home (§The memory-off doctrine). `check-memory-off` fires only at
117
- commit; this surfaces pollution at session start, between commits. Silent
118
- when the dir is empty or absent.
119
- 6. **Scratch sweep** — reclaim `${GATE_SDK_TMP_DIR:-.tmp}` entries older
120
- than a day, depth-first (`-mindepth 1 -depth`) so stray directories are
121
- reclaimed too, never touching `.gitkeep`. Age-guarded so a concurrent
122
- same-checkout session's in-flight scratch survives.
123
- 7. **Index-reminder footer** — the "index first" ritual with the
124
- consumer's actual index commands listed (consumer-edited).
125
- 8. **Stage-routed craft-rule pointers** — when `CONTEXT_KIT_STAGE_RULES`
126
- names a present emitter (doctrine-kit's `stage-rules.sh`), the current
127
- stage's craft-rule pointer block, so a stage session is reminded of the
128
- craft rules bearing on it before the matching action. Silently absent
129
- when the emitter is unset or the stage routes no rules (doctrine-kit owns
130
- the emitter and its tag grammar; the seam is this optional step, the
131
- drift-line precedent). Keyed on the derived stage directly, not a
132
- {predecessor, own stage} set: the pointers are advisory reminders, so
133
- over-firing to an adjacent stage costs only a few lines, and the
134
- cursor-lag rule below is about *conditioning*, not about which stage's
135
- rules to show. Suppressed when the session-role signal marks the
136
- session `lead` — the craft rules are executor-facing.
137
- 9. **Env profile** — when the consumer-local profile file
138
- (`CONTEXT_KIT_ENV_PROFILE_FILE`, §bin/env-probe) exists, the step first runs
139
- `bin/env-probe.sh` to re-probe it (output suppressed so no status line
140
- reaches the brief), then emits its whole body verbatim so the session adapts
141
- its commands to the box as it is now. The re-probe sits inside the same
142
- file-present guard, so producer and consumer co-locate here and the probe
143
- never auto-seeds a profile the operator did not opt into. Silent when the
144
- file is absent — the harness's own `Platform:` line is the fallback, no
145
- re-probe fires, and no always-loaded cost is paid where no profile was
146
- seeded. The consumer owns the file's brevity (they author the gotchas half),
147
- the drift-line precedent.
148
-
149
- **The cursor-lag rule.** The hook runs at session start, before the
150
- arriving skill stamps its entry (its first step) — and that stamp is what
151
- moves the cursor. So a first-of-stage session reads the *predecessor's* stage.
152
- The lag is structural and survives any change of cursor source: the hook reads
153
- a value written after it fires. Stage-conditioned
154
- output therefore keys on a stage *set* spanning {predecessor, own stage} —
155
- guaranteeing the first-of-stage session is served, at the accepted cost of
156
- over-firing to the other sessions that share a cursor value (a restarted
157
- session of a keyed stage, or the first session of the stage after it).
158
-
159
- **The session-role signal.** The hook keys every stage-conditioned injection
160
- off the lifecycle stage cursor, which says nothing about whether the
161
- *reading* session is a lead, a stage session, or a manual run — so without a
162
- role signal a lead draws executor-facing craft rules at every hook fire
163
- (startup, plus each compact/resume re-fire, the recurring cost). The signal
164
- is a marker file, **session-id-scoped**: `/lead`'s first step writes one line
165
- `lead <id>` — `<id>` being `session-id.sh`'s value — to
166
- `CONTEXT_KIT_SESSION_ROLE_FILE` (gitignored scratch, default
167
- `${GATE_SDK_TMP_DIR:-.tmp}/session-role`). The hook treats the session as
168
- `lead` only when the marker's id equals the 8-char prefix of **its own
169
- payload's session id** — read from the hook payload, never from
170
- `CLAUDE_CODE_SESSION_ID`, because a subagent is handed its *parent's* id in
171
- that variable (the named assumption: were the harness ever to fire
172
- `SessionStart` in subagents, an env-var read would match every stage session
173
- to its lead's marker and invert the suppression onto exactly its intended
174
- audience; revisit if subagent hook-fire lands). So a concurrent or later
175
- top-level session never bleeds, and a stale marker self-invalidates when the
176
- id rotates. The payload arrives on the hook's stdin, consumable exactly once,
177
- so the single read here is its sole consumer — a later payload-derived signal
178
- (a stage derivation, say) must hoist that one read ahead of this guard, never
179
- add a second. Top-level scoping is sufficient because both producer and
180
- consumer are top-level by construction — `SessionStart` does not fire for
181
- Task-spawned subagents, so the only sessions the hook fires in are leads and
182
- manual runs, and the identity match discriminates exactly those. When the
183
- signal marks the session `lead`, steps 4 and 8 are suppressed; everything
184
- else emits unchanged. Signal absent ⇒ byte-identical to the signal-free
185
- hook; the read is guarded like every step — the hook never fails a session.
186
- Accepted limits (not defects): the initial startup fire precedes `/lead` by
187
- construction, a bounded one-per-lead-session cost against the
188
- per-compact/resume recurrence that is the actual waste; the marker ages out
189
- with the day-horizon scratch sweep (step 6), degrading to absent-signal
190
- behavior; the marker's lifetime is the **lead session's, not the iteration's**,
191
- so a consumer boundary ritual that wipes gitignored scratch (a scope
192
- evidence-reset, say) must spare the marker file — a lead outliving an iteration
193
- boundary otherwise reverts silently to absent-signal behavior until it rewrites
194
- it; and the producer inherits `session-id.sh`'s
195
- `CLAUDE_CODE_SESSION_ID` dependency — unset, the newest-transcript fallback
196
- in a lead with live subagents returns an `agent-` prefix the payload can
197
- never match, and the signal silently no-ops to absent-signal behavior (the
198
- failure costs a suppression, never a correctness property). Rejected
199
- alternatives, recorded so they are not re-derived: a launch-env var (a
200
- perpetual operator ritual whose forgotten export degrades silently with no
201
- signal it happened) and both-producers-with-precedence (two producers plus a
202
- precedence rule to spec and gate, for a gap one hook fire wide).
203
-
204
- **Ruled out — lifecycle stamp-id injection.** The hook payload carries the
205
- harness session id, and **in a top-level session** its 8-char prefix equals
206
- what lifecycle-kit's `session-id.sh` computes, so the hook *could* inject the
207
- canonical stamp id with no shell-out. The parity is top-level-only and holds
208
- only while the harness sets `CLAUDE_CODE_SESSION_ID`: a subagent is handed its
209
- *parent's* id in that variable, while `session-id.sh` deliberately derives the
210
- subagent's own transcript id instead (its `CLAUDE_CODE_CHILD_SESSION` branch),
211
- so the two quantities diverge there by design. The hook does not inject: lifecycle-kit owns its id derivation
212
- end-to-end (the stage-entry ritual derives it via `session-id.sh`,
213
- whatever invokes that script), and having the stage skills
214
- read a context-kit-injected value would wire an upstream kit's protocol to
215
- a downstream kit's hook for ergonomics only — the trust model gains
216
- nothing, since `check-stage-evidence` already enforces that the stamped id
217
- is current. A consumer may add a local informational echo; the template
218
- ships none.
219
-
220
- ## bin/env-probe
221
-
222
- `bin/env-probe.sh` derives a local machine profile so a session adapts to the
223
- box it runs on — package manager, toolchain versions, absent tools — without
224
- those machine facts ever landing in the public tree. It writes a
225
- marker-bounded generated block (`<!-- context-kit:env:begin -->` /
226
- `:end`, via gate-sdk's shared `inject_marker_block` helper) into the file named
227
- by `CONTEXT_KIT_ENV_PROFILE_FILE` (default `ENV.local.md`), replacing an
228
- existing block or appending a fresh one — but only when the probed content
229
- actually changed (Cadence, below), so the block's probe date marks the last
230
- real change, not the last run. The probed half is derivation-first — never
231
- hand-maintained.
232
-
233
- **What it probes.** OS/distro (`uname`, `/etc/os-release`); the package manager
234
- (first present of an ordered detection walk over the known managers); each
235
- roster member's version and its floor verdict (below); the absent-tools list
236
- (roster members `command -v` cannot resolve); and the below-contract list. The
237
- roster itself is owned by `lib/toolfloor.sh` and never restated here.
238
-
239
- **The roster and its floor axis (`lib/toolfloor.sh`).** The roster lives in a
240
- sourceable library rather than in the script, because `env-probe.sh` does its
241
- work on execution: a second reader cannot obtain the roster by running it, which
242
- is why the parity gate greps the array out of a file instead of sourcing it, and
243
- why a reader that runs before any consumer file exists — an installer's `doctor`
244
- reading its own payload copy — needs an owner it can source. The library defines
245
- the array `PROBE_SET` and the predicate below and executes nothing else. It
246
- carries no knob, deliberately: the roster is the kit's own dependency set, and a
247
- consumer who could override it could only make the contract lie.
248
-
249
- A roster element reads `<name>[:<min-version>[:<impl-token>[:<audience>]]]`. A
250
- bare name keeps
251
- the original meaning — must be present, no version constraint — so the floor axis
252
- is **per-member** rather than a number demanded of every member. The fields are
253
- positional, so a member constrained by implementation alone carries an empty
254
- min-version field (`awk::GNU`), and an empty field means what an omitted trailing
255
- field means: `awk`, `awk:`, `awk::` and `awk:::` are one unconstrained member. **A member
256
- gains a floor only where a construct the battery actually runs forces one**, and
257
- the forcing construct is recorded with it — a floor nobody's code forces is not
258
- pinned, which is what stops a version number from rotting into an aspiration
259
- (de-literalization applied to a version: the value is owned where the constraint
260
- is provable).
261
-
262
- **The audience axis.** The fourth field names *whose* floor a member is, because
263
- the roster has two kinds of reader and one flat array gated both of them on all
264
- of it. Its value set is closed and kit-owned exactly as the floor predicate's
265
- verdict set is: the only declarable value is `contributor`, meaning *a
266
- contributor-side floor with no install-time role*. The unmarked case is not
267
- spelled — declaring the complement on every other member would be a roster
268
- maintained against itself — so the emptiness rule above carries it: an empty or
269
- omitted audience means every audience. `tool_floor_consumer_side <element>`
270
- answers the one question a consumer-side reader asks, and exists so no such
271
- reader re-implements that rule against a value set it does not own. A
272
- consumer-side reader — `installer/lib/doctor.sh`, whose exit status is `init`'s
273
- last precondition — filters its roster walk through that predicate and does not
274
- probe, render or fail on a member the predicate excludes. A contributor-side
275
- reader — `bin/env-probe.sh` — walks the roster whole and marks the audience
276
- instead, since a contributor-side floor is exactly what it is reporting on.
277
- The field is a grammar axis rather than a filter in the reader that needs it,
278
- because a hard-coded exception is a literal de-literalization forbids and one
279
- that re-fires the day a second contributor-only member lands.
280
-
281
- The constrained members and what forces each:
282
-
283
- - `bash:4.3` — the floor is set by the **highest** construct the battery runs,
284
- not the most numerous. Three bash-4.0 constructs are widespread — `declare -A`
285
- (gate-sdk, guard-kit, delegation-kit, evidence-kit checks), `mapfile` (across
286
- the kits), the `${x,,}` case expansion (canon-kit's `lib/spec.sh` and checks, a
287
- delegation-kit template) — but the **nameref** (`local -n`, bash 4.3) outranks
288
- them: `gate-sdk/lib/gate.sh`'s couples expander, which every gate sources. The
289
- leaf gate that carried the second instance, `check-comment-tier`, has since
290
- ported to the binary substrate and its script is gone — which changes nothing
291
- about the floor, because the nameref in the shared gate
292
- library makes 4.3 universal rather than one leaf gate's requirement, so a
293
- consumer below it cannot run the battery at all. Recorded here because the
294
- earlier `4.0` was a fail-open: `env-probe` reported `ok` on a 4.2 box the
295
- battery would fail with an obscure syntax error.
296
- - `awk::GNU` — no version floor, one implementation constraint: the 3-arg
297
- `match()` in `check-gate-assertions`, whose dependency gate-sdk/SPEC.md
298
- §check-gate-assertions already owns.
299
- - `sort::coreutils` — no version floor, one implementation constraint, and one
300
- member standing for a whole package family: GNU coreutils is forced by
301
- `realpath --relative-to` and its `-m` form (gate-sdk's shared gate library and
302
- hook emitter, canon-kit's link and command resolvers), `sort -V`
303
- (`check-release-bump`), `date -d` (drift-kit's KPIs and trajectory), and
304
- `stat -c` (delegation-kit's usage verdict). None is BSD-portable, and the
305
- first sits in the library every gate sources — so a box without it cannot run
306
- the battery at all rather than failing one gate. The representative member is
307
- the binary carrying a forcing construct, which is also the floor predicate's
308
- own comparison tool.
309
- - `cargo:1.71::contributor` — a **contributor-side** floor, never a runtime one,
310
- and that reading is now declared on the element and read by name rather than
311
- left as an aside: the audience field is what the consumer-side predicate
312
- above resolves, so the sentence is enforced instead of merely written. It
313
- carries
314
- two tiers because two kinds of tree read it. Where a `.gate` descriptor is live
315
- it is a **commit-time** floor — `gate_command` puts the binary on the pre-commit
316
- path and is fail-closed on an absent one, so the battery will not run without a
317
- built crate (gate-sdk/SPEC.md §What the dispatch seam does not settle); that is
318
- this repo today, its first cohort having landed. Everywhere else it stays the weaker
319
- **contributor/build** floor: a consumer tree receives a prebuilt binary and never
320
- a crate, so nothing there compiles at commit time. Both tiers rest on the same
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
337
- contributor routine and the `gates` workflow actually invoke, and the two ship as
338
- one toolchain sharing a version banner — the representative-member rule the
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
342
- unaffected: git remains the sole runtime dependency of a ported gate, shelled out
343
- rather than embedded (TRAJECTORY.md §The closed rulings owns that constraint).
344
- Every other member is a bare name — no construct in the battery forces a version
345
- on it (the `jq` usage is 1.5-era throughout), so none is pinned.
346
-
347
- An implementation token is matched as a **substring of the tool's own version
348
- banner** — gawk prints `GNU Awk`, GNU sort prints `sort (GNU coreutils)` — so the
349
- constraint is checked against the binary actually on `PATH` rather than against a
350
- package name nothing can probe. Its honest limit is the same one: the roster
351
- asserts what `PATH` resolves at probe time, so an installed-but-not-`PATH`-ordered
352
- GNU userland probes as below contract, correctly, since that is what the gates
353
- will invoke.
354
-
355
- **The floor predicate.** `tool_floor_check <element> <banner>` returns one verdict
356
- from a closed set — `ok`, `absent` (an empty banner), `below <found> <floor>`,
357
- `wrong-impl <found>`, `uncomparable`. Numeric comparison is `sort -V`.
358
- `<found>` is the banner's first dotted-version token for `below` and its
359
- first word — the implementation's own name — for `wrong-impl`. `uncomparable` is
360
- the fail-closed arm: a banner the predicate cannot parse, or a `sort` without
361
- `-V`, is reported unverified and never silently as `ok` — the posture
362
- gate-sdk/SPEC.md §The gate model requires of a gate, applied to a probe that is
363
- not one.
364
-
365
- **The rendered verdict.** Each toolchain bullet carries the probed banner and,
366
- for a constrained member, the constraint and its verdict — `` (floor 4.3, ok) ``,
367
- `` (requires GNU — below contract) ``, `` (floor 4.3 — unverified) ``; an
368
- unconstrained member carries no parenthetical. A member carrying an audience
369
- carries it here too, as `` (floor 1.71, contributor-only, ok) ``, and every line
370
- that names such a member is marked the same way — the absent list and the
371
- below-contract list included, because those are the two lines on which *below a
372
- floor that is yours* and *below a floor you are not on the hook for* would
373
- otherwise read alike. A `**Below contract:**` line joins
374
- the existing `**Absent:**` line, reading `none` when clean and otherwise naming
375
- each failing member through the verdict's own fields: `below` and `wrong-impl`
376
- are distinguished because the remedies differ — upgrade versus install a
377
- different implementation — and `uncomparable` is listed as explicitly unverified
378
- rather than folded into the clean state. Both version probes read from
379
- `/dev/null`: `-V` prints a version banner for most tools but is an ordinary flag
380
- for some — GNU sort's version-*sort* — so a tool that rejects `--version` would
381
- otherwise fall through to a `-V` that reads inherited stdin and hangs the probe.
382
-
383
- **The content seam (consumer-local, gitignored).** Hand-authored gotchas — the
384
- "no `dig`/`host`; use `getent`/DoH" class a probe cannot know — live *outside*
385
- the markers in the same file and survive every re-probe; when the file is
386
- absent the probe seeds that scaffold once, then only ever rewrites the block.
387
- The per-session re-probe (Cadence, below) does not trigger that seeding: it
388
- runs only against a file that already exists, so seeding stays a
389
- first-run/on-demand action.
390
- The file is `BRIEF.local.md`-class: local-only, gitignored (this repo's
391
- `.gitignore` and the CLAUDE.md housekeeping line carry it), so machine facts
392
- stay private.
393
-
394
- **Cadence — per-session auto-refresh.** The session-context hook re-probes
395
- once per session, at its step-9 profile emit (§The session-context hook), so a
396
- session always adapts to the box as it is now — the install step seeds the
397
- profile once, and every session thereafter refreshes it. Change-detection keeps
398
- this cheap and the date honest: the probe rewrites the block only when the
399
- probed content differs from what is on disk (the `Probed` date line excluded
400
- from the comparison), so an unchanged box writes nothing and the date marks the
401
- last real change, not the last run. Still no freshness gate — env truth is not
402
- cheaply machine-verifiable and the probe is already the derivation (the
403
- enforcement-first carve-out; the per-session re-probe is now the enforcement,
404
- replacing the install-step-only cadence). The hook re-probes only when the
405
- profile file already exists, so a never-seeded consumer pays no cost and seeds
406
- nothing unbidden.
407
-
408
- ## The always-loaded meter
409
-
410
- `bin/always-loaded.sh` measures the standing surface: the summed line
411
- count of the configured surface files (default `CLAUDE.md`) plus the
412
- steady-state hook body, approximated by the configured hook-body command
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
415
- session-context hook itself — the hook emits this meter's own output line,
416
- so self-measurement would recurse and inflate.
417
-
418
- The meter lives here, not in `drift-report.sh`, because the *metric* is
419
- context economics and the *report* is drift reporting — drift-kit's
420
- `kpi-always-loaded` consumes this script for its row instead of re-embedding
421
- the measurement.
422
-
423
- - **Default invocation** prints one line: total, per-part breakdown, and
424
- the delta against the baseline when one exists.
425
- - **`--update-baseline`** rewrites the baseline file — a close-stage act,
426
- because the brevity pass reacts to the *delta*, not the level (close is
427
- net-additive by design; only growth since the iteration started is
428
- actionable).
429
- - **Baseline file** (`${GATE_SDK_WORKFLOW_DIR:-.workflow}/`
430
- `always-loaded-baseline.txt`, committed): a `# contract:` header
431
- pointing here, then one data line
432
- `<total-lines> <surface-lines> <baseline-commit>`. Trailing extra
433
- fields are tolerated and preserved-ignored — a consumer's file may carry
434
- a fourth (a settings-local count, say, a guard-kit-adjacent KPI owned by
435
- its drift report), and the kit reads such a file unchanged. The baseline is
436
- the consumer-side floor-holder for the footprint contract
437
- (§The consumer footprint): its delta is what the close-stage brevity pass
438
- reacts to.
439
-
440
- ## bin/footprint
441
-
442
- The footprint emitter publishes the kits' measured context footprint — the
443
- adoption-cost evidence a consumer weighs before vendoring, the concrete form of
444
- the token-economics positioning. Where the meter reads one consumer's live
445
- always-loaded total, this reads the tracked kit surfaces and attributes the cost
446
- per kit, split by when it lands.
447
-
448
- The measured set is the kit roster, **derived not maintained**: the top-level
449
- directories carrying a `SPEC.md`. No knob names the set — a new kit joins the
450
- page by existing.
451
-
452
- Each kit is measured in the always-loaded and load-triggered tiers:
453
-
454
- - **Always-loaded** — the block a kit generates between its own
455
- `begin`/`end` markers in the configured surface files
456
- (`CONTEXT_KIT_SURFACES`), the agent-file text the kit injects into every
457
- session's context. This reuses the always-loaded meter's surface set; most
458
- kits inject nothing and score zero here.
459
- - **Load-triggered** — the skill and template markdown the kit ships under its
460
- `templates/` tree, pulled into context only when its trigger fires. Gate-test
461
- fixtures sit outside `templates/`, so they never enter the count.
462
-
463
- **Numbers ruling.** Line counts are exact. The token column is a
464
- *labeled estimate* — a bytes/4 heuristic, carried with a leading `~` and stated
465
- inline as model-tokenizer-dependent, never a false-precision figure.
466
-
467
- **Attribution ruling: kit share only.** A kit's advertised cost is what the kit
468
- ships. Consumer bindings (the skill shims pointing at a vendored template),
469
- consumer config, the on-demand SPEC/README pages, this repo's own `CLAUDE.md`
470
- residue, and the session hook's dynamic body (consumer state, not fixed kit
471
- text) are all excluded, and the page states the exclusion so the number is
472
- honest. The exclusion is also a determinism requirement: the freshness gate
473
- byte-compares the emission, so every measured surface must be a static tracked
474
- file — a live hook run, being state-dependent, could never be byte-gated.
475
-
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
487
- page.
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
-
498
- ## The brevity gate
499
-
500
- `check-brevity` — a section-agnostic name: the governed section
501
- is a knob, so no section name binds the gate (a consumer's
502
- `check-convention-brevity` would be its section-specific counterpart). It scans one designated
503
- always-loaded file for a bulleted section where each `- **name:**` bullet
504
- carries a line budget, and flags a bullet that is **over budget and cites
505
- a deeper doc** (carries a `§` pointer) — over-long while admitting its
506
- detail already has a home elsewhere. Under-budget bullets and over-budget
507
- bullets with no pointer pass (the latter may genuinely own their content);
508
- `<!-- brevity-exempt: <reason> -->` on the bullet's first line or the line
509
- above blesses a bullet whose every line is load-bearing.
510
-
511
- Section resolution fails closed: a `CONTEXT_KIT_BREVITY_SECTION` matching no
512
- heading in the governed file exits 2, never a clean 0. The knob and the heading
513
- are a coupling no other gate holds, so a renamed or deleted section would
514
- otherwise disarm the gate while it reported an empty section as clean — a gate
515
- whose target vanished is a broken machine, not a clean tree. A section that
516
- resolves and holds no bullets is clean: resolution is what fails closed, not
517
- emptiness.
518
-
519
- The pointer default is any `§`, not a single doc name like `HANDBOOK §`:
520
- "cites a deeper doc" is the mechanism-level meaning and a consumer's handbook
521
- is one instance of it, so the superset matches every such pointer. Ships with
522
- a `good/`+`bad/` fixture pair and registers in the
523
- consumer's `gates.list` (this repo's included).
524
-
525
- ## The close-stage brevity pass
526
-
527
- `templates/close-brevity.md` is the recurring close-stage step a consumer
528
- splices into its close skill (the guard-kit `close-triage.md` pattern).
529
- The procedure: run `always-loaded.sh`; walk the growth since baseline
530
- asking two distinct questions — staleness (*is it still true?*) and
531
- brevity (*is each block worth its standing per-session token cost?*);
532
- resolve by rewording or deleting, never by annotating (outdated context
533
- <!-- manifest-temporal-exempt: names the "formerly…" note as the anti-pattern this pass forbids, not written as narration -->
534
- goes to git history, not to a "formerly…" note); on-demand files (SPECs,
535
- handbooks) are exempt — their cost is paid only when opened; finish with
536
- `always-loaded.sh --update-baseline` and commit the baseline.
537
-
538
- The lexical share of this narration judgment — a fixed set of `formerly…`-class
539
- markers in the manifest set — is a blocking gate
540
- (canon-kit/SPEC.md §check-manifest-temporal); this pass keeps the semantic
541
- residue (*is this sentence about the past?*) that no marker set can decide.
542
-
543
- ## The consumer footprint
544
-
545
- A consumer project pursues its own objectives; the tooling must stay
546
- near-invisible in its context budget. This section states and holds the kits'
547
- consumer-resident footprint — what checkwright asks a consumer's always-loaded
548
- surface to carry — owned in one place, with the always-loaded meter's baseline
549
- as the consumer-side floor-holder. It is prose contract only: no new state,
550
- event, knob, or gate. Its producer is the kit author at kit-landing time (the
551
- kit-landing checklist gains no step; the review seam is the roster row); its
552
- readers are a consumer evaluating adoption cost before vendoring and this
553
- repo's own close-stage brevity pass, which reads the roster when judging
554
- whether a new resident line is a kit ask or repo content.
555
-
556
- **The budget rule.** A kit's resident ask is at most one pointer line on the
557
- consumer's always-loaded surface — the load-trigger-residency and
558
- always-loaded-shape doctrine rules applied to kit shipping. The one sanctioned
559
- block-sized ask is doctrine-kit's digest, itself bounded by its one-line-per-rule
560
- shape (the always-loaded-shape rule); its name-lockstep with the doctrine is
561
- held separately (the doctrine-rule-lockstep unit), because a re-vendor upgrade
562
- stales the digest by construction.
563
-
564
- **The roster, by citation.** Each kit's resident ask is named by citing the kit
565
- SPEC section that owns it, never by restating it here — so the roster cannot
566
- drift out of lockstep with what the kit actually ships. A kit adding a resident
567
- ask adds its row below, which is the review seam:
568
-
569
- - **delegation-kit** — the pre-authorization sentence plus skill pointer:
570
- delegation-kit/SPEC.md §One template, a resident pointer.
571
- - **doctrine-kit** — the doctrine link plus the digest block: doctrine-kit/SPEC.md.
572
- - **drift-kit** — the knowledge-friction capture bullet:
573
- drift-kit/SPEC.md §The knowledge-friction loop, which already states the
574
- one-bullet cost and its earn-back condition.
575
- - **every other kit** — none: their hooks, skills, gates, and SPECs are load-
576
- or event-triggered, so they cost nothing until opened.
577
-
578
- **The floor-holder ruling.** The meter plus its committed baseline
579
- (§The always-loaded meter) ship as the consumer's floor-holder: the consumer
580
- install (§Layout and configuration) seeds `always-loaded-baseline.txt`, so
581
- growth of the resident surface is a visible delta at every close-stage brevity
582
- pass. The hold is *advisory by design*. A hard total-line gate cannot attribute
583
- growth — the consumer's own content shares the file and is theirs to grow — so
584
- a level gate would be a noisy check breeding exemptions, the high-false-positive
585
- case the enforcement-first rule sanctions for keeping a class as stated manual
586
- duty rather than a gate. The mechanical holds that do exist stay: `check-brevity`
587
- bounds the one bulleted section its knob designates (§The brevity gate; this
588
- repo points it at the conventions block, not the digest), and the meter delta
589
- feeds `kpi-always-loaded`.
590
-
591
- The measured counterpart to this budget doctrine is the published footprint page
592
- (§bin/footprint): this section owns the budget rule, the page owns the measured
593
- per-kit numbers, and the two never restate each other.
594
-
595
- ## The memory-off doctrine
596
-
597
- Harness memory — the per-session store the harness offers to persist facts
598
- across sessions — is an always-loaded surface the meter cannot read and no
599
- gate scans: standing per-session context that accretes outside the tier
600
- contract, ungoverned by construction. The methodology already routes durable
601
- knowledge through a star topology, and those routes are the replacement —
602
- durable facts to their doc owner (the knowledge-friction loop), iteration-
603
- scoped attention to the lesson channels, private context to the operator's
604
- local brief. So the kit disables harness memory and enforces it off rather
605
- than governing its content.
606
-
607
- The banned class is *harness-side silent accumulation*, not every local file: an
608
- explicit, derived, operator-curated local file is config, not memory.
609
- `ENV.local.md` (§bin/env-probe) sits with `BRIEF.local.md` on the config side of
610
- that line — its probed half is a re-runnable derivation, its gotchas half is
611
- hand-curated, and both are gitignored operator surfaces the operator chose to
612
- keep, never a store the harness wrote to behind the tier contract.
613
-
614
- Blast-radius honesty rides the doctrine: the gates hold the tree regardless of
615
- a polluted session, so a memory that quietly re-accumulated degrades one
616
- session's judgment, never the committed baselines. This is therefore a
617
- lightweight gate pair — a hermetic pin and a local-environment scan — not
618
- machinery. Enforcement splits on the tree-vs-environment seam: what a commit
619
- can carry (the tracked settings file) is hermetic and CI-real
620
- (§check-settings-pins); what only the operator's machine holds (the memory
621
- dir, the untracked local settings) is a local-environment scan, CI-neutral
622
- (§check-memory-off).
623
-
624
- ## check-settings-pins
625
-
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`
630
- (default `${GATE_SDK_GATES_DIR:-scripts}/settings-pins.conf`) holds against
631
- the tracked settings file `CONTEXT_KIT_SETTINGS_FILE` (default
632
- `.claude/settings.json`). Grammar: one `<path> = <expected JSON>` per line,
633
- `#` comments and blanks ignored. General-purpose by construction — any
634
- settings key is pinnable — this consumer's first pins hold the
635
- auto-memory-disabling keys.
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
-
686
- Dispositions: a pin whose path resolves to the expected value passes; a path
687
- present with a different value is the legible violation (exit 1, each finding
688
- reading path, expected, and actual). Fail-closed (exit 2) on an unreadable or
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).
695
-
696
- **What a pin is worth depends on which tiers can outrank the file it pins**, and
697
- the gate reads exactly one tier. The harness resolves settings across five, in
698
- order: managed policy, then command-line, then the untracked local settings file,
699
- then the tracked settings file this gate reads, then the operator's user-level
700
- file. Objects deep-merge; the exceptions that merge rather than override are the
701
- permissions arrays, MCP servers, HTTP hook URLs and `fallbackModel` chains. Two
702
- consequences the gate's own verdict does not carry. A pin **does** beat the
703
- operator's user-level file, which is what makes a tracked pin meaningful at all
704
- rather than a suggestion the machine can quietly ignore. And a pin is **beaten**
705
- by three tiers above it, of which `check-memory-off` covers one — the local
706
- settings overlay — leaving managed policy and command-line flags outside any
707
- gate's reach. That residue is unclosable here rather than merely unbuilt: neither
708
- tier leaves an artifact in the tree, and the command line does not exist until
709
- the session starts.
710
-
711
- ## check-settings-paths
712
-
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
716
- invariant over the same tracked file: every entry in
717
- `CONTEXT_KIT_SETTINGS_FILE`'s `permissions.allow[]` whose command token is a
718
- **literal** repo-relative `.sh` path resolves in the working tree. The knob is
719
- reused, not introduced — §check-settings-pins already owns it and its default.
720
-
721
- The class it defends is a standing property of a gate port rather than a
722
- one-time count: replacing a kit's `checks/<gate>.sh` with a `<gate>.gate`
723
- descriptor strands every allow entry naming the old path, and this repo
724
- accumulated such entries one cohort apart before the gate existed. A dead grant
725
- breaks nothing — no command can reach it — so the cost is a permission roster
726
- whose every reader must re-verify which lines still mean anything.
727
-
728
- **The extraction predicate**, scoped against the shapes a permission array
729
- actually carries. A candidate is taken only from an entry of the form
730
- `Bash(<command>)`; leading `env NAME=VALUE` assignments and a `bash`/`sh`
731
- interpreter word are skipped, and the first remaining token is the candidate. A
732
- candidate not ending in `.sh` is out of scope — a bare command names no path,
733
- and a non-`.sh` path entry (a log truncation, a scratch removal) names a
734
- runtime-created gitignored path whose absence is its ordinary state, so
735
- existence is the wrong predicate for it. A candidate **containing `*`** is a
736
- pattern, intentionally polymorphic over files that need not exist today, and is
737
- skipped. That rule is scoped to the *command token*, not the entry: this repo's
738
- standing shape for a grant taking arguments is a bare entry beside a
739
- `*`-suffixed twin, and the twin's path is as literal — and as strandable — as
740
- the bare form's, so it stays in scope.
741
-
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.
749
-
750
- Dispositions: exit 1 lists each violating entry verbatim beside the path that
751
- did not resolve, so the reader can repoint or drop the grant without re-deriving
752
- which token was read. The clean line reports the **checked count**, which is
753
- what distinguishes a predicate that scoped to the array from one that vacuously
754
- matched nothing. Fail-closed (exit 2) on a settings file that is
755
- unreadable or not JSON — the sibling gate reads the same file on the same terms,
756
- and the file is this gate's sole subject rather than an opt-in manifest, so
757
- there is no absent-surface skip to grant. A `--fixture <dir>` mode reads
758
- `<dir>/settings.json` and resolves candidates against `<dir>`, which is the
759
- hermetic mode the `good/`+`bad/` fixture pair drives.
760
-
761
- The pair pins the scoping, not merely the verdict. `good/` carries every
762
- skipped shape — pattern tokens, bare non-path commands, non-`.sh` paths —
763
- alongside resolving literals in all three extraction shapes (bare,
764
- `env`-prefixed, trailing-flag), and its expectation pins the **checked count**:
765
- the pattern-expansion defect above passes an exit-code-only fixture, because an
766
- expanded pattern resolves by construction, and is visible only in the count.
767
- `bad/` carries a dead path in the bare, `*`-twin and `env`-prefixed shapes
768
- beside one resolving grant, so a broken extraction arm shows as a missing
769
- finding rather than a still-red exit.
770
-
771
- Its `# graph:` manifest names the settings file as its subject and the check
772
- script globs as a **reverse trigger** — a cohort deleting a ported gate's `.sh`
773
- is exactly the edit that strands a grant, so it must re-run the gate. The
774
- distinction is recorded because gate-sdk/SPEC.md's port criterion 4 turns on it,
775
- and a later port reading that couple as content would misclassify the member.
776
- The trigger is a partial route by construction: the generated hook reads staged
777
- `ACMR` paths, so a *deleted* `.sh` never matches it. What the trigger catches is
778
- the ordinary edit that strands a grant; what catches the cohort is the full
779
- battery, which runs whole-tree with no trigger filter.
780
-
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.
792
-
793
- **The gate is not the prune.** It reads the settings file and writes nothing,
794
- but it reds the moment it registers on a tree carrying stranded entries, and the
795
- settings file is operator-owned configuration a session may not edit. The
796
- landing order is therefore fixed: the operator prunes, then the gate registers.
797
-
798
- ## check-memory-off
799
-
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
804
- stage. Two red conditions:
805
-
806
- - the harness's per-project memory dir holds content — any regular file that
807
- is not the dir-preserving `.gitkeep`;
808
- - the untracked local settings file (`settings.local.json` beside the settings
809
- file) sets a pinned key to a value other than its pin — the override the
810
- hermetic gate cannot see, since it reads only the tracked file.
811
-
812
- `CONTEXT_KIT_MEMORY_DIRS` (a space-separated glob list) names the dirs to
813
- scan; its default derives the current project's dir from the harness layout
814
- (§Layout and configuration). CI-neutral: where the surface is absent the gate
815
- is clean, and the clean line states the fail-open caveat — an absent dir
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.
843
-
844
- ## check-footprint-fresh
845
-
846
- `checks/check-footprint-fresh.gate` (hermetic, `precommit`) byte-compares the
847
- committed `docs/footprint.md` against the footprint emitter, the
848
- `check-docs-mirror-fresh`/`check-trajectory-fresh` posture: a generated,
849
- freshness-gated projection is Derivation-first's sanctioned copy, so the
850
- maintainer re-runs the emitter after any change to a measured surface and a
851
- stale page reddens the battery. Its `# graph:` manifest couples the measured
852
- surfaces — the configured agent file and each kit's `templates/` tree — so an
853
- edit to what the page counts re-fires the gate.
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
-
863
- Bare, it runs the live emitter; a two-argument form
864
- (`check-footprint-fresh <projection> <emit>`) compares two pre-baked files,
865
- the hermetic mode the `good/`+`bad/` fixture pair drives. Fail-closed (exit 2)
866
- on a missing projection or emit source; the stale byte-compare is the exit-1
867
- violation. The page's generated numbers ride the `docs/evidence-data.md`
868
- precedent past the prose gates on content, not a named valve — the figures live
869
- in table cells the count gate does not read as prose, and the method prose names
870
- no bare collection total.
871
-
872
- ## Layout and configuration
873
-
874
- ```
875
- context-kit/
876
- bin/md-index.sh
877
- bin/md-section.sh
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
880
- lib/toolfloor.sh # sourceable owner: the probe roster + the floor predicate
881
- lib/pub-lang/rust.sh # shipped extractor: Rust public items
882
- lib/pub-lang/ts.sh # shipped extractor: TypeScript export surface
883
- bin/always-loaded.sh
884
- bin/env-probe.sh # derives the marker-bounded local env profile
885
- bin/run-index-tests.sh # expected-output runner for the bin tools
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
891
- gate-tests/check-brevity/{good,bad}/
892
- gate-tests/check-settings-pins/{good,bad}/
893
- gate-tests/check-settings-paths/{good,bad}/
894
- gate-tests/check-memory-off/{good,bad}/
895
- gate-tests/check-footprint-fresh/{good,bad}/
896
- gate-tests/check-brevity.test.sh # the unmatched-section axis the pair cannot hold
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
899
- index-tests/ # fixture corpus + expected outputs
900
- templates/session-context.sh # consumer copy: marked consumer sections
901
- templates/settings-sessionstart.json
902
- templates/context-config.sh
903
- templates/close-brevity.md
904
- smoke/install.sh
905
- smoke/violation.sh
906
- smoke/agents-md.sh # the AGENTS.md adapter smoke (its own validate suite)
907
- ```
908
-
909
- The install also seeds the committed baseline the footprint contract holds
910
- (§The consumer footprint): after wiring the hook it runs
911
- `always-loaded.sh --update-baseline` once to write
912
- `always-loaded-baseline.txt`, and `smoke/install.sh` asserts that step by
913
- running the meter and checking the baseline lands. Install also seeds the local
914
- env profile — `env-probe.sh` writes the first `ENV.local.md` block
915
- (§bin/env-probe); being an operator-local, gitignored surface, no smoke asserts
916
- it (the stated install step is its enforcement).
917
-
918
- Config follows the established kit pattern: copy
919
- `templates/context-config.sh` into the gates dir (or point
920
- `CONTEXT_KIT_CONFIG_FILE` elsewhere) and override any knob; defaults fill
921
- what the consumer left unset, and a set-but-missing `CONTEXT_KIT_CONFIG_FILE`
922
- exits 2 rather than silently running on defaults. Knobs (this repo's layout
923
- as defaults):
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
-
957
- - `CONTEXT_KIT_SURFACES` — array of always-loaded files; default
958
- `("CLAUDE.md")`. The measured surface is agent-file-name-agnostic: a consumer
959
- whose harness reads `AGENTS.md` (or any other always-loaded agent file) sets
960
- this to that file and the meter, the footprint, and `check-brevity` all follow
961
- — no kit mechanism resolves the agent file by literal. The
962
- `smoke/agents-md.sh` adapter smoke exercises exactly that: an `AGENTS.md`
963
- scratch consumer whose battery is green and whose meter and footprint measure
964
- `AGENTS.md`.
965
- - `CONTEXT_KIT_PUB_LANGS` — array naming the `pub-index` extractors to
966
- enable; default every shipped extractor, derived from the `lib/pub-lang/`
967
- roster at run time (never a maintained list).
968
- - `CONTEXT_KIT_PUB_LANG_DIR` — the consumer extractor dir searched before the
969
- kit's `lib/pub-lang/` (a same-basename file shadows the shipped one);
970
- default `${GATE_SDK_GATES_DIR:-scripts}/pub-lang`.
971
- - `CONTEXT_KIT_HOOK_CMD` — command whose output line count approximates
972
- the steady-state hook body; default queue-kit's
973
- `run-gates.sh --emit queue-index --collapse-deferred` when resolvable, else empty
974
- (surfaces only).
975
- - `CONTEXT_KIT_DRIFT_REPORT` — path to the consumer's drift-report script;
976
- the session-context hook runs it with `--trend` for the brief's drift
977
- line; default empty (the line is omitted).
978
- - `CONTEXT_KIT_STAGE_RULES` — path to a stage→craft-rule pointer emitter
979
- (doctrine-kit's `stage-rules.sh`); the session-context hook runs it with the
980
- current stage for the brief's craft-rule block; default empty (the block is
981
- omitted).
982
- - `CONTEXT_KIT_STATE_FILE` — the lifecycle evidence file whose **last data
983
- line** carries the stage cursor the hook routes on (§The session-context
984
- hook); default `${GATE_SDK_WORKFLOW_DIR:-.workflow}/WORKFLOW-STATE.txt`. Read
985
- as a named file, never through stdin — the session-role signal consumes stdin
986
- exactly once, and a second reader there would starve it.
987
- - `CONTEXT_KIT_ENV_PROFILE_FILE` — the consumer-local env profile file
988
- `bin/env-probe.sh` writes and the session-context hook's step 9 emits (§bin/
989
- env-probe); default `ENV.local.md`.
990
- - `CONTEXT_KIT_SESSION_ROLE_FILE` — the session-role marker `/lead` writes and
991
- the session-context hook's identity match reads (§The session-context hook);
992
- default `${GATE_SDK_TMP_DIR:-.tmp}/session-role` (gitignored scratch).
993
- - `CONTEXT_KIT_BASELINE_FILE` — default
994
- `${GATE_SDK_WORKFLOW_DIR:-.workflow}/always-loaded-baseline.txt`.
995
- - `CONTEXT_KIT_BREVITY_FILE` — default `CLAUDE.md`.
996
- - `CONTEXT_KIT_BREVITY_SECTION` — heading of the budgeted bullet section;
997
- default `## Shared conventions`.
998
- - `CONTEXT_KIT_BREVITY_BUDGET` — lines per bullet; default `4`.
999
- - `CONTEXT_KIT_BREVITY_POINTER_RE` — the "cites a deeper doc" pattern;
1000
- default `§`.
1001
- - `CONTEXT_KIT_SETTINGS_FILE` — the tracked harness settings file
1002
- check-settings-pins and check-settings-paths each verify, on a different
1003
- invariant, and whose `.local.json` sibling check-memory-off scans; default
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).
1014
- - `CONTEXT_KIT_SETTINGS_PINS` — the pins manifest; default
1015
- `${GATE_SDK_GATES_DIR:-scripts}/settings-pins.conf`.
1016
- - `CONTEXT_KIT_MEMORY_DIRS` — space-separated glob list of harness memory dirs
1017
- check-memory-off scans; default the current project's dir under the operator's
1018
- home, `$HOME/.claude/projects/<slug>/memory`, where `<slug>` is the project's
1019
- absolute path with every `/` and `.` folded to `-` (the harness's own
1020
- encoding). A knob because the layout moves (the plugin-marketplace ruling:
1021
- design against the live layout, keep it config).
1022
-
1023
- The hook template itself is consumer-edited rather than knob-driven (the
1024
- guard-kit guard precedent): its variation points are layout judgment,
1025
- and a template with a dozen knobs is harder to own than a marked section.
1026
-
1027
- ## Testing
1028
-
1029
- The three index tools and the meter are advisory and speak plain text, so
1030
- the gate contracts do not fit; the kit ships an expected-output runner
1031
- instead: `index-tests/` holds a small fixture corpus (Markdown with nested
1032
- headings, fences, and link-bearing first sentences; Rust with the pub-item
1033
- kinds; TypeScript with every kind the `ts.sh` grammar claims — including
1034
- `const enum` and `export default` — beside re-export and non-export lines it
1035
- must skip; a baseline file) beside expected outputs, and
1036
- `bin/run-index-tests.sh` runs each tool over the corpus and asserts exact
1037
- output, failing on any diff. The Rust golden is the no-regression assertion
1038
- for the extractor-dispatcher refactor: it stays byte-identical across it. A
1039
- consumer-shadowing case points `CONTEXT_KIT_PUB_LANG_DIR` at a scratch dir
1040
- whose `rust.sh` emits a marker row, exercising the consumer-first resolution
1041
- order (the shadow's output, not the shipped grammar's, is what the golden
1042
- records). The floor predicate rides the same runner rather than a fixture pair —
1043
- it is a sourced function, not a gate: `index-tests/toolfloor-cases.sh` sources
1044
- `lib/toolfloor.sh` and prints one line per (element, banner) pair, so the closed
1045
- verdict set, the spellings of an unconstrained member, and the
1046
- `uncomparable` fail-closed arm are asserted against a golden rather than assumed.
1047
- The audience axis is pinned in a second table in the same file, printing the
1048
- parsed field and the consumer-side predicate per element rather than a verdict,
1049
- because no verdict reads that field: its present, empty and omitted forms are
1050
- each a case, the emptiness rule being the part of the grammar a reader is
1051
- likeliest to get wrong.
1052
- The runner registers as its own evidence-kit validate suite
1053
- (`index_tests`, the `demo` precedent): the golden the refactor leans on now
1054
- has an automated validate-stage consumer. The footprint emitter is advisory the same way, but its
1055
- projection is gated rather than runner-tested: `check-footprint-fresh` byte-holds
1056
- `docs/footprint.md` against `--emit`. `check-brevity`, `check-settings-pins`,
1057
- `check-memory-off`, and `check-footprint-fresh` are gates and carry the standard
1058
- fixture pair; the footprint pair drives the hermetic two-argument mode
1059
- (`<projection> <emit>`), the `check-trajectory-fresh` precedent. Both
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
1067
- express: `check-brevity.test.sh` holds the unmatched-section resolution (the
1068
- pair fixes `CONTEXT_KIT_BREVITY_SECTION` at the stock default and always
1069
- supplies a file carrying it, so neither case can express a section that
1070
- resolves to nothing — an unmatched section is exit 2, a broken machine rather
1071
- than a clean tree). The memory-off local-override axis — an untracked
1072
- `settings.local.json` that re-enables a pinned key past an empty dir — cannot
1073
- be a good/bad pair (the pair fixes the dir axis), so `check-memory-off.test.sh`
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.
1079
-
1080
- `smoke/install.sh` copies the templates into the scratch consumer (config
1081
- into the gates dir, hook wiring into the harness settings), runs the hook
1082
- end-to-end asserting it exits zero (and, when queue-kit is co-vendored,
1083
- emits the queue index — the installer assumes only gate-sdk, so the queue
1084
- integration is exercised only alongside queue-kit), and runs
1085
- `always-loaded.sh --update-baseline` asserting the baseline file appears.
1086
- `smoke/violation.sh` crafts an over-budget pointered bullet in the scratch
1087
- consumer's brevity file and asserts the battery reddens via
1088
- `check-brevity`. It inserts the bullet inside the budgeted section rather than
1089
- appending at end-of-file: a co-vendored kit may append a trailing section (the
1090
- doctrine-kit installer adds one), and an EOF-appended bullet would land outside
1091
- `check-brevity`'s scanned section and silently disarm the smoke.
1092
-
1093
- `smoke/agents-md.sh` is the agent-file adapter smoke — the exercise behind the
1094
- Tier-two compatibility claim (docs/positioning.md §The tiered compatibility
1095
- claim). It vendors a scratch consumer through the shared consumer-smoke
1096
- mechanics (gate-sdk/SPEC.md §Consumer smoke), converts its agent file from
1097
- `CLAUDE.md` to `AGENTS.md`, sets the agent-file knobs in the consumer's config
1098
- seams (`GATE_SDK_AGENT_FILE`, `LIFECYCLE_KIT_AGENT_FILE`, `DOCTRINE_KIT_AGENT_FILE`,
1099
- `CANON_KIT_MANIFEST_FILES`, `CONTEXT_KIT_SURFACES`, `CONTEXT_KIT_BREVITY_FILE`),
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
1102
- `AGENTS.md` at root while rejecting a stray second agent file. It is a standalone
1103
- harness — not driven by `run-consumer-smoke.sh`, which asserts the kit defaults
1104
- under zero config — and registers as its own evidence-kit validate suite
1105
- (`agents_md_smoke`, the `demo` precedent).
1106
-
1107
- ## Out of scope
1108
-
1109
- Product-shaped indexes — a `proto-index` over a proto layout, a
1110
- `diagram-index` over architecture HTML — are consumer surfaces; a consumer
1111
- names its own extra indexes in the hook template's footer. `check-md-refs`
1112
- (an orientation-doc roster is rule content; the link-resolution mechanism is
1113
- unclaimed, not this kit's) and `check-md-sections` (a required-heading map is
1114
- rule content, and the queue surface it guards is already gated by queue-kit).
1115
- A close-stage harvest pipeline (`[pub]` lessons, publication paths) is
1116
- product workflow, not context mechanism. `drift-report.sh` itself is
1117
- drift-kit's surface — only the always-loaded KPI lives here. A consumer's
1118
- session-context content — its delegation nudge wording, component roster,
1119
- and extra index commands — stays in its own copied hook. Memory **content**
1120
- is out of scope by construction: the memory-off gates govern presence (the
1121
- dir stays empty) and pins (the disabling keys hold), never a live session's
1122
- context, which is not a scannable surface — a session polluted mid-flight is
1123
- caught by the tree the gates hold, not by reading the session.