checkwright 0.24.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1044) hide show
  1. package/README.md +35 -1361
  2. package/bin/checkwright.ps1 +157 -0
  3. package/bin/checkwright.sh +187 -44
  4. package/package.json +15 -14
  5. package/payload/artifact/aarch64-apple-darwin/checkwright-gates +0 -0
  6. package/payload/artifact/aarch64-apple-darwin/checkwright-gates.sha256 +1 -0
  7. package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe +0 -0
  8. package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -0
  9. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates +0 -0
  10. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates.sha256 +1 -0
  11. package/payload/artifact/targets.list +120 -24
  12. package/payload/artifact/x86_64-apple-darwin/checkwright-gates +0 -0
  13. package/payload/artifact/x86_64-apple-darwin/checkwright-gates.sha256 +1 -0
  14. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe +0 -0
  15. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -0
  16. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  17. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  18. package/payload/canon-kit/README.md +25 -37
  19. package/payload/canon-kit/checks/check-amendment-queue.gate +2 -2
  20. package/payload/canon-kit/checks/check-amendment-retired-spelling.gate +3 -0
  21. package/payload/canon-kit/checks/check-amendment-update-target.gate +3 -0
  22. package/payload/canon-kit/checks/check-comment-tier.gate +1 -1
  23. package/payload/canon-kit/checks/check-deprecation-task.gate +2 -1
  24. package/payload/canon-kit/checks/check-docs-cmd.gate +2 -2
  25. package/payload/canon-kit/checks/check-docs-link-convention.gate +1 -1
  26. package/payload/canon-kit/checks/check-docs-restatement-parity.gate +4 -0
  27. package/payload/canon-kit/checks/check-fence-command-head.gate +3 -0
  28. package/payload/canon-kit/checks/check-fence-run.gate +3 -0
  29. package/payload/canon-kit/checks/check-install-claim.gate +2 -1
  30. package/payload/canon-kit/checks/check-knob-citation.gate +1 -1
  31. package/payload/canon-kit/checks/check-manifest-count.gate +1 -1
  32. package/payload/canon-kit/checks/check-manifest-temporal.gate +1 -1
  33. package/payload/canon-kit/checks/check-md-refs.gate +1 -1
  34. package/payload/canon-kit/checks/check-md-unwrapped.gate +3 -0
  35. package/payload/canon-kit/checks/check-measured-claim.gate +2 -1
  36. package/payload/canon-kit/checks/check-payload-claim.gate +2 -1
  37. package/payload/canon-kit/checks/check-prose-bounds.gate +3 -0
  38. package/payload/canon-kit/checks/check-prose-enum.gate +2 -1
  39. package/payload/canon-kit/checks/check-prose-tells.gate +1 -1
  40. package/payload/canon-kit/checks/check-provenance-seam.gate +3 -0
  41. package/payload/canon-kit/checks/check-spec-derivable-section.gate +1 -1
  42. package/payload/canon-kit/checks/check-spec-dod-singleton.gate +1 -1
  43. package/payload/canon-kit/checks/check-spec-embedded-source.gate +1 -1
  44. package/payload/canon-kit/checks/check-spec-fence-balance.gate +1 -1
  45. package/payload/canon-kit/checks/check-spec-pointer.gate +2 -2
  46. package/payload/canon-kit/checks/check-surface-duplication.gate +3 -0
  47. package/payload/canon-kit/checks/check-todo-task-liveness.gate +1 -1
  48. package/payload/canon-kit/checks/check-tracking-claim.gate +1 -1
  49. package/payload/canon-kit/checks/check-unmarked-claim.gate +4 -0
  50. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-tidy.md +3 -0
  51. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +37 -8
  52. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +6 -3
  53. package/payload/canon-kit/gate-tests/check-amendment-queue/good/SPEC-widget.md +7 -0
  54. package/payload/canon-kit/gate-tests/check-amendment-queue/good/TASK-QUEUE.md +11 -3
  55. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/SPEC-nosection.md +16 -0
  56. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/SPEC-thing.md +26 -0
  57. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/expect.txt +8 -0
  58. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/surface/one.md +4 -0
  59. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/surface/two.md +3 -0
  60. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/SPEC-tidy.md +20 -0
  61. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/SPEC-widget.md +37 -0
  62. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/component/README.md +4 -0
  63. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/component/SPEC.md +4 -0
  64. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/expect.txt +1 -0
  65. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/unnamed.md +4 -0
  66. package/payload/canon-kit/gate-tests/check-amendment-update-target/bad/SPEC-thing.md +26 -0
  67. package/payload/canon-kit/gate-tests/check-amendment-update-target/bad/expect.txt +8 -0
  68. package/payload/canon-kit/gate-tests/check-amendment-update-target/good/SPEC-widget.md +47 -0
  69. package/payload/canon-kit/gate-tests/check-amendment-update-target/good/expect.txt +1 -0
  70. package/payload/canon-kit/gate-tests/check-amendment-update-target.test.sh +82 -0
  71. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +1 -1
  72. package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +37 -26
  73. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/TASK-QUEUE.md +3 -1
  74. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.knobs +2 -0
  75. package/payload/canon-kit/gate-tests/check-deprecation-task/good/TASK-QUEUE.md +6 -2
  76. package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -1
  77. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.knobs +2 -0
  78. package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +12 -10
  79. package/payload/canon-kit/gate-tests/check-docs-cmd/good/doc.md +4 -1
  80. package/payload/canon-kit/gate-tests/check-docs-cmd.test.sh +61 -0
  81. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/expect.txt +3 -0
  82. package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +21 -2
  83. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/expect.txt +2 -0
  84. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/kit/README.md +10 -0
  85. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/kit/index.md +11 -0
  86. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/scripts/canon-config.knobs +2 -0
  87. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/scripts/gate-sdk-config.knobs +2 -0
  88. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/expect.txt +1 -0
  89. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/kit/README.md +12 -0
  90. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/kit/index.md +13 -0
  91. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/scripts/canon-config.knobs +2 -0
  92. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/scripts/gate-sdk-config.knobs +2 -0
  93. package/payload/canon-kit/gate-tests/check-fence-command-head/bad/args +1 -0
  94. package/payload/canon-kit/gate-tests/check-fence-command-head/bad/doc.md +16 -0
  95. package/payload/canon-kit/gate-tests/check-fence-command-head/bad/expect.txt +5 -0
  96. package/payload/canon-kit/gate-tests/check-fence-command-head/good/args +1 -0
  97. package/payload/canon-kit/gate-tests/check-fence-command-head/good/bin/run.sh +3 -0
  98. package/payload/canon-kit/gate-tests/check-fence-command-head/good/doc.md +41 -0
  99. package/payload/canon-kit/gate-tests/check-fence-command-head/good/expect.txt +1 -0
  100. package/payload/canon-kit/gate-tests/check-fence-command-head/good/lib/tool.sh +5 -0
  101. package/payload/canon-kit/gate-tests/check-fence-command-head/good/scripts/canon-config.knobs +2 -0
  102. package/payload/canon-kit/gate-tests/check-fence-run/bad/args +1 -0
  103. package/payload/canon-kit/gate-tests/check-fence-run/bad/doc.md +32 -0
  104. package/payload/canon-kit/gate-tests/check-fence-run/bad/expect.txt +7 -0
  105. package/payload/canon-kit/gate-tests/check-fence-run/good/args +1 -0
  106. package/payload/canon-kit/gate-tests/check-fence-run/good/doc.md +31 -0
  107. package/payload/canon-kit/gate-tests/check-fence-run/good/expect.txt +1 -0
  108. package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.knobs +7 -0
  109. package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.knobs +7 -0
  110. package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +42 -7
  111. package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +1 -2
  112. package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
  113. package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +37 -8
  114. package/payload/canon-kit/gate-tests/check-manifest-count/bad/SPEC.md +3 -0
  115. package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +10 -0
  116. package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +6 -6
  117. package/payload/canon-kit/gate-tests/check-md-refs.test.sh +1 -1
  118. package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/doc.md +13 -0
  119. package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/expect.txt +4 -0
  120. package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/scripts/canon-config.knobs +2 -0
  121. package/payload/canon-kit/gate-tests/check-md-unwrapped/good/doc.md +45 -0
  122. package/payload/canon-kit/gate-tests/check-md-unwrapped/good/expect.txt +1 -0
  123. package/payload/canon-kit/gate-tests/check-md-unwrapped/good/scripts/canon-config.knobs +4 -0
  124. package/payload/canon-kit/gate-tests/check-measured-claim/bad/SPEC.md +3 -0
  125. package/payload/canon-kit/gate-tests/check-measured-claim/bad/expect.txt +1 -0
  126. package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.knobs +4 -0
  127. package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +8 -0
  128. package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.knobs +4 -0
  129. package/payload/canon-kit/gate-tests/check-measured-claim/good/worktrees/SPEC.md +12 -0
  130. package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +32 -13
  131. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.knobs +6 -0
  132. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.knobs +6 -0
  133. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/CLAUDE.md +9 -0
  134. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/SPEC.md +11 -0
  135. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/expect.txt +3 -0
  136. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/scripts/canon-config.knobs +3 -0
  137. package/payload/canon-kit/gate-tests/check-prose-bounds/good/CLAUDE.md +10 -0
  138. package/payload/canon-kit/gate-tests/check-prose-bounds/good/SPEC.md +27 -0
  139. package/payload/canon-kit/gate-tests/check-prose-bounds/good/expect.txt +1 -0
  140. package/payload/canon-kit/gate-tests/check-prose-bounds/good/scripts/canon-config.knobs +3 -0
  141. package/payload/canon-kit/gate-tests/check-prose-bounds.test.sh +98 -0
  142. package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.knobs +3 -0
  143. package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.knobs +3 -0
  144. package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +55 -25
  145. package/payload/canon-kit/gate-tests/check-prose-tells/bad/prose.md +2 -0
  146. package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.knobs +5 -0
  147. package/payload/canon-kit/gate-tests/check-prose-tells/good/prose.md +6 -0
  148. package/payload/canon-kit/gate-tests/check-prose-tells/good/scripts/{canon-config.sh → canon-config.knobs} +2 -5
  149. package/payload/canon-kit/gate-tests/check-prose-tells/good/worktrees/prose.md +17 -0
  150. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/TASK-QUEUE.md +15 -0
  151. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/expect.txt +8 -0
  152. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/canon-config.knobs +3 -0
  153. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/gate-sdk-config.knobs +2 -0
  154. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/lifecycle-config.knobs +12 -0
  155. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/widget-toolkit/SPEC.md +27 -0
  156. package/payload/canon-kit/gate-tests/check-provenance-seam/good/TASK-QUEUE.md +15 -0
  157. package/payload/canon-kit/gate-tests/check-provenance-seam/good/expect.txt +1 -0
  158. package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/canon-config.knobs +3 -0
  159. package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/gate-sdk-config.knobs +2 -0
  160. package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/lifecycle-config.knobs +12 -0
  161. package/payload/canon-kit/gate-tests/check-provenance-seam/good/widget-toolkit/SPEC.md +20 -0
  162. package/payload/canon-kit/gate-tests/check-provenance-seam.test.sh +136 -0
  163. package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +1 -1
  164. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/README.md +6 -0
  165. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/SPEC-widget.md +5 -0
  166. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.rs +2 -0
  167. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +4 -0
  168. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.knobs +6 -0
  169. package/payload/canon-kit/gate-tests/check-spec-pointer/good/README.md +15 -0
  170. package/payload/canon-kit/gate-tests/check-spec-pointer/good/SPEC-widget.md +10 -0
  171. package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -1
  172. package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.rs +2 -0
  173. package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.knobs +6 -0
  174. package/payload/canon-kit/gate-tests/check-spec-pointer/good/vendored-kit/notes.txt +4 -0
  175. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/TASK-QUEUE.md +3 -1
  176. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/TASK-QUEUE.md +9 -3
  177. package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +1 -1
  178. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/SPEC.md +14 -0
  179. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/expect.txt +4 -0
  180. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/scripts/canon-config.knobs +4 -0
  181. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/SPEC.md +21 -0
  182. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/expect.txt +1 -0
  183. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/scripts/canon-config.knobs +4 -0
  184. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/worktrees/SPEC.md +11 -0
  185. package/payload/canon-kit/gate-tests/check-unmarked-claim.test.sh +110 -0
  186. package/payload/canon-kit/templates/SPEC-amendment.md +63 -27
  187. package/payload/canon-kit/templates/canon-config.knobs +1 -0
  188. package/payload/context-kit/README.md +33 -61
  189. package/payload/context-kit/checks/check-brevity.gate +2 -2
  190. package/payload/context-kit/checks/check-footprint-fresh.gate +3 -2
  191. package/payload/context-kit/checks/check-memory-off.gate +1 -1
  192. package/payload/context-kit/checks/check-settings-paths.gate +2 -2
  193. package/payload/context-kit/checks/check-settings-pins.gate +1 -1
  194. package/payload/context-kit/checks/check-surface-ratchet.gate +3 -0
  195. package/payload/context-kit/gate-tests/check-brevity/bad/CLAUDE.md +9 -2
  196. package/payload/context-kit/gate-tests/check-brevity/bad/expect.txt +1 -0
  197. package/payload/context-kit/gate-tests/check-brevity/good/CLAUDE.md +9 -4
  198. package/payload/context-kit/gate-tests/check-brevity/good/expect.txt +1 -1
  199. package/payload/context-kit/gate-tests/check-brevity.test.sh +107 -24
  200. package/payload/context-kit/gate-tests/check-footprint-fresh/good/CLAUDE.md +6 -0
  201. package/payload/context-kit/gate-tests/check-footprint-fresh/good/demo-kit/SPEC.md +3 -0
  202. package/payload/context-kit/gate-tests/check-footprint-fresh/good/demo-kit/templates/guide.md +3 -0
  203. package/payload/context-kit/gate-tests/check-footprint-fresh/good/docs/footprint.md +30 -0
  204. package/payload/context-kit/gate-tests/check-memory-off/bad/scripts/{context-config.sh → context-config.knobs} +1 -3
  205. package/payload/context-kit/gate-tests/check-memory-off/good/scripts/{context-config.sh → context-config.knobs} +1 -3
  206. package/payload/context-kit/gate-tests/check-memory-off.test.sh +1 -1
  207. package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +2 -0
  208. package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +21 -0
  209. package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/run-gates.sh +4 -0
  210. package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +2 -1
  211. package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +48 -1
  212. package/payload/context-kit/gate-tests/check-settings-paths/good/tools/run-gates.sh +4 -0
  213. package/payload/context-kit/gate-tests/check-settings-pins.test.sh +1 -1
  214. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/CLAUDE.md +5 -0
  215. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/expect.txt +2 -0
  216. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/scripts/context-config.knobs +4 -0
  217. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/surface-ceiling.txt +2 -0
  218. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/templates/ungoverned.md +3 -0
  219. package/payload/context-kit/gate-tests/check-surface-ratchet/good/CLAUDE.md +3 -0
  220. package/payload/context-kit/gate-tests/check-surface-ratchet/good/expect.txt +1 -0
  221. package/payload/context-kit/gate-tests/check-surface-ratchet/good/scripts/context-config.knobs +4 -0
  222. package/payload/context-kit/gate-tests/check-surface-ratchet/good/surface-ceiling.txt +4 -0
  223. package/payload/context-kit/gate-tests/check-surface-ratchet/good/templates/held.md +4 -0
  224. package/payload/context-kit/gate-tests/check-surface-ratchet.test.sh +76 -0
  225. package/payload/context-kit/index-tests/corpus/baseline.txt +1 -1
  226. package/payload/context-kit/index-tests/corpus/surface.md +1 -6
  227. package/payload/context-kit/index-tests/expected/always-loaded.txt +1 -1
  228. package/payload/context-kit/templates/close-brevity.md +9 -28
  229. package/payload/context-kit/templates/context-config.knobs +1 -0
  230. package/payload/context-kit/templates/session-context.sh +43 -28
  231. package/payload/delegation-kit/README.md +35 -59
  232. package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +1 -1
  233. package/payload/delegation-kit/checks/check-gate-tamper.gate +1 -1
  234. package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +23 -2
  235. package/payload/delegation-kit/templates/agent-execution.md +23 -372
  236. package/payload/delegation-kit/templates/delegation-config.knobs +4 -0
  237. package/payload/delegation-kit/templates/dispatch-checklists.md +8 -45
  238. package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +33 -17
  239. package/payload/doctrine-kit/DOCTRINE.md +92 -458
  240. package/payload/doctrine-kit/README.md +24 -55
  241. package/payload/doctrine-kit/checks/check-doctrine-registration.gate +1 -1
  242. package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +48 -3
  243. package/payload/drift-kit/README.md +43 -89
  244. package/payload/drift-kit/templates/close-knowledge.md +7 -22
  245. package/payload/drift-kit/templates/drift-config.knobs +1 -0
  246. package/payload/drift-kit/templates/economics.md +10 -48
  247. package/payload/drift-kit/templates/kpi-deprecated-surface.sh +31 -9
  248. package/payload/drift-kit/templates/kpis.list +2 -1
  249. package/payload/drift-kit/templates/price-table.tsv +1 -1
  250. package/payload/evidence-kit/README.md +23 -46
  251. package/payload/evidence-kit/checks/check-battery-roster.gate +1 -1
  252. package/payload/evidence-kit/checks/check-evidence-baseline.gate +2 -2
  253. package/payload/evidence-kit/checks/check-evidence-manifest.gate +1 -1
  254. package/payload/evidence-kit/checks/check-producer-liveness.gate +3 -0
  255. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.knobs +7 -0
  256. package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.knobs +7 -0
  257. package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +7 -7
  258. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/TASK-QUEUE.md +3 -1
  259. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/args +1 -0
  260. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/expect.txt +2 -0
  261. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/scripts/evidence-config.knobs +4 -0
  262. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/validate-baseline.txt +1 -0
  263. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/TASK-QUEUE.md +3 -1
  264. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/args +1 -0
  265. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/scripts/evidence-config.knobs +3 -0
  266. package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +134 -14
  267. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/scripts/{evidence-config.sh → evidence-config.knobs} +3 -5
  268. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/scripts/{evidence-config.sh → evidence-config.knobs} +3 -5
  269. package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +5 -4
  270. package/payload/evidence-kit/gate-tests/diff-baseline-status.test.sh +128 -0
  271. package/payload/evidence-kit/gate-tests/evidence-lib.test.sh +51 -45
  272. package/payload/evidence-kit/gate-tests/pre-hook.test.sh +66 -0
  273. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +29 -16
  274. package/payload/evidence-kit/templates/evidence-config.knobs +1 -0
  275. package/payload/gate-sdk/README.md +47 -73
  276. package/payload/gate-sdk/bin/build-native.sh +89 -1
  277. package/payload/gate-sdk/bin/run-gates.ps1 +266 -0
  278. package/payload/gate-sdk/bin/run-gates.sh +60 -182
  279. package/payload/gate-sdk/checks/check-action-gh-repo.gate +1 -1
  280. package/payload/gate-sdk/checks/check-action-job-ref.gate +3 -0
  281. package/payload/gate-sdk/checks/check-action-permissions.gate +3 -0
  282. package/payload/gate-sdk/checks/check-action-pinning.gate +1 -1
  283. package/payload/gate-sdk/checks/check-action-run-path.gate +3 -0
  284. package/payload/gate-sdk/checks/check-action-run-shell.gate +3 -0
  285. package/payload/gate-sdk/checks/check-commit-msg.gate +2 -1
  286. package/payload/gate-sdk/checks/check-commit-subject.gate +1 -1
  287. package/payload/gate-sdk/checks/check-core-files.gate +1 -1
  288. package/payload/gate-sdk/checks/check-crate-arms.gate +3 -0
  289. package/payload/gate-sdk/checks/check-enforcement-fresh.gate +3 -2
  290. package/payload/gate-sdk/checks/check-exec-bit.gate +1 -1
  291. package/payload/gate-sdk/checks/check-front-end-fail-open.gate +3 -0
  292. package/payload/gate-sdk/checks/check-gate-assertions.gate +3 -0
  293. package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +1 -1
  294. package/payload/gate-sdk/checks/check-gate-exemption-tasks.gate +1 -1
  295. package/payload/gate-sdk/checks/check-gate-fail-closed.gate +1 -1
  296. package/payload/gate-sdk/checks/check-gate-fixture-coverage.gate +1 -1
  297. package/payload/gate-sdk/checks/check-gate-output.gate +1 -1
  298. package/payload/gate-sdk/checks/check-gate-substrate-parity.gate +3 -0
  299. package/payload/gate-sdk/checks/check-graph.gate +2 -1
  300. package/payload/gate-sdk/checks/check-hook-exec-bit.gate +1 -1
  301. package/payload/gate-sdk/checks/check-identity.gate +1 -1
  302. package/payload/gate-sdk/checks/check-install-disposition.gate +3 -0
  303. package/payload/gate-sdk/checks/check-kit-enum.gate +1 -1
  304. package/payload/gate-sdk/checks/check-kit-registration.gate +1 -1
  305. package/payload/gate-sdk/checks/check-kit-roots-dialect.gate +3 -0
  306. package/payload/gate-sdk/checks/check-packed-links.gate +3 -0
  307. package/payload/gate-sdk/checks/check-path-dialect.gate +3 -0
  308. package/payload/gate-sdk/checks/check-pipe-membership.gate +3 -0
  309. package/payload/gate-sdk/checks/check-portability-floor.gate +4 -0
  310. package/payload/gate-sdk/checks/check-projection-roster.gate +4 -0
  311. package/payload/gate-sdk/checks/check-reads-couples.gate +1 -1
  312. package/payload/gate-sdk/checks/check-root-tiering.gate +1 -1
  313. package/payload/gate-sdk/checks/check-shellcheck.gate +3 -0
  314. package/payload/gate-sdk/checks/check-template-copy-parity.gate +1 -1
  315. package/payload/gate-sdk/checks/check-tree-terms.gate +4 -0
  316. package/payload/gate-sdk/checks/check-workflow-tiering.gate +1 -1
  317. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/args +2 -0
  318. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/expect.txt +1 -0
  319. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/scripts/gate-sdk-config.knobs +1 -0
  320. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/tree/notes.md +3 -0
  321. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/tree/workflows/ci.yml +8 -0
  322. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/args +3 -0
  323. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/expect.txt +1 -0
  324. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/scripts/gate-sdk-config.knobs +1 -0
  325. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/tree/notes.md +3 -0
  326. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/tree/workflows/ci.yml +8 -0
  327. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/args +3 -0
  328. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/expect.txt +5 -0
  329. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/tree/workflows/empty-allowlist.yml +29 -0
  330. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/tree/workflows/gates.yml +25 -0
  331. package/payload/gate-sdk/gate-tests/check-action-permissions/good/args +5 -0
  332. package/payload/gate-sdk/gate-tests/check-action-permissions/good/expect.txt +1 -0
  333. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/action.yml +9 -0
  334. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/not-actions.yml +7 -0
  335. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/workflows/declared.yml +69 -0
  336. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/workflows/valves.yml +22 -0
  337. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/args +4 -0
  338. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/expect.txt +2 -0
  339. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/tree/scripts/present.sh +3 -0
  340. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/tree/workflows/ci.yml +14 -0
  341. package/payload/gate-sdk/gate-tests/check-action-run-path/good/args +5 -0
  342. package/payload/gate-sdk/gate-tests/check-action-run-path/good/expect.txt +1 -0
  343. package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/scripts/build.sh +3 -0
  344. package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/sub/scripts/inner.sh +3 -0
  345. package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/workflows/ci.yml +36 -0
  346. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/args +4 -2
  347. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/expect.txt +2 -0
  348. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/tree/workflows/runner-dialect.yml +36 -0
  349. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/args +3 -2
  350. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/expect.txt +1 -1
  351. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/tree/workflows/runner-dialect.yml +71 -0
  352. package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +102 -9
  353. package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/smoke/install.sh +1 -1
  354. package/payload/gate-sdk/gate-tests/check-assertion-strength/good/smoke/install.sh +1 -1
  355. package/payload/gate-sdk/gate-tests/check-assertion-strength.test.sh +55 -0
  356. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/expect.txt +1 -0
  357. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/msg.txt +4 -0
  358. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/patterns.list +5 -1
  359. package/payload/gate-sdk/gate-tests/check-commit-msg/good/msg.txt +7 -0
  360. package/payload/gate-sdk/gate-tests/check-commit-msg/good/patterns.list +5 -1
  361. package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +2 -2
  362. package/payload/gate-sdk/gate-tests/check-core-files.test.sh +1 -1
  363. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.knobs +3 -0
  364. package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.knobs +3 -0
  365. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/SPEC.md +3 -0
  366. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/checks/check-demo.gate +1 -0
  367. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/probe.conf +1 -0
  368. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/templates/guide.md +3 -0
  369. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/docs/enforcement.md +33 -0
  370. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/scripts/gate-sdk-config.knobs +1 -0
  371. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/scripts/gates.list +1 -0
  372. package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +1 -1
  373. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/args +3 -0
  374. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/expect.txt +2 -0
  375. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/gate-sdk/bin/run-gates.ps1 +5 -0
  376. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/gate-sdk/bin/run-gates.sh +9 -0
  377. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/args +4 -0
  378. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/expect.txt +1 -0
  379. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/gate-sdk/bin/run-gates.ps1 +5 -0
  380. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/gate-sdk/bin/run-gates.sh +9 -0
  381. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/expect.txt +5 -1
  382. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/SPEC.md +22 -0
  383. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-count.sh +11 -0
  384. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-extra.sh +14 -0
  385. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-zero.sh +7 -0
  386. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -1
  387. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/SPEC.md +30 -0
  388. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/check-qux.sh +13 -0
  389. package/payload/gate-sdk/gate-tests/check-gate-assertions.test.sh +117 -0
  390. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.knobs +2 -0
  391. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.knobs +2 -0
  392. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +6 -12
  393. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +5 -3
  394. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/TASK-QUEUE.md +3 -1
  395. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks.test.sh +4 -2
  396. package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +1 -1
  397. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/ci/build-artifact.sh +9 -0
  398. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/ci.yml +9 -0
  399. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +6 -2
  400. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kit-spec.md +6 -0
  401. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-nospec.sh +4 -0
  402. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-ungrounded.sh +5 -0
  403. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.knobs +5 -0
  404. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +8 -0
  405. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/ci/build-artifact.sh +9 -0
  406. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/ci.yml +16 -0
  407. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +6 -2
  408. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/kit-spec.md +12 -0
  409. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-held.sh +1 -0
  410. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.knobs +5 -0
  411. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +1 -1
  412. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +222 -197
  413. package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +7 -2
  414. package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +4 -0
  415. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +3 -1
  416. package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +1 -1
  417. package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +8 -8
  418. package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +2 -2
  419. package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +49 -14
  420. package/payload/gate-sdk/gate-tests/check-identity/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +4 -4
  421. package/payload/gate-sdk/gate-tests/check-identity/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +4 -4
  422. package/payload/gate-sdk/gate-tests/check-identity.test.sh +1 -1
  423. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-eta.sh +7 -0
  424. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-iota.sh +7 -0
  425. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-theta.sh +7 -0
  426. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-zeta.gate +3 -0
  427. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/smoke/install.sh +1 -1
  428. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/args +8 -5
  429. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/expect.txt +5 -0
  430. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/native/src/installer/recipe.rs +10 -0
  431. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
  432. package/payload/gate-sdk/gate-tests/check-install-disposition/good/args +8 -4
  433. package/payload/gate-sdk/gate-tests/check-install-disposition/good/expect.txt +2 -0
  434. package/payload/gate-sdk/gate-tests/check-install-disposition/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
  435. package/payload/gate-sdk/gate-tests/check-install-disposition/good/{alpha-kit → site-kit}/checks/check-alpha.sh +1 -1
  436. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-beta.gate +3 -0
  437. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-gamma.sh +6 -0
  438. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-omega.sh +7 -0
  439. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-psi.sh +7 -0
  440. package/payload/gate-sdk/gate-tests/check-install-disposition/good/{alpha-kit → site-kit}/smoke/install.sh +2 -2
  441. package/payload/gate-sdk/gate-tests/check-kit-registration/bad/registry-doc.md +15 -12
  442. package/payload/gate-sdk/gate-tests/check-kit-registration/good/args +7 -5
  443. package/payload/gate-sdk/gate-tests/check-kit-registration/good/scripts/gate-sdk-config.knobs +2 -0
  444. package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +2 -2
  445. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/args +5 -0
  446. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/expect.txt +1 -0
  447. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/checks/placeholder.txt +3 -0
  448. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/gate-tests/alpha.test.sh +3 -0
  449. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/lib/alpha.sh +3 -0
  450. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/checks/placeholder.txt +3 -0
  451. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/gate-tests/beta.test.sh +3 -0
  452. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/lib/beta.sh +3 -0
  453. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/gate-sdk/checks/placeholder.txt +3 -0
  454. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/gate-sdk/lib/gate.sh +3 -0
  455. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/scripts/gate-sdk-config.knobs +7 -0
  456. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/scripts/gates.list +3 -0
  457. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/args +7 -0
  458. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/expect.txt +1 -0
  459. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/checks/placeholder.txt +3 -0
  460. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/gate-tests/alpha.test.sh +3 -0
  461. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/lib/alpha.sh +3 -0
  462. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/checks/placeholder.txt +3 -0
  463. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/gate-tests/beta.test.sh +3 -0
  464. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/lib/beta.sh +3 -0
  465. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/gate-sdk/checks/placeholder.txt +3 -0
  466. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/gate-sdk/lib/gate.sh +3 -0
  467. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/scripts/gates.list +3 -0
  468. package/payload/gate-sdk/gate-tests/check-packed-links/bad/alpha-kit/README.md +5 -0
  469. package/payload/gate-sdk/gate-tests/check-packed-links/bad/args +5 -0
  470. package/payload/gate-sdk/gate-tests/check-packed-links/bad/beta-kit/README.md +5 -0
  471. package/payload/gate-sdk/gate-tests/check-packed-links/bad/expect.txt +2 -0
  472. package/payload/gate-sdk/gate-tests/check-packed-links/bad/scripts/gate-sdk-config.knobs +4 -0
  473. package/payload/gate-sdk/gate-tests/check-packed-links/good/alpha-kit/README.md +5 -0
  474. package/payload/gate-sdk/gate-tests/check-packed-links/good/args +8 -0
  475. package/payload/gate-sdk/gate-tests/check-packed-links/good/beta-kit/README.md +9 -0
  476. package/payload/gate-sdk/gate-tests/check-packed-links/good/expect.txt +1 -0
  477. package/payload/gate-sdk/gate-tests/check-packed-links/good/gamma-kit/SPEC.md +4 -0
  478. package/payload/gate-sdk/gate-tests/check-packed-links/good/scripts/gate-sdk-config.knobs +6 -0
  479. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/args +3 -0
  480. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/expect.txt +15 -0
  481. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/primitive.rs +19 -0
  482. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/producer.rs +8 -0
  483. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/walk.rs +13 -0
  484. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/bound-root.sh +5 -0
  485. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/case-arm.sh +6 -0
  486. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/commented.sh +5 -0
  487. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/common-dir.sh +4 -0
  488. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/glob-test.sh +4 -0
  489. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/late-anchor.sh +7 -0
  490. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/logical-readback.sh +5 -0
  491. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/probe.sh +7 -0
  492. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/two-root.sh +5 -0
  493. package/payload/gate-sdk/gate-tests/check-path-dialect/good/args +3 -0
  494. package/payload/gate-sdk/gate-tests/check-path-dialect/good/expect.txt +13 -0
  495. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/commented.rs +5 -0
  496. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/local.rs +12 -0
  497. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/namespace.rs +11 -0
  498. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/typed.rs +10 -0
  499. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/verdict.rs +5 -0
  500. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/walk.rs +24 -0
  501. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/anchored.sh +6 -0
  502. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/cd-only.sh +7 -0
  503. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/commented.sh +6 -0
  504. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/one-root.sh +4 -0
  505. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/probe.sh +8 -0
  506. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/rooted.sh +23 -0
  507. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/subshell.sh +6 -0
  508. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/two-line.sh +8 -0
  509. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/verdict.sh +7 -0
  510. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/args +4 -0
  511. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/expect.txt +6 -0
  512. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/scripts/gate-sdk-config.knobs +1 -0
  513. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/array-grep.sh +6 -0
  514. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/echo-max-count.sh +5 -0
  515. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/gate-tests/membership.test.sh +6 -0
  516. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/loop-head.sh +5 -0
  517. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/tests/relocated.test.sh +6 -0
  518. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/args +5 -0
  519. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/expect.txt +3 -0
  520. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/full-reader.sh +4 -0
  521. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/gate-tests/check-x/bad/violating.test.sh +6 -0
  522. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/gate-tests/clean.test.sh +8 -0
  523. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/loop-membership.sh +8 -0
  524. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/no-pipefail.sh +6 -0
  525. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/one-line-producer.sh +5 -0
  526. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/args +2 -0
  527. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/expect.txt +8 -0
  528. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/patterns.list +4 -0
  529. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/scripts/gate-sdk-config.knobs +4 -0
  530. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/empty-reason-verb +5 -0
  531. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/strings.ps1 +6 -0
  532. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/too-far-verb +5 -0
  533. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/undeclared-verb +3 -0
  534. package/payload/gate-sdk/gate-tests/check-portability-floor/good/args +2 -0
  535. package/payload/gate-sdk/gate-tests/check-portability-floor/good/expect.txt +1 -0
  536. package/payload/gate-sdk/gate-tests/check-portability-floor/good/patterns.list +5 -0
  537. package/payload/gate-sdk/gate-tests/check-portability-floor/good/scripts/gate-sdk-config.knobs +4 -0
  538. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/front.ps1 +7 -0
  539. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/plain-verb +5 -0
  540. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/portability-patterns.list +5 -0
  541. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/upgrade-verb +7 -0
  542. package/payload/gate-sdk/gate-tests/check-portability-floor.test.sh +154 -0
  543. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/demo-kit/checks/check-beta.gate +2 -0
  544. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/docs/roster.md +11 -0
  545. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/expect.txt +7 -0
  546. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-alpha.gate +2 -0
  547. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-gamma.gate +2 -0
  548. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-plain.gate +1 -0
  549. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/gate-sdk-config.knobs +3 -0
  550. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/gates.list +4 -0
  551. package/payload/gate-sdk/gate-tests/check-projection-roster/good/demo-kit/checks/check-beta.gate +2 -0
  552. package/payload/gate-sdk/gate-tests/check-projection-roster/good/docs/roster.md +16 -0
  553. package/payload/gate-sdk/gate-tests/check-projection-roster/good/expect.txt +1 -0
  554. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-alpha.gate +2 -0
  555. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-delta.gate +2 -0
  556. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-epsilon.gate +2 -0
  557. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-plain.gate +1 -0
  558. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/gate-sdk-config.knobs +4 -0
  559. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/gates.list +5 -0
  560. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.knobs +4 -0
  561. package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +1 -1
  562. package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.knobs +4 -0
  563. package/payload/gate-sdk/gate-tests/check-reads-couples/bad/expect.txt +1 -1
  564. package/payload/gate-sdk/gate-tests/check-reads-couples/bad/sandbox-gate.sh +4 -4
  565. package/payload/gate-sdk/gate-tests/check-reads-couples/good/sandbox-gate.sh +4 -4
  566. package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +25 -20
  567. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/alpha-kit/smoke/install.sh +1 -1
  568. package/payload/gate-sdk/gate-tests/{check-template-registry-parity/bad/scripts/gate-sdk-config.sh → check-smoke-entry-guard/bad/scripts/gate-sdk-config.knobs} +2 -3
  569. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/install.sh +1 -1
  570. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/violation.sh +1 -1
  571. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/args +1 -1
  572. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/beta-kit/smoke/install.sh +1 -1
  573. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.knobs +4 -0
  574. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/args +3 -1
  575. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/delegation-kit/templates/session-note.sh +6 -0
  576. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/expect.txt +1 -1
  577. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/session-note.sh +6 -0
  578. package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +1 -1
  579. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/args +2 -0
  580. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/drift-kit/templates/kpis.list +18 -0
  581. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/expect.txt +2 -0
  582. package/payload/gate-sdk/gate-tests/{check-smoke-entry-guard/bad/scripts/gate-sdk-config.sh → check-template-registry-parity/bad/scripts/gate-sdk-config.knobs} +2 -3
  583. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/args +3 -1
  584. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/drift-kit/templates/kpis.list +17 -0
  585. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/expect.txt +1 -1
  586. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.knobs +4 -0
  587. package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +5 -5
  588. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/expect.txt +6 -0
  589. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/patterns.list +4 -0
  590. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/accounts.txt +1 -0
  591. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/multi.txt +4 -0
  592. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/second-leak.txt +2 -0
  593. package/payload/gate-sdk/gate-tests/check-tree-terms/good/expect.txt +1 -1
  594. package/payload/gate-sdk/gate-tests/check-tree-terms/good/patterns.list +7 -0
  595. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/anchored.txt +5 -0
  596. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/handles.txt +2 -0
  597. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/msg-patterns.list +2 -0
  598. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/msg-patterns.local.list +3 -0
  599. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/worktrees/vendored-note.txt +3 -0
  600. package/payload/gate-sdk/gate-tests/check-tree-terms.test.sh +133 -0
  601. package/payload/gate-sdk/gate-tests/emit-arm-shape.test.sh +95 -0
  602. package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +10 -10
  603. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +10 -184
  604. package/payload/gate-sdk/gate-tests/reads-census.test.sh +96 -0
  605. package/payload/gate-sdk/gate-tests/run-arm-contract.test.sh +190 -0
  606. package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +64 -41
  607. package/payload/gate-sdk/gate-tests/run-for-path.test.sh +2 -2
  608. package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +121 -16
  609. package/payload/gate-sdk/gate-tests/run-gates-linked-worktree.test.sh +136 -0
  610. package/payload/gate-sdk/lib/gate.sh +231 -484
  611. package/payload/gate-sdk/lib/test-hermetic.sh +39 -9
  612. package/payload/gate-sdk/templates/check-skeleton.sh +3 -2
  613. package/payload/gate-sdk/templates/gates-workflow.yml +23 -10
  614. package/payload/gate-sdk/templates/msg-patterns.list +14 -5
  615. package/payload/gate-sdk/templates/portability-patterns.list +56 -0
  616. package/payload/guard-kit/README.md +43 -46
  617. package/payload/guard-kit/checks/check-door-binding.gate +3 -0
  618. package/payload/guard-kit/gate-tests/check-door-binding/bad/alpha-kit/README.md +6 -0
  619. package/payload/guard-kit/gate-tests/check-door-binding/bad/alpha-kit/templates/alpha-config.knobs +3 -0
  620. package/payload/guard-kit/gate-tests/check-door-binding/bad/args +5 -0
  621. package/payload/guard-kit/gate-tests/check-door-binding/bad/beta-kit/lib/beta.sh +6 -0
  622. package/payload/guard-kit/gate-tests/check-door-binding/bad/expect.txt +5 -0
  623. package/payload/guard-kit/gate-tests/check-door-binding/bad/scripts/gate-sdk-config.knobs +4 -0
  624. package/payload/guard-kit/gate-tests/check-door-binding/bad/scripts/guard-config.knobs +3 -0
  625. package/payload/guard-kit/gate-tests/check-door-binding/bad/site/banner.md +8 -0
  626. package/payload/guard-kit/gate-tests/check-door-binding/bad/site/landing.md +11 -0
  627. package/payload/guard-kit/gate-tests/check-door-binding/good/alpha-kit/README.md +8 -0
  628. package/payload/guard-kit/gate-tests/check-door-binding/good/alpha-kit/templates/settings-hooks.json +20 -0
  629. package/payload/guard-kit/gate-tests/check-door-binding/good/args +7 -0
  630. package/payload/guard-kit/gate-tests/check-door-binding/good/beta-kit/lib/beta.sh +6 -0
  631. package/payload/guard-kit/gate-tests/check-door-binding/good/expect.txt +1 -0
  632. package/payload/guard-kit/gate-tests/check-door-binding/good/scripts/gate-sdk-config.knobs +4 -0
  633. package/payload/guard-kit/gate-tests/check-door-binding/good/scripts/guard-config.knobs +3 -0
  634. package/payload/guard-kit/gate-tests/check-door-binding/good/site/mirror.md +12 -0
  635. package/payload/guard-kit/gate-tests/check-door-binding/good/site/register.md +24 -0
  636. package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +75 -17
  637. package/payload/guard-kit/gate-tests/consumer-rules.test.sh +189 -0
  638. package/payload/guard-kit/gate-tests/door-binding-corpus.test.sh +72 -0
  639. package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +48 -23
  640. package/payload/guard-kit/gate-tests/guard-config-knobs.test.sh +170 -0
  641. package/payload/guard-kit/gate-tests/rewrite.test.sh +73 -0
  642. package/payload/guard-kit/gate-tests/scan-prompts.test.sh +174 -8
  643. package/payload/guard-kit/gate-tests/scratch-run.test.sh +149 -13
  644. package/payload/guard-kit/gate-tests/worktree-confinement.test.sh +169 -0
  645. package/payload/guard-kit/guard-tests/background-cases.tsv +23 -0
  646. package/payload/guard-kit/guard-tests/cases.tsv +374 -38
  647. package/payload/guard-kit/guard-tests/powershell-background-cases.tsv +29 -0
  648. package/payload/guard-kit/guard-tests/powershell-cases.tsv +81 -0
  649. package/payload/guard-kit/templates/close-triage.md +15 -55
  650. package/payload/guard-kit/templates/guard-config.knobs +26 -0
  651. package/payload/guard-kit/templates/settings-allow.json +15 -0
  652. package/payload/guard-kit/templates/settings-hooks.json +5 -5
  653. package/payload/lifecycle-kit/README.md +48 -76
  654. package/payload/lifecycle-kit/checks/check-audit-roster.gate +3 -0
  655. package/payload/lifecycle-kit/checks/check-close-surfaces.gate +1 -1
  656. package/payload/lifecycle-kit/checks/check-dispatch-entry.gate +3 -0
  657. package/payload/lifecycle-kit/checks/check-gap-inbox-neutrality.gate +1 -1
  658. package/payload/lifecycle-kit/checks/check-lesson-disposition.gate +1 -1
  659. package/payload/lifecycle-kit/checks/check-lifecycle-registration.gate +1 -1
  660. package/payload/lifecycle-kit/checks/check-merge-attrs.gate +1 -1
  661. package/payload/lifecycle-kit/checks/check-scratch-citation.gate +1 -1
  662. package/payload/lifecycle-kit/checks/check-shim-restatement.gate +1 -1
  663. package/payload/lifecycle-kit/checks/check-skill-binding.gate +1 -1
  664. package/payload/lifecycle-kit/checks/check-stage-entry.gate +2 -2
  665. package/payload/lifecycle-kit/checks/check-stage-evidence.gate +1 -1
  666. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +2 -2
  667. package/payload/lifecycle-kit/checks/check-stamp-subject.gate +3 -0
  668. package/payload/lifecycle-kit/checks/check-survey-record.gate +2 -2
  669. package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +93 -18
  670. package/payload/lifecycle-kit/gate-tests/boundary-stage-journal.test.sh +196 -0
  671. package/payload/lifecycle-kit/gate-tests/boundary-worktree-refusal.test.sh +214 -0
  672. package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/args +2 -0
  673. package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/expect.txt +6 -0
  674. package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/roster.txt +34 -0
  675. package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/args +2 -0
  676. package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/expect.txt +1 -0
  677. package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/roster.txt +22 -0
  678. package/payload/lifecycle-kit/gate-tests/check-audit-roster.test.sh +101 -0
  679. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.knobs +2 -0
  680. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/owners/worktrees/inbox.md +5 -0
  681. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.knobs +2 -0
  682. package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +21 -4
  683. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/args +6 -0
  684. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/expect.txt +1 -0
  685. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/head.txt +5 -0
  686. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/marker.txt +1 -0
  687. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/msg.txt +4 -0
  688. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/paths.txt +1 -0
  689. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/staged.txt +5 -0
  690. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/args +6 -0
  691. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/expect.txt +1 -0
  692. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/head.txt +5 -0
  693. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/marker.txt +1 -0
  694. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/msg.txt +4 -0
  695. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/paths.txt +2 -0
  696. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/staged.txt +6 -0
  697. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry.test.sh +60 -0
  698. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +1 -1
  699. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/bad/AGENT.md +1 -5
  700. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/good/AGENT.md +1 -5
  701. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +1 -1
  702. package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +2 -2
  703. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.knobs +2 -0
  704. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.knobs +2 -0
  705. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/worktrees/queue.md +13 -0
  706. package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +1 -1
  707. package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +1 -1
  708. package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +158 -11
  709. package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +27 -2
  710. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/align.md +4 -1
  711. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/build.md +4 -1
  712. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/close.md +5 -0
  713. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/scope.md +4 -1
  714. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/validate.md +1 -1
  715. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/expect.txt +1 -1
  716. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/align.md +4 -1
  717. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/build.md +4 -1
  718. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/close.md +4 -1
  719. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/scope.md +4 -1
  720. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/validate.md +4 -1
  721. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage.test.sh +73 -0
  722. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/args +4 -0
  723. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/expect.txt +1 -0
  724. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/head.txt +5 -0
  725. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/msg.txt +4 -0
  726. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/staged.txt +6 -0
  727. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/args +4 -0
  728. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/expect.txt +1 -0
  729. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/head.txt +5 -0
  730. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/msg.txt +4 -0
  731. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/staged.txt +7 -0
  732. package/payload/lifecycle-kit/gate-tests/check-stamp-subject.test.sh +59 -0
  733. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/expect.txt +3 -0
  734. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/record.md +24 -0
  735. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -1
  736. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +10 -0
  737. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +56 -5
  738. package/payload/lifecycle-kit/gate-tests/dispatch-marker.test.sh +152 -0
  739. package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +23 -48
  740. package/payload/lifecycle-kit/gate-tests/gap-inbox-route.test.sh +7 -5
  741. package/payload/lifecycle-kit/gate-tests/lead-journal-open.test.sh +119 -0
  742. package/payload/lifecycle-kit/gate-tests/preflight-valve.test.sh +170 -0
  743. package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +5 -3
  744. package/payload/lifecycle-kit/gate-tests/ruling-staleness.test.sh +89 -0
  745. package/payload/lifecycle-kit/gate-tests/stamp-before-write.test.sh +66 -0
  746. package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +12 -6
  747. package/payload/lifecycle-kit/templates/consult.md +9 -63
  748. package/payload/lifecycle-kit/templates/lead.md +143 -423
  749. package/payload/lifecycle-kit/templates/lifecycle-config.knobs +1 -0
  750. package/payload/lifecycle-kit/templates/release-sweep.md +6 -35
  751. package/payload/lifecycle-kit/templates/stages/align.md +14 -82
  752. package/payload/lifecycle-kit/templates/stages/build.md +30 -98
  753. package/payload/lifecycle-kit/templates/stages/close.md +21 -170
  754. package/payload/lifecycle-kit/templates/stages/scope.md +42 -167
  755. package/payload/lifecycle-kit/templates/stages/spec.md +31 -97
  756. package/payload/lifecycle-kit/templates/stages/validate.md +22 -59
  757. package/payload/lifecycle-kit/templates/upgrade.md +6 -37
  758. package/payload/queue-kit/README.md +33 -48
  759. package/payload/queue-kit/checks/check-deferred-board-tags.gate +3 -0
  760. package/payload/queue-kit/checks/check-queue-entry-budget.gate +2 -2
  761. package/payload/queue-kit/checks/check-queue-hygiene.gate +2 -2
  762. package/payload/queue-kit/checks/check-queue-prose-precondition.gate +1 -1
  763. package/payload/queue-kit/checks/check-queue-sections.gate +1 -1
  764. package/payload/queue-kit/checks/check-queue-slug-liveness.gate +2 -2
  765. package/payload/queue-kit/checks/check-queue-wrap.gate +2 -2
  766. package/payload/queue-kit/checks/check-roadmap-fresh.gate +3 -2
  767. package/payload/queue-kit/checks/check-tag-lead-line.gate +2 -2
  768. package/payload/queue-kit/checks/check-task-conservation.gate +1 -1
  769. package/payload/queue-kit/checks/check-task-names.gate +2 -2
  770. package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/TASK-QUEUE.md +41 -0
  771. package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/expect.txt +6 -0
  772. package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/widget-kit/README.md +3 -0
  773. package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/TASK-QUEUE.md +39 -0
  774. package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/expect.txt +1 -0
  775. package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/widget-kit/README.md +3 -0
  776. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +76 -31
  777. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +12 -4
  778. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.knobs +4 -0
  779. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +58 -19
  780. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/expect.txt +8 -4
  781. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.knobs +4 -0
  782. package/payload/queue-kit/gate-tests/check-queue-entry-budget.test.sh +124 -0
  783. package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/TASK-QUEUE.md +11 -1
  784. package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/expect.txt +2 -0
  785. package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +30 -11
  786. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/TASK-QUEUE.md +3 -1
  787. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/expect.txt +1 -0
  788. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/good/TASK-QUEUE.md +22 -6
  789. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/TASK-QUEUE.md +3 -1
  790. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/docs/page.md +1 -1
  791. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/expect.txt +3 -1
  792. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.knobs +1 -0
  793. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/TASK-QUEUE.md +6 -2
  794. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/page.md +3 -3
  795. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/worktrees/page.md +4 -0
  796. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.knobs +1 -0
  797. package/payload/queue-kit/gate-tests/check-queue-slug-liveness.test.sh +100 -0
  798. package/payload/queue-kit/gate-tests/check-queue-wrap/bad/TASK-QUEUE.md +3 -1
  799. package/payload/queue-kit/gate-tests/check-queue-wrap/good/TASK-QUEUE.md +20 -6
  800. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/TASK-QUEUE.md +15 -8
  801. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.knobs +5 -0
  802. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/TASK-QUEUE.md +13 -6
  803. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.knobs +5 -0
  804. package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/TASK-QUEUE.md +28 -7
  805. package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/expect.txt +10 -2
  806. package/payload/queue-kit/gate-tests/check-tag-lead-line/good/TASK-QUEUE.md +30 -8
  807. package/payload/queue-kit/gate-tests/check-task-names/bad/TASK-QUEUE.md +18 -3
  808. package/payload/queue-kit/gate-tests/check-task-names/bad/expect.txt +9 -0
  809. package/payload/queue-kit/gate-tests/check-task-names/good/TASK-QUEUE.md +20 -6
  810. package/payload/queue-kit/gate-tests/entry-history.test.sh +197 -0
  811. package/payload/queue-kit/gate-tests/queue-counts.test.sh +77 -73
  812. package/payload/queue-kit/gate-tests/queue-edges.test.sh +168 -87
  813. package/payload/queue-kit/gate-tests/queue-index.test.sh +30 -16
  814. package/payload/queue-kit/gate-tests/roadmap.test.sh +65 -58
  815. package/payload/queue-kit/templates/TASK-QUEUE.md +36 -23
  816. package/payload/queue-kit/templates/queue-config.knobs +1 -0
  817. package/payload/site-kit/README.md +26 -45
  818. package/payload/site-kit/checks/check-docs-cname-parity.gate +1 -1
  819. package/payload/site-kit/checks/check-docs-highlight-coverage.gate +4 -0
  820. package/payload/site-kit/checks/check-docs-liquid-parse.gate +3 -0
  821. package/payload/site-kit/checks/check-docs-render-fidelity.gate +3 -0
  822. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +1 -1
  823. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/scripts/site-config.knobs +2 -0
  824. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +2 -2
  825. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/scripts/site-config.knobs +2 -0
  826. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/docs/_layouts/default.html +11 -0
  827. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/expect.txt +4 -0
  828. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/scripts/highlight-tokens.list +7 -0
  829. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/scripts/site-config.knobs +3 -0
  830. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/docs/_layouts/default.html +14 -0
  831. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/expect.txt +1 -0
  832. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/scripts/highlight-tokens.list +7 -0
  833. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/scripts/site-config.knobs +1 -0
  834. package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/docs/_layouts/default.html +4 -0
  835. package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/docs/span.md +3 -0
  836. package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/expect.txt +2 -0
  837. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/_layouts/default.html +4 -0
  838. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/front.md +7 -0
  839. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/loop.md +5 -0
  840. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/plain.html +1 -0
  841. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/raw.md +3 -0
  842. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/search.json +4 -0
  843. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/expect.txt +1 -0
  844. package/payload/site-kit/gate-tests/check-docs-liquid-parse-parser.test.sh +62 -0
  845. package/payload/site-kit/gate-tests/check-docs-render-fidelity-batch.test.sh +40 -45
  846. package/payload/site-kit/gate-tests/check-docs-render-fidelity-foreign.test.sh +7 -4
  847. package/payload/site-kit/gate-tests/check-docs-render-fidelity-span.test.sh +7 -4
  848. package/payload/site-kit/gate-tests/check-docs-render-fidelity-table.test.sh +7 -4
  849. package/payload/site-kit/templates/site-health.yml +67 -4
  850. package/profiles.list +4 -5
  851. package/lib/common/digest.sh +0 -18
  852. package/lib/common/lock.sh +0 -75
  853. package/lib/common/profile.sh +0 -91
  854. package/lib/common/recipe.sh +0 -106
  855. package/lib/diff.sh +0 -66
  856. package/lib/doctor.sh +0 -164
  857. package/lib/init.sh +0 -428
  858. package/lib/uninstall.sh +0 -214
  859. package/lib/update.sh +0 -34
  860. package/payload/canon-kit/SPEC.md +0 -2129
  861. package/payload/canon-kit/checks/check-surface-duplication.sh +0 -106
  862. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +0 -6
  863. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +0 -6
  864. package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.sh +0 -10
  865. package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.sh +0 -10
  866. package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.sh +0 -6
  867. package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.sh +0 -6
  868. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.sh +0 -8
  869. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.sh +0 -8
  870. package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.sh +0 -4
  871. package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.sh +0 -4
  872. package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.sh +0 -8
  873. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.sh +0 -5
  874. package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.sh +0 -5
  875. package/payload/canon-kit/lib/spec.sh +0 -544
  876. package/payload/canon-kit/smoke/install.sh +0 -56
  877. package/payload/canon-kit/smoke/violation.sh +0 -22
  878. package/payload/canon-kit/templates/canon-config.sh +0 -2
  879. package/payload/context-kit/SPEC.md +0 -1123
  880. package/payload/context-kit/bin/always-loaded.sh +0 -70
  881. package/payload/context-kit/bin/env-probe.sh +0 -142
  882. package/payload/context-kit/bin/md-index.sh +0 -80
  883. package/payload/context-kit/bin/md-section.sh +0 -63
  884. package/payload/context-kit/bin/pub-index.sh +0 -90
  885. package/payload/context-kit/bin/run-index-tests.sh +0 -91
  886. package/payload/context-kit/gate-tests/check-footprint-fresh/good/args +0 -4
  887. package/payload/context-kit/gate-tests/check-footprint-fresh/good/emit.txt +0 -12
  888. package/payload/context-kit/gate-tests/check-footprint-fresh/good/projection.txt +0 -12
  889. package/payload/context-kit/index-tests/expected/toolfloor.txt +0 -23
  890. package/payload/context-kit/index-tests/toolfloor-cases.sh +0 -49
  891. package/payload/context-kit/lib/context.sh +0 -56
  892. package/payload/context-kit/lib/pub-lang/rust.sh +0 -26
  893. package/payload/context-kit/lib/pub-lang/ts.sh +0 -32
  894. package/payload/context-kit/lib/toolfloor.sh +0 -58
  895. package/payload/context-kit/smoke/agents-md.sh +0 -139
  896. package/payload/context-kit/smoke/install.sh +0 -64
  897. package/payload/context-kit/smoke/violation.sh +0 -21
  898. package/payload/context-kit/templates/context-config.sh +0 -2
  899. package/payload/delegation-kit/SPEC.md +0 -1712
  900. package/payload/delegation-kit/bin/run-budget-guard-tests.sh +0 -88
  901. package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +0 -97
  902. package/payload/delegation-kit/bin/run-trend-tests.sh +0 -63
  903. package/payload/delegation-kit/bin/run-usage-tests.sh +0 -226
  904. package/payload/delegation-kit/bin/usage-trend.sh +0 -120
  905. package/payload/delegation-kit/bin/usage-verdict.sh +0 -144
  906. package/payload/delegation-kit/lib/delegation.sh +0 -84
  907. package/payload/delegation-kit/smoke/install.sh +0 -63
  908. package/payload/delegation-kit/smoke/violation.sh +0 -16
  909. package/payload/delegation-kit/templates/agent-budget-guard.sh +0 -18
  910. package/payload/delegation-kit/templates/agent-dispatch-guard.sh +0 -61
  911. package/payload/delegation-kit/templates/delegation-config.sh +0 -6
  912. package/payload/delegation-kit/templates/statusline-usage.sh +0 -101
  913. package/payload/delegation-kit/templates/usage-poller.sh +0 -67
  914. package/payload/delegation-kit/usage-tests/budget-guard-cases.tsv +0 -20
  915. package/payload/doctrine-kit/SPEC.md +0 -385
  916. package/payload/doctrine-kit/bin/install-doctrine.sh +0 -194
  917. package/payload/doctrine-kit/bin/stage-rules.sh +0 -51
  918. package/payload/doctrine-kit/lib/doctrine.sh +0 -29
  919. package/payload/doctrine-kit/smoke/install.sh +0 -203
  920. package/payload/doctrine-kit/smoke/violation.sh +0 -13
  921. package/payload/drift-kit/SPEC.md +0 -1187
  922. package/payload/drift-kit/bin/drift-report.sh +0 -155
  923. package/payload/drift-kit/bin/kfric.sh +0 -61
  924. package/payload/drift-kit/bin/overhead-meter.sh +0 -106
  925. package/payload/drift-kit/bin/stage-economics.sh +0 -465
  926. package/payload/drift-kit/kpis/kpi-always-loaded.sh +0 -39
  927. package/payload/drift-kit/kpis/kpi-amendment-age.sh +0 -33
  928. package/payload/drift-kit/kpis/kpi-deferred-age.sh +0 -46
  929. package/payload/drift-kit/kpis/kpi-gate-backlog.sh +0 -52
  930. package/payload/drift-kit/kpis/kpi-gate-runtime.sh +0 -31
  931. package/payload/drift-kit/kpis/kpi-incident-recurrence.sh +0 -42
  932. package/payload/drift-kit/kpis/kpi-knowledge-friction.sh +0 -21
  933. package/payload/drift-kit/kpis/kpi-overhead.sh +0 -44
  934. package/payload/drift-kit/kpis/kpi-price-table-age.sh +0 -68
  935. package/payload/drift-kit/kpis/kpi-prompt-friction.sh +0 -38
  936. package/payload/drift-kit/kpis/kpi-queue-net-delta.sh +0 -74
  937. package/payload/drift-kit/kpis/kpi-settings-local.sh +0 -21
  938. package/payload/drift-kit/kpis/kpi-task-split.sh +0 -43
  939. package/payload/drift-kit/lib/drift.sh +0 -43
  940. package/payload/drift-kit/smoke/install.sh +0 -537
  941. package/payload/drift-kit/smoke/overhead-fixture.jsonl +0 -4
  942. package/payload/drift-kit/templates/drift-config.sh +0 -2
  943. package/payload/evidence-kit/SPEC.md +0 -740
  944. package/payload/evidence-kit/bin/diff-baseline.sh +0 -34
  945. package/payload/evidence-kit/bin/run-validate.sh +0 -124
  946. package/payload/evidence-kit/checks/check-producer-liveness.sh +0 -75
  947. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.sh +0 -7
  948. package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.sh +0 -7
  949. package/payload/evidence-kit/lib/evidence.sh +0 -193
  950. package/payload/evidence-kit/smoke/install.sh +0 -59
  951. package/payload/evidence-kit/smoke/violation.sh +0 -8
  952. package/payload/evidence-kit/templates/evidence-config.sh +0 -2
  953. package/payload/gate-sdk/SPEC.md +0 -10138
  954. package/payload/gate-sdk/bin/gen-pre-commit.sh +0 -297
  955. package/payload/gate-sdk/bin/install-hooks.sh +0 -60
  956. package/payload/gate-sdk/bin/port-blockers.sh +0 -473
  957. package/payload/gate-sdk/bin/run-consumer-smoke.sh +0 -239
  958. package/payload/gate-sdk/bin/run-gate-tests.sh +0 -179
  959. package/payload/gate-sdk/bin/upgrade-smoke.sh +0 -236
  960. package/payload/gate-sdk/checks/check-action-run-shell.sh +0 -223
  961. package/payload/gate-sdk/checks/check-crate-arms.sh +0 -62
  962. package/payload/gate-sdk/checks/check-gate-assertions.sh +0 -149
  963. package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +0 -397
  964. package/payload/gate-sdk/checks/check-install-disposition.sh +0 -93
  965. package/payload/gate-sdk/checks/check-shellcheck.sh +0 -57
  966. package/payload/gate-sdk/checks/check-tree-terms.sh +0 -67
  967. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.sh +0 -2
  968. package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.sh +0 -2
  969. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/args +0 -4
  970. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/emit.txt +0 -14
  971. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/projection.txt +0 -14
  972. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.sh +0 -2
  973. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.sh +0 -2
  974. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.sh +0 -6
  975. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/stub-bin +0 -3
  976. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.sh +0 -6
  977. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/stub-bin +0 -3
  978. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/installer/lib/common/recipe.sh +0 -9
  979. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-beta.gate +0 -3
  980. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-gamma.sh +0 -6
  981. package/payload/gate-sdk/gate-tests/check-install-disposition/good/installer/lib/common/recipe.sh +0 -10
  982. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +0 -5
  983. package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +0 -5
  984. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.sh +0 -5
  985. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.sh +0 -5
  986. package/payload/gate-sdk/gate-tests/declaration-lib-parity.test.sh +0 -211
  987. package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +0 -112
  988. package/payload/gate-sdk/lib/consumer-smoke.sh +0 -69
  989. package/payload/gate-sdk/lib/declaration.sh +0 -59
  990. package/payload/gate-sdk/lib/inject.sh +0 -80
  991. package/payload/gate-sdk/smoke/install.sh +0 -148
  992. package/payload/gate-sdk/smoke/violation.sh +0 -13
  993. package/payload/guard-kit/SPEC.md +0 -1063
  994. package/payload/guard-kit/bin/compare-settings-allow.sh +0 -91
  995. package/payload/guard-kit/bin/run-guard-tests.sh +0 -92
  996. package/payload/guard-kit/bin/scan-prompts.sh +0 -166
  997. package/payload/guard-kit/bin/scratch-run.sh +0 -34
  998. package/payload/guard-kit/gate-tests/guard-read-path.test.sh +0 -52
  999. package/payload/guard-kit/lib/guard.sh +0 -835
  1000. package/payload/guard-kit/smoke/install.sh +0 -26
  1001. package/payload/guard-kit/templates/bash-guard.sh +0 -18
  1002. package/payload/guard-kit/templates/escalation-guard.sh +0 -27
  1003. package/payload/guard-kit/templates/guard-config.sh +0 -5
  1004. package/payload/guard-kit/templates/wakeup-guard.sh +0 -20
  1005. package/payload/lifecycle-kit/SPEC.md +0 -2884
  1006. package/payload/lifecycle-kit/bin/cite-survey.sh +0 -81
  1007. package/payload/lifecycle-kit/bin/enter-stage.sh +0 -380
  1008. package/payload/lifecycle-kit/bin/file-gap.sh +0 -101
  1009. package/payload/lifecycle-kit/bin/file-survey.sh +0 -69
  1010. package/payload/lifecycle-kit/bin/install-lifecycle.sh +0 -36
  1011. package/payload/lifecycle-kit/bin/session-id.sh +0 -75
  1012. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.sh +0 -4
  1013. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.sh +0 -4
  1014. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.sh +0 -4
  1015. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.sh +0 -4
  1016. package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +0 -100
  1017. package/payload/lifecycle-kit/lib/stages.sh +0 -194
  1018. package/payload/lifecycle-kit/smoke/install.sh +0 -434
  1019. package/payload/lifecycle-kit/smoke/violation.sh +0 -8
  1020. package/payload/lifecycle-kit/templates/lifecycle-config.sh +0 -2
  1021. package/payload/lifecycle-kit/templates/workflow-state-guard.sh +0 -29
  1022. package/payload/queue-kit/SPEC.md +0 -1358
  1023. package/payload/queue-kit/bin/lesson-sink.sh +0 -28
  1024. package/payload/queue-kit/bin/queue-counts.sh +0 -35
  1025. package/payload/queue-kit/bin/queue-edges.sh +0 -78
  1026. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.sh +0 -6
  1027. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.sh +0 -6
  1028. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.sh +0 -3
  1029. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.sh +0 -3
  1030. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.sh +0 -6
  1031. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.sh +0 -6
  1032. package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +0 -215
  1033. package/payload/queue-kit/lib/queue.sh +0 -129
  1034. package/payload/queue-kit/smoke/install.sh +0 -25
  1035. package/payload/queue-kit/smoke/violation.sh +0 -8
  1036. package/payload/queue-kit/templates/queue-config.sh +0 -2
  1037. package/payload/site-kit/SPEC.md +0 -589
  1038. package/payload/site-kit/checks/check-docs-render-fidelity.sh +0 -242
  1039. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/scripts/site-config.sh +0 -7
  1040. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/scripts/site-config.sh +0 -7
  1041. package/payload/site-kit/lib/site.sh +0 -43
  1042. package/payload/site-kit/smoke/install.sh +0 -34
  1043. package/payload/site-kit/smoke/violation.sh +0 -20
  1044. /package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/{check-ported.gate → check-stage-entry.gate} +0 -0
@@ -1,59 +1,19 @@
1
- **Tooling-friction triage** — the recurring close-stage step that keeps the
2
- permission-friction loop a habit, not a one-off cleanup. Splice this in place
3
- of lifecycle-kit's `tooling-friction triage` placeholder (close skill, step 2).
1
+ **Tooling-friction triage** — the recurring close-stage step that keeps the permission-friction loop a habit, not a one-off cleanup. Splice this into lifecycle-kit's close `housekeeping` slot (step 4), the prompt-friction row's.
4
2
 
5
- 1. **Rank what nothing granted.** Run `bash guard-kit/bin/scan-prompts.sh` — it
6
- filters the friction log against the committed allowlist and the harness's
7
- built-in read-only auto-allows, then ranks the survivors by command pattern.
8
- 2. **Resolve each recurring pattern by the triage criterion** — never default
9
- to the allowlist:
10
- - **Allowlist** (`Bash(...)` in the committed settings) when the command is
11
- safe *and already in the form to reinforce* — static, glob-matched.
12
- - **Guard rule** when a *better form exists* (steer to it) or the decision
13
- needs logic a static glob cannot express.
14
- - **Habit change** (a noted convention) for a true one-off.
15
- Caution: an allowlist entry can *mask* a steering opportunity — before
16
- blessing a form, confirm it is the one to reinforce.
17
- **Diagnose before you reach for the allowlist.** A pattern can rank high while
18
- already being granted: an allowlist entry matches a *bare* command, so a call
19
- that chains (`&&`, `;`), redirects, or expands breaks the match and is decided
20
- out of band anyway. Check a ranked pattern against the committed allowlist first — if it is
21
- already there, the finding is (c) habit change, and adding coverage buys
22
- nothing while reading as a fix.
23
- 3. **Review the wakeup log** if the wakeup-guard is wired: read
24
- `.workflow/wakeup-attempts.log`, act on any surfaced intent, then delete it.
25
- 4. **Prune and narrow the local overlay.** Run
26
- `bash guard-kit/bin/compare-settings-allow.sh` — it reports two sets, and
27
- each has its own disposition.
28
- - **Redundant**: remove every listed `settings.local.json` entry (a committed
29
- glob already grants it).
30
- - **Too broad**: for every entry the breadth report names, either narrow the
31
- glob or record that its breadth is intended. The probe printed beside it is
32
- the witness — the command that glob auto-allows. An empty breadth report is
33
- not a proof of narrowness: probes are witnesses, and no completeness is
34
- claimed (the section is absent entirely when no probes are declared).
3
+ 1. **Rank what nothing granted.** Run `--emit capture-drain .workflow/prompt-friction.log` on the gate binary `GATE_SDK_NATIVE_BIN` names, then `--emit scan-prompts` over the path it printed — it filters the drain against the committed allowlist and the harness's built-in read-only auto-allows, then ranks the survivors by command pattern.
4
+ 2. **Resolve each recurring pattern by the triage criterion** — never default to the allowlist:
5
+ - **Allowlist** (`Bash(...)` in the committed settings) when the command is safe *and already in the form to reinforce* — static, glob-matched.
6
+ - **Guard rule** when a *better form exists* (steer to it) or the decision needs logic a static glob cannot express.
7
+ - **Habit change** (a noted convention) for a true one-off. Caution: an allowlist entry can *mask* a steering opportunity — before blessing a form, confirm it is the one to reinforce. **Diagnose before you reach for the allowlist.** A pattern can rank high while already being granted: an allowlist entry matches a *bare* command, so a call that chains (`&&`, `;`), redirects, or expands breaks the match and is decided out of band anyway. Check a ranked pattern against the committed allowlist first — if it is already there, the finding is (c) habit change, and adding coverage buys nothing while reading as a fix. A row in the PowerShell section takes the same criterion. Its allowlist entry is spelled `PowerShell(…)`, and its guard-rule disposition is a PowerShell reading of the generic rule it matches.
8
+ 3. **Review the wakeup log** if the wakeup-guard is wired: drain it with `--emit capture-drain .workflow/wakeup-attempts.log`, read the printed path, act on any surfaced intent, then rerun that with `--done`.
9
+ 4. **Prune and narrow the local overlay.** Run `--emit compare-settings-allow` on the same binary — it reports three sets, and each has its own disposition.
10
+ - **Redundant**: remove every listed `settings.local.json` entry (a committed glob already grants it).
11
+ - **Dead path**: remove every listed entry — it grants a script that does not exist.
12
+ - **Too broad**: for every entry the report lists as a *narrowing candidate*, either narrow the glob or record that its breadth is intended — as a `GUARD_KIT_BREADTH_DECLARED` entry (glob plus reason) in the committed `guard-config.knobs`, which moves it into the report's *declared intended* section and stops it re-reporting. A per-clone note does not: the ruling is durable only where it is tracked. The probe printed beside an entry is the witness — the command that glob auto-allows. An empty breadth report is not a proof of narrowness: probes are witnesses, and no completeness is claimed (the section is absent entirely when no probes are declared). Read the declared section too — it is the record of what was ruled, and a declaration whose glob is gone from the overlay is spent and should be dropped.
35
13
 
36
- - **Not content-pinned**: an entry naming a *script path* rather than a fixed
37
- command grants whatever that file says at run time, so its meaning changes
38
- whenever the file does — and a path under the gitignored scratch dir is
39
- rewritable by any session. Read the shape, not the literal: it reads as a
40
- specific command until one notices the target is writable. Such a run has a
41
- sanctioned form already — `bin/scratch-run.sh`, whose echo-at-execution is
42
- the compensating control (§scratch-run) — so route the run through the
43
- runner and remove the direct-path grant. Removing instances without applying
44
- this criterion re-arms for the next one.
14
+ - **Not content-pinned**: an entry naming a *script path* rather than a fixed command grants whatever that file says at run time, so its meaning changes whenever the file does — and a path under the gitignored scratch dir is rewritable by any session. Read the shape, not the literal: it reads as a specific command until one notices the target is writable. Such a run has a sanctioned form already — the `--scratch-run` arm, whose echo-at-execution is the compensating control (§scratch-run) — so route the run through the runner and remove the direct-path grant. Removing instances without applying this criterion re-arms for the next one.
45
15
 
46
- Then, by judgment, prune the remaining one-off exact-string local entries and
47
- promote recurring safe patterns to the committed `settings.json` as globs.
48
- Widening the committed set is the **consumer's** call, not the session's: an
49
- agent may propose a standing grant and may prune, but it does not widen its
50
- own auto-allow set on its own say-so.
51
- 5. **Clear the friction log** — its named reclaim path:
52
- `: > .workflow/prompt-friction.log`. Run each clear as its own bare command:
53
- the allowlist entry is an exact string, so compounding it (`&&`, `;`, a
54
- trailing `echo`/`wc`) breaks the match and buys the very out-of-band decision
55
- this step just triaged away.
16
+ Then, by judgment, prune the remaining one-off exact-string local entries and promote recurring safe patterns to the committed `settings.json` as globs. A high-impact edit waits for the **consumer's** explicit confirmation, and a session with no consumer present prepares the diff and hands it up; the impact classes are guard-kit/SPEC.md §compare-settings-allow's.
17
+ 5. **Clear the drained friction log** — its named reclaim path: `--emit capture-drain --done .workflow/prompt-friction.log`.
56
18
 
57
- Goal: the local set stays small, every durable pattern lives in the
58
- committed, reviewable allowlist, and no local glob auto-allows a command you
59
- declared bad.
19
+ Goal: the local set stays small, every durable pattern lives in the committed, reviewable allowlist, and no local glob auto-allows a command you declared bad.
@@ -0,0 +1,26 @@
1
+ # spec: guard-kit/SPEC.md §Layout and configuration — the knob roster (every knob, its default, when to set it) and the line grammar; the gate binary at `GATE_SDK_NATIVE_BIN` prints the defaults with `--emit knob-roster`; set only what you override
2
+
3
+ # spec: guard-kit/SPEC.md §compare-settings-allow — declare your own probes; the kit ships none
4
+ # GUARD_KIT_BREADTH_PROBES[] = Bash(rm -rf /)
5
+
6
+ # spec: guard-kit/SPEC.md §compare-settings-allow — a breadth ruled intended, keyed on the exact local allow-rule string; the kit ships no declarations either
7
+ # GUARD_KIT_BREADTH_DECLARED[Bash(mytool *)] = every subcommand is read-only
8
+
9
+ # spec: guard-kit/SPEC.md §check-door-binding — your own surfaces assertion C sweeps for undeclared doors, each a tracked file or a directory; the kit ships none, and with none set the assertion is inert
10
+ # GUARD_KIT_DOOR_ROOTS[] = README.md
11
+
12
+ # spec: guard-kit/SPEC.md §Layout and configuration — the dedicated search tools your harness build carries (default Glob and Grep); an empty line drops both, so rules `find_glob` and `git_grep` never steer at a tool the build lacks
13
+ # GUARD_KIT_SEARCH_TOOLS =
14
+
15
+ # spec: guard-kit/SPEC.md §The generic ruleset — declare the write and execute forms of each read-only roster member you add (rule `ro_pipeline`'s grammar, 'none' when it has none); an undeclared member is withheld, and an entry for a default member replaces the kit's declaration
16
+ # GUARD_KIT_RO_FORMS[md5sum] = none
17
+
18
+ # spec: guard-kit/SPEC.md §Consumer rules — your own rules, as a command the guard runs before its generic ruleset: one argv element per line, spawned without a shell; the kit ships none
19
+ # GUARD_KIT_CONSUMER_RULES_CMD[] = bash
20
+ # GUARD_KIT_CONSUMER_RULES_CMD[] = scripts/guard-rules.sh
21
+
22
+ # spec: guard-kit/SPEC.md §The generic ruleset — rule `worktree_confinement`'s admitted read from a linked worktree (default read-only); off admits none, leaving the harness's read tool the one route to a main-checkout file
23
+ # GUARD_KIT_WORKTREE_READS = off
24
+
25
+ # spec: guard-kit/SPEC.md §Layout and configuration — the PowerShell host the scratch runner hands a .ps1 body to (default empty, which is off); name pwsh or powershell, bare or as a path
26
+ # GUARD_KIT_SCRATCH_POWERSHELL = pwsh
@@ -0,0 +1,15 @@
1
+ {
2
+ "//": "guard-kit recommended allow entries — merge by hand into .claude/settings.json. Nothing merges it for you: review each entry against guard-kit/SPEC.md §The recommended allowlist first, then union the ones you accept into permissions.allow; never replace the array, which drops every grant you already have. Two doors are granted because two are spawned: the gate binary, which is what a session runs, and the shell front-end, which the fail-open hook wiring in settings-hooks.json still spawns and which a clone reaches before its first build. Replace @GATE_SDK_NATIVE_BIN@ with the value your gate-sdk-config.knobs gives that knob, spelled as a command (the binary prints it: --emit knob-values GATE_SDK_NATIVE_BIN). Left unreplaced the entry matches no command, so you meet a permission prompt rather than a silent grant.",
3
+ "permissions": {
4
+ "allow": [
5
+ "Bash(@GATE_SDK_NATIVE_BIN@ *)",
6
+ "Bash(bash gate-sdk/bin/run-gates.sh *)",
7
+ "Bash(git rm -q *)",
8
+ "Bash(echo *)",
9
+ "Bash(wc *)",
10
+ "Bash(grep *)",
11
+ "Bash(ls *)",
12
+ "Bash(command -v *)"
13
+ ]
14
+ }
15
+ }
@@ -1,23 +1,23 @@
1
1
  {
2
- "//": "guard-kit hook wiring — merge into .claude/settings.json. The bash-guard is the PreToolUse(Bash) hook; the wakeup-guard and the path-guard block are optional (drop a block to skip it). The third block shows the path-shaped guard shape guard_read_path serves — lifecycle-kit's workflow-state-guard is the shipped instance. Paths assume the guards were copied into scripts/.",
2
+ "//": "guard-kit hook wiring — merge into .claude/settings.json. The shell-guard is the PreToolUse(Bash|PowerShell) hook, a compiled gate-binary member; the wakeup-guard and the path-guard block are optional (drop a block to skip it). The third block shows the path-shaped guard shape lifecycle-kit's workflow-state-guard is the shipped instance of. Project rules go in a command named by GUARD_KIT_CONSUMER_RULES_CMD in your knob file, never a copied script. On native Windows the harness runs these commands under Git for Windows' bash, so the same wiring serves every host; the shell-guard reads both shell tools; a consumer rule command receives both, and reads `tool_name` to tell them apart.",
3
3
  "hooks": {
4
4
  "PreToolUse": [
5
5
  {
6
- "matcher": "Bash",
6
+ "matcher": "Bash|PowerShell",
7
7
  "hooks": [
8
- { "type": "command", "command": "bash scripts/bash-guard.sh" }
8
+ { "type": "command", "command": "bash gate-sdk/bin/run-gates.sh --hook shell-guard" }
9
9
  ]
10
10
  },
11
11
  {
12
12
  "matcher": "ScheduleWakeup|CronCreate",
13
13
  "hooks": [
14
- { "type": "command", "command": "bash scripts/wakeup-guard.sh" }
14
+ { "type": "command", "command": "bash gate-sdk/bin/run-gates.sh --hook wakeup-guard" }
15
15
  ]
16
16
  },
17
17
  {
18
18
  "matcher": "Write|Edit",
19
19
  "hooks": [
20
- { "type": "command", "command": "bash scripts/workflow-state-guard.sh" }
20
+ { "type": "command", "command": "bash gate-sdk/bin/run-gates.sh --hook workflow-state-guard" }
21
21
  ]
22
22
  }
23
23
  ]
@@ -1,29 +1,12 @@
1
1
  # lifecycle-kit
2
2
 
3
- The iteration stage state machine for coding-agent-assisted delivery: a
4
- `## Iteration: <name>` header line in the task queue naming the iteration, an
5
- evidence file of `<iteration> <stage> <session-id> <date> <head>` stamps whose
6
- **last stamp is the current stage** and whose `<head>` binds each stamp to the
7
- commit it was taken at, stage
8
- skills (scope/align/build/validate/close by default — stages are config), and
9
- gates that make skipping a stage, or claiming one without running
10
- its skill, fail the commit.
11
-
12
- Why: a stateless agent session doesn't reliably re-read process prose. So the
13
- process state lives in two files a gate can read, and every stage skill stamps
14
- its invocation as its first step (mechanized by
15
- `bin/enter-stage.sh <stage>`, so the misformat-prone hand ritual is one
16
- command). That stamp *is* the stage transition — there is no second copy of
17
- the cursor to keep in sync, and stage motion writes no queue at all.
18
- `check-stage-evidence` verifies the stamp file's grammar and that every stamp
19
- belongs to the header's iteration; `check-stage-entry` verifies the
20
- predecessor stamp, the drained queue at validate entry, and the
21
- cross-component audit trigger at build entry. See [SPEC.md](SPEC.md) for the
22
- full contracts.
23
-
24
- The linear stage walk is the default; the gate-legal ways to leave it —
25
- abandon, split, reopen — compose existing mechanism with no new tooling
26
- ([SPEC.md](SPEC.md) §Deviation transitions).
3
+ The iteration stage state machine for coding-agent-assisted delivery: stage skills, an evidence file of stamps whose **last stamp is the current stage**, and gates that fail the commit when a stage is skipped or claimed without running its skill. The stamp grammar, the queue's iteration header and the configurable stage roster are [SPEC.md](https://checkwright.dev/lifecycle-kit/SPEC) §The state machine's.
4
+
5
+ Why: a stateless agent session doesn't reliably re-read process prose. So the process state lives in two files a gate can read, and every stage skill stamps its invocation as its first step (mechanized by the `--enter-stage <stage>` arm on the gate binary `GATE_SDK_NATIVE_BIN` names, so the misformat-prone hand ritual is one command). That stamp *is* the stage transition — there is no second copy of the cursor to keep in sync, and stage motion writes no queue at all. `check-stage-evidence` verifies the stamp file's grammar and that every stamp belongs to the header's iteration; `check-stage-entry` verifies the predecessor stamp, the drained queue at validate entry, and, at build entry, the cross-component audit trigger and no unrun inferred-claim marker. See [SPEC.md](https://checkwright.dev/lifecycle-kit/SPEC) for the full contracts.
6
+
7
+ This file ships in the installer payload; what that payload withholds, and where this page's `SPEC.md` links then resolve, is gate-sdk/SPEC.md §Consumer payload.
8
+
9
+ The linear stage walk is the default; the gate-legal ways to leave it — abandon, split, reopen — compose existing mechanism with no new tooling ([SPEC.md](https://checkwright.dev/lifecycle-kit/SPEC) §Deviation transitions).
27
10
 
28
11
  ## Install
29
12
 
@@ -42,20 +25,18 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
42
25
  check-shim-restatement
43
26
  check-merge-attrs # multi-operator: needs the .gitattributes step (step 4)
44
27
  check-close-surfaces
45
- check-survey-record # inert until a survey is filed (bin/file-survey.sh)
28
+ check-survey-record # inert until a survey is filed (--emit file-survey)
29
+ check-audit-roster # inert until LIFECYCLE_KIT_AUDIT_ROSTER_FILE names a roster
46
30
  check-scratch-citation # no permanent surface points a reader into per-iteration scratch
47
- check-gap-inbox-neutrality # inert until a gap is filed (bin/file-gap.sh)
31
+ check-gap-inbox-neutrality # inert until a gap is filed (--emit file-gap)
32
+ check-stamp-subject # commit-msg tier: a stamp commit's subject scope is its stage
33
+ check-dispatch-entry # commit-msg tier: inert until a lead declares a dispatch (--enter-stage --dispatch)
48
34
  ```
49
35
  <!-- gate-roster:end -->
50
36
 
51
- They resolve through gate-sdk's registry path (your gates dir first, then
52
- each kit's `checks/`), and their `# graph:` manifests put them in the
53
- generated pre-commit hook: `bash gate-sdk/bin/gen-pre-commit.sh --write`.
37
+ They resolve through gate-sdk's registry path (your gates dir first, then each kit's `checks/`), and their `# graph:` manifests put them in the generated pre-commit hook (`check-stamp-subject` and `check-dispatch-entry` in the commit-msg hook), written by `--emit git-hooks --write` on the gate binary `GATE_SDK_NATIVE_BIN` names.
54
38
 
55
- 2. Give the queue file its header and each evidence file its skeleton — the
56
- stage-stamp file and the lesson-disposition file
57
- (`LIFECYCLE_KIT_LESSON_EVIDENCE_FILE`, both boundary-reset to their header).
58
- The queue header line:
39
+ 2. Give the queue file its header and each evidence file its skeleton — the stage-stamp file and the lesson-disposition file (`LIFECYCLE_KIT_LESSON_EVIDENCE_FILE`, both boundary-reset to their header). The queue header line:
59
40
 
60
41
  ## Iteration: —
61
42
 
@@ -69,50 +50,41 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
69
50
 
70
51
  # contract: lifecycle-kit/SPEC.md §check-lesson-disposition
71
52
 
72
- 3. Adopt `templates/stages/*.md` in your agent-skill directory (e.g.
73
- `.claude/commands/`): by default make each skill a binding shim that
74
- references the template (SPEC.md §templates/stages/) — it tracks the kit, so
75
- a re-vendor reaches it and the shim gates hold it thin. Or, as the sanctioned
76
- fork, copy each in and fill its named slots (`*<slot-name: …>*`) with your
77
- project's ritual — you then own the ritual prose, upgrades don't reach it,
78
- and the shim gates don't cover it (kept for legitimate structural
79
- divergence).
80
-
81
- 4. Point your always-loaded agent file at the machine — run
82
- `bash lifecycle-kit/bin/install-lifecycle.sh`. It writes a marker-bounded
83
- registration block (the state machine, the stage roster as skill
84
- invocations, the SPEC link) into `LIFECYCLE_KIT_AGENT_FILE` (default
85
- `CLAUDE.md`), the roster derived from your config so a reshape (step 5)
86
- flows in on a re-run. `check-lifecycle-registration` (step 1) holds the
87
- block in lockstep. The same run also writes the merge-attribute block into
88
- `.gitattributes` — a `merge=iteration-scoped` line per per-iteration state
89
- surface (these resolve to the arriving branch at a merge — SPEC.md
90
- §Multi-operator semantics) and a `merge=union` line for the committed gap
91
- inbox (its append-only bullets must survive a concurrent merge — SPEC.md §The
92
- committed gap inbox) — and registers the keep-ours driver in your clone's git
93
- config (per-clone, the `install-hooks.sh` opt-in class; the git-native union
94
- driver needs no such step). `check-merge-attrs` (step 1) holds the block in
95
- parity with the derived supersede and union sets.
96
-
97
- 5. Optional — narrow the hand-edit window: copy
98
- `templates/workflow-state-guard.sh` into your gates dir and register it as a
99
- `PreToolUse(Write|Edit)` hook (guard-kit's `templates/settings-hooks.json`
100
- carries the block). It refuses an agent write to the stage-stamp file, whose
101
- only sanctioned writer is `bin/enter-stage.sh` — the gates that would catch a
102
- hand-stamp all fire at commit, and an uncommitted one moves the cursor for a
103
- whole session (SPEC.md §check-stage-evidence). Requires guard-kit vendored.
104
-
105
- 6. Optional — reshape the machine: copy `templates/lifecycle-config.sh` into
106
- your gates dir and override stages, predecessors, drain/audit stages,
107
- section names, or file paths. Defaults are this repo's own lifecycle.
108
-
109
- After install the battery is red at `check-stage-evidence` until your first
110
- `/scope` session runs (it names the iteration and stamps the evidence file as
111
- its first step) — the bootstrap header is a stage like any other, fail-closed
112
- by design.
53
+ 3. Adopt `templates/stages/*.md` in your agent-skill directory (e.g. `.claude/commands/`): by default make each skill a binding shim that references the template (SPEC.md §templates/stages/) — it tracks the kit, so a re-vendor reaches it and the shim gates hold it thin. Or, as the sanctioned fork, copy each in and fill its named slots (`*<slot-name: …>*`) with your project's ritual — you then own the ritual prose, upgrades don't reach it, and the shim gates don't cover it (kept for legitimate structural divergence).
54
+
55
+ 4. Point your always-loaded agent file at the machine — run `--install-lifecycle` on the gate binary `GATE_SDK_NATIVE_BIN` names. It writes a marker-bounded registration block (the state machine, the stage roster as skill invocations, the SPEC link) into the file `LIFECYCLE_KIT_AGENT_FILE` names, the roster derived from your config so a reshape (step 5) flows in on a re-run. `check-lifecycle-registration` (step 1) holds the block in lockstep. The same run also writes the merge-attribute block into `.gitattributes` — a `merge=iteration-scoped` line per per-iteration state surface (these resolve to the arriving branch at a merge — SPEC.md §Multi-operator semantics) and a `merge=union` line for the committed gap inbox (its append-only bullets must survive a concurrent merge — SPEC.md §The committed gap inbox) — and registers the keep-ours driver in your clone's git config (per-clone, the `--install-hooks` opt-in class; the git-native union driver needs no such step). `check-merge-attrs` (step 1) holds the block in parity with the derived supersede and union sets.
56
+
57
+ 5. Optional — narrow the hand-edit window: register `bash gate-sdk/bin/run-gates.sh --hook workflow-state-guard` as a `PreToolUse(Write|Edit)` hook (guard-kit's `templates/settings-hooks.json` carries the block). It refuses an agent write to the stage-stamp file, whose only sanctioned writer is the `--enter-stage` arm — the gates that would catch a hand-stamp all fire at commit, and an uncommitted one moves the cursor for a whole session (SPEC.md §check-stage-evidence). With `LIFECYCLE_KIT_STAGE_SESSION_TYPES` set, it also refuses a dispatched stage session's write before that session's stamp. Requires guard-kit vendored.
58
+
59
+ 6. Optional — reshape the machine: copy `templates/lifecycle-config.knobs` into your gates dir and set stages, predecessors, drain/audit stages, section names, or file paths, one `NAME = value` or `NAME[] = element` line each. Defaults are this repo's own lifecycle; `--emit knob-roster` on the gate binary `GATE_SDK_NATIVE_BIN` names prints them.
60
+
61
+ After install the battery is red at `check-stage-evidence` until your first `/scope` session runs (it names the iteration and stamps the evidence file as its first step) — the bootstrap header is a stage like any other, fail-closed by design.
62
+
63
+ ## Use
64
+
65
+ Run these arms with the gate binary `GATE_SDK_NATIVE_BIN` names, where `init` places it. In PowerShell, spell each line `./scripts/checkwright-gates <arm>` at the repository root, with `.exe` on native Windows:
66
+
67
+ ```sh
68
+ gates="${GATE_SDK_NATIVE_BIN:-./scripts/checkwright-gates}"
69
+ "$gates" --enter-stage <stage> # stamp a stage entry (the transition itself)
70
+ "$gates" --install-lifecycle # (re)write the registration and merge-attribute blocks
71
+ "$gates" --emit file-gap "<gap>" # route a work-shaped finding to the gap inbox
72
+ "$gates" --emit file-survey "<question>" "<corpus>" "<oracle>" "<inferred>" "<finding>"
73
+ "$gates" --emit cite-survey "<heading-substring>" # one carried survey, inline-ready
74
+ "$gates" --emit session-id # the canonical stamp id, by the derivation order
75
+ "$gates" --emit ruling-staleness ["<ruling name>"…] # fired conditions, undeclared ones, citing sites
76
+ ```
77
+
78
+ `--emit session-id` is [SPEC.md](https://checkwright.dev/lifecycle-kit/SPEC) §bin/session-id.sh's derivation order, which `--enter-stage` reads for you: reach for it directly only where a session writes an id itself, as `templates/lead.md`'s session-role marker step does. It takes no argument and resolves no knob. **The front-end route reads the cwd `bin/run-gates.sh` cds to** — the git toplevel — so a caller standing elsewhere whose sessions dir is the cwd-slugged default invokes the binary's `--emit-session-id` arm directly instead, which is what `--enter-stage` does.
79
+
80
+ The two survey arms are the capture and citation affordances of [SPEC.md](https://checkwright.dev/lifecycle-kit/SPEC) §The survey record. `--` ends option processing for either, and a positional beginning with `-` without it, `--help` included, is a refusal that prints the arm's usage at exit 2 (gate-sdk/SPEC.md §The bin/-tool contract).
113
81
 
114
82
  ## Test
115
83
 
116
- ```bash
117
- bash gate-sdk/bin/run-gate-tests.sh lifecycle-kit/gate-tests lifecycle-kit/checks
84
+ Run this arm the same way:
85
+
86
+ <!-- fence-runnable -->
87
+ ```sh
88
+ gates="${GATE_SDK_NATIVE_BIN:-./scripts/checkwright-gates}"
89
+ "$gates" --run-gate-tests lifecycle-kit/gate-tests lifecycle-kit/checks
118
90
  ```
@@ -0,0 +1,3 @@
1
+ # graph: couples=knob:LIFECYCLE_KIT_AUDIT_ROSTER_FILE,knob:LIFECYCLE_KIT_QUEUE_FILE,knob:LIFECYCLE_KIT_STATE_FILE dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: lifecycle-kit/SPEC.md §check-audit-roster — every audit-roster block carries its grammar in order under the line cap, each class once, and a current-iteration last names a stage the state file stamped
@@ -1,3 +1,3 @@
1
- # graph: couples=.workflow/*,kit:SPEC.md,.claude/commands/*.md,.gitignore,native/src/gates/close_surfaces.rs,native/src/emit/close_surfaces.rs dir=one valve=none tier=precommit
1
+ # graph: couples=knob:GATE_SDK_WORKFLOW_DIR/*,kit:SPEC.md,knob:LIFECYCLE_KIT_CLOSE_SURFACE_GLOBS,.gitignore dir=one valve=none tier=precommit
2
2
  # install: on-surface
3
3
  # spec: lifecycle-kit/SPEC.md §check-close-surfaces — the derived close-surface roster is complete and moded: no undeclared capture surface, every declaration carries a mode with a well-formed forced= citation, every capture-tier declaration names a reclaim command
@@ -0,0 +1,3 @@
1
+ # graph: couples=native/src/gates/dispatch_entry.rs dir=one valve=none tier=commit-msg
2
+ # install: on-surface
3
+ # spec: lifecycle-kit/SPEC.md §check-dispatch-entry — while a lead-declared stage-session dispatch stands undischarged, a commit adds a stamp
@@ -1,3 +1,3 @@
1
- # graph: couples=.workflow/gap-inbox.md dir=one valve=none tier=precommit
1
+ # graph: couples=knob:LIFECYCLE_KIT_GAP_INBOX_FILE dir=one valve=none tier=precommit
2
2
  # install: on-surface
3
3
  # spec: lifecycle-kit/SPEC.md §check-gap-inbox-neutrality — the capture surface records observations: every bullet is '- <YYYY-MM-DD> — <prose>', and no bullet's prose opens with the retired 'recurrence of `<slug>`:' verdict
@@ -1,3 +1,3 @@
1
- # graph: couples=TASK-QUEUE.md,.workflow/lesson-evidence.txt dir=one valve=none tier=precommit
1
+ # graph: couples=knob:LIFECYCLE_KIT_QUEUE_FILE,knob:LIFECYCLE_KIT_LESSON_EVIDENCE_FILE dir=one valve=none tier=precommit
2
2
  # install: never
3
3
  # spec: lifecycle-kit/SPEC.md §check-lesson-disposition — every Lessons entry present at HEAD and gone from the worktree leaves a well-formed disposition stamp in the evidence file
@@ -1,3 +1,3 @@
1
- # graph: couples=CLAUDE.md,lifecycle-kit/lib/stages.sh dir=one valve=none tier=precommit
1
+ # graph: couples=knob:LIFECYCLE_KIT_AGENT_FILE,native/src/knobs/lifecycle_kit.rs dir=one valve=none tier=precommit
2
2
  # install: on-surface
3
3
  # spec: lifecycle-kit/SPEC.md §check-lifecycle-registration — the always-loaded agent file carries a lifecycle-kit marker block whose content byte-matches the block regenerated from the live stage machine, fail-closed when the target or a marker is missing
@@ -1,3 +1,3 @@
1
- # graph: couples=.gitattributes,lifecycle-kit/lib/stages.sh dir=one valve=none tier=precommit
1
+ # graph: couples=.gitattributes,native/src/knobs/lifecycle_kit.rs dir=one valve=none tier=precommit
2
2
  # install: on-surface
3
3
  # spec: lifecycle-kit/SPEC.md §check-merge-attrs — bidirectional parity between the derived iteration-scoped supersede set and the merge=iteration-scoped lines in .gitattributes (a smuggled ours-driver attribute on a path outside the set is the reverse-direction safety edge), plus forward-only parity for the derived union set (the gap inbox must carry merge=union; the git-native union driver is legitimate consumer usage elsewhere, so no reverse edge)
@@ -1,3 +1,3 @@
1
- # graph: couples=TASK-QUEUE.md,*/SPEC.md,kit:lib/stages.sh dir=one valve=none tier=precommit
1
+ # graph: couples=native/src/knobs/lifecycle_kit.rs,knob:LIFECYCLE_KIT_PERMANENT_SURFACE_GLOBS dir=one valve=none tier=precommit
2
2
  # install: on-surface
3
3
  # spec: lifecycle-kit/SPEC.md §check-scratch-citation — no permanent surface carries a retrieval pointer into a boundary-truncated one, because that pointer resolves to nothing at the next iteration boundary
@@ -1,3 +1,3 @@
1
- # graph: couples=.claude/commands/*.md,CLAUDE.md,kit:templates/*.md,lifecycle-kit/templates/stages/*.md dir=one valve=none tier=precommit
1
+ # graph: couples=knob:LIFECYCLE_KIT_SKILLS_DIR/*.md,knob:LIFECYCLE_KIT_AGENT_FILE,kit:templates/*.md dir=one valve=none tier=precommit
2
2
  # install: never
3
3
  # spec: lifecycle-kit/SPEC.md §check-shim-restatement — no binding shim shares an >=N-word normalized n-gram with the dedup corpus (CLAUDE.md + every kit's templates)
@@ -1,3 +1,3 @@
1
- # graph: couples=.claude/commands/*.md,lifecycle-kit/templates/stages/*.md,lifecycle-kit/templates/lead.md,lifecycle-kit/templates/release-sweep.md,lifecycle-kit/templates/upgrade.md,lifecycle-kit/templates/consult.md,delegation-kit/templates/agent-execution.md dir=one valve=none tier=precommit
1
+ # graph: couples=knob:LIFECYCLE_KIT_SKILLS_DIR/*.md,lifecycle-kit/templates/stages/*.md,lifecycle-kit/templates/lead.md,lifecycle-kit/templates/release-sweep.md,lifecycle-kit/templates/upgrade.md,lifecycle-kit/templates/consult.md,delegation-kit/templates/agent-execution.md dir=one valve=none tier=precommit
2
2
  # install: never
3
3
  # spec: lifecycle-kit/SPEC.md §check-skill-binding — every binding-shim skill names an existing template and binds exactly that template's slot set
@@ -1,3 +1,3 @@
1
- # graph: couples=TASK-QUEUE.md,.workflow/WORKFLOW-STATE.txt,SPEC.md,*/SPEC.md,*/*/SPEC.md,SPEC-*.md,*/SPEC-*.md,*/*/SPEC-*.md dir=one valve=none tier=precommit
1
+ # graph: couples=knob:LIFECYCLE_KIT_QUEUE_FILE,knob:LIFECYCLE_KIT_STATE_FILE,knob:LIFECYCLE_KIT_ROSTER_BASENAME,*/SPEC.md,*/*/SPEC.md,knob:LIFECYCLE_KIT_AMENDMENT_GLOB,*/SPEC-*.md,*/*/SPEC-*.md dir=one valve=none tier=precommit
2
2
  # install: on-surface
3
- # spec: lifecycle-kit/SPEC.md §check-stage-entry — prior-stage invocation-stamp ordering + drain-entry queue-empty + audit-trigger signal
3
+ # spec: lifecycle-kit/SPEC.md §check-stage-entry — prior-stage invocation-stamp ordering + drain-entry queue-empty + audit-trigger signal + inferred-claim residue and marker grammar in amendments and active queue entries
@@ -1,3 +1,3 @@
1
- # graph: couples=TASK-QUEUE.md,.workflow/WORKFLOW-STATE.txt dir=one valve=none tier=precommit
1
+ # graph: couples=knob:LIFECYCLE_KIT_QUEUE_FILE,knob:LIFECYCLE_KIT_STATE_FILE dir=one valve=none tier=precommit
2
2
  # install: on-surface
3
3
  # spec: lifecycle-kit/SPEC.md §check-stage-evidence — stamp grammar + name-axis agreement (staleness) between the header and every stamp; cross-stage session-id distinctness
@@ -1,3 +1,3 @@
1
- # graph: couples=.claude/commands/*.md dir=one valve=none tier=precommit
1
+ # graph: couples=knob:LIFECYCLE_KIT_SKILLS_DIR/*.md,lifecycle-kit/templates/stages/*.md dir=one valve=none tier=precommit
2
2
  # install: never
3
- # spec: lifecycle-kit/SPEC.md §check-stage-skill-coverage — the configured stage set and the skills dir cover each other: every stage has a skill, every enter-stage-invoking skill names a live stage
3
+ # spec: lifecycle-kit/SPEC.md §check-stage-skill-coverage — the configured stage set and the skills dir cover each other, and every stage's executed surface carries the resume-journal step's citation
@@ -0,0 +1,3 @@
1
+ # graph: couples=native/src/gates/stamp_subject.rs dir=one valve=none tier=commit-msg
2
+ # install: on-surface
3
+ # spec: lifecycle-kit/SPEC.md §check-stamp-subject — a commit adding a stamp line carries the last added stamp's stage as its subject scope, the subject --enter-stage prints
@@ -1,3 +1,3 @@
1
- # graph: couples=.workflow/survey-record.md dir=one valve=none tier=precommit
1
+ # graph: couples=knob:LIFECYCLE_KIT_SURVEY_RECORD_FILE dir=one valve=none tier=precommit
2
2
  # install: on-surface
3
- # spec: lifecycle-kit/SPEC.md §check-survey-record — every survey block carries its whole witness: the four keys in order, a full-sha rev naming a real commit, a non-empty corpus and a non-empty oracle
3
+ # spec: lifecycle-kit/SPEC.md §check-survey-record — every survey block carries its whole witness: the five keys in order, a full-sha rev naming a real commit, a non-empty corpus and a non-empty oracle and inferred
@@ -1,10 +1,12 @@
1
1
  #!/usr/bin/env bash
2
- # spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the boundary scratch wipe end-to-end through a sandboxed enter-stage: the iteration-boundary entry deletes the scratch dir's members, keeps the .gitkeep kit invariant and every LIFECYCLE_KIT_BOUNDARY_PRESERVE basename at any depth, names the wiped set in its report, and a non-boundary entry touches no scratch at all
2
+ # spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the boundary scratch wipe end-to-end through a sandboxed enter-stage: the iteration-boundary entry deletes the scratch dir's members, keeps the .gitkeep and lead-journal kit invariants and every LIFECYCLE_KIT_BOUNDARY_PRESERVE name at the scratch root only (a spared directory whole, a nested keep-name deleted with its ancestors), names the wiped set by immediate child rather than by the nested paths deleted to remove it, names each non-root keep-list entry in its report, raises the undisposed-journal advisory without blocking for every prior segment while exempting the live lead's, and a non-boundary entry wipes no scratch at all
3
3
  set -uo pipefail
4
4
  source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
5
5
 
6
- DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # lifecycle-kit/
7
- ENTER="$DIR/bin/enter-stage.sh"
6
+ # spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the second sanctioned caller: this harness
7
+ # drives the arm from a non-git sandbox cwd, which bin/run-gates.sh refuses by design (it cds to
8
+ # the git toplevel and a `mktemp -d` is no repository), so it resolves the binary through
9
+ # gate_arm_run rather than through that front-end.
8
10
  SANDBOX="$(mktemp -d)"
9
11
  trap 'rm -rf "$SANDBOX"' EXIT
10
12
 
@@ -13,7 +15,7 @@ note() { echo " FAIL [$1]: $2"; fails=$((fails + 1)); }
13
15
 
14
16
  seed() { # $1=sandbox subdir; writes a boundary-ready consumer with a populated scratch dir
15
17
  local sb="$1"
16
- mkdir -p "$sb/.workflow" "$sb/scratch/doomed-sub" "$sb/scratch/mixed-sub"
18
+ mkdir -p "$sb/.workflow" "$sb/scratch/doomed-sub" "$sb/scratch/mixed-sub" "$sb/scratch/x/y" "$sb/scratch/kept-dir/deep"
17
19
  cat >"$sb/TASK-QUEUE.md" <<'EOF'
18
20
  # TASK-QUEUE.md
19
21
 
@@ -37,22 +39,32 @@ demo-iteration build bbbbbbbb 2026-06-02 none
37
39
  demo-iteration validate cccccccc 2026-06-03 none
38
40
  demo-iteration close dddddddd 2026-06-04 none
39
41
  EOF
40
- cat >"$sb/lifecycle-config.sh" <<'EOF'
41
- # shellcheck shell=bash
42
- LIFECYCLE_KIT_BOUNDARY_PRESERVE=(keep-me)
42
+ cat >"$sb/lifecycle-config.knobs" <<'EOF'
43
+ LIFECYCLE_KIT_BOUNDARY_PRESERVE[] = keep-me
44
+ LIFECYCLE_KIT_BOUNDARY_PRESERVE[] = kept-dir
45
+ LIFECYCLE_KIT_BOUNDARY_PRESERVE[] = mixed-sub/keep-me
43
46
  EOF
44
47
  : >"$sb/scratch/.gitkeep"
45
48
  printf 'live\n' >"$sb/scratch/keep-me"
46
49
  printf 'stale\n' >"$sb/scratch/doomed.log"
47
50
  printf 'stale\n' >"$sb/scratch/doomed-sub/nested.txt"
48
- printf 'live\n' >"$sb/scratch/mixed-sub/keep-me"
51
+ printf 'stale\n' >"$sb/scratch/mixed-sub/keep-me"
52
+ : >"$sb/scratch/x/y/.gitkeep"
53
+ printf 'live\n' >"$sb/scratch/kept-dir/deep/file"
54
+ cat >"$sb/scratch/lead-journal.md" <<'EOF'
55
+ # lead journal
56
+
57
+ ## batch roster and tiering
58
+
59
+ prose the next lead would have to re-derive
60
+ EOF
49
61
  }
50
62
 
51
63
  run_enter() { # $1=sandbox subdir $2=stage
52
- ( cd "$1" && env LIFECYCLE_KIT_CONFIG_FILE="$1/lifecycle-config.sh" \
53
- GATE_SDK_TMP_DIR=scratch \
54
- LIFECYCLE_KIT_SESSION_ID=deadbeef01 \
55
- bash "$ENTER" "$2" 2>&1 )
64
+ ( cd "$1" && gate_env LIFECYCLE_KIT_KNOB_FILE="$1/lifecycle-config.knobs" \
65
+ GATE_SDK_TMP_DIR=scratch \
66
+ LIFECYCLE_KIT_SESSION_ID=deadbeef01 \
67
+ && gate_arm_run --enter-stage "$2" 2>&1 )
56
68
  }
57
69
 
58
70
  # --- the boundary entry wipes, keeping the invariant and the keep-list ---
@@ -63,16 +75,31 @@ out="$(run_enter "$bnd" scope)"; rc=$?
63
75
 
64
76
  [[ -f "$bnd/scratch/.gitkeep" ]] || note keep-invariant ".gitkeep was deleted (kit invariant)"
65
77
  [[ -f "$bnd/scratch/keep-me" ]] || note keep-listed "the PRESERVE member was deleted"
66
- [[ -f "$bnd/scratch/mixed-sub/keep-me" ]] || note keep-nested "a PRESERVE basename below the top level was deleted"
78
+ [[ -e "$bnd/scratch/mixed-sub" ]] && note wipe-nested-name "a keep-list basename below the scratch root was spared"
79
+ [[ -e "$bnd/scratch/x" ]] && note wipe-nested-gitkeep "a nested .gitkeep kept its ancestors alive"
80
+ [[ -f "$bnd/scratch/kept-dir/deep/file" ]] || note keep-dir-whole "a spared root directory was descended and emptied"
67
81
  [[ -e "$bnd/scratch/doomed.log" ]] && note wipe-file "an unlisted scratch file survived"
68
82
  [[ -e "$bnd/scratch/doomed-sub" ]] && note wipe-dir "an all-unlisted subdirectory survived"
69
83
  [[ -d "$bnd/scratch" ]] || note wipe-dir-self "the scratch dir itself was removed (members, not the dir)"
70
84
 
71
85
  grep -qF 'boundary-wiped from scratch' <<<"$out" || note report "the boundary report names no wiped set: $out"
72
86
  grep -qF 'doomed.log' <<<"$out" || note report-member "the report does not name the wiped file: $out"
73
- grep -qF 'scratch/keep-me' <<<"$out" && note report-kept "the report names a kept member as wiped: $out"
74
-
75
- # --- a non-boundary entry touches no scratch ---
87
+ wiped_line="$(grep -F 'boundary-wiped' <<<"$out")"
88
+ grep -qE 'scratch/keep-me( |$)' <<<"$wiped_line" && note report-kept "the report names a kept member as wiped: $out"
89
+ grep -qF 'kept-dir' <<<"$wiped_line" && note report-kept-dir "the report names the spared directory as wiped: $out"
90
+ grep -qF 'scratch/x' <<<"$wiped_line" || note report-nested "the report does not name the wiped x/ subtree by its own immediate name: $out"
91
+ grep -qF 'scratch/x/y/.gitkeep' <<<"$wiped_line" && note report-nested-leak "the report names a nested path rather than the immediate child that owns it: $out"
92
+ grep -qF 'nested.txt' <<<"$wiped_line" && note report-nested-file "the report names a file below an immediate child rather than the child itself: $out"
93
+ grep -qF "boundary-preserve entry 'mixed-sub/keep-me' is not a scratch-root name" <<<"$out" || note report-non-root "the non-root keep-list entry was not named: $out"
94
+ grep -qF 'boundary-wipe could not remove' <<<"$out" && note report-failed "a clean wipe reported a failed removal: $out"
95
+
96
+ # the lead journal is a kit invariant this consumer's keep-list never names, and an undisposed
97
+ # one is announced with its headings rather than refused
98
+ [[ -f "$bnd/scratch/lead-journal.md" ]] || note lead-journal-invariant "the lead journal was deleted though no keep-list names it"
99
+ grep -qF 'lead-journal.md' <<<"$out" || note lead-journal-advisory "no undisposed-journal advisory: $out"
100
+ grep -qF '## batch roster and tiering' <<<"$out" || note lead-journal-headings "the advisory printed no headings: $out"
101
+
102
+ # --- a non-boundary entry wipes no scratch ---
76
103
  non="$SANDBOX/nonboundary"
77
104
  seed "$non"
78
105
  before="$(find "$non/scratch" | sort)"
@@ -85,12 +112,60 @@ grep -qF 'boundary-wiped' <<<"$out" && note nonboundary-report "a non-boundary e
85
112
  # --- an unset keep-list still spares the invariant ---
86
113
  def="$SANDBOX/default-knob"
87
114
  seed "$def"
88
- : >"$def/lifecycle-config.sh"
115
+ : >"$def/lifecycle-config.knobs"
89
116
  out="$(run_enter "$def" scope)"; rc=$?
90
117
  [[ "$rc" -eq 0 ]] || note default-entry "want exit 0, got $rc -- $out"
91
118
  [[ -f "$def/scratch/.gitkeep" ]] || note default-invariant ".gitkeep was deleted under an empty keep-list"
92
119
  [[ -e "$def/scratch/keep-me" ]] && note default-wipe "an unset keep-list spared a member anyway"
120
+ [[ -f "$def/scratch/lead-journal.md" ]] || note default-lead-journal "the lead journal was deleted under an empty keep-list (kit invariant, not config)"
121
+
122
+ # --- a disposed journal survives and raises nothing ---
123
+ dis="$SANDBOX/disposed"
124
+ seed "$dis"
125
+ printf 'DISPOSED\n' >>"$dis/scratch/lead-journal.md"
126
+ out="$(run_enter "$dis" scope)"; rc=$?
127
+ [[ "$rc" -eq 0 ]] || note disposed-entry "want exit 0, got $rc -- $out"
128
+ [[ -f "$dis/scratch/lead-journal.md" ]] || note disposed-kept "a disposed lead journal was deleted"
129
+ grep -qF '## batch roster and tiering' <<<"$out" && note disposed-advisory "a disposed journal still raised the advisory: $out"
130
+
131
+ # --- the segment the live lead opened after the closing stamp is exempt ---
132
+ live_key='close dddddddd 2026-06-04 none'
133
+ liv="$SANDBOX/live"
134
+ seed "$liv"
135
+ printf '## lead-journal opened after %s\n\n## live roster\n\nprose\n' "$live_key" >"$liv/scratch/lead-journal.md"
136
+ out="$(run_enter "$liv" scope)"; rc=$?
137
+ [[ "$rc" -eq 0 ]] || note live-entry "want exit 0, got $rc -- $out"
138
+ [[ -f "$liv/scratch/lead-journal.md" ]] || note live-kept "the live lead's journal was deleted"
139
+ grep -qF 'is undisposed' <<<"$out" && note live-advisory "the live lead's own segment raised the advisory: $out"
140
+
141
+ # --- a prior undisposed segment before the live one is reported, and only its headings print ---
142
+ pri="$SANDBOX/prior-then-live"
143
+ seed "$pri"
144
+ printf '## lead-journal opened after close zzzzzzzz 2026-05-01 none\n\n## prior findings\n\nprose\n\n## lead-journal opened after %s\n\n## live roster\n' \
145
+ "$live_key" >"$pri/scratch/lead-journal.md"
146
+ out="$(run_enter "$pri" scope)"; rc=$?
147
+ [[ "$rc" -eq 0 ]] || note prior-entry "want exit 0, got $rc -- $out"
148
+ grep -qF 'is undisposed' <<<"$out" || note prior-advisory "an undisposed prior segment raised no advisory: $out"
149
+ grep -qF '## prior findings' <<<"$out" || note prior-headings "the prior segment's headings did not print: $out"
150
+ grep -qF 'opened after close zzzzzzzz' <<<"$out" || note prior-opening "the prior segment's opening heading did not print: $out"
151
+ grep -qF '## live roster' <<<"$out" && note prior-live-leak "the live segment's headings printed: $out"
152
+
153
+ # --- a lone segment keyed on an older stamp is prior ---
154
+ old="$SANDBOX/older-key"
155
+ seed "$old"
156
+ printf '## lead-journal opened after validate cccccccc 2026-06-03 none\n\n## stale roster\n' >"$old/scratch/lead-journal.md"
157
+ out="$(run_enter "$old" scope)"; rc=$?
158
+ [[ "$rc" -eq 0 ]] || note older-entry "want exit 0, got $rc -- $out"
159
+ grep -qF '## stale roster' <<<"$out" || note older-advisory "a segment keyed on an older stamp was read as live: $out"
160
+
161
+ # --- a heading-less journal keeps the whole-file test: a mid-file mark disposes nothing ---
162
+ hl="$SANDBOX/headingless"
163
+ seed "$hl"
164
+ printf '## early\nDISPOSED\n\n## late\nprose\n' >"$hl/scratch/lead-journal.md"
165
+ out="$(run_enter "$hl" scope)"; rc=$?
166
+ [[ "$rc" -eq 0 ]] || note headingless-entry "want exit 0, got $rc -- $out"
167
+ grep -qF '## late' <<<"$out" || note headingless-advisory "a heading-less journal whose last line is not the mark raised no advisory: $out"
93
168
 
94
169
  [[ "$fails" -eq 0 ]] || { echo "boundary-scratch-wipe.test: $fails assertion(s) failed"; exit 1; }
95
- echo "boundary-scratch-wipe.test: clean (boundary wipe keeps .gitkeep and every PRESERVE basename at any depth, reports the wiped set, and leaves non-boundary entries untouched)"
170
+ echo "boundary-scratch-wipe.test: clean (boundary wipe keeps .gitkeep, the lead journal and every PRESERVE name at the scratch root with a spared directory whole, deletes nested keep-names, reports the wiped set by immediate child, announces an undisposed prior segment without blocking and exempts the live one, and leaves non-boundary entries untouched)"
96
171
  exit 0