checkwright 0.22.0 → 0.24.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 (548) hide show
  1. package/README.md +855 -96
  2. package/lib/common/lock.sh +45 -9
  3. package/lib/common/profile.sh +33 -0
  4. package/lib/common/recipe.sh +50 -34
  5. package/lib/diff.sh +66 -0
  6. package/lib/doctor.sh +67 -42
  7. package/lib/init.sh +62 -46
  8. package/lib/uninstall.sh +214 -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 +527 -63
  15. package/payload/canon-kit/checks/check-amendment-queue.gate +3 -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.gate +3 -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.gate +3 -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.gate +3 -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.gate +3 -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-amendment-queue/bad/SPEC-orphan.md +6 -0
  39. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +7 -2
  40. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +8 -0
  41. package/payload/canon-kit/gate-tests/check-comment-tier/bad/.workflow/fixture-state.txt +4 -0
  42. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.gate +4 -0
  43. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.rs +5 -0
  44. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.sh +3 -0
  45. package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +5 -0
  46. package/payload/canon-kit/gate-tests/check-comment-tier/bad/templates/bad-tmpl.sh +4 -0
  47. package/payload/canon-kit/gate-tests/check-comment-tier/good/.workflow/fixture-state.txt +3 -0
  48. package/payload/canon-kit/gate-tests/check-comment-tier/good/expect.txt +1 -1
  49. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.gate +4 -0
  50. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.rs +5 -0
  51. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
  52. package/payload/canon-kit/gate-tests/check-comment-tier/good/templates/good-tmpl.sh +5 -0
  53. package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +3 -2
  54. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/.workflow/fixture-state.txt +3 -0
  55. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.gate +2 -0
  56. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.rs +4 -0
  57. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/expect.txt +3 -0
  58. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +6 -5
  59. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/templates/tmpl.sh +5 -0
  60. package/payload/canon-kit/gate-tests/check-deprecation-task/good/.workflow/fixture-state.txt +3 -0
  61. package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -1
  62. package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.gate +2 -0
  63. package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.rs +4 -0
  64. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +6 -5
  65. package/payload/canon-kit/gate-tests/check-deprecation-task/good/templates/tmpl.sh +5 -0
  66. package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +4 -3
  67. package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +4 -4
  68. package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +2 -2
  69. package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +2 -2
  70. package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +4 -0
  71. package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +27 -5
  72. package/payload/canon-kit/gate-tests/check-md-refs.test.sh +61 -9
  73. package/payload/canon-kit/gate-tests/check-measured-claim/bad/SPEC.md +12 -0
  74. package/payload/canon-kit/gate-tests/check-measured-claim/bad/expect.txt +3 -0
  75. package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.sh +6 -0
  76. package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +23 -0
  77. package/payload/canon-kit/gate-tests/check-measured-claim/good/expect.txt +1 -0
  78. package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.sh +6 -0
  79. package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +90 -0
  80. package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +3 -3
  81. package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +21 -7
  82. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/SPEC-wire.md +18 -0
  83. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/expect.txt +3 -1
  84. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/widget.proto +13 -0
  85. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC-wire.md +22 -0
  86. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC.md +17 -0
  87. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/widget.proto +13 -0
  88. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/.workflow/fixture-state.txt +2 -0
  89. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.gate +2 -0
  90. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.rs +4 -0
  91. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +3 -0
  92. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/templates/tmpl.sh +5 -0
  93. package/payload/canon-kit/gate-tests/check-spec-pointer/good/.workflow/fixture-state.txt +2 -0
  94. package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -1
  95. package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.gate +2 -0
  96. package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.rs +4 -0
  97. package/payload/canon-kit/gate-tests/check-spec-pointer/good/templates/tmpl.sh +5 -0
  98. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/.workflow/fixture-state.txt +3 -0
  99. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.gate +2 -0
  100. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.rs +4 -0
  101. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/expect.txt +3 -0
  102. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/templates/tmpl.sh +5 -0
  103. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/.workflow/fixture-state.txt +3 -0
  104. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/expect.txt +1 -1
  105. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.gate +2 -0
  106. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.rs +4 -0
  107. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/templates/tmpl.sh +5 -0
  108. package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +1 -2
  109. package/payload/canon-kit/lib/spec.sh +91 -62
  110. package/payload/canon-kit/smoke/install.sh +2 -1
  111. package/payload/canon-kit/templates/SPEC-amendment.md +4 -1
  112. package/payload/context-kit/README.md +10 -5
  113. package/payload/context-kit/SPEC.md +364 -62
  114. package/payload/context-kit/bin/always-loaded.sh +5 -21
  115. package/payload/context-kit/bin/env-probe.sh +21 -23
  116. package/payload/context-kit/checks/check-brevity.gate +3 -0
  117. package/payload/context-kit/checks/check-footprint-fresh.gate +3 -0
  118. package/payload/context-kit/checks/check-memory-off.gate +3 -0
  119. package/payload/context-kit/checks/check-settings-paths.gate +3 -0
  120. package/payload/context-kit/checks/check-settings-pins.gate +3 -0
  121. package/payload/context-kit/gate-tests/check-brevity.test.sh +3 -2
  122. package/payload/context-kit/gate-tests/check-memory-off/bad/scripts/context-config.sh +4 -0
  123. package/payload/context-kit/gate-tests/check-memory-off/good/scripts/context-config.sh +4 -0
  124. package/payload/context-kit/gate-tests/check-memory-off.test.sh +18 -4
  125. package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +3 -0
  126. package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +12 -0
  127. package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/real-tool.sh +4 -0
  128. package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +1 -0
  129. package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +16 -0
  130. package/payload/context-kit/gate-tests/check-settings-paths/good/tools/real-tool.sh +4 -0
  131. package/payload/context-kit/gate-tests/check-settings-pins.test.sh +70 -0
  132. package/payload/context-kit/index-tests/expected/toolfloor.txt +9 -0
  133. package/payload/context-kit/index-tests/toolfloor-cases.sh +20 -0
  134. package/payload/context-kit/lib/context.sh +56 -0
  135. package/payload/context-kit/lib/toolfloor.sh +15 -4
  136. package/payload/context-kit/smoke/agents-md.sh +27 -4
  137. package/payload/context-kit/smoke/install.sh +4 -2
  138. package/payload/context-kit/templates/session-context.sh +5 -5
  139. package/payload/delegation-kit/README.md +3 -3
  140. package/payload/delegation-kit/SPEC.md +400 -22
  141. package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +3 -0
  142. package/payload/delegation-kit/checks/check-gate-tamper.gate +3 -0
  143. package/payload/delegation-kit/checks/check-rule-citation.gate +3 -0
  144. package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/added-exemptions +5 -0
  145. package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/expect.txt +2 -0
  146. package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +108 -0
  147. package/payload/delegation-kit/smoke/install.sh +1 -1
  148. package/payload/delegation-kit/templates/agent-execution.md +109 -18
  149. package/payload/delegation-kit/templates/statusline-usage.sh +23 -1
  150. package/payload/doctrine-kit/DOCTRINE.md +86 -12
  151. package/payload/doctrine-kit/README.md +7 -3
  152. package/payload/doctrine-kit/SPEC.md +103 -10
  153. package/payload/doctrine-kit/bin/install-doctrine.sh +83 -13
  154. package/payload/doctrine-kit/checks/check-doctrine-registration.gate +3 -0
  155. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/DOCTRINE.md +3 -0
  156. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/DOCTRINE.md +3 -0
  157. package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +84 -5
  158. package/payload/doctrine-kit/smoke/install.sh +106 -3
  159. package/payload/drift-kit/README.md +2 -2
  160. package/payload/drift-kit/SPEC.md +84 -11
  161. package/payload/drift-kit/bin/kfric.sh +21 -2
  162. package/payload/drift-kit/bin/stage-economics.sh +1 -1
  163. package/payload/drift-kit/lib/drift.sh +43 -0
  164. package/payload/drift-kit/smoke/install.sh +49 -14
  165. package/payload/evidence-kit/README.md +3 -1
  166. package/payload/evidence-kit/SPEC.md +160 -19
  167. package/payload/evidence-kit/checks/check-battery-roster.gate +3 -0
  168. package/payload/evidence-kit/checks/check-evidence-baseline.gate +3 -0
  169. package/payload/evidence-kit/checks/check-evidence-manifest.gate +3 -0
  170. package/payload/evidence-kit/checks/check-producer-liveness.sh +43 -2
  171. package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +4 -3
  172. package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +8 -5
  173. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/WORKFLOW-STATE.txt +1 -1
  174. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/scripts/evidence-config.sh +9 -0
  175. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/WORKFLOW-STATE.txt +1 -1
  176. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/scripts/evidence-config.sh +9 -0
  177. package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +6 -4
  178. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +42 -1
  179. package/payload/evidence-kit/lib/evidence.sh +2 -0
  180. package/payload/evidence-kit/smoke/install.sh +1 -1
  181. package/payload/gate-sdk/README.md +23 -7
  182. package/payload/gate-sdk/SPEC.md +6402 -291
  183. package/payload/gate-sdk/bin/build-native.sh +38 -0
  184. package/payload/gate-sdk/bin/gen-pre-commit.sh +23 -3
  185. package/payload/gate-sdk/bin/install-hooks.sh +14 -2
  186. package/payload/gate-sdk/bin/port-blockers.sh +473 -0
  187. package/payload/gate-sdk/bin/run-consumer-smoke.sh +8 -1
  188. package/payload/gate-sdk/bin/run-gate-tests.sh +27 -7
  189. package/payload/gate-sdk/bin/run-gates.sh +30 -2
  190. package/payload/gate-sdk/bin/upgrade-smoke.sh +70 -17
  191. package/payload/gate-sdk/checks/check-action-gh-repo.gate +1 -0
  192. package/payload/gate-sdk/checks/check-action-pinning.gate +1 -0
  193. package/payload/gate-sdk/checks/check-action-run-shell.sh +2 -0
  194. package/payload/gate-sdk/checks/check-assertion-strength.gate +3 -0
  195. package/payload/gate-sdk/checks/check-commit-msg.gate +3 -0
  196. package/payload/gate-sdk/checks/check-commit-subject.gate +3 -0
  197. package/payload/gate-sdk/checks/check-core-files.gate +3 -0
  198. package/payload/gate-sdk/checks/check-crate-arms.sh +62 -0
  199. package/payload/gate-sdk/checks/check-enforcement-fresh.gate +3 -0
  200. package/payload/gate-sdk/checks/check-exec-bit.gate +3 -0
  201. package/payload/gate-sdk/checks/check-gate-assertions.sh +32 -6
  202. package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +3 -0
  203. package/payload/gate-sdk/checks/check-gate-exemption-tasks.gate +3 -0
  204. package/payload/gate-sdk/checks/check-gate-fail-closed.gate +3 -0
  205. package/payload/gate-sdk/checks/check-gate-fixture-coverage.gate +3 -0
  206. package/payload/gate-sdk/checks/check-gate-output.gate +3 -0
  207. package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +109 -14
  208. package/payload/gate-sdk/checks/check-graph.gate +3 -0
  209. package/payload/gate-sdk/checks/check-hook-exec-bit.gate +3 -0
  210. package/payload/gate-sdk/checks/check-identity.gate +3 -0
  211. package/payload/gate-sdk/checks/check-install-disposition.sh +93 -0
  212. package/payload/gate-sdk/checks/check-kit-enum.gate +3 -0
  213. package/payload/gate-sdk/checks/check-kit-registration.gate +3 -0
  214. package/payload/gate-sdk/checks/check-readme-roster.gate +3 -0
  215. package/payload/gate-sdk/checks/check-reads-couples.gate +3 -0
  216. package/payload/gate-sdk/checks/check-root-tiering.gate +3 -0
  217. package/payload/gate-sdk/checks/check-shellcheck.sh +2 -0
  218. package/payload/gate-sdk/checks/check-smoke-entry-guard.gate +3 -0
  219. package/payload/gate-sdk/checks/check-template-copy-parity.gate +3 -0
  220. package/payload/gate-sdk/checks/check-template-registry-parity.gate +3 -0
  221. package/payload/gate-sdk/checks/check-test-hermetic.gate +3 -0
  222. package/payload/gate-sdk/checks/check-tree-terms.sh +2 -0
  223. package/payload/gate-sdk/checks/check-workflow-tiering.gate +3 -0
  224. package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +17 -12
  225. package/payload/gate-sdk/gate-tests/check-core-files.test.sh +4 -5
  226. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/Cargo.toml +7 -0
  227. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/src/lib.rs +12 -0
  228. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/expect.txt +5 -0
  229. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.sh +2 -0
  230. package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/Cargo.toml +7 -0
  231. package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/src/lib.rs +11 -0
  232. package/payload/gate-sdk/gate-tests/check-crate-arms/good/expect.txt +2 -0
  233. package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.sh +2 -0
  234. package/payload/gate-sdk/gate-tests/check-exec-bit/bad/dump.txt +2 -1
  235. package/payload/gate-sdk/gate-tests/check-exec-bit/bad/expect.txt +2 -1
  236. package/payload/gate-sdk/gate-tests/check-exec-bit/good/dump.txt +3 -0
  237. package/payload/gate-sdk/gate-tests/check-exec-bit/good/expect.txt +1 -1
  238. package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +3 -4
  239. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -1
  240. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +26 -4
  241. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/args +6 -1
  242. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +2 -0
  243. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored-descriptor.gate +4 -0
  244. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored.sh +14 -0
  245. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-descriptor.gate +4 -0
  246. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-held.sh +8 -0
  247. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/args +8 -1
  248. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +3 -0
  249. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored-descriptor.gate +4 -0
  250. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored.sh +14 -0
  251. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-descriptor.gate +4 -0
  252. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-held.sh +8 -0
  253. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks.test.sh +77 -0
  254. package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-native-sample.gate +3 -0
  255. package/payload/gate-sdk/gate-tests/check-gate-output/bad/expect.txt +3 -0
  256. package/payload/gate-sdk/gate-tests/check-gate-output/bad/gates.list +1 -0
  257. package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/Cargo.toml +4 -0
  258. package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/src/gates/native_sample.rs +7 -0
  259. package/payload/gate-sdk/gate-tests/check-gate-output/good/check-native-sample.gate +3 -0
  260. package/payload/gate-sdk/gate-tests/check-gate-output/good/expect.txt +1 -1
  261. package/payload/gate-sdk/gate-tests/check-gate-output/good/gates.list +1 -0
  262. package/payload/gate-sdk/gate-tests/check-gate-output/good/native/Cargo.toml +4 -0
  263. package/payload/gate-sdk/gate-tests/check-gate-output/good/native/src/gates/native_sample.rs +11 -0
  264. package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +110 -0
  265. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +7 -0
  266. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +1 -0
  267. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-bare.sh +4 -0
  268. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-both.sh +5 -0
  269. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-heldtwice.sh +5 -0
  270. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +2 -0
  271. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-twice.sh +5 -0
  272. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +4 -0
  273. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +2 -1
  274. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +1 -0
  275. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-held.sh +4 -0
  276. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +1 -0
  277. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +110 -4
  278. package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +15 -5
  279. package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +12 -0
  280. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-example-gate.md +27 -5
  281. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +12 -0
  282. package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +5 -4
  283. package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +14 -12
  284. package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +43 -17
  285. package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +190 -0
  286. package/payload/gate-sdk/gate-tests/check-identity/bad/gh-hosts.yml +9 -0
  287. package/payload/gate-sdk/gate-tests/check-identity/bad/identity.conf +4 -2
  288. package/payload/gate-sdk/gate-tests/check-identity/bad/scripts/gate-sdk-config.sh +10 -0
  289. package/payload/gate-sdk/gate-tests/check-identity/good/gh-hosts.yml +11 -0
  290. package/payload/gate-sdk/gate-tests/check-identity/good/identity.conf +5 -1
  291. package/payload/gate-sdk/gate-tests/check-identity/good/scripts/gate-sdk-config.sh +10 -0
  292. package/payload/gate-sdk/gate-tests/check-identity.test.sh +114 -0
  293. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-alpha.sh +6 -0
  294. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-delta.sh +5 -0
  295. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-epsilon.sh +6 -0
  296. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/smoke/install.sh +7 -0
  297. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/args +6 -0
  298. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/expect.txt +1 -0
  299. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/installer/lib/common/recipe.sh +9 -0
  300. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/scripts/gate-sdk-config.sh +5 -0
  301. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-alpha.sh +6 -0
  302. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-beta.gate +3 -0
  303. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-gamma.sh +6 -0
  304. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/smoke/install.sh +8 -0
  305. package/payload/gate-sdk/gate-tests/check-install-disposition/good/args +6 -0
  306. package/payload/gate-sdk/gate-tests/check-install-disposition/good/expect.txt +1 -0
  307. package/payload/gate-sdk/gate-tests/check-install-disposition/good/installer/lib/common/recipe.sh +10 -0
  308. package/payload/gate-sdk/gate-tests/check-install-disposition/good/scripts/gate-sdk-config.sh +5 -0
  309. package/payload/gate-sdk/gate-tests/check-kit-enum/bad/check-native-sample.gate +3 -0
  310. package/payload/gate-sdk/gate-tests/check-kit-enum/bad/gates.list +4 -1
  311. package/payload/gate-sdk/gate-tests/check-kit-enum/good/check-native-sample.gate +3 -0
  312. package/payload/gate-sdk/gate-tests/check-kit-enum/good/expect.txt +1 -1
  313. package/payload/gate-sdk/gate-tests/check-kit-enum/good/gates.list +5 -2
  314. package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +6 -5
  315. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/args +3 -1
  316. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/README.md +15 -0
  317. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-one.gate +2 -0
  318. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-two.sh +3 -0
  319. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/expect.txt +3 -1
  320. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +1 -1
  321. package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +3 -1
  322. package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/README.md +13 -0
  323. package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/checks/check-delta-one.gate +2 -0
  324. package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/README.md +14 -0
  325. package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-one.sh +3 -0
  326. package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-two.gate +2 -0
  327. package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +1 -1
  328. package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +87 -89
  329. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/agent-budget-guard.sh +4 -0
  330. package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +56 -0
  331. package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +2 -3
  332. package/payload/gate-sdk/gate-tests/declaration-lib-parity.test.sh +211 -0
  333. package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +16 -15
  334. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +204 -1
  335. package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +73 -0
  336. package/payload/gate-sdk/lib/consumer-smoke.sh +24 -12
  337. package/payload/gate-sdk/lib/gate.sh +353 -22
  338. package/payload/gate-sdk/lib/inject.sh +25 -0
  339. package/payload/gate-sdk/lib/test-hermetic.sh +26 -0
  340. package/payload/gate-sdk/smoke/install.sh +47 -1
  341. package/payload/guard-kit/README.md +14 -11
  342. package/payload/guard-kit/SPEC.md +477 -82
  343. package/payload/guard-kit/bin/run-guard-tests.sh +7 -1
  344. package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +105 -0
  345. package/payload/guard-kit/gate-tests/guard-read-path.test.sh +52 -0
  346. package/payload/guard-kit/guard-tests/cases.tsv +84 -14
  347. package/payload/guard-kit/lib/guard.sh +440 -54
  348. package/payload/guard-kit/templates/close-triage.md +5 -5
  349. package/payload/guard-kit/templates/settings-hooks.json +7 -1
  350. package/payload/lifecycle-kit/README.md +14 -3
  351. package/payload/lifecycle-kit/SPEC.md +929 -93
  352. package/payload/lifecycle-kit/bin/cite-survey.sh +81 -0
  353. package/payload/lifecycle-kit/bin/enter-stage.sh +193 -38
  354. package/payload/lifecycle-kit/bin/file-gap.sh +29 -12
  355. package/payload/lifecycle-kit/bin/file-survey.sh +21 -2
  356. package/payload/lifecycle-kit/checks/check-close-surfaces.gate +3 -0
  357. package/payload/lifecycle-kit/checks/check-gap-inbox-neutrality.gate +3 -0
  358. package/payload/lifecycle-kit/checks/check-lesson-disposition.gate +3 -0
  359. package/payload/lifecycle-kit/checks/check-lifecycle-registration.gate +3 -0
  360. package/payload/lifecycle-kit/checks/check-merge-attrs.gate +3 -0
  361. package/payload/lifecycle-kit/checks/check-scratch-citation.gate +3 -0
  362. package/payload/lifecycle-kit/checks/check-shim-restatement.gate +3 -0
  363. package/payload/lifecycle-kit/checks/check-skill-binding.gate +3 -0
  364. package/payload/lifecycle-kit/checks/check-stage-entry.gate +3 -0
  365. package/payload/lifecycle-kit/checks/check-stage-evidence.gate +3 -0
  366. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +3 -0
  367. package/payload/lifecycle-kit/checks/check-survey-record.gate +3 -0
  368. package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +4 -4
  369. package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +2 -3
  370. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/args +2 -0
  371. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/expect.txt +3 -0
  372. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/gap-inbox.md +5 -0
  373. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/args +2 -0
  374. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/expect.txt +1 -0
  375. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/gap-inbox.md +4 -0
  376. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +2 -3
  377. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +2 -3
  378. package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +2 -3
  379. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/expect.txt +1 -0
  380. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.sh +4 -0
  381. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/surfaces/queue.md +13 -0
  382. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/expect.txt +1 -0
  383. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.sh +4 -0
  384. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/queue.md +31 -0
  385. package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +2 -3
  386. package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +2 -3
  387. package/payload/lifecycle-kit/gate-tests/check-stage-entry/bad/.workflow/WORKFLOW-STATE.txt +3 -3
  388. package/payload/lifecycle-kit/gate-tests/check-stage-entry/good/.workflow/WORKFLOW-STATE.txt +3 -3
  389. package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +24 -25
  390. package/payload/lifecycle-kit/gate-tests/check-stage-evidence/bad/.workflow/WORKFLOW-STATE.txt +2 -2
  391. package/payload/lifecycle-kit/gate-tests/check-stage-evidence/good/.workflow/WORKFLOW-STATE.txt +2 -2
  392. package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +129 -15
  393. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +2 -3
  394. package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +54 -26
  395. package/payload/lifecycle-kit/gate-tests/gap-inbox-route.test.sh +123 -0
  396. package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +142 -0
  397. package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +16 -5
  398. package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +100 -0
  399. package/payload/lifecycle-kit/lib/stages.sh +9 -0
  400. package/payload/lifecycle-kit/smoke/install.sh +96 -19
  401. package/payload/lifecycle-kit/templates/lead.md +60 -0
  402. package/payload/lifecycle-kit/templates/stages/align.md +20 -2
  403. package/payload/lifecycle-kit/templates/stages/build.md +3 -3
  404. package/payload/lifecycle-kit/templates/stages/close.md +48 -15
  405. package/payload/lifecycle-kit/templates/stages/scope.md +29 -5
  406. package/payload/lifecycle-kit/templates/stages/spec.md +6 -2
  407. package/payload/lifecycle-kit/templates/stages/validate.md +1 -1
  408. package/payload/lifecycle-kit/templates/workflow-state-guard.sh +29 -0
  409. package/payload/queue-kit/README.md +12 -10
  410. package/payload/queue-kit/SPEC.md +411 -74
  411. package/payload/queue-kit/bin/queue-counts.sh +35 -0
  412. package/payload/queue-kit/checks/check-queue-entry-budget.gate +3 -0
  413. package/payload/queue-kit/checks/check-queue-hygiene.gate +3 -0
  414. package/payload/queue-kit/checks/check-queue-prose-precondition.gate +3 -0
  415. package/payload/queue-kit/checks/check-queue-sections.gate +3 -0
  416. package/payload/queue-kit/checks/check-queue-slug-liveness.gate +3 -0
  417. package/payload/queue-kit/checks/check-queue-wrap.gate +3 -0
  418. package/payload/queue-kit/checks/check-roadmap-fresh.gate +3 -0
  419. package/payload/queue-kit/checks/check-tag-lead-line.gate +3 -0
  420. package/payload/queue-kit/checks/check-task-conservation.gate +4 -0
  421. package/payload/queue-kit/checks/check-task-names.gate +3 -0
  422. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +15 -0
  423. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +2 -0
  424. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +7 -0
  425. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/expect.txt +4 -0
  426. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/expect.txt +1 -1
  427. package/payload/queue-kit/gate-tests/queue-counts.test.sh +116 -0
  428. package/payload/queue-kit/gate-tests/queue-index.test.sh +55 -119
  429. package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +215 -0
  430. package/payload/queue-kit/gate-tests/roadmap.test.sh +22 -12
  431. package/payload/queue-kit/lib/queue.sh +4 -68
  432. package/payload/queue-kit/smoke/install.sh +1 -1
  433. package/payload/site-kit/SPEC.md +52 -2
  434. package/payload/site-kit/checks/check-docs-cname-parity.gate +3 -0
  435. package/payload/site-kit/checks/check-docs-render-fidelity.sh +2 -0
  436. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +5 -4
  437. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +6 -5
  438. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/checks/check-sample.gate +3 -0
  439. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/expect.txt +1 -1
  440. package/payload/site-kit/smoke/install.sh +1 -1
  441. package/profiles.list +36 -8
  442. package/payload/canon-kit/checks/check-amendment-queue.sh +0 -116
  443. package/payload/canon-kit/checks/check-comment-tier.sh +0 -216
  444. package/payload/canon-kit/checks/check-deprecation-task.sh +0 -90
  445. package/payload/canon-kit/checks/check-docs-cmd.sh +0 -153
  446. package/payload/canon-kit/checks/check-docs-link-convention.sh +0 -78
  447. package/payload/canon-kit/checks/check-install-claim.sh +0 -146
  448. package/payload/canon-kit/checks/check-knob-citation.sh +0 -117
  449. package/payload/canon-kit/checks/check-knob-default-coupling.sh +0 -239
  450. package/payload/canon-kit/checks/check-manifest-count.sh +0 -46
  451. package/payload/canon-kit/checks/check-manifest-temporal.sh +0 -83
  452. package/payload/canon-kit/checks/check-md-refs.sh +0 -128
  453. package/payload/canon-kit/checks/check-payload-claim.sh +0 -133
  454. package/payload/canon-kit/checks/check-prose-enum.sh +0 -115
  455. package/payload/canon-kit/checks/check-prose-tells.sh +0 -207
  456. package/payload/canon-kit/checks/check-spec-derivable-section.sh +0 -69
  457. package/payload/canon-kit/checks/check-spec-dod-singleton.sh +0 -45
  458. package/payload/canon-kit/checks/check-spec-embedded-source.sh +0 -133
  459. package/payload/canon-kit/checks/check-spec-fence-balance.sh +0 -42
  460. package/payload/canon-kit/checks/check-spec-pointer.sh +0 -187
  461. package/payload/canon-kit/checks/check-todo-task-liveness.sh +0 -80
  462. package/payload/canon-kit/checks/check-tracking-claim.sh +0 -136
  463. package/payload/context-kit/bin/footprint.sh +0 -144
  464. package/payload/context-kit/checks/check-brevity.sh +0 -123
  465. package/payload/context-kit/checks/check-footprint-fresh.sh +0 -38
  466. package/payload/context-kit/checks/check-memory-off.sh +0 -112
  467. package/payload/context-kit/checks/check-settings-pins.sh +0 -110
  468. package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +0 -61
  469. package/payload/delegation-kit/checks/check-gate-tamper.sh +0 -139
  470. package/payload/delegation-kit/checks/check-rule-citation.sh +0 -76
  471. package/payload/doctrine-kit/checks/check-doctrine-registration.sh +0 -216
  472. package/payload/drift-kit/bin/trajectory.sh +0 -242
  473. package/payload/evidence-kit/checks/check-battery-roster.sh +0 -86
  474. package/payload/evidence-kit/checks/check-evidence-baseline.sh +0 -103
  475. package/payload/evidence-kit/checks/check-evidence-manifest.sh +0 -104
  476. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/args +0 -3
  477. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/args +0 -3
  478. package/payload/gate-sdk/bin/enforcement-map.sh +0 -272
  479. package/payload/gate-sdk/checks/check-assertion-strength.sh +0 -134
  480. package/payload/gate-sdk/checks/check-commit-msg.sh +0 -50
  481. package/payload/gate-sdk/checks/check-commit-subject.sh +0 -43
  482. package/payload/gate-sdk/checks/check-core-files.sh +0 -75
  483. package/payload/gate-sdk/checks/check-enforcement-fresh.sh +0 -37
  484. package/payload/gate-sdk/checks/check-exec-bit.sh +0 -95
  485. package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +0 -106
  486. package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +0 -105
  487. package/payload/gate-sdk/checks/check-gate-fail-closed.sh +0 -84
  488. package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +0 -92
  489. package/payload/gate-sdk/checks/check-gate-output.sh +0 -73
  490. package/payload/gate-sdk/checks/check-graph.sh +0 -631
  491. package/payload/gate-sdk/checks/check-hook-exec-bit.sh +0 -45
  492. package/payload/gate-sdk/checks/check-identity.sh +0 -134
  493. package/payload/gate-sdk/checks/check-kit-enum.sh +0 -94
  494. package/payload/gate-sdk/checks/check-kit-registration.sh +0 -68
  495. package/payload/gate-sdk/checks/check-readme-roster.sh +0 -107
  496. package/payload/gate-sdk/checks/check-reads-couples.sh +0 -199
  497. package/payload/gate-sdk/checks/check-root-tiering.sh +0 -66
  498. package/payload/gate-sdk/checks/check-smoke-entry-guard.sh +0 -53
  499. package/payload/gate-sdk/checks/check-template-copy-parity.sh +0 -126
  500. package/payload/gate-sdk/checks/check-template-registry-parity.sh +0 -81
  501. package/payload/gate-sdk/checks/check-test-hermetic.sh +0 -119
  502. package/payload/gate-sdk/checks/check-workflow-tiering.sh +0 -84
  503. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/args +0 -1
  504. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/args +0 -1
  505. package/payload/gate-sdk/gate-tests/check-identity/bad/args +0 -1
  506. package/payload/gate-sdk/gate-tests/check-identity/good/args +0 -1
  507. package/payload/lifecycle-kit/bin/close-surfaces.sh +0 -94
  508. package/payload/lifecycle-kit/checks/check-close-surfaces.sh +0 -63
  509. package/payload/lifecycle-kit/checks/check-lesson-disposition.sh +0 -98
  510. package/payload/lifecycle-kit/checks/check-lifecycle-registration.sh +0 -54
  511. package/payload/lifecycle-kit/checks/check-merge-attrs.sh +0 -69
  512. package/payload/lifecycle-kit/checks/check-shim-restatement.sh +0 -97
  513. package/payload/lifecycle-kit/checks/check-skill-binding.sh +0 -59
  514. package/payload/lifecycle-kit/checks/check-stage-entry.sh +0 -197
  515. package/payload/lifecycle-kit/checks/check-stage-evidence.sh +0 -81
  516. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.sh +0 -47
  517. package/payload/lifecycle-kit/checks/check-survey-record.sh +0 -102
  518. package/payload/queue-kit/bin/queue-index.sh +0 -182
  519. package/payload/queue-kit/bin/roadmap.sh +0 -76
  520. package/payload/queue-kit/checks/check-queue-entry-budget.sh +0 -106
  521. package/payload/queue-kit/checks/check-queue-hygiene.sh +0 -81
  522. package/payload/queue-kit/checks/check-queue-prose-precondition.sh +0 -63
  523. package/payload/queue-kit/checks/check-queue-sections.sh +0 -44
  524. package/payload/queue-kit/checks/check-queue-slug-liveness.sh +0 -63
  525. package/payload/queue-kit/checks/check-queue-wrap.sh +0 -56
  526. package/payload/queue-kit/checks/check-roadmap-fresh.sh +0 -110
  527. package/payload/queue-kit/checks/check-tag-lead-line.sh +0 -70
  528. package/payload/queue-kit/checks/check-task-conservation.sh +0 -50
  529. package/payload/queue-kit/checks/check-task-names.sh +0 -128
  530. package/payload/site-kit/checks/check-docs-cname-parity.sh +0 -80
  531. /package/payload/context-kit/gate-tests/{check-memory-off → check-settings-paths}/bad/args +0 -0
  532. /package/payload/context-kit/gate-tests/{check-memory-off → check-settings-paths}/good/args +0 -0
  533. /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/{gates → scripts}/check-sample.sh +0 -0
  534. /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/{gates → scripts}/check-sample.sh +0 -0
  535. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{check-gamma.sh → scripts/check-gamma.sh} +0 -0
  536. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
  537. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
  538. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gates.list → scripts/gates.list} +0 -0
  539. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{check-beta.sh → scripts/check-beta.sh} +0 -0
  540. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
  541. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
  542. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gates.list → scripts/gates.list} +0 -0
  543. /package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/{site-config.sh → scripts/site-config.sh} +0 -0
  544. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/CNAME +0 -0
  545. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/index.md +0 -0
  546. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/docs → docs}/posts/2026-01-01-legacy.md +0 -0
  547. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/pkg → pkg}/gate-tests/fixture.md +0 -0
  548. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{site-config.sh → scripts/site-config.sh} +0 -0
@@ -4,6 +4,25 @@
4
4
  set -euo pipefail
5
5
  : "${SMOKE_KIT_ROOT:?run via run-consumer-smoke.sh}"
6
6
  SDK="$SMOKE_KIT_ROOT/../gate-sdk" # the vendored gate-sdk beside this kit
7
+ # spec: gate-sdk/SPEC.md §lib/gate.sh — the smoke resolves a kit gate through gate_command, the way
8
+ # a consumer's own battery does: this is the one context where a ported member's `.sh` is genuinely
9
+ # absent, and an absent binary is exit 2 — never a skip, never a pass, never an invented fallback.
10
+ # shellcheck source=../../gate-sdk/lib/gate.sh
11
+ source "$SDK/lib/gate.sh"
12
+ # spec: gate-sdk/SPEC.md §lib/gate.sh — the binary pinned absolute off its own default spelling,
13
+ # because two of the dispatches below run from a sandbox cwd where the knob's repo-relative
14
+ # default resolves to nothing (the rule lib/test-hermetic.sh already applies in the test lane)
15
+ smoke_bin="$(gate_native_bin)"
16
+ [[ "$smoke_bin" == /* ]] || export GATE_SDK_NATIVE_BIN="$PWD/$smoke_bin"
17
+ unset smoke_bin
18
+
19
+ kit_gate() { # $1=gate-name $2.. = gate args — dispatch a vendored lifecycle-kit gate by name
20
+ local g="$1"; shift
21
+ local -a argv=()
22
+ mapfile -t argv < <(gate_command "$g" "$SMOKE_KIT_ROOT/checks")
23
+ [[ ${#argv[@]} -gt 0 ]] || return 2
24
+ "${argv[@]}" "$@"
25
+ }
7
26
 
8
27
  cat >> scripts/gates.list <<'EOF'
9
28
  # lifecycle-kit
@@ -13,6 +32,8 @@ check-close-surfaces
13
32
  check-merge-attrs
14
33
  check-lifecycle-registration
15
34
  check-survey-record
35
+ check-gap-inbox-neutrality
36
+ check-scratch-citation
16
37
  EOF
17
38
 
18
39
  if [[ ! -f TASK-QUEUE.md ]]; then
@@ -39,7 +60,7 @@ cat > .workflow/WORKFLOW-STATE.txt <<EOF
39
60
 
40
61
  ---
41
62
 
42
- — scope smoke001 $(date +%F)
63
+ — scope smoke001 $(date +%F) $(git rev-parse --short HEAD)
43
64
  EOF
44
65
 
45
66
  # spec: lifecycle-kit/SPEC.md §check-survey-record — file a real block off the seed commit so the
@@ -48,14 +69,14 @@ EOF
48
69
  bash "$SMOKE_KIT_ROOT/bin/file-survey.sh" \
49
70
  "smoke: does a freshly vendored install leave a survey record check-survey-record can parse" \
50
71
  ".workflow/survey-record.md" \
51
- "bash checks/check-survey-record.sh" \
72
+ "bash gate-sdk/bin/run-gates.sh --for .workflow/survey-record.md" \
52
73
  "yes — a filed block naming the seed commit parses clean" >/dev/null
53
74
 
54
75
  # spec: lifecycle-kit/README.md §Install — step 4 points the consumer's own always-loaded agent file at the machine; run it on the consumer, not only on a scratch copy, or check-lifecycle-registration has nothing to hold
55
76
  bash "$SMOKE_KIT_ROOT/bin/install-lifecycle.sh" >/dev/null
56
77
 
57
78
  bash "$SDK/bin/gen-pre-commit.sh" --write >/dev/null
58
- bash "$SDK/checks/check-graph.sh" --emit > scripts/CHECK-GRAPH.html
79
+ bash "$SDK/bin/run-gates.sh" --emit graph > scripts/CHECK-GRAPH.html
59
80
 
60
81
  # spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — exercise enter-stage end-to-end under .tmp (advisory tool, no fixture pair)
61
82
  es="$PWD/.tmp/enter-stage-smoke"
@@ -77,7 +98,7 @@ cat > "$es/.workflow/WORKFLOW-STATE.txt" <<'EOF'
77
98
 
78
99
  ---
79
100
 
80
- prev-iter close ffffffff 2020-01-01
101
+ prev-iter close ffffffff 2020-01-01 none
81
102
  EOF
82
103
 
83
104
  es_run() {
@@ -92,15 +113,15 @@ esq="$es/TASK-QUEUE.md"; ess="$es/.workflow/WORKFLOW-STATE.txt"; d="$(date +%F)"
92
113
 
93
114
  es_run scope >/dev/null
94
115
  grep -q "^## Iteration: —\$" "$esq" || { echo "smoke(enter-stage): scope header wrong" >&2; exit 1; }
95
- grep -q "^— scope aabbccdd $d\$" "$ess" || { echo "smoke(enter-stage): scope stamp missing" >&2; exit 1; }
116
+ grep -Eq "^— scope aabbccdd $d ([0-9a-f]{7,40}|none)\$" "$ess" || { echo "smoke(enter-stage): scope stamp missing or carries no head field" >&2; exit 1; }
96
117
  if grep -q 'prev-iter' "$ess"; then echo "smoke(enter-stage): state not truncated on reset" >&2; exit 1; fi
97
118
 
98
119
  # spec: lifecycle-kit/SPEC.md §The stamp protocol — a non-boundary entry writes the evidence file ONLY: the cursor advances by the appended stamp and the queue is byte-identical afterwards
99
120
  cp "$esq" "$es/q.before"
100
121
  es_run align >/dev/null
101
122
  cmp -s "$es/q.before" "$esq" || { echo "smoke(enter-stage): a non-boundary entry wrote the queue" >&2; exit 1; }
102
- grep -q "^— align aabbccdd $d\$" "$ess" || { echo "smoke(enter-stage): align stamp missing" >&2; exit 1; }
103
- grep -q "^— scope aabbccdd $d\$" "$ess" || { echo "smoke(enter-stage): scope stamp lost on append" >&2; exit 1; }
123
+ grep -Eq "^— align aabbccdd $d ([0-9a-f]{7,40}|none)\$" "$ess" || { echo "smoke(enter-stage): align stamp missing or carries no head field" >&2; exit 1; }
124
+ grep -Eq "^— scope aabbccdd $d ([0-9a-f]{7,40}|none)\$" "$ess" || { echo "smoke(enter-stage): scope stamp lost on append" >&2; exit 1; }
104
125
  [[ "$(awk '/^---[[:space:]]*$/{f=1;next} f && NF {l=$2} END{print l}' "$ess")" == align ]] \
105
126
  || { echo "smoke(enter-stage): cursor did not advance to align" >&2; exit 1; }
106
127
 
@@ -132,7 +153,7 @@ cat > "$ess" <<EOF
132
153
 
133
154
  ---
134
155
 
135
- pf-iter build aabbccdd $d
156
+ pf-iter build aabbccdd $d none
136
157
  EOF
137
158
  cat > "$es/preflight-stub.sh" <<'STUB'
138
159
  #!/usr/bin/env bash
@@ -163,7 +184,7 @@ touch "$es/preflight-ok"
163
184
  es_pf_run validate >/dev/null || { echo "smoke(enter-stage): green preflight should let the entry through" >&2; exit 1; }
164
185
  [[ "$(awk '/^---[[:space:]]*$/{f=1;next} f && NF {l=$2} END{print l}' "$ess")" == validate ]] \
165
186
  || { echo "smoke(enter-stage): green preflight did not advance the cursor to validate" >&2; exit 1; }
166
- grep -q "^pf-iter validate aabbccdd $d\$" "$ess" || { echo "smoke(enter-stage): green preflight did not stamp" >&2; exit 1; }
187
+ grep -Eq "^pf-iter validate aabbccdd $d ([0-9a-f]{7,40}|none)\$" "$ess" || { echo "smoke(enter-stage): green preflight did not stamp" >&2; exit 1; }
167
188
 
168
189
  # spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — --simulate: would-no-op, would-pass, would-refuse; read-only and prefix-marked in all three
169
190
  cp "$esq" "$es/q.before"; cp "$ess" "$es/s.before"
@@ -181,6 +202,48 @@ fi
181
202
  cmp -s "$es/s.before" "$ess" || { echo "smoke(enter-stage): --simulate wrote state" >&2; exit 1; }
182
203
  cmp -s "$es/q.before" "$esq" || { echo "smoke(enter-stage): --simulate wrote queue" >&2; exit 1; }
183
204
 
205
+ # spec: gate-sdk/SPEC.md §The bin/-tool contract — behavioral coverage, one member at a time: help on stdout at exit 0, an unrecognized leading '-' refused on stderr at exit 2, and the capture members' durable surface byte-unchanged after both (a test reading exit codes alone passes the bug)
206
+ av="$es/argv"; mkdir -p "$av"
207
+ printf '# contract: seeded\n- 2026-01-01 — a real bullet\n' > "$av/inbox.md"
208
+ printf '# contract: seeded\n\n## 2026-01-01 scope — a seeded survey\n- corpus: x\n- oracle: y\n- rev: z\n- finding: w\n' > "$av/record.md"
209
+ cp "$av/inbox.md" "$av/inbox.before"; cp "$av/record.md" "$av/record.before"
210
+
211
+ av_run() {
212
+ local tool="$1"; shift
213
+ env LIFECYCLE_KIT_GAP_INBOX_FILE="$av/inbox.md" \
214
+ LIFECYCLE_KIT_SURVEY_RECORD_FILE="$av/record.md" \
215
+ bash "$SMOKE_KIT_ROOT/bin/$tool" "$@"
216
+ }
217
+
218
+ for t in file-gap.sh file-survey.sh cite-survey.sh enter-stage.sh; do
219
+ out="$(av_run "$t" --help 2>/dev/null)" \
220
+ || { echo "smoke(argv): $t --help should exit 0" >&2; exit 1; }
221
+ grep -q '^usage: ' <<<"$out" \
222
+ || { echo "smoke(argv): $t --help wrote no usage to stdout: $out" >&2; exit 1; }
223
+ out="$(av_run "$t" -h 2>/dev/null)" || { echo "smoke(argv): $t -h should exit 0" >&2; exit 1; }
224
+ grep -q '^usage: ' <<<"$out" || { echo "smoke(argv): $t -h wrote no usage to stdout" >&2; exit 1; }
225
+ done
226
+
227
+ # spec: gate-sdk/SPEC.md §The bin/-tool contract — enter-stage is exempt from the refusal half (its positionals are membership-validated), the three free-text members are not; file-survey.sh's refusal scans every positional because four slots make arity no protection
228
+ for t in file-gap.sh file-survey.sh cite-survey.sh; do
229
+ rc=0; av_run "$t" --list >/dev/null 2>&1 || rc=$?
230
+ [[ "$rc" -eq 2 ]] || { echo "smoke(argv): $t refused --list with exit $rc, want 2" >&2; exit 1; }
231
+ so="$(av_run "$t" --list 2>/dev/null)" || true
232
+ [[ -z "$so" ]] || { echo "smoke(argv): $t wrote usage to stdout on a refusal: $so" >&2; exit 1; }
233
+ done
234
+ rc=0; av_run file-survey.sh q c o --finding >/dev/null 2>&1 || rc=$?
235
+ [[ "$rc" -eq 2 ]] || { echo "smoke(argv): file-survey.sh took a flag in its fourth slot (exit $rc)" >&2; exit 1; }
236
+
237
+ cmp -s "$av/inbox.before" "$av/inbox.md" \
238
+ || { echo "smoke(argv): file-gap.sh wrote the gap inbox on a help or refusal path" >&2; exit 1; }
239
+ cmp -s "$av/record.before" "$av/record.md" \
240
+ || { echo "smoke(argv): file-survey.sh wrote the survey record on a help or refusal path" >&2; exit 1; }
241
+
242
+ # spec: gate-sdk/SPEC.md §The bin/-tool contract — '--' ends option processing, so the refusal never makes a legitimate filing unfileable
243
+ av_run file-gap.sh -- "--list is captured at exit 0" >/dev/null
244
+ grep -q -- '— --list is captured at exit 0$' "$av/inbox.md" \
245
+ || { echo "smoke(argv): file-gap.sh -- did not file prose beginning with a dash" >&2; exit 1; }
246
+
184
247
  # spec: lifecycle-kit/SPEC.md §bin/install-lifecycle.sh — exercise the injector + check-lifecycle-registration end-to-end under .tmp (advisory tool, no fixture pair)
185
248
  il="$es/agent"; mkdir -p "$il"
186
249
  cat > "$il/CLAUDE.md" <<'EOF'
@@ -189,7 +252,7 @@ cat > "$il/CLAUDE.md" <<'EOF'
189
252
  Resident context the consumer keeps.
190
253
  EOF
191
254
  il_run() { LIFECYCLE_KIT_AGENT_FILE="$il/CLAUDE.md" bash "$SMOKE_KIT_ROOT/bin/install-lifecycle.sh" "$@"; }
192
- il_gate() { LIFECYCLE_KIT_AGENT_FILE="$il/CLAUDE.md" bash "$SMOKE_KIT_ROOT/checks/check-lifecycle-registration.sh" "$@"; }
255
+ il_gate() { ( export LIFECYCLE_KIT_AGENT_FILE="$il/CLAUDE.md"; kit_gate check-lifecycle-registration "$@" ); }
193
256
 
194
257
  il_run >/dev/null
195
258
  grep -q "<!-- lifecycle-kit:begin -->" "$il/CLAUDE.md" || { echo "smoke(install-lifecycle): block not injected" >&2; exit 1; }
@@ -210,14 +273,14 @@ printf '# Scratch agent file\n' > "$ma/CLAUDE.md"
210
273
  grep -q "^# lifecycle-kit:merge:begin\$" "$ma/.gitattributes" || { echo "smoke(install-lifecycle): merge-attribute block not injected into .gitattributes" >&2; exit 1; }
211
274
  grep -q "^\.workflow/WORKFLOW-STATE.txt merge=iteration-scoped\$" "$ma/.gitattributes" || { echo "smoke(install-lifecycle): state-file merge attribute missing" >&2; exit 1; }
212
275
  [[ "$(git -C "$ma" config --get merge.iteration-scoped.driver)" == "true" ]] || { echo "smoke(install-lifecycle): keep-ours driver not registered in git config" >&2; exit 1; }
213
- ( cd "$ma" && bash "$SMOKE_KIT_ROOT/checks/check-merge-attrs.sh" >/dev/null ) || { echo "smoke(install-lifecycle): a freshly installed .gitattributes should pass the parity gate" >&2; exit 1; }
276
+ ( cd "$ma" && kit_gate check-merge-attrs >/dev/null ) || { echo "smoke(install-lifecycle): a freshly installed .gitattributes should pass the parity gate" >&2; exit 1; }
214
277
 
215
278
  cp "$ma/.gitattributes" "$ma/before"
216
279
  ( cd "$ma" && bash "$SMOKE_KIT_ROOT/bin/install-lifecycle.sh" >/dev/null )
217
280
  cmp -s "$ma/before" "$ma/.gitattributes" || { echo "smoke(install-lifecycle): merge-attribute re-run was not idempotent" >&2; exit 1; }
218
281
 
219
282
  printf 'README.md merge=iteration-scoped\n' >> "$ma/.gitattributes" # smuggled reverse-edge line
220
- if ( cd "$ma" && bash "$SMOKE_KIT_ROOT/checks/check-merge-attrs.sh" >/dev/null 2>&1 ); then
283
+ if ( cd "$ma" && kit_gate check-merge-attrs >/dev/null 2>&1 ); then
221
284
  echo "smoke(install-lifecycle): a smuggled out-of-set merge attribute should redden the parity gate" >&2; exit 1
222
285
  fi
223
286
 
@@ -271,7 +334,7 @@ EOF
271
334
 
272
335
  ---
273
336
 
274
- $1 close aabbccdd $d
337
+ $1 close aabbccdd $d none
275
338
  EOF
276
339
  }
277
340
  cat > "$br/stages.sh" <<STAGES
@@ -310,7 +373,7 @@ write_br_fixture — # (d)
310
373
  printf '# contract\n' > "$brd"
311
374
  br_run scope >/dev/null || { echo "smoke(enter-stage): boundary-require should skip a never-named closing iteration" >&2; exit 1; }
312
375
 
313
- # spec: lifecycle-kit/SPEC.md §The committed gap inbox — the iteration-boundary entry refuses while the gap inbox holds bullets (the Lessons-refusal contract); an empty (header-only) inbox passes
376
+ # spec: lifecycle-kit/SPEC.md §The committed gap inbox — the iteration-boundary gap-inbox check: one detector, two dispositions. A close-skipped boundary refuses (the Lessons-refusal contract, nothing written); a post-close one admits and carries the bullets; an empty (header-only) inbox passes either way.
314
377
  gp="$es/gap-inbox"; mkdir -p "$gp/.workflow"
315
378
  gpq="$gp/TASK-QUEUE.md"; gps="$gp/.workflow/WORKFLOW-STATE.txt"; gpi="$gp/.workflow/gap-inbox.md"
316
379
  cat > "$gpq" <<EOF
@@ -325,13 +388,17 @@ cat > "$gpq" <<EOF
325
388
  ## Done
326
389
  ## Lessons Learned
327
390
  EOF
328
- cat > "$gps" <<EOF
391
+ gp_seed_state() { # $1 = the last stage the closing iteration reached
392
+ cat > "$gps" <<EOF
329
393
  # contract
330
394
 
331
395
  ---
332
396
 
333
- gap-iter close aabbccdd $d
397
+ gap-iter scope aabbccdd $d none
398
+ gap-iter $1 aabbccdd $d none
334
399
  EOF
400
+ }
401
+ gp_seed_state build
335
402
  cat > "$gp/stages.sh" <<STAGES
336
403
  # shellcheck shell=bash
337
404
  LIFECYCLE_KIT_GAP_INBOX_FILE=$gpi
@@ -345,12 +412,22 @@ gp_run() {
345
412
  LIFECYCLE_KIT_CONFIG_FILE="$gp/stages.sh" \
346
413
  bash "$SMOKE_KIT_ROOT/bin/enter-stage.sh" "$@"
347
414
  }
348
- printf '# contract: gap inbox\n- 2026-07-17 — an untriaged gap bullet\n' > "$gpi" # (a) non-empty inbox → refuse, nothing written
415
+ printf '# contract: gap inbox\n- 2026-07-17 — an untriaged gap bullet\n' > "$gpi" # (a) close-skipped + non-empty inbox → refuse, nothing written
349
416
  cp "$gpq" "$gp/q.before"; cp "$gps" "$gp/s.before"
350
- if gp_run scope >/dev/null 2>&1; then echo "smoke(enter-stage): should refuse a boundary entry while the gap inbox holds bullets" >&2; exit 1; fi
417
+ if gp_run scope >/dev/null 2>&1; then echo "smoke(enter-stage): should refuse a boundary entry while the gap inbox holds bullets and the closing stage was skipped" >&2; exit 1; fi
351
418
  cmp -s "$gp/s.before" "$gps" || { echo "smoke(enter-stage): wrote state on a gap-inbox refusal" >&2; exit 1; }
352
419
  cmp -s "$gp/q.before" "$gpq" || { echo "smoke(enter-stage): wrote queue on a gap-inbox refusal" >&2; exit 1; }
353
- printf '# contract: gap inbox\n' > "$gpi" # (b) header-only inbox → boundary entry proceeds
420
+ gp_sim="$(gp_run --simulate scope 2>&1)" || true
421
+ grep -q 'would be refused' <<<"$gp_sim" || { echo "smoke(enter-stage): --simulate did not relay the close-skipped gap-inbox refusal -- $gp_sim" >&2; exit 1; }
422
+ grep -q 'help:' <<<"$gp_sim" || { echo "smoke(enter-stage): --simulate relayed a refusal without its recovery -- $gp_sim" >&2; exit 1; }
423
+ gp_seed_state close # (b) post-close + non-empty inbox → admit, carrying the bullets
424
+ gp_out="$(gp_run scope 2>&1)" || { echo "smoke(enter-stage): a post-close gap inbox should not refuse a boundary entry -- $gp_out" >&2; exit 1; }
425
+ grep -q 'intake' <<<"$gp_out" || { echo "smoke(enter-stage): the post-close admission printed no carried-bullet advisory -- $gp_out" >&2; exit 1; }
426
+ grep -q '2026-07-17' <<<"$gp_out" || { echo "smoke(enter-stage): the post-close advisory did not name the carried bullet -- $gp_out" >&2; exit 1; }
427
+ grep -q '^- 2026-07-17' "$gpi" || { echo "smoke(enter-stage): the admitted entry consumed the carried bullet" >&2; exit 1; }
428
+ grep -q "^## Iteration: —\$" "$gpq" || { echo "smoke(enter-stage): the post-close admission did not reset the header" >&2; exit 1; }
429
+ printf '# contract: gap inbox\n' > "$gpi" # (c) header-only inbox → boundary entry proceeds
430
+ gp_seed_state close
354
431
  gp_run scope >/dev/null || { echo "smoke(enter-stage): a header-only gap inbox should not refuse a boundary entry" >&2; exit 1; }
355
432
  grep -q "^## Iteration: —\$" "$gpq" || { echo "smoke(enter-stage): gap-inbox pass did not reset the header" >&2; exit 1; }
356
433
 
@@ -84,6 +84,18 @@ still-running `run-validate`. Every check passed mid-write, because the producer
84
84
  commits its evidence and keeps going, so the terminal commit existing is fully
85
85
  compatible with the process still executing.
86
86
 
87
+ **When the notification does not arrive, no single read distinguishes a
88
+ finished-but-unreported session from a live one.** Delivery can fail, and the
89
+ rule above then has no fallback — while the artifact reads a lead reaches for
90
+ next are the same ones it just refused. What recovers it is two signals and a
91
+ question: the session's absence from the harness's running-agent roster, a
92
+ `DONE` marker in its journal, and — decisive whenever either is ambiguous —
93
+ asking the session itself, which §A running session is asked, never instructed
94
+ already sanctions as a question rather than a command. The `DONE` check carries
95
+ a sharp edge worth stating rather than rediscovering: it is valid only as the
96
+ journal's **last line**, so any out-of-order append silently invalidates it
97
+ while leaving the marker plainly visible.
98
+
87
99
  **Any prompt-answered signal is a start signal, never a completion one.** The
88
100
  same lead read an operator's note about having just answered a stalled permission
89
101
  prompt as the stage being finished. It means the opposite: an approval prompt
@@ -222,6 +234,42 @@ channel it is meant to keep reading for the rest of the unit. It is swept with
222
234
  the rest of the scratch dir at the iteration boundary
223
235
  (delegation-kit/SPEC.md §Resume journal — agent writes, scratch reset sweeps).
224
236
 
237
+ ## A running session is asked, never instructed
238
+
239
+ A dispatched stage session is not a tool call the lead may re-issue. Three rules
240
+ bind the lead here and each was paid for; the root cause under all three is one
241
+ habit, stated last.
242
+
243
+ **An instruction to run something is destructive when the answer is "already
244
+ did".** §The lead model already forbids the lead *itself* re-running the evidence
245
+ producer; this is the same harm through the other actor. When the lead does not
246
+ know what a session has run, the message is a **question** — *what have you run,
247
+ and what did it report?* — never a command. Attested: a stage whose oracle had
248
+ completed and written its evidence rows was told to run it again; the runner
249
+ truncates its artifact on start, the rows were uncommitted, and they were lost
250
+ and had to be regenerated. A question costs one turn and destroys nothing.
251
+
252
+ **A status-only turn is not evidence that a session is stuck.** Content-free
253
+ turns are what a long foreground call looks like from outside, so reading two of
254
+ them as a stall is reading the channel rather than the work. Read the artifact
255
+ the work writes — the evidence file, the log, the lock — which answers in one
256
+ call what any number of further turns will not.
257
+
258
+ **A dispatch prompt carries no duration estimate or long-run caution unless it
259
+ is measured.** An invented cost framing does not merely mislead: it makes the
260
+ receiving session plan around a run that needs no planning, and it primes the
261
+ lead to misread that session's ordinary turns as a stall. An oracle run that
262
+ fits one foreground call is dispatched as exactly that — a plain foreground
263
+ invocation, no backgrounding, no monitor, no pipe or redirect — and the dispatch
264
+ says nothing about how long it takes.
265
+
266
+ **The root cause: a duration or a count reported by a subagent is checkable, so
267
+ it is checked before anything is spent on it.** It is checkable against the tree,
268
+ or against the reporting session's own metadata — a claimed sub-step longer than
269
+ the whole session that reported it is disproved by arithmetic the lead already
270
+ holds. Relaying an unverified figure into a dispatch is what converts one
271
+ session's guess into standing instruction for every session after it.
272
+
225
273
  ## Policy is config, not prose
226
274
 
227
275
  All *standing* dispatch policy — everything true of every dispatch, not the
@@ -266,6 +314,18 @@ therefore not conflict-avoidance; it silently spends the per-session audit trail
266
314
  the stamp exists to provide, and no later session can repair it, because
267
315
  backdating a stamp falsifies the trail rather than restoring it.
268
316
 
317
+ **A recurrence you judge is still yours to record, and the gap inbox is how.**
318
+ Every session that judges a recurrence is obliged to stamp the date onto that
319
+ entry's declaration (lifecycle-kit/SPEC.md §The committed gap inbox) — and the
320
+ no-queue-write rule above leaves you no way to stamp one. You discharge the
321
+ obligation by **filing the judgment and its grounds into a gap bullet**
322
+ (`bin/file-gap.sh`): the session that may write the queue then stamps from your
323
+ prose, exactly as the drain stamps from a filer's. Doing this at the boundary is
324
+ safe — the entry admits a bullet the closing stage could not have drained and
325
+ carries it into the entering session's intake, so a boundary-filed judgment
326
+ reaches a judge rather than a refusal. What you must not do is leave the judgment
327
+ unrecorded on the ground that you cannot stamp it.
328
+
269
329
  An answer that
270
330
  amounts to a design ruling is landed **by the stage session**, in the governed
271
331
  surface it belongs to (the amendment, the queue entry), *before* the session
@@ -4,7 +4,7 @@ battery>* as one gate. Exit condition: no unresolved conflicts or terminology
4
4
  drift.
5
5
 
6
6
  **First step — stamp evidence.** Run lifecycle-kit's `bin/enter-stage.sh
7
- align`: it appends `<iteration> align <session-id> <date>` to
7
+ align`: it appends `<iteration> align <session-id> <date> <head>` to
8
8
  `.workflow/WORKFLOW-STATE.txt` (required by `check-stage-evidence`; the stamp
9
9
  proves invocation, not faithful execution), reading `<session-id>` from
10
10
  `bin/session-id.sh`
@@ -31,7 +31,7 @@ rule). The arriving stage stamps its own entry as its first step
31
31
  Trigger 3 is mechanized at build entry: `check-stage-entry` assertion C blocks
32
32
  the build entry when the on-disk amendments carry a cross-component signal and
33
33
  no `<iter> align` stamp exists. To skip the audit anyway, the user must
34
- explicitly rule it unwarranted and a `<iter> align-waived <session> <date>`
34
+ explicitly rule it unwarranted and a `<iter> align-waived <session> <date> <head>`
35
35
  line is recorded in `.workflow/WORKFLOW-STATE.txt` — never self-issued by the
36
36
  entering build session (lifecycle-kit/SPEC.md §check-stage-entry).
37
37
 
@@ -62,6 +62,24 @@ deliverable, so check it against what the deltas actually mandate rather than
62
62
  against the sentence it heads. And every `## Existing sections updated` entry
63
63
  must name the delta that owns it (canon-kit/templates/SPEC-amendment.md).
64
64
 
65
+ **A grammar the amendment states about a tool's behaviour is run against that
66
+ tool.** An amendment modelling something outside itself — a filter language, an
67
+ option parser, a file format — is a *claim about a program*, and reading it is
68
+ not testing it. One invocation settles it. Attested: an amendment specified a
69
+ pin-path grammar admitting a leading bracket step, the gate refused any path not
70
+ opening with `.`, and the tool being modelled read a leading `["k"]` as an array
71
+ literal rather than an index — a three-way disagreement that passed authoring and
72
+ this audit and was caught by the first differential run at build.
73
+
74
+ **The `## Existing sections updated` roster is checked from the tree, not from
75
+ the amendment.** A roster entry with no delta is visible on the document; a
76
+ *surface with no entry* is not, because the evidence is in the tree. When a delta
77
+ replaces a literal — a version, a floor, a policy phrase — grep the tree for the
78
+ old one and reconcile every survivor against the roster. Attested twice in one
79
+ iteration, both times a documentation surface reading as commentary that the
80
+ grep found and the amendment did not name (`amendment-roster-omission-detection`
81
+ owns whether any of this is gateable).
82
+
65
83
  **Every amendment's "wires cleanly against the current tree" is a hypothesis,
66
84
  and the align audit is its first test.** Authoring a producer silently asserts
67
85
  the consumer's read side already matches — it rarely does. Verify every
@@ -19,12 +19,12 @@ consistency gate>* and refuse to stamp if it is red — fix the drift first (or
19
19
  prior stage is scope, whose exit the entry already re-fires — **except** when
20
20
  `check-stage-entry` assertion C fires: a cross-component amendment signal with
21
21
  no align stamp blocks the entry until the iteration carries either an align
22
- stamp or an explicit `<iter> align-waived <session> <date>` waiver line,
22
+ stamp or an explicit `<iter> align-waived <session> <date> <head>` waiver line,
23
23
  written **only on the user's explicit ruling** — never self-issued by this
24
24
  entering session.
25
25
 
26
26
  **First step — stamp evidence.** Run lifecycle-kit's
27
- `bin/enter-stage.sh build`: it appends `<iteration> build <session-id> <date>`
27
+ `bin/enter-stage.sh build`: it appends `<iteration> build <session-id> <date> <head>`
28
28
  to `.workflow/WORKFLOW-STATE.txt` (required by `check-stage-evidence`; the
29
29
  stamp proves invocation, not faithful execution), reading `<session-id>` from
30
30
  `bin/session-id.sh`
@@ -43,7 +43,7 @@ a session reset at a task boundary; reach for mid-task summarization only as
43
43
  a fallback before a commit, never as the routine per-task reset.
44
44
 
45
45
  **Every session still stamps** — re-run `bin/enter-stage.sh build` each
46
- session: it appends a fresh `<iter> build <session-id> <date>` line with this
46
+ session: it appends a fresh `<iter> build <session-id> <date> <head>` line with this
47
47
  session's id, so WORKFLOW-STATE keeps the per-session audit trail
48
48
  (`check-stage-evidence` tolerates multiple `build` stamps). A sibling stamp
49
49
  naming `build` leaves the cursor where it already is, so there is no
@@ -3,7 +3,7 @@ merge. Exit condition: Done and Lessons Learned sections cleared (harvestable
3
3
  lessons promoted first).
4
4
 
5
5
  **First step — stamp evidence.** Run lifecycle-kit's `bin/enter-stage.sh
6
- close`: it appends `<iteration> close <session-id> <date>` to
6
+ close`: it appends `<iteration> close <session-id> <date> <head>` to
7
7
  `.workflow/WORKFLOW-STATE.txt` (required by `check-stage-evidence`; the stamp
8
8
  proves invocation, not faithful execution), reading `<session-id>` from
9
9
  `bin/session-id.sh`
@@ -75,20 +75,53 @@ session.
75
75
  feeds the staleness read (an aged bullet is a signal, not a free pass).
76
76
  Draining is not deleting: a bullet naming a concrete unfixed gap must become a
77
77
  task or a fix, not evaporate — the same clearing-is-not-processing rule as
78
- Lessons. The next iteration's scope entry refuses a non-empty inbox
79
- (§bin/enter-stage.sh), so an undrained gap blocks the boundary rather than
80
- crossing it silently.
81
- **Stamp the recurrence, in addition to the disposition.** Resolve each
82
- bullet's prose against the live slug set yourself — a bullet may carry a
83
- `recurrence of <slug>:` marker from `bin/file-gap.sh`, but a raw append is a
84
- legal fallback, so the marker is a convenience and this re-resolution is the
85
- channel. On a match, append the bullet's date to that entry's `recurrence:`
86
- declaration (creating the line when absent), in this same queue-writing
87
- commit — never *instead of* the bullet's own disposition. It is idempotent per
88
- (slug, date): a slug already carrying today's date gains nothing. A slug that
89
- resolves only in the done section is not a recurrence — the finding recurred
90
- after its fix landed, which is a new defect, and it files as one.
91
- 3. **Sweep the inbound triage surfaces** — run `bin/close-surfaces.sh` and
78
+ Lessons.
79
+ **Re-verify before dispositioning.** A bullet's prose is the filer's claim, not
80
+ an established fact: capture is deliberately frictionless, so nothing upstream
81
+ checked it and a bullet can assert a mechanism its filer inferred rather than
82
+ ran. Per bullet, name the claim the disposition turns on and the command that
83
+ establishes it, run that command, and disposition against what it returned.
84
+ Record the outcome in the close commit message beside the bullet's disposition
85
+ — which bullets were re-verified and what fell — so a corrected premise is
86
+ visible rather than silently absorbed. A claim no cheap command settles is
87
+ dispositioned *as a claim*: say so, and let the promoted entry carry the
88
+ unverified premise openly (§The committed gap inbox rules why this sits at the
89
+ drain and not at filing time).
90
+ The next iteration's first-stage entry refuses a non-empty inbox **when this
91
+ stage was skipped** (§bin/enter-stage.sh), so an undrained gap blocks the
92
+ boundary rather than crossing it silently.
93
+ **A finding your own later steps generate postdates this drain, and it routes
94
+ to the inbox like any other.** The audits, the lesson disposition, the
95
+ staleness read and the release disposition all run after this step, so what
96
+ they turn up has no drainer left in this iteration. File it (`bin/file-gap.sh`)
97
+ and let it be carried: the next first-stage entry admits it and takes it as
98
+ that session's intake (§The committed gap inbox). Do **not** back-date it into
99
+ a drain that has already run — a second pass over an inbox your own later
100
+ steps keep refilling is the loop that shape was rejected for.
101
+ **Judge the recurrence, in addition to the disposition — you are the judge,
102
+ and nothing upstream ruled.** That framing is the **general** contract rather
103
+ than this stage's local one — every session that judges a recurrence is obliged
104
+ to stamp it, and this drain is only its mechanized instance (§The committed gap
105
+ inbox owns the rule and what a stamp outside a drain owes instead). Your
106
+ obligation here is undiminished by that reach.
107
+ A slug appearing in a bullet is an *input*, never
108
+ a verdict; the question is whether the finding **re-occurred** or is merely
109
+ being cited, corrected, or argued against, and the bullet's prose is your
110
+ grounds (the filer was asked at capture to write the claim there). State the
111
+ call in the close commit message beside the bullet's disposition — a
112
+ **declined** match stated as explicitly as a stamped one, since an unstated
113
+ decline is indistinguishable from an unread bullet. On a judged recurrence,
114
+ append the bullet's date to that entry's `recurrence:` declaration (creating
115
+ the line when absent), **in this same queue-writing commit** — never *instead
116
+ of* the bullet's own disposition. That same-commit rule is load-bearing rather
117
+ than housekeeping: the declaration is no longer re-derivable, so this commit
118
+ *is* the audit artifact, carrying the judgment beside the prose it was made
119
+ from. It is idempotent per (slug, date): a slug already carrying today's date
120
+ gains nothing. A slug that resolves only in the done section is not a
121
+ recurrence — the finding recurred after its fix landed, which is a new defect,
122
+ and it files as one.
123
+ 3. **Sweep the inbound triage surfaces** — run
124
+ `bash gate-sdk/bin/run-gates.sh --emit close-surfaces` and
92
125
  disposition every row (§The close-surface roster). The roster is derived, not
93
126
  enumerated here or in the binding below: a `forced=` row has a structural
94
127
  forcing function and cannot be skipped silently; an `advisory` row may be
@@ -12,7 +12,7 @@ amendment-readiness gate green>*.
12
12
  *resets* the evidence file: it truncates `.workflow/WORKFLOW-STATE.txt` back
13
13
  to its header (dropping the prior iteration's stamps — git history is the
14
14
  permanent audit trail; the gates only ever read the current iteration), stamps
15
- `— scope <session-id> <date>` under the unnamed-iteration sentinel, and sets
15
+ `— scope <session-id> <date> <head>` under the unnamed-iteration sentinel, and sets
16
16
  the queue header to `## Iteration: —`. It reads `<session-id>`
17
17
  from `bin/session-id.sh` itself (the newest transcript — never hand-picked),
18
18
  uses `date +%F`, and refuses (writing nothing) if `check-stage-entry` is red.
@@ -28,6 +28,25 @@ later stages append. Honest limit: the stamp proves the skill was *invoked*,
28
28
  not that the work was done faithfully — it forces deliberate invocation and an
29
29
  audit trail, nothing more.
30
30
 
31
+ **Second step — take the carried gap bullets, if the entry reported any.** The
32
+ entry admits a boundary whose gap inbox holds bullets the closing stage could
33
+ not have drained, and prints them as an advisory naming them this session's
34
+ intake (lifecycle-kit/SPEC.md §The committed gap inbox owns why it admits rather
35
+ than refuses). Each carried bullet gets **exactly one** disposition — promoted to
36
+ a queue entry, fixed inline this session, or discarded with cause in the commit
37
+ message — after which this session truncates the inbox to its `# contract:`
38
+ header **in the same commit**. That is the drain's own disposition set, run by
39
+ the stage that can now legally run it; no linked-and-skipped middle state, per
40
+ the gap-disposition rule, and deleting a bullet without a disposition is not a
41
+ drain.
42
+ Two properties are obliged rather than suggested. The disposition happens
43
+ **after the stamp**, in-stage — that is the whole point of admitting the entry,
44
+ since a pre-stamp queue write is attributed to a stage that has not started. And
45
+ a promoted entry's provenance sentence carries the **bullet's own date** and
46
+ names the iteration whose close generated it, because the finding's disposition
47
+ lands in this iteration's ledger while the finding belongs to the last one; a
48
+ record that is late and says so is what that trade buys.
49
+
31
50
  ## Session ritual
32
51
 
33
52
  *<ritual: your scope ritual: index the governing docs before reading them
@@ -61,7 +80,10 @@ theme**, and rides that same escalation. The directive still bounds the survey;
61
80
  what it may no longer do is silently outrank a counted recurrence. The count is
62
81
  the number of dates on the entry's `recurrence:` declaration
63
82
  (queue-kit/SPEC.md §The tag algebra) — one anchored grep over the deferred
64
- section, no tool and no queue-kit dependency. It is scoped to deferred entries
83
+ section, no tool and no queue-kit dependency. Each of those dates is a **judged**
84
+ recurrence, stamped by a session that read the grounds rather than derived from a
85
+ string match, so a count reaching the threshold is a signal to act on rather than
86
+ a number to sanity-check first. It is scoped to deferred entries
65
87
  because promotion is the decision it forces; an entry already active is being
66
88
  built. **The collision is decided, not resolved in the theme's favour**: the rule
67
89
  does not promote, it puts the unit in front of the authority this stage already
@@ -119,9 +141,11 @@ splitting an entry is safe only against that total: a split scatters an entry's
119
141
  weight across siblings, and the sum is what puts it back together.
120
142
 
121
143
  When done, **set the iteration name without waiting for confirmation** and
122
- inform the user: replace the `—` placeholder in the queue header AND update
123
- the WORKFLOW-STATE scope stamp to match (`check-stage-evidence` requires
124
- every stamp's iteration to match the header's, so they ride in one commit).
144
+ inform the user: run `bash lifecycle-kit/bin/enter-stage.sh --rename <name>`,
145
+ which writes both surfaces — the queue header and column 1 of every stamp — in
146
+ one motion and names them for the one commit they ride in. Never edit either by
147
+ hand: `check-stage-evidence` requires every stamp's iteration to match the
148
+ header's, and the state file has one sanctioned writer.
125
149
  The header carries the *name axis alone* — there is no stage field to set, and
126
150
  no stage field to advance. The *arriving* stage's skill moves the cursor by
127
151
  stamping, as that skill's first step. Invoking the next skill is the
@@ -20,7 +20,7 @@ a skipped `spec` cannot ship a feature without its amendment (the same
20
20
  procedural-plus-one-gated-backstop shape as the audit stage's own trigger).
21
21
 
22
22
  **First step — stamp evidence.** Run lifecycle-kit's `bin/enter-stage.sh spec`:
23
- it appends `<iteration> spec <session-id> <date>` to
23
+ it appends `<iteration> spec <session-id> <date> <head>` to
24
24
  `.workflow/WORKFLOW-STATE.txt` (required by `check-stage-evidence`; the stamp
25
25
  proves invocation, not faithful execution), reading `<session-id>` from
26
26
  `bin/session-id.sh` (the newest transcript — never hand-picked), using
@@ -67,7 +67,11 @@ what you buy. The contract is lifecycle-kit/SPEC.md §The survey record.
67
67
 
68
68
  **Label every delta with its work class.** In the amendment's §What changes,
69
69
  every delta carries a **work-class** tag — either **mechanical** or
70
- **design-bearing**. A delta is **mechanical** when executing it demands only
70
+ **design-bearing** — written **inline, at the end of the delta's own lead
71
+ sentence**, never collected into a separate roster at the section's head or
72
+ foot. A roster is a second copy of the labelling that drifts from the deltas it
73
+ labels the moment one is split or reordered, and its reader (the lead, at
74
+ batch-cut) is scanning the deltas themselves. A delta is **mechanical** when executing it demands only
71
75
  oracle-running — running a fixed verification battery, a rename/merge sweep, a
72
76
  mechanical pin — with low generative judgment. It is **design-bearing** when
73
77
  executing it demands generative or verificational judgment — authoring a
@@ -5,7 +5,7 @@ unsatisfiable while any suite is tracked-red on a deferred blocker; each
5
5
  held-constant red line carries the live task slug that blocks it>*.
6
6
 
7
7
  **First step — stamp evidence.** Run lifecycle-kit's `bin/enter-stage.sh
8
- validate`: it appends `<iteration> validate <session-id> <date>` to
8
+ validate`: it appends `<iteration> validate <session-id> <date> <head>` to
9
9
  `.workflow/WORKFLOW-STATE.txt` (required by `check-stage-evidence`; the stamp
10
10
  proves invocation, not faithful execution), reading `<session-id>` from
11
11
  `bin/session-id.sh`
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env bash
2
+ # spec: lifecycle-kit/SPEC.md §check-stage-evidence — consumer-copy PreToolUse(Write|Edit) hook: the stage stamp is bin/enter-stage.sh's to write, and every gate that would catch a hand-stamp fires only at commit
3
+ set -uo pipefail
4
+
5
+ # shellcheck disable=SC2034 # consumed by the sourced lib/guard.sh (guard_block)
6
+ GUARD_NAME="workflow-state-guard"
7
+ GUARD_KIT_LIB="${GUARD_KIT_LIB:-guard-kit/lib/guard.sh}"
8
+ [[ -f "$GUARD_KIT_LIB" ]] || exit 0
9
+ # shellcheck source=/dev/null # vendored lib path is resolved at runtime; fail-open above if absent, but the lib's own exit 2 (set-but-missing config) must stay loud
10
+ source "$GUARD_KIT_LIB"
11
+
12
+ STATE_FILE="${GATE_SDK_WORKFLOW_DIR:-.workflow}/WORKFLOW-STATE.txt"
13
+
14
+ input="$(cat 2>/dev/null || true)"
15
+
16
+ # spec: guard-kit/SPEC.md §The guard framework — fail-open-but-loud: the rule turns on a payload field and on path resolution, so a call it cannot judge is allowed with an advisory naming the unenforced rule; guard_advise is itself jq-backed, so this branch emits the envelope directly rather than reaching for a primitive its own trigger disabled
17
+ if ! command -v jq >/dev/null 2>&1 || ! command -v readlink >/dev/null 2>&1; then
18
+ printf '%s\n' '{"hookSpecificOutput":{"hookEventName":"PreToolUse","additionalContext":"workflow-state-guard: jq or readlink is unavailable, so the direct-edit rule for the lifecycle state file could not be enforced on this call. That file has one sanctioned writer, lifecycle-kit bin/enter-stage.sh."}}'
19
+ exit 0
20
+ fi
21
+
22
+ path="$(guard_read_path <<<"$input")" || exit 0
23
+
24
+ # spec: lifecycle-kit/SPEC.md §check-stage-evidence — resolved comparison, never textual: an absolute path, a ./ prefix and a path reaching the file through a symlinked directory all name one file, and a textual match catches only the spelling it was written against
25
+ _resolve() { readlink -f -- "$1" 2>/dev/null || printf '%s' "${1#./}"; }
26
+
27
+ [[ "$(_resolve "$path")" == "$(_resolve "$STATE_FILE")" ]] || exit 0
28
+
29
+ guard_block "$STATE_FILE is written by lifecycle-kit's bin/enter-stage.sh, never by hand — run 'bash lifecycle-kit/bin/enter-stage.sh <stage>' to stamp, or 'bash lifecycle-kit/bin/enter-stage.sh --rename <name>' to rename the iteration (it rewrites the queue header and column 1 of every stamp in one motion, proving columns 2 through NF unchanged). The stamp *is* the stage transition, so a hand-written line moves the cursor for every reader for the rest of the session, and every gate that would catch it fires only at commit: an uncommitted hand-stamp is never seen at all. If enter-stage refuses, that refusal is a gate verdict to resolve at its source, not to write around."