checkwright 0.25.0 → 0.27.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 (1057) hide show
  1. package/README.md +35 -1361
  2. package/bin/checkwright.ps1 +176 -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/aarch64-unknown-linux-musl/checkwright-gates +0 -0
  12. package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates.sha256 +1 -0
  13. package/payload/artifact/targets.list +133 -24
  14. package/payload/artifact/x86_64-apple-darwin/checkwright-gates +0 -0
  15. package/payload/artifact/x86_64-apple-darwin/checkwright-gates.sha256 +1 -0
  16. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe +0 -0
  17. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -0
  18. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  19. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  20. package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates +0 -0
  21. package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates.sha256 +1 -0
  22. package/payload/canon-kit/README.md +25 -37
  23. package/payload/canon-kit/checks/check-amendment-queue.gate +2 -2
  24. package/payload/canon-kit/checks/check-amendment-retired-spelling.gate +3 -0
  25. package/payload/canon-kit/checks/check-amendment-update-target.gate +1 -1
  26. package/payload/canon-kit/checks/check-citation-link.gate +4 -0
  27. package/payload/canon-kit/checks/check-comment-tier.gate +1 -1
  28. package/payload/canon-kit/checks/check-deprecation-task.gate +2 -1
  29. package/payload/canon-kit/checks/check-docs-cmd.gate +2 -2
  30. package/payload/canon-kit/checks/check-docs-link-convention.gate +1 -1
  31. package/payload/canon-kit/checks/check-docs-page-repeat.gate +4 -0
  32. package/payload/canon-kit/checks/check-docs-restatement-parity.gate +4 -0
  33. package/payload/canon-kit/checks/check-fence-command-head.gate +3 -0
  34. package/payload/canon-kit/checks/check-fence-run.gate +3 -0
  35. package/payload/canon-kit/checks/check-install-claim.gate +2 -1
  36. package/payload/canon-kit/checks/check-knob-citation.gate +1 -1
  37. package/payload/canon-kit/checks/check-manifest-count.gate +1 -1
  38. package/payload/canon-kit/checks/check-manifest-temporal.gate +1 -1
  39. package/payload/canon-kit/checks/check-md-refs.gate +1 -1
  40. package/payload/canon-kit/checks/check-md-unwrapped.gate +3 -0
  41. package/payload/canon-kit/checks/check-measured-claim.gate +2 -1
  42. package/payload/canon-kit/checks/check-payload-claim.gate +2 -1
  43. package/payload/canon-kit/checks/check-prose-bounds.gate +3 -0
  44. package/payload/canon-kit/checks/check-prose-enum.gate +2 -1
  45. package/payload/canon-kit/checks/check-prose-tells.gate +1 -1
  46. package/payload/canon-kit/checks/check-provenance-seam.gate +3 -0
  47. package/payload/canon-kit/checks/check-spec-derivable-section.gate +1 -1
  48. package/payload/canon-kit/checks/check-spec-dod-singleton.gate +1 -1
  49. package/payload/canon-kit/checks/check-spec-embedded-source.gate +1 -1
  50. package/payload/canon-kit/checks/check-spec-fence-balance.gate +1 -1
  51. package/payload/canon-kit/checks/check-spec-pointer.gate +2 -2
  52. package/payload/canon-kit/checks/check-surface-duplication.gate +3 -0
  53. package/payload/canon-kit/checks/check-todo-task-liveness.gate +1 -1
  54. package/payload/canon-kit/checks/check-tracking-claim.gate +1 -1
  55. package/payload/canon-kit/checks/check-unmarked-claim.gate +2 -1
  56. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-tidy.md +3 -0
  57. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +37 -8
  58. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +6 -3
  59. package/payload/canon-kit/gate-tests/check-amendment-queue/good/SPEC-widget.md +7 -0
  60. package/payload/canon-kit/gate-tests/check-amendment-queue/good/TASK-QUEUE.md +11 -3
  61. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/SPEC-nosection.md +16 -0
  62. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/SPEC-thing.md +26 -0
  63. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/expect.txt +8 -0
  64. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/surface/one.md +4 -0
  65. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/surface/two.md +3 -0
  66. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/SPEC-tidy.md +20 -0
  67. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/SPEC-widget.md +37 -0
  68. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/component/README.md +4 -0
  69. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/component/SPEC.md +4 -0
  70. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/expect.txt +1 -0
  71. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/unnamed.md +4 -0
  72. package/payload/canon-kit/gate-tests/check-amendment-update-target.test.sh +1 -1
  73. package/payload/canon-kit/gate-tests/check-citation-link/bad/expect.txt +6 -0
  74. package/payload/canon-kit/gate-tests/check-citation-link/bad/scripts/canon-config.knobs +2 -0
  75. package/payload/canon-kit/gate-tests/check-citation-link/bad/site/page.md +13 -0
  76. package/payload/canon-kit/gate-tests/check-citation-link/good/expect.txt +1 -0
  77. package/payload/canon-kit/gate-tests/check-citation-link/good/scripts/canon-config.knobs +2 -0
  78. package/payload/canon-kit/gate-tests/check-citation-link/good/site/page.md +28 -0
  79. package/payload/canon-kit/gate-tests/check-comment-tier/bad/.github/workflows/ci.yml +15 -0
  80. package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +2 -0
  81. package/payload/canon-kit/gate-tests/check-comment-tier/bad/scripts/canon-config.knobs +2 -0
  82. package/payload/canon-kit/gate-tests/check-comment-tier/good/.github/workflows/ci.yml +23 -0
  83. package/payload/canon-kit/gate-tests/check-comment-tier/good/config.yml +2 -0
  84. package/payload/canon-kit/gate-tests/check-comment-tier/good/expect.txt +1 -1
  85. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +1 -1
  86. package/payload/canon-kit/gate-tests/check-comment-tier/good/scripts/canon-config.knobs +2 -0
  87. package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +37 -26
  88. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/TASK-QUEUE.md +3 -1
  89. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.knobs +2 -0
  90. package/payload/canon-kit/gate-tests/check-deprecation-task/good/TASK-QUEUE.md +6 -2
  91. package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -1
  92. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.knobs +2 -0
  93. package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +12 -10
  94. package/payload/canon-kit/gate-tests/check-docs-cmd/good/doc.md +4 -1
  95. package/payload/canon-kit/gate-tests/check-docs-cmd.test.sh +61 -0
  96. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/expect.txt +3 -0
  97. package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +21 -2
  98. package/payload/canon-kit/gate-tests/check-docs-page-repeat/bad/expect.txt +2 -0
  99. package/payload/canon-kit/gate-tests/check-docs-page-repeat/bad/scripts/canon-config.knobs +2 -0
  100. package/payload/canon-kit/gate-tests/check-docs-page-repeat/bad/site/page.md +8 -0
  101. package/payload/canon-kit/gate-tests/check-docs-page-repeat/good/expect.txt +1 -0
  102. package/payload/canon-kit/gate-tests/check-docs-page-repeat/good/scripts/canon-config.knobs +2 -0
  103. package/payload/canon-kit/gate-tests/check-docs-page-repeat/good/site/page.md +24 -0
  104. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/expect.txt +2 -0
  105. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/kit/README.md +10 -0
  106. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/kit/index.md +11 -0
  107. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/scripts/canon-config.knobs +2 -0
  108. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/scripts/gate-sdk-config.knobs +2 -0
  109. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/expect.txt +1 -0
  110. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/kit/README.md +12 -0
  111. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/kit/index.md +13 -0
  112. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/scripts/canon-config.knobs +2 -0
  113. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/scripts/gate-sdk-config.knobs +2 -0
  114. package/payload/canon-kit/gate-tests/check-fence-command-head/bad/args +1 -0
  115. package/payload/canon-kit/gate-tests/check-fence-command-head/bad/doc.md +16 -0
  116. package/payload/canon-kit/gate-tests/check-fence-command-head/bad/expect.txt +5 -0
  117. package/payload/canon-kit/gate-tests/check-fence-command-head/good/args +1 -0
  118. package/payload/canon-kit/gate-tests/check-fence-command-head/good/bin/run.sh +3 -0
  119. package/payload/canon-kit/gate-tests/check-fence-command-head/good/doc.md +41 -0
  120. package/payload/canon-kit/gate-tests/check-fence-command-head/good/expect.txt +1 -0
  121. package/payload/canon-kit/gate-tests/check-fence-command-head/good/lib/tool.sh +5 -0
  122. package/payload/canon-kit/gate-tests/check-fence-command-head/good/scripts/canon-config.knobs +2 -0
  123. package/payload/canon-kit/gate-tests/check-fence-run/bad/args +1 -0
  124. package/payload/canon-kit/gate-tests/check-fence-run/bad/doc.md +32 -0
  125. package/payload/canon-kit/gate-tests/check-fence-run/bad/expect.txt +7 -0
  126. package/payload/canon-kit/gate-tests/check-fence-run/good/args +1 -0
  127. package/payload/canon-kit/gate-tests/check-fence-run/good/doc.md +31 -0
  128. package/payload/canon-kit/gate-tests/check-fence-run/good/expect.txt +1 -0
  129. package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.knobs +7 -0
  130. package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.knobs +7 -0
  131. package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +42 -7
  132. package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +1 -2
  133. package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
  134. package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +37 -8
  135. package/payload/canon-kit/gate-tests/check-manifest-count/bad/SPEC.md +3 -0
  136. package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +10 -0
  137. package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +6 -6
  138. package/payload/canon-kit/gate-tests/check-md-refs.test.sh +1 -1
  139. package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/doc.md +13 -0
  140. package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/expect.txt +4 -0
  141. package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/scripts/canon-config.knobs +2 -0
  142. package/payload/canon-kit/gate-tests/check-md-unwrapped/good/doc.md +45 -0
  143. package/payload/canon-kit/gate-tests/check-md-unwrapped/good/expect.txt +1 -0
  144. package/payload/canon-kit/gate-tests/check-md-unwrapped/good/scripts/canon-config.knobs +4 -0
  145. package/payload/canon-kit/gate-tests/check-measured-claim/bad/SPEC.md +3 -0
  146. package/payload/canon-kit/gate-tests/check-measured-claim/bad/expect.txt +1 -0
  147. package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.knobs +4 -0
  148. package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +8 -0
  149. package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.knobs +4 -0
  150. package/payload/canon-kit/gate-tests/check-measured-claim/good/worktrees/SPEC.md +12 -0
  151. package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +32 -13
  152. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.knobs +6 -0
  153. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.knobs +6 -0
  154. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/CLAUDE.md +9 -0
  155. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/SPEC.md +11 -0
  156. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/expect.txt +3 -0
  157. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/scripts/canon-config.knobs +3 -0
  158. package/payload/canon-kit/gate-tests/check-prose-bounds/good/CLAUDE.md +10 -0
  159. package/payload/canon-kit/gate-tests/check-prose-bounds/good/SPEC.md +27 -0
  160. package/payload/canon-kit/gate-tests/check-prose-bounds/good/expect.txt +1 -0
  161. package/payload/canon-kit/gate-tests/check-prose-bounds/good/scripts/canon-config.knobs +3 -0
  162. package/payload/canon-kit/gate-tests/check-prose-bounds.test.sh +98 -0
  163. package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.knobs +3 -0
  164. package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.knobs +3 -0
  165. package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +55 -25
  166. package/payload/canon-kit/gate-tests/check-prose-tells/bad/prose.md +2 -0
  167. package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.knobs +5 -0
  168. package/payload/canon-kit/gate-tests/check-prose-tells/good/prose.md +6 -0
  169. package/payload/canon-kit/gate-tests/check-prose-tells/good/scripts/{canon-config.sh → canon-config.knobs} +2 -5
  170. package/payload/canon-kit/gate-tests/check-prose-tells/good/worktrees/prose.md +17 -0
  171. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/TASK-QUEUE.md +15 -0
  172. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/expect.txt +8 -0
  173. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/canon-config.knobs +3 -0
  174. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/gate-sdk-config.knobs +2 -0
  175. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/lifecycle-config.knobs +12 -0
  176. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/widget-toolkit/SPEC.md +27 -0
  177. package/payload/canon-kit/gate-tests/check-provenance-seam/good/TASK-QUEUE.md +15 -0
  178. package/payload/canon-kit/gate-tests/check-provenance-seam/good/expect.txt +1 -0
  179. package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/canon-config.knobs +3 -0
  180. package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/gate-sdk-config.knobs +2 -0
  181. package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/lifecycle-config.knobs +12 -0
  182. package/payload/canon-kit/gate-tests/check-provenance-seam/good/widget-toolkit/SPEC.md +20 -0
  183. package/payload/canon-kit/gate-tests/check-provenance-seam.test.sh +136 -0
  184. package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +1 -1
  185. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/README.md +6 -0
  186. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/SPEC-widget.md +5 -0
  187. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.rs +2 -0
  188. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +4 -0
  189. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.knobs +6 -0
  190. package/payload/canon-kit/gate-tests/check-spec-pointer/good/README.md +15 -0
  191. package/payload/canon-kit/gate-tests/check-spec-pointer/good/SPEC-widget.md +10 -0
  192. package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -1
  193. package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.rs +2 -0
  194. package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.knobs +6 -0
  195. package/payload/canon-kit/gate-tests/check-spec-pointer/good/vendored-kit/notes.txt +4 -0
  196. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/TASK-QUEUE.md +3 -1
  197. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/TASK-QUEUE.md +9 -3
  198. package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +1 -1
  199. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/SPEC.md +3 -0
  200. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/expect.txt +1 -0
  201. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/scripts/canon-config.knobs +4 -0
  202. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/SPEC.md +3 -0
  203. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/scripts/canon-config.knobs +4 -0
  204. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/worktrees/SPEC.md +11 -0
  205. package/payload/canon-kit/gate-tests/check-unmarked-claim.test.sh +53 -28
  206. package/payload/canon-kit/templates/SPEC-amendment.md +46 -25
  207. package/payload/canon-kit/templates/canon-config.knobs +1 -0
  208. package/payload/context-kit/README.md +33 -61
  209. package/payload/context-kit/checks/check-brevity.gate +2 -2
  210. package/payload/context-kit/checks/check-footprint-fresh.gate +3 -2
  211. package/payload/context-kit/checks/check-memory-off.gate +1 -1
  212. package/payload/context-kit/checks/check-settings-paths.gate +2 -2
  213. package/payload/context-kit/checks/check-settings-pins.gate +1 -1
  214. package/payload/context-kit/checks/check-surface-ratchet.gate +3 -0
  215. package/payload/context-kit/gate-tests/check-brevity/bad/CLAUDE.md +9 -2
  216. package/payload/context-kit/gate-tests/check-brevity/bad/expect.txt +1 -0
  217. package/payload/context-kit/gate-tests/check-brevity/good/CLAUDE.md +9 -4
  218. package/payload/context-kit/gate-tests/check-brevity/good/expect.txt +1 -1
  219. package/payload/context-kit/gate-tests/check-brevity.test.sh +107 -24
  220. package/payload/context-kit/gate-tests/check-footprint-fresh/good/CLAUDE.md +6 -0
  221. package/payload/context-kit/gate-tests/check-footprint-fresh/good/demo-kit/SPEC.md +3 -0
  222. package/payload/context-kit/gate-tests/check-footprint-fresh/good/demo-kit/templates/guide.md +3 -0
  223. package/payload/context-kit/gate-tests/check-footprint-fresh/good/docs/footprint.md +32 -0
  224. package/payload/context-kit/gate-tests/check-memory-off/bad/scripts/{context-config.sh → context-config.knobs} +1 -3
  225. package/payload/context-kit/gate-tests/check-memory-off/good/scripts/{context-config.sh → context-config.knobs} +1 -3
  226. package/payload/context-kit/gate-tests/check-memory-off.test.sh +1 -1
  227. package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +2 -0
  228. package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +21 -0
  229. package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/run-gates.sh +4 -0
  230. package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +2 -1
  231. package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +48 -1
  232. package/payload/context-kit/gate-tests/check-settings-paths/good/tools/run-gates.sh +4 -0
  233. package/payload/context-kit/gate-tests/check-settings-pins.test.sh +1 -1
  234. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/CLAUDE.md +5 -0
  235. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/expect.txt +2 -0
  236. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/scripts/context-config.knobs +4 -0
  237. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/surface-ceiling.txt +2 -0
  238. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/templates/ungoverned.md +3 -0
  239. package/payload/context-kit/gate-tests/check-surface-ratchet/good/CLAUDE.md +3 -0
  240. package/payload/context-kit/gate-tests/check-surface-ratchet/good/expect.txt +1 -0
  241. package/payload/context-kit/gate-tests/check-surface-ratchet/good/scripts/context-config.knobs +4 -0
  242. package/payload/context-kit/gate-tests/check-surface-ratchet/good/surface-ceiling.txt +4 -0
  243. package/payload/context-kit/gate-tests/check-surface-ratchet/good/templates/held.md +4 -0
  244. package/payload/context-kit/gate-tests/check-surface-ratchet.test.sh +76 -0
  245. package/payload/context-kit/index-tests/corpus/baseline.txt +1 -1
  246. package/payload/context-kit/index-tests/corpus/surface.md +1 -6
  247. package/payload/context-kit/index-tests/expected/always-loaded.txt +1 -1
  248. package/payload/context-kit/templates/close-brevity.md +9 -28
  249. package/payload/context-kit/templates/context-config.knobs +1 -0
  250. package/payload/context-kit/templates/session-context.sh +44 -29
  251. package/payload/delegation-kit/README.md +35 -69
  252. package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +1 -1
  253. package/payload/delegation-kit/checks/check-gate-tamper.gate +1 -1
  254. package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +23 -2
  255. package/payload/delegation-kit/templates/agent-execution.md +23 -389
  256. package/payload/delegation-kit/templates/delegation-config.knobs +4 -0
  257. package/payload/delegation-kit/templates/dispatch-checklists.md +8 -45
  258. package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +33 -17
  259. package/payload/doctrine-kit/DOCTRINE.md +92 -458
  260. package/payload/doctrine-kit/README.md +24 -55
  261. package/payload/doctrine-kit/checks/check-doctrine-registration.gate +1 -1
  262. package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +48 -3
  263. package/payload/drift-kit/README.md +43 -89
  264. package/payload/drift-kit/templates/close-knowledge.md +7 -22
  265. package/payload/drift-kit/templates/drift-config.knobs +1 -0
  266. package/payload/drift-kit/templates/economics.md +10 -48
  267. package/payload/drift-kit/templates/kpi-deprecated-surface.sh +31 -9
  268. package/payload/drift-kit/templates/kpis.list +2 -1
  269. package/payload/drift-kit/templates/price-table.tsv +1 -1
  270. package/payload/evidence-kit/README.md +24 -43
  271. package/payload/evidence-kit/checks/check-battery-roster.gate +1 -1
  272. package/payload/evidence-kit/checks/check-evidence-baseline.gate +2 -2
  273. package/payload/evidence-kit/checks/check-evidence-manifest.gate +1 -1
  274. package/payload/evidence-kit/checks/check-producer-liveness.gate +3 -0
  275. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.knobs +7 -0
  276. package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.knobs +7 -0
  277. package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +7 -7
  278. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/TASK-QUEUE.md +3 -1
  279. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/args +1 -0
  280. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/expect.txt +2 -0
  281. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/scripts/evidence-config.knobs +4 -0
  282. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/validate-baseline.txt +1 -0
  283. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/TASK-QUEUE.md +3 -1
  284. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/args +1 -0
  285. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/scripts/evidence-config.knobs +3 -0
  286. package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +134 -14
  287. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/scripts/{evidence-config.sh → evidence-config.knobs} +3 -5
  288. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/scripts/{evidence-config.sh → evidence-config.knobs} +3 -5
  289. package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +5 -4
  290. package/payload/evidence-kit/gate-tests/diff-baseline-status.test.sh +128 -0
  291. package/payload/evidence-kit/gate-tests/evidence-lib.test.sh +51 -45
  292. package/payload/evidence-kit/gate-tests/pre-hook.test.sh +66 -0
  293. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +29 -16
  294. package/payload/evidence-kit/templates/evidence-config.knobs +1 -0
  295. package/payload/gate-sdk/README.md +48 -79
  296. package/payload/gate-sdk/bin/build-native.sh +27 -4
  297. package/payload/gate-sdk/bin/run-gates.ps1 +266 -0
  298. package/payload/gate-sdk/bin/run-gates.sh +53 -277
  299. package/payload/gate-sdk/checks/check-action-gh-repo.gate +1 -1
  300. package/payload/gate-sdk/checks/check-action-job-ref.gate +3 -0
  301. package/payload/gate-sdk/checks/check-action-permissions.gate +3 -0
  302. package/payload/gate-sdk/checks/check-action-pinning.gate +1 -1
  303. package/payload/gate-sdk/checks/check-action-run-path.gate +3 -0
  304. package/payload/gate-sdk/checks/check-action-run-shell.gate +3 -0
  305. package/payload/gate-sdk/checks/check-commit-msg.gate +2 -1
  306. package/payload/gate-sdk/checks/check-commit-subject.gate +1 -1
  307. package/payload/gate-sdk/checks/check-core-files.gate +1 -1
  308. package/payload/gate-sdk/checks/check-crate-arms.gate +3 -0
  309. package/payload/gate-sdk/checks/check-enforcement-fresh.gate +3 -2
  310. package/payload/gate-sdk/checks/check-exec-bit.gate +1 -1
  311. package/payload/gate-sdk/checks/check-front-end-fail-open.gate +3 -0
  312. package/payload/gate-sdk/checks/check-gate-assertions.gate +2 -2
  313. package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +1 -1
  314. package/payload/gate-sdk/checks/check-gate-exemption-tasks.gate +1 -1
  315. package/payload/gate-sdk/checks/check-gate-fail-closed.gate +1 -1
  316. package/payload/gate-sdk/checks/check-gate-fixture-coverage.gate +1 -1
  317. package/payload/gate-sdk/checks/check-gate-output.gate +1 -1
  318. package/payload/gate-sdk/checks/check-gate-substrate-parity.gate +3 -0
  319. package/payload/gate-sdk/checks/check-graph.gate +2 -1
  320. package/payload/gate-sdk/checks/check-hook-exec-bit.gate +1 -1
  321. package/payload/gate-sdk/checks/check-identity.gate +1 -1
  322. package/payload/gate-sdk/checks/check-install-disposition.gate +3 -0
  323. package/payload/gate-sdk/checks/check-kit-enum.gate +1 -1
  324. package/payload/gate-sdk/checks/check-kit-registration.gate +1 -1
  325. package/payload/gate-sdk/checks/check-kit-roots-dialect.gate +3 -0
  326. package/payload/gate-sdk/checks/check-packed-links.gate +3 -0
  327. package/payload/gate-sdk/checks/check-path-dialect.gate +3 -0
  328. package/payload/gate-sdk/checks/check-pipe-membership.gate +3 -0
  329. package/payload/gate-sdk/checks/check-portability-floor.gate +4 -0
  330. package/payload/gate-sdk/checks/check-projection-roster.gate +4 -0
  331. package/payload/gate-sdk/checks/check-reads-couples.gate +1 -1
  332. package/payload/gate-sdk/checks/check-root-tiering.gate +1 -1
  333. package/payload/gate-sdk/checks/check-shellcheck.gate +3 -0
  334. package/payload/gate-sdk/checks/check-template-copy-parity.gate +1 -1
  335. package/payload/gate-sdk/checks/check-tree-terms.gate +2 -1
  336. package/payload/gate-sdk/checks/check-workflow-tiering.gate +1 -1
  337. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/args +2 -0
  338. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/expect.txt +1 -0
  339. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/scripts/gate-sdk-config.knobs +1 -0
  340. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/tree/notes.md +3 -0
  341. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/tree/workflows/ci.yml +8 -0
  342. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/args +3 -0
  343. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/expect.txt +1 -0
  344. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/scripts/gate-sdk-config.knobs +1 -0
  345. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/tree/notes.md +3 -0
  346. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/tree/workflows/ci.yml +8 -0
  347. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/args +3 -0
  348. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/expect.txt +5 -0
  349. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/tree/workflows/empty-allowlist.yml +29 -0
  350. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/tree/workflows/gates.yml +25 -0
  351. package/payload/gate-sdk/gate-tests/check-action-permissions/good/args +5 -0
  352. package/payload/gate-sdk/gate-tests/check-action-permissions/good/expect.txt +1 -0
  353. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/action.yml +9 -0
  354. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/not-actions.yml +7 -0
  355. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/workflows/declared.yml +69 -0
  356. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/workflows/valves.yml +22 -0
  357. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/args +4 -0
  358. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/expect.txt +2 -0
  359. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/tree/scripts/present.sh +3 -0
  360. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/tree/workflows/ci.yml +14 -0
  361. package/payload/gate-sdk/gate-tests/check-action-run-path/good/args +5 -0
  362. package/payload/gate-sdk/gate-tests/check-action-run-path/good/expect.txt +1 -0
  363. package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/scripts/build.sh +3 -0
  364. package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/sub/scripts/inner.sh +3 -0
  365. package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/workflows/ci.yml +36 -0
  366. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/args +4 -2
  367. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/expect.txt +2 -0
  368. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/tree/workflows/runner-dialect.yml +36 -0
  369. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/args +3 -2
  370. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/expect.txt +1 -1
  371. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/tree/workflows/runner-dialect.yml +71 -0
  372. package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +102 -9
  373. package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/smoke/install.sh +1 -1
  374. package/payload/gate-sdk/gate-tests/check-assertion-strength/good/smoke/install.sh +1 -1
  375. package/payload/gate-sdk/gate-tests/check-assertion-strength.test.sh +55 -0
  376. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/expect.txt +1 -0
  377. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/msg.txt +4 -0
  378. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/patterns.list +5 -1
  379. package/payload/gate-sdk/gate-tests/check-commit-msg/good/msg.txt +7 -0
  380. package/payload/gate-sdk/gate-tests/check-commit-msg/good/patterns.list +5 -1
  381. package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +2 -2
  382. package/payload/gate-sdk/gate-tests/check-core-files.test.sh +1 -1
  383. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.knobs +3 -0
  384. package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.knobs +3 -0
  385. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/SPEC.md +3 -0
  386. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/checks/check-demo.gate +1 -0
  387. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/probe.conf +1 -0
  388. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/templates/guide.md +3 -0
  389. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/docs/enforcement.md +33 -0
  390. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/scripts/gate-sdk-config.knobs +1 -0
  391. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/scripts/gates.list +1 -0
  392. package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +1 -1
  393. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/args +3 -0
  394. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/expect.txt +2 -0
  395. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/gate-sdk/bin/run-gates.ps1 +5 -0
  396. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/gate-sdk/bin/run-gates.sh +9 -0
  397. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/args +4 -0
  398. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/expect.txt +1 -0
  399. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/gate-sdk/bin/run-gates.ps1 +5 -0
  400. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/gate-sdk/bin/run-gates.sh +9 -0
  401. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/SPEC.md +4 -1
  402. package/payload/gate-sdk/gate-tests/check-gate-assertions.test.sh +1 -1
  403. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.knobs +2 -0
  404. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.knobs +2 -0
  405. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +6 -12
  406. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +5 -3
  407. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/TASK-QUEUE.md +3 -1
  408. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks.test.sh +4 -2
  409. package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +1 -1
  410. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/ci/build-artifact.sh +9 -0
  411. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/ci.yml +9 -0
  412. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +4 -2
  413. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.knobs +5 -0
  414. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +6 -0
  415. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/ci/build-artifact.sh +9 -0
  416. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/ci.yml +16 -0
  417. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +7 -3
  418. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.knobs +5 -0
  419. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +1 -1
  420. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +222 -197
  421. package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +7 -2
  422. package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +4 -0
  423. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +3 -1
  424. package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +1 -1
  425. package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +8 -8
  426. package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +2 -2
  427. package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +49 -14
  428. package/payload/gate-sdk/gate-tests/check-identity/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +4 -4
  429. package/payload/gate-sdk/gate-tests/check-identity/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +4 -4
  430. package/payload/gate-sdk/gate-tests/check-identity.test.sh +1 -1
  431. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-eta.sh +7 -0
  432. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-iota.sh +7 -0
  433. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-theta.sh +7 -0
  434. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-zeta.gate +3 -0
  435. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/smoke/install.sh +1 -1
  436. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/args +8 -5
  437. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/expect.txt +5 -0
  438. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/native/src/installer/recipe.rs +10 -0
  439. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
  440. package/payload/gate-sdk/gate-tests/check-install-disposition/good/args +8 -4
  441. package/payload/gate-sdk/gate-tests/check-install-disposition/good/expect.txt +2 -0
  442. package/payload/gate-sdk/gate-tests/check-install-disposition/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
  443. package/payload/gate-sdk/gate-tests/check-install-disposition/good/{alpha-kit → site-kit}/checks/check-alpha.sh +1 -1
  444. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-beta.gate +3 -0
  445. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-gamma.sh +6 -0
  446. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-omega.sh +7 -0
  447. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-psi.sh +7 -0
  448. package/payload/gate-sdk/gate-tests/check-install-disposition/good/{alpha-kit → site-kit}/smoke/install.sh +2 -2
  449. package/payload/gate-sdk/gate-tests/check-kit-registration/bad/registry-doc.md +15 -12
  450. package/payload/gate-sdk/gate-tests/check-kit-registration/good/args +7 -5
  451. package/payload/gate-sdk/gate-tests/check-kit-registration/good/scripts/gate-sdk-config.knobs +2 -0
  452. package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +2 -2
  453. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/args +5 -0
  454. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/expect.txt +1 -0
  455. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/checks/placeholder.txt +3 -0
  456. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/gate-tests/alpha.test.sh +3 -0
  457. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/lib/alpha.sh +3 -0
  458. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/checks/placeholder.txt +3 -0
  459. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/gate-tests/beta.test.sh +3 -0
  460. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/lib/beta.sh +3 -0
  461. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/gate-sdk/checks/placeholder.txt +3 -0
  462. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/gate-sdk/lib/gate.sh +3 -0
  463. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/scripts/gate-sdk-config.knobs +7 -0
  464. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/scripts/gates.list +3 -0
  465. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/args +7 -0
  466. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/expect.txt +1 -0
  467. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/checks/placeholder.txt +3 -0
  468. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/gate-tests/alpha.test.sh +3 -0
  469. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/lib/alpha.sh +3 -0
  470. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/checks/placeholder.txt +3 -0
  471. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/gate-tests/beta.test.sh +3 -0
  472. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/lib/beta.sh +3 -0
  473. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/gate-sdk/checks/placeholder.txt +3 -0
  474. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/gate-sdk/lib/gate.sh +3 -0
  475. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/scripts/gates.list +3 -0
  476. package/payload/gate-sdk/gate-tests/check-packed-links/bad/alpha-kit/README.md +5 -0
  477. package/payload/gate-sdk/gate-tests/check-packed-links/bad/args +5 -0
  478. package/payload/gate-sdk/gate-tests/check-packed-links/bad/beta-kit/README.md +5 -0
  479. package/payload/gate-sdk/gate-tests/check-packed-links/bad/expect.txt +2 -0
  480. package/payload/gate-sdk/gate-tests/check-packed-links/bad/scripts/gate-sdk-config.knobs +4 -0
  481. package/payload/gate-sdk/gate-tests/check-packed-links/good/alpha-kit/README.md +5 -0
  482. package/payload/gate-sdk/gate-tests/check-packed-links/good/args +8 -0
  483. package/payload/gate-sdk/gate-tests/check-packed-links/good/beta-kit/README.md +9 -0
  484. package/payload/gate-sdk/gate-tests/check-packed-links/good/expect.txt +1 -0
  485. package/payload/gate-sdk/gate-tests/check-packed-links/good/gamma-kit/SPEC.md +4 -0
  486. package/payload/gate-sdk/gate-tests/check-packed-links/good/scripts/gate-sdk-config.knobs +6 -0
  487. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/args +3 -0
  488. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/expect.txt +15 -0
  489. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/primitive.rs +19 -0
  490. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/producer.rs +8 -0
  491. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/walk.rs +13 -0
  492. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/bound-root.sh +5 -0
  493. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/case-arm.sh +6 -0
  494. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/commented.sh +5 -0
  495. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/common-dir.sh +4 -0
  496. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/glob-test.sh +4 -0
  497. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/late-anchor.sh +7 -0
  498. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/logical-readback.sh +5 -0
  499. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/probe.sh +7 -0
  500. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/two-root.sh +5 -0
  501. package/payload/gate-sdk/gate-tests/check-path-dialect/good/args +3 -0
  502. package/payload/gate-sdk/gate-tests/check-path-dialect/good/expect.txt +13 -0
  503. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/commented.rs +5 -0
  504. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/local.rs +12 -0
  505. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/namespace.rs +11 -0
  506. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/typed.rs +10 -0
  507. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/verdict.rs +5 -0
  508. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/walk.rs +24 -0
  509. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/anchored.sh +6 -0
  510. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/cd-only.sh +7 -0
  511. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/commented.sh +6 -0
  512. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/one-root.sh +4 -0
  513. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/probe.sh +8 -0
  514. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/rooted.sh +23 -0
  515. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/subshell.sh +6 -0
  516. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/two-line.sh +8 -0
  517. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/verdict.sh +7 -0
  518. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/args +4 -0
  519. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/expect.txt +6 -0
  520. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/scripts/gate-sdk-config.knobs +1 -0
  521. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/array-grep.sh +6 -0
  522. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/echo-max-count.sh +5 -0
  523. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/gate-tests/membership.test.sh +6 -0
  524. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/loop-head.sh +5 -0
  525. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/tests/relocated.test.sh +6 -0
  526. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/args +5 -0
  527. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/expect.txt +3 -0
  528. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/full-reader.sh +4 -0
  529. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/gate-tests/check-x/bad/violating.test.sh +6 -0
  530. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/gate-tests/clean.test.sh +8 -0
  531. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/loop-membership.sh +8 -0
  532. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/no-pipefail.sh +6 -0
  533. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/one-line-producer.sh +5 -0
  534. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/args +2 -0
  535. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/expect.txt +8 -0
  536. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/patterns.list +4 -0
  537. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/scripts/gate-sdk-config.knobs +4 -0
  538. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/empty-reason-verb +5 -0
  539. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/strings.ps1 +6 -0
  540. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/too-far-verb +5 -0
  541. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/undeclared-verb +3 -0
  542. package/payload/gate-sdk/gate-tests/check-portability-floor/good/args +2 -0
  543. package/payload/gate-sdk/gate-tests/check-portability-floor/good/expect.txt +1 -0
  544. package/payload/gate-sdk/gate-tests/check-portability-floor/good/patterns.list +5 -0
  545. package/payload/gate-sdk/gate-tests/check-portability-floor/good/scripts/gate-sdk-config.knobs +4 -0
  546. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/front.ps1 +7 -0
  547. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/plain-verb +5 -0
  548. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/portability-patterns.list +5 -0
  549. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/upgrade-verb +7 -0
  550. package/payload/gate-sdk/gate-tests/check-portability-floor.test.sh +154 -0
  551. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/demo-kit/checks/check-beta.gate +2 -0
  552. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/docs/roster.md +11 -0
  553. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/expect.txt +7 -0
  554. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-alpha.gate +2 -0
  555. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-gamma.gate +2 -0
  556. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-plain.gate +1 -0
  557. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/gate-sdk-config.knobs +3 -0
  558. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/gates.list +4 -0
  559. package/payload/gate-sdk/gate-tests/check-projection-roster/good/demo-kit/checks/check-beta.gate +2 -0
  560. package/payload/gate-sdk/gate-tests/check-projection-roster/good/docs/roster.md +16 -0
  561. package/payload/gate-sdk/gate-tests/check-projection-roster/good/expect.txt +1 -0
  562. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-alpha.gate +2 -0
  563. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-delta.gate +2 -0
  564. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-epsilon.gate +2 -0
  565. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-plain.gate +1 -0
  566. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/gate-sdk-config.knobs +4 -0
  567. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/gates.list +5 -0
  568. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.knobs +4 -0
  569. package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +1 -1
  570. package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.knobs +4 -0
  571. package/payload/gate-sdk/gate-tests/check-reads-couples/bad/expect.txt +1 -1
  572. package/payload/gate-sdk/gate-tests/check-reads-couples/bad/sandbox-gate.sh +4 -4
  573. package/payload/gate-sdk/gate-tests/check-reads-couples/good/sandbox-gate.sh +4 -4
  574. package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +25 -20
  575. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/alpha-kit/smoke/install.sh +1 -1
  576. 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
  577. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/install.sh +1 -1
  578. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/violation.sh +1 -1
  579. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/args +1 -1
  580. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/beta-kit/smoke/install.sh +1 -1
  581. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.knobs +4 -0
  582. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/args +3 -1
  583. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/delegation-kit/templates/session-note.sh +6 -0
  584. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/expect.txt +1 -1
  585. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/session-note.sh +6 -0
  586. package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +1 -1
  587. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/args +2 -0
  588. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/drift-kit/templates/kpis.list +18 -0
  589. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/expect.txt +2 -0
  590. 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
  591. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/args +3 -1
  592. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/drift-kit/templates/kpis.list +17 -0
  593. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/expect.txt +1 -1
  594. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.knobs +4 -0
  595. package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +5 -5
  596. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/expect.txt +1 -0
  597. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/patterns.list +4 -0
  598. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/accounts.txt +1 -0
  599. package/payload/gate-sdk/gate-tests/check-tree-terms/good/expect.txt +1 -1
  600. package/payload/gate-sdk/gate-tests/check-tree-terms/good/patterns.list +5 -1
  601. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/anchored.txt +1 -0
  602. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/handles.txt +2 -0
  603. package/payload/gate-sdk/gate-tests/check-tree-terms.test.sh +44 -5
  604. package/payload/gate-sdk/gate-tests/emit-arm-shape.test.sh +95 -0
  605. package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +10 -10
  606. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +10 -184
  607. package/payload/gate-sdk/gate-tests/reads-census.test.sh +96 -0
  608. package/payload/gate-sdk/gate-tests/run-arm-contract.test.sh +190 -0
  609. package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +64 -41
  610. package/payload/gate-sdk/gate-tests/run-for-path.test.sh +2 -2
  611. package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +121 -16
  612. package/payload/gate-sdk/gate-tests/run-gates-linked-worktree.test.sh +136 -0
  613. package/payload/gate-sdk/lib/gate.sh +231 -484
  614. package/payload/gate-sdk/lib/test-hermetic.sh +39 -9
  615. package/payload/gate-sdk/templates/check-skeleton.sh +3 -2
  616. package/payload/gate-sdk/templates/gates-workflow.yml +16 -32
  617. package/payload/gate-sdk/templates/msg-patterns.list +14 -5
  618. package/payload/gate-sdk/templates/portability-patterns.list +56 -0
  619. package/payload/guard-kit/README.md +43 -47
  620. package/payload/guard-kit/checks/check-door-binding.gate +3 -0
  621. package/payload/guard-kit/gate-tests/check-door-binding/bad/alpha-kit/README.md +6 -0
  622. package/payload/guard-kit/gate-tests/check-door-binding/bad/alpha-kit/templates/alpha-config.knobs +3 -0
  623. package/payload/guard-kit/gate-tests/check-door-binding/bad/args +5 -0
  624. package/payload/guard-kit/gate-tests/check-door-binding/bad/beta-kit/lib/beta.sh +6 -0
  625. package/payload/guard-kit/gate-tests/check-door-binding/bad/expect.txt +5 -0
  626. package/payload/guard-kit/gate-tests/check-door-binding/bad/scripts/gate-sdk-config.knobs +4 -0
  627. package/payload/guard-kit/gate-tests/check-door-binding/bad/scripts/guard-config.knobs +3 -0
  628. package/payload/guard-kit/gate-tests/check-door-binding/bad/site/banner.md +8 -0
  629. package/payload/guard-kit/gate-tests/check-door-binding/bad/site/landing.md +11 -0
  630. package/payload/guard-kit/gate-tests/check-door-binding/good/alpha-kit/README.md +8 -0
  631. package/payload/guard-kit/gate-tests/check-door-binding/good/alpha-kit/templates/settings-hooks.json +20 -0
  632. package/payload/guard-kit/gate-tests/check-door-binding/good/args +7 -0
  633. package/payload/guard-kit/gate-tests/check-door-binding/good/beta-kit/lib/beta.sh +6 -0
  634. package/payload/guard-kit/gate-tests/check-door-binding/good/expect.txt +1 -0
  635. package/payload/guard-kit/gate-tests/check-door-binding/good/scripts/gate-sdk-config.knobs +4 -0
  636. package/payload/guard-kit/gate-tests/check-door-binding/good/scripts/guard-config.knobs +3 -0
  637. package/payload/guard-kit/gate-tests/check-door-binding/good/site/mirror.md +12 -0
  638. package/payload/guard-kit/gate-tests/check-door-binding/good/site/register.md +24 -0
  639. package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +40 -27
  640. package/payload/guard-kit/gate-tests/consumer-rules.test.sh +189 -0
  641. package/payload/guard-kit/gate-tests/door-binding-corpus.test.sh +72 -0
  642. package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +48 -23
  643. package/payload/guard-kit/gate-tests/guard-config-knobs.test.sh +170 -0
  644. package/payload/guard-kit/gate-tests/rewrite.test.sh +73 -0
  645. package/payload/guard-kit/gate-tests/scan-prompts.test.sh +174 -8
  646. package/payload/guard-kit/gate-tests/scratch-run.test.sh +150 -13
  647. package/payload/guard-kit/gate-tests/worktree-confinement.test.sh +169 -0
  648. package/payload/guard-kit/guard-tests/background-cases.tsv +14 -5
  649. package/payload/guard-kit/guard-tests/cases.tsv +360 -54
  650. package/payload/guard-kit/guard-tests/powershell-background-cases.tsv +29 -0
  651. package/payload/guard-kit/guard-tests/powershell-cases.tsv +81 -0
  652. package/payload/guard-kit/templates/close-triage.md +15 -62
  653. package/payload/guard-kit/templates/guard-config.knobs +26 -0
  654. package/payload/guard-kit/templates/settings-allow.json +15 -0
  655. package/payload/guard-kit/templates/settings-hooks.json +5 -5
  656. package/payload/lifecycle-kit/README.md +50 -76
  657. package/payload/lifecycle-kit/checks/check-audit-roster.gate +3 -0
  658. package/payload/lifecycle-kit/checks/check-close-surfaces.gate +1 -1
  659. package/payload/lifecycle-kit/checks/check-dispatch-entry.gate +3 -0
  660. package/payload/lifecycle-kit/checks/check-gap-inbox-neutrality.gate +1 -1
  661. package/payload/lifecycle-kit/checks/check-lesson-disposition.gate +1 -1
  662. package/payload/lifecycle-kit/checks/check-lifecycle-registration.gate +1 -1
  663. package/payload/lifecycle-kit/checks/check-merge-attrs.gate +1 -1
  664. package/payload/lifecycle-kit/checks/check-scratch-citation.gate +1 -1
  665. package/payload/lifecycle-kit/checks/check-shim-restatement.gate +1 -1
  666. package/payload/lifecycle-kit/checks/check-skill-binding.gate +1 -1
  667. package/payload/lifecycle-kit/checks/check-stage-entry.gate +2 -2
  668. package/payload/lifecycle-kit/checks/check-stage-evidence.gate +1 -1
  669. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +2 -2
  670. package/payload/lifecycle-kit/checks/check-stamp-subject.gate +3 -0
  671. package/payload/lifecycle-kit/checks/check-survey-record.gate +2 -2
  672. package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +98 -21
  673. package/payload/lifecycle-kit/gate-tests/boundary-stage-journal.test.sh +196 -0
  674. package/payload/lifecycle-kit/gate-tests/boundary-worktree-refusal.test.sh +214 -0
  675. package/payload/lifecycle-kit/gate-tests/capture-linked-worktree.test.sh +53 -0
  676. package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/args +2 -0
  677. package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/expect.txt +6 -0
  678. package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/roster.txt +34 -0
  679. package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/args +2 -0
  680. package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/expect.txt +1 -0
  681. package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/roster.txt +22 -0
  682. package/payload/lifecycle-kit/gate-tests/check-audit-roster.test.sh +101 -0
  683. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.knobs +2 -0
  684. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/owners/worktrees/inbox.md +5 -0
  685. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.knobs +2 -0
  686. package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +21 -4
  687. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/args +6 -0
  688. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/expect.txt +1 -0
  689. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/head.txt +5 -0
  690. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/marker.txt +1 -0
  691. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/msg.txt +4 -0
  692. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/paths.txt +1 -0
  693. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/staged.txt +5 -0
  694. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/args +6 -0
  695. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/expect.txt +1 -0
  696. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/head.txt +5 -0
  697. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/marker.txt +1 -0
  698. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/msg.txt +4 -0
  699. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/paths.txt +2 -0
  700. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/staged.txt +6 -0
  701. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry.test.sh +60 -0
  702. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +1 -1
  703. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/bad/AGENT.md +1 -5
  704. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/good/AGENT.md +1 -5
  705. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +1 -1
  706. package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +2 -2
  707. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.knobs +2 -0
  708. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.knobs +2 -0
  709. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/worktrees/queue.md +13 -0
  710. package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +1 -1
  711. package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +1 -1
  712. package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +165 -15
  713. package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +27 -2
  714. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/align.md +4 -1
  715. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/build.md +4 -1
  716. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/close.md +5 -0
  717. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/scope.md +4 -1
  718. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/validate.md +1 -1
  719. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/expect.txt +1 -1
  720. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/align.md +4 -1
  721. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/build.md +4 -1
  722. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/close.md +4 -1
  723. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/scope.md +4 -1
  724. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/validate.md +4 -1
  725. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage.test.sh +73 -0
  726. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/args +4 -0
  727. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/expect.txt +1 -0
  728. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/head.txt +5 -0
  729. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/msg.txt +4 -0
  730. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/staged.txt +6 -0
  731. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/args +4 -0
  732. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/expect.txt +1 -0
  733. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/head.txt +5 -0
  734. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/msg.txt +4 -0
  735. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/staged.txt +7 -0
  736. package/payload/lifecycle-kit/gate-tests/check-stamp-subject.test.sh +59 -0
  737. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/expect.txt +4 -0
  738. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/record.md +33 -2
  739. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -1
  740. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +19 -2
  741. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +66 -7
  742. package/payload/lifecycle-kit/gate-tests/dispatch-marker.test.sh +152 -0
  743. package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +23 -48
  744. package/payload/lifecycle-kit/gate-tests/gap-inbox-route.test.sh +7 -5
  745. package/payload/lifecycle-kit/gate-tests/lead-journal-open.test.sh +119 -0
  746. package/payload/lifecycle-kit/gate-tests/preflight-valve.test.sh +170 -0
  747. package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +5 -3
  748. package/payload/lifecycle-kit/gate-tests/ruling-staleness.test.sh +89 -0
  749. package/payload/lifecycle-kit/gate-tests/stamp-before-write.test.sh +77 -0
  750. package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +12 -6
  751. package/payload/lifecycle-kit/templates/consult.md +9 -63
  752. package/payload/lifecycle-kit/templates/lead.md +147 -431
  753. package/payload/lifecycle-kit/templates/lifecycle-config.knobs +1 -0
  754. package/payload/lifecycle-kit/templates/release-sweep.md +6 -35
  755. package/payload/lifecycle-kit/templates/stages/align.md +14 -82
  756. package/payload/lifecycle-kit/templates/stages/build.md +30 -98
  757. package/payload/lifecycle-kit/templates/stages/close.md +21 -170
  758. package/payload/lifecycle-kit/templates/stages/scope.md +42 -167
  759. package/payload/lifecycle-kit/templates/stages/spec.md +31 -97
  760. package/payload/lifecycle-kit/templates/stages/validate.md +22 -59
  761. package/payload/lifecycle-kit/templates/upgrade.md +6 -37
  762. package/payload/queue-kit/README.md +33 -48
  763. package/payload/queue-kit/checks/check-deferred-board-tags.gate +3 -0
  764. package/payload/queue-kit/checks/check-queue-entry-budget.gate +2 -2
  765. package/payload/queue-kit/checks/check-queue-hygiene.gate +2 -2
  766. package/payload/queue-kit/checks/check-queue-prose-precondition.gate +1 -1
  767. package/payload/queue-kit/checks/check-queue-sections.gate +1 -1
  768. package/payload/queue-kit/checks/check-queue-slug-liveness.gate +2 -2
  769. package/payload/queue-kit/checks/check-queue-wrap.gate +2 -2
  770. package/payload/queue-kit/checks/check-roadmap-fresh.gate +3 -2
  771. package/payload/queue-kit/checks/check-tag-lead-line.gate +2 -2
  772. package/payload/queue-kit/checks/check-task-conservation.gate +1 -1
  773. package/payload/queue-kit/checks/check-task-names.gate +2 -2
  774. package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/TASK-QUEUE.md +41 -0
  775. package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/expect.txt +6 -0
  776. package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/widget-kit/README.md +3 -0
  777. package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/TASK-QUEUE.md +39 -0
  778. package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/expect.txt +1 -0
  779. package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/widget-kit/README.md +3 -0
  780. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +76 -31
  781. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +12 -4
  782. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.knobs +4 -0
  783. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +58 -19
  784. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/expect.txt +8 -4
  785. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.knobs +4 -0
  786. package/payload/queue-kit/gate-tests/check-queue-entry-budget.test.sh +124 -0
  787. package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/TASK-QUEUE.md +11 -1
  788. package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/expect.txt +2 -0
  789. package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +30 -11
  790. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/TASK-QUEUE.md +3 -1
  791. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/expect.txt +1 -0
  792. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/good/TASK-QUEUE.md +22 -6
  793. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/TASK-QUEUE.md +3 -1
  794. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/docs/page.md +1 -1
  795. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/expect.txt +3 -1
  796. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.knobs +1 -0
  797. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/TASK-QUEUE.md +6 -2
  798. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/page.md +3 -3
  799. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/worktrees/page.md +4 -0
  800. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.knobs +1 -0
  801. package/payload/queue-kit/gate-tests/check-queue-slug-liveness.test.sh +100 -0
  802. package/payload/queue-kit/gate-tests/check-queue-wrap/bad/TASK-QUEUE.md +3 -1
  803. package/payload/queue-kit/gate-tests/check-queue-wrap/good/TASK-QUEUE.md +20 -6
  804. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/TASK-QUEUE.md +15 -8
  805. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.knobs +5 -0
  806. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/TASK-QUEUE.md +13 -6
  807. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.knobs +5 -0
  808. package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/TASK-QUEUE.md +28 -7
  809. package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/expect.txt +10 -2
  810. package/payload/queue-kit/gate-tests/check-tag-lead-line/good/TASK-QUEUE.md +30 -8
  811. package/payload/queue-kit/gate-tests/check-task-names/bad/TASK-QUEUE.md +18 -3
  812. package/payload/queue-kit/gate-tests/check-task-names/bad/expect.txt +9 -0
  813. package/payload/queue-kit/gate-tests/check-task-names/good/TASK-QUEUE.md +20 -6
  814. package/payload/queue-kit/gate-tests/entry-history.test.sh +197 -0
  815. package/payload/queue-kit/gate-tests/queue-counts.test.sh +77 -73
  816. package/payload/queue-kit/gate-tests/queue-edges.test.sh +168 -87
  817. package/payload/queue-kit/gate-tests/queue-index.test.sh +30 -16
  818. package/payload/queue-kit/gate-tests/roadmap.test.sh +65 -58
  819. package/payload/queue-kit/templates/TASK-QUEUE.md +36 -23
  820. package/payload/queue-kit/templates/queue-config.knobs +1 -0
  821. package/payload/site-kit/README.md +29 -45
  822. package/payload/site-kit/checks/check-docs-cname-parity.gate +1 -1
  823. package/payload/site-kit/checks/check-docs-collapsible.gate +3 -0
  824. package/payload/site-kit/checks/check-docs-highlight-coverage.gate +4 -0
  825. package/payload/site-kit/checks/check-docs-liquid-parse.gate +3 -0
  826. package/payload/site-kit/checks/check-docs-render-fidelity.gate +3 -0
  827. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +1 -1
  828. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/scripts/site-config.knobs +2 -0
  829. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +2 -2
  830. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/scripts/site-config.knobs +2 -0
  831. package/payload/site-kit/gate-tests/check-docs-collapsible/bad/docs/regions.md +23 -0
  832. package/payload/site-kit/gate-tests/check-docs-collapsible/bad/expect.txt +4 -0
  833. package/payload/site-kit/gate-tests/check-docs-collapsible/good/docs/plain.md +3 -0
  834. package/payload/site-kit/gate-tests/check-docs-collapsible/good/docs/regions.md +26 -0
  835. package/payload/site-kit/gate-tests/check-docs-collapsible/good/expect.txt +1 -0
  836. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/docs/_layouts/default.html +11 -0
  837. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/expect.txt +4 -0
  838. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/scripts/highlight-tokens.list +7 -0
  839. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/scripts/site-config.knobs +3 -0
  840. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/docs/_layouts/default.html +14 -0
  841. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/expect.txt +1 -0
  842. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/scripts/highlight-tokens.list +7 -0
  843. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/scripts/site-config.knobs +1 -0
  844. package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/docs/_layouts/default.html +4 -0
  845. package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/docs/span.md +3 -0
  846. package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/expect.txt +2 -0
  847. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/_layouts/default.html +4 -0
  848. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/front.md +7 -0
  849. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/loop.md +5 -0
  850. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/plain.html +1 -0
  851. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/raw.md +3 -0
  852. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/search.json +4 -0
  853. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/expect.txt +1 -0
  854. package/payload/site-kit/gate-tests/check-docs-liquid-parse-parser.test.sh +62 -0
  855. package/payload/site-kit/gate-tests/check-docs-render-fidelity-batch.test.sh +40 -45
  856. package/payload/site-kit/gate-tests/check-docs-render-fidelity-foreign.test.sh +7 -4
  857. package/payload/site-kit/gate-tests/check-docs-render-fidelity-span.test.sh +7 -4
  858. package/payload/site-kit/gate-tests/check-docs-render-fidelity-table.test.sh +7 -4
  859. package/payload/site-kit/templates/site-health.yml +60 -88
  860. package/profiles.list +4 -5
  861. package/lib/common/digest.sh +0 -18
  862. package/lib/common/lock.sh +0 -75
  863. package/lib/common/profile.sh +0 -91
  864. package/lib/common/recipe.sh +0 -106
  865. package/lib/diff.sh +0 -66
  866. package/lib/doctor.sh +0 -164
  867. package/lib/init.sh +0 -428
  868. package/lib/uninstall.sh +0 -214
  869. package/lib/update.sh +0 -34
  870. package/payload/canon-kit/SPEC.md +0 -2443
  871. package/payload/canon-kit/checks/check-surface-duplication.sh +0 -106
  872. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +0 -6
  873. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +0 -6
  874. package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.sh +0 -10
  875. package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.sh +0 -10
  876. package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.sh +0 -6
  877. package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.sh +0 -6
  878. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.sh +0 -8
  879. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.sh +0 -8
  880. package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.sh +0 -4
  881. package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.sh +0 -4
  882. package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.sh +0 -8
  883. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.sh +0 -5
  884. package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.sh +0 -5
  885. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/scripts/canon-config.sh +0 -6
  886. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/scripts/canon-config.sh +0 -6
  887. package/payload/canon-kit/lib/spec.sh +0 -560
  888. package/payload/canon-kit/smoke/install.sh +0 -58
  889. package/payload/canon-kit/smoke/violation.sh +0 -22
  890. package/payload/canon-kit/templates/canon-config.sh +0 -2
  891. package/payload/context-kit/SPEC.md +0 -1134
  892. package/payload/context-kit/bin/always-loaded.sh +0 -70
  893. package/payload/context-kit/bin/env-probe.sh +0 -142
  894. package/payload/context-kit/bin/md-index.sh +0 -80
  895. package/payload/context-kit/bin/md-section.sh +0 -63
  896. package/payload/context-kit/bin/pub-index.sh +0 -90
  897. package/payload/context-kit/bin/run-index-tests.sh +0 -91
  898. package/payload/context-kit/gate-tests/check-footprint-fresh/good/args +0 -4
  899. package/payload/context-kit/gate-tests/check-footprint-fresh/good/emit.txt +0 -12
  900. package/payload/context-kit/gate-tests/check-footprint-fresh/good/projection.txt +0 -12
  901. package/payload/context-kit/index-tests/expected/toolfloor.txt +0 -23
  902. package/payload/context-kit/index-tests/toolfloor-cases.sh +0 -49
  903. package/payload/context-kit/lib/context.sh +0 -56
  904. package/payload/context-kit/lib/pub-lang/rust.sh +0 -26
  905. package/payload/context-kit/lib/pub-lang/ts.sh +0 -32
  906. package/payload/context-kit/lib/toolfloor.sh +0 -58
  907. package/payload/context-kit/smoke/agents-md.sh +0 -139
  908. package/payload/context-kit/smoke/install.sh +0 -64
  909. package/payload/context-kit/smoke/violation.sh +0 -21
  910. package/payload/context-kit/templates/context-config.sh +0 -2
  911. package/payload/delegation-kit/SPEC.md +0 -2078
  912. package/payload/delegation-kit/bin/run-budget-guard-tests.sh +0 -88
  913. package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +0 -97
  914. package/payload/delegation-kit/bin/run-trend-tests.sh +0 -63
  915. package/payload/delegation-kit/bin/run-usage-tests.sh +0 -226
  916. package/payload/delegation-kit/bin/usage-trend.sh +0 -120
  917. package/payload/delegation-kit/bin/usage-verdict.sh +0 -144
  918. package/payload/delegation-kit/bin/wait-probe.sh +0 -184
  919. package/payload/delegation-kit/gate-tests/subagent-stop-liveness.test.sh +0 -99
  920. package/payload/delegation-kit/lib/delegation.sh +0 -84
  921. package/payload/delegation-kit/smoke/install.sh +0 -83
  922. package/payload/delegation-kit/smoke/violation.sh +0 -16
  923. package/payload/delegation-kit/templates/agent-budget-guard.sh +0 -18
  924. package/payload/delegation-kit/templates/agent-dispatch-guard.sh +0 -61
  925. package/payload/delegation-kit/templates/delegation-config.sh +0 -6
  926. package/payload/delegation-kit/templates/statusline-usage.sh +0 -101
  927. package/payload/delegation-kit/templates/subagent-stop-liveness.sh +0 -56
  928. package/payload/delegation-kit/templates/usage-poller.sh +0 -67
  929. package/payload/delegation-kit/usage-tests/budget-guard-cases.tsv +0 -20
  930. package/payload/doctrine-kit/SPEC.md +0 -385
  931. package/payload/doctrine-kit/bin/install-doctrine.sh +0 -194
  932. package/payload/doctrine-kit/bin/stage-rules.sh +0 -51
  933. package/payload/doctrine-kit/lib/doctrine.sh +0 -29
  934. package/payload/doctrine-kit/smoke/install.sh +0 -203
  935. package/payload/doctrine-kit/smoke/violation.sh +0 -13
  936. package/payload/drift-kit/SPEC.md +0 -1187
  937. package/payload/drift-kit/bin/drift-report.sh +0 -155
  938. package/payload/drift-kit/bin/kfric.sh +0 -61
  939. package/payload/drift-kit/bin/overhead-meter.sh +0 -106
  940. package/payload/drift-kit/bin/stage-economics.sh +0 -465
  941. package/payload/drift-kit/kpis/kpi-always-loaded.sh +0 -39
  942. package/payload/drift-kit/kpis/kpi-amendment-age.sh +0 -33
  943. package/payload/drift-kit/kpis/kpi-deferred-age.sh +0 -46
  944. package/payload/drift-kit/kpis/kpi-gate-backlog.sh +0 -52
  945. package/payload/drift-kit/kpis/kpi-gate-runtime.sh +0 -31
  946. package/payload/drift-kit/kpis/kpi-incident-recurrence.sh +0 -42
  947. package/payload/drift-kit/kpis/kpi-knowledge-friction.sh +0 -21
  948. package/payload/drift-kit/kpis/kpi-overhead.sh +0 -44
  949. package/payload/drift-kit/kpis/kpi-price-table-age.sh +0 -68
  950. package/payload/drift-kit/kpis/kpi-prompt-friction.sh +0 -38
  951. package/payload/drift-kit/kpis/kpi-queue-net-delta.sh +0 -74
  952. package/payload/drift-kit/kpis/kpi-settings-local.sh +0 -21
  953. package/payload/drift-kit/kpis/kpi-task-split.sh +0 -43
  954. package/payload/drift-kit/lib/drift.sh +0 -43
  955. package/payload/drift-kit/smoke/install.sh +0 -537
  956. package/payload/drift-kit/smoke/overhead-fixture.jsonl +0 -4
  957. package/payload/drift-kit/templates/drift-config.sh +0 -2
  958. package/payload/evidence-kit/SPEC.md +0 -740
  959. package/payload/evidence-kit/bin/diff-baseline.sh +0 -34
  960. package/payload/evidence-kit/bin/run-validate.sh +0 -124
  961. package/payload/evidence-kit/checks/check-producer-liveness.sh +0 -75
  962. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.sh +0 -7
  963. package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.sh +0 -7
  964. package/payload/evidence-kit/lib/evidence.sh +0 -193
  965. package/payload/evidence-kit/smoke/install.sh +0 -59
  966. package/payload/evidence-kit/smoke/violation.sh +0 -8
  967. package/payload/evidence-kit/templates/evidence-config.sh +0 -2
  968. package/payload/gate-sdk/SPEC.md +0 -10872
  969. package/payload/gate-sdk/bin/gen-pre-commit.sh +0 -297
  970. package/payload/gate-sdk/bin/install-hooks.sh +0 -60
  971. package/payload/gate-sdk/bin/port-blockers.sh +0 -473
  972. package/payload/gate-sdk/bin/run-consumer-smoke.sh +0 -239
  973. package/payload/gate-sdk/bin/run-gate-tests.sh +0 -179
  974. package/payload/gate-sdk/bin/upgrade-smoke.sh +0 -236
  975. package/payload/gate-sdk/checks/check-action-run-shell.sh +0 -223
  976. package/payload/gate-sdk/checks/check-crate-arms.sh +0 -62
  977. package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +0 -450
  978. package/payload/gate-sdk/checks/check-install-disposition.sh +0 -93
  979. package/payload/gate-sdk/checks/check-shellcheck.sh +0 -57
  980. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.sh +0 -2
  981. package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.sh +0 -2
  982. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/args +0 -4
  983. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/emit.txt +0 -14
  984. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/projection.txt +0 -14
  985. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.sh +0 -2
  986. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.sh +0 -2
  987. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.sh +0 -6
  988. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/stub-bin +0 -3
  989. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.sh +0 -6
  990. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/stub-bin +0 -3
  991. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/installer/lib/common/recipe.sh +0 -9
  992. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-beta.gate +0 -3
  993. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-gamma.sh +0 -6
  994. package/payload/gate-sdk/gate-tests/check-install-disposition/good/installer/lib/common/recipe.sh +0 -10
  995. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +0 -5
  996. package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +0 -5
  997. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.sh +0 -5
  998. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.sh +0 -5
  999. package/payload/gate-sdk/gate-tests/declaration-lib-parity.test.sh +0 -211
  1000. package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +0 -112
  1001. package/payload/gate-sdk/lib/consumer-smoke.sh +0 -69
  1002. package/payload/gate-sdk/lib/declaration.sh +0 -59
  1003. package/payload/gate-sdk/lib/inject.sh +0 -80
  1004. package/payload/gate-sdk/smoke/install.sh +0 -171
  1005. package/payload/gate-sdk/smoke/violation.sh +0 -13
  1006. package/payload/guard-kit/SPEC.md +0 -1415
  1007. package/payload/guard-kit/bin/compare-settings-allow.sh +0 -115
  1008. package/payload/guard-kit/bin/run-guard-tests.sh +0 -110
  1009. package/payload/guard-kit/bin/scan-prompts.sh +0 -166
  1010. package/payload/guard-kit/bin/scratch-run.sh +0 -34
  1011. package/payload/guard-kit/gate-tests/guard-read-path.test.sh +0 -52
  1012. package/payload/guard-kit/lib/guard.sh +0 -1014
  1013. package/payload/guard-kit/smoke/install.sh +0 -26
  1014. package/payload/guard-kit/templates/bash-guard.sh +0 -20
  1015. package/payload/guard-kit/templates/escalation-guard.sh +0 -27
  1016. package/payload/guard-kit/templates/guard-config.sh +0 -8
  1017. package/payload/guard-kit/templates/wakeup-guard.sh +0 -20
  1018. package/payload/lifecycle-kit/SPEC.md +0 -2884
  1019. package/payload/lifecycle-kit/bin/cite-survey.sh +0 -81
  1020. package/payload/lifecycle-kit/bin/enter-stage.sh +0 -380
  1021. package/payload/lifecycle-kit/bin/file-gap.sh +0 -101
  1022. package/payload/lifecycle-kit/bin/file-survey.sh +0 -69
  1023. package/payload/lifecycle-kit/bin/install-lifecycle.sh +0 -36
  1024. package/payload/lifecycle-kit/bin/session-id.sh +0 -75
  1025. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.sh +0 -4
  1026. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.sh +0 -4
  1027. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.sh +0 -4
  1028. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.sh +0 -4
  1029. package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +0 -100
  1030. package/payload/lifecycle-kit/lib/stages.sh +0 -194
  1031. package/payload/lifecycle-kit/smoke/install.sh +0 -434
  1032. package/payload/lifecycle-kit/smoke/violation.sh +0 -8
  1033. package/payload/lifecycle-kit/templates/lifecycle-config.sh +0 -2
  1034. package/payload/lifecycle-kit/templates/workflow-state-guard.sh +0 -29
  1035. package/payload/queue-kit/SPEC.md +0 -1436
  1036. package/payload/queue-kit/bin/lesson-sink.sh +0 -28
  1037. package/payload/queue-kit/bin/queue-counts.sh +0 -35
  1038. package/payload/queue-kit/bin/queue-edges.sh +0 -78
  1039. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.sh +0 -6
  1040. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.sh +0 -6
  1041. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.sh +0 -3
  1042. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.sh +0 -3
  1043. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.sh +0 -6
  1044. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.sh +0 -6
  1045. package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +0 -215
  1046. package/payload/queue-kit/lib/queue.sh +0 -129
  1047. package/payload/queue-kit/smoke/install.sh +0 -25
  1048. package/payload/queue-kit/smoke/violation.sh +0 -8
  1049. package/payload/queue-kit/templates/queue-config.sh +0 -2
  1050. package/payload/site-kit/SPEC.md +0 -601
  1051. package/payload/site-kit/checks/check-docs-render-fidelity.sh +0 -242
  1052. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/scripts/site-config.sh +0 -7
  1053. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/scripts/site-config.sh +0 -7
  1054. package/payload/site-kit/lib/site.sh +0 -43
  1055. package/payload/site-kit/smoke/install.sh +0 -34
  1056. package/payload/site-kit/smoke/violation.sh +0 -20
  1057. /package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/{check-ported.gate → check-stage-entry.gate} +0 -0
package/lib/init.sh DELETED
@@ -1,428 +0,0 @@
1
- #!/usr/bin/env bash
2
- # spec: installer/README.md §init — vendors the selected profile's kit source out of the package payload into the consumer's repository and commits it, so what governs their tree afterwards is committed, auditable source rather than something resolved at their build time
3
- #
4
- # usage: checkwright init [--profile <name>] [--dry-run] [--force] [--no-commit]
5
- # Each flag is described by --help, which prints the selectable profiles too.
6
- set -uo pipefail
7
-
8
- INSTALLER="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
9
- PAYLOAD="$INSTALLER/payload"
10
- # shellcheck source=./common/lock.sh
11
- source "$INSTALLER/lib/common/lock.sh"
12
- # shellcheck source=./common/profile.sh
13
- source "$INSTALLER/lib/common/profile.sh"
14
- # shellcheck source=./common/recipe.sh
15
- source "$INSTALLER/lib/common/recipe.sh"
16
- # shellcheck source=./common/digest.sh
17
- source "$INSTALLER/lib/common/digest.sh"
18
-
19
- PROFILE=""; DRY=0; FORCE=0; DO_COMMIT=1
20
- while [[ $# -gt 0 ]]; do
21
- case "$1" in
22
- --profile) PROFILE="${2:-}"; shift 2 ;;
23
- --profile=*) PROFILE="${1#*=}"; shift ;;
24
- --dry-run) DRY=1; shift ;;
25
- --force) FORCE=1; shift ;;
26
- --no-commit) DO_COMMIT=0; shift ;;
27
- -h|--help)
28
- printf 'usage: checkwright init [--profile <name>] [--dry-run] [--force] [--no-commit]\n\n'
29
- printf 'Vendors pinned kit source into this repository and commits it.\n'
30
- printf 'Nothing is fetched: the source comes from this package.\n\n'
31
- printf 'profiles: %s\n' "$(profile_names "$INSTALLER" | tr '\n' ' ')"
32
- exit 0 ;;
33
- *) printf 'checkwright init: unknown argument: %s\n' "$1" >&2; exit 2 ;;
34
- esac
35
- done
36
-
37
- die() { printf 'checkwright init: %s\n' "$1" >&2; [[ -n "${2:-}" ]] && printf ' help: %s\n' "$2" >&2; exit "${3:-2}"; }
38
-
39
- [[ -d "$PAYLOAD" ]] || die "this package carries no payload" \
40
- "init copies kit source out of the package's own payload/, assembled at pack time — run it from an installed package, not from a source checkout."
41
-
42
- # spec: installer/README.md §init — the three preconditions all refuse rather than warn, and all three are checked before any file is written: a partial install is the outcome none of them may produce
43
- ROOT="$(git rev-parse --show-toplevel 2>/dev/null)" \
44
- || die "not inside a git work tree" \
45
- "the vendored source is meant to be committed, which is what makes it auditable. Run 'git init' first, or run init inside the repository you want governed."
46
-
47
- # spec: installer/README.md §init — the clean-worktree precondition exists so the one commit init makes is exactly what it vendored; --no-commit is its valve, because an operator staging the vendoring themselves has taken that guarantee on
48
- if (( ! DRY )) && (( DO_COMMIT )) && [[ -n "$(git -C "$ROOT" status --porcelain)" ]]; then
49
- die "the worktree is not clean" \
50
- "init makes one commit, and a dirty tree would fold your work into it — so a reviewer's diff would no longer be the whole of what was vendored. Commit or stash first, or pass --no-commit to stage the vendoring yourself." 1
51
- fi
52
-
53
- # spec: installer/README.md §init — the jq preflight sits here rather than at the top of the file because here is where "before its first JSON read" falls: every precondition above is about the package or the repository and is answerable without jq, and every refusal below is one a jq-less machine would otherwise meet as a misdiagnosis
54
- lock_require_jq
55
-
56
- PKG="$INSTALLER/package.json"
57
- VERSION="$(jq -r '.version // ""' "$PKG" 2>/dev/null)"
58
- COMMIT="$(jq -r '.checkwright.commit // ""' "$PKG" 2>/dev/null)"
59
- [[ -n "$VERSION" ]] || die "this package carries no version stamp" \
60
- "the version is stamped at pack time from the release tag; a package without one was not assembled by the pack step."
61
-
62
- LOCK="$(lock_path "$ROOT")"
63
- PRIOR_FILES=""
64
- PRIOR_ARTIFACT_TARGET=""
65
- PRIOR_ARTIFACT_DIGEST=""
66
- if [[ -f "$LOCK" ]]; then
67
- lock_schema_ok "$LOCK" || die "$CHECKWRIGHT_LOCK_FILE carries a schema this build does not know" \
68
- "this manifest was written by a different Checkwright release. Upgrade the installer rather than letting it guess at a shape it was not built for."
69
- PRIOR_VERSION="$(lock_field "$LOCK" version)"
70
- # spec: installer/README.md §The manifest — the version field's re-run reader: a payload older than the recorded install is a silent downgrade, so it refuses rather than rolling the tree backwards, and --force is the one thing that makes the rollback deliberate rather than silent
71
- if (( ! FORCE )) && [[ -n "$PRIOR_VERSION" && "$PRIOR_VERSION" != "$VERSION" ]]; then
72
- older="$(printf '%s\n%s\n' "$PRIOR_VERSION" "$VERSION" | sort -V | head -n1)"
73
- if [[ "$older" == "$VERSION" ]]; then
74
- die "this package is $VERSION but $CHECKWRIGHT_LOCK_FILE records $PRIOR_VERSION — refusing a silent downgrade" \
75
- "run the release you already have, or pass --force if rolling back is what you meant." 1
76
- fi
77
- fi
78
- [[ -n "$PROFILE" ]] || PROFILE="$(lock_field "$LOCK" profile)"
79
- PRIOR_FILES="$(jq -r 'if (.files | type) == "object" then (.files | to_entries[] | "\(.key)\t\(.value)") else empty end' "$LOCK" 2>/dev/null)"
80
- PRIOR_ARTIFACT_TARGET="$(jq -r '.artifact.target // ""' "$LOCK" 2>/dev/null)"
81
- PRIOR_ARTIFACT_DIGEST="$(jq -r '.artifact.digest // ""' "$LOCK" 2>/dev/null)"
82
- fi
83
-
84
- PROFILE="${PROFILE:-starter}"
85
- profile_known "$INSTALLER" "$PROFILE" || die "unknown profile: $PROFILE" \
86
- "selectable profiles: $(profile_names "$INSTALLER" | tr '\n' ' ')"
87
-
88
- # spec: installer/README.md §init — doctor is the last precondition and still runs before any file is written: a below-contract toolchain must block before a partial install, and running it after the manifest and profile are resolved keeps a bad manifest from being reported as a toolchain fault
89
- DOCTOR_OUT="$(bash "$INSTALLER/lib/doctor.sh" 2>&1)"; DOCTOR_RC=$?
90
- if [[ "$DOCTOR_RC" -ne 0 ]]; then
91
- printf '%s\n' "$DOCTOR_OUT" >&2
92
- die "the toolchain is below contract — refusing to install" \
93
- "the floors above are what the gate battery needs to run, so installing first would leave you a vendored tree that cannot be checked. Fix them and re-run." "$DOCTOR_RC"
94
- fi
95
-
96
- KITS=()
97
- while IFS= read -r k; do [[ -n "$k" ]] && KITS+=("$k"); done < <(profile_kits "$INSTALLER" "$PROFILE")
98
- [[ ${#KITS[@]} -gt 0 ]] || die "profile '$PROFILE' resolves to no kit in this payload" \
99
- "every kit a profile names must exist in the package payload; this one names none that do."
100
-
101
- # spec: installer/README.md §The gate binary — the host answers what platform this is, so the answer stays a local and is never persisted: a stored copy is stale the first time a vendored tree moves between machines, which is the case that matters most. Two fields rather than `uname -a` because that is the smallest input answering the question and the one a PowerShell half can answer without parsing prose
102
- target_of_host() { # -> the Rust target triple this host is, empty when it maps to none
103
- case "$(uname -s 2>/dev/null)/$(uname -m 2>/dev/null)" in
104
- Linux/x86_64) printf 'x86_64-unknown-linux-gnu' ;;
105
- Linux/aarch64|Linux/arm64) printf 'aarch64-unknown-linux-gnu' ;;
106
- Darwin/x86_64) printf 'x86_64-apple-darwin' ;;
107
- Darwin/arm64) printf 'aarch64-apple-darwin' ;;
108
- *) : ;;
109
- esac
110
- }
111
-
112
- ARTIFACT_SRC=""; ARTIFACT_PATH=""; ARTIFACT_TARGET=""; ARTIFACT_DIGEST=""; OMIT_REASON=""
113
-
114
- # spec: installer/README.md §The gate binary — selection has three outcomes and collapsing any two is the defect, which is why the payload's roster copy is read rather than a directory's presence inferred from: without it a platform that was never committed to and one whose artifact went missing look identical, and reading the second as the first turns a broken payload into a silently smaller green battery
115
- select_artifact() {
116
- local roster target src want got names
117
- if [[ ! -d "$PAYLOAD/artifact" ]]; then
118
- OMIT_REASON="substrate-unavailable"
119
- return 0
120
- fi
121
- roster="$PAYLOAD/artifact/targets.list"
122
- [[ -f "$roster" ]] || die "this payload carries prebuilt gate binaries but no target roster" \
123
- "the roster is copied verbatim beside them at pack time; artifacts without one cannot be selected from and the payload is broken, not narrower."
124
- target="$(target_of_host)"
125
- if [[ -z "$target" ]] || ! grep -Ev '^[[:space:]]*(#|$)' "$roster" | grep -qxF "$target"; then
126
- OMIT_REASON="substrate-unavailable"
127
- return 0
128
- fi
129
- src="$PAYLOAD/artifact/$target"
130
- mapfile -t names < <(find "$src" -maxdepth 1 -type f ! -name '*.sha256' -printf '%P\n' 2>/dev/null | sort)
131
- [[ ${#names[@]} -eq 1 && -f "$src/${names[0]}.sha256" ]] \
132
- || die "the payload declares $target but carries no complete artifact for it" \
133
- "a declared target whose binary or .sha256 sidecar is missing is a publisher defect you cannot act on — refusing rather than installing a battery that silently shrank." 1
134
- if [[ -z "$(digest_hasher)" ]]; then
135
- OMIT_REASON="digest-unverifiable"
136
- return 0
137
- fi
138
- want="$(awk 'NR==1{print $1}' "$src/${names[0]}.sha256")"
139
- got="$(digest_of "$src/${names[0]}")"
140
- [[ -n "$want" && "$want" == "$got" ]] \
141
- || die "the prebuilt gate binary for $target does not match its published digest" \
142
- "nothing unverified is ever written, so this refuses rather than warning. Re-download the package; a persistent mismatch means the artifact was altered after it was built." 1
143
- ARTIFACT_SRC="$src/${names[0]}"
144
- ARTIFACT_PATH="$GATES_DIR/${names[0]}"
145
- ARTIFACT_TARGET="$target"
146
- ARTIFACT_DIGEST="$got"
147
- }
148
- select_artifact
149
-
150
- # spec: installer/README.md §What init seeds — a starting-roster member whose implementation is a binary subcommand is what an omission omits; the payload's own declaration decides, so nothing here maintains a second roster of which gates are ported
151
- dispatches_to_binary() { # $1 = kit, $2 = gate name -> 0 iff the payload declares it as a binary subcommand
152
- [[ -f "$PAYLOAD/$1/checks/$2.gate" && ! -f "$PAYLOAD/$1/checks/$2.sh" ]]
153
- }
154
-
155
- prior_hash() { # $1 = repo-relative path -> the hash the manifest recorded for it, empty when unrecorded
156
- [[ -n "$PRIOR_FILES" ]] || return 0
157
- while IFS=$'\t' read -r p h; do
158
- [[ "$p" == "$1" ]] && { printf '%s' "$h"; return 0; }
159
- done <<<"$PRIOR_FILES"
160
- }
161
-
162
- WRITTEN=()
163
- declare -A CARRIED=()
164
- # spec: installer/README.md §The manifest — membership in the written set is held as a key rather than re-derived by piping the list into a quiet grep: that grep exits on its first match while the writer is still writing, the writer takes SIGPIPE, and under the pipefail this file sets the pipeline's status becomes the signal instead of the match. The test then reads as "absent" for a path init wrote seconds earlier, which carries it forward at its prior hash and drops it from the staged set — and because a carried path is appended to the list, every later lookup starts further from the tail. The array is written where paths are recorded so the two cannot part company
165
- declare -A IS_WRITTEN=()
166
- # spec: installer/README.md §The manifest — a recorded hash is what init last wrote at that path, so an entry init did not write this run — because it refused the write, or because this payload no longer ships the path — carries its hash forward verbatim instead of letting manifest() hash the tree at emit time: hashing the tree there would file the adopter's own content as init's, and the next run would find cur == want, claim the path and overwrite it silently
167
- record() { # $1 = repo-relative path, $2 = the hash to emit for it; omitted, the tree is hashed at emit time
168
- WRITTEN+=("$1")
169
- IS_WRITTEN["$1"]=1
170
- [[ -n "${2:-}" ]] && CARRIED["$1"]="$2"
171
- return 0
172
- }
173
-
174
- # spec: installer/README.md §init — the non-destructive re-run: a file whose recorded hash still matches is init's to rewrite, one that has changed since is the adopter's and is reported rather than overwritten
175
- CHANGED=()
176
- claim() { # $1 = repo-relative path -> 0 iff init may write it
177
- local want cur
178
- want="$(prior_hash "$1")"
179
- [[ -n "$want" ]] || return 0
180
- [[ -f "$ROOT/$1" ]] || return 0
181
- cur="$(lock_hash "$ROOT/$1")"
182
- [[ "$cur" == "$want" ]] && return 0
183
- (( FORCE )) && return 0
184
- CHANGED+=("$1")
185
- # spec: installer/README.md §The manifest — the carry-forward belongs to the refusal itself rather than to each caller, because this is the single point where the roster would otherwise lose the path and every call site refuses through it: absence of a key reads as "never installed" on the next run, which is the one reading that lets init overwrite the adopter with no report at all. Recording on the refusal is also what makes the exit condition below a strict subset — a live path is in WRITTEN either way, so only relinquished ones reach the carry-forward loop
186
- record "$1" "$want"
187
- return 1
188
- }
189
-
190
- copy_in() { # $1 = source file, $2 = repo-relative destination
191
- claim "$2" || return 0
192
- (( DRY )) || { mkdir -p "$ROOT/$(dirname "$2")" && cp "$1" "$ROOT/$2"; } || die "could not write $2"
193
- record "$2"
194
- }
195
-
196
- for kit in "${KITS[@]}"; do
197
- [[ -d "$PAYLOAD/$kit" ]] || die "profile '$PROFILE' names $kit, which this payload does not carry" \
198
- "the payload's kit set is derived from the source tree at pack time; a profile naming a kit that is not there is a roster that has drifted."
199
- while IFS= read -r f; do
200
- copy_in "$PAYLOAD/$kit/$f" "$kit/$f"
201
- done < <(cd "$PAYLOAD/$kit" && find . -type f -printf '%P\n' | sort)
202
- done
203
-
204
- mkdir -p "$ROOT/$GATES_DIR" "$ROOT/.workflow" 2>/dev/null
205
- GATES_LIST="$GATES_DIR/gates.list"
206
- if claim "$GATES_LIST"; then
207
- # spec: installer/README.md §The gate binary — an omitted member rides the registry rather than a new file: `# omitted: <name> <reason>` is a comment line the runner already strips from the live set, so the record sits in the consumer's tracked history where a reviewer reads it, and a re-run on a machine that has since gained a hasher converts it back into a live member with no hand edit
208
- plan_gates() {
209
- local kit m
210
- local -a g
211
- local -A pending=()
212
- printf '%s\n' "# Checkwright gate registry — written by 'checkwright init' (profile: $PROFILE)." \
213
- "# Each kit's starting subset; its README names the full roster to grow into."
214
- # spec: installer/README.md §Profiles — the profile's gate set is derived once, by the same function the smoke's monotonicity assertion reads, so the registry a consumer receives and the invariant asserted over it are not two derivations of one fact. The loop below only sections that set by kit, which the registry keeps because the omission is keyed by the kit shipping the member — and a member registered by more than one kit lands once, under the first of them
215
- while IFS= read -r m; do [[ -n "$m" ]] && pending["$m"]=1; done < <(profile_gates "$INSTALLER" "$PROFILE")
216
- for kit in "${KITS[@]}"; do
217
- mapfile -t g < <(recipe_gates "$PAYLOAD/$kit" "$PROFILE")
218
- [[ ${#g[@]} -gt 0 ]] || continue
219
- printf '# %s\n' "$kit"
220
- for m in "${g[@]}"; do
221
- [[ -n "${pending[$m]:-}" ]] || continue
222
- unset "pending[$m]"
223
- if [[ -n "$OMIT_REASON" ]] && dispatches_to_binary "$kit" "$m"; then
224
- printf '# omitted: %s %s\n' "$m" "$OMIT_REASON"
225
- else
226
- printf '%s\n' "$m"
227
- fi
228
- done
229
- done
230
- }
231
- (( DRY )) || plan_gates > "$ROOT/$GATES_LIST" || die "could not write $GATES_LIST"
232
- record "$GATES_LIST"
233
- fi
234
-
235
- for kit in "${KITS[@]}"; do
236
- # spec: installer/README.md §What init seeds — the recipe's plan channel is performed here, in the parent shell, and that is load-bearing rather than stylistic: the producer sits inside a process substitution, where every record() and CHANGED append would be discarded, so the plan may be produced in a subshell and the writes may not
237
- while IFS= read -r p; do
238
- [[ -n "$p" ]] || continue
239
- if [[ "$p" == *$'\t'* ]]; then
240
- IFS=$'\t' read -r seam_src seam_dest <<<"$p"
241
- copy_in "$seam_src" "$seam_dest"
242
- else
243
- claim "$p" && record "$p"
244
- fi
245
- done < <(
246
- # spec: installer/README.md §init — --dry-run resolves the same seam plan the real run would, out of the same enumerator rather than a second spelling of the glob: copy_in already writes nothing under --dry-run, so the plan needs no dry variant and cannot drift from the run it predicts
247
- recipe_config_seam_plan "$PAYLOAD/$kit" "$GATES_DIR"
248
- if (( DRY )); then
249
- case "$kit" in
250
- gate-sdk) printf '%s/msg-patterns.list\n' "$GATES_DIR" ;;
251
- evidence-kit) printf '%s\n' .workflow/validate-baseline.txt .workflow/validate-evidence.txt ;;
252
- lifecycle-kit) printf '%s\n' .workflow/WORKFLOW-STATE.txt ;;
253
- doctrine-kit) printf '%s\n' "$AGENT_FILE" ;;
254
- esac
255
- else
256
- if recipe_needs_agent_file "$kit" && [[ ! -f "$ROOT/$AGENT_FILE" ]]; then
257
- # spec: installer/README.md §What init seeds — the seeded agent file carries the section heading context-kit's brevity gate reads by default, so the gate init registers has the surface it was pointed at from the first commit
258
- printf '%s\n' "# $AGENT_FILE" "" \
259
- "Resident instructions for agent sessions in this repository." "" \
260
- "## Shared conventions" "" \
261
- "- **Terse:** one line per rule here; the mechanism behind the pointer." \
262
- > "$ROOT/$AGENT_FILE" || die "could not seed $AGENT_FILE"
263
- printf '%s\n' "$AGENT_FILE"
264
- fi
265
- recipe_seed "$kit" "$PAYLOAD/$kit" "$ROOT" || die "could not seed $kit"
266
- fi
267
- )
268
- done
269
-
270
- # spec: installer/README.md §What init seeds — the queue seed runs here, once, over the resolved kit set: inside the loop above the first kit reached decided the source before any kit shipping a template got a turn. It runs in the parent shell for the reason that loop's own directive gives — a record() inside the process substitution is discarded — and the resolver below is the single predicate the dry plan and the run share, so the prediction cannot drift from the write it predicts
271
- QUEUE_SRC="$(recipe_queue_source "$PAYLOAD" "${KITS[@]}")"
272
- if [[ -n "$QUEUE_SRC" && ! -f "$ROOT/$QUEUE_FILE" ]]; then
273
- (( DRY )) || recipe_write_queue "$QUEUE_SRC" "$ROOT" "$QUEUE_FILE" || die "could not seed $QUEUE_FILE"
274
- claim "$QUEUE_FILE" && record "$QUEUE_FILE"
275
- fi
276
-
277
- # spec: installer/README.md §The gate binary — the write comes after every config seam is in place and before the hook is generated, because the generator resolves each member's invocation argv and a `.gate` member resolves to this binary: the knob must name it and the file must be there, or the generator reports a dispatch it cannot make
278
- SEAM="$GATES_DIR/gate-sdk-config.sh"
279
- if [[ -n "$ARTIFACT_TARGET" ]]; then
280
- if claim "$ARTIFACT_PATH"; then
281
- if (( ! DRY )); then
282
- # spec: installer/README.md §The manifest — an on-disk artifact that still verifies against the recorded digest is not rewritten, which is what makes a bare re-run leave the tree byte-identical
283
- if [[ "$PRIOR_ARTIFACT_TARGET" != "$ARTIFACT_TARGET" \
284
- || "$PRIOR_ARTIFACT_DIGEST" != "$ARTIFACT_DIGEST" \
285
- || ! -f "$ROOT/$ARTIFACT_PATH" \
286
- || "$(digest_of "$ROOT/$ARTIFACT_PATH")" != "$ARTIFACT_DIGEST" ]]; then
287
- cp "$ARTIFACT_SRC" "$ROOT/$ARTIFACT_PATH" && chmod +x "$ROOT/$ARTIFACT_PATH" \
288
- || die "could not write $ARTIFACT_PATH"
289
- fi
290
- fi
291
- record "$ARTIFACT_PATH"
292
- fi
293
- # spec: gate-sdk/SPEC.md §Layout and configuration — the install location has one owner and it is this knob, which is why the lock records no path: a consumer's binary sits in their gates directory while the knob's default names the crate's build output, and only the seam can say so without relocating it for every existing reader
294
- if claim "$SEAM"; then
295
- if (( ! DRY )); then
296
- {
297
- # spec: gate-sdk/SPEC.md §Layout and configuration — the seam is a sourced shell file, so it carries the same two directives every kit's shipped config template carries: without them the consumer's own check-shellcheck reds on the file init just wrote them
298
- [[ -f "$ROOT/$SEAM" ]] || printf '%s\n' \
299
- "# shellcheck shell=bash" \
300
- "# shellcheck disable=SC2034 # consumed by gate-sdk/lib/gate.sh after sourcing"
301
- [[ -f "$ROOT/$SEAM" ]] && grep -v '^GATE_SDK_NATIVE_BIN=' "$ROOT/$SEAM"
302
- printf 'GATE_SDK_NATIVE_BIN=%s\n' "$ARTIFACT_PATH"
303
- } > "$ROOT/$SEAM.tmp" \
304
- && mv "$ROOT/$SEAM.tmp" "$ROOT/$SEAM" || die "could not write $SEAM"
305
- fi
306
- [[ -n "${IS_WRITTEN[$SEAM]:-}" ]] || record "$SEAM"
307
- fi
308
- fi
309
-
310
- # spec: installer/README.md §init — the generated projections are produced by the vendored tools themselves, never restated by the installer: the hook generator and the graph emitter are gate-sdk's, so a consumer's artifacts are the ones their own gate-sdk makes
311
- GENERATED=("$GATES_DIR/git-hooks/pre-commit" "$GATES_DIR/CHECK-GRAPH.html")
312
- if (( ! DRY )); then
313
- ( cd "$ROOT" && bash "$ROOT/gate-sdk/bin/gen-pre-commit.sh" --write ) >/dev/null \
314
- || die "gate-sdk's hook generator failed"
315
- # spec: installer/README.md §The gate binary — the graph emitter is a binary arm, reached through the front-end that resolves its bridged knobs (gate-sdk/SPEC.md §The non-gate arm). It runs exactly when an artifact was selected, because a payload that omitted the binary has written the graph gate into gates.list as an omission and the consumer therefore has no graph gate for this artifact to be fresh against — and because omission must never fail an install over something the adopter did not choose. The roster loop below already tolerates a generated file that was not produced.
316
- if [[ -n "$ARTIFACT_TARGET" ]]; then
317
- ( cd "$ROOT" && bash "$ROOT/gate-sdk/bin/run-gates.sh" --emit graph ) > "$ROOT/$GATES_DIR/CHECK-GRAPH.html" \
318
- || die "gate-sdk's graph emitter failed"
319
- fi
320
- fi
321
- [[ -f "$ROOT/$GATES_DIR/git-hooks/commit-msg" ]] && GENERATED+=("$GATES_DIR/git-hooks/commit-msg")
322
- for g in "${GENERATED[@]}"; do
323
- (( DRY )) || [[ -f "$ROOT/$g" ]] || continue
324
- record "$g"
325
- done
326
-
327
- # spec: installer/README.md §The manifest — the roster's exit condition, and it is the whole rule: init owns a path because it wrote the file there, so ownership ends when the file leaves the tree and at no other moment. Dropping an entry would disown a file init created, and an uninstall reading this roster would then leave it behind. A payload that stops shipping a path is not that moment either — the file is still on disk, it may carry the adopter's edits, and disowning it is precisely what lets a later payload re-adding the same path write straight through them. So membership and existence are the only tests: every path this payload still ships has already reached claim(), which records it on the write and on the refusal alike, leaving exactly the paths no copy_in visited this run to reach here — and "this run" is why the loop is last rather than merely late: every path init writes must already be recorded when it runs, or the loop carries a path init rewrote seconds earlier at its superseded hash and the staged set loses it. The generated projections above are the ones that reached it from the wrong side
328
- if [[ -n "$PRIOR_FILES" ]]; then
329
- while IFS=$'\t' read -r p h; do
330
- [[ -n "$p" ]] || continue
331
- [[ -n "${IS_WRITTEN[$p]:-}" ]] && continue
332
- [[ -f "$ROOT/$p" ]] || continue
333
- record "$p" "$h"
334
- done <<<"$PRIOR_FILES"
335
- fi
336
-
337
- # spec: installer/README.md §The manifest — what init wrote this run is a subset of the roster it records, because a path left alone for the adopter and a path this payload no longer ships are both carried forward rather than written; the two part company here so every reader downstream takes the one it means, and staging takes the written set: folding an adopter's file into the vendoring commit is what the clean-worktree precondition exists to prevent
338
- STAGE=()
339
- for f in "${WRITTEN[@]}"; do [[ -n "${CARRIED[$f]:-}" ]] || STAGE+=("$f"); done
340
-
341
- files_hash() { # $1 = repo-relative path -> the hash its files[] entry carries
342
- [[ -n "${CARRIED[$1]:-}" ]] && { printf '%s' "${CARRIED[$1]}"; return 0; }
343
- (( DRY )) && [[ ! -f "$ROOT/$1" ]] && { printf '(pending)'; return 0; }
344
- lock_hash "$ROOT/$1"
345
- }
346
-
347
- # spec: installer/README.md §The manifest — the wire shape has one writer and it is lock.sh's lock_emit; what stays here is init's own rule about which hash an entry carries, which is not the schema's business
348
- manifest() {
349
- local f
350
- # spec: installer/README.md §The manifest — the binary is neither vendored nor generated, so it joins as its own key rather than a files[] row: a files[] entry means hashed with git hash-object and rewritten when unmodified, and this one is hashed with SHA-256 against a published value and rewritten on a different rule. Its absence on a run that omitted the artifact is the omission's machine-readable form, which is why the flag is passed only when a target was selected
351
- local -a args=(version="$VERSION" profile="$PROFILE" kits="${KITS[*]}")
352
- # spec: installer/README.md §The manifest — commit is passed on the same conditional footing as the artifact key, for the reason lock_emit already states: an identity field is present exactly when the caller supplied it, and an empty commit written as "" would be a placeholder standing in for an omission. Its emptiness was masked by statement order alone until the jq preflight landed ahead of it; with jq's absence ruled out, an empty commit means only that the package carries no commit stamp, and the existing rule settles what to do about it
353
- [[ -n "$COMMIT" ]] && args+=(commit="$COMMIT")
354
- [[ -n "$ARTIFACT_TARGET" ]] && args+=(--artifact "$ARTIFACT_TARGET" "$ARTIFACT_DIGEST")
355
- for f in "${WRITTEN[@]}"; do
356
- printf '%s\t%s\n' "$f" "$(files_hash "$f")"
357
- done | lock_emit "${args[@]}"
358
- }
359
-
360
- if (( DRY )); then
361
- printf 'checkwright init --dry-run (profile: %s, version: %s)\n\n' "$PROFILE" "$VERSION"
362
- printf 'would vendor %d kit(s): %s\n' "${#KITS[@]}" "${KITS[*]}"
363
- printf 'would write %d file(s), including:\n' "$(( ${#STAGE[@]} + 1 ))"
364
- printf ' %s\n' "$GATES_LIST" "$CHECKWRIGHT_LOCK_FILE"
365
- for kit in "${KITS[@]}"; do printf ' %s/ (%d files)\n' "$kit" "$(find "$PAYLOAD/$kit" -type f | wc -l)"; done
366
- if [[ -n "$ARTIFACT_TARGET" ]]; then
367
- printf '\nwould place the %s gate binary at %s (digest verified against the payload sidecar)\n' \
368
- "$ARTIFACT_TARGET" "$ARTIFACT_PATH"
369
- else
370
- printf '\nwould omit the prebuilt gate binary (%s) and declare it in %s\n' "$OMIT_REASON" "$GATES_LIST"
371
- fi
372
- if [[ ${#CHANGED[@]} -gt 0 ]]; then
373
- printf '\nwould leave %d changed file(s) alone (--force to overwrite):\n' "${#CHANGED[@]}"
374
- printf ' %s\n' "${CHANGED[@]}"
375
- fi
376
- printf '\n%s that would be written:\n' "$CHECKWRIGHT_LOCK_FILE"
377
- manifest
378
- printf '\nDRY RUN: nothing was written.\n'
379
- exit 0
380
- fi
381
-
382
- manifest > "$LOCK" || die "could not write $CHECKWRIGHT_LOCK_FILE"
383
- WRITTEN+=("$CHECKWRIGHT_LOCK_FILE")
384
- STAGE+=("$CHECKWRIGHT_LOCK_FILE")
385
-
386
- if [[ ${#CHANGED[@]} -gt 0 ]]; then
387
- printf '\n%d file(s) have changed since init wrote them and were left alone:\n' "${#CHANGED[@]}"
388
- printf ' %s\n' "${CHANGED[@]}"
389
- printf ' help: review the differences; re-run with --force to take the packaged version.\n\n'
390
- fi
391
-
392
- git -C "$ROOT" add -- "${STAGE[@]}" || die "could not stage the vendored files"
393
-
394
- # spec: installer/README.md §init — idempotence is a property of the tree, so a re-run that changed nothing reports and exits clean rather than failing on an empty commit: "nothing to do" is the success case, not an error. The predicate reads the index rather than the worktree and it stays the guard on whether a commit is attempted, because a commit against an empty index exits non-zero and init treats a failed commit as a fatal install failure — an arm placed ahead of this branch would turn the pure idempotent path into a false hard error
395
- if git -C "$ROOT" diff --cached --quiet; then
396
- # spec: installer/README.md §init — a run init considers a no-op still commits what it rewrote, so this branch asks what the predicate above cannot: whether anything on the roster init just recorded differs from the committed tree. The clean-worktree precondition is what makes the answer attributable — nothing dirty at those paths can be the adopter's — and --no-commit is exempt because it waives that precondition and hands the commit over. The expected answer is "nothing", at the cost of one status call; the arm is here so the one-commit contract survives the staged set failing to cover what init wrote rather than resting on the assumption that it never will, and the inner index check is what keeps that survival from becoming the empty commit the paragraph above rules out
397
- if (( DO_COMMIT )) && [[ -n "$(git -C "$ROOT" status --porcelain -- "${WRITTEN[@]}")" ]]; then
398
- git -C "$ROOT" add -- "${WRITTEN[@]}" \
399
- || die "could not stage the files init rewrote but left out of the vendoring commit"
400
- if ! git -C "$ROOT" diff --cached --quiet; then
401
- residue="$(git -C "$ROOT" diff --cached --name-only | grep -c .)"
402
- git -C "$ROOT" commit -q -m "chore: vendor Checkwright kits ($PROFILE profile, v$VERSION)" \
403
- || die "the commit failed — the files are staged; commit them yourself to finish the install" "" 1
404
- printf 'INIT: already at the %s profile (v%s) — %d file(s) checked; %d that init had rewritten were uncommitted and are now committed.\n' \
405
- "$PROFILE" "$VERSION" "${#WRITTEN[@]}" "$residue"
406
- exit 0
407
- fi
408
- fi
409
- printf 'INIT: already at the %s profile (v%s) — %d file(s) checked, nothing to change and nothing it rewrote left uncommitted.\n' \
410
- "$PROFILE" "$VERSION" "${#WRITTEN[@]}"
411
- exit 0
412
- fi
413
-
414
- if (( DO_COMMIT )); then
415
- # spec: installer/README.md §init — the commit is the distribution model, not a convenience: vendored-and-committed is what makes the tree auditable, so leaving it dirty would hand the adopter the step that does the proving
416
- git -C "$ROOT" commit -q -m "chore: vendor Checkwright kits ($PROFILE profile, v$VERSION)" \
417
- || die "the commit failed — the files are staged; commit them yourself to finish the install" "" 1
418
- printf 'INIT: vendored %d kit(s) at the %s profile (v%s) and committed them.\n' \
419
- "${#KITS[@]}" "$PROFILE" "$VERSION"
420
- else
421
- printf 'INIT: vendored %d kit(s) at the %s profile (v%s) and staged them — --no-commit, so the commit is yours.\n' \
422
- "${#KITS[@]}" "$PROFILE" "$VERSION"
423
- fi
424
-
425
- printf '\nnext:\n'
426
- printf ' bash gate-sdk/bin/install-hooks.sh # opt this clone into the generated pre-commit hook\n'
427
- printf ' bash gate-sdk/bin/run-gates.sh # the battery, green on what was just vendored\n'
428
- exit 0