checkwright 0.31.0 → 0.32.1

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 (496) hide show
  1. package/README.md +8 -7
  2. package/bin/checkwright.ps1 +3 -3
  3. package/bin/checkwright.sh +5 -1
  4. package/package.json +10 -3
  5. package/payload/artifact/aarch64-apple-darwin/checkwright-gates +0 -0
  6. package/payload/artifact/aarch64-apple-darwin/checkwright-gates.sha256 +1 -1
  7. package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe +0 -0
  8. package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -1
  9. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates +0 -0
  10. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  11. package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates +0 -0
  12. package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates.sha256 +1 -1
  13. package/payload/artifact/targets.list +5 -5
  14. package/payload/artifact/x86_64-apple-darwin/checkwright-gates +0 -0
  15. package/payload/artifact/x86_64-apple-darwin/checkwright-gates.sha256 +1 -1
  16. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe +0 -0
  17. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -1
  18. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  19. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  20. package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates +0 -0
  21. package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates.sha256 +1 -1
  22. package/payload/canon-kit/README.md +8 -4
  23. package/payload/canon-kit/checks/check-amendment-queue.gate +1 -1
  24. package/payload/canon-kit/checks/check-comment-tier.gate +2 -2
  25. package/payload/canon-kit/checks/check-delta-agreement.gate +4 -0
  26. package/payload/canon-kit/checks/check-deprecation-task.gate +1 -1
  27. package/payload/canon-kit/checks/check-docs-page-length.gate +4 -0
  28. package/payload/canon-kit/checks/check-docs-page-repeat.gate +2 -2
  29. package/payload/canon-kit/checks/check-fence-command-head.gate +1 -1
  30. package/payload/canon-kit/checks/check-fence-paste-unit.gate +4 -0
  31. package/payload/canon-kit/checks/check-knob-default-coupling.gate +1 -1
  32. package/payload/canon-kit/checks/check-manifest-count.gate +3 -3
  33. package/payload/canon-kit/checks/check-manifest-temporal.gate +1 -1
  34. package/payload/canon-kit/checks/check-pendency-contradiction.gate +3 -0
  35. package/payload/canon-kit/checks/check-prose-tells.gate +1 -1
  36. package/payload/canon-kit/checks/check-spec-derivable-section.gate +1 -1
  37. package/payload/canon-kit/checks/check-spec-dod-singleton.gate +1 -1
  38. package/payload/canon-kit/checks/check-spec-embedded-source.gate +1 -1
  39. package/payload/canon-kit/checks/check-spec-pointer.gate +1 -1
  40. package/payload/canon-kit/checks/check-todo-task-liveness.gate +1 -1
  41. package/payload/canon-kit/gate-tests/check-amendment-queue/good/SPEC-widget.md +6 -0
  42. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/SPEC-widget.md +7 -0
  43. package/payload/canon-kit/gate-tests/check-amendment-update-target/good/SPEC-widget.md +7 -0
  44. package/payload/canon-kit/gate-tests/check-citation-link/bad/expect.txt +1 -0
  45. package/payload/canon-kit/gate-tests/check-citation-link/bad/site/unclosed.md +4 -0
  46. package/payload/canon-kit/gate-tests/check-citation-link/good/site/page.md +10 -0
  47. package/payload/canon-kit/gate-tests/check-comment-tier/bad/scripts/canon-config.knobs +4 -0
  48. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.gate +2 -0
  49. package/payload/canon-kit/gate-tests/check-comment-tier/good/scripts/canon-config.knobs +4 -0
  50. package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +9 -1
  51. package/payload/canon-kit/gate-tests/check-delta-agreement/bad/expect.txt +3 -0
  52. package/payload/canon-kit/gate-tests/check-delta-agreement/bad/scripts/canon-config.knobs +14 -0
  53. package/payload/canon-kit/gate-tests/check-delta-agreement/bad/work/base/notes/spec.md +9 -0
  54. package/payload/canon-kit/gate-tests/check-delta-agreement/bad/work/changes/one/deltas/notes/spec.md +7 -0
  55. package/payload/canon-kit/gate-tests/check-delta-agreement/bad/work/changes/two/deltas/cli/spec.md +3 -0
  56. package/payload/canon-kit/gate-tests/check-delta-agreement/good/expect.txt +1 -0
  57. package/payload/canon-kit/gate-tests/check-delta-agreement/good/scripts/canon-config.knobs +14 -0
  58. package/payload/canon-kit/gate-tests/check-delta-agreement/good/work/base/notes/spec.md +9 -0
  59. package/payload/canon-kit/gate-tests/check-delta-agreement/good/work/changes/one/deltas/notes/spec.md +19 -0
  60. package/payload/canon-kit/gate-tests/check-delta-agreement/good/work/changes/two/deltas/cli/spec.md +3 -0
  61. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.knobs +4 -0
  62. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.knobs +4 -0
  63. package/payload/canon-kit/gate-tests/check-docs-cmd.test.sh +20 -4
  64. package/payload/canon-kit/gate-tests/check-docs-page-length/bad/expect.txt +5 -0
  65. package/payload/canon-kit/gate-tests/check-docs-page-length/bad/scripts/canon-config.knobs +3 -0
  66. package/payload/canon-kit/gate-tests/check-docs-page-length/bad/site/item.md +5 -0
  67. package/payload/canon-kit/gate-tests/check-docs-page-length/bad/site/nested.md +7 -0
  68. package/payload/canon-kit/gate-tests/check-docs-page-length/bad/site/page.md +13 -0
  69. package/payload/canon-kit/gate-tests/check-docs-page-length/bad/site/short.md +3 -0
  70. package/payload/canon-kit/gate-tests/check-docs-page-length/bad/site/unclosed.md +4 -0
  71. package/payload/canon-kit/gate-tests/check-docs-page-length/good/expect.txt +1 -0
  72. package/payload/canon-kit/gate-tests/check-docs-page-length/good/scripts/canon-config.knobs +4 -0
  73. package/payload/canon-kit/gate-tests/check-docs-page-length/good/site/generated.md +3 -0
  74. package/payload/canon-kit/gate-tests/check-docs-page-length/good/site/page.md +15 -0
  75. package/payload/canon-kit/gate-tests/check-docs-page-repeat/bad/expect.txt +3 -0
  76. package/payload/canon-kit/gate-tests/check-docs-page-repeat/bad/scripts/canon-config.knobs +2 -1
  77. package/payload/canon-kit/gate-tests/check-docs-page-repeat/bad/site/_chrome/footer.html +4 -0
  78. package/payload/canon-kit/gate-tests/check-docs-page-repeat/bad/site/page.md +4 -0
  79. package/payload/canon-kit/gate-tests/check-docs-page-repeat/bad/site/unclosed.md +6 -0
  80. package/payload/canon-kit/gate-tests/check-docs-page-repeat/good/expect.txt +2 -1
  81. package/payload/canon-kit/gate-tests/check-docs-page-repeat/good/scripts/canon-config.knobs +2 -1
  82. package/payload/canon-kit/gate-tests/check-docs-page-repeat/good/site/_chrome/layout.html +8 -0
  83. package/payload/canon-kit/gate-tests/check-docs-page-repeat/good/site/page.md +13 -0
  84. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/expect.txt +1 -0
  85. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/kit/index.md +4 -0
  86. package/payload/canon-kit/gate-tests/check-fence-command-head/bad/doc.md +10 -0
  87. package/payload/canon-kit/gate-tests/check-fence-command-head/bad/expect.txt +2 -0
  88. package/payload/canon-kit/gate-tests/check-fence-command-head/good/doc.md +6 -0
  89. package/payload/canon-kit/gate-tests/check-fence-paste-unit/bad/expect.txt +3 -0
  90. package/payload/canon-kit/gate-tests/check-fence-paste-unit/bad/scripts/canon-config.knobs +2 -0
  91. package/payload/canon-kit/gate-tests/check-fence-paste-unit/bad/site/page.md +17 -0
  92. package/payload/canon-kit/gate-tests/check-fence-paste-unit/good/expect.txt +1 -0
  93. package/payload/canon-kit/gate-tests/check-fence-paste-unit/good/scripts/canon-config.knobs +2 -0
  94. package/payload/canon-kit/gate-tests/check-fence-paste-unit/good/site/page.md +39 -0
  95. package/payload/canon-kit/gate-tests/check-fence-run/good/doc.md +8 -0
  96. package/payload/canon-kit/gate-tests/check-install-claim/bad/README.md +4 -0
  97. package/payload/canon-kit/gate-tests/check-manifest-count/bad/SPEC.md +14 -0
  98. package/payload/canon-kit/gate-tests/check-manifest-count/bad/expect.txt +2 -0
  99. package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +27 -0
  100. package/payload/canon-kit/gate-tests/check-manifest-count/good/expect.txt +1 -1
  101. package/payload/canon-kit/gate-tests/check-manifest-count/good/posts/note.md +7 -0
  102. package/payload/canon-kit/gate-tests/check-manifest-count/good/scripts/canon-config.knobs +4 -0
  103. package/payload/canon-kit/gate-tests/check-manifest-temporal/good/SPEC.md +7 -0
  104. package/payload/canon-kit/gate-tests/check-md-refs.test.sh +17 -1
  105. package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/dotted.md +10 -0
  106. package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/expect.txt +1 -0
  107. package/payload/canon-kit/gate-tests/check-md-unwrapped/good/dotted.md +6 -0
  108. package/payload/canon-kit/gate-tests/check-md-unwrapped/good/expect.txt +1 -1
  109. package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +6 -0
  110. package/payload/canon-kit/gate-tests/check-pendency-contradiction/bad/SPEC.md +14 -0
  111. package/payload/canon-kit/gate-tests/check-pendency-contradiction/bad/expect.txt +1 -0
  112. package/payload/canon-kit/gate-tests/check-pendency-contradiction/good/README.md +3 -0
  113. package/payload/canon-kit/gate-tests/check-pendency-contradiction/good/SPEC.md +16 -0
  114. package/payload/canon-kit/gate-tests/check-pendency-contradiction/good/expect.txt +1 -0
  115. package/payload/canon-kit/gate-tests/check-prose-tells/bad/absence-unclosed.md +8 -0
  116. package/payload/canon-kit/gate-tests/check-prose-tells/bad/absence.md +13 -0
  117. package/payload/canon-kit/gate-tests/check-prose-tells/bad/expect.txt +4 -0
  118. package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.knobs +5 -1
  119. package/payload/canon-kit/gate-tests/check-prose-tells/good/absence.md +17 -0
  120. package/payload/canon-kit/gate-tests/check-prose-tells/good/prose.md +6 -0
  121. package/payload/canon-kit/gate-tests/check-prose-tells/good/scripts/canon-config.knobs +4 -1
  122. package/payload/canon-kit/gate-tests/check-spec-derivable-section/bad/SPEC.md +9 -0
  123. package/payload/canon-kit/gate-tests/check-spec-derivable-section/bad/expect.txt +2 -1
  124. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/SPEC.md +14 -0
  125. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/expect.txt +1 -0
  126. package/payload/canon-kit/gate-tests/check-spec-fence-balance/bad/args +1 -0
  127. package/payload/canon-kit/gate-tests/check-spec-fence-balance/bad/expect.txt +2 -1
  128. package/payload/canon-kit/gate-tests/check-spec-fence-balance/bad/long.md +7 -0
  129. package/payload/canon-kit/gate-tests/check-spec-fence-balance/good/doc.md +13 -0
  130. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.knobs +7 -1
  131. package/payload/canon-kit/gate-tests/check-spec-pointer/good/README.md +8 -0
  132. package/payload/canon-kit/gate-tests/check-spec-pointer/good/SPEC-repeat.md +11 -0
  133. package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.knobs +6 -0
  134. package/payload/canon-kit/gate-tests/check-task-label-resolution/good/work/tasks.md +6 -0
  135. package/payload/canon-kit/gate-tests/check-task-path-claim/good/work/tasks.md +6 -0
  136. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/scripts/canon-config.knobs +4 -0
  137. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/scripts/canon-config.knobs +4 -0
  138. package/payload/canon-kit/gate-tests/check-tracking-claim/bad/README.md +4 -0
  139. package/payload/context-kit/README.md +5 -7
  140. package/payload/context-kit/checks/check-brevity.gate +1 -1
  141. package/payload/context-kit/gate-tests/check-brevity.test.sh +1 -0
  142. package/payload/context-kit/gate-tests/check-memory-off.test.sh +25 -1
  143. package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +3 -0
  144. package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +16 -0
  145. package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/checkwright-gates +2 -0
  146. package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +2 -2
  147. package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +16 -0
  148. package/payload/context-kit/gate-tests/check-settings-paths/good/tools/checkwright-gates +2 -0
  149. package/payload/context-kit/gate-tests/session-context-spawn.test.sh +52 -0
  150. package/payload/context-kit/templates/nudge-delegation.txt +4 -0
  151. package/payload/context-kit/templates/settings-sessionstart.json +2 -2
  152. package/payload/delegation-kit/README.md +14 -8
  153. package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +1 -0
  154. package/payload/delegation-kit/checks/check-gate-tamper.gate +1 -1
  155. package/payload/delegation-kit/close-surfaces.txt +3 -0
  156. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/bad/agents/stale-effort.md +10 -0
  157. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/bad/agents/stale.md +9 -0
  158. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/bad/agents/unbound.md +8 -0
  159. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/bad/expect.txt +3 -0
  160. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/bad/scripts/delegation-config.knobs +3 -0
  161. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/agents/explicit-cheap.md +3 -1
  162. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/agents/explicit-paired.md +10 -0
  163. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/expect.txt +1 -1
  164. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/scripts/delegation-config.knobs +3 -0
  165. package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/exception-arrays.sh +44 -0
  166. package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/expect.txt +12 -0
  167. package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/staged-files +12 -0
  168. package/payload/delegation-kit/gate-tests/check-gate-tamper/good/exception-arrays.sh +44 -0
  169. package/payload/delegation-kit/gate-tests/check-gate-tamper/good/staged-files +1 -0
  170. package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +22 -1
  171. package/payload/delegation-kit/templates/agent-execution.md +7 -6
  172. package/payload/delegation-kit/templates/delegation-config.knobs +32 -0
  173. package/payload/delegation-kit/usage-tests/cases.tsv +35 -25
  174. package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +12 -3
  175. package/payload/doctrine-kit/DOCTRINE.md +109 -25
  176. package/payload/doctrine-kit/README.md +2 -2
  177. package/payload/drift-kit/README.md +15 -6
  178. package/payload/drift-kit/close-surfaces.txt +2 -0
  179. package/payload/drift-kit/templates/economics.md +7 -3
  180. package/payload/drift-kit/templates/kpis.list +1 -0
  181. package/payload/evidence-kit/README.md +3 -3
  182. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/expect.txt +1 -0
  183. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/runner.md +2 -1
  184. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.knobs +3 -1
  185. package/payload/evidence-kit/gate-tests/check-battery-roster/good/runner.md +1 -0
  186. package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.knobs +3 -1
  187. package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +18 -2
  188. package/payload/evidence-kit/gate-tests/diff-baseline-status.test.sh +2 -3
  189. package/payload/evidence-kit/gate-tests/run-member-door.test.sh +50 -0
  190. package/payload/gate-sdk/README.md +9 -13
  191. package/payload/gate-sdk/bin/build-native.sh +11 -14
  192. package/payload/gate-sdk/bin/run-gates.ps1 +149 -24
  193. package/payload/gate-sdk/bin/run-gates.sh +57 -14
  194. package/payload/gate-sdk/checks/check-commit-msg.gate +1 -1
  195. package/payload/gate-sdk/checks/check-gate-substrate-parity.gate +1 -1
  196. package/payload/gate-sdk/checks/check-graph.gate +2 -2
  197. package/payload/gate-sdk/checks/check-install-disposition.gate +1 -1
  198. package/payload/gate-sdk/checks/check-path-dialect.gate +1 -1
  199. package/payload/gate-sdk/checks/check-psscriptanalyzer.gate +4 -0
  200. package/payload/gate-sdk/checks/check-shellcheck.gate +1 -1
  201. package/payload/gate-sdk/checks/check-template-copy-parity.gate +1 -1
  202. package/payload/gate-sdk/checks/check-tree-terms.gate +1 -1
  203. package/payload/gate-sdk/gate-tests/check-action-gh-repo/bad/args +2 -1
  204. package/payload/gate-sdk/gate-tests/check-action-gh-repo/bad/expect.txt +2 -0
  205. package/payload/gate-sdk/gate-tests/check-action-gh-repo/bad/tree/workflows/shapes.yml +29 -0
  206. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/args +2 -1
  207. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/expect.txt +2 -0
  208. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/tree/workflows/shapes.yml +22 -0
  209. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/docs/demo-kit/index.md +3 -0
  210. package/payload/gate-sdk/gate-tests/check-gate-assertions.test.sh +17 -1
  211. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +12 -1
  212. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-array-axes.sh +44 -0
  213. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-descriptor.gate +2 -0
  214. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +2 -1
  215. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-array-axes.sh +46 -0
  216. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-descriptor.gate +2 -0
  217. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/expect.txt +1 -0
  218. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/scripts/check-psopt.gate +3 -0
  219. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/scripts/check-psopt.ps1 +1 -0
  220. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/scripts/gates.list +1 -0
  221. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/expect.txt +1 -0
  222. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/scripts/gates.list +3 -1
  223. package/payload/gate-sdk/gate-tests/check-gate-output/good/expect.txt +1 -0
  224. package/payload/gate-sdk/gate-tests/check-gate-output/good/gates.list +4 -2
  225. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +5 -0
  226. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kitroot/checks/check-kitexec.gate +2 -0
  227. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kitroot/checks/check-kitexec.ps1 +1 -0
  228. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-climb.gate +2 -0
  229. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-direxec.gate +2 -0
  230. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-twoexec.gate +3 -0
  231. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-txtexec.gate +2 -0
  232. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-txtexec.txt +1 -0
  233. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +2 -1
  234. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-psgood.gate +3 -0
  235. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-psgood.ps1 +1 -0
  236. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-rsgood.gate +3 -0
  237. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +2 -0
  238. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +42 -5
  239. package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +1 -0
  240. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-example-gate.md +9 -1
  241. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +2 -2
  242. package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +15 -29
  243. package/payload/gate-sdk/gate-tests/check-kit-enum/good/expect.txt +1 -1
  244. package/payload/gate-sdk/gate-tests/check-kit-enum/good/gates.list +3 -1
  245. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/expect.txt +1 -0
  246. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/portability-patterns.notes.list +1 -0
  247. package/payload/gate-sdk/gate-tests/check-portability-floor/good/args +1 -1
  248. package/payload/gate-sdk/gate-tests/check-portability-floor/good/scripts/gate-sdk-config.knobs +1 -0
  249. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/demo-kit/templates/portability-patterns.list +5 -0
  250. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/rosters/constructs.list +6 -0
  251. package/payload/gate-sdk/gate-tests/check-portability-floor.test.sh +15 -2
  252. package/payload/gate-sdk/gate-tests/check-psscriptanalyzer/bad/expect.txt +2 -0
  253. package/payload/gate-sdk/gate-tests/check-psscriptanalyzer/bad/noisy.ps1 +1 -0
  254. package/payload/gate-sdk/gate-tests/check-psscriptanalyzer/bad/pwsh +8 -0
  255. package/payload/gate-sdk/gate-tests/check-psscriptanalyzer/bad/scripts/gate-sdk-config.knobs +1 -0
  256. package/payload/gate-sdk/gate-tests/check-psscriptanalyzer/good/clean.ps1 +1 -0
  257. package/payload/gate-sdk/gate-tests/check-psscriptanalyzer/good/expect.txt +1 -0
  258. package/payload/gate-sdk/gate-tests/check-psscriptanalyzer/good/pwsh +7 -0
  259. package/payload/gate-sdk/gate-tests/check-psscriptanalyzer/good/scripts/gate-sdk-config.knobs +2 -0
  260. package/payload/gate-sdk/gate-tests/check-shellcheck/bad/{warn.sh → alpha-kit/gate-tests/kit-warn.sh} +1 -1
  261. package/payload/gate-sdk/gate-tests/check-shellcheck/bad/expect.txt +2 -0
  262. package/payload/gate-sdk/gate-tests/check-shellcheck/bad/scripts/gate-sdk-config.knobs +2 -0
  263. package/payload/gate-sdk/gate-tests/check-shellcheck/bad/scripts/gate-tests/tests-warn.sh +5 -0
  264. package/payload/gate-sdk/gate-tests/check-shellcheck/good/{ok.sh → alpha-kit/gate-tests/kit-ok.sh} +1 -1
  265. package/payload/gate-sdk/gate-tests/check-shellcheck/good/expect.txt +1 -1
  266. package/payload/gate-sdk/gate-tests/check-shellcheck/good/scripts/gate-sdk-config.knobs +2 -0
  267. package/payload/gate-sdk/gate-tests/check-shellcheck/good/scripts/gate-tests/tests-ok.sh +4 -0
  268. package/payload/gate-sdk/gate-tests/check-template-copy-parity/bad/args +2 -0
  269. package/payload/gate-sdk/gate-tests/check-template-copy-parity/bad/scripts/gate-sdk-config.knobs +1 -0
  270. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/args +4 -1
  271. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/gate-sdk-config.knobs +1 -0
  272. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/stray/templates/session-note.sh +4 -0
  273. package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +6 -2
  274. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/drift-kit/templates/kpis.list +1 -0
  275. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/drift-kit/templates/kpis.list +1 -0
  276. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/expect.txt +1 -0
  277. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/msg-patterns.old.list +1 -0
  278. package/payload/gate-sdk/gate-tests/check-tree-terms/good/args +2 -2
  279. package/payload/gate-sdk/gate-tests/check-tree-terms/good/scripts/gate-sdk-config.knobs +1 -0
  280. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/demo-kit/templates/msg-patterns.list +2 -0
  281. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/rosters/extra.list +2 -0
  282. package/payload/gate-sdk/gate-tests/check-tree-terms.test.sh +1 -0
  283. package/payload/gate-sdk/gate-tests/emit-arm-shape.test.sh +1 -1
  284. package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +10 -2
  285. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +29 -3
  286. package/payload/gate-sdk/gate-tests/lib-test-hermetic.test.sh +24 -0
  287. package/payload/gate-sdk/gate-tests/native-git-hooks.test.sh +261 -0
  288. package/payload/gate-sdk/gate-tests/native-rustflags.test.sh +20 -0
  289. package/payload/gate-sdk/gate-tests/run-arm-contract.test.sh +11 -4
  290. package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +2 -1
  291. package/payload/gate-sdk/gate-tests/run-for-path.test.sh +11 -1
  292. package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +64 -4
  293. package/payload/gate-sdk/lib/gate.sh +46 -6
  294. package/payload/gate-sdk/lib/test-hermetic.sh +16 -8
  295. package/payload/gate-sdk/templates/adopt.md +1 -1
  296. package/payload/gate-sdk/templates/msg-patterns.list +1 -1
  297. package/payload/gate-sdk/templates/portability-patterns.list +1 -1
  298. package/payload/guard-kit/README.md +12 -7
  299. package/payload/guard-kit/close-surfaces.txt +3 -0
  300. package/payload/guard-kit/gate-tests/check-door-binding/bad/alpha-kit/README.md +1 -1
  301. package/payload/guard-kit/gate-tests/check-door-binding/bad/expect.txt +1 -0
  302. package/payload/guard-kit/gate-tests/check-door-binding/bad/scripts/guard-config.knobs +2 -1
  303. package/payload/guard-kit/gate-tests/check-door-binding/bad/src/remedy.rs +3 -0
  304. package/payload/guard-kit/gate-tests/check-door-binding/good/expect.txt +1 -0
  305. package/payload/guard-kit/gate-tests/check-door-binding/good/scripts/guard-config.knobs +2 -1
  306. package/payload/guard-kit/gate-tests/check-door-binding/good/site/register.md +8 -0
  307. package/payload/guard-kit/gate-tests/check-door-binding/good/src/remedy.rs +13 -0
  308. package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +0 -1
  309. package/payload/guard-kit/gate-tests/consumer-rules.test.sh +105 -3
  310. package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +64 -2
  311. package/payload/guard-kit/gate-tests/guard-config-knobs.test.sh +18 -5
  312. package/payload/guard-kit/gate-tests/guard-verdict.test.sh +74 -0
  313. package/payload/guard-kit/gate-tests/worktree-confinement.test.sh +49 -5
  314. package/payload/guard-kit/guard-tests/background-cases.tsv +103 -1
  315. package/payload/guard-kit/guard-tests/cases.tsv +834 -64
  316. package/payload/guard-kit/guard-tests/powershell-cases.tsv +51 -2
  317. package/payload/guard-kit/guard-tests/variant-limits.tsv +14 -0
  318. package/payload/guard-kit/templates/close-triage.md +2 -2
  319. package/payload/guard-kit/templates/guard-config.knobs +9 -0
  320. package/payload/guard-kit/templates/settings-allow.json +1 -1
  321. package/payload/guard-kit/templates/settings-hooks.json +4 -4
  322. package/payload/lifecycle-kit/README.md +11 -6
  323. package/payload/lifecycle-kit/checks/check-disposed-findings.gate +3 -0
  324. package/payload/lifecycle-kit/checks/check-skill-binding.gate +1 -1
  325. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +1 -1
  326. package/payload/lifecycle-kit/close-surfaces.txt +2 -0
  327. package/payload/lifecycle-kit/gate-tests/boundary-set-record.test.sh +82 -0
  328. package/payload/lifecycle-kit/gate-tests/boundary-worktree-refusal.test.sh +11 -2
  329. package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +11 -1
  330. package/payload/lifecycle-kit/gate-tests/check-disposed-findings/bad/args +2 -0
  331. package/payload/lifecycle-kit/gate-tests/check-disposed-findings/bad/disposed-findings.txt +5 -0
  332. package/payload/lifecycle-kit/gate-tests/check-disposed-findings/bad/expect.txt +5 -0
  333. package/payload/lifecycle-kit/gate-tests/check-disposed-findings/good/args +2 -0
  334. package/payload/lifecycle-kit/gate-tests/check-disposed-findings/good/disposed-findings.txt +3 -0
  335. package/payload/lifecycle-kit/gate-tests/check-disposed-findings/good/expect.txt +1 -0
  336. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/expect.txt +1 -0
  337. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/gap-inbox.md +1 -1
  338. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +27 -2
  339. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/queue.md +6 -0
  340. package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +34 -2
  341. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/align.md +3 -0
  342. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/expect.txt +1 -0
  343. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/scripts/lifecycle-config.knobs +3 -0
  344. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/align.md +3 -0
  345. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/expect.txt +1 -0
  346. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/scripts/lifecycle-config.knobs +2 -0
  347. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage.test.sh +22 -2
  348. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +9 -2
  349. package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +27 -1
  350. package/payload/lifecycle-kit/gate-tests/journal-arm.test.sh +251 -0
  351. package/payload/lifecycle-kit/gate-tests/lead-journal-open.test.sh +46 -5
  352. package/payload/lifecycle-kit/gate-tests/stamp-before-write.test.sh +16 -2
  353. package/payload/lifecycle-kit/templates/consult.md +9 -5
  354. package/payload/lifecycle-kit/templates/frames/project-critique.md +18 -0
  355. package/payload/lifecycle-kit/templates/frames/stage-contract-sweep.md +18 -0
  356. package/payload/lifecycle-kit/templates/frames/stage-contract.md +15 -0
  357. package/payload/lifecycle-kit/templates/host-protocol.md +10 -0
  358. package/payload/lifecycle-kit/templates/lead.md +30 -25
  359. package/payload/lifecycle-kit/templates/stages/align.md +4 -0
  360. package/payload/lifecycle-kit/templates/stages/build.md +5 -3
  361. package/payload/lifecycle-kit/templates/stages/close.md +8 -6
  362. package/payload/lifecycle-kit/templates/stages/scope.md +6 -2
  363. package/payload/lifecycle-kit/templates/stages/spec.md +4 -0
  364. package/payload/lifecycle-kit/templates/stages/validate.md +4 -2
  365. package/payload/lifecycle-kit/templates/upgrade.md +1 -1
  366. package/payload/queue-kit/README.md +3 -2
  367. package/payload/queue-kit/close-surfaces.txt +3 -0
  368. package/payload/queue-kit/gate-tests/check-queue-sections/bad/expect.txt +1 -0
  369. package/payload/queue-kit/gate-tests/check-queue-sections/bad/scripts/queue-config.knobs +2 -0
  370. package/payload/queue-kit/gate-tests/check-queue-sections/good/TASK-QUEUE.md +1 -1
  371. package/payload/queue-kit/gate-tests/check-queue-sections/good/scripts/queue-config.knobs +2 -0
  372. package/payload/queue-kit/gate-tests/check-queue-sections.test.sh +65 -0
  373. package/payload/queue-kit/gate-tests/check-queue-slug-liveness.test.sh +10 -1
  374. package/payload/queue-kit/gate-tests/check-queue-wrap/good/TASK-QUEUE.md +4 -0
  375. package/payload/queue-kit/gate-tests/check-tag-lead-line/good/TASK-QUEUE.md +4 -0
  376. package/payload/queue-kit/gate-tests/check-task-conservation.test.sh +38 -0
  377. package/payload/queue-kit/gate-tests/check-task-names/bad/TASK-QUEUE.md +3 -0
  378. package/payload/queue-kit/gate-tests/check-task-names/bad/expect.txt +3 -0
  379. package/payload/queue-kit/gate-tests/check-task-names/good/TASK-QUEUE.md +8 -0
  380. package/payload/queue-kit/gate-tests/roadmap-lag.test.sh +137 -0
  381. package/payload/site-kit/README.md +3 -3
  382. package/payload/site-kit/gate-tests/check-docs-collapsible/bad/docs/unclosed.md +8 -0
  383. package/payload/site-kit/gate-tests/check-docs-collapsible/bad/expect.txt +1 -0
  384. package/payload/site-kit/gate-tests/check-docs-collapsible/good/docs/regions.md +7 -0
  385. package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/docs/dotted.md +9 -0
  386. package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/expect.txt +1 -0
  387. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/dotted.md +7 -0
  388. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/expect.txt +1 -1
  389. package/payload/site-kit/gate-tests/site-health-probe.test.sh +219 -0
  390. package/payload/site-kit/templates/site-health.yml +181 -132
  391. package/profiles.list +11 -10
  392. package/recipes/openspec/canon-config.knobs +5 -0
  393. package/recipes/openspec-overlap/canon-config.knobs +12 -0
  394. package/recipes/openspec-overlap/unregister.list +1 -0
  395. package/payload/context-kit/checks/check-footprint-fresh.gate +0 -4
  396. package/payload/context-kit/gate-tests/check-footprint-fresh/bad/args +0 -4
  397. package/payload/context-kit/gate-tests/check-footprint-fresh/bad/emit.txt +0 -12
  398. package/payload/context-kit/gate-tests/check-footprint-fresh/bad/expect.txt +0 -1
  399. package/payload/context-kit/gate-tests/check-footprint-fresh/bad/projection.txt +0 -11
  400. package/payload/context-kit/gate-tests/check-footprint-fresh/good/CLAUDE.md +0 -6
  401. package/payload/context-kit/gate-tests/check-footprint-fresh/good/demo-kit/SPEC.md +0 -3
  402. package/payload/context-kit/gate-tests/check-footprint-fresh/good/demo-kit/templates/guide.md +0 -3
  403. package/payload/context-kit/gate-tests/check-footprint-fresh/good/docs/footprint.md +0 -32
  404. package/payload/context-kit/gate-tests/check-footprint-fresh/good/expect.txt +0 -1
  405. package/payload/context-kit/templates/session-context.sh +0 -148
  406. package/payload/delegation-kit/checks/check-rule-citation.gate +0 -3
  407. package/payload/delegation-kit/gate-tests/check-rule-citation/bad/args +0 -1
  408. package/payload/delegation-kit/gate-tests/check-rule-citation/bad/expect.txt +0 -1
  409. package/payload/delegation-kit/gate-tests/check-rule-citation/bad/spec.md +0 -9
  410. package/payload/delegation-kit/gate-tests/check-rule-citation/bad/tmpl.md +0 -4
  411. package/payload/delegation-kit/gate-tests/check-rule-citation/good/args +0 -1
  412. package/payload/delegation-kit/gate-tests/check-rule-citation/good/expect.txt +0 -1
  413. package/payload/delegation-kit/gate-tests/check-rule-citation/good/spec.md +0 -20
  414. package/payload/delegation-kit/gate-tests/check-rule-citation/good/tmpl.md +0 -5
  415. package/payload/drift-kit/templates/kpi-deprecated-surface.sh +0 -54
  416. package/payload/gate-sdk/checks/check-crate-arms.gate +0 -3
  417. package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +0 -3
  418. package/payload/gate-sdk/checks/check-hook-exec-bit.gate +0 -3
  419. package/payload/gate-sdk/checks/check-kit-roots-dialect.gate +0 -3
  420. package/payload/gate-sdk/checks/check-packed-links.gate +0 -3
  421. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/Cargo.toml +0 -7
  422. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/src/lib.rs +0 -12
  423. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/expect.txt +0 -5
  424. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.knobs +0 -3
  425. package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/Cargo.toml +0 -7
  426. package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/src/lib.rs +0 -11
  427. package/payload/gate-sdk/gate-tests/check-crate-arms/good/expect.txt +0 -2
  428. package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.knobs +0 -3
  429. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/args +0 -2
  430. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/expect.txt +0 -5
  431. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/kitroot/checks/check-vendored.gate +0 -2
  432. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/check-ported.gate +0 -2
  433. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.knobs +0 -2
  434. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gates.list +0 -4
  435. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stamp.txt +0 -1
  436. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stub-bin +0 -6
  437. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/args +0 -2
  438. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/expect.txt +0 -5
  439. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/kitroot/checks/check-vendored.gate +0 -2
  440. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/check-ported.gate +0 -2
  441. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.knobs +0 -2
  442. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gates.list +0 -4
  443. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stamp.txt +0 -1
  444. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stub-bin +0 -5
  445. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +0 -97
  446. package/payload/gate-sdk/gate-tests/check-hook-exec-bit/bad/args +0 -1
  447. package/payload/gate-sdk/gate-tests/check-hook-exec-bit/bad/expect.txt +0 -1
  448. package/payload/gate-sdk/gate-tests/check-hook-exec-bit/bad/hooks/pre-commit +0 -2
  449. package/payload/gate-sdk/gate-tests/check-hook-exec-bit/good/args +0 -1
  450. package/payload/gate-sdk/gate-tests/check-hook-exec-bit/good/expect.txt +0 -1
  451. package/payload/gate-sdk/gate-tests/check-hook-exec-bit/good/hooks/pre-commit +0 -2
  452. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/args +0 -5
  453. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/expect.txt +0 -1
  454. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/checks/placeholder.txt +0 -3
  455. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/gate-tests/alpha.test.sh +0 -3
  456. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/lib/alpha.sh +0 -3
  457. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/checks/placeholder.txt +0 -3
  458. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/gate-tests/beta.test.sh +0 -3
  459. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/lib/beta.sh +0 -3
  460. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/gate-sdk/checks/placeholder.txt +0 -3
  461. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/gate-sdk/lib/gate.sh +0 -3
  462. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/scripts/gate-sdk-config.knobs +0 -7
  463. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/scripts/gates.list +0 -3
  464. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/args +0 -7
  465. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/expect.txt +0 -1
  466. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/checks/placeholder.txt +0 -3
  467. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/gate-tests/alpha.test.sh +0 -3
  468. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/lib/alpha.sh +0 -3
  469. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/checks/placeholder.txt +0 -3
  470. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/gate-tests/beta.test.sh +0 -3
  471. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/lib/beta.sh +0 -3
  472. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/gate-sdk/checks/placeholder.txt +0 -3
  473. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/gate-sdk/lib/gate.sh +0 -3
  474. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/scripts/gates.list +0 -3
  475. package/payload/gate-sdk/gate-tests/check-packed-links/bad/alpha-kit/README.md +0 -5
  476. package/payload/gate-sdk/gate-tests/check-packed-links/bad/args +0 -5
  477. package/payload/gate-sdk/gate-tests/check-packed-links/bad/beta-kit/README.md +0 -5
  478. package/payload/gate-sdk/gate-tests/check-packed-links/bad/expect.txt +0 -2
  479. package/payload/gate-sdk/gate-tests/check-packed-links/bad/scripts/gate-sdk-config.knobs +0 -4
  480. package/payload/gate-sdk/gate-tests/check-packed-links/good/alpha-kit/README.md +0 -5
  481. package/payload/gate-sdk/gate-tests/check-packed-links/good/args +0 -8
  482. package/payload/gate-sdk/gate-tests/check-packed-links/good/beta-kit/README.md +0 -9
  483. package/payload/gate-sdk/gate-tests/check-packed-links/good/expect.txt +0 -1
  484. package/payload/gate-sdk/gate-tests/check-packed-links/good/gamma-kit/SPEC.md +0 -4
  485. package/payload/gate-sdk/gate-tests/check-packed-links/good/scripts/gate-sdk-config.knobs +0 -6
  486. package/payload/gate-sdk/gate-tests/check-portability-floor/good/patterns.list +0 -5
  487. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/portability-patterns.list +0 -5
  488. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/msg-patterns.list +0 -2
  489. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/msg-patterns.local.list +0 -3
  490. /package/payload/gate-sdk/gate-tests/{check-shellcheck → check-psscriptanalyzer}/bad/args +0 -0
  491. /package/payload/gate-sdk/gate-tests/{check-shellcheck → check-psscriptanalyzer}/good/args +0 -0
  492. /package/payload/gate-sdk/gate-tests/check-template-copy-parity/bad/{delegation-kit → vendor/delegation-kit}/templates/agent-budget-guard.sh +0 -0
  493. /package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/{delegation-kit → vendor/delegation-kit}/templates/agent-budget-guard.sh +0 -0
  494. /package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/{delegation-kit → vendor/delegation-kit}/templates/delegation-config.sh +0 -0
  495. /package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/{delegation-kit → vendor/delegation-kit}/templates/session-note.sh +0 -0
  496. /package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/{delegation-kit → vendor/delegation-kit}/templates/usage-poller.sh +0 -0
@@ -0,0 +1,15 @@
1
+ You are executing the stage contract printed below the separator line, on behalf of a delegating session that holds the write path. You are in a clone of the repository at a committed revision: uncommitted and ignored content is absent from it.
2
+
3
+ **You write nothing.** No stamp, no commit, no journal line, no edit to a queue, a spec or an amendment, and no filing of any kind. The contract's first step and its last step belong to the delegating session: skip both. Do every other step the contract words as a write as far as its reading goes, and return the write as a proposal.
4
+
5
+ **Run only commands that change nothing.** Where your sandbox refuses a command, or a command needs a built artifact the clone lacks, name that command in your report for the delegating session to run. Never work around it.
6
+
7
+ Where the contract names a template or another file by a repository-relative path, read it in the clone.
8
+
9
+ **Your report**, as your final output, in these parts and this order:
10
+
11
+ 1. **Findings** — each with its path and line, the command or the reading that shows it, and whether you measured it or inferred it.
12
+ 2. **Proposed writes** — each naming the surface it lands on and carrying its full text.
13
+ 3. **Questions** — each as Question / Options / Recommendation / Evidence.
14
+ 4. **Not done** — every step you did not carry out, and why.
15
+ 5. **Verdict** — whether the stage's exit condition holds, by your reading.
@@ -0,0 +1,10 @@
1
+ The host protocol: your dispatch names a foreign adapter, so this stage's work runs there and every lifecycle write stays yours. Your mode is `sweep` where your stage template's pointer line names it, else `audit`.
2
+
3
+ 1. Enter, stamp and verify your tier as any session of your stage does.
4
+ 2. Write `--emit stage-contract <your stage> --mode <your mode>` to a prompt file in the scratch dir and append what your dispatch gave you that varies. Append nothing read from a file the repository ignores.
5
+ 3. Run it as a `--foreign-run` in your mode on the named adapter with `--class <the class your dispatch names for the foreign work, else your own tier class>`, under delegation-kit's foreign-run bullet (delegation-kit/templates/agent-execution.md): the budget read first, backgrounded with its liveness record.
6
+ 4. Check each finding before you build on it. Perform each proposed write you accept yourself, in your stage's own commits. Answer a question from the governed surfaces or escalate it, and return an answer with `--foreign-resume` where the adapter resumes.
7
+ 5. In `sweep` mode, apply the run's `change.patch` to your checkout and verify it as any agent's work, running your stage's oracle over it. On a red, take the patch back out and return the red with `--foreign-resume`, then apply only the newest turn's patch, which holds the session's whole change. Where the adapter does not resume, finish the unit yourself. Edit the change yourself only once the session is closed, and commit only a change your oracle passed.
8
+ 6. Run yourself every command the report names as refused or as needing a built artifact, your stage's gates among them.
9
+ 7. Record the run's verdict line in your journal and in the message of the commit that lands its work.
10
+ 8. A run that ends `FAILED` or `REFUSED` returns nothing to build on: execute the contract yourself, and where that needs a tier above your dispatch's, escalate a re-tier.
@@ -2,17 +2,7 @@ The **iteration lead** — a live session that dispatches an iteration's stage s
2
2
 
3
3
  The lead is optional. An iteration runs correctly with no lead — each stage is an ordinary skill invocation that stops and surfaces to the user. The lead only changes where a stage session's escalations land: at a live lead that can rule and resume it, instead of at a cold restart.
4
4
 
5
- **First step — record the session role.** Write `lead <id>` — `<id>` from `--emit session-id` on the gate binary `GATE_SDK_NATIVE_BIN` names — to the session-role marker (`CONTEXT_KIT_SESSION_ROLE_FILE`, default `${GATE_SDK_TMP_DIR:-.tmp}/session-role`):
6
-
7
- ```bash
8
- . gate-sdk/lib/gate.sh && mkdir -p "${GATE_SDK_TMP_DIR:-.tmp}" && \
9
- echo "lead $("$(gate_native_bin_spelled)" --emit session-id)" \
10
- > "${CONTEXT_KIT_SESSION_ROLE_FILE:-${GATE_SDK_TMP_DIR:-.tmp}/session-role}"
11
- ```
12
-
13
- The session-context hook reads it on each re-fire and suppresses its executor-facing steps for this session only — the id match scopes the signal, so no other session inherits it and a stale marker self-invalidates (context-kit/SPEC.md §The session-context hook owns the grammar and limits). Skipping the step costs nothing but the suppression. If the Bash environment lacks the harness session uuid, the id derivation's newest-transcript fallback can mis-pick a just-finished subagent's id — verify before writing the marker (lifecycle-kit/SPEC.md §bin/session-id.sh owns the limit).
14
-
15
- Then open your resume journal with `--enter-stage --open-lead-journal` on the gate binary `GATE_SDK_NATIVE_BIN` names before writing to it; never overwrite the file.
5
+ **First step — open your journal and record the session role.** Run `--enter-stage --open-lead-journal` on the gate binary `GATE_SDK_NATIVE_BIN` names. It opens your resume journal, and writes `lead <id>` to the session-role marker (`CONTEXT_KIT_SESSION_ROLE_FILE`), which the session-context hook reads on each re-fire to suppress its executor-facing steps for this session only (context-kit/SPEC.md §The session-context hook). Run it again after a resume. Never overwrite the journal; append to it with `--emit journal --lead "<finding>"`.
16
6
 
17
7
  Then read the model roster: run `--price-coverage` on the gate binary `GATE_SDK_NATIVE_BIN` names (drift-kit/SPEC.md §The price-coverage arm; without drift-kit, skip this). An id it names unpriced is a harness roster churn. Re-judge every tier assignment before your first dispatch (§Economics), and file the missing row with `--emit file-gap`. File a `CHANGED` price page the same way.
18
8
 
@@ -23,17 +13,19 @@ The lead takes one of two postures; which one — and the model tier each sessio
23
13
  - **Unified** — the scope session stays live as the iteration's lead once its promotion commit lands. One session holds both scope's judgment and the dispatch loop, so every orchestration turn rides whatever tier scope ran on.
24
14
  - **Split** — a session on a cheaper routing tier takes the lead role first and dispatches scope itself as a stage session on the judgment tier, keeping that agent resumable afterward as the iteration's **intent oracle**. The lead's own turns are routing work — dispatch, result ingestion, budget verdicts — and stop paying judgment-tier prices. The oracle is a fresh dispatch under delegation-kit's **Never dispatch a fork to narrow a child** rule (`templates/agent-execution.md`), of which this posture is the named tier-split instance: the narrowing at stake here is the model tier, and a fork inherits the dispatcher's.
25
15
 
26
- Under either posture the lead dispatches a stage session as a **background agent** whose prompt is that stage's ordinary skill invocation (`/build`, `/validate`, …); the stage session executes its stage skill unchanged. Every lifecycle-state write — the entry stamp, commits, evidence — happens **in the stage session**, never in the lead.
16
+ Under either posture the lead dispatches a stage session as a **background agent** whose prompt is that stage's ordinary skill invocation (`/build`, `/validate`, …); the stage session executes its stage skill unchanged. Every lifecycle-state write — the entry stamp, commits, evidence — happens **in the stage session**, never in the lead. Dispatch a stage whose work runs foreign as the same stage-session type with the adapter named in its prompt, and run no `--foreign-run` for a stage yourself.
27
17
 
28
- Dispatch mechanics are delegation-kit's, unchanged: dispatch in the background with notification, honor the per-dispatch budget guard, and verify after any agent commit. The guard blocks only on PAUSE (STALE and OK advise); a deliberate override rides the `.claude/settings.local.json` env block — delegation-kit/SPEC.md §The delegation model. Load `/agent-execution` for the protocol and follow it there — it is not restated here.
18
+ **Read the stage's executor before you dispatch it.** Run `--emit knob-values LIFECYCLE_KIT_STAGE_EXECUTOR`. Where an element binds the stage, read that adapter's `--foreign-run <adapter> --budget`: on `OK`, `RESET-OK`, `STALE` or `OFF`, name the adapter in the dispatch prompt with the class the foreign work rides, and tier the host by what its writes demand; on `PAUSE`, dispatch the stage on this harness and journal the line.
19
+
20
+ Dispatch mechanics are delegation-kit's, unchanged: dispatch in the background with notification, honor the per-dispatch budget guard, and verify after any agent commit. The guard blocks only on PAUSE (STALE and OK advise); a deliberate override rides the local settings overlay's env block — delegation-kit/SPEC.md §The delegation model. Load `/agent-execution` for the protocol and follow it there — it is not restated here.
29
21
 
30
22
  **When the dispatched stage is the evidence-producing stage, the lead's verify is a read of the committed evidence — never a re-run of the producer.** This is the lifecycle instance of delegation-kit's no-producer-re-run rule (delegation-kit/SPEC.md §Verify after every agent commit, which owns the generic rule and the harm each misroute does). Read the manifest the stage committed and judge it.
31
23
 
32
- **Stage N+1 is dispatched on stage N's agent completion notification — never on its hand-back report, commit, stamp, a clean tree, a green battery, or a cleared `--simulate`.** Completion is a fact about a *session*, and none of those others distinguishes "finished" from "still writing".
24
+ **Stage N+1 is dispatched on stage N's agent completion notification — never on its hand-back report, commit, stamp, a clean tree, a green battery, or a cleared `--simulate`.** Completion is a fact about a *session*, and none of those others distinguishes "finished" from "still writing". **Make one tool call before any turn you end to await that notification**, a read-only one serving, so a notification queued during the turn is delivered inside it (lifecycle-kit/SPEC.md §The stamp protocol, the honest limit on the lead's dispatch precondition).
33
25
 
34
- **When the notification does not arrive, no single read distinguishes a finished-but-unreported session from a live one.** Delivery can fail, and the rule above then has no fallback — while the artifact reads a lead reaches for next are the same ones it just refused. What recovers it is two signals and a question: the session's absence from the harness's running-agent roster, a `DONE` marker in its journal, and — decisive whenever either is ambiguous — asking the session itself, which §A running session is asked, never instructed already sanctions as a question rather than a command. The `DONE` check carries a sharp edge worth stating rather than rediscovering: it is valid only as the journal's **last line**, so any out-of-order append silently invalidates it while leaving the marker plainly visible.
26
+ **When the notification does not arrive, no single read distinguishes a finished-but-unreported session from a live one.** Delivery can fail, and the rule above has no fallback, while the artifact reads a lead reaches for next are the same ones it just refused. What recovers it is two signals and a question: the session's absence from the harness's running-agent roster, a `DONE` marker in its journal, and — decisive whenever either is ambiguous — asking the session itself, which §A running session is asked, never instructed already sanctions as a question rather than a command. The `DONE` check is valid only as the journal's **last line**: an out-of-order append silently invalidates it and leaves the marker visible.
35
27
 
36
- **The reverse case is inspected, never waited out: a session that reported and ended its journal with `DONE` yet still reads as active.** Something of its own is holding it, such as a background child outliving the work (a self-matching waiter, say). Check the session's leftover processes (waiters, shells, worktrees) and report them, rather than waiting on a notification the holder may keep from arriving.
28
+ **The reverse case is inspected, never waited out: a session that reported and ended its journal with `DONE` yet still reads as active.** A background child of its own is holding it (a producerless waiter, say). Read the process table first, then its shells and worktrees, and report the holder. Two events owe that read: a completion notification saying background work is still running, and any answer to an operator asking whether something is stuck.
37
29
 
38
30
  **Any prompt-answered signal is a start signal, never a completion one.** An approval prompt gates a command **starting**, so an operator's note about having just answered one timestamps a beginning (lifecycle-kit/SPEC.md §The state machine).
39
31
 
@@ -53,7 +45,7 @@ One qualification, because `--simulate` runs every matching entry-preflight comm
53
45
 
54
46
  **Relay, never assert.** The lead manages on *optimal* rather than extensive context, so what it hands a stage session travels no stronger than the lead holds it:
55
47
 
56
- - **A claim carries its tier**: measured (the command, and when it ran), inferred, or expected. A grant also carries whether it is spent, read off its target's current state at relay time.
48
+ - **A claim carries its tier**: measured (the command, and when it ran), inferred, or expected. Inferred is only for a claim no transcript, log or artifact in reach settles (doctrine-kit/DOCTRINE.md, Probe-before-assertion). A grant also carries whether it is spent, read off its target's current state at relay time; an inbox item's grant is spent where the item's line carries a `Grant spent` mark for it (lifecycle-kit/SPEC.md §The consult inbox).
57
49
  - **A fix travels as the constraint it must meet**, never as the mechanism. The stage session holds the oracle and finds the mechanism.
58
50
  - **A rule travels only to a role it binds.** Before relaying one, read whose role its owning surface names.
59
51
  - **Operator answers that seem to conflict go back to the operator as that question**, never reconciled by inference and relayed as their words.
@@ -112,12 +104,25 @@ Under the split posture the lead **routes** an escalation before answering it. A
112
104
 
113
105
  **A split ask arrives with its own test already applied.** A session the queue's per-entry cap blocks may ask to split the entry, and that ask carries the session's statement of which side of `queue-kit/SPEC.md` §check-queue-entry-budget's split test its entry falls on. The lead rules against that test rather than re-deriving one; the authorization stays the lead's, on that section's own ground — a new entry is a new unit competing for the scope attention that ranks both.
114
106
 
115
- **One class the lead never rules, under either posture.** Reversing, demoting or re-scoping a **recorded operator ruling** or a stated objective is operator-class: the lead relays it, however well-grounded the escalating session's finding and however urgent the fix. Where the operator defers it, file it with `--emit file-consult` so it reaches the next consultation rather than your transcript. Nor does it decline a threshold-proposed entry that scope's escalation marks operator-routed. That entry has been declined twice, and it is relayed.
107
+ **One class the lead never rules, under either posture.** Reversing, demoting or re-scoping a **recorded operator ruling** or a stated objective is operator-class: the lead relays it, however well-grounded the escalating session's finding and however urgent the fix. Where the operator defers it, file it with `--emit file-consult` so it reaches the next consultation rather than your transcript. A direction question a stage's escalation carries for the operator you relay too, under either posture, never ruled by you or the oracle. One the operator defers you file with `--emit file-gap`, so the next stage to drain the gap inbox asks it again. Nor does it decline a threshold-proposed entry that scope's escalation marks operator-routed. That entry has been declined twice, and it is relayed.
108
+
109
+ **Dispatch a consultation for the consult inbox only while no stage session is live.** At a point where no dispatched stage session is live and the inbox (`LIFECYCLE_KIT_CONSULT_INBOX_FILE`) meets the slot's threshold, dispatch the consult skill as the agent type the slot names, on the class `LIFECYCLE_KIT_CONSULT_CLASS` names, its prompt naming the inbox items and nothing else. It escalates to you as a stage session does. Relay each ruling-class escalation and each recommendation it sends to the operator, the recommendation as advice, and relay the answer back, stating its class: an accepted recommendation returns as a direction. Dispatch no stage session while it is live.
116
110
 
117
- **Dispatch a consultation for the consult inbox only while no stage session is live.** At a point where no dispatched stage session is live and the inbox (`LIFECYCLE_KIT_CONSULT_INBOX_FILE`) meets the slot's threshold, dispatch the consult skill as the agent type the slot names, its prompt naming the inbox items and nothing else. It escalates to you as a stage session does. Relay each ruling-class escalation to the operator and relay the answer back, stating its class. Dispatch no stage session while it is live.
111
+ **Dispatch an operator-ruled hotfix only while no stage session and no consultation is live.** When the operator rules a hotfix (doctrine-kit/DOCTRINE.md, Scope-gated intake), dispatch it as the hotfix type your ruling-config names. Its prompt names the ruling, the failure, and the queue entry or gap bullet the fix disposes, and nothing else, and grants its journal path. Verify its one commit as you verify any agent commit, and dispatch no stage session and no consultation while it is live. Where your ruling-config names no hotfix type, dispatch none: the operator lands the hotfix in a session of their own.
118
112
 
119
113
  *<consult-dispatch: the agent type a lead dispatches a consultation as — never a stage-session type — and the batching threshold on the consult inbox: an item count, an oldest-item age, or off, which dispatches at the first quiet point after any item lands. Or the statement that this consumer's lead dispatches no consultation.>*
120
114
 
115
+ ## Mid-iteration intake
116
+
117
+ **Route an operator's mid-iteration request by its shape, never by its wording.** Take the first route that fits. "Add it to this iteration" moves no request off its route.
118
+
119
+ 1. **A question rather than work** — answer it, or relay it to the operator as you relay an escalation (§The escalation protocol).
120
+ 2. **An impacting failure** — propose the hotfix with its cost against the iteration's (doctrine-kit/DOCTRINE.md, Scope-gated intake). On the operator's ruling, dispatch it as §The escalation protocol says; without one, take the first later route that fits.
121
+ 3. **Debt** — a change converging on names the governed surfaces already carry, needing no design ruling: file it with `--emit file-gap` and tell the operator the closing stage's drain fixes it this iteration.
122
+ 4. **Anything else** — a new name, a design ruling, or more than one drain session holds: file it the same way. The drain promotes it and the next scope ranks it. Where the operator wanted it in this iteration, say it cannot enter before the next, and write their wish into the bullet's prose as their direction for the next scope.
123
+
124
+ Never start a request's work in a batch of your own, and never write its queue entry.
125
+
121
126
  ## Channel design
122
127
 
123
128
  Two channels, each with one job. Routine narration and findings go to the **resume journal** (a pull channel — delegation-kit's journal mechanics own the rest). The **message channel** carries only the escalation classes. This is how verbosity is controlled: by channel design, not by asking a session to be quiet.
@@ -146,15 +151,15 @@ A dispatched stage session is not a tool call the lead may re-issue. Three rules
146
151
 
147
152
  ## Policy is config, not prose
148
153
 
149
- All *standing* dispatch policy — everything true of every dispatch, not the ruling-class roster alone — lives in the tracked agent-definition the dispatch names, never in ad-hoc per-dispatch instructions, so there is one gated source of the policy rather than a second one improvised per dispatch. Journal mechanics, environment wiring, the shared-index caution, the escalation shape, and the escalate-versus-decide roster are all standing; a dispatch prompt carries only what varies per dispatch — the stage skill to invoke, the batch's task slugs, and pointers specific to that batch. The tell that content is misplaced: the same sentence appearing in two dispatch prompts. The agent-definition points at its owning docs rather than restating them (content-tiering) — it cites delegation-kit's resume-journal mechanics, say, never transcribes them.
154
+ All *standing* dispatch policy — everything true of every dispatch, not the ruling-class roster alone — lives in the tracked agent-definition the dispatch names, never in ad-hoc per-dispatch instructions, so there is one gated source of the policy rather than a second one improvised per dispatch. Journal mechanics, environment wiring, the shared-index caution, the escalation shape, and the escalate-versus-decide roster are all standing; a dispatch prompt carries only what varies per dispatch — the stage skill to invoke, the batch's task slugs, a foreign adapter where the stage's work runs on one, and pointers specific to that batch. The tell that content is misplaced: the same sentence appearing in two dispatch prompts. The agent-definition points at its owning docs rather than restating them (content-tiering) — it cites delegation-kit's resume-journal mechanics, say, never transcribes them.
150
155
 
151
156
  The rule cuts both ways: policy binding the **lead itself** is standing too, and its tracked source is this template rather than the agent definition it dispatches. The completion-notification dispatch precondition (§The lead model) is standing policy of exactly that kind, named here so it is stated once and not re-improvised in each dispatch prompt.
152
157
 
153
- *<ruling-config: the tracked agent-definition the lead dispatches and the roster it carries — its path, the subagent type the dispatch names, and where the ruling classes are stated.>*
158
+ *<ruling-config: the tracked agent-definitions the lead dispatches and the roster each carries — for the stage-session type, and for a hotfix type where this consumer has one: its path, the subagent type the dispatch names, and where its ruling classes are stated.>*
154
159
 
155
160
  ## Stamps are authoritative (the load-bearing invariant)
156
161
 
157
- The lead writes **no** lifecycle state — no WORKFLOW-STATE stamps, no queue writes, no evidence files, no push — a push is the stage session's whose next act reads its run (lifecycle-kit/SPEC.md §The state machine). The dispatch marker is scratch, not lifecycle state. Every stamp originates in the stage session via `--enter-stage`. Lead-does-stamping is ruled out, not merely omitted (lifecycle-kit/SPEC.md §The state machine).
162
+ The lead writes **no** lifecycle state — no WORKFLOW-STATE stamps, no queue writes, no evidence files, no push — a push is the stage session's whose next act reads its run (lifecycle-kit/SPEC.md §The state machine), or a hotfix's landing after the closing push, whose definition owns that push and its watch (lifecycle-kit/SPEC.md §templates/lead.md). The dispatch marker is scratch, not lifecycle state. Every stamp originates in the stage session via `--enter-stage`. Lead-does-stamping is ruled out, not merely omitted (lifecycle-kit/SPEC.md §The state machine).
158
163
 
159
164
  **The lead stamping nothing is not the batch stamping nothing**, and the two read alike from here. A dispatched batch stamps on entry like any stage session: an intra-stage split makes the second batch a *session*, not a re-entry to suppress, and a sibling stamp naming a stage the cursor already sits on moves nothing — the stage skill owns that rule and its gate tolerance (lifecycle-kit/templates/stages/build.md). Directing a batch not to stamp is therefore not conflict-avoidance; it silently spends the per-session audit trail the stamp exists to provide, and no later session can repair it.
160
165
 
@@ -164,14 +169,14 @@ The lead writes **no** lifecycle state — no WORKFLOW-STATE stamps, no queue wr
164
169
 
165
170
  **File and commit your captures between dispatches.** At the first moment no dispatched stage session is live, file each held capture to its channel (`--emit file-gap`, `--emit file-consult`, `--emit file-survey`) and commit it on its own. A capture commit is none of the lifecycle state the invariant above enumerates, so it is yours to make. No capture arm makes a `git` call: judging when the tree is free is the filing session's (lifecycle-kit/SPEC.md §The committed gap inbox).
166
171
 
167
- An answer that amounts to a design ruling is landed **by the stage session**, in the governed surface it belongs to (the amendment, the queue entry), *before* the session acts on it — and a ruling whose acting session is **not imminent** is filed to a durable governed surface (a queue entry, an amendment) in the moment it is made, because "the stage session lands it" holds only when that session exists. So is an answer that nothing changes: relay it as an answer to be landed, naming the surface that recorded the question, never as a close of the matter (lifecycle-kit/SPEC.md §The stamp protocol). The message thread is transport, never a store — so a lead crash or a lost transcript costs nothing the tracked surfaces do not already hold.
172
+ An answer that amounts to a design ruling is landed **by the stage session**, in the governed surface it belongs to (the amendment, the queue entry, or the set record for an answer ruling the whole set), *before* the session acts on it — and a ruling whose acting session is **not imminent** is filed to a durable governed surface (a queue entry, an amendment) in the moment it is made, because "the stage session lands it" holds only when that session exists. So is an answer that nothing changes: relay it as an answer to be landed, naming the surface that recorded the question, never as a close of the matter (lifecycle-kit/SPEC.md §The stamp protocol). The message thread is transport, never a store — so a lead crash or a lost transcript costs nothing the tracked surfaces do not already hold.
168
173
 
169
174
  ## Economics — batch, and compact where it pays
170
175
 
171
176
  The lead is nearly always cold — stage sessions outlive the prompt cache's TTL and escalations arrive on their schedule. So:
172
177
 
173
- - **Batch dispatches by shared surface.** Neither whole-queue-in-one nor one-dispatch-per-task: batch units that share a kit or SPEC surface into one dispatch, where derived context is actually common; split where the model tier changes or a delegation-kit split trigger fires — per-batch model tiering is the dominant window lever, not token counts. **Shared surface groups a batch and does not order one, so a cut owes a second read.** Read the deltas for a *producer/consumer* edge before cutting, and keep a producer with its consumer whatever surface the two sit on. The set being batched is **every unit the iteration promoted** — every top-level entry in the configured active queue sections, debt units as much as feature units — never the amendment set, which a debt unit carries no `[spec:]` ref to join. Derive the roster from the queue, which is the record of what was promoted, and re-read it rather than carrying a count.
174
- - **Tier each batch to its work class.** The lead reads the **work-class** labels of the deltas in a batch — via the `[spec:]` amendments the batch's entries point at, where `/spec` emits one `{mechanical | design-bearing}` tag per delta — and tiers the batch by their aggregate. A batch whose deltas are **all mechanical** is **tier-downgradeable**: a cheaper model serves it, and the dispatcher pins the cheaper tier with a `model` override on that batch's dispatch. A batch carrying **any design-bearing** delta **stays on the judgment tier**. Every cheaper-tier dispatch carries an **escalate-on-discovery** transition. A session that finds it must author a fix, beyond running an oracle or editing a governed record, stops before authoring it. It journals the diagnosis and escalates a re-tier. You rule that alone. Re-dispatch the rest of the work as a same-stage session on the judgment tier, pointed at the journal. Do not resume the paused session. Your ruling-config's escalation roster names the class, so a dispatched session can recognize it. Class → live model is mapped at dispatch time (agent-execution.md, same bullet). There is no standing per-stage classification to bind: the batch's labels decide at dispatch time. Re-judge every assignment when the harness model roster churns.
178
+ - **Batch dispatches by shared surface.** Neither whole-queue-in-one nor one-dispatch-per-task: batch units that share a kit or SPEC surface into one dispatch, where derived context is actually common; split where the model tier changes or a delegation-kit split trigger fires — per-batch model tiering is the dominant window lever, not token counts. **Shared surface groups a batch and does not order one, so a cut owes a second read.** Read the deltas for a *producer/consumer* edge before cutting, and keep a producer with its consumer whatever surface the two sit on. A unit whose `Push need` line rides another unit's mid-iteration push is that push's consumer: batch it at or before the push it rides. The set being batched is **every unit the iteration promoted** — every top-level entry in the configured active queue sections, debt units as much as feature units — never the amendment set, which a debt unit carries no `[spec:]` ref to join. Derive the roster from the queue, which is the record of what was promoted, and re-read it rather than carrying a count.
179
+ - **Tier each batch to its work class.** The lead reads the **work-class** labels of the deltas in a batch — via the `[spec:]` amendments the batch's entries point at, where `/spec` emits one `{mechanical | design-bearing}` tag per delta — and tiers the batch by their aggregate. A batch whose deltas are **all mechanical** is **tier-downgradeable**: a cheaper model serves it, and the dispatcher dispatches that batch on the mechanical class: a `model` override naming the class's bound alias, or, where the class is pinned to an exact id, a type whose definition declares that class (delegation-kit/SPEC.md §The tier binding, the pinning limit). A batch carrying **any design-bearing** delta **stays on the judgment tier**. Every cheaper-tier dispatch carries an **escalate-on-discovery** transition. A session that finds it must author a fix, beyond running an oracle or editing a governed record, stops before authoring it. It journals the diagnosis and escalates a re-tier. You rule that alone. Re-dispatch the rest of the work as a same-stage session on the judgment tier, pointed at the journal. Do not resume the paused session. Your ruling-config's escalation roster names the class, so a dispatched session can recognize it. The class's model is the consumer's tier binding where it sets one, read at dispatch time (delegation-kit's `DELEGATION_KIT_TIER_MODEL`; agent-execution.md, same bullet). There is no standing per-stage classification to bind: the batch's labels decide at dispatch time. Re-judge every assignment when the harness model roster churns.
175
180
  - **An intra-stage batch split is the lead's to own.** When a stage's work splits into batches, those batches are **N sibling stage sessions the lead dispatches and verifies** — each entering through `--enter-stage` as a same-stage re-entry (lifecycle-kit/SPEC.md §The state machine: N sessions may enter one stage, each leaving its own stamp and the cursor staying put). A stage session **never dispatches a sibling stage session** (lifecycle-kit/SPEC.md §templates/lead.md owns the ground), and the clause is a dispatched stage's authority to refuse. Read-only fan-outs inside a stage stay sanctioned (the delegation nudge; delegation-kit/templates/agent-execution.md). The batching *criteria* are the shared-surface rule above, unchanged; this adds only the owner — the lead serializes sibling batches that share a surface and may parallelize those that do not, subject to the shared-index discipline.
176
181
  - **Batch escalations.** The decision shape makes batching natural — a stage session collects its open questions and sends them in one turn.
177
182
  - **Split the lead where the tail dominates.** The split posture moves the recurring tail — dispatch, result ingestion, budget verdicts — to the routing tier and concentrates judgment-tier spend where it pays: scope itself, plus one oracle turn per forwarded intent question. Assume the oracle is cold. **The saving is a trade rather than a pure one**: splitting converts the escalations a lead rules **alone off a governed surface** into **relays**, because the routing rule (§The escalation protocol) sends an intent-class question to the oracle or the operator as its first move. A consumer picking a posture measures that trade rather than assuming it away. **How to measure it:** over one iteration, count the escalations the lead ruled alone by reading a governed surface. Near zero and the tail premise covers the whole turn set; consistently several and this limb is live for that posture. The threshold that turns such a count into a decision, and every count taken, are the consumer's — the ruling-config slot's, never this template's.
@@ -14,8 +14,12 @@ Trigger 3 is mechanized at build entry: `check-stage-entry` assertion C blocks t
14
14
 
15
15
  **A sweep is a survey — check the record before you buy one, and file the one you buy.** The audit fan-out above is the most expensive survey any stage dispatches. Before dispatching it, read the survey record and run the witness on any block whose heading already answers your question; afterwards, file the finding a later stage will want. Both halves, and what a passing witness licenses you to cite, are lifecycle-kit/SPEC.md §The survey record.
16
16
 
17
+ **Where your dispatch names a foreign adapter**, this stage's reading runs there and every write stays yours: follow lifecycle-kit/templates/host-protocol.md (lifecycle-kit/SPEC.md §The host protocol).
18
+
17
19
  **Audit the amendment against itself before auditing it against the tree.** Two defects are visible on the amendment alone and both survive a green battery. An author-stated count ("three things and no fourth") is an assertion about the deliverable, so check it against what the deltas actually mandate rather than against the sentence it heads. And every `## Existing sections updated` entry must name the delta that owns it (canon-kit/templates/SPEC-amendment.md).
18
20
 
21
+ **Read every delta for what a user meets.** A delta changing it carries the authoring stage's `{user-facing: …}` mark naming the direction that settles it (lifecycle-kit/templates/stages/spec.md). An unmarked one, or one whose direction does not settle the choice it makes, is an envelope question for the lead or the operator, never one to reword away.
22
+
19
23
  **A claim about an existing program is checked against that program** — a modelled grammar, a check a gate applies, a refusal an arm makes: one invocation, or the implementing line where none is cheap. If the named program lacks the behaviour, find the one that holds it. Run every `**Inferred, not run:**` marker's command, in an amendment or an active queue entry, correct the passage to what it returned and delete the marker, or rewrite it to the cannot-run form.
20
24
 
21
25
  **The `## Existing sections updated` roster is checked from the tree, and the half that stays yours is the larger one.** A roster entry with no delta is visible on the document; a *surface with no entry* is not, because the evidence is in the tree. The **literal-substitution** half of that is mechanized: an amendment declares what it retires in its `## Retired spellings` block and the battery re-runs each declaration against the tracked tree, reconciling every survivor against the roster — so do not hand-grep a replaced literal, run the gate. What is left is the residue no scanner reaches: a stale prose sentence, a semantic over-claim, a cross-reference dangled by a deletion rather than a substitution, and the **renumber** case, where the retired and the replacing spellings are byte-identical and telling a stale citation from a correct one is a reading of the site's subject matter. That case is routed rather than gated — a cross-corpus citation naming its referent instead of its number has no numeric relation left to decay.
@@ -14,7 +14,7 @@ Build runs one fresh session per task. Prefer a session reset at a task boundary
14
14
 
15
15
  *<ritual: your build ritual: pick the first unblocked task; read the spec for every component the task touches and merge its amendments into the canonical spec on completion; implement exactly what the spec describes — no features beyond it; write tests as you go; present a plan for approval before code where your process requires it; name your amendment-merge procedure owner and the queue-entry grammar the task-completion move writes against.>*
16
16
 
17
- Build-time question triage — who rules, and where the ruling lives: a question *within the amendment's envelope* (calibration, mechanics) is ruled in-session and written into the spec text being merged — a ruling that lives only in conversation evaporates. A *change to the envelope* (narrowing or widening asserted behavior, user-facing semantics) stops and surfaces to the user — never pick a "conservative alternative" silently. A *cross-component causal gap* is not a TODO: stop, resolve it this session, update the spec.
17
+ Build-time question triage — who rules, and where the ruling lives: a question *within the amendment's envelope* (calibration, mechanics) is ruled in-session and written into the spec text being merged — a ruling that lives only in conversation evaporates. A *change to the envelope* (narrowing or widening asserted behavior, or user-facing semantics no delta's `{user-facing:}` mark settles) stops and surfaces to the user — never pick a "conservative alternative" silently. A *cross-component causal gap* is not a TODO: stop, resolve it this session, update the spec.
18
18
 
19
19
  **A defect or redundancy you find mid-build owes its catcher** — read the rule body before the fix lands (doctrine-kit/DOCTRINE.md, Enforcement-first).
20
20
 
@@ -24,9 +24,11 @@ Build-time question triage — who rules, and where the ruling lives: a question
24
24
 
25
25
  **An amendment's roster is a floor, never the reach.** Before the merge counts as complete, re-derive every roster it carries (update targets, callers, readers) against the tree. Grep each name the change moves or retires over the tracked tree without silencing stderr. Ask what consumes the changed behaviour without spelling any of those names. Then run the battery and the touched kit's fixture suite. Land every site the roster missed in the same unit as in-envelope work, and name the missed sites in the commit message. Decline a rostered target only when the surface already says what its citing delta needs from it, naming in the commit message the target, that need and the passage that already meets it. A surface lacking what the delta needs, a missing passage included, is a missed site you land in this unit. Never write an edit a met need does not call for, nor drop a target silently.
26
26
 
27
- **Declare what a vendoring consumer will meet, in the unit that lands it.** A unit that lands or tightens a gate, renames or removes a knob, or removes a kit tool or changes what a kit script, template or default does appends one bullet to the matching section of the release declaration surface, `<workflow-dir>/release-declarations.md` (gate-sdk/SPEC.md §upgrade-smoke), in the same commit, written as the release note's bullet: the lead token that section takes, then what moved and what the consumer must do. The surface accumulates across the iterations batched into one release; the release step composes the note from it and drains it at the tag, so nothing here loads the release runbook. Only what ships inside a kit is declared.
27
+ **Declare what a vendoring consumer will meet, in the unit that lands it.** A unit that lands or tightens a gate, renames, removes or adds a knob, changes the gate-authoring contract (the gate library, the descriptor grammar, the skeleton or the runner's member contract), or removes a kit tool or changes what a kit script, template or default does appends one bullet to the matching section of the release declaration surface, `<workflow-dir>/release-declarations.md` (gate-sdk/SPEC.md §upgrade-smoke), in the same commit, written as the release note's bullet: the lead token that section takes, then what moved and what the consumer must do. The surface accumulates across the iterations batched into one release; the release step composes the note from it and drains it at the tag, so nothing here loads the release runbook. Only what ships inside a kit is declared.
28
28
 
29
- **Run the system; don't reason about it** — when a running system is reachable, reproduce first, read second. Recorded evidence rots: a static trace in a task body is a dated hypothesis to re-verify, not a premise. An amendment passage or active queue entry marked `**Inferred, cannot run before build:**` is run as soon as its subject exists, before the delta resting on it lands, and the merge carries what it returned. A change carrying an artifact surface — a change whose real output is a deployed or generated artifact — names that surface and exercises the artifact deployment-faithfully before the stage exits; a green battery is tree-correct, not artifact-correct (Oracle-first). An entry carrying `[observed-by:]`, or whose oracle is a remote run, is complete only when its run is read: after its landing commit, run close's push precondition, push under the entry's `**Push need**` line, wait in-turn for the run, and read it before the Done move (lifecycle-kit/SPEC.md §The state machine). A push no such line names changes the set's push need: escalate it before spending it.
29
+ **Run the system; don't reason about it** — when a running system is reachable, reproduce first, read second. Recorded evidence rots: a static trace in a task body is a dated hypothesis to re-verify, not a premise. An amendment passage or active queue entry marked `**Inferred, cannot run before build:**` is run as soon as its subject exists, before the delta resting on it lands, and the merge carries what it returned. A change carrying an artifact surface — a change whose real output is a deployed or generated artifact — names that surface and exercises the artifact deployment-faithfully before the stage exits; a green battery is tree-correct, not artifact-correct (Oracle-first). An entry carrying `[observed-by:]`, or whose oracle is a remote run, is complete only when its run is read: after its landing commit, run close's push precondition, push under the entry's `**Push need**` line, wait in-turn for the run, and read it before the Done move (lifecycle-kit/SPEC.md §The state machine). A push no such line names, on the entry or in the set record under the iteration header, changes the set's push need: escalate it before spending it.
30
+
31
+ **Where your dispatch names a foreign adapter**, this stage's file changes are made there in `sweep` mode and every lifecycle write stays yours: follow lifecycle-kit/templates/host-protocol.md (lifecycle-kit/SPEC.md §The host protocol).
30
32
 
31
33
  **Then read your successor's entry.** After your last commit, run `--enter-stage --simulate <stage>` for the drain stage, when your batch's Done moves emptied the active sections — a batch that leaves work active skips the read, since that entry refuses on active work by design and the next batch re-enters this stage. It writes nothing (lifecycle-kit/SPEC.md §bin/enter-stage.sh). An exit of 1 relays a refusal: fix one your own work caused and run the read again, and carry any other into your report verbatim.
32
34
 
@@ -1,4 +1,4 @@
1
- The `close` stage of an iteration. Harvest lessons, housekeep, optionally merge. Exit condition: Done and Lessons Learned sections cleared (harvestable lessons promoted first).
1
+ The `close` stage of an iteration. Harvest lessons, housekeep, optionally merge. Exit condition: the Done section cleared, and the Lessons Learned section too where the queue keeps one (harvestable lessons promoted first).
2
2
 
3
3
  **First step — stamp evidence.** Run the lifecycle arm `--enter-stage close` on the gate binary `GATE_SDK_NATIVE_BIN` names: it appends `<iteration> close <session-id> <date> <head>` to `.workflow/WORKFLOW-STATE.txt` (required by `check-stage-evidence`; the stamp proves invocation, not faithful execution), reading `<session-id>` from the `--emit-session-id` arm (the newest transcript — never hand-picked), using `date +%F`, and refusing (writing nothing) if `check-stage-entry` is red. On a refusal, **do not force the entry** — escalate to the lead (where one exists and this is not a standalone session) and stop; a refused entry is a gate verdict to resolve at its source, never to override. That stamp *is* the transition — the last stamp is the stage cursor, so nothing flips and no queue write is involved. Commit the stamp on its own — unless the pre-flight valve admitted this entry, which rewrites the valve ledger in the same motion, so the two commit together (lifecycle-kit/SPEC.md §bin/enter-stage.sh).
4
4
 
@@ -8,20 +8,22 @@ The `close` stage of an iteration. Harvest lessons, housekeep, optionally merge.
8
8
 
9
9
  **The survey record is not a close surface.** It carries no disposition obligation and blocks no boundary — the next first-stage entry truncates it, and that is the whole reclaim (lifecycle-kit/SPEC.md §The survey record). Close owes it exactly one thing: a survey close *buys* while triaging is filed like any other, so a finding worth an iteration's carry does not die with this session.
10
10
 
11
- 1. **Process Lessons Learned** → durable rules or debt tasks, then clear the section. **Give each entry an explicit disposition before clearing, and stamp it** — one line per entry into `LIFECYCLE_KIT_LESSON_EVIDENCE_FILE` (`<iteration> lesson <kind> <ref> — <lead-line prefix>`), the record `check-lesson-disposition` reads when the entry leaves the queue (the stamp, not the commit body, is the mechanically-decidable evidence — the pre-commit battery has no commit message yet). The disposition set is →rule (name the file + section; prefer a stage-local skill file over an always-loaded doc for a stage-local procedure), →task (name the new slug), →harvest (a lesson carrying a configured harvest tag on its lead line — route its *body* to the sink this skill names for that tag, below), or →discard (state why it needs no durable home — a lesson that is private rule content discards to the consumer's local-only private brief, if one exists, rather than any tracked surface). Clearing is not processing: a lesson naming a concrete *unfixed gap* must become a task, not evaporate. When a lesson claims it was "already filed under <slug>", verify the target task's **body** actually carries the specific finding before dispositioning →task — the slug merely existing is not enough. Gap generalization, per lesson recording drift no check caught: name the check class that should have caught it, then either file the missing check as a deferred task or state in one line why no scanner is buildable — the disposition is not complete without one of the two; read the rule body first (doctrine-kit/DOCTRINE.md, Enforcement-first). Lesson-vs-task litmus (holds at filing time in any stage, not just here): if the deliverable and its done-state are nameable now, it is a task — file it in the deferred section directly, never stage it in Lessons where it waits a stage and risks →discard; Lessons is for observations about how the work should be done, whose durable home (rule vs task vs nothing) genuinely needs this stage's call. *<harvest-routing: harvest routing table: each `QUEUE_KIT_LESSON_TAGS` tag → the sink file its body appends to, plus the sink's reclaim path (a gitignored sink needs a named trigger that empties it — the runtime-artifact lifecycle rule).>*
12
- 2. **Drain the gap inbox** (`LIFECYCLE_KIT_GAP_INBOX_FILE`, §The committed gap inbox) → disposition every `- <date> — <gap>` bullet, then **truncate the inbox to its `# contract:` header**. **Read the drain's inputs first.** Before the first bullet, run `--emit close-surfaces` on the gate binary `GATE_SDK_NATIVE_BIN` names and read each surface the slot below names whose row is not `empty` or `absent`. A fact there bearing on a bullet's claim is that bullet's re-verification input. The surface's own disposition and reclaim stay at step 4. Name the surfaces read in the drain's commit message. *<drain-inputs: the capture surfaces holding facts a gap bullet's re-verification may need (a knowledge-friction capture, say) — never a raw machine log.>* The disposition set, **tried in this order** (§The committed gap inbox owns the order and why): →fix (resolve it inline this session — the default for a debt-shaped bullet), →forward (a bullet only the operator can settle — a ruling, or a direction no stage may give: re-file it with `--emit file-consult`, carrying its prose and its date), →promote (file a deferred queue entry carrying its `[cost:]` and `[surface:]` tags, queue-kit/SPEC.md §The tag algebra — only what →fix does not take), or →discard (state why in the close commit message — the bullet's own prose is the disposition body). The icebox is not a disposition here: it takes deferred entries that aged without recurring, at this stage's eviction step, never a bullet drained today (queue-kit/SPEC.md §The icebox tier). A →promote states in the commit message why →fix and →forward failed; the commit message also states drift-kit's `qnet` figure for the iteration, so the pool's net motion is read at every close rather than discovered at a consult. The date feeds the staleness read (an aged bullet is a signal, not a free pass). Draining is not deleting: a bullet naming a concrete unfixed gap must become a task or a fix, not evaporate — the same clearing-is-not-processing rule as Lessons. **Re-verify before dispositioning.** A bullet's prose is the filer's claim, not an established fact: capture is deliberately frictionless, so nothing upstream checked it and a bullet can assert a mechanism its filer inferred rather than ran. Per bullet, name the claim the disposition turns on and the command that establishes it, run that command, and disposition against what it returned. Record the outcome in the close commit message beside the bullet's disposition — which bullets were re-verified and what fell — so a corrected premise is visible rather than silently absorbed. A claim no cheap command settles is dispositioned *as a claim*: say so, and carry it on the promoted entry as the inferred marker (§templates/stages/; §The committed gap inbox rules why this sits at the drain and not at filing time). The next iteration's first-stage entry refuses a non-empty inbox **when this stage was skipped** (§bin/enter-stage.sh), so an undrained gap blocks the boundary rather than crossing it silently. **A finding your own later steps generate postdates this drain, and it routes to the inbox like any other.** The audits, the lesson disposition, the staleness read and the release disposition all run after this step, so what they turn up has no drainer left in this iteration. File it (`--emit file-gap`) and let it be carried: the next first-stage entry admits it and takes it as that session's intake (§The committed gap inbox). Do **not** back-date it into a drain that has already run — a second pass over an inbox your own later steps keep refilling is the loop that shape was rejected for. **Read the queue's retired citations here too, and this is a command you run rather than a file you already have open.** The drain works from `LIFECYCLE_KIT_GAP_INBOX_FILE`, so nothing in this step has touched the queue yet: invoke queue-kit's inbound-citation arm over the queue file (queue-kit/SPEC.md §The queue-edges arm) and read its **retired** block. Each entry there cites a slug that was once live and is not now — a directional pointer at work that has been disposed of, indistinguishable from a live pointer to any reader who did not run this. It is a finding, never a violation: the correction is inline on the citing entry, in this session, the way every attested instance was fixed. A row the arm marks `name live at <path>` is **not** in that set: its citations point at mechanism the tree still carries. Skip it, and spend the step on the rows left. This is the corrective transition for the class; scope's ranking survey is the other reader, and it reads the same block to a different end. **Judge the recurrence, in addition to the disposition — you are the judge, and nothing upstream ruled.** That framing is the **general** contract rather than this stage's local one — every session that judges a recurrence is obliged to stamp it, and this drain is only its mechanized instance (§The committed gap inbox owns the rule and what a stamp outside a drain owes instead). Your obligation here is undiminished by that reach. A slug appearing in a bullet is an *input*, never a verdict; the question is whether the finding **re-occurred** or is merely being cited, corrected, or argued against, and the bullet's prose is your grounds (the filer was asked at capture to write the claim there). State the call in the close commit message beside the bullet's disposition — a **declined** match stated as explicitly as a stamped one, since an unstated decline is indistinguishable from an unread bullet. On a judged recurrence, stamp it with `--queue recur <slug> <bullet-date>`, **in this same queue-writing commit** — never *instead of* the bullet's own disposition. That same-commit rule is load-bearing rather than housekeeping: the declaration is no longer re-derivable, so this commit *is* the audit artifact, carrying the judgment beside the prose it was made from. It is idempotent per (slug, date): a slug already carrying today's date gains nothing. A slug that resolves only in the done section is not a recurrence — the finding recurred after its fix landed, which is a new defect, and it files as one.
11
+ 1. **Process Lessons Learned** → durable rules or debt tasks, then clear the section. A queue keeping no such section skips this step. **Give each entry an explicit disposition before clearing, and stamp it** — one line per entry into `LIFECYCLE_KIT_LESSON_EVIDENCE_FILE` (`<iteration> lesson <kind> <ref> — <lead-line prefix>`), the record `check-lesson-disposition` reads when the entry leaves the queue (the stamp, not the commit body, is the mechanically-decidable evidence — the pre-commit battery has no commit message yet). The disposition set is →rule (name the file + section; prefer a stage-local skill file over an always-loaded doc for a stage-local procedure), →task (name the new slug), →harvest (a lesson carrying a configured harvest tag on its lead line — route its *body* to the sink this skill names for that tag, below), or →discard (state why it needs no durable home — a lesson that is private rule content discards to the consumer's local-only private brief, if one exists, rather than any tracked surface). Clearing is not processing: a lesson naming a concrete *unfixed gap* must become a task, not evaporate. When a lesson claims it was "already filed under <slug>", verify the target task's **body** actually carries the specific finding before dispositioning →task — the slug merely existing is not enough. Gap generalization, per lesson recording drift no check caught: name the check class that should have caught it, then either file the missing check as a deferred task or state in one line why no scanner is buildable — the disposition is not complete without one of the two; read the rule body first (doctrine-kit/DOCTRINE.md, Enforcement-first). Lesson-vs-task litmus (holds at filing time in any stage, not just here): if the deliverable and its done-state are nameable now, it is a task — file it in the deferred section directly, never stage it in Lessons where it waits a stage and risks →discard; Lessons is for observations about how the work should be done, whose durable home (rule vs task vs nothing) genuinely needs this stage's call. *<harvest-routing: harvest routing table: each `QUEUE_KIT_LESSON_TAGS` tag → the sink file its body appends to, plus the sink's reclaim path (a gitignored sink needs a named trigger that empties it — the runtime-artifact lifecycle rule).>*
12
+ 2. **Drain the gap inbox** (`LIFECYCLE_KIT_GAP_INBOX_FILE`, §The committed gap inbox) → disposition every `- <date> — <gap>` bullet, then **truncate the inbox to its `# contract:` header**. **Read the drain's inputs first.** Before the first bullet, run `--emit close-surfaces` on the gate binary `GATE_SDK_NATIVE_BIN` names and read each surface the slot below names whose row is not `empty` or `absent`. A fact there bearing on a bullet's claim is that bullet's re-verification input. The surface's own disposition and reclaim stay at step 4. Name the surfaces read in the drain's commit message. *<drain-inputs: the capture surfaces holding facts a gap bullet's re-verification may need (a knowledge-friction capture, say) — never a raw machine log.>* The disposition set, **tried in this order** (§The committed gap inbox owns the order and why): →fix (resolve it inline this session — the default for a debt-shaped bullet), →forward (a bullet of a consult class, a ruling to reconsider or a question the operator asked to have advised on: re-file it with `--emit file-consult`, carrying its prose and its date; a bullet asking the operator for a direction no stage may give is asked instead, through the lead where one is live and directly where the operator runs this session, and one the operator defers is re-filed with `--emit file-gap` after this step's truncation, for the next intake), →promote (file a deferred queue entry carrying its `[cost:]` and `[surface:]` tags, queue-kit/SPEC.md §The tag algebra, and a `Filed` line naming the date and the filer and no route, queue-kit/SPEC.md §The queue format — only what →fix does not take), or →discard (state why in the close commit message — the bullet's own prose is the disposition body — and append its record to `LIFECYCLE_KIT_DISPOSED_FILE`, or cite the record it matched whose ground still holds). The icebox is not a disposition here: it takes deferred entries that aged without recurring, at this stage's eviction step, never a bullet drained today (queue-kit/SPEC.md §The icebox tier). A →promote states in the commit message why →fix and →forward failed; the commit message also states drift-kit's `qnet` figure for the iteration, so the pool's net motion is read at every close rather than discovered at a consult. The date feeds the staleness read (an aged bullet is a signal, not a free pass). Draining is not deleting: a bullet naming a concrete unfixed gap must become a task or a fix, not evaporate — the same clearing-is-not-processing rule as Lessons. **Re-verify before dispositioning.** A bullet's prose is the filer's claim, not an established fact: capture is deliberately frictionless, so nothing upstream checked it and a bullet can assert a mechanism its filer inferred rather than ran. Per bullet, name the claim the disposition turns on and the command that establishes it, run that command, and disposition against what it returned. Record the outcome in the close commit message beside the bullet's disposition — which bullets were re-verified and what fell — so a corrected premise is visible rather than silently absorbed. A bullet matching a disposed-findings record re-verifies that record's ground; a ground that fell takes the bullet through the ordinary dispositions and deletes the record in this commit. A claim no cheap command settles is dispositioned *as a claim*: say so, and carry it on the promoted entry as the inferred marker (§templates/stages/; §The committed gap inbox rules why this sits at the drain and not at filing time). The next iteration's first-stage entry refuses a non-empty inbox **when this stage was skipped** (§bin/enter-stage.sh), so an undrained gap blocks the boundary rather than crossing it silently. **A finding your own later steps generate postdates this drain, and it routes to the inbox like any other.** File it (`--emit file-gap`) and let it be carried: the next first-stage entry admits it and takes it as that session's intake (§The committed gap inbox). Do **not** back-date it into a drain that has already run. **Read the queue's retired citations here too, and this is a command you run rather than a file you already have open.** The drain works from `LIFECYCLE_KIT_GAP_INBOX_FILE`, so nothing in this step has touched the queue yet: invoke queue-kit's inbound-citation arm over the queue file (queue-kit/SPEC.md §The queue-edges arm) and read its **retired** block. Each entry there cites a slug that was once live and is not now — a directional pointer at work that has been disposed of, indistinguishable from a live pointer to any reader who did not run this. It is a finding, never a violation: the correction is inline on the citing entry, in this session, the way every attested instance was fixed. A row the arm marks `name live at <path>` is **not** in that set: its citations point at mechanism the tree still carries. Skip it, and spend the step on the rows left. This is the corrective transition for the class; scope's ranking survey is the other reader, and it reads the same block to a different end. **Judge the recurrence, in addition to the disposition — you are the judge, and nothing upstream ruled.** That framing is the **general** contract rather than this stage's local one — every session that judges a recurrence is obliged to stamp it, and this drain is only its mechanized instance (§The committed gap inbox owns the rule and what a stamp outside a drain owes instead). Your obligation here is undiminished by that reach. A slug appearing in a bullet is an *input*, never a verdict; the question is whether the finding **re-occurred** or is merely being cited, corrected, or argued against, and the bullet's prose is your grounds (the filer was asked at capture to write the claim there). State the call in the close commit message beside the bullet's disposition — a **declined** match stated as explicitly as a stamped one, since an unstated decline is indistinguishable from an unread bullet. On a judged recurrence, stamp it with `--queue recur <slug> <bullet-date>`, **in this same queue-writing commit** — never *instead of* the bullet's own disposition. That same-commit rule is load-bearing rather than housekeeping: the declaration is no longer re-derivable, so this commit *is* the audit artifact, carrying the judgment beside the prose it was made from. It is idempotent per (slug, date): a slug already carrying today's date gains nothing. A slug that resolves only in the done section is not a recurrence — the finding recurred after its fix landed, which is a new defect, and it files as one.
13
13
  3. **Disposition the pre-flight valve ledger** — every line of the closing iteration, in this session. A `used` line means an entry of this iteration was admitted past a refusing pre-flight: **file the blocking task its reason names and land the baseline row that names that task**, carrying the reason's `reproduces-at=<rev>` commit onto that row where evidence-kit/SPEC.md §check-evidence-baseline's flip assertion binds it, so the next iteration's pre-flight passes without a valve. Inline the finding into the filed task rather than pointing it at the ledger — the ledger dies at the next boundary, so a pointer would resolve to nothing. A residual `armed` line is dispositioned with the same weight: a session expected a refusal that never came, or armed the wrong stage, and either is worth one stated line rather than a quiet truncation. A header-only ledger is a clean disposition and says so in one line. The valve's own contract, including why a second reach in one iteration is the failure: lifecycle-kit/SPEC.md §bin/enter-stage.sh.
14
14
  4. **Sweep the inbound triage surfaces** — run `--emit close-surfaces` on the gate binary `GATE_SDK_NATIVE_BIN` names and disposition every row (§The close-surface roster). The roster is derived, not enumerated here or in the binding below: a `forced=` row has a structural forcing function and cannot be skipped silently; an `advisory` row may be skipped, but the skip is a judgment to state, not an omission to leave invisible. An `(undeclared)` row is a capture surface nobody declared: file the missing declaration. A row's state is read too: `empty` is a clean read to state, and `absent` is a finding — nothing ever wrote the surface or its writer is gone, so confirm the writer or file the gap. A row whose `<tracking>` is not `tracked` is read by you, never by an isolated agent, which sees only committed state (delegation-kit/templates/agent-execution.md, isolation cost 3). *<housekeeping: your housekeeping sweeps beyond the roster: deprecation scan, gate-runtime budget check, backlog-aging / premise-rot review, and the per-surface triage procedures the roster's rows route to.>*
15
- 5. **Retire what this iteration's landings mooted, then clear Done.** The inputs are the done section's slugs and the iteration's commit range. The range runs from the head recorded on the first-stage stamp (the first data line of `.workflow/WORKFLOW-STATE.txt`) to HEAD. Derive the candidates rather than recalling them: (a) the live entries citing a done slug, which are the retired-block rows for those slugs in the inbound-citation output step 2 already produced; (b) the live entries naming a path the range deleted (`git diff --name-only --diff-filter=D`); (c) the live entries citing a markdown heading the range removed from a file it kept (`git diff --diff-filter=M` over `*.md`, its removed heading lines). Read each candidate against the landing it cites. An entry whose question the landing answered, or whose referent it removed, moves with `--queue done <slug>` in this stage's queue commit, and that commit's message names, per moved slug, the landing that mooted it. A `[roadmap:]` entry is outside every exit (queue-kit/SPEC.md §The icebox tier) and stays. **Then read the roadmap's motion.** Run `--emit roadmap` over the queue file as it stood at the range's start (`git show <start>:<queue-file>` into the scratch dir, passed as the arm's operand) and over the queue file now. Where the arm exits 2 for want of a configured horizon, skip the read. File one consult-owed item with `--emit file-consult` naming every slug the first output lists and the second does not, and one when the first configured horizon holds no bullet now, unless an item already in the consult inbox names it. Re-tag nothing: a consultation sets the direction. A candidate still open stays too, with any stale pointer in it corrected inline, the way step 2's retired-citation read corrects one. Before moving an entry, relocate anything in its body worth more than the entry to the surface that owns it, because the done line keeps only the slug. Run the battery before committing. A red naming a moved slug is a pointer the move stranded, and it is corrected in that same commit. Then clear Done with `--queue clear-done`. Why the sweep sits here and not in build, and the moots its candidates cannot reach: lifecycle-kit/SPEC.md §templates/stages/.
15
+ 5. **Retire what this iteration's landings mooted, then clear Done.** The inputs are the done section's slugs and the iteration's commit range. The range runs from the head recorded on the first-stage stamp (the first data line of `.workflow/WORKFLOW-STATE.txt`) to HEAD. Derive the candidates rather than recalling them: (a) the live entries citing a done slug, which are the retired-block rows for those slugs in the inbound-citation output step 2 already produced; (b) the live entries naming a path the range deleted (`git diff --name-only --diff-filter=D`); (c) the live entries citing a markdown heading the range removed from a file it kept (`git diff --diff-filter=M` over `*.md`, its removed heading lines). Read each candidate against the landing it cites. An entry whose question the landing answered, or whose referent it removed, moves with `--queue done <slug>` in this stage's queue commit, and that commit's message names, per moved slug, the landing that mooted it. A `[roadmap:]` entry is outside every exit (queue-kit/SPEC.md §The icebox tier) and stays. **Then read the roadmap's motion.** Run `--emit roadmap` over the queue file as it stood at the range's start (`git show <start>:<queue-file>` into the scratch dir, passed as the arm's operand) and over the queue file now. Where the arm exits 2 for want of a configured horizon, skip the read. Ask the operator, as step 2 asks a direction question, about every slug the first output lists and the second does not, and about a first configured horizon holding no bullet now, unless step 2 already asked it. Then run `--emit roadmap-lag` over the queue file (queue-kit/SPEC.md §The roadmap-lag arm). Each row is an entry outside the first configured horizon, or untagged, under which a split slice landed this iteration. Read each `[roadmap:]` entry's recorded horizon condition, the arm's rows first, and re-tag one the range met in this stage's queue commit, regenerating the projection and naming the condition and the landing that met it. A row no recorded condition settles is one more finding of the motion read, routed with its others. Re-tag nothing else: the operator sets new direction. A candidate still open stays too, with any stale pointer in it corrected inline, the way step 2's retired-citation read corrects one. Before moving an entry, relocate anything in its body worth more than the entry to the surface that owns it, because the done line keeps only the slug. Run the battery before committing. A red naming a moved slug is a pointer the move stranded, and it is corrected in that same commit. Then clear Done with `--queue clear-done`. Why the sweep sits here and not in build, and the moots its candidates cannot reach: lifecycle-kit/SPEC.md §templates/stages/.
16
16
  6. Review top-level docs for staleness (*is it still true?*). Same gap-generalization obligation as step 1, per staleness actually found: name the check class that should have caught it, and file the missing check as a deferred task or state in one line why no scanner is buildable — a silent fix forfeits the check.
17
17
  7. **Repair the ruling record** — read it for aged facts and fired discharge conditions, and repair what its own contract puts in this session's hands. The record grants the authority and states the boundary; this step only adds the obligation to look, so read the boundary there rather than from a restatement here. A repair is **fix-shaped by the drain's own litmus** and needs no new criterion — it adds no governed name and lands test-and-doc- complete in this session's own commit — so a two-word correction is not routed through a deferred entry. The record is a declared row on the close-surface roster (§The close-surface roster), so a consumer that configures none sees this step skip rather than fail, and the probe that reports fired conditions, undeclared ones and the citing sites is lifecycle-kit/SPEC.md §The ruling-staleness probe. It lands here, beside the staleness read, and not in the brevity pass: a repair asks *is it still true?* exactly, and running it under a pass whose licence is compression would put a correction inside a step licensed to delete. **One discharge this step records rather than repairs:** where an operator directive was discharged by **falsification** — the premise it rested on measured false rather than the work being done — that discharge is recorded on the record as a closed-ruling line, because it leaves no landed unit and no queue trace, so a later session reading only the directive re-derives the whole investigation.
18
- 8. **Review the audit roster**, where `LIFECYCLE_KIT_AUDIT_ROSTER_FILE` names one (lifecycle-kit/SPEC.md §The audit roster). Per class block, judge which `due:` events fired since `last:` (a `last:` naming another stage is a pre-stamp, so unreviewed), then perform each due audit or defer it as a costed filing. Per audit: derive the corpus from `scope:` and the range it names (this iteration's range unless `scope:` names another base); the predecessor's `corpus:` is a floor; triage every hit; **replace** `last:`, `corpus:`, `hits:` and `declined:`; fold a reading that changes the next sweep into `scope:` by re-phrasing. Narration and findings go in the commit message, never on the roster.
18
+ 8. **Review the audit roster**, where `LIFECYCLE_KIT_AUDIT_ROSTER_FILE` names one (lifecycle-kit/SPEC.md §The audit roster). Per class block, judge which `due:` events fired since `last:` (a `last:` naming another stage is a pre-stamp, so unreviewed), then perform each due audit, skip with notice one whose sweep runs on an executor outside this session that is unavailable or unauthorized (lifecycle-kit/SPEC.md §The audit roster), or defer it as a costed filing. Per audit: derive the corpus from `scope:` and the range it names (this iteration's range unless `scope:` names another base); the predecessor's `corpus:` is a floor; triage every hit; **replace** `last:`, `corpus:`, `hits:` and `declined:`; fold a reading that changes the next sweep into `scope:` by re-phrasing. Narration and findings go in the commit message, never on the roster.
19
19
  9. **Runtime-artifact lifecycle check** — any gitignored/runtime artifact introduced this iteration (log, cache, scratch dir) has a named cleanup trigger: a write-path needs a paired reclaim-path. For a workflow-directory artifact the roster already answers it: the `reclaim=` field is that named trigger, and `check-close-surfaces` blocks a capture-tier declaration without one. What stays a judgment here is the artifact *outside* that directory.
20
- 10. **Release disposition** — run after the surface-mutating steps above and **before** the brevity pass (the disposition note is itself such a write). Every close dispositions the iteration at the release boundary: read the consumer's release policy (the `release-policy` slot below) and either execute its release procedure or stamp an explicit no-release line. Silence is not a disposition — a close that says nothing about release is incomplete. Stamp one line into the consumer-named disposition-evidence file: `<iteration> release <version|none|deferred:<version>> — <one-line basis>` (the `check-lesson-disposition` contract shape at the release boundary, the same lineage release-sweep's stamp follows) — `<version>` is the tag applied, `none` states the both-None (or consumer-equivalent) outcome, and `deferred:<version>` records criteria that were met while the release was held back, flooring the next qualifying note at that version. A consumer's release policy may make deferral the default disposition, so this third form is the common one under such a policy rather than an exception. Ordering: a tag names a commit, so the tag-and-host-release half of the procedure runs *after* the iteration's final commit lands; the note-authoring and stamp halves ride the close commits themselves. *<release-policy: the consumer's release procedure and criteria source by citation, the disposition-evidence path, and any boundary-only sub-procedures (e.g. a major-only deprecation sweep); or a plain "no release process — every iteration stamps none" line for a consumer without one.>*
20
+ 10. **Release disposition** — run after the surface-mutating steps above and **before** the brevity pass (the disposition note is itself such a write). Every close dispositions the iteration at the release boundary: read the consumer's release policy (the `release-policy` slot below) and either execute its release procedure or stamp an explicit no-release line. Silence is not a disposition — a close that says nothing about release is incomplete. Stamp one line into the consumer-named disposition-evidence file: `<iteration> release <version|none|deferred:<version>> — <one-line basis>` (the `check-lesson-disposition` contract shape at the release boundary, the same lineage release-sweep's stamp follows) — `<version>` is the tag applied, `none` states the both-None (or consumer-equivalent) outcome, and `deferred:<version>` records criteria that were met while the release was held back, flooring the next qualifying note at that version. A consumer's release policy may make deferral the default disposition, so this third form is the common one under such a policy rather than an exception. Ordering: the tag names the stamp commit, so the procedure's tag-and-host-release half runs after it lands; the note and stamp halves ride the close commits, and what follows the tag is the consumer's. *<release-policy: the consumer's release procedure and criteria source by citation, the disposition-evidence path, and any boundary-only sub-procedures (e.g. a major-only deprecation sweep); or a plain "no release process — every iteration stamps none" line for a consumer without one.>*
21
21
  11. **Brevity pass on every governed prose file** — run this **last**, after every surface-mutating step above. Scope by principle, not a fixed list: every surface injected into each agent session, and every file that grew since the last close. Staleness asks *is it still true?*; brevity asks *is each block worth its cost at every read?* — reword/delete over annotating; outdated context goes to git history. No file is exempt: an on-demand file pays at every open, and one a stage opens each iteration is always-loaded in effect.
22
22
  12. **Optionally merge** — an iteration can close without merging if validate is incomplete or a follow-up iteration is planned.
23
23
  13. **The push precondition — select the writing identity, immediately before each push.** Any push this stage makes runs the consumer's identity precondition first, and that holds for the *ordinary* close push and not only for a release. It is **per-push, never per-session**: a session that pushes twice runs it twice. Where the consumer keeps its account and transport mechanics outside the tree, the release procedure's pointer to that local runbook is the one to follow here too, rather than a second formulation. **No gate substitutes for this.** The closing push is counted in every push need the scope stage states, so it is spent without an ask of its own; the budget's hotfix allowance still governs a red push. *<push-budget: how many pushes this consumer's iteration may spend, how many hotfix pushes a red push earns before the operator is asked, and the remote run a push is watched to — or a plain "no remote — nothing is pushed" line.>*
24
24
 
25
+ **Where your dispatch names a foreign adapter**, this stage's reading runs there and every write stays yours: follow lifecycle-kit/templates/host-protocol.md (lifecycle-kit/SPEC.md §The host protocol).
26
+
25
27
  **Then read your successor's entry.** After your last commit, run `--enter-stage --simulate <stage>` for the roster's first stage, whose iteration-boundary checks read what this close leaves. It writes nothing (lifecycle-kit/SPEC.md §bin/enter-stage.sh). An exit of 1 relays a refusal: fix one your own work caused and run the read again, and carry any other into your report verbatim.
26
28
 
27
29
  **Last step — the resume journal.** This stage's exit artifact is the resume journal the `--enter-stage` arm named at the stamp; its path is a derivation (lifecycle-kit/SPEC.md §The state machine) and its contract is delegation-kit/SPEC.md §Resume journal — agent writes, scratch reset sweeps. Append `DONE` as the file's last line before you report.
@@ -2,7 +2,7 @@ The `scope` stage of an iteration — the exploratory half of design. Identify a
2
2
 
3
3
  **First step — reset + stamp evidence.** Run the lifecycle arm `--enter-stage scope` on the gate binary `GATE_SDK_NATIVE_BIN` names. `scope` is the iteration boundary, so the tool *resets* the evidence file: it truncates `.workflow/WORKFLOW-STATE.txt` back to its header (dropping the prior iteration's stamps — git history is the permanent audit trail; the gates only ever read the current iteration), stamps `— scope <session-id> <date> <head>` under the unnamed-iteration sentinel, and sets the queue header to `## Iteration: —`. It reads `<session-id>` from the `--emit-session-id` arm itself (the newest transcript — never hand-picked), uses `date +%F`, and refuses (writing nothing) if `check-stage-entry` is red. On a refusal, **do not force the entry** — escalate to the lead (where one exists and this is not a standalone session) and stop; a refused entry is a gate verdict to resolve at its source, never to override. *<evidence-reset: reset any per-iteration evidence file your validate stage writes that the tool does not already truncate — the tool truncates WORKFLOW-STATE, the lesson-evidence file, and every `LIFECYCLE_KIT_BOUNDARY_TRUNCATE` member, in the same commit as this stamp.>* A new iteration stays `—` until this skill names it (below); only `scope` resets, later stages append. Honest limit: the stamp proves the skill was *invoked*, not that the work was done faithfully — it forces deliberate invocation and an audit trail, nothing more.
4
4
 
5
- **Second step — take the carried gap bullets, if the entry reported any.** The entry admits a boundary whose gap inbox holds bullets the closing stage could not have drained, and prints them as an advisory naming them this session's intake (lifecycle-kit/SPEC.md §The committed gap inbox owns why it admits rather than refuses). Each carried bullet gets **exactly one** disposition — promoted to a queue entry after the owner lookup (lifecycle-kit/SPEC.md §The committed gap inbox), fixed inline this session, forwarded to the consult inbox (`--emit file-consult`), or discarded with cause in the commit message — after which this session truncates the inbox to its `# contract:` header **in the same commit**. That is the drain's own disposition set, run by the stage that can now legally run it; no linked-and-skipped middle state, per the gap-disposition rule, and deleting a bullet without a disposition is not a drain. Two properties are obliged rather than suggested. The disposition happens **after the stamp**, in-stage — that is the whole point of admitting the entry, since a pre-stamp queue write is attributed to a stage that has not started. And a promoted entry's provenance sentence carries the **bullet's own date** and names the iteration whose close generated it, because the finding's disposition lands in this iteration's ledger while the finding belongs to the last one; a record that is late and says so is what that trade buys.
5
+ **Second step — take the carried gap bullets, if the entry reported any.** The entry admits a boundary whose gap inbox holds bullets the closing stage could not have drained, and prints them as an advisory naming them this session's intake (lifecycle-kit/SPEC.md §The committed gap inbox owns why it admits rather than refuses). Each carried bullet gets **exactly one** disposition — promoted to a queue entry after the owner lookup (lifecycle-kit/SPEC.md §The committed gap inbox), fixed inline this session, forwarded to the consult inbox (`--emit file-consult`) when it is of a consult class, asked in this session's escalation when it asks the operator for a direction and re-filed with `--emit file-gap` if the operator defers it again, or discarded with cause in the commit message, its record appended to the disposed-findings record or the matching record cited (lifecycle-kit/SPEC.md §The committed gap inbox) — after which this session truncates the inbox to its `# contract:` header **in the same commit**. That is the drain's own disposition set, run by the stage that can now legally run it; no linked-and-skipped middle state, per the gap-disposition rule, and deleting a bullet without a disposition is not a drain. Two properties are obliged rather than suggested. The disposition happens **after the stamp**, in-stage — that is the whole point of admitting the entry, since a pre-stamp queue write is attributed to a stage that has not started. And a promoted entry's provenance sentence carries the **bullet's own date** and names the iteration whose close generated it, because the finding's disposition lands in this iteration's ledger while the finding belongs to the last one; a record that is late and says so is what that trade buys.
6
6
 
7
7
  ## Session ritual
8
8
 
@@ -12,6 +12,8 @@ The `scope` stage of an iteration — the exploratory half of design. Identify a
12
12
 
13
13
  **Read each promoted entry's `[observed-by: <producer>]` and take one of two branches.** The tag says the entry's completion predicate is an observation of a remote run rather than a tree state (queue-kit/SPEC.md §The tag algebra), and this stage is the `<producer>` field's only reader. If a **mid-iteration push** produces that run, the push-placement rule governs (lifecycle-kit/SPEC.md §The state machine), the observation arrives in time to be drained, and the push counts toward the set's push need (below). If **only a release run** produces it, the placement is unsatisfiable — a release run is tag-triggered, so no mid-iteration push can fire it — and the entry **splits here**: promote the produce half now and file the observe half deferred, carrying the producer name, so the next iteration's first act is reading a run that already exists. Split at promotion rather than later because this is the one moment the unit set is bounded and the one session that may write the queue.
14
14
 
15
+ **An entry whose remaining work runs at the drain stage or later is never promoted untagged**, since that stage's entry refuses it (lifecycle-kit/SPEC.md §check-stage-entry, assertion B). Tag it `[drain-exempt: <reason>]` where the drain stage moves it; otherwise keep it deferred and land the obligation in the set record.
16
+
15
17
  **A standing directive is a theme, not a unit list.** A directive received from a lead or operator at iteration open bounds this survey — it names the theme, never the units. The intake sweep and the premise re-verification run regardless, and the proposed unit set is escalated for ruling before promotion: to the lead under the split posture, to the user directly under none — the stage's ordinary stop. The destination changes; the proposal step does not.
16
18
 
17
19
  A **deferred** entry whose recurrence count has reached `LIFECYCLE_KIT_RECURRENCE_THRESHOLD` enters the proposed unit set **regardless of theme**, and rides that same escalation. The directive still bounds the survey; what it may no longer do is silently outrank a counted recurrence. The count is the number of dates on the entry's `[recurrence:]` array (queue-kit/SPEC.md §The tag algebra) — one anchored grep over the deferred section, no tool and no queue-kit dependency. Each of those dates is a **judged** recurrence, stamped by a session that read the grounds rather than derived from a string match, so a count reaching the threshold is a signal to act on rather than a number to sanity-check first. It is scoped to deferred entries because promotion is the decision it forces; an entry already active is being built. **The collision is decided, not resolved in the theme's favour**: the rule does not promote, it puts the unit in front of the authority this stage already escalates to. A decline of such an entry is written on the entry, with its date and who ruled it. An entry already declined twice is escalated as operator-routed: a third threshold recurrence routes to the operator, not to a third decline (lifecycle-kit/SPEC.md §templates/stages/).
@@ -32,7 +34,7 @@ That re-verifies the entry's *own* claims — which is the half a survey already
32
34
 
33
35
  **Then test each shortlisted candidate for supersession, which no citation records.** Take the names its deliverable edits (its gate, knob, file or convention), grep the deferred pool and the icebox for entries whose deliverable replaces, removes or re-conventions one of them, and read each hit. Rule each pairing **mooted** (the other entry's landing removes the need: rank that entry instead, or bundle the two), **reshaped** (the fix changes shape once the other lands: say which goes first) or **independent**. The unit-set escalation's Recommendation carries one line per non-independent pairing, `Supersession: <candidate> — <mooted|reshaped> by <entry>`, or `Supersession: none — <names searched>` when nothing paired (lifecycle-kit/SPEC.md §templates/stages/).
34
36
 
35
- **Count the set's pushes before it is ruled.** The unit-set escalation's Recommendation also carries one line, `Push need: <n> against <b> — <unit>: <why>; …`. `<b>` is the budget the consumer's closing-stage binding fills its `push-budget` slot with. `<n>` is the closing push plus one mid-iteration push per unit whose completion reads a remote run: each `[observed-by:]` entry, and each unit whose change a remote run executes before any local run can — code for a host no local run reaches, or new assertions on a binding leg. Name the units one batch's push could serve. The line is unconditional: a set needing only the closing push says so, and a binding that pushes nothing makes it `Push need: none — no remote`. Where `<n>` exceeds `<b>`, Options also offer the cut that fits. Ruling the set rules its need: on each push-needing entry, land `**Push need (<date>, <grant>):** <the push it spends and why>`, where `<grant>` is `inside the budget` or the party that ruled the overrun.
37
+ **Count the set's pushes before it is ruled.** The unit-set escalation's Recommendation also carries one line, `Push need: <n> against <b> — <unit>: <why>; …`. `<b>` is the budget the consumer's closing-stage binding fills its `push-budget` slot with. `<n>` is the closing push plus one mid-iteration push per unit whose completion reads a remote run: each `[observed-by:]` entry, and each unit whose change a remote run executes before any local run can — code for a host no local run reaches, or new assertions on a binding leg. Name the units one batch's push could serve. The line is unconditional: a set needing only the closing push says so, and a binding that pushes nothing makes it `Push need: none — no remote`. Where `<n>` exceeds `<b>`, Options also offer the cut that fits. Ruling the set rules its need: on each push-needing entry, land `**Push need (<date>, <grant>):** <the push it spends and why>`, where `<grant>` is `inside the budget` or the party that ruled the overrun. A push no one entry's landing spends, and every other record ruling the set as a whole — the ruling on the set, a grant spanning it — lands in the set record under the iteration header, never on an entry (lifecycle-kit/SPEC.md §The state machine).
36
38
 
37
39
  When done, **set the iteration name without waiting for confirmation** and inform the user: run `--enter-stage --rename <name>` on the gate binary `GATE_SDK_NATIVE_BIN` names, which writes both surfaces — the queue header and column 1 of every stamp — in one motion and names them for the one commit they ride in. Never edit either by hand: `check-stage-evidence` requires every stamp's iteration to match the header's, and the state file has one sanctioned writer. The header carries the *name axis alone* — there is no stage field to set, and no stage field to advance. The *arriving* stage's skill moves the cursor by stamping, as that skill's first step. Invoking the next skill is the stage-advance approval (the name itself needs none).
38
40
 
@@ -40,6 +42,8 @@ Close by **recommending the next stage**: where the roster splits out a dedicate
40
42
 
41
43
  With this stage's promotion commit landed (debt, plus the features only where scope authored them), the iteration named, and the next stage recommended, present the consumer's **hand-off** — how this consumer carries a closed scope into the remaining stages: *<handoff: the consumer's start-sequence choice at this boundary — driving the rest under a lead versus steering the stages by hand, or a plain "no lead — run the stages by hand" line for a lead-less or harness-less consumer; point at the consumer's documented start sequence by citation, never restating its steps here>*.
42
44
 
45
+ **Where your dispatch names a foreign adapter**, this stage's reading runs there and every write stays yours: follow lifecycle-kit/templates/host-protocol.md (lifecycle-kit/SPEC.md §The host protocol).
46
+
43
47
  **Then read your successor's entry.** After your last commit, run `--enter-stage --simulate <stage>` for the stage you recommended. It writes nothing (lifecycle-kit/SPEC.md §bin/enter-stage.sh). An exit of 1 relays a refusal: fix one your own work caused and run the read again, and carry any other into your report verbatim.
44
48
 
45
49
  **Last step — the resume journal.** This stage's exit artifact is the resume journal the `--enter-stage` arm named at the stamp; its path is a derivation (lifecycle-kit/SPEC.md §The state machine) and its contract is delegation-kit/SPEC.md §Resume journal — agent writes, scratch reset sweeps. Append `DONE` as the file's last line before you report.
@@ -24,6 +24,8 @@ Because this is a **fresh session** — a fresh prompt cache, on the tier the le
24
24
 
25
25
  **Label every delta with its work class.** In the amendment's §What changes, every delta carries a **work-class** tag — either **mechanical** or **design-bearing** — written **inline, at the end of the delta's own lead sentence**, never collected into a separate roster at the section's head or foot. A delta is **mechanical** when executing it demands only oracle-running — running a fixed verification battery, a rename/merge sweep, a mechanical pin — with low generative judgment. It is **design-bearing** when executing it demands generative or verificational judgment — authoring a contract, a cross-spec audit, a non-obvious implementation. The label records what the delta *demands*, never a model name. The two values apply delegation-kit's unit-shape distinction (`templates/agent-execution.md`, "Match the dispatched model and effort to the unit's shape" — a read-heavy or mechanical unit rides a cheaper model class; a unit carrying design judgment stays on the supervisor's class) at authoring time. The label's one reader is the lead's per-batch tier decision (`lead.md` §Economics), which reads the labels of a batch's deltas at batch-cut time.
26
26
 
27
+ **Mark a delta that changes what a user meets, and settle it before you commit.** A delta is **user-facing** when it changes what an adopter or a reader of the consumer's published surfaces meets beyond the wording of its prose: a command's output, exit or default, a name they type or read, what an install or a hook does, or what a published page reaches or is labelled. The work-class tag does not answer this, so a `{mechanical}` delta can be user-facing. Such a delta carries `{user-facing: <direction>}` beside its work-class tag, naming the recorded direction that settles the choice — on its queue entry, or one the operator gives now. Where none settles it, it is an envelope question: escalate it to the lead where one is live, else ask the operator, and write the answer into the mark before you commit the amendment.
28
+
27
29
  **Writing the amendment *is* promoting the deferred entry.** Promote the feature entry with `--queue promote <slug> <section> --spec <ref>`, which lands its `[spec: <ref>]` ref, and commit it with the amendment file itself in **one commit**, satisfying canon-kit's bidirectional rule — without the pairing, design rationale and ruled-out alternatives get re-derived under build pressure. scope has already run the feature/debt litmus at filing and bounded the unit set; this stage authors, it does not re-triage.
28
30
 
29
31
  **A Definition-of-Done item that moves the entry names a stage that can move it.** An entry's Done move or demotion lands before the drain stage (`LIFECYCLE_KIT_DRAIN_STAGE`), or at it only for a `[drain-exempt:]` entry — never at a stage after it (lifecycle-kit/SPEC.md §check-stage-entry, assertion B). Name that stage by its relation to the drain stage, never by a literal stage name. An entry whose oracle is a remote run moves when build's remote-oracle rule says (build.md, *Run the system*), never in its merge commit.
@@ -32,6 +34,8 @@ Because this is a **fresh session** — a fresh prompt cache, on the tier the le
32
34
 
33
35
  Close by **recommending the next stage**: the trigger-gated audit stage when one of its triggers fired this session (an amendment changing ≥2 components' contracts is one — `check-stage-entry` will demand the audit stamp at the next stage's entry), otherwise the build stage. A `spec` that authored a cross-component amendment should say so rather than let the downstream entry discover it.
34
36
 
37
+ **Where your dispatch names a foreign adapter**, this stage's reading runs there and every write stays yours: follow lifecycle-kit/templates/host-protocol.md (lifecycle-kit/SPEC.md §The host protocol).
38
+
35
39
  **Then read your successor's entry.** After your last commit, run `--enter-stage --simulate <stage>` for the stage you recommended. It writes nothing (lifecycle-kit/SPEC.md §bin/enter-stage.sh). An exit of 1 relays a refusal: fix one your own work caused and run the read again, and carry any other into your report verbatim.
36
40
 
37
41
  **Last step — the resume journal.** This stage's exit artifact is the resume journal the `--enter-stage` arm named at the stamp; its path is a derivation (lifecycle-kit/SPEC.md §The state machine) and its contract is delegation-kit/SPEC.md §Resume journal — agent writes, scratch reset sweeps. Append `DONE` as the file's last line before you report.
@@ -6,9 +6,9 @@ The `validate` stage of an iteration. Run the full test/verification suites. Exi
6
6
 
7
7
  *<suites: execute your suites. Compilation is not done — a green build is not a green test run; gate on the positive success token of your runner, not the absence of a failure token. Capture runs to files so the evidence outlives the session. Name the baseline-grammar owner any red-triage baseline edit writes against.>*
8
8
 
9
- **Triage a red against the queue before excavating it.** On any failure, first grep the queue's deferred/lessons sections — a pre-existing red is usually already a filed task with the diagnosis written. A filed entry that matches a red is a possible cause, not a cause. A red on an item your baseline held passing when the iteration opened is a suspected regression. Reproduce it at the iteration-start commit before you hold it. If it reproduces, hold it against the filed task and record the reproducing commit where your baseline grammar keeps it. If it does not reproduce, this iteration caused it: fix it. Only a red on an item already held red at the iteration start is noted and passed over on the match alone.
9
+ **Triage a red against the queue before excavating it.** On any failure, first grep the queue's deferred section, and its lessons section where it keeps one — a pre-existing red is usually already a filed task with the diagnosis written. A filed entry that matches a red is a possible cause, not a cause. A red on an item your baseline held passing when the iteration opened is a suspected regression. Reproduce it at the iteration-start commit before you hold it. If it reproduces, hold it against the filed task and record the reproducing commit where your baseline grammar keeps it. If it does not reproduce, this iteration caused it: fix it. Only a red on an item already held red at the iteration start is noted and passed over on the match alone.
10
10
 
11
- When filing a finding, place it by kind: nameable deliverable + done-state ⇒ queue task (the deferred section, design-pending, after the owner lookup of lifecycle-kit/SPEC.md §The committed gap inbox, each claim you did not run carrying its inferred marker); an observation about how the work should be done ⇒ the lessons section, dispositioned at close. Undone work parked as a lesson evaporates; a process insight parked as a task rots.
11
+ When filing a finding, place it by kind: nameable deliverable + done-state ⇒ queue task (the deferred section, design-pending, after the owner lookup of lifecycle-kit/SPEC.md §The committed gap inbox, each claim you did not run carrying its inferred marker); an observation about how the work should be done ⇒ the lessons section where the queue keeps one, else the gap inbox (`--emit file-gap`), dispositioned at close either way. Undone work parked as a lesson evaporates; a process insight parked as a task rots.
12
12
 
13
13
  **Excavation that spans a corpus is a survey, not a triage.** When a red sends you across a whole corpus rather than into one failure, check the survey record before dispatching that sweep and file its finding afterwards — the next iteration's stages read it, and the record is discarded at the boundary anyway (lifecycle-kit/SPEC.md §The survey record). Keep it distinct from the evidence manifest below: that one records what your suites did, this one what a sweep found.
14
14
 
@@ -20,6 +20,8 @@ Do not declare validate complete until the baseline diff is clean: no item that
20
20
 
21
21
  **Arm the pre-flight valve when you end on a deliberately accepted red.** A red you understand and that reproduces at the iteration-start commit, and that the closing stage rather than this one must file against, is a hand-off — not a stop for an operator round-trip and not a queue edit. Append one `<iteration> <stage> armed <reason>` line to the configured valve ledger and commit it with your evidence, writing in the reason what close needs: which suite, what the red is, why it is accepted rather than fixed, and the commit it reproduces at. The contract, its narrowings, and the fact that reaching for it twice in one iteration is the failure: lifecycle-kit/SPEC.md §bin/enter-stage.sh. With no ledger configured there is no valve, and an accepted red stops here as it always did.
22
22
 
23
+ **Where your dispatch names a foreign adapter**, this stage's reading runs there and every write stays yours: follow lifecycle-kit/templates/host-protocol.md (lifecycle-kit/SPEC.md §The host protocol).
24
+
23
25
  **Then read your successor's entry.** After your last commit, run `--enter-stage --simulate <stage>` for the close stage. It writes nothing (lifecycle-kit/SPEC.md §bin/enter-stage.sh). An exit of 1 relays a refusal: fix one your own work caused and run the read again, and carry any other into your report verbatim.
24
26
 
25
27
  **Last step — the resume journal.** This stage's exit artifact is the resume journal the `--enter-stage` arm named at the stamp; its path is a derivation (lifecycle-kit/SPEC.md §The state machine) and its contract is delegation-kit/SPEC.md §Resume journal — agent writes, scratch reset sweeps. Append `DONE` as the file's last line before you report.
@@ -3,7 +3,7 @@ The `upgrade` skill — the phase-B disposition walk for a consumer moving their
3
3
  ## Session ritual
4
4
 
5
5
  1. **Run phase A.** Replace the vendored kit directories wholesale at the target release, retire each shell config its kits replaced with a knob file, and regenerate the generated artifacts, the install guide's phase-A steps. Where the upgrade smoke is available, run it first: a green verdict is the mechanical proof that the sync is deterministic and the red set is declared, before you disposition anything by hand.
6
- 2. **Read the target release note.** The note whose front-matter `release:` names the target version carries two checklists. Register every gate its Tightened gates section names into *<gates-list: where this consumer registers its gates — the gates.list path when non-default; a new release's gate reaches an upgrading consumer only through this declaration, never through the phase-A sync, so registering it here is the delivery step.>*, and apply each Renamed knobs rename to your own config.
6
+ 2. **Read the target release note.** The note whose front-matter `release:` names the target version carries two checklists. Register every gate its New and tightened gates section names into *<gates-list: where this consumer registers its gates — the gates.list path when non-default; a new release's gate reaches an upgrading consumer only through this declaration, never through the phase-A sync, so registering it here is the delivery step.>*, apply each Knob changes rename to your own config, and read Gate-authoring changes if you write or shadow gates.
7
7
  3. **Run the full battery; disposition every red.** Each red gate is one of two dispositions — **fix-the-tree** (the surface moved; migrate your code to the new contract) or **exempt-with-cause** (a gate you shadow or omit from your registry, the cause stamped) — and never a weakening of the gate. Stamp one disposition line per red into *<disposition-evidence: this consumer's evidence/disposition stamp path, committed on the upgrade commit.>*.
8
8
  4. **Judge the semantic residual — the ungateable audit.** For every skill you bind through a shim, set the target template's slots beside your shim's slot fills. A changed slot set reds `check-skill-binding` and a verbatim copy reds `check-shim-restatement`, but the residual — a fill you worded to cover what the new template's slot now means to own — clears both gates and cannot be gated. The upgrade is that class's audit cadence: surface each changed template slot against your fill and delete the wording the template now carries for you.
9
9
 
@@ -4,7 +4,7 @@ A git-native, agent-readable task tracker: one Markdown file where `##` sections
4
4
 
5
5
  Why: an agent picks work by *parsing*, not reading — so everything selection trusts (section position, slugs, tags) must be grammar a gate can enforce, and everything a human writes freely (task prose) must stay off the parse path. Drift between what the prose says and what the parser sees is the failure mode; all but three of the gates each close one instance of it — a tag written off its tag line, a duplicate slug, a live reference left unlinked, a lost task, a forward precondition stated in prose but never tagged. The three exceptions hold a different axis: projection freshness, and the deferred pool's filing contract — its per-entry budget and its tag-line board tags. See [SPEC.md](https://checkwright.dev/queue-kit/SPEC) for the full contracts.
6
6
 
7
- This file ships in the installer payload; what that payload withholds, and where this page's `SPEC.md` links then resolve, is [gate-sdk/SPEC.md §Consumer payload](https://github.com/checkwright/checkwright/blob/master/gate-sdk/SPEC.md#consumer-payload).
7
+ This file ships in the installer payload; what that payload withholds, and where this page's `SPEC.md` links then resolve, is [gate-sdk/SPEC.md §Consumer payload](https://checkwright.dev/gate-sdk/SPEC#consumer-payload).
8
8
 
9
9
  ## Install
10
10
 
@@ -28,7 +28,7 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
28
28
  ```
29
29
  <!-- gate-roster:end -->
30
30
 
31
- `check-queue-wrap` is for a queue you hard-wrap; if you keep it unwrapped, one line per paragraph as the template ships, leave it out and register canon-kit's `check-md-unwrapped` instead. They resolve through gate-sdk's registry path (your gates dir first, then each kit's `checks/`), and the pre-commit hook runs those their `# graph:` manifests trigger, read at commit. `--emit git-hooks --write` on the gate binary `GATE_SDK_NATIVE_BIN` names writes that hook once, and again only to add the commit-msg hook when a first `tier=commit-msg` gate is registered.
31
+ `check-queue-wrap` is for a queue you hard-wrap; if you keep it unwrapped, one line per paragraph as the template ships, leave it out and register canon-kit's `check-md-unwrapped` instead. They resolve through gate-sdk's registry path (your gates dir first, then each kit's `checks/`), and the pre-commit hook runs those their `# graph:` manifests trigger, read at commit. `--install-hooks` on the gate binary `GATE_SDK_NATIVE_BIN` names places both hooks in a clone once, and a gate registered later is reached with no re-install.
32
32
 
33
33
  2. Give your queue file the section skeleton — copy `templates/TASK-QUEUE.md` and fill it in (it shows one example entry per grammar shape). The default sections are `New Features` / `Technical Debt` (active), `Deferred`, `Done` — plus an optional `Icebox` tier between the last two for backlogs whose carry weight has become the problem, off by default (`QUEUE_KIT_ICEBOX_SECTION`).
34
34
 
@@ -61,6 +61,7 @@ gates="${GATE_SDK_NATIVE_BIN:-./scripts/checkwright-gates}"
61
61
  "$gates" --lesson-sink <tag> # route a lesson body on stdin to its configured sink
62
62
  "$gates" --emit roadmap # the public roadmap block, to stdout
63
63
  "$gates" --emit roadmap --write # splice it into the configured projection page
64
+ "$gates" --emit roadmap-lag # entries outside the first horizon, or untagged, with a split slice in the done section
64
65
  "$gates" --emit queue-migrate --write TASK-QUEUE.md # once, on upgrade: bullet entries become ### headings with a tag line
65
66
  ```
66
67
 
@@ -0,0 +1,3 @@
1
+ # Generated at pack time from this kit's spec; lifecycle-kit/SPEC.md §The close-surface roster.
2
+ close-surface: TASK-QUEUE.md#Deferred advisory
3
+ close-surface: TASK-QUEUE.md#Lessons-Learned forced=lifecycle-kit/SPEC.md §bin/enter-stage.sh
@@ -1 +1,2 @@
1
+ missing: ## Backlog
1
2
  missing: ## Lessons Learned
@@ -0,0 +1,2 @@
1
+ # spec: queue-kit/SPEC.md §Layout and configuration — the deferred section renamed through its own knob alone; the required set follows it
2
+ QUEUE_KIT_DEFERRED_SECTION = Backlog
@@ -8,7 +8,7 @@
8
8
 
9
9
  ## Technical Debt
10
10
 
11
- ## Deferred
11
+ ## Backlog
12
12
 
13
13
  ## Done
14
14
 
@@ -0,0 +1,2 @@
1
+ # spec: queue-kit/SPEC.md §Layout and configuration — the deferred section renamed through its own knob alone; the required set follows it
2
+ QUEUE_KIT_DEFERRED_SECTION = Backlog