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