checkwright 0.25.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1057) hide show
  1. package/README.md +35 -1361
  2. package/bin/checkwright.ps1 +176 -0
  3. package/bin/checkwright.sh +187 -44
  4. package/package.json +15 -14
  5. package/payload/artifact/aarch64-apple-darwin/checkwright-gates +0 -0
  6. package/payload/artifact/aarch64-apple-darwin/checkwright-gates.sha256 +1 -0
  7. package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe +0 -0
  8. package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -0
  9. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates +0 -0
  10. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates.sha256 +1 -0
  11. package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates +0 -0
  12. package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates.sha256 +1 -0
  13. package/payload/artifact/targets.list +133 -24
  14. package/payload/artifact/x86_64-apple-darwin/checkwright-gates +0 -0
  15. package/payload/artifact/x86_64-apple-darwin/checkwright-gates.sha256 +1 -0
  16. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe +0 -0
  17. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -0
  18. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  19. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  20. package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates +0 -0
  21. package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates.sha256 +1 -0
  22. package/payload/canon-kit/README.md +25 -37
  23. package/payload/canon-kit/checks/check-amendment-queue.gate +2 -2
  24. package/payload/canon-kit/checks/check-amendment-retired-spelling.gate +3 -0
  25. package/payload/canon-kit/checks/check-amendment-update-target.gate +1 -1
  26. package/payload/canon-kit/checks/check-citation-link.gate +4 -0
  27. package/payload/canon-kit/checks/check-comment-tier.gate +1 -1
  28. package/payload/canon-kit/checks/check-deprecation-task.gate +2 -1
  29. package/payload/canon-kit/checks/check-docs-cmd.gate +2 -2
  30. package/payload/canon-kit/checks/check-docs-link-convention.gate +1 -1
  31. package/payload/canon-kit/checks/check-docs-page-repeat.gate +4 -0
  32. package/payload/canon-kit/checks/check-docs-restatement-parity.gate +4 -0
  33. package/payload/canon-kit/checks/check-fence-command-head.gate +3 -0
  34. package/payload/canon-kit/checks/check-fence-run.gate +3 -0
  35. package/payload/canon-kit/checks/check-install-claim.gate +2 -1
  36. package/payload/canon-kit/checks/check-knob-citation.gate +1 -1
  37. package/payload/canon-kit/checks/check-manifest-count.gate +1 -1
  38. package/payload/canon-kit/checks/check-manifest-temporal.gate +1 -1
  39. package/payload/canon-kit/checks/check-md-refs.gate +1 -1
  40. package/payload/canon-kit/checks/check-md-unwrapped.gate +3 -0
  41. package/payload/canon-kit/checks/check-measured-claim.gate +2 -1
  42. package/payload/canon-kit/checks/check-payload-claim.gate +2 -1
  43. package/payload/canon-kit/checks/check-prose-bounds.gate +3 -0
  44. package/payload/canon-kit/checks/check-prose-enum.gate +2 -1
  45. package/payload/canon-kit/checks/check-prose-tells.gate +1 -1
  46. package/payload/canon-kit/checks/check-provenance-seam.gate +3 -0
  47. package/payload/canon-kit/checks/check-spec-derivable-section.gate +1 -1
  48. package/payload/canon-kit/checks/check-spec-dod-singleton.gate +1 -1
  49. package/payload/canon-kit/checks/check-spec-embedded-source.gate +1 -1
  50. package/payload/canon-kit/checks/check-spec-fence-balance.gate +1 -1
  51. package/payload/canon-kit/checks/check-spec-pointer.gate +2 -2
  52. package/payload/canon-kit/checks/check-surface-duplication.gate +3 -0
  53. package/payload/canon-kit/checks/check-todo-task-liveness.gate +1 -1
  54. package/payload/canon-kit/checks/check-tracking-claim.gate +1 -1
  55. package/payload/canon-kit/checks/check-unmarked-claim.gate +2 -1
  56. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-tidy.md +3 -0
  57. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +37 -8
  58. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +6 -3
  59. package/payload/canon-kit/gate-tests/check-amendment-queue/good/SPEC-widget.md +7 -0
  60. package/payload/canon-kit/gate-tests/check-amendment-queue/good/TASK-QUEUE.md +11 -3
  61. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/SPEC-nosection.md +16 -0
  62. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/SPEC-thing.md +26 -0
  63. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/expect.txt +8 -0
  64. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/surface/one.md +4 -0
  65. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/surface/two.md +3 -0
  66. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/SPEC-tidy.md +20 -0
  67. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/SPEC-widget.md +37 -0
  68. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/component/README.md +4 -0
  69. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/component/SPEC.md +4 -0
  70. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/expect.txt +1 -0
  71. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/unnamed.md +4 -0
  72. package/payload/canon-kit/gate-tests/check-amendment-update-target.test.sh +1 -1
  73. package/payload/canon-kit/gate-tests/check-citation-link/bad/expect.txt +6 -0
  74. package/payload/canon-kit/gate-tests/check-citation-link/bad/scripts/canon-config.knobs +2 -0
  75. package/payload/canon-kit/gate-tests/check-citation-link/bad/site/page.md +13 -0
  76. package/payload/canon-kit/gate-tests/check-citation-link/good/expect.txt +1 -0
  77. package/payload/canon-kit/gate-tests/check-citation-link/good/scripts/canon-config.knobs +2 -0
  78. package/payload/canon-kit/gate-tests/check-citation-link/good/site/page.md +28 -0
  79. package/payload/canon-kit/gate-tests/check-comment-tier/bad/.github/workflows/ci.yml +15 -0
  80. package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +2 -0
  81. package/payload/canon-kit/gate-tests/check-comment-tier/bad/scripts/canon-config.knobs +2 -0
  82. package/payload/canon-kit/gate-tests/check-comment-tier/good/.github/workflows/ci.yml +23 -0
  83. package/payload/canon-kit/gate-tests/check-comment-tier/good/config.yml +2 -0
  84. package/payload/canon-kit/gate-tests/check-comment-tier/good/expect.txt +1 -1
  85. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +1 -1
  86. package/payload/canon-kit/gate-tests/check-comment-tier/good/scripts/canon-config.knobs +2 -0
  87. package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +37 -26
  88. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/TASK-QUEUE.md +3 -1
  89. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.knobs +2 -0
  90. package/payload/canon-kit/gate-tests/check-deprecation-task/good/TASK-QUEUE.md +6 -2
  91. package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -1
  92. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.knobs +2 -0
  93. package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +12 -10
  94. package/payload/canon-kit/gate-tests/check-docs-cmd/good/doc.md +4 -1
  95. package/payload/canon-kit/gate-tests/check-docs-cmd.test.sh +61 -0
  96. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/expect.txt +3 -0
  97. package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +21 -2
  98. package/payload/canon-kit/gate-tests/check-docs-page-repeat/bad/expect.txt +2 -0
  99. package/payload/canon-kit/gate-tests/check-docs-page-repeat/bad/scripts/canon-config.knobs +2 -0
  100. package/payload/canon-kit/gate-tests/check-docs-page-repeat/bad/site/page.md +8 -0
  101. package/payload/canon-kit/gate-tests/check-docs-page-repeat/good/expect.txt +1 -0
  102. package/payload/canon-kit/gate-tests/check-docs-page-repeat/good/scripts/canon-config.knobs +2 -0
  103. package/payload/canon-kit/gate-tests/check-docs-page-repeat/good/site/page.md +24 -0
  104. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/expect.txt +2 -0
  105. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/kit/README.md +10 -0
  106. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/kit/index.md +11 -0
  107. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/scripts/canon-config.knobs +2 -0
  108. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/scripts/gate-sdk-config.knobs +2 -0
  109. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/expect.txt +1 -0
  110. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/kit/README.md +12 -0
  111. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/kit/index.md +13 -0
  112. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/scripts/canon-config.knobs +2 -0
  113. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/scripts/gate-sdk-config.knobs +2 -0
  114. package/payload/canon-kit/gate-tests/check-fence-command-head/bad/args +1 -0
  115. package/payload/canon-kit/gate-tests/check-fence-command-head/bad/doc.md +16 -0
  116. package/payload/canon-kit/gate-tests/check-fence-command-head/bad/expect.txt +5 -0
  117. package/payload/canon-kit/gate-tests/check-fence-command-head/good/args +1 -0
  118. package/payload/canon-kit/gate-tests/check-fence-command-head/good/bin/run.sh +3 -0
  119. package/payload/canon-kit/gate-tests/check-fence-command-head/good/doc.md +41 -0
  120. package/payload/canon-kit/gate-tests/check-fence-command-head/good/expect.txt +1 -0
  121. package/payload/canon-kit/gate-tests/check-fence-command-head/good/lib/tool.sh +5 -0
  122. package/payload/canon-kit/gate-tests/check-fence-command-head/good/scripts/canon-config.knobs +2 -0
  123. package/payload/canon-kit/gate-tests/check-fence-run/bad/args +1 -0
  124. package/payload/canon-kit/gate-tests/check-fence-run/bad/doc.md +32 -0
  125. package/payload/canon-kit/gate-tests/check-fence-run/bad/expect.txt +7 -0
  126. package/payload/canon-kit/gate-tests/check-fence-run/good/args +1 -0
  127. package/payload/canon-kit/gate-tests/check-fence-run/good/doc.md +31 -0
  128. package/payload/canon-kit/gate-tests/check-fence-run/good/expect.txt +1 -0
  129. package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.knobs +7 -0
  130. package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.knobs +7 -0
  131. package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +42 -7
  132. package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +1 -2
  133. package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
  134. package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +37 -8
  135. package/payload/canon-kit/gate-tests/check-manifest-count/bad/SPEC.md +3 -0
  136. package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +10 -0
  137. package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +6 -6
  138. package/payload/canon-kit/gate-tests/check-md-refs.test.sh +1 -1
  139. package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/doc.md +13 -0
  140. package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/expect.txt +4 -0
  141. package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/scripts/canon-config.knobs +2 -0
  142. package/payload/canon-kit/gate-tests/check-md-unwrapped/good/doc.md +45 -0
  143. package/payload/canon-kit/gate-tests/check-md-unwrapped/good/expect.txt +1 -0
  144. package/payload/canon-kit/gate-tests/check-md-unwrapped/good/scripts/canon-config.knobs +4 -0
  145. package/payload/canon-kit/gate-tests/check-measured-claim/bad/SPEC.md +3 -0
  146. package/payload/canon-kit/gate-tests/check-measured-claim/bad/expect.txt +1 -0
  147. package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.knobs +4 -0
  148. package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +8 -0
  149. package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.knobs +4 -0
  150. package/payload/canon-kit/gate-tests/check-measured-claim/good/worktrees/SPEC.md +12 -0
  151. package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +32 -13
  152. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.knobs +6 -0
  153. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.knobs +6 -0
  154. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/CLAUDE.md +9 -0
  155. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/SPEC.md +11 -0
  156. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/expect.txt +3 -0
  157. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/scripts/canon-config.knobs +3 -0
  158. package/payload/canon-kit/gate-tests/check-prose-bounds/good/CLAUDE.md +10 -0
  159. package/payload/canon-kit/gate-tests/check-prose-bounds/good/SPEC.md +27 -0
  160. package/payload/canon-kit/gate-tests/check-prose-bounds/good/expect.txt +1 -0
  161. package/payload/canon-kit/gate-tests/check-prose-bounds/good/scripts/canon-config.knobs +3 -0
  162. package/payload/canon-kit/gate-tests/check-prose-bounds.test.sh +98 -0
  163. package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.knobs +3 -0
  164. package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.knobs +3 -0
  165. package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +55 -25
  166. package/payload/canon-kit/gate-tests/check-prose-tells/bad/prose.md +2 -0
  167. package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.knobs +5 -0
  168. package/payload/canon-kit/gate-tests/check-prose-tells/good/prose.md +6 -0
  169. package/payload/canon-kit/gate-tests/check-prose-tells/good/scripts/{canon-config.sh → canon-config.knobs} +2 -5
  170. package/payload/canon-kit/gate-tests/check-prose-tells/good/worktrees/prose.md +17 -0
  171. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/TASK-QUEUE.md +15 -0
  172. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/expect.txt +8 -0
  173. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/canon-config.knobs +3 -0
  174. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/gate-sdk-config.knobs +2 -0
  175. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/lifecycle-config.knobs +12 -0
  176. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/widget-toolkit/SPEC.md +27 -0
  177. package/payload/canon-kit/gate-tests/check-provenance-seam/good/TASK-QUEUE.md +15 -0
  178. package/payload/canon-kit/gate-tests/check-provenance-seam/good/expect.txt +1 -0
  179. package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/canon-config.knobs +3 -0
  180. package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/gate-sdk-config.knobs +2 -0
  181. package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/lifecycle-config.knobs +12 -0
  182. package/payload/canon-kit/gate-tests/check-provenance-seam/good/widget-toolkit/SPEC.md +20 -0
  183. package/payload/canon-kit/gate-tests/check-provenance-seam.test.sh +136 -0
  184. package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +1 -1
  185. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/README.md +6 -0
  186. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/SPEC-widget.md +5 -0
  187. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.rs +2 -0
  188. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +4 -0
  189. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.knobs +6 -0
  190. package/payload/canon-kit/gate-tests/check-spec-pointer/good/README.md +15 -0
  191. package/payload/canon-kit/gate-tests/check-spec-pointer/good/SPEC-widget.md +10 -0
  192. package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -1
  193. package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.rs +2 -0
  194. package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.knobs +6 -0
  195. package/payload/canon-kit/gate-tests/check-spec-pointer/good/vendored-kit/notes.txt +4 -0
  196. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/TASK-QUEUE.md +3 -1
  197. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/TASK-QUEUE.md +9 -3
  198. package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +1 -1
  199. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/SPEC.md +3 -0
  200. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/expect.txt +1 -0
  201. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/scripts/canon-config.knobs +4 -0
  202. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/SPEC.md +3 -0
  203. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/scripts/canon-config.knobs +4 -0
  204. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/worktrees/SPEC.md +11 -0
  205. package/payload/canon-kit/gate-tests/check-unmarked-claim.test.sh +53 -28
  206. package/payload/canon-kit/templates/SPEC-amendment.md +46 -25
  207. package/payload/canon-kit/templates/canon-config.knobs +1 -0
  208. package/payload/context-kit/README.md +33 -61
  209. package/payload/context-kit/checks/check-brevity.gate +2 -2
  210. package/payload/context-kit/checks/check-footprint-fresh.gate +3 -2
  211. package/payload/context-kit/checks/check-memory-off.gate +1 -1
  212. package/payload/context-kit/checks/check-settings-paths.gate +2 -2
  213. package/payload/context-kit/checks/check-settings-pins.gate +1 -1
  214. package/payload/context-kit/checks/check-surface-ratchet.gate +3 -0
  215. package/payload/context-kit/gate-tests/check-brevity/bad/CLAUDE.md +9 -2
  216. package/payload/context-kit/gate-tests/check-brevity/bad/expect.txt +1 -0
  217. package/payload/context-kit/gate-tests/check-brevity/good/CLAUDE.md +9 -4
  218. package/payload/context-kit/gate-tests/check-brevity/good/expect.txt +1 -1
  219. package/payload/context-kit/gate-tests/check-brevity.test.sh +107 -24
  220. package/payload/context-kit/gate-tests/check-footprint-fresh/good/CLAUDE.md +6 -0
  221. package/payload/context-kit/gate-tests/check-footprint-fresh/good/demo-kit/SPEC.md +3 -0
  222. package/payload/context-kit/gate-tests/check-footprint-fresh/good/demo-kit/templates/guide.md +3 -0
  223. package/payload/context-kit/gate-tests/check-footprint-fresh/good/docs/footprint.md +32 -0
  224. package/payload/context-kit/gate-tests/check-memory-off/bad/scripts/{context-config.sh → context-config.knobs} +1 -3
  225. package/payload/context-kit/gate-tests/check-memory-off/good/scripts/{context-config.sh → context-config.knobs} +1 -3
  226. package/payload/context-kit/gate-tests/check-memory-off.test.sh +1 -1
  227. package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +2 -0
  228. package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +21 -0
  229. package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/run-gates.sh +4 -0
  230. package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +2 -1
  231. package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +48 -1
  232. package/payload/context-kit/gate-tests/check-settings-paths/good/tools/run-gates.sh +4 -0
  233. package/payload/context-kit/gate-tests/check-settings-pins.test.sh +1 -1
  234. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/CLAUDE.md +5 -0
  235. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/expect.txt +2 -0
  236. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/scripts/context-config.knobs +4 -0
  237. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/surface-ceiling.txt +2 -0
  238. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/templates/ungoverned.md +3 -0
  239. package/payload/context-kit/gate-tests/check-surface-ratchet/good/CLAUDE.md +3 -0
  240. package/payload/context-kit/gate-tests/check-surface-ratchet/good/expect.txt +1 -0
  241. package/payload/context-kit/gate-tests/check-surface-ratchet/good/scripts/context-config.knobs +4 -0
  242. package/payload/context-kit/gate-tests/check-surface-ratchet/good/surface-ceiling.txt +4 -0
  243. package/payload/context-kit/gate-tests/check-surface-ratchet/good/templates/held.md +4 -0
  244. package/payload/context-kit/gate-tests/check-surface-ratchet.test.sh +76 -0
  245. package/payload/context-kit/index-tests/corpus/baseline.txt +1 -1
  246. package/payload/context-kit/index-tests/corpus/surface.md +1 -6
  247. package/payload/context-kit/index-tests/expected/always-loaded.txt +1 -1
  248. package/payload/context-kit/templates/close-brevity.md +9 -28
  249. package/payload/context-kit/templates/context-config.knobs +1 -0
  250. package/payload/context-kit/templates/session-context.sh +44 -29
  251. package/payload/delegation-kit/README.md +35 -69
  252. package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +1 -1
  253. package/payload/delegation-kit/checks/check-gate-tamper.gate +1 -1
  254. package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +23 -2
  255. package/payload/delegation-kit/templates/agent-execution.md +23 -389
  256. package/payload/delegation-kit/templates/delegation-config.knobs +4 -0
  257. package/payload/delegation-kit/templates/dispatch-checklists.md +8 -45
  258. package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +33 -17
  259. package/payload/doctrine-kit/DOCTRINE.md +92 -458
  260. package/payload/doctrine-kit/README.md +24 -55
  261. package/payload/doctrine-kit/checks/check-doctrine-registration.gate +1 -1
  262. package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +48 -3
  263. package/payload/drift-kit/README.md +43 -89
  264. package/payload/drift-kit/templates/close-knowledge.md +7 -22
  265. package/payload/drift-kit/templates/drift-config.knobs +1 -0
  266. package/payload/drift-kit/templates/economics.md +10 -48
  267. package/payload/drift-kit/templates/kpi-deprecated-surface.sh +31 -9
  268. package/payload/drift-kit/templates/kpis.list +2 -1
  269. package/payload/drift-kit/templates/price-table.tsv +1 -1
  270. package/payload/evidence-kit/README.md +24 -43
  271. package/payload/evidence-kit/checks/check-battery-roster.gate +1 -1
  272. package/payload/evidence-kit/checks/check-evidence-baseline.gate +2 -2
  273. package/payload/evidence-kit/checks/check-evidence-manifest.gate +1 -1
  274. package/payload/evidence-kit/checks/check-producer-liveness.gate +3 -0
  275. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.knobs +7 -0
  276. package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.knobs +7 -0
  277. package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +7 -7
  278. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/TASK-QUEUE.md +3 -1
  279. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/args +1 -0
  280. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/expect.txt +2 -0
  281. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/scripts/evidence-config.knobs +4 -0
  282. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/validate-baseline.txt +1 -0
  283. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/TASK-QUEUE.md +3 -1
  284. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/args +1 -0
  285. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/scripts/evidence-config.knobs +3 -0
  286. package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +134 -14
  287. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/scripts/{evidence-config.sh → evidence-config.knobs} +3 -5
  288. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/scripts/{evidence-config.sh → evidence-config.knobs} +3 -5
  289. package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +5 -4
  290. package/payload/evidence-kit/gate-tests/diff-baseline-status.test.sh +128 -0
  291. package/payload/evidence-kit/gate-tests/evidence-lib.test.sh +51 -45
  292. package/payload/evidence-kit/gate-tests/pre-hook.test.sh +66 -0
  293. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +29 -16
  294. package/payload/evidence-kit/templates/evidence-config.knobs +1 -0
  295. package/payload/gate-sdk/README.md +48 -79
  296. package/payload/gate-sdk/bin/build-native.sh +27 -4
  297. package/payload/gate-sdk/bin/run-gates.ps1 +266 -0
  298. package/payload/gate-sdk/bin/run-gates.sh +53 -277
  299. package/payload/gate-sdk/checks/check-action-gh-repo.gate +1 -1
  300. package/payload/gate-sdk/checks/check-action-job-ref.gate +3 -0
  301. package/payload/gate-sdk/checks/check-action-permissions.gate +3 -0
  302. package/payload/gate-sdk/checks/check-action-pinning.gate +1 -1
  303. package/payload/gate-sdk/checks/check-action-run-path.gate +3 -0
  304. package/payload/gate-sdk/checks/check-action-run-shell.gate +3 -0
  305. package/payload/gate-sdk/checks/check-commit-msg.gate +2 -1
  306. package/payload/gate-sdk/checks/check-commit-subject.gate +1 -1
  307. package/payload/gate-sdk/checks/check-core-files.gate +1 -1
  308. package/payload/gate-sdk/checks/check-crate-arms.gate +3 -0
  309. package/payload/gate-sdk/checks/check-enforcement-fresh.gate +3 -2
  310. package/payload/gate-sdk/checks/check-exec-bit.gate +1 -1
  311. package/payload/gate-sdk/checks/check-front-end-fail-open.gate +3 -0
  312. package/payload/gate-sdk/checks/check-gate-assertions.gate +2 -2
  313. package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +1 -1
  314. package/payload/gate-sdk/checks/check-gate-exemption-tasks.gate +1 -1
  315. package/payload/gate-sdk/checks/check-gate-fail-closed.gate +1 -1
  316. package/payload/gate-sdk/checks/check-gate-fixture-coverage.gate +1 -1
  317. package/payload/gate-sdk/checks/check-gate-output.gate +1 -1
  318. package/payload/gate-sdk/checks/check-gate-substrate-parity.gate +3 -0
  319. package/payload/gate-sdk/checks/check-graph.gate +2 -1
  320. package/payload/gate-sdk/checks/check-hook-exec-bit.gate +1 -1
  321. package/payload/gate-sdk/checks/check-identity.gate +1 -1
  322. package/payload/gate-sdk/checks/check-install-disposition.gate +3 -0
  323. package/payload/gate-sdk/checks/check-kit-enum.gate +1 -1
  324. package/payload/gate-sdk/checks/check-kit-registration.gate +1 -1
  325. package/payload/gate-sdk/checks/check-kit-roots-dialect.gate +3 -0
  326. package/payload/gate-sdk/checks/check-packed-links.gate +3 -0
  327. package/payload/gate-sdk/checks/check-path-dialect.gate +3 -0
  328. package/payload/gate-sdk/checks/check-pipe-membership.gate +3 -0
  329. package/payload/gate-sdk/checks/check-portability-floor.gate +4 -0
  330. package/payload/gate-sdk/checks/check-projection-roster.gate +4 -0
  331. package/payload/gate-sdk/checks/check-reads-couples.gate +1 -1
  332. package/payload/gate-sdk/checks/check-root-tiering.gate +1 -1
  333. package/payload/gate-sdk/checks/check-shellcheck.gate +3 -0
  334. package/payload/gate-sdk/checks/check-template-copy-parity.gate +1 -1
  335. package/payload/gate-sdk/checks/check-tree-terms.gate +2 -1
  336. package/payload/gate-sdk/checks/check-workflow-tiering.gate +1 -1
  337. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/args +2 -0
  338. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/expect.txt +1 -0
  339. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/scripts/gate-sdk-config.knobs +1 -0
  340. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/tree/notes.md +3 -0
  341. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/tree/workflows/ci.yml +8 -0
  342. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/args +3 -0
  343. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/expect.txt +1 -0
  344. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/scripts/gate-sdk-config.knobs +1 -0
  345. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/tree/notes.md +3 -0
  346. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/tree/workflows/ci.yml +8 -0
  347. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/args +3 -0
  348. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/expect.txt +5 -0
  349. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/tree/workflows/empty-allowlist.yml +29 -0
  350. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/tree/workflows/gates.yml +25 -0
  351. package/payload/gate-sdk/gate-tests/check-action-permissions/good/args +5 -0
  352. package/payload/gate-sdk/gate-tests/check-action-permissions/good/expect.txt +1 -0
  353. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/action.yml +9 -0
  354. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/not-actions.yml +7 -0
  355. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/workflows/declared.yml +69 -0
  356. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/workflows/valves.yml +22 -0
  357. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/args +4 -0
  358. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/expect.txt +2 -0
  359. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/tree/scripts/present.sh +3 -0
  360. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/tree/workflows/ci.yml +14 -0
  361. package/payload/gate-sdk/gate-tests/check-action-run-path/good/args +5 -0
  362. package/payload/gate-sdk/gate-tests/check-action-run-path/good/expect.txt +1 -0
  363. package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/scripts/build.sh +3 -0
  364. package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/sub/scripts/inner.sh +3 -0
  365. package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/workflows/ci.yml +36 -0
  366. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/args +4 -2
  367. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/expect.txt +2 -0
  368. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/tree/workflows/runner-dialect.yml +36 -0
  369. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/args +3 -2
  370. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/expect.txt +1 -1
  371. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/tree/workflows/runner-dialect.yml +71 -0
  372. package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +102 -9
  373. package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/smoke/install.sh +1 -1
  374. package/payload/gate-sdk/gate-tests/check-assertion-strength/good/smoke/install.sh +1 -1
  375. package/payload/gate-sdk/gate-tests/check-assertion-strength.test.sh +55 -0
  376. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/expect.txt +1 -0
  377. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/msg.txt +4 -0
  378. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/patterns.list +5 -1
  379. package/payload/gate-sdk/gate-tests/check-commit-msg/good/msg.txt +7 -0
  380. package/payload/gate-sdk/gate-tests/check-commit-msg/good/patterns.list +5 -1
  381. package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +2 -2
  382. package/payload/gate-sdk/gate-tests/check-core-files.test.sh +1 -1
  383. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.knobs +3 -0
  384. package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.knobs +3 -0
  385. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/SPEC.md +3 -0
  386. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/checks/check-demo.gate +1 -0
  387. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/probe.conf +1 -0
  388. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/templates/guide.md +3 -0
  389. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/docs/enforcement.md +33 -0
  390. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/scripts/gate-sdk-config.knobs +1 -0
  391. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/scripts/gates.list +1 -0
  392. package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +1 -1
  393. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/args +3 -0
  394. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/expect.txt +2 -0
  395. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/gate-sdk/bin/run-gates.ps1 +5 -0
  396. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/gate-sdk/bin/run-gates.sh +9 -0
  397. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/args +4 -0
  398. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/expect.txt +1 -0
  399. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/gate-sdk/bin/run-gates.ps1 +5 -0
  400. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/gate-sdk/bin/run-gates.sh +9 -0
  401. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/SPEC.md +4 -1
  402. package/payload/gate-sdk/gate-tests/check-gate-assertions.test.sh +1 -1
  403. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.knobs +2 -0
  404. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.knobs +2 -0
  405. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +6 -12
  406. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +5 -3
  407. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/TASK-QUEUE.md +3 -1
  408. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks.test.sh +4 -2
  409. package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +1 -1
  410. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/ci/build-artifact.sh +9 -0
  411. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/ci.yml +9 -0
  412. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +4 -2
  413. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.knobs +5 -0
  414. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +6 -0
  415. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/ci/build-artifact.sh +9 -0
  416. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/ci.yml +16 -0
  417. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +7 -3
  418. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.knobs +5 -0
  419. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +1 -1
  420. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +222 -197
  421. package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +7 -2
  422. package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +4 -0
  423. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +3 -1
  424. package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +1 -1
  425. package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +8 -8
  426. package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +2 -2
  427. package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +49 -14
  428. package/payload/gate-sdk/gate-tests/check-identity/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +4 -4
  429. package/payload/gate-sdk/gate-tests/check-identity/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +4 -4
  430. package/payload/gate-sdk/gate-tests/check-identity.test.sh +1 -1
  431. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-eta.sh +7 -0
  432. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-iota.sh +7 -0
  433. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-theta.sh +7 -0
  434. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-zeta.gate +3 -0
  435. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/smoke/install.sh +1 -1
  436. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/args +8 -5
  437. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/expect.txt +5 -0
  438. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/native/src/installer/recipe.rs +10 -0
  439. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
  440. package/payload/gate-sdk/gate-tests/check-install-disposition/good/args +8 -4
  441. package/payload/gate-sdk/gate-tests/check-install-disposition/good/expect.txt +2 -0
  442. package/payload/gate-sdk/gate-tests/check-install-disposition/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
  443. package/payload/gate-sdk/gate-tests/check-install-disposition/good/{alpha-kit → site-kit}/checks/check-alpha.sh +1 -1
  444. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-beta.gate +3 -0
  445. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-gamma.sh +6 -0
  446. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-omega.sh +7 -0
  447. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-psi.sh +7 -0
  448. package/payload/gate-sdk/gate-tests/check-install-disposition/good/{alpha-kit → site-kit}/smoke/install.sh +2 -2
  449. package/payload/gate-sdk/gate-tests/check-kit-registration/bad/registry-doc.md +15 -12
  450. package/payload/gate-sdk/gate-tests/check-kit-registration/good/args +7 -5
  451. package/payload/gate-sdk/gate-tests/check-kit-registration/good/scripts/gate-sdk-config.knobs +2 -0
  452. package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +2 -2
  453. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/args +5 -0
  454. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/expect.txt +1 -0
  455. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/checks/placeholder.txt +3 -0
  456. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/gate-tests/alpha.test.sh +3 -0
  457. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/lib/alpha.sh +3 -0
  458. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/checks/placeholder.txt +3 -0
  459. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/gate-tests/beta.test.sh +3 -0
  460. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/lib/beta.sh +3 -0
  461. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/gate-sdk/checks/placeholder.txt +3 -0
  462. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/gate-sdk/lib/gate.sh +3 -0
  463. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/scripts/gate-sdk-config.knobs +7 -0
  464. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/scripts/gates.list +3 -0
  465. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/args +7 -0
  466. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/expect.txt +1 -0
  467. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/checks/placeholder.txt +3 -0
  468. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/gate-tests/alpha.test.sh +3 -0
  469. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/lib/alpha.sh +3 -0
  470. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/checks/placeholder.txt +3 -0
  471. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/gate-tests/beta.test.sh +3 -0
  472. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/lib/beta.sh +3 -0
  473. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/gate-sdk/checks/placeholder.txt +3 -0
  474. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/gate-sdk/lib/gate.sh +3 -0
  475. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/scripts/gates.list +3 -0
  476. package/payload/gate-sdk/gate-tests/check-packed-links/bad/alpha-kit/README.md +5 -0
  477. package/payload/gate-sdk/gate-tests/check-packed-links/bad/args +5 -0
  478. package/payload/gate-sdk/gate-tests/check-packed-links/bad/beta-kit/README.md +5 -0
  479. package/payload/gate-sdk/gate-tests/check-packed-links/bad/expect.txt +2 -0
  480. package/payload/gate-sdk/gate-tests/check-packed-links/bad/scripts/gate-sdk-config.knobs +4 -0
  481. package/payload/gate-sdk/gate-tests/check-packed-links/good/alpha-kit/README.md +5 -0
  482. package/payload/gate-sdk/gate-tests/check-packed-links/good/args +8 -0
  483. package/payload/gate-sdk/gate-tests/check-packed-links/good/beta-kit/README.md +9 -0
  484. package/payload/gate-sdk/gate-tests/check-packed-links/good/expect.txt +1 -0
  485. package/payload/gate-sdk/gate-tests/check-packed-links/good/gamma-kit/SPEC.md +4 -0
  486. package/payload/gate-sdk/gate-tests/check-packed-links/good/scripts/gate-sdk-config.knobs +6 -0
  487. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/args +3 -0
  488. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/expect.txt +15 -0
  489. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/primitive.rs +19 -0
  490. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/producer.rs +8 -0
  491. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/walk.rs +13 -0
  492. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/bound-root.sh +5 -0
  493. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/case-arm.sh +6 -0
  494. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/commented.sh +5 -0
  495. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/common-dir.sh +4 -0
  496. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/glob-test.sh +4 -0
  497. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/late-anchor.sh +7 -0
  498. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/logical-readback.sh +5 -0
  499. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/probe.sh +7 -0
  500. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/two-root.sh +5 -0
  501. package/payload/gate-sdk/gate-tests/check-path-dialect/good/args +3 -0
  502. package/payload/gate-sdk/gate-tests/check-path-dialect/good/expect.txt +13 -0
  503. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/commented.rs +5 -0
  504. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/local.rs +12 -0
  505. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/namespace.rs +11 -0
  506. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/typed.rs +10 -0
  507. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/verdict.rs +5 -0
  508. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/walk.rs +24 -0
  509. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/anchored.sh +6 -0
  510. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/cd-only.sh +7 -0
  511. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/commented.sh +6 -0
  512. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/one-root.sh +4 -0
  513. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/probe.sh +8 -0
  514. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/rooted.sh +23 -0
  515. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/subshell.sh +6 -0
  516. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/two-line.sh +8 -0
  517. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/verdict.sh +7 -0
  518. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/args +4 -0
  519. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/expect.txt +6 -0
  520. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/scripts/gate-sdk-config.knobs +1 -0
  521. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/array-grep.sh +6 -0
  522. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/echo-max-count.sh +5 -0
  523. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/gate-tests/membership.test.sh +6 -0
  524. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/loop-head.sh +5 -0
  525. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/tests/relocated.test.sh +6 -0
  526. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/args +5 -0
  527. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/expect.txt +3 -0
  528. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/full-reader.sh +4 -0
  529. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/gate-tests/check-x/bad/violating.test.sh +6 -0
  530. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/gate-tests/clean.test.sh +8 -0
  531. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/loop-membership.sh +8 -0
  532. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/no-pipefail.sh +6 -0
  533. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/one-line-producer.sh +5 -0
  534. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/args +2 -0
  535. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/expect.txt +8 -0
  536. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/patterns.list +4 -0
  537. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/scripts/gate-sdk-config.knobs +4 -0
  538. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/empty-reason-verb +5 -0
  539. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/strings.ps1 +6 -0
  540. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/too-far-verb +5 -0
  541. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/undeclared-verb +3 -0
  542. package/payload/gate-sdk/gate-tests/check-portability-floor/good/args +2 -0
  543. package/payload/gate-sdk/gate-tests/check-portability-floor/good/expect.txt +1 -0
  544. package/payload/gate-sdk/gate-tests/check-portability-floor/good/patterns.list +5 -0
  545. package/payload/gate-sdk/gate-tests/check-portability-floor/good/scripts/gate-sdk-config.knobs +4 -0
  546. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/front.ps1 +7 -0
  547. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/plain-verb +5 -0
  548. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/portability-patterns.list +5 -0
  549. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/upgrade-verb +7 -0
  550. package/payload/gate-sdk/gate-tests/check-portability-floor.test.sh +154 -0
  551. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/demo-kit/checks/check-beta.gate +2 -0
  552. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/docs/roster.md +11 -0
  553. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/expect.txt +7 -0
  554. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-alpha.gate +2 -0
  555. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-gamma.gate +2 -0
  556. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-plain.gate +1 -0
  557. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/gate-sdk-config.knobs +3 -0
  558. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/gates.list +4 -0
  559. package/payload/gate-sdk/gate-tests/check-projection-roster/good/demo-kit/checks/check-beta.gate +2 -0
  560. package/payload/gate-sdk/gate-tests/check-projection-roster/good/docs/roster.md +16 -0
  561. package/payload/gate-sdk/gate-tests/check-projection-roster/good/expect.txt +1 -0
  562. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-alpha.gate +2 -0
  563. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-delta.gate +2 -0
  564. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-epsilon.gate +2 -0
  565. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-plain.gate +1 -0
  566. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/gate-sdk-config.knobs +4 -0
  567. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/gates.list +5 -0
  568. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.knobs +4 -0
  569. package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +1 -1
  570. package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.knobs +4 -0
  571. package/payload/gate-sdk/gate-tests/check-reads-couples/bad/expect.txt +1 -1
  572. package/payload/gate-sdk/gate-tests/check-reads-couples/bad/sandbox-gate.sh +4 -4
  573. package/payload/gate-sdk/gate-tests/check-reads-couples/good/sandbox-gate.sh +4 -4
  574. package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +25 -20
  575. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/alpha-kit/smoke/install.sh +1 -1
  576. package/payload/gate-sdk/gate-tests/{check-template-registry-parity/bad/scripts/gate-sdk-config.sh → check-smoke-entry-guard/bad/scripts/gate-sdk-config.knobs} +2 -3
  577. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/install.sh +1 -1
  578. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/violation.sh +1 -1
  579. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/args +1 -1
  580. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/beta-kit/smoke/install.sh +1 -1
  581. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.knobs +4 -0
  582. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/args +3 -1
  583. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/delegation-kit/templates/session-note.sh +6 -0
  584. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/expect.txt +1 -1
  585. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/session-note.sh +6 -0
  586. package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +1 -1
  587. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/args +2 -0
  588. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/drift-kit/templates/kpis.list +18 -0
  589. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/expect.txt +2 -0
  590. package/payload/gate-sdk/gate-tests/{check-smoke-entry-guard/bad/scripts/gate-sdk-config.sh → check-template-registry-parity/bad/scripts/gate-sdk-config.knobs} +2 -3
  591. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/args +3 -1
  592. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/drift-kit/templates/kpis.list +17 -0
  593. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/expect.txt +1 -1
  594. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.knobs +4 -0
  595. package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +5 -5
  596. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/expect.txt +1 -0
  597. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/patterns.list +4 -0
  598. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/accounts.txt +1 -0
  599. package/payload/gate-sdk/gate-tests/check-tree-terms/good/expect.txt +1 -1
  600. package/payload/gate-sdk/gate-tests/check-tree-terms/good/patterns.list +5 -1
  601. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/anchored.txt +1 -0
  602. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/handles.txt +2 -0
  603. package/payload/gate-sdk/gate-tests/check-tree-terms.test.sh +44 -5
  604. package/payload/gate-sdk/gate-tests/emit-arm-shape.test.sh +95 -0
  605. package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +10 -10
  606. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +10 -184
  607. package/payload/gate-sdk/gate-tests/reads-census.test.sh +96 -0
  608. package/payload/gate-sdk/gate-tests/run-arm-contract.test.sh +190 -0
  609. package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +64 -41
  610. package/payload/gate-sdk/gate-tests/run-for-path.test.sh +2 -2
  611. package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +121 -16
  612. package/payload/gate-sdk/gate-tests/run-gates-linked-worktree.test.sh +136 -0
  613. package/payload/gate-sdk/lib/gate.sh +231 -484
  614. package/payload/gate-sdk/lib/test-hermetic.sh +39 -9
  615. package/payload/gate-sdk/templates/check-skeleton.sh +3 -2
  616. package/payload/gate-sdk/templates/gates-workflow.yml +16 -32
  617. package/payload/gate-sdk/templates/msg-patterns.list +14 -5
  618. package/payload/gate-sdk/templates/portability-patterns.list +56 -0
  619. package/payload/guard-kit/README.md +43 -47
  620. package/payload/guard-kit/checks/check-door-binding.gate +3 -0
  621. package/payload/guard-kit/gate-tests/check-door-binding/bad/alpha-kit/README.md +6 -0
  622. package/payload/guard-kit/gate-tests/check-door-binding/bad/alpha-kit/templates/alpha-config.knobs +3 -0
  623. package/payload/guard-kit/gate-tests/check-door-binding/bad/args +5 -0
  624. package/payload/guard-kit/gate-tests/check-door-binding/bad/beta-kit/lib/beta.sh +6 -0
  625. package/payload/guard-kit/gate-tests/check-door-binding/bad/expect.txt +5 -0
  626. package/payload/guard-kit/gate-tests/check-door-binding/bad/scripts/gate-sdk-config.knobs +4 -0
  627. package/payload/guard-kit/gate-tests/check-door-binding/bad/scripts/guard-config.knobs +3 -0
  628. package/payload/guard-kit/gate-tests/check-door-binding/bad/site/banner.md +8 -0
  629. package/payload/guard-kit/gate-tests/check-door-binding/bad/site/landing.md +11 -0
  630. package/payload/guard-kit/gate-tests/check-door-binding/good/alpha-kit/README.md +8 -0
  631. package/payload/guard-kit/gate-tests/check-door-binding/good/alpha-kit/templates/settings-hooks.json +20 -0
  632. package/payload/guard-kit/gate-tests/check-door-binding/good/args +7 -0
  633. package/payload/guard-kit/gate-tests/check-door-binding/good/beta-kit/lib/beta.sh +6 -0
  634. package/payload/guard-kit/gate-tests/check-door-binding/good/expect.txt +1 -0
  635. package/payload/guard-kit/gate-tests/check-door-binding/good/scripts/gate-sdk-config.knobs +4 -0
  636. package/payload/guard-kit/gate-tests/check-door-binding/good/scripts/guard-config.knobs +3 -0
  637. package/payload/guard-kit/gate-tests/check-door-binding/good/site/mirror.md +12 -0
  638. package/payload/guard-kit/gate-tests/check-door-binding/good/site/register.md +24 -0
  639. package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +40 -27
  640. package/payload/guard-kit/gate-tests/consumer-rules.test.sh +189 -0
  641. package/payload/guard-kit/gate-tests/door-binding-corpus.test.sh +72 -0
  642. package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +48 -23
  643. package/payload/guard-kit/gate-tests/guard-config-knobs.test.sh +170 -0
  644. package/payload/guard-kit/gate-tests/rewrite.test.sh +73 -0
  645. package/payload/guard-kit/gate-tests/scan-prompts.test.sh +174 -8
  646. package/payload/guard-kit/gate-tests/scratch-run.test.sh +150 -13
  647. package/payload/guard-kit/gate-tests/worktree-confinement.test.sh +169 -0
  648. package/payload/guard-kit/guard-tests/background-cases.tsv +14 -5
  649. package/payload/guard-kit/guard-tests/cases.tsv +360 -54
  650. package/payload/guard-kit/guard-tests/powershell-background-cases.tsv +29 -0
  651. package/payload/guard-kit/guard-tests/powershell-cases.tsv +81 -0
  652. package/payload/guard-kit/templates/close-triage.md +15 -62
  653. package/payload/guard-kit/templates/guard-config.knobs +26 -0
  654. package/payload/guard-kit/templates/settings-allow.json +15 -0
  655. package/payload/guard-kit/templates/settings-hooks.json +5 -5
  656. package/payload/lifecycle-kit/README.md +50 -76
  657. package/payload/lifecycle-kit/checks/check-audit-roster.gate +3 -0
  658. package/payload/lifecycle-kit/checks/check-close-surfaces.gate +1 -1
  659. package/payload/lifecycle-kit/checks/check-dispatch-entry.gate +3 -0
  660. package/payload/lifecycle-kit/checks/check-gap-inbox-neutrality.gate +1 -1
  661. package/payload/lifecycle-kit/checks/check-lesson-disposition.gate +1 -1
  662. package/payload/lifecycle-kit/checks/check-lifecycle-registration.gate +1 -1
  663. package/payload/lifecycle-kit/checks/check-merge-attrs.gate +1 -1
  664. package/payload/lifecycle-kit/checks/check-scratch-citation.gate +1 -1
  665. package/payload/lifecycle-kit/checks/check-shim-restatement.gate +1 -1
  666. package/payload/lifecycle-kit/checks/check-skill-binding.gate +1 -1
  667. package/payload/lifecycle-kit/checks/check-stage-entry.gate +2 -2
  668. package/payload/lifecycle-kit/checks/check-stage-evidence.gate +1 -1
  669. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +2 -2
  670. package/payload/lifecycle-kit/checks/check-stamp-subject.gate +3 -0
  671. package/payload/lifecycle-kit/checks/check-survey-record.gate +2 -2
  672. package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +98 -21
  673. package/payload/lifecycle-kit/gate-tests/boundary-stage-journal.test.sh +196 -0
  674. package/payload/lifecycle-kit/gate-tests/boundary-worktree-refusal.test.sh +214 -0
  675. package/payload/lifecycle-kit/gate-tests/capture-linked-worktree.test.sh +53 -0
  676. package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/args +2 -0
  677. package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/expect.txt +6 -0
  678. package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/roster.txt +34 -0
  679. package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/args +2 -0
  680. package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/expect.txt +1 -0
  681. package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/roster.txt +22 -0
  682. package/payload/lifecycle-kit/gate-tests/check-audit-roster.test.sh +101 -0
  683. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.knobs +2 -0
  684. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/owners/worktrees/inbox.md +5 -0
  685. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.knobs +2 -0
  686. package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +21 -4
  687. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/args +6 -0
  688. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/expect.txt +1 -0
  689. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/head.txt +5 -0
  690. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/marker.txt +1 -0
  691. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/msg.txt +4 -0
  692. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/paths.txt +1 -0
  693. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/staged.txt +5 -0
  694. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/args +6 -0
  695. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/expect.txt +1 -0
  696. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/head.txt +5 -0
  697. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/marker.txt +1 -0
  698. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/msg.txt +4 -0
  699. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/paths.txt +2 -0
  700. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/staged.txt +6 -0
  701. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry.test.sh +60 -0
  702. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +1 -1
  703. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/bad/AGENT.md +1 -5
  704. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/good/AGENT.md +1 -5
  705. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +1 -1
  706. package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +2 -2
  707. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.knobs +2 -0
  708. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.knobs +2 -0
  709. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/worktrees/queue.md +13 -0
  710. package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +1 -1
  711. package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +1 -1
  712. package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +165 -15
  713. package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +27 -2
  714. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/align.md +4 -1
  715. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/build.md +4 -1
  716. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/close.md +5 -0
  717. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/scope.md +4 -1
  718. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/validate.md +1 -1
  719. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/expect.txt +1 -1
  720. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/align.md +4 -1
  721. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/build.md +4 -1
  722. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/close.md +4 -1
  723. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/scope.md +4 -1
  724. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/validate.md +4 -1
  725. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage.test.sh +73 -0
  726. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/args +4 -0
  727. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/expect.txt +1 -0
  728. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/head.txt +5 -0
  729. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/msg.txt +4 -0
  730. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/staged.txt +6 -0
  731. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/args +4 -0
  732. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/expect.txt +1 -0
  733. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/head.txt +5 -0
  734. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/msg.txt +4 -0
  735. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/staged.txt +7 -0
  736. package/payload/lifecycle-kit/gate-tests/check-stamp-subject.test.sh +59 -0
  737. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/expect.txt +4 -0
  738. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/record.md +33 -2
  739. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -1
  740. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +19 -2
  741. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +66 -7
  742. package/payload/lifecycle-kit/gate-tests/dispatch-marker.test.sh +152 -0
  743. package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +23 -48
  744. package/payload/lifecycle-kit/gate-tests/gap-inbox-route.test.sh +7 -5
  745. package/payload/lifecycle-kit/gate-tests/lead-journal-open.test.sh +119 -0
  746. package/payload/lifecycle-kit/gate-tests/preflight-valve.test.sh +170 -0
  747. package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +5 -3
  748. package/payload/lifecycle-kit/gate-tests/ruling-staleness.test.sh +89 -0
  749. package/payload/lifecycle-kit/gate-tests/stamp-before-write.test.sh +77 -0
  750. package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +12 -6
  751. package/payload/lifecycle-kit/templates/consult.md +9 -63
  752. package/payload/lifecycle-kit/templates/lead.md +147 -431
  753. package/payload/lifecycle-kit/templates/lifecycle-config.knobs +1 -0
  754. package/payload/lifecycle-kit/templates/release-sweep.md +6 -35
  755. package/payload/lifecycle-kit/templates/stages/align.md +14 -82
  756. package/payload/lifecycle-kit/templates/stages/build.md +30 -98
  757. package/payload/lifecycle-kit/templates/stages/close.md +21 -170
  758. package/payload/lifecycle-kit/templates/stages/scope.md +42 -167
  759. package/payload/lifecycle-kit/templates/stages/spec.md +31 -97
  760. package/payload/lifecycle-kit/templates/stages/validate.md +22 -59
  761. package/payload/lifecycle-kit/templates/upgrade.md +6 -37
  762. package/payload/queue-kit/README.md +33 -48
  763. package/payload/queue-kit/checks/check-deferred-board-tags.gate +3 -0
  764. package/payload/queue-kit/checks/check-queue-entry-budget.gate +2 -2
  765. package/payload/queue-kit/checks/check-queue-hygiene.gate +2 -2
  766. package/payload/queue-kit/checks/check-queue-prose-precondition.gate +1 -1
  767. package/payload/queue-kit/checks/check-queue-sections.gate +1 -1
  768. package/payload/queue-kit/checks/check-queue-slug-liveness.gate +2 -2
  769. package/payload/queue-kit/checks/check-queue-wrap.gate +2 -2
  770. package/payload/queue-kit/checks/check-roadmap-fresh.gate +3 -2
  771. package/payload/queue-kit/checks/check-tag-lead-line.gate +2 -2
  772. package/payload/queue-kit/checks/check-task-conservation.gate +1 -1
  773. package/payload/queue-kit/checks/check-task-names.gate +2 -2
  774. package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/TASK-QUEUE.md +41 -0
  775. package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/expect.txt +6 -0
  776. package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/widget-kit/README.md +3 -0
  777. package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/TASK-QUEUE.md +39 -0
  778. package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/expect.txt +1 -0
  779. package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/widget-kit/README.md +3 -0
  780. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +76 -31
  781. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +12 -4
  782. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.knobs +4 -0
  783. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +58 -19
  784. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/expect.txt +8 -4
  785. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.knobs +4 -0
  786. package/payload/queue-kit/gate-tests/check-queue-entry-budget.test.sh +124 -0
  787. package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/TASK-QUEUE.md +11 -1
  788. package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/expect.txt +2 -0
  789. package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +30 -11
  790. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/TASK-QUEUE.md +3 -1
  791. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/expect.txt +1 -0
  792. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/good/TASK-QUEUE.md +22 -6
  793. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/TASK-QUEUE.md +3 -1
  794. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/docs/page.md +1 -1
  795. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/expect.txt +3 -1
  796. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.knobs +1 -0
  797. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/TASK-QUEUE.md +6 -2
  798. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/page.md +3 -3
  799. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/worktrees/page.md +4 -0
  800. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.knobs +1 -0
  801. package/payload/queue-kit/gate-tests/check-queue-slug-liveness.test.sh +100 -0
  802. package/payload/queue-kit/gate-tests/check-queue-wrap/bad/TASK-QUEUE.md +3 -1
  803. package/payload/queue-kit/gate-tests/check-queue-wrap/good/TASK-QUEUE.md +20 -6
  804. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/TASK-QUEUE.md +15 -8
  805. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.knobs +5 -0
  806. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/TASK-QUEUE.md +13 -6
  807. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.knobs +5 -0
  808. package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/TASK-QUEUE.md +28 -7
  809. package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/expect.txt +10 -2
  810. package/payload/queue-kit/gate-tests/check-tag-lead-line/good/TASK-QUEUE.md +30 -8
  811. package/payload/queue-kit/gate-tests/check-task-names/bad/TASK-QUEUE.md +18 -3
  812. package/payload/queue-kit/gate-tests/check-task-names/bad/expect.txt +9 -0
  813. package/payload/queue-kit/gate-tests/check-task-names/good/TASK-QUEUE.md +20 -6
  814. package/payload/queue-kit/gate-tests/entry-history.test.sh +197 -0
  815. package/payload/queue-kit/gate-tests/queue-counts.test.sh +77 -73
  816. package/payload/queue-kit/gate-tests/queue-edges.test.sh +168 -87
  817. package/payload/queue-kit/gate-tests/queue-index.test.sh +30 -16
  818. package/payload/queue-kit/gate-tests/roadmap.test.sh +65 -58
  819. package/payload/queue-kit/templates/TASK-QUEUE.md +36 -23
  820. package/payload/queue-kit/templates/queue-config.knobs +1 -0
  821. package/payload/site-kit/README.md +29 -45
  822. package/payload/site-kit/checks/check-docs-cname-parity.gate +1 -1
  823. package/payload/site-kit/checks/check-docs-collapsible.gate +3 -0
  824. package/payload/site-kit/checks/check-docs-highlight-coverage.gate +4 -0
  825. package/payload/site-kit/checks/check-docs-liquid-parse.gate +3 -0
  826. package/payload/site-kit/checks/check-docs-render-fidelity.gate +3 -0
  827. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +1 -1
  828. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/scripts/site-config.knobs +2 -0
  829. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +2 -2
  830. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/scripts/site-config.knobs +2 -0
  831. package/payload/site-kit/gate-tests/check-docs-collapsible/bad/docs/regions.md +23 -0
  832. package/payload/site-kit/gate-tests/check-docs-collapsible/bad/expect.txt +4 -0
  833. package/payload/site-kit/gate-tests/check-docs-collapsible/good/docs/plain.md +3 -0
  834. package/payload/site-kit/gate-tests/check-docs-collapsible/good/docs/regions.md +26 -0
  835. package/payload/site-kit/gate-tests/check-docs-collapsible/good/expect.txt +1 -0
  836. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/docs/_layouts/default.html +11 -0
  837. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/expect.txt +4 -0
  838. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/scripts/highlight-tokens.list +7 -0
  839. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/scripts/site-config.knobs +3 -0
  840. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/docs/_layouts/default.html +14 -0
  841. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/expect.txt +1 -0
  842. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/scripts/highlight-tokens.list +7 -0
  843. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/scripts/site-config.knobs +1 -0
  844. package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/docs/_layouts/default.html +4 -0
  845. package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/docs/span.md +3 -0
  846. package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/expect.txt +2 -0
  847. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/_layouts/default.html +4 -0
  848. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/front.md +7 -0
  849. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/loop.md +5 -0
  850. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/plain.html +1 -0
  851. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/raw.md +3 -0
  852. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/search.json +4 -0
  853. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/expect.txt +1 -0
  854. package/payload/site-kit/gate-tests/check-docs-liquid-parse-parser.test.sh +62 -0
  855. package/payload/site-kit/gate-tests/check-docs-render-fidelity-batch.test.sh +40 -45
  856. package/payload/site-kit/gate-tests/check-docs-render-fidelity-foreign.test.sh +7 -4
  857. package/payload/site-kit/gate-tests/check-docs-render-fidelity-span.test.sh +7 -4
  858. package/payload/site-kit/gate-tests/check-docs-render-fidelity-table.test.sh +7 -4
  859. package/payload/site-kit/templates/site-health.yml +60 -88
  860. package/profiles.list +4 -5
  861. package/lib/common/digest.sh +0 -18
  862. package/lib/common/lock.sh +0 -75
  863. package/lib/common/profile.sh +0 -91
  864. package/lib/common/recipe.sh +0 -106
  865. package/lib/diff.sh +0 -66
  866. package/lib/doctor.sh +0 -164
  867. package/lib/init.sh +0 -428
  868. package/lib/uninstall.sh +0 -214
  869. package/lib/update.sh +0 -34
  870. package/payload/canon-kit/SPEC.md +0 -2443
  871. package/payload/canon-kit/checks/check-surface-duplication.sh +0 -106
  872. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +0 -6
  873. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +0 -6
  874. package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.sh +0 -10
  875. package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.sh +0 -10
  876. package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.sh +0 -6
  877. package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.sh +0 -6
  878. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.sh +0 -8
  879. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.sh +0 -8
  880. package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.sh +0 -4
  881. package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.sh +0 -4
  882. package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.sh +0 -8
  883. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.sh +0 -5
  884. package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.sh +0 -5
  885. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/scripts/canon-config.sh +0 -6
  886. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/scripts/canon-config.sh +0 -6
  887. package/payload/canon-kit/lib/spec.sh +0 -560
  888. package/payload/canon-kit/smoke/install.sh +0 -58
  889. package/payload/canon-kit/smoke/violation.sh +0 -22
  890. package/payload/canon-kit/templates/canon-config.sh +0 -2
  891. package/payload/context-kit/SPEC.md +0 -1134
  892. package/payload/context-kit/bin/always-loaded.sh +0 -70
  893. package/payload/context-kit/bin/env-probe.sh +0 -142
  894. package/payload/context-kit/bin/md-index.sh +0 -80
  895. package/payload/context-kit/bin/md-section.sh +0 -63
  896. package/payload/context-kit/bin/pub-index.sh +0 -90
  897. package/payload/context-kit/bin/run-index-tests.sh +0 -91
  898. package/payload/context-kit/gate-tests/check-footprint-fresh/good/args +0 -4
  899. package/payload/context-kit/gate-tests/check-footprint-fresh/good/emit.txt +0 -12
  900. package/payload/context-kit/gate-tests/check-footprint-fresh/good/projection.txt +0 -12
  901. package/payload/context-kit/index-tests/expected/toolfloor.txt +0 -23
  902. package/payload/context-kit/index-tests/toolfloor-cases.sh +0 -49
  903. package/payload/context-kit/lib/context.sh +0 -56
  904. package/payload/context-kit/lib/pub-lang/rust.sh +0 -26
  905. package/payload/context-kit/lib/pub-lang/ts.sh +0 -32
  906. package/payload/context-kit/lib/toolfloor.sh +0 -58
  907. package/payload/context-kit/smoke/agents-md.sh +0 -139
  908. package/payload/context-kit/smoke/install.sh +0 -64
  909. package/payload/context-kit/smoke/violation.sh +0 -21
  910. package/payload/context-kit/templates/context-config.sh +0 -2
  911. package/payload/delegation-kit/SPEC.md +0 -2078
  912. package/payload/delegation-kit/bin/run-budget-guard-tests.sh +0 -88
  913. package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +0 -97
  914. package/payload/delegation-kit/bin/run-trend-tests.sh +0 -63
  915. package/payload/delegation-kit/bin/run-usage-tests.sh +0 -226
  916. package/payload/delegation-kit/bin/usage-trend.sh +0 -120
  917. package/payload/delegation-kit/bin/usage-verdict.sh +0 -144
  918. package/payload/delegation-kit/bin/wait-probe.sh +0 -184
  919. package/payload/delegation-kit/gate-tests/subagent-stop-liveness.test.sh +0 -99
  920. package/payload/delegation-kit/lib/delegation.sh +0 -84
  921. package/payload/delegation-kit/smoke/install.sh +0 -83
  922. package/payload/delegation-kit/smoke/violation.sh +0 -16
  923. package/payload/delegation-kit/templates/agent-budget-guard.sh +0 -18
  924. package/payload/delegation-kit/templates/agent-dispatch-guard.sh +0 -61
  925. package/payload/delegation-kit/templates/delegation-config.sh +0 -6
  926. package/payload/delegation-kit/templates/statusline-usage.sh +0 -101
  927. package/payload/delegation-kit/templates/subagent-stop-liveness.sh +0 -56
  928. package/payload/delegation-kit/templates/usage-poller.sh +0 -67
  929. package/payload/delegation-kit/usage-tests/budget-guard-cases.tsv +0 -20
  930. package/payload/doctrine-kit/SPEC.md +0 -385
  931. package/payload/doctrine-kit/bin/install-doctrine.sh +0 -194
  932. package/payload/doctrine-kit/bin/stage-rules.sh +0 -51
  933. package/payload/doctrine-kit/lib/doctrine.sh +0 -29
  934. package/payload/doctrine-kit/smoke/install.sh +0 -203
  935. package/payload/doctrine-kit/smoke/violation.sh +0 -13
  936. package/payload/drift-kit/SPEC.md +0 -1187
  937. package/payload/drift-kit/bin/drift-report.sh +0 -155
  938. package/payload/drift-kit/bin/kfric.sh +0 -61
  939. package/payload/drift-kit/bin/overhead-meter.sh +0 -106
  940. package/payload/drift-kit/bin/stage-economics.sh +0 -465
  941. package/payload/drift-kit/kpis/kpi-always-loaded.sh +0 -39
  942. package/payload/drift-kit/kpis/kpi-amendment-age.sh +0 -33
  943. package/payload/drift-kit/kpis/kpi-deferred-age.sh +0 -46
  944. package/payload/drift-kit/kpis/kpi-gate-backlog.sh +0 -52
  945. package/payload/drift-kit/kpis/kpi-gate-runtime.sh +0 -31
  946. package/payload/drift-kit/kpis/kpi-incident-recurrence.sh +0 -42
  947. package/payload/drift-kit/kpis/kpi-knowledge-friction.sh +0 -21
  948. package/payload/drift-kit/kpis/kpi-overhead.sh +0 -44
  949. package/payload/drift-kit/kpis/kpi-price-table-age.sh +0 -68
  950. package/payload/drift-kit/kpis/kpi-prompt-friction.sh +0 -38
  951. package/payload/drift-kit/kpis/kpi-queue-net-delta.sh +0 -74
  952. package/payload/drift-kit/kpis/kpi-settings-local.sh +0 -21
  953. package/payload/drift-kit/kpis/kpi-task-split.sh +0 -43
  954. package/payload/drift-kit/lib/drift.sh +0 -43
  955. package/payload/drift-kit/smoke/install.sh +0 -537
  956. package/payload/drift-kit/smoke/overhead-fixture.jsonl +0 -4
  957. package/payload/drift-kit/templates/drift-config.sh +0 -2
  958. package/payload/evidence-kit/SPEC.md +0 -740
  959. package/payload/evidence-kit/bin/diff-baseline.sh +0 -34
  960. package/payload/evidence-kit/bin/run-validate.sh +0 -124
  961. package/payload/evidence-kit/checks/check-producer-liveness.sh +0 -75
  962. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.sh +0 -7
  963. package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.sh +0 -7
  964. package/payload/evidence-kit/lib/evidence.sh +0 -193
  965. package/payload/evidence-kit/smoke/install.sh +0 -59
  966. package/payload/evidence-kit/smoke/violation.sh +0 -8
  967. package/payload/evidence-kit/templates/evidence-config.sh +0 -2
  968. package/payload/gate-sdk/SPEC.md +0 -10872
  969. package/payload/gate-sdk/bin/gen-pre-commit.sh +0 -297
  970. package/payload/gate-sdk/bin/install-hooks.sh +0 -60
  971. package/payload/gate-sdk/bin/port-blockers.sh +0 -473
  972. package/payload/gate-sdk/bin/run-consumer-smoke.sh +0 -239
  973. package/payload/gate-sdk/bin/run-gate-tests.sh +0 -179
  974. package/payload/gate-sdk/bin/upgrade-smoke.sh +0 -236
  975. package/payload/gate-sdk/checks/check-action-run-shell.sh +0 -223
  976. package/payload/gate-sdk/checks/check-crate-arms.sh +0 -62
  977. package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +0 -450
  978. package/payload/gate-sdk/checks/check-install-disposition.sh +0 -93
  979. package/payload/gate-sdk/checks/check-shellcheck.sh +0 -57
  980. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.sh +0 -2
  981. package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.sh +0 -2
  982. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/args +0 -4
  983. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/emit.txt +0 -14
  984. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/projection.txt +0 -14
  985. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.sh +0 -2
  986. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.sh +0 -2
  987. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.sh +0 -6
  988. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/stub-bin +0 -3
  989. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.sh +0 -6
  990. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/stub-bin +0 -3
  991. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/installer/lib/common/recipe.sh +0 -9
  992. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-beta.gate +0 -3
  993. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-gamma.sh +0 -6
  994. package/payload/gate-sdk/gate-tests/check-install-disposition/good/installer/lib/common/recipe.sh +0 -10
  995. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +0 -5
  996. package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +0 -5
  997. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.sh +0 -5
  998. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.sh +0 -5
  999. package/payload/gate-sdk/gate-tests/declaration-lib-parity.test.sh +0 -211
  1000. package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +0 -112
  1001. package/payload/gate-sdk/lib/consumer-smoke.sh +0 -69
  1002. package/payload/gate-sdk/lib/declaration.sh +0 -59
  1003. package/payload/gate-sdk/lib/inject.sh +0 -80
  1004. package/payload/gate-sdk/smoke/install.sh +0 -171
  1005. package/payload/gate-sdk/smoke/violation.sh +0 -13
  1006. package/payload/guard-kit/SPEC.md +0 -1415
  1007. package/payload/guard-kit/bin/compare-settings-allow.sh +0 -115
  1008. package/payload/guard-kit/bin/run-guard-tests.sh +0 -110
  1009. package/payload/guard-kit/bin/scan-prompts.sh +0 -166
  1010. package/payload/guard-kit/bin/scratch-run.sh +0 -34
  1011. package/payload/guard-kit/gate-tests/guard-read-path.test.sh +0 -52
  1012. package/payload/guard-kit/lib/guard.sh +0 -1014
  1013. package/payload/guard-kit/smoke/install.sh +0 -26
  1014. package/payload/guard-kit/templates/bash-guard.sh +0 -20
  1015. package/payload/guard-kit/templates/escalation-guard.sh +0 -27
  1016. package/payload/guard-kit/templates/guard-config.sh +0 -8
  1017. package/payload/guard-kit/templates/wakeup-guard.sh +0 -20
  1018. package/payload/lifecycle-kit/SPEC.md +0 -2884
  1019. package/payload/lifecycle-kit/bin/cite-survey.sh +0 -81
  1020. package/payload/lifecycle-kit/bin/enter-stage.sh +0 -380
  1021. package/payload/lifecycle-kit/bin/file-gap.sh +0 -101
  1022. package/payload/lifecycle-kit/bin/file-survey.sh +0 -69
  1023. package/payload/lifecycle-kit/bin/install-lifecycle.sh +0 -36
  1024. package/payload/lifecycle-kit/bin/session-id.sh +0 -75
  1025. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.sh +0 -4
  1026. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.sh +0 -4
  1027. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.sh +0 -4
  1028. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.sh +0 -4
  1029. package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +0 -100
  1030. package/payload/lifecycle-kit/lib/stages.sh +0 -194
  1031. package/payload/lifecycle-kit/smoke/install.sh +0 -434
  1032. package/payload/lifecycle-kit/smoke/violation.sh +0 -8
  1033. package/payload/lifecycle-kit/templates/lifecycle-config.sh +0 -2
  1034. package/payload/lifecycle-kit/templates/workflow-state-guard.sh +0 -29
  1035. package/payload/queue-kit/SPEC.md +0 -1436
  1036. package/payload/queue-kit/bin/lesson-sink.sh +0 -28
  1037. package/payload/queue-kit/bin/queue-counts.sh +0 -35
  1038. package/payload/queue-kit/bin/queue-edges.sh +0 -78
  1039. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.sh +0 -6
  1040. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.sh +0 -6
  1041. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.sh +0 -3
  1042. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.sh +0 -3
  1043. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.sh +0 -6
  1044. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.sh +0 -6
  1045. package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +0 -215
  1046. package/payload/queue-kit/lib/queue.sh +0 -129
  1047. package/payload/queue-kit/smoke/install.sh +0 -25
  1048. package/payload/queue-kit/smoke/violation.sh +0 -8
  1049. package/payload/queue-kit/templates/queue-config.sh +0 -2
  1050. package/payload/site-kit/SPEC.md +0 -601
  1051. package/payload/site-kit/checks/check-docs-render-fidelity.sh +0 -242
  1052. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/scripts/site-config.sh +0 -7
  1053. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/scripts/site-config.sh +0 -7
  1054. package/payload/site-kit/lib/site.sh +0 -43
  1055. package/payload/site-kit/smoke/install.sh +0 -34
  1056. package/payload/site-kit/smoke/violation.sh +0 -20
  1057. /package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/{check-ported.gate → check-stage-entry.gate} +0 -0
package/README.md CHANGED
@@ -1,1389 +1,63 @@
1
1
  # Checkwright
2
2
 
3
- The activation path for **Checkwright** — a coding-agent-assisted delivery
4
- methodology shipped as installable kits: a self-testing gate SDK for
5
- prose/spec/config surfaces, an evidence-stamped iteration lifecycle designed
6
- for stateless agent sessions, and token-economics-aware context management.
3
+ The activation path for **Checkwright**, whose kits are listed in the [kit reference](https://checkwright.dev/kits.html).
7
4
 
8
5
  ## What this package is
9
6
 
10
- A one-shot vendoring installer. It copies pinned kit source out of its own
11
- payload into your repository and commits it, then prints the commands that
12
- finish the setup. What governs your tree afterwards is committed and auditable:
13
- every gate arrives with its declaration, its `# spec:` pointer and the section
14
- behind it, and its `good/`+`bad/` fixture pair, and a gate whose implementation
15
- is compiled arrives as a digest-verified binary rather than as source
16
- (gate-sdk/SPEC.md §Consumer payload, which rules that and bounds it).
7
+ A one-shot vendoring installer. It copies pinned kit source out of its own payload into your repository and commits it, then prints the commands that finish the setup. What governs your tree afterwards is committed and auditable: every gate arrives with its declaration and the one-line invariant that declaration carries, its `# spec:` pointer, and its `good/`+`bad/` fixture pair, and a gate whose implementation is compiled arrives as a digest-verified binary rather than as source. The specification section behind each pointer is published rather than packed ([gate-sdk/SPEC.md §Consumer payload](https://github.com/checkwright/checkwright/blob/master/gate-sdk/SPEC.md#consumer-payload), which rules that and bounds it).
17
8
 
18
- What it is not: a dependency channel. Nothing resolves at your build time,
19
- nothing is fetched after this package itself, and the installer writes no
20
- dependency reference, no lockfile entry pointing at a registry, and no
21
- install-time lifecycle script. Remove the installer afterwards and the tree it
22
- vendored keeps working — it needs nothing from a package registry again.
9
+ What it is not: a dependency channel. Nothing resolves at your build time and the installer writes no dependency reference, no registry lockfile entry and no install-time lifecycle script — the contract and what it costs are [`installer/SPEC.md` §The dependency boundary](SPEC.md#the-dependency-boundary).
23
10
 
24
- ## Implementation
11
+ ## Before you run it
25
12
 
26
- Bash. npm is the delivery vehicle, never the implementation: the `bin` entry is
27
- a bash script, so a reader reviewing what they are about to run reads source
28
- rather than a build product, and the linter that governs every other script in
29
- the repository governs these too.
13
+ Each transport carries its own requirement, and each belongs to the delivery path alone. The install page's prerequisites block lists each transport's tools and their floors, per system. The gate battery this vendors uses none of them, and no delivery-path tool joins the toolchain roster.
30
14
 
31
- ## Requirements
15
+ The toolchain the battery *does* assert, with its version floors, is on the install page. `checkwright doctor` renders it as an exit status and `init` gates on that before any file is written, so a machine below the floor is refused rather than half-installed.
32
16
 
33
- This package reaches a tree over two transports, and each carries its own
34
- requirement. Fetched from npm it needs Node, for `npx`. Fetched as the tarball
35
- attached to a GitHub Release it needs none — `curl`, `tar`, and `sha256sum`,
36
- then `bash package/bin/checkwright.sh init`. Both requirements belong to a
37
- delivery path alone: the gate battery this vendors does not use Node, no
38
- delivery-path tool joins the toolchain roster, and the manual vendoring path
39
- documented on the site needs neither. The toolchain the battery does assert,
40
- with its version floors, is on the install page.
17
+ ## Quick start
41
18
 
42
- **The verbs themselves need `jq`.** `init`, `diff` and `uninstall` read JSON —
43
- this package's own version stamp and the `checkwright.lock` manifest — and they
44
- read it with `jq`, so every one of them refuses without it, naming the program
45
- and the remedy (§The manifest). This is a claim about *these verbs*, separate
46
- from the install page's toolchain block, which names `jq` for the gates in the
47
- battery being vendored: different programs' users, and a machine can satisfy
48
- either without the other, though a machine missing `jq` is below both.
19
+ From your repository's root, in a new project or an existing one with every change committed, run the one line for your system on the install page: [macOS and Linux](https://checkwright.dev/install.html#macos-and-linux) or [Windows](https://checkwright.dev/install.html#windows). The Release tarball recipe below it is the step-by-step alternative. Either unpacks outside the repository, because `init` refuses a worktree that is not clean.
49
20
 
50
- `doctor` is the exception by design, and the exception is that it **reaches its
51
- diagnosis** rather than that it is content: it reports a toolchain instead of
52
- refusing before it can report one, so on a machine with no `jq` it renders its
53
- whole report, names `jq` as missing, and tells you that is also why the manifest
54
- could not be read. Its verdict is still **below contract**, because `jq` is a
55
- consumer-audience member of the toolchain floor and the battery being vendored
56
- needs it too. So the installer always knew about this dependency and `doctor`
57
- always said so — what was wrong is that `init` runs `doctor` *last*, after the
58
- JSON reads that need `jq`, so the one verdict that named the program was ordered
59
- behind the refusals that could not. The precondition above is that ordering
60
- corrected, not a fact newly discovered.
21
+ With Node already present the same install is one command, `npx checkwright init` — same payload, same `init`, same `checkwright.lock`; only the fetch differs. `npx checkwright init --profile prose` picks a profile ([Choosing a profile](#choosing-a-profile) below), and `npx checkwright demo` shows the adoption arc in a scratch repository first, without touching yours ([what it runs](https://checkwright.dev/install.html#install)).
61
22
 
62
- ## Layout
23
+ `init` vendors the selected profile's kit directories, writes a `gates.list` seeded with each kit's starting gates alongside the config seam those kits need and a CI workflow, and makes **one commit** naming the profile and the version. It ends by printing the commands that finish the setup, each with its reason — deliberately not copied here, because what `init` prints is `init`'s to say ([`installer/SPEC.md` §init](SPEC.md#init)).
63
24
 
64
- - `bin/checkwright.sh` — the verb dispatcher, and the package's `bin` entry.
65
- - `lib/` — one file per verb; the dispatcher's roster is this directory.
66
- - `lib/common/` — modules the verbs share. The dispatcher's roster is the
67
- `*.sh` files directly under `lib/`, and that glob does not descend, so a
68
- shared module cannot be advertised as a verb.
69
- - `payload/` — the vendored kit source, assembled at pack time from the
70
- repository's own kit roots. It exists in the published tarball only, never in
71
- the source tree, so no second copy of any kit is checked in.
72
- - `profiles.list` — the profile rosters (below).
25
+ Re-running is idempotent and non-destructive. `init` reads the per-file hash `checkwright.lock` recorded: a file still at its recorded hash is rewritten, and one you have changed since is **reported rather than overwritten** unless you pass `--force`. `--dry-run` prints the file plan and the manifest and writes nothing.
73
26
 
74
- ## The verbs
27
+ ## What you can run
75
28
 
76
- `init` makes an install; the rest manage one after it exists. The roster itself
77
- is derived — a verb is advertised because its implementation is present under
78
- `lib/`, so `checkwright --help` lists the directory rather than a list beside it
79
- — and what follows is what each verb is *for*.
29
+ `init` makes an install; the rest manage one after it exists. Each is an arm of the gate binary the payload carries, reached through the bootstrap, and the roster's owner is the binary — `checkwright --help` reads it off the artifact rather than off a list beside it, so it cannot promise a verb this build does not implement.
80
30
 
81
- | verb | asks | reads |
82
- | --- | --- | --- |
83
- | `init` | vendor this profile's kits into my repository | the payload, and the manifest a previous run left |
84
- | `doctor` | can this machine run the battery, and what is installed here? | the toolchain, and the manifest's identity fields |
85
- | `diff` | which of the files `init` wrote have I changed? | the manifest's `files` hashes, against the tree |
86
- | `update` | bring the install here up to the version this package carries | the manifest, then everything `init` reads |
87
- | `uninstall` | reverse the install, keeping anything I have edited | the manifest's `files` roster, against the tree |
31
+ | verb | asks |
32
+ | --- | --- |
33
+ | `init` | vendor this profile's kits into my repository |
34
+ | `doctor` | can this machine run the battery, and what is installed here? |
35
+ | `diff` | which of the files `init` wrote have I changed? |
36
+ | `update` | bring the install here up to the version this package carries |
37
+ | `uninstall` | reverse the install, keeping anything I have edited |
38
+ | `demo` | show me the adoption arc without touching my repository |
88
39
 
89
- **The classifier is writes / does not write, and it is what decides
90
- `--dry-run`.** `doctor` and `diff` write nothing, so neither has one and neither
91
- would have anything to preview. Every verb that does write has one, and it means
92
- the same thing in each: print the plan, write nothing, exit 0. That rule is
93
- asserted behaviorally rather than gated — §The consumer smoke holds
94
- `uninstall --dry-run` to leaving the tree object and the worktree unchanged,
95
- which is what a flag that parsed and then wrote anyway would fail and a flag
96
- that merely existed would pass. *The honest bound:* `init`'s and `update`'s
97
- `--dry-run` carry the same contract and are not held to it there yet, so the
98
- rule is asserted on one verb and documented on the other two.
40
+ `doctor` and `diff` write nothing, so neither takes a `--dry-run`, and nor does `demo`, whose only writes are to a scratch repository it removes. Every verb that does write takes one, and it means the same thing in each: print the plan, write nothing, exit 0.
99
41
 
100
- **Why `diff` is a verb of its own rather than a widening of `doctor`.**
101
- `doctor`'s exit status has exactly one owner — the toolchain contract — and
102
- `init` gates its own precondition on it. That ownership already forced one
103
- carve-out: §doctor reports an artifact finding *without* setting the status,
104
- because reddening there would block the `init` re-run that is the finding's own
105
- remedy. Drift would force the same carve-out a second time and on worse ground.
106
- Editing a vendored file is **sanctioned** — the whole ownership contract in §The
107
- manifest exists to protect it — so a folded-in drift report would be a permanent
108
- expected finding on the one surface that teaches a reader to skim its last line.
109
- And drift wants a status of its own: `0` the tree is exactly what `init` wrote,
110
- `1` it has diverged. That is gatable in CI, and it cannot live on `doctor`
111
- without colliding with the number the toolchain contract already owns.
42
+ `uninstall` reverses an install against the roster `init` recorded, keeping and reporting any file you edited rather than removing it — which is what lets an evaluation you decide against leave nothing of its own behind.
112
43
 
113
- A second ground, independent of the first: `doctor` runs as `init`'s
114
- precondition, before every install, so per-file hashing there would make every
115
- `init` pay for a computation the install redoes moments later and print the
116
- answer twice.
44
+ ## Choosing a profile
117
45
 
118
- Nor do the two `--dry-run`s stand in for it. They answer *what would this
119
- payload change*, which is a different question from *what have I changed*, and
120
- an adopter deciding whether to uninstall needs the second without running a
121
- mutating verb at all.
46
+ `starter`, `delegation`, `prose`, `full`. Not four rungs on one ladder: the profiles are ordered by kit-set containment, so moving to one that contains yours only ever adds, and two that contain neither the other — `delegation` and `prose` — are alternatives rather than steps.
122
47
 
123
- ## init
48
+ - **`starter`** — the gate SDK on its own: a battery, a generated pre-commit hook, and gates that red on real defects in your tree with no configuration outside your gates directory.
49
+ - **`delegation`** — adds every kit whose subject is the agent session itself.
50
+ - **`prose`** — adds canon-kit instead, for a repository whose artifacts are documents rather than code.
51
+ - **`full`** — everything in the payload.
124
52
 
125
- `checkwright init` vendors the selected profile's kit source out of this
126
- package's own payload into your repository and commits it. One command, and
127
- what governs your tree afterwards is committed and auditable on the terms
128
- gate-sdk/SPEC.md §Consumer payload sets.
53
+ `starter`, `delegation` and `prose` are rosters in `profiles.list`, each membership recorded beside the criterion behind it; `full` is derived from the payload at run time rather than listed.
129
54
 
130
- **No selection builds.** Not "no profile that happens to carry only shell
131
- gates" — no selection, ever. `init` writes files and compiles nothing, so it
132
- asks for **no build toolchain** and cannot fail on one. The only toolchain it
133
- asks for at all is the one the battery it is vendoring will itself run, which
134
- is what the `doctor` precondition below checks and the whole of what can block
135
- an install. A gate whose implementation is a
136
- compiled subcommand reaches you as a prebuilt binary picked for your platform
137
- and checked against a published digest before it is written, which is what makes
138
- zero build step a property of `init` itself rather than of which profile you
139
- picked (gate-sdk/SPEC.md §Porting a gate to the binary substrate, criterion 5).
55
+ ## Where the design lives
140
56
 
141
- Four preconditions, and all of them **refuse** rather than warn — a partial
142
- install is the outcome none of them may produce, so every one is checked before
143
- a single file is written:
144
-
145
- - **You are inside a git work tree.** The vendored source is meant to be
146
- committed; that is what makes it auditable rather than merely present.
147
- - **`jq` is installed.** It sits immediately before the first JSON read rather
148
- than at the very top of the verb, because that is where *before the first
149
- read* falls: the two preconditions either side of it are about the package and
150
- the repository and are answerable without `jq`, while every refusal after it
151
- is one a `jq`-less machine would otherwise meet as a misdiagnosis. That is the
152
- whole of what this precondition buys, and it is worth stating as the
153
- deliverable rather than leaving it to be read as a side effect: the refusals
154
- below it — *this package carries no version stamp*, and *`checkwright.lock`
155
- carries a schema this build does not know* — **keep their exact text and
156
- recover their accuracy**. Each is the right message for the condition it
157
- names, and each was only ever wrong as the message a `jq`-less machine
158
- received, reached by a path that had nothing to do with what it said. After
159
- this precondition, meeting one of them means the condition it names is
160
- actually true.
161
- - **The worktree is clean.** `init` makes one commit, and a dirty tree would
162
- fold your work into it, leaving a reviewer's diff wider than what was
163
- actually vendored. It is also what makes a run's own residue attributable:
164
- anything dirty at a path `init` recorded, when the run ends, was written by
165
- that run and by nothing else — which is what lets a run that changed nothing
166
- still commit what it rewrote rather than guess whose the change was.
167
- `--no-commit` is the valve: it writes and stages the
168
- files and leaves the commit to you, so an operator who wants to compose the
169
- change themselves has taken that guarantee on deliberately — and because it
170
- waives the precondition, it waives that attribution with it.
171
- - **`doctor` passes.** The contract it holds you to is the consumer-audience
172
- subset of the roster — the tools the vendored battery runs, never a tool that
173
- only builds Checkwright (§doctor) — so a machine with no Rust toolchain is
174
- not below it. A machine that *is* below it blocks *before* any partial
175
- install, rather than halfway through one, which is why `doctor` ships in the
176
- same phase as `init` rather than as a later convenience.
177
-
178
- It writes the selected profile's kit directories, a `gates.list` seeded with
179
- each kit's starting gates, the config seam files those kits need, and the
180
- manifest. Then it makes **one commit** naming the profile and the version, and
181
- prints the two commands that finish the setup — `gate-sdk/bin/install-hooks.sh`
182
- to opt this clone into the generated hook, and `gate-sdk/bin/run-gates.sh` to
183
- run the battery.
184
-
185
- **Re-running is idempotent and non-destructive.** A second `init` reads each
186
- recorded hash from the manifest: a file whose hash still matches is `init`'s to
187
- rewrite, and one that has changed since is **yours** — it is reported and left
188
- alone, never overwritten, unless you pass `--force`. That does not expire at the
189
- next upgrade: a file reported as changed stays on `init`'s roster at the hash
190
- `init` wrote there, so every later run reads it the same way and reports it
191
- again. It does not expire when a release **stops shipping** the file either.
192
- `init` owns what it wrote there, not what the current payload happens to carry,
193
- so the path stays on the roster at that hash and a release that later re-adds it
194
- meets the same protection rather than a clean slate — which is the one window in
195
- which an unowned path could otherwise be written straight over your edits. A
196
- re-run that finds
197
- nothing to change says so and exits clean; an unchanged tree is the success
198
- case, not an error.
199
-
200
- **"Nothing to change" does not mean "nothing was committed".** `init` regenerates
201
- the projections its vendored tools own on every run, so a run it classifies as a
202
- no-op has still rewritten files — and **one commit** is a promise about what the
203
- run leaves behind, not about which branch it took to get there. So the no-op exit
204
- commits anything it rewrote that is not already committed, under the same message
205
- the ordinary vendoring commit uses, and says so. Expect it to find nothing: a run
206
- that rewrote something normally stages it and never reaches that branch at all.
207
- The arm is there so the promise holds when it does. Under `--no-commit` the arm
208
- is off, because the commit is yours.
209
-
210
- **Two shapes this is deliberately not, and one ordering it must not take.** It is
211
- not a freshness comparison that skips regenerating a projection whose inputs have
212
- not moved: `init` does not compare freshness, and the projections are the vendored
213
- tools' own output rather than something `init` holds an input for. It is not a
214
- change of owner either — the projections stay `init`'s `files` entries rather than
215
- becoming yours to regenerate, because the ownership rule in §The manifest is what
216
- protects your edits to everything else `init` writes. And the commit on that branch
217
- sits **inside** the exit rather than ahead of it: a commit against an empty index
218
- exits non-zero and `init` treats a failed commit as a fatal install error, so an arm
219
- placed before the "nothing to change" test would turn the pure idempotent path into
220
- a false hard failure.
221
-
222
- A payload older than the recorded install is refused as a
223
- silent downgrade — `--force` covers that refusal too, which is what makes a
224
- rollback a thing you asked for rather than a thing that happened to you.
225
- `--force` means the same thing in all three places it appears — the changed-file
226
- protection here, the downgrade refusal above, and the kept files `uninstall`
227
- would otherwise leave behind (§uninstall): overwrite what `init` would otherwise
228
- protect.
229
-
230
- `--dry-run` prints the file plan and the manifest that would be written, writes
231
- nothing, and exits 0.
232
-
233
- ## What init seeds
234
-
235
- Beyond the kit directories themselves, `init` writes the least that makes the
236
- battery green on the tree it just made.
237
-
238
- The **config seam is derived, never listed**: a kit's consumer config is
239
- whatever `templates/*-config.sh` it ships, and the destination is always your
240
- gates directory under the file's own name. A kit that grows a config template
241
- is picked up with no edit here.
242
-
243
- **Everything `init` seeds takes one of two disciplines, and which one follows
244
- from whether `init` keeps rewriting the file.** A surface `init` creates once and
245
- then leaves to you — the queue file, the agent file, the evidence manifests, the
246
- workflow-state file — is written **only when it is absent**, so a re-run never
247
- disturbs a tree that has grown since. A surface `init` rewrites on every run —
248
- every kit's config seam, and gate-sdk's `msg-patterns.list` — is **claimed
249
- before it is written**, on the same non-destructive path as any vendored file:
250
- the recipe *plans* the copy and `init` performs it, so your edit is compared
251
- against the recorded hash while it is still on disk. Landing the copy first would
252
- destroy the very evidence the comparison is made from, and these are precisely
253
- the files whose whole purpose is to be edited by you — which is why the ordering
254
- is stated here rather than left to each recipe.
255
-
256
- **The queue file's source is derived too, and resolved once per install rather
257
- than once per kit.** A kit declares itself the queue format's owner by shipping
258
- `templates/TASK-QUEUE.md`; `init` seeds from the template of the first kit in
259
- the resolved profile's set that ships one, and writes a minimal inline skeleton
260
- only when **no** kit in that set does. Resolving over the whole set is the
261
- point: while the choice was made inside the per-kit loop, the first kit reached
262
- decided it, so a kit that reads the queue and ships no template pre-empted one
263
- that does — and the kit shipping the template was reachable in no profile at
264
- all. Nothing declares an owner, because shipping the artifact already does. The
265
- inline skeleton carries every `QUEUE_KIT_REQUIRED_SECTIONS` heading at that
266
- knob's default, since it is a path a shipping profile takes rather than
267
- defensive symmetry: a profile whose kit set reads the queue and carries no
268
- kit shipping the template — `prose` is that shape — receives exactly that file,
269
- and the section gate that would catch a missing heading is `on-surface`, so
270
- nothing in the battery `init` registers would say so.
271
-
272
- The **starting gate roster** is the subset a fresh consumer begins with, not
273
- the kit's full roster — the same distinction gate-sdk's own README draws. A
274
- gate whose subject you have not authored yet has nothing to read: canon-kit's
275
- duplication gate wants a glossary, and site-kit's wants a docs host. On a tree
276
- that has done nothing wrong those would red on day one, so they are registered
277
- when the surface exists rather than at install. Each kit's README names the full
278
- roster to grow into. **No lifecycle-kit gate is `zero-config`**, and the reasons
279
- differ across its roster rather than being one reason: some read a stage
280
- attestation only a stage session can write, others read surfaces a stage session
281
- authors, and two — `check-lifecycle-registration` and `check-merge-attrs` — read
282
- what `lifecycle-kit/bin/install-lifecycle.sh` writes, which is the adopter's own
283
- step and not a stage's. The posture is kit-wide; the reason is per gate.
284
-
285
- **A kit's agent-file block is seeded at install iff a gate registered at install
286
- reads it.** Seeding follows the gate, not the kit — the agent-file half of the
287
- rule above, extended to the one other thing `init` writes on a kit's behalf.
288
- doctrine-kit's block is seeded because `check-doctrine-registration` declares
289
- `zero-config`, so the reader of the block is in the registry `init` writes and
290
- the block is read on day one rather than sitting resident. lifecycle-kit's is
291
- not, because nothing `init` registers would read it: seeding it would put
292
- always-loaded instruction for a stage machine into your agent file and charge
293
- every session's context for machinery nothing yet enforces. The rule is also
294
- what keeps `recipe_needs_agent_file` from being a seeding roster — the predicate
295
- asks whether the agent file must *exist* for a kit's starting gates, which
296
- context-kit answers yes to while writing nothing into it; the seeding arms ask
297
- the narrower question of which kit writes into it.
298
-
299
- **The roster is derived from the gates themselves.**
300
- `recipe_gates(kit-payload-dir, profile)` in `lib/common/recipe.sh` is the
301
- **whole** of a fresh consumer's registry — what a tree `init` just made will run
302
- is read there, never inferred from a kit's full roster or from this repo's own
303
- `gates.list` — and what it reads is each shipped gate's own
304
- `# install: <disposition>` header line, taking every member a kit declares
305
- `zero-config` (gate-sdk/SPEC.md §The install disposition). It carries no gate
306
- name of its own, so a kit that adds a zero-config gate is picked up with no edit
307
- here. One function unions the result over a profile's kits, `profile_gates` in
308
- `lib/common/profile.sh`, and both the registry `init` writes and the consumer
309
- smoke's monotonicity assertion read that one derivation. No disposition varies on
310
- the profile today; the argument is the seam, so a roster that does vary becomes a
311
- change to one gate rather than to a signature and every caller of it.
312
-
313
- **What the seam can and cannot express, measured rather than assumed**, because
314
- the obvious use of it is the one thing it does not do. `full` is the
315
- payload-derived maximum, so every profile's kit set is contained in it, and the
316
- smoke's monotonicity assertion therefore means *anything a profile registers,
317
- `full` must register too* — a gate armed "for one profile only" is not
318
- expressible, since the moment it is armed anywhere it is owed to `full`, and
319
- once it is owed to `full` it is simply `zero-config`. `starter` sits below every
320
- profile for the mirror reason, so no profile may **drop** a gate-sdk
321
- `zero-config` member either; and subtraction in the band between them has
322
- nothing to derive from, because §The consumer smoke's own rule forbids
323
- `lib/common/recipe.sh` a literal gate name and no gate declares
324
- profile-varying reachability. So the parameter is **additively inert** and
325
- subtractively undeclarable, which is why a cohort of gates a narrow profile
326
- should receive arrives as a disposition correction on each gate instead. The
327
- argument stays the seam for the future in which a gate does declare that
328
- reachability; nothing declares it today.
329
-
330
- **A disposition change reaches trees that are already installed.** `init` on an
331
- existing consumer rewrites `gates.list` from this derivation, so a gate moving
332
- `on-surface` → `zero-config` joins their battery on their next run, on content
333
- they wrote before the gate existed. Their *edits* to the file are protected —
334
- `gates.list` is claimed before it is written, like any rewritten surface — but
335
- the roster growing is the intended behavior rather than a claim violation, and a
336
- release carrying such a move owes them the sentence in its note.
337
-
338
- Each kit's `smoke/install.sh` registers a **richer** roster against the scratch
339
- tree that script builds and seeds — a superset of this one by contract rather
340
- than by coincidence, held there by `check-install-disposition`. The two describe
341
- two different trees, which is why the disposition is what a kit owns and the
342
- roster is what each caller derives.
343
-
344
- ## The gate binary
345
-
346
- A gate whose implementation is a compiled subcommand needs that binary on disk
347
- before it can run, and `init` is what puts it there. It **selects, verifies and
348
- places** — it never builds, and it never fetches. Everything below sits inside
349
- the irreducible bootstrap the vendoring ruling leaves outside the binary
350
- (gate-sdk/SPEC.md §Porting a gate to the binary substrate): the binary cannot
351
- select itself, so something must resolve the platform, verify the artifact, and
352
- place it. Each step is deliberately small enough to be written twice, in bash
353
- and in PowerShell.
354
-
355
- **Platform resolution is derived and never stored.** `target_of_host()` maps
356
- `uname -s` and `uname -m` to one Rust target triple, and to the empty string on
357
- a host that maps to none. It runs once per `init`, after the profile's kit set
358
- resolves and before anything is written. The result stays a local: a stored copy
359
- would be a second source for a fact the host already answers, and it is stale
360
- the first time a vendored tree moves between machines — the case that matters
361
- most, since a vendored tree is shared by construction. Two fields rather than
362
- `uname -a` because that is the smallest input that answers the question, and it
363
- is what a PowerShell half can answer without parsing prose. Nothing reads the
364
- kernel version, so nothing collects it.
365
-
366
- **Selection has three outcomes, and collapsing any two is the defect.** The
367
- payload carries the target roster verbatim beside the artifacts
368
- (gate-sdk/SPEC.md §Consumer payload), and `init` reads it rather than inferring
369
- support from a directory's presence:
370
-
371
- | the host resolves to | the payload holds | outcome |
372
- | --- | --- | --- |
373
- | a target **not** in the roster | — | **omit and declare** — a supported outcome, not a failure |
374
- | a target **in** the roster | its binary and sidecar | verify, then write |
375
- | a target **in** the roster | nothing, or half the pair | **refuse** — the payload is broken |
376
-
377
- The third row is the whole reason the roster is read. Without it `init` cannot
378
- tell a platform that was never committed to from a platform that was committed
379
- to and whose artifact went missing, and reading the second as the first turns a
380
- publisher defect into a silently smaller green battery. A payload assembled with
381
- no artifacts at all carries no `artifact/` directory, so it reads as the first
382
- row and never as a payload whose every target went missing. The refusal is the
383
- one place this path fails an install, and it belongs there: a missing artifact
384
- for a **declared** target is a defect the adopter cannot act on and must not
385
- inherit silently.
386
-
387
- **The digest is verified before anything is written.** `init` computes the
388
- artifact's SHA-256 and compares it against the sidecar that travelled with it,
389
- and only then writes. The ordering is the whole of it: a consumer who cannot
390
- read the gate has nothing else standing between them and a substituted binary,
391
- and a post-write check has already put it on disk. A mismatch refuses — never a
392
- warning, never a write.
393
-
394
- `sha256sum` is tried first, then `shasum -a 256`, because stock macOS ships the
395
- second and not the first. When **neither** resolves the install proceeds and the
396
- artifact is omitted rather than written unverified. Both halves are load-bearing:
397
- never write what was not verified, and never fail an install over something the
398
- adopter did not choose.
399
-
400
- *The honest bound, stated so no surface overclaims it.* The digest travelled
401
- inside the same payload as the artifact, so it catches corruption and a
402
- substitution made to the artifact alone — not a compromised publisher, which no
403
- in-payload value can. What raises it above a self-check is that the identical
404
- bytes are published on the Release, so a human can cross-check the value out of
405
- band. The claim is **verified against a published digest**, never *reproducible*.
406
-
407
- **The gate-sdk config seam rides this path and only this path.** `init` claims
408
- `scripts/gate-sdk-config.sh` inside the branch that has selected an artifact
409
- target, and gate-sdk ships no config-seam template for the generic seam plan to
410
- copy. On a payload carrying no artifact that file is therefore never written and
411
- is not a `files` entry at all — so a verb reasoning about the surfaces `init`
412
- rewrites on every run must not assume it is present.
413
-
414
- **Omission is declared and counted.** An omitted member rides the registry
415
- rather than a new file: `init` writes `# omitted: <name> <reason>` into the
416
- consumer's `gates.list` in place of the member's name — a comment line the
417
- runner already strips from the live set. The record then sits in the consumer's
418
- tracked history where a reviewer reads it, instead of scrolling past in
419
- install-time stdout, and a re-run on a machine that has since gained a hasher
420
- converts it back into a live member with no hand edit. Two reason tokens,
421
- because there are two remedies:
422
-
423
- - `substrate-unavailable` — this host's platform has no declared artifact. There
424
- is no adopter action; the platform is not in the support roster.
425
- - `digest-unverifiable` — an artifact exists but no hasher does. Install
426
- `sha256sum` or `shasum` and re-run `init`.
427
-
428
- A third token would need a third remedy to earn its place. Which members are
429
- affected is derived from the payload, never maintained here: a starting-roster
430
- gate the payload declares as `<kit>/checks/<name>.gate` — and does not also ship
431
- as a shell script — is one that dispatches to the binary. `run-gates.sh` reports
432
- the count and remedy on a line of its own beside its summary
433
- (gate-sdk/SPEC.md §run-gates), and `doctor` reports it against the reason that
434
- caused it.
435
-
436
- **The install location has one owner.** The binary is written to your gates
437
- directory beside the `gates.list` seeded there, and `init` sets
438
- `GATE_SDK_NATIVE_BIN` to that path in `<gates-dir>/gate-sdk-config.sh` — the
439
- optional persistent config seam gate-sdk's library already sources when it
440
- exists (gate-sdk/SPEC.md §Layout and configuration). `init` creates that file
441
- when it places an artifact, and gate-sdk ships no config template for it because
442
- **the seam file's content is resolved at install time rather than shipped**: its
443
- one line sets `GATE_SDK_NATIVE_BIN` to the path the artifact was actually placed
444
- at, and that path does not exist until selection has run. A static template could
445
- only be copied and then immediately rewritten — the same file written twice, with
446
- the copy contributing nothing. That is a property of the value, not of how the
447
- template seam happens to copy, so it does not expire when the copy changes.
448
- The knob's own default is unchanged and still names the crate's build output,
449
- because it is a **stable relative path** on purpose: the generated hook persists
450
- the emitted argv, so a machine-specific path baked into a tracked hook would make
451
- the graph artifact's freshness comparison machine-dependent.
452
-
453
- **Ordering is load-bearing.** The config seam and the binary are both in place
454
- before the pre-commit hook is generated, because the generator resolves each
455
- member's invocation argv and a `.gate` member resolves to this binary. A hook
456
- generated first would resolve a dispatch it cannot make.
457
-
458
- Every row of the table above runs under an oracle rather than a
459
- hand-verification with a date on it, and the rows are split across §The consumer
460
- smoke's arms by which install can show them. The **verify-then-write** row is the
461
- main loop's, on every profile, because the payload it packs carries a binary this
462
- run built; the **omit-and-declare** row is the binary-less leg's and the artifact
463
- arm's undeclared-host leg's; the **refusal** row is the artifact arm's alone,
464
- against a payload it mutated after extraction. Nothing here changes for that —
465
- the behavior this section specifies is what those arms assert, not something they
466
- added.
467
-
468
- ## doctor
469
-
470
- `checkwright doctor` tells you whether this machine meets the toolchain the
471
- gate battery needs, and it says so in its **exit status** rather than only in
472
- its output: `0` meets the contract, `1` is below it. That is what lets a CI
473
- step or `init`'s own precondition check gate on the answer without parsing a
474
- report — and it is why a below-contract machine is caught before any partial
475
- install rather than halfway through one.
476
-
477
- **Which toolchain: the consumer-audience subset of the roster.** The roster
478
- carries an audience axis (context-kit/SPEC.md §bin/env-probe), and a member
479
- declared contributor-side is one no install path and no vendored gate reaches —
480
- `cargo` is the case that exists. `doctor` walks the roster through that
481
- predicate and a contributor-audience member is not probed, not rendered and
482
- cannot set the verdict. It is left out rather than reported as informational on
483
- purpose: `doctor` is the adopter's verb, and showing an adopter a tool they do
484
- not need is an invitation to install it. So **`DOCTOR: clean` is a claim about
485
- this machine as a consumer**, not about the machine — which is the narrowing
486
- that makes the exit status usable as `init`'s precondition, since what `init`
487
- needs to know is exactly whether the tree it is about to vendor into will run.
488
-
489
- It has two behaviors, selected by where you run it rather than by a flag. Run
490
- anywhere, it reports the toolchain verdict. Run inside a repository that has
491
- been vendored into, it additionally reads `checkwright.lock` and reports the
492
- installed release, the upstream commit it came from, the profile, and the kit
493
- set — plus, where one was installed, the gate binary's target re-verified
494
- against its recorded digest **in place**, and any omitted members against the
495
- reason that caused them (§The gate binary).
496
-
497
- Those last two **report without setting the exit status**, and the asymmetry is
498
- deliberate rather than lenient. The status is the toolchain contract, and `init`
499
- gates its own precondition on it — so reddening here for a swapped or missing
500
- binary would block the `init` re-run that is the finding's own remedy. A binary
501
- that cannot be dispatched to is caught where it is dispatched from: the battery
502
- treats it as a harness error rather than a skip.
503
-
504
- Not setting the status is not the same as staying quiet about it, and the
505
- verdict line says which state it is in. A run carrying an artifact finding
506
- reports the toolchain clean **and names the finding**, rather than signing off
507
- as plainly clean — a `doctor` that printed `DIGEST MISMATCH` above and `clean`
508
- below would be the surface teaching a reader to disbelieve the last line.
509
-
510
- **The identity block names the registry this tree's battery runs from**, beside
511
- the version, commit, profile and kit set. It is the one install fact the identity
512
- fields cannot be read off, and the one a reader most needs when the report and
513
- the tree seem to disagree: a `doctor` that resolved the wrong file would
514
- otherwise say nothing at all about which one it inspected. A recorded registry
515
- missing from disk is named as such, and a manifest recording none says so — both
516
- with the same remedy, a re-run of `init`.
517
-
518
- `doctor` defines no floor of its own. It sources the toolchain roster out of
519
- its own `payload/` and renders whatever verdict that roster's predicate
520
- returns, so the contract keeps one owner and this stays a display of it. Which
521
- members are consumer-audience — and so which absences set the verdict — is read
522
- off that roster, never listed here; §Requirements works the one case a reader
523
- arrives with, `jq`, and says why it is below contract rather than outside it. The
524
- payload copy is the one it reads, never a copy in the tree it is inspecting:
525
- at `init` time nothing has been vendored there yet, so a tree copy would not
526
- exist at the moment the answer is needed.
527
-
528
- **A residue is read apart from an install, and reported as one.** A
529
- `checkwright.lock` carrying `files` and no `version` is not an install — it is
530
- what `uninstall` leaves over files you had edited (§uninstall) — and `version`
531
- is the field an install always has and a residue never does, so its absence is
532
- the discriminator. On that reading `doctor` reports how many files remain and
533
- that they are yours, and prints **no** identity block, no artifact check and no
534
- omitted-member report: every one of those is a per-install reading with nothing
535
- left to describe. Blank identity fields would be uninformative rather than
536
- wrong, but printing them beside a residue message is the same mixed-verdict
537
- shape the exit-status carve-out above already refuses.
538
-
539
- On both readings `doctor` closes by naming `diff`. It reports what was
540
- installed, never whether the tree still matches it, and keeping the two apart is
541
- what stops `DOCTOR: clean` from being read as a claim about the tree's contents.
542
-
543
- A third exit status, `2`, means the question could not be answered rather than
544
- that the answer was bad: the package carries no payload, or the manifest
545
- carries a schema key this build does not know. A build refuses an unfamiliar
546
- manifest rather than guessing at the shape behind it. **A missing program is that
547
- same status by derivation rather than by a new code** — a verb refusing because
548
- `jq` is absent has not judged the tree, the package or the manifest, which is
549
- what `1` is reserved for; it could not answer. It is also the status the
550
- misdiagnosing refusals already exited with, so no caller's exit-code handling
551
- changes and only the message does.
552
-
553
- ## update
554
-
555
- `checkwright update` is `init` with **one added precondition and its arguments
556
- forwarded verbatim**: `checkwright.lock` must already exist, so a verb named
557
- `update` can manage an install but never perform the first one. Every `init`
558
- flag stays valid — `--profile`, `--force`, `--no-commit` and `--dry-run` among
559
- them — because none of them is reimplemented here. `update` checks its one
560
- precondition and then *becomes* `init`.
561
-
562
- That is the whole of the difference, and it is deliberate. Upgrading is already
563
- what a second `init` does: it compares the recorded version against the
564
- payload's and falls through in the upgrade direction, re-reads the profile from
565
- the manifest when none is passed, and re-applies the payload around every file
566
- you have edited since. A separate implementation would be a second copy of all
567
- of that, free to drift from the original. So `update` is a **name**, not a
568
- second mechanism — one operation under two names, where the second name is the
569
- one an adopter looks for.
570
-
571
- It checks existence and no more. An unreadable schema, a stale downgrade, a
572
- below-contract toolchain — each is `init`'s own precondition, one call away, and
573
- repeating any of them here would be the copy this design exists to avoid. Being
574
- outside a git work tree is not this verb's precondition either: `init`'s own
575
- refusal already names the accurate remedy, so an unresolvable root falls through
576
- to it rather than being misreported as an absent manifest.
577
-
578
- **Residue, recorded rather than papered over.** Because the delegation is real,
579
- most of what you see comes from `init` and says so. The one refusal `update`
580
- owns is prefixed `checkwright update:`; every other refusal — not a git work
581
- tree, an unknown schema, a dirty worktree, a stale downgrade, a below-contract
582
- toolchain, an absent `jq` — arrives prefixed **`checkwright init:`**, and the
583
- success path
584
- reports `INIT:`, because that is literally which verb produced the line. The
585
- `jq` refusal inherits this without a second rule: it is raised from `lock.sh` but
586
- surfaces through the calling verb's own `die`, so it carries that verb's prefix,
587
- its `help:` line and its exit code rather than a separate idiom. This is
588
- honest rather than untidy: the prefix names the operation that actually ran, and
589
- renaming it cosmetically would hide exactly the delegation that makes these two
590
- verbs one. It is written down here so that a `checkwright init:` line answering
591
- a command you typed as `update` reads as the design rather than as a bug.
592
-
593
- ## diff
594
-
595
- `checkwright diff` answers *which of the files `init` wrote have I changed?* It
596
- classifies every `files` entry against the tree with the **same hash comparison
597
- `init` makes** before it rewrites anything, so the report and the protection are
598
- never two opinions.
599
-
600
- Three classes, two of them named apart rather than pooled. **Unchanged** is
601
- counted only. **Changed** means the content differs from what `init` wrote — the
602
- sanctioned case, and the one the ownership contract exists to protect.
603
- **Missing** means a recorded path is not on disk, and it is separated
604
- because its consequence differs: §The manifest's exit rule means the next `init`
605
- silently drops a missing path from the roster and writes it fresh, which is
606
- worth a warning before it happens rather than after.
607
-
608
- **The exit status is the verdict**: `0` every recorded entry matches what `init`
609
- wrote, `1` at least one has changed or gone missing. That is what being a verb
610
- of its own buys — a CI step can gate on *is our vendored tree pristine?* without
611
- parsing a report, and without borrowing a status the toolchain contract owns
612
- (§The verbs).
613
-
614
- Its preconditions are the ones its subject requires: inside a git work tree, a
615
- manifest present, and a schema this build knows. It writes nothing, so it has no
616
- `--dry-run`.
617
-
618
- Run against a **residual** manifest, `diff` reports the survivors as `changed`.
619
- That is neither a special case nor a defect: they are recorded at the hashes
620
- `init` wrote and they carry your edits, so *changed* is exactly what they are.
621
-
622
- ## uninstall
623
-
624
- `checkwright uninstall` reverses an install against the roster `init` recorded,
625
- and against nothing else. Install, see what it does, reverse it — that is the
626
- property the adoption story rests on rather than an ergonomic extra.
627
-
628
- **Preconditions**, all refusing rather than warning, and all checked before
629
- anything is removed, because a partial removal is the outcome none of them may
630
- produce: inside a git work tree; a manifest present with a schema this build
631
- knows, else a refusal naming `init`; and a clean worktree, for `init`'s own
632
- reason — one commit is made, and a dirty tree would fold your work into it.
633
- `--no-commit` is the same valve on the same terms. The parallel with `init`
634
- stops one clause short, and the divergence is deliberate rather than an
635
- oversight to be tidied: `init` regenerates on every run, so it needs an arm that
636
- commits what a no-op rewrote (§init), while `uninstall` only ever removes — a
637
- removal it declines to make writes nothing, so there is no residue for such an
638
- arm to find.
639
-
640
- **The removal rule is the ownership contract seen from the other side.** For
641
- each `files` entry: hash the file, remove it while the hash still matches what
642
- `init` recorded, and **keep and report** it when it differs. So it removes only
643
- files this installer wrote and you have not touched, never a file you wrote —
644
- and it needs no new data to do that, because §The manifest already records every
645
- path at the hash `init` last wrote there. A recorded path already off the tree
646
- is a no-op rather than an error: it left the roster when it left the tree.
647
- `--force` removes what would otherwise be kept, meaning here exactly what §init
648
- says it means there — overwrite what `init` would otherwise protect.
649
-
650
- The gate binary needs no special case. `init` records it as an ordinary `files`
651
- row *and* under the separate `artifact` key; the roster walk removes it like any
652
- other row, because `artifact` is identity rather than ownership.
653
-
654
- **The manifest is not a `files` row, and it is disposed of explicitly.** `init`
655
- appends `checkwright.lock` to its written set only after emitting it, so the
656
- file never records itself. With nothing kept, it is deleted. With any entry
657
- **kept**, it is rewritten over the survivors instead: deleting it
658
- would disown exactly the paths the hash rule just protected, and the next `init`
659
- would find them unrecorded, read that as *never installed*, and write straight
660
- through your edits. That residual shape, and the argument for it, are owned by
661
- §The manifest.
662
-
663
- **The agent file is the one non-whole-file removal**, because it is the one
664
- entry that is a span rather than a file (§The manifest). Two branches. Its hash
665
- matches, meaning `init` created it and you never touched it, so it goes with
666
- everything else. Its hash differs, so the file is kept and the **doctrine block
667
- is trimmed out of it** — that block is prose you did not write, in the one file
668
- whose purpose is to steer agent sessions, pointing at a doctrine file this verb
669
- just removed, and leaving it inert there is not neutral. The trim runs through
670
- the payload's own copy of doctrine-kit's installer (doctrine-kit/SPEC.md
671
- §install-doctrine), so it adds no second copy of the marker strings and still
672
- works once the vendored kit is gone. It is scoped to that span alone: a
673
- marker-bounded block belonging to some other tool is one `init` never wrote, so
674
- it is never a `files` entry and never this verb's to touch. The trim is left
675
- **unstaged** — the rest of that file is yours to review.
676
-
677
- **Directory pruning is bottom-up and removes only what is now empty.** A
678
- directory still holding anything is left alone, whether that is a file you added
679
- or one you edited: `uninstall` removes files it owns, never directories it
680
- merely emptied around. A file you added inside a vendored directory is not on
681
- the roster, so it is never removed — and `--dry-run` names it, because a
682
- directory left behind holding only your own files is a surprise worth spending a
683
- line on before the run rather than after.
684
-
685
- **The hook opt-in is reported, not rewritten.** When `core.hooksPath` points
686
- inside the gates directory that was just removed, `uninstall` prints the
687
- `git config --unset core.hooksPath` line for you to run and does not run it. Git
688
- config is outside the ownership roster, and a `core.hooksPath` naming a
689
- directory that is not there is inert rather than breaking, so there is
690
- nothing here to justify writing outside the contract.
691
-
692
- `--dry-run` prints the plan — what would be removed, what would be kept and why,
693
- the residual manifest if there is one, and any file of yours that will be left
694
- behind inside a vendored directory — writes nothing, and exits 0.
695
-
696
- **The commit** is one commit naming the profile and the version, staging the
697
- removals and the manifest disposition. Files kept for you are never staged, on
698
- the same reasoning that keeps `init`'s written set and its recorded roster
699
- apart. A run with nothing to remove says so and exits 0 without narrowing the
700
- manifest: the install is still there, so disowning it would be false.
701
-
702
- ## Profiles
703
-
704
- You pick how much of the methodology to meet first, and *which part* of it —
705
- `starter`, `delegation`, `prose`, `full`. Those are not four rungs on one ladder:
706
- `delegation` and `prose` contain neither the other, because they answer different
707
- questions about what your repository is.
708
-
709
- **The contract is the lattice, and it always was.** Profiles are ordered
710
- by kit-set containment, and that order is derived from the rosters rather than
711
- declared beside them. The promise it makes, stated precisely: *moving from a
712
- profile to one that contains it only ever adds — to the vendored tree and to the
713
- battery you run — and profiles that contain neither the other are alternatives,
714
- not steps.* The order is bounded: exactly one profile sits below every other,
715
- exactly one above every other, and the one above is `full` by construction.
716
- So nothing you already vendored is taken away or rearranged underneath you when
717
- you move up, and a profile that is nobody's step is still a legitimate member.
718
-
719
- - **`starter`** is the framework — the gate SDK on its own. You get a battery,
720
- a generated pre-commit hook, and gates that already red on real defects in
721
- your own tree without any configuration outside your gates directory.
722
- - **`delegation`** adds every kit whose subject is the agent session itself:
723
- the stage machine a session runs, the queue it selects work from, the
724
- evidence a stage produces before it can close, the protocol it follows when
725
- it spawns, the context budget it runs inside, the permission surface it acts
726
- through, and the delivery doctrine it follows.
727
- - **`prose`** adds canon-kit instead: the kit whose subject is authored
728
- documents, for a repository whose artifacts are prose rather than code. What
729
- arrives armed is link, claim, staleness and pointer governance over every
730
- `README.md` at any depth and your agent file — real for a documentation repo,
731
- since a docs tree is usually a tree of READMEs. It is deliberately **not**
732
- governance over `docs/*.md`: no kit spells one project's prose layout, so
733
- widening the corpus is your own `CANON_KIT_PROSE_SURFACE_GLOBS` line in the
734
- canon-kit config seam `init` already writes into your gates directory.
735
- - **`full`** is everything in the payload.
736
-
737
- `starter`, `delegation` and `prose` are rosters in `profiles.list`, because none
738
- follows from the tree — each is a judgment about what an adopter should meet
739
- first, and the file records the criterion behind each membership beside it.
740
- `full` is derived instead: it is every kit root the payload carries, resolved
741
- at run time, never a list to maintain. The **shape** is derived too — the order,
742
- its bounds, and the monotonicity above are computed from the rosters and the
743
- payload by `lib/common/profile.sh`, so a membership row and a declared parent
744
- can never disagree.
745
-
746
- ## The manifest
747
-
748
- `init` writes `checkwright.lock` at the root of the repository it vendors into,
749
- and that file is tracked like everything else it writes. It is JSON, read with
750
- `jq`, and it is the install-ownership record: what was installed, from which
751
- upstream state, and which files this installer owns. `lib/common/lock.sh` is
752
- its schema owner — the wire key, the accessors, the hash rule and the emitter
753
- live there, so the two verbs that write a manifest and the verbs that read one
754
- cannot drift apart. Being the single writer is what makes the shape a contract
755
- rather than a convention: keys are sorted at every nesting level, and a field is
756
- present exactly when its writer supplied one, so an omission leaves the key
757
- **absent** rather than null or blank. `commit` is the field that rule most
758
- recently had to be applied to: a package with no commit stamp leaves it out of
759
- the manifest rather than writing it empty, on the same conditional footing the
760
- `artifact` key already sat on. Until the `jq` precondition landed ahead of it, an
761
- empty `commit` was ambiguous between *no stamp* and *no `jq`* and was masked by
762
- statement order alone; with `jq`'s absence refused up front the field is
763
- decidable, and the writer's existing omission rule settles it with no new one.
764
-
765
- Reading it needs `jq`, and that is a dependency of the verbs rather than of the
766
- file: `lock.sh` declares it once, beside the wire format it is a fact about, and
767
- each JSON-reading verb calls that declaration before its first read. So a machine
768
- without `jq` is told which program is missing, instead of being told the package
769
- has no version stamp or the manifest has an unknown schema — refusals that are
770
- correct for the conditions they name and were never correct for this one.
771
-
772
- The wire key is versioned (`checkwright-lock v1`, in `CHECKWRIGHT_LOCK_SCHEMA`)
773
- and a build that meets a key it does not know refuses rather than guessing at
774
- the shape behind it.
775
-
776
- | Field | Holds | Read by |
777
- | --- | --- | --- |
778
- | `schema` | the versioned wire key | every verb, as its first act — an unknown key is a refusal |
779
- | `version` | the release the payload was cut at | `doctor` reports it; a re-run of `init` compares it against the payload's and refuses a silent downgrade |
780
- | `commit` | the 40-hex commit the payload was assembled from | `doctor` prints it — it is what lets a reviewer resolve the vendored tree to an exact upstream state |
781
- | `profile` | the profile selected | a re-run of `init` re-applies the same profile without asking again |
782
- | `kits` | the vendored kit set | `init`'s re-run file plan, and `doctor`'s installed-set report |
783
- | `files` | `init`'s ownership roster — each path it has written, at the content hash it last wrote there, until the file leaves the tree | `init`'s changed-file detection: a file whose hash still matches is rewritten, one that has changed is reported rather than overwritten, and stays on the roster so the next run reads it the same way, whether or not the running release still ships that path. `uninstall` walks the same roster to decide what it may remove and what it must keep, and `diff` classifies it against the tree |
784
- | `artifact` | the gate binary's `target` and its SHA-256 `digest`, or absent | `doctor` reports the target and re-verifies the digest in place; a re-run of `init` compares the target against this host and skips the rewrite while the digest still holds |
785
-
786
- **Resolving one of your own seam files is an exact-path question, not a search.**
787
- `doctor` and `uninstall` both need to know which `gates.list` — or which
788
- `gate-sdk-config.sh` — is *yours*, because the vendored kits carry fixture trees
789
- holding files of the same name. `files` already answers it: it records the
790
- repo-relative path `init` wrote, and `lib/common/recipe.sh` owns the gates-dir
791
- constant `init` wrote it under, so `lock_own_file` asks whether the manifest
792
- records that exact path and returns it or nothing. A tail match cannot answer it,
793
- and **no predicate over the recorded kit set repairs a tail match**: `files`
794
- outlives `kits` by design, so a re-run at a narrower profile leaves the dropped
795
- kits' fixture paths on the roster with nothing excluding them, and the residual
796
- manifest below carries no `kits` key at all — there, such a predicate excludes
797
- nothing whatever. The consumer smoke's narrowing arm is the oracle for both.
798
-
799
- **A recorded hash is what `init` last wrote at that path** — on whichever run
800
- last wrote it — and not the state of the tree at the end of the current run. The
801
- two readings coincide for every path `init` rewrites and part company for exactly
802
- one class: a path `init` left alone because you had edited it. That path stays in
803
- `files` at the hash `init` put there, carried forward from the previous manifest
804
- rather than recomputed, so the next run still has something to compare your
805
- content against, still finds it different, and still leaves it alone. Editing a
806
- file changes who may write it; it never changes whether `init` is tracking it.
807
-
808
- **`checkwright.lock` is not on its own roster.** `init` adds the manifest to what
809
- it has written only after emitting it, so the lock file never records itself. Any
810
- path that walks `files` to decide what this installer owns therefore has to
811
- dispose of the manifest explicitly: the roster will not name it.
812
-
813
- **One entry is a span rather than a file, and it is still an ordinary entry.**
814
- Everything above reads a `files` row as a whole file `init` wrote. The agent
815
- file is the exception: `init` creates it only when it is absent, and thereafter
816
- authors only the marker-bounded doctrine block *inside* it — everything outside
817
- that span is yours and is never read or rewritten. The row is nonetheless
818
- whole-file, hashed and compared like every other, and two things follow. Your
819
- edit **anywhere** in the file marks the entry changed, which is a true report
820
- rather than a defect. And that report does not stop the span from being
821
- maintained: the block is injected before the file is claimed, so the doctrine
822
- block keeps upgrading on every run while the rest of the file stays yours. What
823
- survives *inside* the span across that rewrite is doctrine-kit's contract rather
824
- than this installer's — its declared-trim round-trip and the bound on it are
825
- `doctrine-kit/SPEC.md` §install-doctrine.
826
-
827
- **A path leaves the roster when the file leaves the tree, and at no other
828
- moment.** `init` owns a path because it wrote the file there, so only the file's
829
- disappearance can end that. A release that stops shipping the path does not: the
830
- file is still on disk, it may carry your edits, and disowning it is exactly what
831
- would let a later release re-adding the same path write straight through them.
832
- Neither does an `uninstall` that **kept** the file: a file kept is a file `init`
833
- wrote that is still on disk, so its ownership has not ended and the roster must
834
- retain it. That is the rule the residual manifest below follows, rather than a
835
- carve-out from it.
836
-
837
- **A relinquished path is an ordinary entry, not a state of its own.** When a
838
- release stops shipping something `init` created, nothing visits that path on the
839
- run, so it is carried forward at the hash `init` last wrote there — the same
840
- carry-forward, the same `files` row, the same protection every other entry gets.
841
- There is no *once ours, now relinquished* state for a reader to learn. Nor can
842
- the roster grow without bound from it: the existence test is already the reaper,
843
- so `files` is bounded by the files `init` created that still exist, which is the
844
- ownership set itself. What `init` never does is delete, so a path no release
845
- ships any more stays on disk and stays yours to remove.
846
-
847
- **"Nothing visited it on the run" is a claim about the whole run, so the
848
- carry-forward is the last pass `init` makes before it stages.** Every path `init`
849
- writes has to be on the written set by the time that pass runs, or it carries a
850
- path `init` rewrote seconds earlier at a hash the run has already superseded — and
851
- a carried path is not staged, so the file is left dirty *and* the roster records a
852
- hash the run itself has replaced. Both halves reach past the worktree: `uninstall`
853
- and `diff` read that hash to decide whether a path is still `init`'s, so a
854
- superseded one reads to them as your edit. The generated projections are the ones
855
- that can reach the pass from the wrong side, which is why `init` produces them
856
- before it rather than after.
857
-
858
- The hash carried forward is the one `init` wrote, not the one this payload would
859
- have written. Either would protect the file, so protection does not decide it —
860
- the **revert** does. Restore the file to what `init` put there and it is `init`'s
861
- to rewrite again, which works only when the recorded hash is what `init` actually
862
- wrote; recording an intended write would report the path as changed forever and
863
- would record a write that never happened.
864
-
865
- That is a change of meaning, not of shape, so the wire key stays
866
- `checkwright-lock v1`. A reader built before it meets one of these entries, finds
867
- a hash that disagrees with the tree, and does exactly what it does today: reports
868
- the file changed and leaves it alone. A retained relinquished entry passes the
869
- same test even more quietly — that reader's payload does not ship the path, so it
870
- never asks whether it may write there and does nothing with the entry at all. The
871
- old behavior on the new data is the behavior the new meaning wants, so there is
872
- nothing for a version key to protect.
873
-
874
- **The residual manifest** is the second shape this file takes, and the exit rule
875
- above is what produces it. When `uninstall` keeps at least one file, it rewrites
876
- `checkwright.lock` over the survivors, and that object carries **`schema` and
877
- `files` only**. `version`, `commit`, `profile`, `kits` and `artifact` all
878
- describe an install this tree does not have, and a manifest asserting them would
879
- be false. The survivors are recorded at the hashes `init` wrote and never at
880
- yours: an entry rewritten at your hash would read as *unchanged* on the next
881
- install and let it write straight through you, which is the defect this shape
882
- exists to prevent — the same reason the roster names a dropped entry and an
883
- adopter-hashed entry apart.
884
-
885
- The wire key stays `checkwright-lock v1` here too, on the precedent just above:
886
- an identity field an install always carries is optional within a shape a reader
887
- already tolerates, which is a change of meaning rather than of shape. That it is
888
- safe is a property of the existing readers, checked rather than assumed.
889
- `init`'s downgrade refusal is guarded on a non-empty `version`, so an absent one
890
- skips it — correct, since there is nothing to roll back. `init` re-reads
891
- `profile` only to default it, so an absent one falls through to `starter`, which
892
- is what a virgin tree gets and what the residue is. `doctor` reads the identity
893
- fields for display, and rather than printing them blank it reads their absence
894
- as the residue itself (§doctor). The honest residue is that a reader built
895
- before this meets a residual manifest and prints blank identity fields —
896
- uninformative, never wrong-acting.
897
-
898
- A recorded **`files`** hash is `git hash-object`, never `sha256sum`. Not a
899
- portability detail worth burying: macOS ships `shasum` rather than `sha256sum`,
900
- and the answer is not a new tool requirement — git is already something the
901
- toolchain contract asserts, its object hash is content-addressed and stable, so
902
- the manifest's integrity story stays inside the toolchain that contract already
903
- covers.
904
-
905
- **Two hash families, on two classes of file, each stated where it is used.** The
906
- scope above is exactly `files`, and `artifact` is deliberately outside it. The
907
- two hashes answer different questions and are not unified. A `files` hash is
908
- **change detection** — has the adopter edited something `init` wrote — where
909
- collision resistance is not the property needed and staying inside git's
910
- already-asserted toolchain is worth more. The artifact's digest is an
911
- **integrity claim**, published for a reader to cross-check; `git hash-object`
912
- defaults to SHA-1, and a SHA-1 supply-chain digest would undercut the one claim
913
- §The gate binary makes.
914
-
915
- That is also why `artifact` is its own key rather than a `files` row. A `files`
916
- entry means *hashed with `git hash-object`, rewritten when unmodified*, and this
917
- one is hashed with SHA-256 against a published value and rewritten on a
918
- different rule — so a `files` row would put two hash families on one map. The
919
- uniformity that map is held to is the hash *function* across every entry, which
920
- is why the argument survives the paragraphs above: it never rested on an entry
921
- agreeing with the tree. The consumer smoke does assert that agreement entry by
922
- entry, against a **freshly initialized** consumer, where no adopter edit exists
923
- for a carried-forward hash to come from. The
924
- binary is still written by `init` and still tracked. A new optional top-level key
925
- is additive within the versioned wire key: a reader that does not know it sees
926
- the same manifest it always did.
927
-
928
- **The path is absent, and that is not an omission.** The install location has
929
- exactly one owner — `GATE_SDK_NATIVE_BIN` in your `gate-sdk-config.sh` — and
930
- that value is what the battery actually dispatches to. A stored copy could
931
- disagree with the live one, so every reader that wants the path resolves it from
932
- the same owner.
933
-
934
- ## The consumer smoke
935
-
936
- `consumer-smoke/run-smoke.sh` is the acceptor for everything above, and it is
937
- registered as a validate suite so a bit-rotted activation path is a red
938
- validate rather than a discovery at announcement.
939
-
940
- **The smoke packs the tree it lives in, by construction — the current directory
941
- does not select it.** The script resolves that tree from its own path and hands
942
- it to `scripts/pack-installer.sh --root` at every one of its pack call sites, so
943
- the packed tree and the asserted tree are the same tree whatever directory you
944
- invoke from. A clone's copy invoked by absolute path, a second
945
- checkout, a linked worktree: all pack the tree the script belongs to. The
946
- packer's flag roster has exactly one tier and it is the script itself —
947
- `bash scripts/pack-installer.sh --help` prints it on stdout at exit 0 — so no
948
- doc carries a second copy to drift.
949
-
950
- *The former invocation requirement is retired, not merely unstated.* Until
951
- `--root` existed, this section carried a standing rule — "run it with the
952
- current directory inside the tree under test", with `env -C <clone>` as the
953
- remedy — because the packer resolved its root from the current directory while
954
- the smoke resolved its own from its script path, and nothing detected the
955
- disagreement: the run packed the *invoking* tree and printed an ordinary success
956
- for source the clone never contributed. That rule is now false rather than
957
- merely unnecessary — following it changes nothing, and a reader who restores it
958
- is guarding a hole that `--root` closed. The `PACK:` line names its resolved
959
- root for exactly this reason, so a reviewer scanning smoke output can see which
960
- tree the run described instead of inferring it from a twelve-character hash.
961
-
962
- **The tree must be clean, and the suite says so before it spends ten minutes
963
- proving it.** The smoke asserts that tree is clean in its preflight, beside the
964
- tool checks and before the first build step. The packer keeps its own
965
- dirty-worktree refusal — the preflight removes the common case but not the real
966
- one, since the suite packs four separate times across a ~10-minute run and a
967
- concurrent edit mid-run trips a check the caller did not choose the moment for.
968
- That late refusal names the root it resolved and states that the check is
969
- per-invocation, so it reads as a precondition checked at an awkward moment
970
- rather than as a broken installer.
971
-
972
- It builds the host gate binary, packs the package around it, installs it **from
973
- the resulting tarball with
974
- `--offline`**, and drives a scratch consumer once per profile: `init`, then the
975
- battery must be green, then the manifest must agree with the tree it describes
976
- file by file, then the **queue post-condition** — a profile whose kit set reads
977
- the queue file must have one, satisfying `check-queue-sections`, and a profile
978
- whose kit set does not must have none — then a re-run must leave the tree object
979
- identical, then `doctor`
980
- must exit 0 and name the installed profile, and then the **value arm** — the
981
- consumer authors one page of markdown carrying one real defect, a mistyped
982
- relative link in a `README.md`, and the battery's verdict on it is recorded
983
- before the link is corrected and the battery must be green again. The fix is the
984
- link and never the corpus: the tree the second run sees is byte-identical to the
985
- first apart from the typo, so the green is the defect being gone rather than the
986
- scan having narrowed, and a profile green on the first run must still be green
987
- on the second. The arm restores the consumer to the commit it found, so the
988
- reversal below still runs against the tree `init` wrote.
989
-
990
- **The payload every profile installs carries a real gate binary**, because the
991
- value claim is a claim about the product an adopter receives. The smoke compiles
992
- the crate for the host target, emits the digest sidecar beside it and hands the
993
- pair to `pack-installer.sh --artifacts` before the loop starts, so each profile's
994
- battery is the battery a covered platform actually gets. It was not always so,
995
- and the accident is worth naming rather than quietly fixed: a main loop packing
996
- no artifact makes *every* profile an uncovered-platform install, so a value
997
- verdict measured there is a verdict about the omitted battery wearing the
998
- shipped one's name. It costs no new dependency — the preflight already requires
999
- `cargo` and `rustc`.
1000
-
1001
- *A host-built artifact is a harness stand-in, and is labelled one where the rule
1002
- it stands beside is cited.* gate-sdk/SPEC.md §Consumer payload rules that the
1003
- payload carries a prebuilt binary per declared target, *built by the release and
1004
- never from a working tree*. The smoke builds from a working tree because it has
1005
- no Release to draw on. That is a liberty this harness takes, not the payload rule
1006
- relaxing: the publishing path still cannot build, and `pack-installer.sh` is
1007
- still handed a directory it did not produce.
1008
-
1009
- **The value claim is asserted over the loop, not inside it**, and it is two
1010
- sentences: some profile catches the defect at all, and some profile *below* the
1011
- payload-derived maximum catches it. The second is the load-bearing one — a
1012
- defect only `full` catches is not value an adopter can choose, it is value they
1013
- have to take everything for. Neither sentence names a gate: naming one would be
1014
- a second roster to maintain beside `recipe_gates`, and the claim is about the
1015
- battery rather than about a member of it. Nor does either name a profile, for
1016
- the same reason the lattice assertions do not — which profiles catch a prose
1017
- defect follows from the rosters, and spelling it here would be that derivation
1018
- copied out. What the arm turns from a claim into an assertion is the one the
1019
- install page makes hardest to check: an install that is green, idempotent and
1020
- reversible is still worth nothing until it catches something.
1021
-
1022
- That is the **coverage** claim, and it speaks only for a covered platform. What
1023
- an adopter on an uncovered one gets is a different claim — **disclosure** — and
1024
- it has its own leg, because folding the two into one verdict is what let a cohort
1025
- of ports pass per member while emptying a value class for every binary-less
1026
- install.
1027
-
1028
- **The binary-less leg** installs one profile from a payload packed with no
1029
- artifact, and asserts that every member the install loses is recorded
1030
- `# omitted: <name> <reason>` in the consumer's own `gates.list` — against the set
1031
- that payload dispatches to a binary, derived rather than spelled — and that the
1032
- count is **non-zero**. The count is the half that matters: without it the
1033
- completeness assertion passes vacuously on a payload that dispatches nothing,
1034
- which is exactly the reading under which N individually runnable members
1035
- discharged a cohort that left such a consumer with no markdown-link governance at
1036
- all (gate-sdk/SPEC.md §The port-candidate criteria, criterion 5). The leg
1037
- deliberately does **not** assert that the planted defect goes uncaught: pinning a
1038
- missing capability as expected behavior would make the hole permanent the moment
1039
- it closes. It names a profile where the value claim above names none, and the
1040
- difference is real — this is a scoping choice about which install to run, not a
1041
- derivation of which profiles catch what. The profile it names is the one whose
1042
- roster criterion the binary-gated class empties.
1043
-
1044
- It also asserts the profile lattice
1045
- against the installed payload, in four parts: every named kit resolves in the
1046
- payload; the derived order has **exactly one minimum and exactly one maximum**,
1047
- so the lattice is bounded; that maximum is the payload-derived profile; and
1048
- **gate rosters are monotone** — for every comparable pair, the smaller profile's
1049
- gate set is contained in the larger's. The fourth is the one that earns
1050
- `recipe_gates`' profile argument: what you experience is the battery, not the
1051
- directory list, so "moving up only ever adds" is a claim about gates, and
1052
- kit-set containment stops implying it the moment a roster varies by profile.
1053
- Nothing here counts profiles; a fourth is admitted exactly when it fits.
1054
-
1055
- **The reversal arm** then runs on that same consumer, so every profile is
1056
- installed *and* reversed. In order: `diff` must exit 0 and report the freshly
1057
- installed tree clean; `uninstall --dry-run` must name a non-zero removal count
1058
- while leaving the tree object and `git status` exactly as they were; then
1059
- `uninstall`, after which the consumer's tree object must equal the one it had
1060
- **before `init` ran**, the worktree must be clean, and no `checkwright.lock` may
1061
- remain. The `--dry-run` step is where the writes/does-not-write rule in §The
1062
- verbs is asserted for `uninstall`, and asserted behaviorally: a flag that parsed
1063
- and then wrote anyway fails it, where a flag that merely existed would pass. It
1064
- is the only verb this arm holds to that rule — §The verbs states the bound.
1065
-
1066
- **The tree-object equality is the load-bearing assertion, and it proves more
1067
- than `uninstall`.** Nothing else here asserts that the manifest covers
1068
- *everything* `init` wrote — the per-profile check runs the other direction,
1069
- every recorded entry against the tree. A file `init` wrote and failed to record
1070
- survives the removal and breaks this equality, so the arm closes that hole as a
1071
- side effect. It is also the assertion form of the claim the install page makes:
1072
- an install an evaluator can reverse.
1073
-
1074
- The equality holds for a reason rather than by luck. The surfaces `init` seeds
1075
- and then leaves alone — the queue file, the agent file, the evidence manifests,
1076
- the workflow state — are recorded at `init`'s own hashes, and this consumer
1077
- never edits them, so the ordinary hash rule removes them. That same rule keeps
1078
- them on a tree where an adopter *has* grown them. No special case either way,
1079
- which is why the arm needs none.
1080
-
1081
- A second arm drives the **download transport**: it verifies the packed tarball
1082
- against a digest the smoke computes, extracts it with `tar` rather than npm,
1083
- and runs the same `init`, the same post-conditions and the same reversal with
1084
- `npm` and `node` **masked off `PATH`** — so `diff` and `uninstall` are proved
1085
- Node-free by the arm that already exists, at no extra pack cost. It runs against `full` alone rather than per profile —
1086
- what the per-profile loop proves (the payload resolves and each profile's kit
1087
- set is present) is profile-dependent, while what this arm proves (the same
1088
- payload reached the tree without Node) is transport-independent, and `full` is
1089
- the largest payload with the widest `doctor` toolchain read. The smoke's
1090
- preflight still requires `npm` and `node`, because packing needs them; the
1091
- masking is around this arm's `init` only.
1092
-
1093
- Those transport arms carry two load-bearing properties, neither displacing the
1094
- other. The offline tarball install is what turns "this is a one-shot vendoring installer,
1095
- not a dependency channel" from a claim into an assertion: a package that
1096
- installs and runs with no registry access after the fetch is not resolving
1097
- anything on your behalf. The masked-`PATH` arm is what turns "the Release
1098
- tarball needs no Node" from a sentence into an assertion — without the masking
1099
- the two arms would differ only in how the bytes arrived, and a latent Node
1100
- dependency would pass silently on any machine that happens to have Node.
1101
-
1102
- The mask is itself asserted rather than assumed: before the arm runs, each
1103
- masked name must resolve to the shim, so a `PATH` that quietly failed to shadow
1104
- the real interpreter reds instead of passing. Shims rather than deletion,
1105
- because dropping every `PATH` entry carrying `node` would take `/usr/bin` with
1106
- it wherever Node is installed there. The residue is that a payload merely
1107
- *probing* for a Node binary still finds a name; one that *runs* it fails loudly
1108
- and says which name it reached.
1109
-
1110
- **The toolchain-free arm** points that same mask at `cargo` and `rustc`, and
1111
- drives `doctor` and then a full `init` on a consumer that has neither. It
1112
- asserts that `doctor` exits 0 and reports clean, that it names neither masked
1113
- tool in its report — a contributor-audience member is omitted from the adopter's
1114
- verdict, not shown as informational (§doctor) — and then, through the same
1115
- post-conditions every other arm runs, that `init` succeeds and the vendored
1116
- battery is green. `doctor` is asserted before `init` as well as inside it,
1117
- because `init` reads only its exit status: the standalone verdict is what an
1118
- adopter meets first and what every later refusal is downstream of.
1119
-
1120
- That arm exists because nothing else here could see the defect it holds out.
1121
- The smoke's own preflight *requires* `cargo` and `rustc`, legitimately — it
1122
- builds the binary the payload carries — so every arm above drives `doctor` and
1123
- `init` on a machine that has them. **Masking is per-arm**, which is exactly what
1124
- lets this arm exist without weakening that preflight: the host requirement is
1125
- unchanged and the build step still gets the real tools. What the arm asserts is
1126
- sharpened by that payload rather than compromised by it — it installs a
1127
- *prebuilt* artifact with no toolchain on `PATH`, which is the claim the port
1128
- directive rests on: an adopter takes the pre-compiled path, and nothing on it
1129
- compiles. The mechanism is the
1130
- existing Node-free mask rather than a new facility, and it is reused rather than
1131
- replaced by a knob for a reason: `INSTALLER_SMOKE_TMP_DIR` stays the smoke's only
1132
- knob, a knob that suppressed a roster member would be a second, test-only
1133
- audience axis whose production behavior no adopter ever exercises, and a masked
1134
- `PATH` is what a machine with no Rust toolchain actually is.
1135
-
1136
- **The `jq`-less arm** asserts what a machine without `jq` is told. It drives
1137
- `init` on a tree with no manifest — the case that used to surface as *this
1138
- package carries no version stamp* — then makes an ordinary install and drives
1139
- `init`, `diff` and `uninstall` against it with `jq` gone, the cases that used to
1140
- surface as *carries a schema this build does not know*. Each must refuse, **name
1141
- `jq`**, carry a `help:` line and exit 2. Naming the program is the whole
1142
- assertion, and asserting the exit status alone would have been worthless: these
1143
- verbs already exited 2 before the precondition existed, so a status-only arm
1144
- would have passed against the very defect being fixed. `doctor` is asserted on
1145
- the other side of the boundary, and the boundary is *reaching the diagnosis*
1146
- rather than the exit code: it must render its below-contract verdict, name `jq`
1147
- as missing in the toolchain block, **and** say `jq` is why the manifest could not
1148
- be read. Exit 1 is the correct verdict there, and asserting exit 0 would have
1149
- been asserting the opposite of the contract — `jq` is a floor member, so a
1150
- machine without it is below contract and `doctor` is the verb that says so.
1151
-
1152
- The gap that arm closes was total, and it is why this defect could be filed
1153
- twice: the smoke's preflight requires `jq` and this harness reads every manifest
1154
- assertion above with it, so nothing in this tree had ever exercised a `jq`-less
1155
- install. **Masking is per-arm** here for a reason the other two masks do not
1156
- have — a mask on the harness's own `PATH` would disarm the assertions rather
1157
- than the installer, so the mask rides the verb's `PATH` alone and the preflight
1158
- is unchanged.
1159
-
1160
- **This mask is by absence, and that is a different instrument from the other
1161
- two** — the distinction is which question is being asked, not a matter of taste,
1162
- and it is written down because the failing-shim idiom is what a later reader will
1163
- reach for. The Node-free and toolchain-free arms ask whether the payload ever
1164
- *reaches* a program, so a shim that fails loudly and names itself is exactly the
1165
- right tool. This arm asks what a machine *without* `jq` is told, and a shim is a
1166
- `jq` that is present: `command -v jq` — the precondition's own predicate —
1167
- resolves it, the precondition never fires, and the verbs run straight into the
1168
- misdiagnosis the arm exists to catch. So the arm builds a directory of links to
1169
- every program on `PATH` except `jq` and runs the verbs against that. It is
1170
- derived from the live `PATH` rather than from a maintained list of the programs
1171
- these verbs happen to use, so it cannot fall out of date the way such a list
1172
- would, and the mask is proved in **both** directions: `jq` must resolve to
1173
- nothing, and a control program must still resolve, since a farm that failed to
1174
- populate would fail every verb for a reason that has nothing to do with `jq` and
1175
- pass this arm on the wrong refusal.
1176
-
1177
- **The upgrade arm** drives a cross-version run, because every arm above installs
1178
- at one version and re-runs at that same one. It packs a second tarball a patch
1179
- version higher, installs `starter` from the first, has the adopter edit and
1180
- commit two vendored files, then runs the second package's `init` with no flags at
1181
- all. What only that reaches: the manifest's version comparison falling *through*
1182
- in the upgrade direction rather than refusing, the profile re-read from the
1183
- manifest when none is passed, and `claim()` re-applying the payload around a file
1184
- that has changed since `init` wrote it — left alone, reported, and still the
1185
- adopter's afterwards. The roster is asserted directly rather than only through
1186
- that effect, because two different manifests leave the same intact file on this
1187
- hop and neither survives the next: an entry dropped altogether reads as *never
1188
- installed* on the following run, and an entry recorded at the adopter's own hash
1189
- reads as *unchanged*. Both would let the next `init` claim the path, so both are
1190
- named apart.
1191
-
1192
- The second edited file is the **relinquish subject**, and it is what makes the arm
1193
- reach §The manifest's exit rule at all. The pack step assembles every version from
1194
- one worktree, so two hops would otherwise carry byte-identical payloads and no
1195
- path would ever leave a kit's shipped set — the arm therefore deletes that path
1196
- from the *extracted package's own* `payload/` before the hop runs, rather than
1197
- through a flag on the publishing path, which leaves the publisher no way to ship a
1198
- payload with a hole in it. The subject is chosen against a criterion rather than
1199
- by taste: a `starter`-kit payload file `init` records in `files` that no `init`
1200
- step and neither generated projection reads, so dropping it exercises the roster's
1201
- exit condition and nothing else. On this hop the file must be untouched on disk
1202
- and must **still be on the roster at the hash `init` wrote there** — disowning it
1203
- here is exactly what would arm the next release to write through the adopter's
1204
- edits.
1205
-
1206
- It then chains a **third** version onto the same consumer with no fresh edit,
1207
- because one hop only shows the protection starting. The second hop is where it
1208
- either persists or inverts, and nothing above reaches it: the already-edited,
1209
- already-reported file must still be the adopter's and must still be reported, and
1210
- the manifest the first hop wrote must still carry it. It is also the hop whose
1211
- payload **re-adds** the relinquished path, which is where the ownership rule pays:
1212
- that path must meet the carried claim, be refused, be reported, and keep `init`'s
1213
- own hash on the roster. Without the exit rule this hop overwrites it silently, so
1214
- the defect is reproduced end to end rather than argued about. Each version is
1215
- derived from the one packed before it and the arm refuses to run unless the
1216
- derivation is strictly higher, so neither hop can quietly turn into a second test
1217
- of the downgrade refusal.
1218
-
1219
- **The first hop's clean-worktree assertion carries a tripwire**, for the same
1220
- reason the binary-less leg's disclosure count does: the assertion is evidence
1221
- only over a hop that rewrote something. This arm's payload is artifact-free over
1222
- the lattice minimum, and for as long as that kit set dispatched no member to the
1223
- binary, `init` seeded no omission, the hop rewrote nothing beyond the manifest,
1224
- and the assertion passed for a reason unrelated to correctness — which is how a
1225
- defect leaving that very worktree dirty reached the tree under a green
1226
- assertion. So the hop asserts a **non-zero** count of omission-declaring lines in
1227
- the consumer's own registry *before* asserting the worktree is clean, reading the
1228
- registry rather than the run's output because the registry is what a later run
1229
- and a reviewer both read, and treating an absent registry as a count of zero
1230
- rather than as a reason to abort. Its failure names the remedy — **re-scope the
1231
- arm onto a profile whose kit set ships a member `init` seeds and dispatches to
1232
- the binary, never drop the assertion.** Its scope is the first hop; the second
1233
- hop's clean-worktree assertion carries no tripwire, and widening it is a separate
1234
- judgment.
1235
-
1236
- **The seam arm** covers the two surfaces `init` rewrites on every run — a
1237
- `templates/*-config.sh` destination and gate-sdk's `msg-patterns.list` — which no
1238
- arm above reaches. That is not an oversight in those arms: the upgrade arm's
1239
- subject is an ordinary vendored file on the plain `copy_in`/`claim` path, so they
1240
- exercise a different file class and stay true without covering this one. This arm
1241
- re-runs at the **same version with no flags**, which is the whole point — the
1242
- class needs no upgrade and no `--force`, so an arm that only ran across versions
1243
- would attribute it to a path it does not live on. It is its own scratch consumer
1244
- at the **maximum** profile — the only profile whose kit set is fixed by the
1245
- payload rather than by a roster judgment, so both surfaces it edits are present
1246
- by construction rather than by a membership row that may be revised — and its own
1247
- consumer because an adopter edit inside the per-profile loop would break the
1248
- file-by-file agreement that loop exists to assert. After the adopter edits and commits both, the re-run
1249
- must leave both byte-identical, name both as changed, and still record `init`'s
1250
- hash for each rather than the adopter's. It reuses the already-installed package,
1251
- so it costs no second pack.
1252
-
1253
- **The protection branch chains onto that consumer** rather than onto the
1254
- reversal arm, because an adopter edit is exactly the case tree-object equality
1255
- cannot host — the edit is what breaks the equality. This arm already has two
1256
- edited, committed vendored files, which is precisely the case that reaches
1257
- `uninstall`'s keep branch. So after its own assertions it runs `diff`, which
1258
- must exit **1** and name both files; then `uninstall`, which must keep both,
1259
- report both, remove every other recorded file, and leave a `checkwright.lock`
1260
- carrying `schema` and a `files` map of exactly those two paths **at `init`'s
1261
- hashes, not the adopter's** — the same apart-naming the upgrade arm uses and for
1262
- the same reason, since an entry dropped reads as never-installed and an entry at
1263
- the adopter's hash reads as unchanged, and either would let the next `init`
1264
- write through them.
1265
-
1266
- That residual object is asserted for **shape**, not only for field presence,
1267
- because the single-writer contract in §The manifest is exactly what an accessor
1268
- cannot check: a missing key and a present-but-null key both read back as the
1269
- empty string. So the assertions run on the captured manifest text itself —
1270
- `has("artifact")` must be false, so the omitted flag left the key absent rather
1271
- than null, and re-piping the object through a recursive sort must reproduce it
1272
- byte for byte, so the sort reached every nesting level rather than the top one.
1273
- Both run here because this is the one call site that ever emits the
1274
- no-identity, no-artifact shape; the per-profile loop's fresh install already
1275
- exercises the other writer field by field.
1276
-
1277
- **The narrowing arm** is the only arm that moves a consumer *down* the lattice:
1278
- it installs the maximum profile and re-runs `init` at the minimum. Every other
1279
- re-run holds the profile fixed, so none reaches the state where `files` outlives
1280
- `kits` — and that state is not exotic, it is the ordinary consequence of the
1281
- carry-forward rule, which keeps every once-vendored path on the roster while the
1282
- recorded kit set shrinks. For every seam path the narrowed manifest records it
1283
- asserts that the path still resolves to the consumer's **own** file, and that a
1284
- `kits`-stripped copy of that same manifest — the residual shape — resolves it the
1285
- same way; then that `doctor` names the consumer's own `gates.list` as the
1286
- registry it inspected. It asserts its own premise too: at least one seam path
1287
- checked, and at least one of those genuinely shadowed by a vendored fixture tree,
1288
- or the resolver has nothing to be ambiguous about and a green result would mean
1289
- only that the payload changed shape.
1290
-
1291
- *Its honest limit.* Only the recorded paths are asserted on, and the config seam
1292
- is written on the artifact placement path alone — so on a payload carrying no
1293
- prebuilt binary the arm would resolve the registry and not the seam. It runs
1294
- against the main payload, which carries one, so both are checked today; what the
1295
- arm still refuses to do is *demand* the seam, because that would fail it on the
1296
- payload rather than on the resolver. The residual shape is what keeps it biting
1297
- either way: with no `kits` key, a tail match returns a vendored fixture for
1298
- `gates.list` too.
1299
-
1300
- **Every arm above rides §The gate binary's placement outcome**, because the
1301
- payload they install carries this run's artifact: the binary is written, an
1302
- `artifact` key reaches the manifest, nothing is omitted, and each profile's
1303
- battery dispatches its `.gate` members through the placed path. The **omission**
1304
- outcome is not thereby lost — it is what the binary-less leg above is for, and
1305
- there the members recorded `# omitted:` are exactly the ones the consumer's own
1306
- vendored tree implements as a binary subcommand. That set is derived rather than
1307
- spelled, which is what keeps the assertion alive: a literal would read as green
1308
- on a tree where nothing has ported and stop asserting on the first tree where
1309
- something has.
1310
-
1311
- **The binary is built rather than fabricated**, which is what makes the placement
1312
- branch worth exercising at all. A stand-in with a matching digest would drive the
1313
- same code while leaving the one thing most likely to break — the real build's
1314
- digest agreeing with what `init` verifies before writing — covered by nothing. So
1315
- the smoke asserts the target `init` selected against what `rustc` independently
1316
- reports this host to be, the recorded digest against the one the build step
1317
- emitted, the binary executable at the path the config seam names, and both that
1318
- path and the seam on the manifest roster.
1319
-
1320
- **The artifact arm is what remains once the main payload carries the binary**:
1321
- the outcomes a single install cannot show. It takes its own extraction of that
1322
- same tarball and mutates the copy, rather than packing a second time — a host
1323
- **off** the roster omits and declares and exits clean, a **tampered** artifact
1324
- refuses with the consumer's tree object unchanged and no manifest written, and a
1325
- **declared** target whose artifact is gone refuses rather than omitting. The last
1326
- two are what keep the three outcomes of §The gate binary's table from collapsing
1327
- into each other. Mutating an extracted package rather than adding a flag to the
1328
- publishing path is deliberate: it leaves the publisher no way to ship a payload
1329
- with a hole in it.
1330
-
1331
- `pack-installer.sh` gains nothing from this: the **smoke** builds and hands it a
1332
- directory, while the publishing path still never builds, so a locally built
1333
- binary can still never substitute for a released one.
1334
-
1335
- *The honest limit, recorded because it is a fact about today's roster rather
1336
- than a property of the design.* A single host build satisfies `--artifacts` only
1337
- while `native/targets.list` declares this host alone — pack refuses a roster
1338
- target no leg built, and refusing is right, because a payload missing a declared
1339
- target is broken rather than narrower. The moment the roster declares a second
1340
- target the build step blocks rather than passing, naming its own re-entry: steer
1341
- its pack at a narrowed roster through `GATE_SDK_NATIVE_TARGETS_FILE`
1342
- (gate-sdk/SPEC.md §Layout and configuration) so the smoke commits to the host
1343
- alone while the published payload still commits to all of them, or give the step
1344
- a cross-compiling build. Neither is built ahead of the second target. Note where
1345
- that block now falls: the build precedes the main pack, so a second declared
1346
- target stops the whole smoke rather than only its last arm — which is the honest
1347
- consequence of the main payload carrying the artifact, not a regression.
1348
-
1349
- Its only knob is `INSTALLER_SMOKE_TMP_DIR`, and it writes nothing inside the
1350
- worktree: the crate's build output lands in gitignored build space and the
1351
- artifact directory it assembles lives under the smoke's own scratch, so the
1352
- clean-worktree precondition keeps its meaning. It needs that clean worktree,
1353
- because the pack step refuses to stamp a commit the payload does not match. It
1354
- needs `cargo` and `rustc` too, alongside the tools every other arm needs, and
1355
- refuses at the same preflight when either is missing — a machine that cannot
1356
- compile the crate has not falsified the install path.
1357
-
1358
- **What it costs to run, because the precondition above is only expensive if you
1359
- know that.** Re-measured 2026-08-13 on one developer machine, against
1360
- the composition this section describes — four profiles × install + battery +
1361
- value arm, the binary-less leg, four packs, an npm install and one release build
1362
- of the crate — the whole smoke took **272 seconds**. The 2026-08-09 measurement
1363
- it replaces was 227 over a composition with one arm fewer, taken twice
1364
- independently inside a full `evidence-kit/bin/run-validate.sh` whose 24 suites
1365
- finished in about 536.
1366
- So it fits one ordinary foreground invocation and needs no session-window
1367
- planning, and the clean worktree it holds is held for minutes rather than for a
1368
- working session. That is a **dated measurement on one machine, not a live claim**
1369
- — it is recorded because sessions kept re-deriving it by wall clock and one
1370
- estimated it an order of magnitude high; re-measure rather than trust the number
1371
- if the decision turns on it.
1372
-
1373
- *Why the payload has no gate of its own.* The obvious sibling check would assert
1374
- that the packed payload matches the repository's kit roots. It is deliberately
1375
- not a gate: the payload exists only at pack time, so the gate would have to run
1376
- `npm pack` at commit time — putting a network-capable toolchain in the
1377
- pre-commit path and breaking the hermeticity every other gate keeps. The
1378
- property is covered here instead, in the tier that can afford it: the pack step
1379
- derives the payload from the same kit-root set the battery itself resolves, and
1380
- the smoke then runs `doctor` from the payload for *every* profile, so a payload
1381
- missing the kit `doctor` sources its toolchain roster from fails the smallest
1382
- profile rather than passing unnoticed. The honest residue is that no assertion
1383
- compares the two sets element by element — a kit dropped from the payload that
1384
- nothing in the smoke's path reads would not be caught here.
1385
-
1386
- ## Docs
57
+ `installer/SPEC.md` in the repository, published at
58
+ <https://checkwright.dev/installer/SPEC.html> — the install boundary the
59
+ bootstraps hand to, each verb's contract, the manifest's wire shape, the packer
60
+ and the consumer smoke.
1387
61
 
1388
62
  <https://checkwright.dev> and <https://github.com/checkwright/checkwright>.
1389
63