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
@@ -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
@@ -48,7 +69,7 @@ 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
@@ -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
 
@@ -222,6 +222,42 @@ channel it is meant to keep reading for the rest of the unit. It is swept with
222
222
  the rest of the scratch dir at the iteration boundary
223
223
  (delegation-kit/SPEC.md §Resume journal — agent writes, scratch reset sweeps).
224
224
 
225
+ ## A running session is asked, never instructed
226
+
227
+ A dispatched stage session is not a tool call the lead may re-issue. Three rules
228
+ bind the lead here and each was paid for; the root cause under all three is one
229
+ habit, stated last.
230
+
231
+ **An instruction to run something is destructive when the answer is "already
232
+ did".** §The lead model already forbids the lead *itself* re-running the evidence
233
+ producer; this is the same harm through the other actor. When the lead does not
234
+ know what a session has run, the message is a **question** — *what have you run,
235
+ and what did it report?* — never a command. Attested: a stage whose oracle had
236
+ completed and written its evidence rows was told to run it again; the runner
237
+ truncates its artifact on start, the rows were uncommitted, and they were lost
238
+ and had to be regenerated. A question costs one turn and destroys nothing.
239
+
240
+ **A status-only turn is not evidence that a session is stuck.** Content-free
241
+ turns are what a long foreground call looks like from outside, so reading two of
242
+ them as a stall is reading the channel rather than the work. Read the artifact
243
+ the work writes — the evidence file, the log, the lock — which answers in one
244
+ call what any number of further turns will not.
245
+
246
+ **A dispatch prompt carries no duration estimate or long-run caution unless it
247
+ is measured.** An invented cost framing does not merely mislead: it makes the
248
+ receiving session plan around a run that needs no planning, and it primes the
249
+ lead to misread that session's ordinary turns as a stall. An oracle run that
250
+ fits one foreground call is dispatched as exactly that — a plain foreground
251
+ invocation, no backgrounding, no monitor, no pipe or redirect — and the dispatch
252
+ says nothing about how long it takes.
253
+
254
+ **The root cause: a duration or a count reported by a subagent is checkable, so
255
+ it is checked before anything is spent on it.** It is checkable against the tree,
256
+ or against the reporting session's own metadata — a claimed sub-step longer than
257
+ the whole session that reported it is disproved by arithmetic the lead already
258
+ holds. Relaying an unverified figure into a dispatch is what converts one
259
+ session's guess into standing instruction for every session after it.
260
+
225
261
  ## Policy is config, not prose
226
262
 
227
263
  All *standing* dispatch policy — everything true of every dispatch, not the
@@ -75,19 +75,38 @@ 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
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 scope entry refuses a non-empty inbox
79
91
  (§bin/enter-stage.sh), so an undrained gap blocks the boundary rather than
80
92
  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.
93
+ **Judge the recurrence, in addition to the disposition — you are the judge,
94
+ and nothing upstream ruled.** A slug appearing in a bullet is an *input*, never
95
+ a verdict; the question is whether the finding **re-occurred** or is merely
96
+ being cited, corrected, or argued against, and the bullet's prose is your
97
+ grounds (the filer was asked at capture to write the claim there). State the
98
+ call in the close commit message beside the bullet's disposition — a
99
+ **declined** match stated as explicitly as a stamped one, since an unstated
100
+ decline is indistinguishable from an unread bullet. On a judged recurrence,
101
+ append the bullet's date to that entry's `recurrence:` declaration (creating
102
+ the line when absent), **in this same queue-writing commit** — never *instead
103
+ of* the bullet's own disposition. That same-commit rule is load-bearing rather
104
+ than housekeeping: the declaration is no longer re-derivable, so this commit
105
+ *is* the audit artifact, carrying the judgment beside the prose it was made
106
+ from. It is idempotent per (slug, date): a slug already carrying today's date
107
+ gains nothing. A slug that resolves only in the done section is not a
108
+ recurrence — the finding recurred after its fix landed, which is a new defect,
109
+ and it files as one.
91
110
  3. **Sweep the inbound triage surfaces** — run `bin/close-surfaces.sh` and
92
111
  disposition every row (§The close-surface roster). The roster is derived, not
93
112
  enumerated here or in the binding below: a `forced=` row has a structural
@@ -61,7 +61,10 @@ theme**, and rides that same escalation. The directive still bounds the survey;
61
61
  what it may no longer do is silently outrank a counted recurrence. The count is
62
62
  the number of dates on the entry's `recurrence:` declaration
63
63
  (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
64
+ section, no tool and no queue-kit dependency. Each of those dates is a **judged**
65
+ recurrence, stamped by a session that read the grounds rather than derived from a
66
+ string match, so a count reaching the threshold is a signal to act on rather than
67
+ a number to sanity-check first. It is scoped to deferred entries
65
68
  because promotion is the decision it forces; an entry already active is being
66
69
  built. **The collision is decided, not resolved in the theme's favour**: the rule
67
70
  does not promote, it puts the unit in front of the authority this stage already
@@ -119,9 +122,11 @@ splitting an entry is safe only against that total: a split scatters an entry's
119
122
  weight across siblings, and the sum is what puts it back together.
120
123
 
121
124
  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).
125
+ inform the user: run `bash lifecycle-kit/bin/enter-stage.sh --rename <name>`,
126
+ which writes both surfaces — the queue header and column 1 of every stamp — in
127
+ one motion and names them for the one commit they ride in. Never edit either by
128
+ hand: `check-stage-evidence` requires every stamp's iteration to match the
129
+ header's, and the state file has one sanctioned writer.
125
130
  The header carries the *name axis alone* — there is no stage field to set, and
126
131
  no stage field to advance. The *arriving* stage's skill moves the cursor by
127
132
  stamping, as that skill's first step. Invoking the next skill is the
@@ -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
@@ -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-4 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."
@@ -6,7 +6,8 @@ square-bracket tags (`[blocked-by:]`, `[design-pending]`, `[spec:]`,
6
6
  `[drain-exempt:]`, `[roadmap:]`, `[precondition-ok:]`, plus the Lessons Learned
7
7
  channel's `[attend]` and the consumer-named harvest tags) are the state machine.
8
8
  Gates hold the grammar a coding agent selects work by, a
9
- `queue-index.sh` tool renders the compact selection surface, a `queue-edges.sh`
9
+ `queue-index.sh` tool renders the compact selection surface, a `queue-counts.sh`
10
+ tool tallies each task section for a status readout, a `queue-edges.sh`
10
11
  tool sums the citations pointing *at* an entry, and a `roadmap.sh`
11
12
  tool projects the entries curated with `[roadmap:]` onto a generated public page.
12
13
 
@@ -63,6 +64,7 @@ bash queue-kit/bin/queue-index.sh # header + active (• r
63
64
  bash queue-kit/bin/queue-index.sh --collapse-deferred # deferred as a per-### tally
64
65
  bash queue-kit/bin/queue-index.sh --extent <slug> # inclusive line range of one entry's subtree
65
66
  bash queue-kit/bin/queue-index.sh --icebox-candidates # the closing stage's eviction worklist
67
+ bash queue-kit/bin/queue-counts.sh # "<section><TAB><count>" per task section, in configured order
66
68
  bash queue-kit/bin/queue-edges.sh # every live slug with inbound citations, and the entries citing it
67
69
  bash queue-kit/bin/queue-edges.sh --inbound <slug> # one slug's inbound set, each edge with its citing line verbatim
68
70
  bash queue-kit/bin/lesson-sink.sh <tag> # route a harvested lesson body to its configured sink
@@ -64,6 +64,19 @@ the one that prompted the change is likely to get it.
64
64
  - Any other section (an iteration header, a lessons section) is outside the
65
65
  grammar and ignored by every gate except the file-wide hygiene axes.
66
66
 
67
+ **Where this format has two holders, what is compared between them is
68
+ classification over a corpus, never the derived literals.** The shell library
69
+ exposes ERE strings and an array; its compiled counterpart exposes a section
70
+ value and free predicates over it, so there is no value either could hand the
71
+ other — comparing them would compare nothing, or force one side to grow an
72
+ accessor whose only reader is the test. The comparable question is the one this
73
+ section defines: given the same queue file, do both agree on which lines are
74
+ section boundaries, which are task bullets, which is the lessons line, which
75
+ slugs are live? Two witnesses held to each other over a golden *corpus*, with no
76
+ committed expected file — a maintained golden is a third copy to drift, and the
77
+ failure the comparison exists to catch is one side edited without the other,
78
+ which it catches directly (§lib/queue.sh names the holder).
79
+
67
80
  An entry is a column-0 `- **slug** — prose…` bullet; continuation lines are
68
81
  indented, never column 0. An *indented* bullet with a bold lead-in is a
69
82
  sub-task (same grammar); with a plain or italic lead-in it is a prose note
@@ -352,9 +365,12 @@ times without anyone promoting it is a governance failure, surfaced loudly rathe
352
365
  than absorbed.
353
366
 
354
367
  Unlike the `relates:` declaration refused above, no corpus needs migrating. The
355
- line is **machine-written** by the closing stage's gap-inbox drain
356
- (lifecycle-kit/SPEC.md §The committed gap inbox) and hand-read; an entry with no
357
- declaration is simply an entry that has not recurred.
368
+ line is **session-written under judgment** — the closing stage's gap-inbox drain
369
+ is its only mechanized producer, and each date records that session's ruling that
370
+ the finding re-occurred, read off the filed prose rather than derived from it
371
+ (lifecycle-kit/SPEC.md §The committed gap inbox owns the rule and the standard) —
372
+ and hand-read; an entry with no declaration is simply an entry that has not
373
+ recurred.
358
374
 
359
375
  Two tags ride **Lessons Learned** entries — a lesson is a top-level bullet
360
376
  under the fixed-spelling `## Lessons Learned` heading, and `bin/queue-index.sh`
@@ -494,6 +510,21 @@ The icebox is *derived* here rather than configured twice: a non-empty
494
510
  required-sections set, and when it is empty every icebox regex is the empty
495
511
  string so each reader degrades to "no icebox" rather than to "every section".
496
512
 
513
+ **That degradation is the reader's to complete, not the library's.** The empty
514
+ regex only *carries* the "no icebox" answer; an awk consumer must test it
515
+ explicitly (`iceboxre != "" && $0 ~ iceboxre`), because awk's `$0 ~ ""` matches
516
+ every line and an unguarded match therefore degrades to exactly the "every
517
+ section" reading the empty string was chosen to avoid. Any reader of an
518
+ optional section regex owes that guard.
519
+
520
+ `QUEUE_TASK_SECTIONS` is that composition itself — the active sections, the
521
+ deferred section, and a configured icebox, in configured order — exposed rather
522
+ than consumed and discarded. `QUEUE_TASK_RE` is built from it, and a reader that
523
+ needs the sections *individually* rather than as one alternation
524
+ (§bin/queue-counts.sh) reads the array. One composition, two shapes of the same
525
+ answer: a second reader recomposing the set from the three knobs is the drift
526
+ axis a shared adapter exists to remove.
527
+
497
528
  `queue_roadmap_entries <queue-file>` is the single `[roadmap:]` and
498
529
  `roadmap-summary:` parse, shared by `bin/roadmap.sh` and `check-roadmap-fresh` so
499
530
  the emitter and the gate can never disagree about what an entry claims — the same
@@ -514,6 +545,37 @@ lives in `bin/queue-edges.sh`, which sources this library for the section
514
545
  regexes and `queue_live_slugs` it does share. A second reader of body-position
515
546
  slug tokens is what would promote the scan into this roster.
516
547
 
548
+ **The one-adapter guarantee is split for `queue_live_slugs` and the section
549
+ regexes, and the split is machine-held rather than filed as debt.** The gates
550
+ that read the queue ported to the binary substrate (gate-sdk/SPEC.md §Porting a
551
+ gate to the binary substrate), so `check-queue-slug-liveness` and
552
+ `check-task-conservation` call a Rust reimplementation of that helper while
553
+ `bin/queue-edges.sh` keeps calling this one; the same is true of the section
554
+ regexes, every one of which a `bin/` script still reads directly. The split is
555
+ **permanent** — every `bin/` script in the kit still sources this library, and so
556
+ do `check-roadmap-fresh` and `check-queue-prose-precondition`
557
+ (`grep -rl lib/queue.sh queue-kit/bin queue-kit/checks` is the roster) — so the
558
+ shell form cannot be deleted the way a ported primitive's is, and a port-time
559
+ byte-identity proof would expire at the next edit to either side. What holds the
560
+ two equal from here is `gate-tests/queue-lib-parity.test.sh`: it feeds one canned
561
+ corpus to both and compares their **classification** of it byte for byte
562
+ (§The queue format owns why classification is the comparable thing), which is
563
+ criterion 6's *machine-held* disposition rather than its duplication-absent one
564
+ (gate-sdk/SPEC.md §The port-candidate criteria, criterion 6).
565
+
566
+ The obligation covers **one helper — `queue_live_slugs` — and every derived
567
+ global this library exports** (`grep -n '^QUEUE_[A-Z_]*=' queue-kit/lib/queue.sh`),
568
+ and nothing else is owed one. The crate's `done_slugs` has no counterpart here and needs none: a shell
569
+ twin with no caller is a duplication removal disposes of, which enforcement-first
570
+ ranks above gating it, and the bound on that disposition is undocumented surface
571
+ — no section named it, which is what separates it from the section regexes, every
572
+ one of which is documented and load-bearing.
573
+ `queue_roadmap_entries` is **not** in the split
574
+ either, for the opposite reason: its only two consumers are `bin/roadmap.sh` and
575
+ `check-roadmap-fresh`, and the gate was held on shell by the cohort's own ruling
576
+ (gate-sdk/SPEC.md §The first cohort, and the rule that selects the next), so the
577
+ emitter and the gate still cannot disagree.
578
+
517
579
  The loader sources the consumer config, then a `<config>.local.sh` overlay
518
580
  beside it when present — last write wins. This is the tracked-name /
519
581
  gitignored-value split (the `msg-patterns.local.list` precedent): a private
@@ -584,6 +646,43 @@ different question over the same file (§bin/queue-edges.sh). They stay two
584
646
  tools rather than one tool with a fourth mode, because folding them would give
585
647
  one tool two jobs and two output grammars.
586
648
 
649
+ ### bin/queue-counts.sh
650
+
651
+ One job: the size of each **task section**, for a caller that wants the shape of
652
+ the queue rather than its contents. It emits one `<section-name><TAB><count>`
653
+ line per task section, in configured order, and nothing else — no flags, no
654
+ modes, one output grammar.
655
+
656
+ The section set is **derived, never listed**: it is `QUEUE_TASK_SECTIONS`, the
657
+ same composition `QUEUE_TASK_RE` is built from (§lib/queue.sh). So
658
+ `QUEUE_KIT_DONE_SECTION` is out because Done is not a task section, a configured
659
+ `QUEUE_KIT_ICEBOX_SECTION` is in because the icebox is a live one, and a consumer
660
+ who renamed their sections gets their own names back. Nothing here enumerates a
661
+ section name, which is what keeps the vocabulary inside this kit when a caller
662
+ outside it renders the numbers.
663
+
664
+ The counted unit is the **top-level entry bullet** — the same unit
665
+ §bin/queue-index.sh lists, so the index and the counters cannot report different
666
+ sizes for one queue. Not lines, and not bullets: an indented bullet inside an
667
+ entry body is body.
668
+
669
+ **Why a second tool rather than a fourth mode on `bin/queue-index.sh`.** That
670
+ tool's modes are fixed at `index`, `extent` and `icebox-candidates`
671
+ (§bin/queue-index.sh), on the stated grounds that folding jobs together gives one
672
+ tool two output grammars — the same refusal that keeps `bin/queue-edges.sh`
673
+ separate. A tally keyed by section name is a different job with a different
674
+ grammar, so it lands beside the index rather than inside it. Recorded here
675
+ because the next reader meeting two queue tools would otherwise read the split as
676
+ an oversight and merge them.
677
+
678
+ **It is invoked as a subprocess, never sourced.** `lib/queue.sh` exits 2 at
679
+ source time on a missing `QUEUE_KIT_CONFIG_FILE` and on any malformed-config
680
+ assertion — correct for a gate, and fatal for a long-lived caller that sourced
681
+ it. A subprocess turns that contract into a non-zero exit and empty stdout, which
682
+ a caller degrades on. The caller this was built for is delegation-kit's
683
+ statusline template, whose own contract records the degradation
684
+ (delegation-kit/SPEC.md §The statusline template).
685
+
587
686
  ### bin/queue-edges.sh
588
687
 
589
688
  The inbound-citation aggregator: a tool, not a gate (no `# graph:` manifest),
@@ -954,6 +1053,19 @@ exit (nothing to compare is not a violation). Clearing the done section is
954
1053
  safe: only HEAD's *live* slugs are conserved. A rename intentionally fires —
955
1054
  move the old slug to done, sweep refs.
956
1055
 
1056
+ **The gate is a binary subcommand, and the `no-fixture:` reason survived the
1057
+ port intact — what it does not excuse is parity.** The reason is structural
1058
+ rather than a stopgap, so it stays true on either substrate; but a member with
1059
+ no pair still owes the proof that both implementations agree, and it is paid by
1060
+ the constructed scenario gate-sdk/SPEC.md §The port-candidate criteria specifies
1061
+ for exactly this shape: throwaway repositories, the worktree mutated without
1062
+ committing, both implementations run over the same case and compared byte for
1063
+ byte. `git` is the one external program the gate invokes — the sanctioned floor
1064
+ exception — and the branch that reports a clean exit when there is no repository
1065
+ at all is part of what the scenario covers. The same absence of a fixture case
1066
+ is why gate-sdk/SPEC.md §check-gate-output reads this member's output contract
1067
+ off its implementation module rather than off its descriptor.
1068
+
957
1069
  ### check-queue-prose-precondition
958
1070
 
959
1071
  Invariant: no active-section entry states a forward precondition in prose
@@ -1009,6 +1121,14 @@ starter-template conformance contract owned by gate-sdk/SPEC.md §Consumer smoke
1009
1121
  — and carries lifecycle-kit's iteration header as inert scaffold so a
1010
1122
  combined-tree copy clears the stage gates too.
1011
1123
 
1124
+ Shipping this file is also what makes this kit the queue format's owner as far
1125
+ as an adopter's install is concerned: `checkwright init` seeds their queue from
1126
+ the template of the first kit in their profile that ships one, and falls back to
1127
+ an inline skeleton only when none does (installer/README.md §What init seeds).
1128
+ The declaration is the artifact rather than a roster naming this kit. Until that
1129
+ selection was resolved over the whole profile at once, no profile reached this
1130
+ kit first and no adopter ever received the file.
1131
+
1012
1132
  ## Out of scope
1013
1133
 
1014
1134
  <!-- prose-enum-exempt: names the two amendment-lifecycle tags specifically; [blocked-by:] is a dependency tag outside that lifecycle, not a dropped task-tag member -->
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env bash
2
+ # spec: queue-kit/SPEC.md §bin/queue-counts.sh — per-task-section entry counts (a tool, not a gate; no # graph: manifest)
3
+ #
4
+ # usage: queue-counts.sh [queue-file]
5
+ # emits one "<section-name><TAB><count>" line per task section, in configured
6
+ # order; no flags, no modes, one output grammar
7
+ set -uo pipefail
8
+
9
+ KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
10
+ # shellcheck source=../lib/queue.sh
11
+ source "$KIT/lib/queue.sh"
12
+
13
+ file=""
14
+ while (($#)); do
15
+ case "$1" in
16
+ -h|--help) grep -m5 '^# ' "${BASH_SOURCE[0]}" | sed 's/^# \{0,1\}//'; exit 0 ;;
17
+ -*) echo "queue-counts: unknown option: $1" >&2; exit 2 ;;
18
+ *) file="$1"; shift ;;
19
+ esac
20
+ done
21
+ FILE="${file:-$QUEUE_KIT_QUEUE_FILE}"
22
+ [[ -f "$FILE" ]] || { echo "queue-counts: file not found: $FILE" >&2; exit 2; }
23
+
24
+ # spec: queue-kit/SPEC.md §bin/queue-counts.sh — the counted unit is the top-level entry bullet, the same one bin/queue-index.sh lists, so two readers cannot disagree about the size of one queue
25
+ awk -v sects="$(printf '%s\n' "${QUEUE_TASK_SECTIONS[@]}")" -v sectre="$QUEUE_SECTION_RE" '
26
+ BEGIN { n = split(sects, S, "\n") }
27
+ $0 ~ sectre {
28
+ h = $0; sub(/^##[[:space:]]+/, "", h); sub(/[[:space:]]+$/, "", h)
29
+ cur = ""
30
+ for (i = 1; i <= n; i++) if (S[i] == h) cur = h
31
+ next
32
+ }
33
+ cur != "" && /^-[[:space:]]/ && $0 ~ /\*\*[a-z0-9][a-z0-9-]*\*\*/ { c[cur]++ }
34
+ END { for (i = 1; i <= n; i++) printf "%s\t%d\n", S[i], c[S[i]] + 0 }
35
+ ' "$FILE"
@@ -0,0 +1,3 @@
1
+ # graph: couples=TASK-QUEUE.md dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: queue-kit/SPEC.md §check-queue-entry-budget — a deferred entry is a costed filing: bounded above so it is not an inlined amendment, bounded below so it is not a flag-and-skip; an icebox entry is its lead line and nothing else
@@ -0,0 +1,3 @@
1
+ # graph: couples=TASK-QUEUE.md dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+ # spec: queue-kit/SPEC.md §check-queue-hygiene — the queue holds only tasks, tags, and structure: no HTML comments, no duplicate lines, no column-0 prose
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # graph: couples=TASK-QUEUE.md dir=one valve=none tier=precommit
3
+ # install: zero-config
3
4
  # spec: queue-kit/SPEC.md §check-queue-prose-precondition — no active entry states a forward precondition in prose without a blocked-by tag (selection trusts tags, not prose)
4
5
  #
5
6
  # usage: check-queue-prose-precondition.sh [queue-file]
@@ -0,0 +1,3 @@
1
+ # graph: couples=TASK-QUEUE.md dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: queue-kit/SPEC.md §check-queue-sections — the queue carries each required ## section heading exactly once, the fail-closed floor under every section-scoped scanner
@@ -0,0 +1,3 @@
1
+ # graph: couples=TASK-QUEUE.md,scripts/*.sh dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: queue-kit/SPEC.md §check-queue-slug-liveness — every slug-shaped bold-code token in a configured prose surface resolves against the queue's live slug set
@@ -0,0 +1,3 @@
1
+ # graph: couples=TASK-QUEUE.md dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+ # spec: queue-kit/SPEC.md §check-queue-wrap — no queue line exceeds the wrap budget (Unicode code points), so a runaway never reflows to column 0
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # graph: couples=TASK-QUEUE.md,ROADMAP.md,scripts/queue-config.sh dir=one valve=none tier=precommit trigger=TASK-QUEUE.md,ROADMAP.md,scripts/queue-config.sh
3
+ # install: on-surface
3
4
  # spec: queue-kit/SPEC.md §check-roadmap-fresh — every [roadmap:] tag names a configured horizon and track and pairs with exactly one roadmap-summary: declaration, and the projection page's marker block is the byte-fresh emission of bin/roadmap.sh
4
5
  #
5
6
  # usage: check-roadmap-fresh.sh [projection-file] [emit-file]
@@ -0,0 +1,3 @@
1
+ # graph: couples=TASK-QUEUE.md dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+ # spec: queue-kit/SPEC.md §check-tag-lead-line — every governed tag (blocked-by/spec/design-pending/drain-exempt/roadmap in the task sections, attend + configured lesson tags in Lessons) sits on its bullet's lead line, the only line the tag readers scan
@@ -0,0 +1,4 @@
1
+ # graph: couples=TASK-QUEUE.md dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+ # no-fixture: HEAD-vs-worktree diff — a committed fixture has HEAD == worktree, so the loss case (an uncommitted deletion) has no static-fixture representation; parity is proved by the constructed scenario instead (queue-kit/SPEC.md §check-task-conservation).
4
+ # spec: queue-kit/SPEC.md §check-task-conservation — every live slug present at HEAD is still present (live or done) in the working tree
@@ -0,0 +1,3 @@
1
+ # graph: couples=TASK-QUEUE.md dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+ # spec: queue-kit/SPEC.md §check-task-names — task entries lead with a unique kebab slug, done entries are bare slugs, every blocked-by resolves to a live task