checkwright 0.22.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 (346) hide show
  1. package/README.md +687 -90
  2. package/lib/common/lock.sh +38 -9
  3. package/lib/common/profile.sh +33 -0
  4. package/lib/common/recipe.sh +49 -33
  5. package/lib/diff.sh +64 -0
  6. package/lib/doctor.sh +67 -42
  7. package/lib/init.sh +23 -31
  8. package/lib/uninstall.sh +212 -0
  9. package/lib/update.sh +34 -0
  10. package/package.json +2 -2
  11. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  12. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  13. package/payload/canon-kit/README.md +1 -0
  14. package/payload/canon-kit/SPEC.md +410 -58
  15. package/payload/canon-kit/checks/check-amendment-queue.sh +1 -0
  16. package/payload/canon-kit/checks/check-comment-tier.gate +3 -0
  17. package/payload/canon-kit/checks/check-deprecation-task.gate +3 -0
  18. package/payload/canon-kit/checks/check-docs-cmd.gate +3 -0
  19. package/payload/canon-kit/checks/check-docs-link-convention.sh +1 -0
  20. package/payload/canon-kit/checks/check-install-claim.gate +3 -0
  21. package/payload/canon-kit/checks/check-knob-citation.gate +3 -0
  22. package/payload/canon-kit/checks/check-knob-default-coupling.sh +1 -0
  23. package/payload/canon-kit/checks/check-manifest-count.gate +3 -0
  24. package/payload/canon-kit/checks/check-manifest-temporal.gate +3 -0
  25. package/payload/canon-kit/checks/check-md-refs.gate +3 -0
  26. package/payload/canon-kit/checks/check-measured-claim.gate +3 -0
  27. package/payload/canon-kit/checks/check-payload-claim.gate +3 -0
  28. package/payload/canon-kit/checks/check-prose-enum.gate +3 -0
  29. package/payload/canon-kit/checks/check-prose-tells.sh +1 -0
  30. package/payload/canon-kit/checks/check-spec-derivable-section.gate +3 -0
  31. package/payload/canon-kit/checks/check-spec-dod-singleton.gate +3 -0
  32. package/payload/canon-kit/checks/check-spec-embedded-source.sh +1 -0
  33. package/payload/canon-kit/checks/check-spec-fence-balance.gate +3 -0
  34. package/payload/canon-kit/checks/check-spec-pointer.gate +3 -0
  35. package/payload/canon-kit/checks/check-surface-duplication.sh +1 -0
  36. package/payload/canon-kit/checks/check-todo-task-liveness.gate +3 -0
  37. package/payload/canon-kit/checks/check-tracking-claim.gate +3 -0
  38. package/payload/canon-kit/gate-tests/check-comment-tier/bad/.workflow/fixture-state.txt +4 -0
  39. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.gate +4 -0
  40. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.rs +5 -0
  41. package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +4 -0
  42. package/payload/canon-kit/gate-tests/check-comment-tier/bad/templates/bad-tmpl.sh +4 -0
  43. package/payload/canon-kit/gate-tests/check-comment-tier/good/.workflow/fixture-state.txt +3 -0
  44. package/payload/canon-kit/gate-tests/check-comment-tier/good/expect.txt +1 -1
  45. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.gate +4 -0
  46. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.rs +5 -0
  47. package/payload/canon-kit/gate-tests/check-comment-tier/good/templates/good-tmpl.sh +5 -0
  48. package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +3 -2
  49. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/.workflow/fixture-state.txt +3 -0
  50. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.gate +2 -0
  51. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.rs +4 -0
  52. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/expect.txt +3 -0
  53. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +6 -5
  54. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/templates/tmpl.sh +5 -0
  55. package/payload/canon-kit/gate-tests/check-deprecation-task/good/.workflow/fixture-state.txt +3 -0
  56. package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -1
  57. package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.gate +2 -0
  58. package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.rs +4 -0
  59. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +6 -5
  60. package/payload/canon-kit/gate-tests/check-deprecation-task/good/templates/tmpl.sh +5 -0
  61. package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +4 -3
  62. package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +2 -2
  63. package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +4 -0
  64. package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +27 -5
  65. package/payload/canon-kit/gate-tests/check-md-refs.test.sh +61 -9
  66. package/payload/canon-kit/gate-tests/check-measured-claim/bad/SPEC.md +12 -0
  67. package/payload/canon-kit/gate-tests/check-measured-claim/bad/expect.txt +3 -0
  68. package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.sh +6 -0
  69. package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +23 -0
  70. package/payload/canon-kit/gate-tests/check-measured-claim/good/expect.txt +1 -0
  71. package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.sh +6 -0
  72. package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +90 -0
  73. package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +3 -3
  74. package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +21 -7
  75. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/.workflow/fixture-state.txt +2 -0
  76. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.gate +2 -0
  77. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.rs +4 -0
  78. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +3 -0
  79. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/templates/tmpl.sh +5 -0
  80. package/payload/canon-kit/gate-tests/check-spec-pointer/good/.workflow/fixture-state.txt +2 -0
  81. package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -1
  82. package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.gate +2 -0
  83. package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.rs +4 -0
  84. package/payload/canon-kit/gate-tests/check-spec-pointer/good/templates/tmpl.sh +5 -0
  85. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/.workflow/fixture-state.txt +3 -0
  86. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.gate +2 -0
  87. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.rs +4 -0
  88. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/expect.txt +3 -0
  89. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/templates/tmpl.sh +5 -0
  90. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/.workflow/fixture-state.txt +3 -0
  91. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/expect.txt +1 -1
  92. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.gate +2 -0
  93. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.rs +4 -0
  94. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/templates/tmpl.sh +5 -0
  95. package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +1 -2
  96. package/payload/canon-kit/lib/spec.sh +91 -62
  97. package/payload/canon-kit/smoke/install.sh +1 -0
  98. package/payload/canon-kit/templates/SPEC-amendment.md +4 -1
  99. package/payload/context-kit/README.md +4 -1
  100. package/payload/context-kit/SPEC.md +143 -10
  101. package/payload/context-kit/bin/env-probe.sh +19 -6
  102. package/payload/context-kit/checks/check-brevity.sh +1 -0
  103. package/payload/context-kit/checks/check-footprint-fresh.sh +1 -0
  104. package/payload/context-kit/checks/check-memory-off.sh +1 -0
  105. package/payload/context-kit/checks/check-settings-paths.sh +94 -0
  106. package/payload/context-kit/checks/check-settings-pins.sh +1 -0
  107. package/payload/context-kit/gate-tests/check-settings-paths/bad/args +1 -0
  108. package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +3 -0
  109. package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +12 -0
  110. package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/real-tool.sh +4 -0
  111. package/payload/context-kit/gate-tests/check-settings-paths/good/args +1 -0
  112. package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +1 -0
  113. package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +16 -0
  114. package/payload/context-kit/gate-tests/check-settings-paths/good/tools/real-tool.sh +4 -0
  115. package/payload/context-kit/index-tests/expected/toolfloor.txt +9 -0
  116. package/payload/context-kit/index-tests/toolfloor-cases.sh +20 -0
  117. package/payload/context-kit/lib/toolfloor.sh +15 -4
  118. package/payload/context-kit/smoke/agents-md.sh +12 -1
  119. package/payload/context-kit/smoke/install.sh +1 -0
  120. package/payload/delegation-kit/README.md +3 -3
  121. package/payload/delegation-kit/SPEC.md +116 -13
  122. package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +1 -0
  123. package/payload/delegation-kit/checks/check-gate-tamper.sh +1 -0
  124. package/payload/delegation-kit/checks/check-rule-citation.sh +1 -0
  125. package/payload/delegation-kit/templates/agent-execution.md +38 -14
  126. package/payload/delegation-kit/templates/statusline-usage.sh +23 -1
  127. package/payload/doctrine-kit/DOCTRINE.md +86 -12
  128. package/payload/doctrine-kit/README.md +7 -3
  129. package/payload/doctrine-kit/SPEC.md +102 -9
  130. package/payload/doctrine-kit/bin/install-doctrine.sh +83 -13
  131. package/payload/doctrine-kit/checks/check-doctrine-registration.sh +41 -11
  132. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/DOCTRINE.md +3 -0
  133. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/DOCTRINE.md +3 -0
  134. package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +82 -2
  135. package/payload/doctrine-kit/smoke/install.sh +90 -0
  136. package/payload/drift-kit/SPEC.md +13 -4
  137. package/payload/drift-kit/bin/kfric.sh +21 -2
  138. package/payload/drift-kit/smoke/install.sh +28 -0
  139. package/payload/evidence-kit/checks/check-battery-roster.sh +1 -0
  140. package/payload/evidence-kit/checks/check-evidence-baseline.sh +1 -0
  141. package/payload/evidence-kit/checks/check-evidence-manifest.sh +1 -0
  142. package/payload/evidence-kit/checks/check-producer-liveness.sh +1 -0
  143. package/payload/gate-sdk/README.md +13 -0
  144. package/payload/gate-sdk/SPEC.md +2611 -151
  145. package/payload/gate-sdk/bin/build-native.sh +38 -0
  146. package/payload/gate-sdk/bin/enforcement-map.sh +2 -1
  147. package/payload/gate-sdk/bin/gen-pre-commit.sh +23 -3
  148. package/payload/gate-sdk/bin/port-blockers.sh +445 -0
  149. package/payload/gate-sdk/bin/run-consumer-smoke.sh +8 -1
  150. package/payload/gate-sdk/bin/run-gate-tests.sh +26 -5
  151. package/payload/gate-sdk/bin/run-gates.sh +8 -2
  152. package/payload/gate-sdk/bin/upgrade-smoke.sh +52 -4
  153. package/payload/gate-sdk/checks/check-action-gh-repo.gate +1 -0
  154. package/payload/gate-sdk/checks/check-action-pinning.gate +1 -0
  155. package/payload/gate-sdk/checks/check-action-run-shell.sh +1 -0
  156. package/payload/gate-sdk/checks/check-assertion-strength.gate +3 -0
  157. package/payload/gate-sdk/checks/check-commit-msg.sh +1 -0
  158. package/payload/gate-sdk/checks/check-commit-subject.sh +1 -0
  159. package/payload/gate-sdk/checks/check-core-files.sh +1 -0
  160. package/payload/gate-sdk/checks/check-crate-arms.sh +61 -0
  161. package/payload/gate-sdk/checks/check-enforcement-fresh.sh +1 -0
  162. package/payload/gate-sdk/checks/check-exec-bit.sh +1 -0
  163. package/payload/gate-sdk/checks/check-gate-assertions.sh +31 -6
  164. package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +2 -1
  165. package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +1 -0
  166. package/payload/gate-sdk/checks/check-gate-fail-closed.sh +1 -0
  167. package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +1 -0
  168. package/payload/gate-sdk/checks/check-gate-output.sh +33 -3
  169. package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +36 -5
  170. package/payload/gate-sdk/checks/check-graph.sh +1 -0
  171. package/payload/gate-sdk/checks/check-hook-exec-bit.sh +1 -0
  172. package/payload/gate-sdk/checks/check-identity.sh +1 -0
  173. package/payload/gate-sdk/checks/check-install-disposition.sh +92 -0
  174. package/payload/gate-sdk/checks/check-kit-enum.sh +1 -0
  175. package/payload/gate-sdk/checks/check-kit-registration.gate +3 -0
  176. package/payload/gate-sdk/checks/check-readme-roster.sh +1 -0
  177. package/payload/gate-sdk/checks/check-reads-couples.sh +3 -2
  178. package/payload/gate-sdk/checks/check-root-tiering.sh +1 -0
  179. package/payload/gate-sdk/checks/check-shellcheck.sh +1 -0
  180. package/payload/gate-sdk/checks/check-smoke-entry-guard.gate +3 -0
  181. package/payload/gate-sdk/checks/check-template-copy-parity.sh +1 -0
  182. package/payload/gate-sdk/checks/check-template-registry-parity.gate +3 -0
  183. package/payload/gate-sdk/checks/check-test-hermetic.gate +3 -0
  184. package/payload/gate-sdk/checks/check-tree-terms.sh +1 -0
  185. package/payload/gate-sdk/checks/check-workflow-tiering.sh +2 -1
  186. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/Cargo.toml +7 -0
  187. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/src/lib.rs +12 -0
  188. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/expect.txt +5 -0
  189. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.sh +2 -0
  190. package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/Cargo.toml +7 -0
  191. package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/src/lib.rs +11 -0
  192. package/payload/gate-sdk/gate-tests/check-crate-arms/good/expect.txt +2 -0
  193. package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.sh +2 -0
  194. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -1
  195. package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-native-sample.gate +3 -0
  196. package/payload/gate-sdk/gate-tests/check-gate-output/bad/expect.txt +3 -0
  197. package/payload/gate-sdk/gate-tests/check-gate-output/bad/gates.list +1 -0
  198. package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/Cargo.toml +4 -0
  199. package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/src/gates/native_sample.rs +7 -0
  200. package/payload/gate-sdk/gate-tests/check-gate-output/good/check-native-sample.gate +3 -0
  201. package/payload/gate-sdk/gate-tests/check-gate-output/good/expect.txt +1 -1
  202. package/payload/gate-sdk/gate-tests/check-gate-output/good/gates.list +1 -0
  203. package/payload/gate-sdk/gate-tests/check-gate-output/good/native/Cargo.toml +4 -0
  204. package/payload/gate-sdk/gate-tests/check-gate-output/good/native/src/gates/native_sample.rs +11 -0
  205. package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +111 -0
  206. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +1 -1
  207. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +65 -4
  208. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-alpha.sh +6 -0
  209. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-delta.sh +5 -0
  210. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-epsilon.sh +6 -0
  211. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/smoke/install.sh +7 -0
  212. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/args +6 -0
  213. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/expect.txt +1 -0
  214. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/installer/lib/common/recipe.sh +9 -0
  215. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/scripts/gate-sdk-config.sh +5 -0
  216. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-alpha.sh +6 -0
  217. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-beta.gate +3 -0
  218. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-gamma.sh +6 -0
  219. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/smoke/install.sh +8 -0
  220. package/payload/gate-sdk/gate-tests/check-install-disposition/good/args +6 -0
  221. package/payload/gate-sdk/gate-tests/check-install-disposition/good/expect.txt +1 -0
  222. package/payload/gate-sdk/gate-tests/check-install-disposition/good/installer/lib/common/recipe.sh +10 -0
  223. package/payload/gate-sdk/gate-tests/check-install-disposition/good/scripts/gate-sdk-config.sh +5 -0
  224. package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +6 -5
  225. package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +2 -3
  226. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +111 -1
  227. package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +73 -0
  228. package/payload/gate-sdk/lib/consumer-smoke.sh +24 -12
  229. package/payload/gate-sdk/lib/gate.sh +135 -11
  230. package/payload/gate-sdk/lib/inject.sh +25 -0
  231. package/payload/gate-sdk/lib/test-hermetic.sh +26 -0
  232. package/payload/gate-sdk/smoke/install.sh +42 -0
  233. package/payload/guard-kit/README.md +14 -11
  234. package/payload/guard-kit/SPEC.md +278 -62
  235. package/payload/guard-kit/bin/run-guard-tests.sh +1 -0
  236. package/payload/guard-kit/gate-tests/guard-read-path.test.sh +52 -0
  237. package/payload/guard-kit/guard-tests/cases.tsv +49 -7
  238. package/payload/guard-kit/lib/guard.sh +276 -54
  239. package/payload/guard-kit/templates/close-triage.md +5 -5
  240. package/payload/guard-kit/templates/settings-hooks.json +7 -1
  241. package/payload/lifecycle-kit/README.md +11 -1
  242. package/payload/lifecycle-kit/SPEC.md +441 -37
  243. package/payload/lifecycle-kit/bin/cite-survey.sh +81 -0
  244. package/payload/lifecycle-kit/bin/enter-stage.sh +126 -10
  245. package/payload/lifecycle-kit/bin/file-gap.sh +27 -10
  246. package/payload/lifecycle-kit/bin/file-survey.sh +21 -2
  247. package/payload/lifecycle-kit/checks/check-close-surfaces.sh +1 -0
  248. package/payload/lifecycle-kit/checks/check-gap-inbox-neutrality.gate +3 -0
  249. package/payload/lifecycle-kit/checks/check-lesson-disposition.gate +3 -0
  250. package/payload/lifecycle-kit/checks/check-lifecycle-registration.gate +3 -0
  251. package/payload/lifecycle-kit/checks/check-merge-attrs.gate +3 -0
  252. package/payload/lifecycle-kit/checks/check-scratch-citation.gate +3 -0
  253. package/payload/lifecycle-kit/checks/check-shim-restatement.gate +3 -0
  254. package/payload/lifecycle-kit/checks/check-skill-binding.gate +3 -0
  255. package/payload/lifecycle-kit/checks/check-stage-entry.sh +1 -0
  256. package/payload/lifecycle-kit/checks/check-stage-evidence.gate +3 -0
  257. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +3 -0
  258. package/payload/lifecycle-kit/checks/check-survey-record.gate +3 -0
  259. package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +1 -2
  260. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/args +2 -0
  261. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/expect.txt +3 -0
  262. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/gap-inbox.md +5 -0
  263. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/args +2 -0
  264. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/expect.txt +1 -0
  265. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/gap-inbox.md +4 -0
  266. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +2 -3
  267. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +2 -3
  268. package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +2 -3
  269. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/expect.txt +1 -0
  270. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.sh +4 -0
  271. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/surfaces/queue.md +13 -0
  272. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/expect.txt +1 -0
  273. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.sh +4 -0
  274. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/queue.md +31 -0
  275. package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +2 -3
  276. package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +2 -3
  277. package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +2 -3
  278. package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +9 -5
  279. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +2 -3
  280. package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +54 -26
  281. package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +142 -0
  282. package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +100 -0
  283. package/payload/lifecycle-kit/lib/stages.sh +4 -0
  284. package/payload/lifecycle-kit/smoke/install.sh +67 -4
  285. package/payload/lifecycle-kit/templates/lead.md +36 -0
  286. package/payload/lifecycle-kit/templates/stages/close.md +30 -11
  287. package/payload/lifecycle-kit/templates/stages/scope.md +9 -4
  288. package/payload/lifecycle-kit/templates/stages/spec.md +5 -1
  289. package/payload/lifecycle-kit/templates/workflow-state-guard.sh +29 -0
  290. package/payload/queue-kit/README.md +3 -1
  291. package/payload/queue-kit/SPEC.md +123 -3
  292. package/payload/queue-kit/bin/queue-counts.sh +35 -0
  293. package/payload/queue-kit/checks/check-queue-entry-budget.gate +3 -0
  294. package/payload/queue-kit/checks/check-queue-hygiene.gate +3 -0
  295. package/payload/queue-kit/checks/check-queue-prose-precondition.sh +1 -0
  296. package/payload/queue-kit/checks/check-queue-sections.gate +3 -0
  297. package/payload/queue-kit/checks/check-queue-slug-liveness.gate +3 -0
  298. package/payload/queue-kit/checks/check-queue-wrap.gate +3 -0
  299. package/payload/queue-kit/checks/check-roadmap-fresh.sh +1 -0
  300. package/payload/queue-kit/checks/check-tag-lead-line.gate +3 -0
  301. package/payload/queue-kit/checks/check-task-conservation.gate +4 -0
  302. package/payload/queue-kit/checks/check-task-names.gate +3 -0
  303. package/payload/queue-kit/gate-tests/queue-counts.test.sh +116 -0
  304. package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +215 -0
  305. package/payload/queue-kit/lib/queue.sh +4 -19
  306. package/payload/site-kit/SPEC.md +23 -0
  307. package/payload/site-kit/checks/check-docs-cname-parity.sh +1 -0
  308. package/payload/site-kit/checks/check-docs-render-fidelity.sh +1 -0
  309. package/profiles.list +36 -8
  310. package/payload/canon-kit/checks/check-comment-tier.sh +0 -216
  311. package/payload/canon-kit/checks/check-deprecation-task.sh +0 -90
  312. package/payload/canon-kit/checks/check-docs-cmd.sh +0 -153
  313. package/payload/canon-kit/checks/check-install-claim.sh +0 -146
  314. package/payload/canon-kit/checks/check-knob-citation.sh +0 -117
  315. package/payload/canon-kit/checks/check-manifest-count.sh +0 -46
  316. package/payload/canon-kit/checks/check-manifest-temporal.sh +0 -83
  317. package/payload/canon-kit/checks/check-md-refs.sh +0 -128
  318. package/payload/canon-kit/checks/check-payload-claim.sh +0 -133
  319. package/payload/canon-kit/checks/check-prose-enum.sh +0 -115
  320. package/payload/canon-kit/checks/check-spec-derivable-section.sh +0 -69
  321. package/payload/canon-kit/checks/check-spec-dod-singleton.sh +0 -45
  322. package/payload/canon-kit/checks/check-spec-fence-balance.sh +0 -42
  323. package/payload/canon-kit/checks/check-spec-pointer.sh +0 -187
  324. package/payload/canon-kit/checks/check-todo-task-liveness.sh +0 -80
  325. package/payload/canon-kit/checks/check-tracking-claim.sh +0 -136
  326. package/payload/gate-sdk/checks/check-assertion-strength.sh +0 -134
  327. package/payload/gate-sdk/checks/check-kit-registration.sh +0 -68
  328. package/payload/gate-sdk/checks/check-smoke-entry-guard.sh +0 -53
  329. package/payload/gate-sdk/checks/check-template-registry-parity.sh +0 -81
  330. package/payload/gate-sdk/checks/check-test-hermetic.sh +0 -119
  331. package/payload/lifecycle-kit/checks/check-lesson-disposition.sh +0 -98
  332. package/payload/lifecycle-kit/checks/check-lifecycle-registration.sh +0 -54
  333. package/payload/lifecycle-kit/checks/check-merge-attrs.sh +0 -69
  334. package/payload/lifecycle-kit/checks/check-shim-restatement.sh +0 -97
  335. package/payload/lifecycle-kit/checks/check-skill-binding.sh +0 -59
  336. package/payload/lifecycle-kit/checks/check-stage-evidence.sh +0 -81
  337. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.sh +0 -47
  338. package/payload/lifecycle-kit/checks/check-survey-record.sh +0 -102
  339. package/payload/queue-kit/checks/check-queue-entry-budget.sh +0 -106
  340. package/payload/queue-kit/checks/check-queue-hygiene.sh +0 -81
  341. package/payload/queue-kit/checks/check-queue-sections.sh +0 -44
  342. package/payload/queue-kit/checks/check-queue-slug-liveness.sh +0 -63
  343. package/payload/queue-kit/checks/check-queue-wrap.sh +0 -56
  344. package/payload/queue-kit/checks/check-tag-lead-line.sh +0 -70
  345. package/payload/queue-kit/checks/check-task-conservation.sh +0 -50
  346. package/payload/queue-kit/checks/check-task-names.sh +0 -128
package/README.md CHANGED
@@ -51,6 +51,55 @@ with its version floors, is on the install page.
51
51
  the source tree, so no second copy of any kit is checked in.
52
52
  - `profiles.list` — the profile rosters (below).
53
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
+
54
103
  ## init
55
104
 
56
105
  `checkwright init` vendors the selected profile's kit source out of this
@@ -60,7 +109,10 @@ gate-sdk/SPEC.md §Consumer payload sets.
60
109
 
61
110
  **No selection builds.** Not "no profile that happens to carry only shell
62
111
  gates" — no selection, ever. `init` writes files and compiles nothing, so it
63
- asks for no toolchain and cannot fail on one. A gate whose implementation is a
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
64
116
  compiled subcommand reaches you as a prebuilt binary picked for your platform
65
117
  and checked against a published digest before it is written, which is what makes
66
118
  zero build step a property of `init` itself rather than of which profile you
@@ -77,8 +129,11 @@ a single file is written:
77
129
  actually vendored. `--no-commit` is the valve: it writes and stages the
78
130
  files and leaves the commit to you, so an operator who wants to compose the
79
131
  change themselves has taken that guarantee on deliberately.
80
- - **`doctor` passes.** A below-contract toolchain blocks *before* any partial
81
- 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
82
137
  same phase as `init` rather than as a later convenience.
83
138
 
84
139
  It writes the selected profile's kit directories, a `gates.list` seeded with
@@ -104,11 +159,13 @@ nothing to change says so and exits clean; an unchanged tree is the success
104
159
  case, not an error. A payload older than the recorded install is refused as a
105
160
  silent downgrade — `--force` covers that refusal too, which is what makes a
106
161
  rollback a thing you asked for rather than a thing that happened to you.
107
- `--force` means the same thing in both places: overwrite what `init` would
108
- 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.
109
166
 
110
167
  `--dry-run` prints the file plan and the manifest that would be written, writes
111
- nothing, and exits 0. Every mutating verb has one.
168
+ nothing, and exits 0.
112
169
 
113
170
  ## What init seeds
114
171
 
@@ -133,24 +190,93 @@ destroy the very evidence the comparison is made from, and these are precisely
133
190
  the files whose whole purpose is to be edited by you — which is why the ordering
134
191
  is stated here rather than left to each recipe.
135
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
+
136
209
  The **starting gate roster** is the subset a fresh consumer begins with, not
137
210
  the kit's full roster — the same distinction gate-sdk's own README draws. A
138
211
  gate whose subject you have not authored yet has nothing to read: canon-kit's
139
- duplication gate wants a glossary, site-kit's wants a docs host, and
140
- lifecycle-kit's two want a stage attestation only a stage session can write. On
141
- a tree that has done nothing wrong those would red on day one, so they are
142
- registered when the surface exists rather than at install. Each kit's README
143
- names the full roster to grow into.
144
-
145
- *The honest limit.* That per-kit starting roster is `recipe_gates` in
146
- `lib/common/recipe.sh`, and that function is the **whole** of a fresh
147
- consumer's registry — what a tree `init` just made will run is read there, never
148
- inferred from a kit's full roster or from this repo's own `gates.list`. Each
149
- kit's `smoke/install.sh` holds a second encoding of the same fact for its own
150
- scratch consumer. The consumer smoke catches the drift that
151
- matters — a roster naming a gate that fails to resolve reds it — but not a
152
- kit that adds a zero-config gate this roster never learns about. Collapsing the
153
- 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.
154
280
 
155
281
  ## The gate binary
156
282
 
@@ -215,6 +341,13 @@ in-payload value can. What raises it above a self-check is that the identical
215
341
  bytes are published on the Release, so a human can cross-check the value out of
216
342
  band. The claim is **verified against a published digest**, never *reproducible*.
217
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
+
218
351
  **Omission is declared and counted.** An omitted member rides the registry
219
352
  rather than a new file: `init` writes `# omitted: <name> <reason>` into the
220
353
  consumer's `gates.list` in place of the member's name — a comment line the
@@ -260,10 +393,14 @@ member's invocation argv and a `.gate` member resolves to this binary. A hook
260
393
  generated first would resolve a dispatch it cannot make.
261
394
 
262
395
  Every row of the table above runs under an oracle rather than a
263
- hand-verification with a date on it: §The consumer smoke's artifact arm builds a
264
- binary, packs it, and drives each outcome on every invocation. Nothing here
265
- changes for that — the behavior this section specifies is what the arm asserts,
266
- not something it added.
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.
267
404
 
268
405
  ## doctor
269
406
 
@@ -274,6 +411,18 @@ step or `init`'s own precondition check gate on the answer without parsing a
274
411
  report — and it is why a below-contract machine is caught before any partial
275
412
  install rather than halfway through one.
276
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
+
277
426
  It has two behaviors, selected by where you run it rather than by a flag. Run
278
427
  anywhere, it reports the toolchain verdict. Run inside a repository that has
279
428
  been vendored into, it additionally reads `checkwright.lock` and reports the
@@ -295,6 +444,14 @@ reports the toolchain clean **and names the finding**, rather than signing off
295
444
  as plainly clean — a `doctor` that printed `DIGEST MISMATCH` above and `clean`
296
445
  below would be the surface teaching a reader to disbelieve the last line.
297
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`.
454
+
298
455
  `doctor` defines no floor of its own. It sources the toolchain roster out of
299
456
  its own `payload/` and renders whatever verdict that roster's predicate
300
457
  returns, so the contract keeps one owner and this stays a display of it. The
@@ -302,20 +459,182 @@ payload copy is the one it reads, never a copy in the tree it is inspecting:
302
459
  at `init` time nothing has been vendored there yet, so a tree copy would not
303
460
  exist at the moment the answer is needed.
304
461
 
305
- `doctor` writes nothing, so it has no `--dry-run`. Every verb that does write
306
- 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.
307
476
 
308
477
  A third exit status, `2`, means the question could not be answered rather than
309
478
  that the answer was bad: the package carries no payload, or the manifest
310
479
  carries a schema key this build does not know. A build refuses an unfamiliar
311
480
  manifest rather than guessing at the shape behind it.
312
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
+
313
622
  ## Profiles
314
623
 
315
- You pick how much of the methodology to meet first. The progression is
316
- `starter`, then `delegation`, then `full`, and it is a containment chain rather
317
- than three unrelated menus: moving up a profile only ever adds, so nothing you
318
- 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.
319
638
 
320
639
  - **`starter`** is the framework — the gate SDK on its own. You get a battery,
321
640
  a generated pre-commit hook, and gates that already red on real defects in
@@ -325,13 +644,24 @@ already vendored is taken away or rearranged underneath you.
325
644
  evidence a stage produces before it can close, the protocol it follows when
326
645
  it spawns, the context budget it runs inside, the permission surface it acts
327
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.
328
655
  - **`full`** is everything in the payload.
329
656
 
330
- `starter` and `delegation` are rosters in `profiles.list`, because neither
657
+ `starter`, `delegation` and `prose` are rosters in `profiles.list`, because none
331
658
  follows from the tree — each is a judgment about what an adopter should meet
332
659
  first, and the file records the criterion behind each membership beside it.
333
660
  `full` is derived instead: it is every kit root the payload carries, resolved
334
- 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.
335
665
 
336
666
  ## The manifest
337
667
 
@@ -339,9 +669,12 @@ at run time, never a list to maintain.
339
669
  and that file is tracked like everything else it writes. It is JSON, read with
340
670
  `jq`, and it is the install-ownership record: what was installed, from which
341
671
  upstream state, and which files this installer owns. `lib/common/lock.sh` is
342
- its schema owner — the wire key, the accessors, and the hash rule live there,
343
- so the verb that writes the manifest and the verbs that read it cannot drift
344
- 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.
345
678
 
346
679
  The wire key is versioned (`checkwright-lock v1`, in `CHECKWRIGHT_LOCK_SCHEMA`)
347
680
  and a build that meets a key it does not know refuses rather than guessing at
@@ -354,9 +687,22 @@ the shape behind it.
354
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 |
355
688
  | `profile` | the profile selected | a re-run of `init` re-applies the same profile without asking again |
356
689
  | `kits` | the vendored kit set | `init`'s re-run file plan, and `doctor`'s installed-set report |
357
- | `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 |
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 |
358
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 |
359
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
+
360
706
  **A recorded hash is what `init` last wrote at that path** — on whichever run
361
707
  last wrote it — and not the state of the tree at the end of the current run. The
362
708
  two readings coincide for every path `init` rewrites and part company for exactly
@@ -366,6 +712,11 @@ rather than recomputed, so the next run still has something to compare your
366
712
  content against, still finds it different, and still leaves it alone. Editing a
367
713
  file changes who may write it; it never changes whether `init` is tracking it.
368
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.
719
+
369
720
  **One entry is a span rather than a file, and it is still an ordinary entry.**
370
721
  Everything above reads a `files` row as a whole file `init` wrote. The agent
371
722
  file is the exception: `init` creates it only when it is absent, and thereafter
@@ -385,6 +736,10 @@ moment.** `init` owns a path because it wrote the file there, so only the file's
385
736
  disappearance can end that. A release that stops shipping the path does not: the
386
737
  file is still on disk, it may carry your edits, and disowning it is exactly what
387
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.
388
743
 
389
744
  **A relinquished path is an ordinary entry, not a state of its own.** When a
390
745
  release stops shipping something `init` created, nothing visits that path on the
@@ -412,6 +767,30 @@ never asks whether it may write there and does nothing with the entry at all. Th
412
767
  old behavior on the new data is the behavior the new meaning wants, so there is
413
768
  nothing for a version key to protect.
414
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
+
415
794
  A recorded **`files`** hash is `git hash-object`, never `sha256sum`. Not a
416
795
  portability detail worth burying: macOS ships `shasum` rather than `sha256sum`,
417
796
  and the answer is not a new tool requirement — git is already something the
@@ -454,30 +833,152 @@ the same owner.
454
833
  registered as a validate suite so a bit-rotted activation path is a red
455
834
  validate rather than a discovery at announcement.
456
835
 
457
- **Run it with the current directory inside the tree under test.** The script
458
- resolves that tree from its own path, while `scripts/pack-installer.sh` — which
459
- it invokes to build the payload — resolves the tree it packs from the current
460
- directory. Invoke a clone's copy by path from somewhere else and the two
461
- disagree silently: the run packs the *invoking* tree and asserts a green
462
- activation path for source the clone never contributed, printing an ordinary
463
- success. Use `env -C <clone>` for a second checkout or a worktree. The rule is
464
- stated as an invocation requirement because that is what it is under either
465
- resolution of the disagreement: today nothing detects it, and a version that
466
- refuses on a mismatch would refuse exactly the invocations this sentence tells
467
- you not to make.
468
-
469
- 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
470
870
  `--offline`**, and drives a scratch consumer once per profile: `init`, then the
471
871
  battery must be green, then the manifest must agree with the tree it describes
472
- file by file, then a re-run must leave the tree object identical, then `doctor`
473
- must exit 0 and name the installed profile. It also asserts the profile
474
- invariant against the installed payload — every named kit resolves, the
475
- 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.
476
976
 
477
977
  A second arm drives the **download transport**: it verifies the packed tarball
478
978
  against a digest the smoke computes, extracts it with `tar` rather than npm,
479
- and runs the same `init` and the same post-conditions with `npm` and `node`
480
- **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 —
481
982
  what the per-profile loop proves (the payload resolves and each profile's kit
482
983
  set is present) is profile-dependent, while what this arm proves (the same
483
984
  payload reached the tree without Node) is transport-independent, and `full` is
@@ -502,6 +1003,32 @@ it wherever Node is installed there. The residue is that a payload merely
502
1003
  *probing* for a Node binary still finds a name; one that *runs* it fails loudly
503
1004
  and says which name it reached.
504
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
+
505
1032
  **The upgrade arm** drives a cross-version run, because every arm above installs
506
1033
  at one version and re-runs at that same one. It packs a second tarball a patch
507
1034
  version higher, installs `starter` from the first, has the adopter edit and
@@ -552,40 +1079,92 @@ exercise a different file class and stay true without covering this one. This ar
552
1079
  re-runs at the **same version with no flags**, which is the whole point — the
553
1080
  class needs no upgrade and no `--force`, so an arm that only ran across versions
554
1081
  would attribute it to a path it does not live on. It is its own scratch consumer
555
- at the `delegation` profile: `starter` is gate-sdk alone and gate-sdk ships no
556
- config template, so the templates are reachable only from `delegation` up, and an
557
- adopter edit inside the per-profile loop would break the file-by-file agreement
558
- that loop exists to assert. After the adopter edits and commits both, the re-run
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
559
1087
  must leave both byte-identical, name both as changed, and still record `init`'s
560
1088
  hash for each rather than the adopter's. It reuses the already-installed package,
561
1089
  so it costs no second pack.
562
1090
 
563
- **The artifact arm rides the per-profile post-conditions**, taking whichever of
564
- §The gate binary's outcomes the payload and the host actually produce. Every arm
565
- above packs with no artifacts, so each takes the **omission** outcome: no binary
566
- is written, no `artifact` key reaches the manifest, and the members recorded as
567
- `# omitted:` are exactly the ones the consumer's own vendored tree implements as
568
- a binary subcommand. That set is derived rather than spelled, which is what keeps
569
- the assertion alive: a literal would read as green on a tree where nothing has
570
- ported and stop asserting on the first tree where something has.
571
-
572
- **The placement branch is exercised by a leg that builds the binary it packs.**
573
- The arm compiles the crate for the host target, emits the digest sidecar beside
574
- it, and hands the pair to `pack-installer.sh --artifacts`, so `init` meets a real
575
- artifact from the real producer. A fabricated stand-in with a matching digest
576
- would drive the same placement code while leaving the one thing most likely to
577
- break — the build's own digest agreeing with what `init` verifies before
578
- writing — covered by nothing. Against that pack the arm asserts the target
579
- `init` selected against what `rustc` independently reports this host to be, the
580
- recorded digest against the one the build leg emitted, the binary executable at
581
- the path the config seam names, and both that path and the seam on the manifest
582
- roster. It then drives the outcomes a single install cannot show, each against a
583
- payload mutated in the extracted package rather than through a flag on the
584
- publishing path: a host **off** the roster omits and declares and exits clean, a
585
- **tampered** artifact refuses with the consumer's tree object unchanged and no
586
- manifest written, and a **declared** target whose artifact is gone refuses rather
587
- than omitting. The last two are what keep the three outcomes of §The gate
588
- binary's table from collapsing into each other.
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.
589
1168
 
590
1169
  `pack-installer.sh` gains nothing from this: the **smoke** builds and hands it a
591
1170
  directory, while the publishing path still never builds, so a locally built
@@ -596,11 +1175,14 @@ than a property of the design.* A single host build satisfies `--artifacts` only
596
1175
  while `native/targets.list` declares this host alone — pack refuses a roster
597
1176
  target no leg built, and refusing is right, because a payload missing a declared
598
1177
  target is broken rather than narrower. The moment the roster declares a second
599
- target the arm blocks rather than passing, naming its own re-entry: steer the
600
- arm's pack at a narrowed roster through `GATE_SDK_NATIVE_TARGETS_FILE`
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`
601
1180
  (gate-sdk/SPEC.md §Layout and configuration) so the smoke commits to the host
602
- alone while the published payload still commits to all of them, or give the leg
603
- a cross-compiling build. Neither is built ahead of the second target.
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.
604
1186
 
605
1187
  Its only knob is `INSTALLER_SMOKE_TMP_DIR`, and it writes nothing inside the
606
1188
  worktree: the crate's build output lands in gitignored build space and the
@@ -611,6 +1193,21 @@ needs `cargo` and `rustc` too, alongside the tools every other arm needs, and
611
1193
  refuses at the same preflight when either is missing — a machine that cannot
612
1194
  compile the crate has not falsified the install path.
613
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.
1210
+
614
1211
  *Why the payload has no gate of its own.* The obvious sibling check would assert
615
1212
  that the packed payload matches the repository's kit roots. It is deliberately
616
1213
  not a gate: the payload exists only at pack time, so the gate would have to run