checkwright 0.25.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1025) hide show
  1. package/README.md +35 -1361
  2. package/bin/checkwright.ps1 +157 -0
  3. package/bin/checkwright.sh +187 -44
  4. package/package.json +15 -14
  5. package/payload/artifact/aarch64-apple-darwin/checkwright-gates +0 -0
  6. package/payload/artifact/aarch64-apple-darwin/checkwright-gates.sha256 +1 -0
  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 -0
  9. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates +0 -0
  10. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates.sha256 +1 -0
  11. package/payload/artifact/targets.list +120 -24
  12. package/payload/artifact/x86_64-apple-darwin/checkwright-gates +0 -0
  13. package/payload/artifact/x86_64-apple-darwin/checkwright-gates.sha256 +1 -0
  14. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe +0 -0
  15. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -0
  16. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  17. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  18. package/payload/canon-kit/README.md +23 -37
  19. package/payload/canon-kit/checks/check-amendment-queue.gate +2 -2
  20. package/payload/canon-kit/checks/check-amendment-retired-spelling.gate +3 -0
  21. package/payload/canon-kit/checks/check-amendment-update-target.gate +1 -1
  22. package/payload/canon-kit/checks/check-comment-tier.gate +1 -1
  23. package/payload/canon-kit/checks/check-deprecation-task.gate +2 -1
  24. package/payload/canon-kit/checks/check-docs-cmd.gate +2 -2
  25. package/payload/canon-kit/checks/check-docs-link-convention.gate +1 -1
  26. package/payload/canon-kit/checks/check-docs-restatement-parity.gate +4 -0
  27. package/payload/canon-kit/checks/check-fence-command-head.gate +3 -0
  28. package/payload/canon-kit/checks/check-fence-run.gate +3 -0
  29. package/payload/canon-kit/checks/check-install-claim.gate +2 -1
  30. package/payload/canon-kit/checks/check-knob-citation.gate +1 -1
  31. package/payload/canon-kit/checks/check-manifest-count.gate +1 -1
  32. package/payload/canon-kit/checks/check-manifest-temporal.gate +1 -1
  33. package/payload/canon-kit/checks/check-md-refs.gate +1 -1
  34. package/payload/canon-kit/checks/check-md-unwrapped.gate +3 -0
  35. package/payload/canon-kit/checks/check-measured-claim.gate +2 -1
  36. package/payload/canon-kit/checks/check-payload-claim.gate +2 -1
  37. package/payload/canon-kit/checks/check-prose-bounds.gate +3 -0
  38. package/payload/canon-kit/checks/check-prose-enum.gate +2 -1
  39. package/payload/canon-kit/checks/check-prose-tells.gate +1 -1
  40. package/payload/canon-kit/checks/check-provenance-seam.gate +3 -0
  41. package/payload/canon-kit/checks/check-spec-derivable-section.gate +1 -1
  42. package/payload/canon-kit/checks/check-spec-dod-singleton.gate +1 -1
  43. package/payload/canon-kit/checks/check-spec-embedded-source.gate +1 -1
  44. package/payload/canon-kit/checks/check-spec-fence-balance.gate +1 -1
  45. package/payload/canon-kit/checks/check-spec-pointer.gate +2 -2
  46. package/payload/canon-kit/checks/check-surface-duplication.gate +3 -0
  47. package/payload/canon-kit/checks/check-todo-task-liveness.gate +1 -1
  48. package/payload/canon-kit/checks/check-tracking-claim.gate +1 -1
  49. package/payload/canon-kit/checks/check-unmarked-claim.gate +2 -1
  50. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-tidy.md +3 -0
  51. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +37 -8
  52. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +6 -3
  53. package/payload/canon-kit/gate-tests/check-amendment-queue/good/SPEC-widget.md +7 -0
  54. package/payload/canon-kit/gate-tests/check-amendment-queue/good/TASK-QUEUE.md +11 -3
  55. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/SPEC-nosection.md +16 -0
  56. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/SPEC-thing.md +26 -0
  57. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/expect.txt +8 -0
  58. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/surface/one.md +4 -0
  59. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/surface/two.md +3 -0
  60. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/SPEC-tidy.md +20 -0
  61. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/SPEC-widget.md +37 -0
  62. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/component/README.md +4 -0
  63. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/component/SPEC.md +4 -0
  64. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/expect.txt +1 -0
  65. package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/unnamed.md +4 -0
  66. package/payload/canon-kit/gate-tests/check-amendment-update-target.test.sh +1 -1
  67. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +1 -1
  68. package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +37 -26
  69. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/TASK-QUEUE.md +3 -1
  70. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.knobs +2 -0
  71. package/payload/canon-kit/gate-tests/check-deprecation-task/good/TASK-QUEUE.md +6 -2
  72. package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -1
  73. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.knobs +2 -0
  74. package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +12 -10
  75. package/payload/canon-kit/gate-tests/check-docs-cmd/good/doc.md +4 -1
  76. package/payload/canon-kit/gate-tests/check-docs-cmd.test.sh +61 -0
  77. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/expect.txt +3 -0
  78. package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +21 -2
  79. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/expect.txt +2 -0
  80. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/kit/README.md +10 -0
  81. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/kit/index.md +11 -0
  82. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/scripts/canon-config.knobs +2 -0
  83. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/scripts/gate-sdk-config.knobs +2 -0
  84. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/expect.txt +1 -0
  85. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/kit/README.md +12 -0
  86. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/kit/index.md +13 -0
  87. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/scripts/canon-config.knobs +2 -0
  88. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/scripts/gate-sdk-config.knobs +2 -0
  89. package/payload/canon-kit/gate-tests/check-fence-command-head/bad/args +1 -0
  90. package/payload/canon-kit/gate-tests/check-fence-command-head/bad/doc.md +16 -0
  91. package/payload/canon-kit/gate-tests/check-fence-command-head/bad/expect.txt +5 -0
  92. package/payload/canon-kit/gate-tests/check-fence-command-head/good/args +1 -0
  93. package/payload/canon-kit/gate-tests/check-fence-command-head/good/bin/run.sh +3 -0
  94. package/payload/canon-kit/gate-tests/check-fence-command-head/good/doc.md +41 -0
  95. package/payload/canon-kit/gate-tests/check-fence-command-head/good/expect.txt +1 -0
  96. package/payload/canon-kit/gate-tests/check-fence-command-head/good/lib/tool.sh +5 -0
  97. package/payload/canon-kit/gate-tests/check-fence-command-head/good/scripts/canon-config.knobs +2 -0
  98. package/payload/canon-kit/gate-tests/check-fence-run/bad/args +1 -0
  99. package/payload/canon-kit/gate-tests/check-fence-run/bad/doc.md +32 -0
  100. package/payload/canon-kit/gate-tests/check-fence-run/bad/expect.txt +7 -0
  101. package/payload/canon-kit/gate-tests/check-fence-run/good/args +1 -0
  102. package/payload/canon-kit/gate-tests/check-fence-run/good/doc.md +31 -0
  103. package/payload/canon-kit/gate-tests/check-fence-run/good/expect.txt +1 -0
  104. package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.knobs +7 -0
  105. package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.knobs +7 -0
  106. package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +42 -7
  107. package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +1 -2
  108. package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
  109. package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +37 -8
  110. package/payload/canon-kit/gate-tests/check-manifest-count/bad/SPEC.md +3 -0
  111. package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +10 -0
  112. package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +6 -6
  113. package/payload/canon-kit/gate-tests/check-md-refs.test.sh +1 -1
  114. package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/doc.md +13 -0
  115. package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/expect.txt +4 -0
  116. package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/scripts/canon-config.knobs +2 -0
  117. package/payload/canon-kit/gate-tests/check-md-unwrapped/good/doc.md +45 -0
  118. package/payload/canon-kit/gate-tests/check-md-unwrapped/good/expect.txt +1 -0
  119. package/payload/canon-kit/gate-tests/check-md-unwrapped/good/scripts/canon-config.knobs +4 -0
  120. package/payload/canon-kit/gate-tests/check-measured-claim/bad/SPEC.md +3 -0
  121. package/payload/canon-kit/gate-tests/check-measured-claim/bad/expect.txt +1 -0
  122. package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.knobs +4 -0
  123. package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +8 -0
  124. package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.knobs +4 -0
  125. package/payload/canon-kit/gate-tests/check-measured-claim/good/worktrees/SPEC.md +12 -0
  126. package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +32 -13
  127. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.knobs +6 -0
  128. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.knobs +6 -0
  129. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/CLAUDE.md +9 -0
  130. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/SPEC.md +11 -0
  131. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/expect.txt +3 -0
  132. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/scripts/canon-config.knobs +3 -0
  133. package/payload/canon-kit/gate-tests/check-prose-bounds/good/CLAUDE.md +10 -0
  134. package/payload/canon-kit/gate-tests/check-prose-bounds/good/SPEC.md +27 -0
  135. package/payload/canon-kit/gate-tests/check-prose-bounds/good/expect.txt +1 -0
  136. package/payload/canon-kit/gate-tests/check-prose-bounds/good/scripts/canon-config.knobs +3 -0
  137. package/payload/canon-kit/gate-tests/check-prose-bounds.test.sh +98 -0
  138. package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.knobs +3 -0
  139. package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.knobs +3 -0
  140. package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +55 -25
  141. package/payload/canon-kit/gate-tests/check-prose-tells/bad/prose.md +2 -0
  142. package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.knobs +5 -0
  143. package/payload/canon-kit/gate-tests/check-prose-tells/good/prose.md +6 -0
  144. package/payload/canon-kit/gate-tests/check-prose-tells/good/scripts/{canon-config.sh → canon-config.knobs} +2 -5
  145. package/payload/canon-kit/gate-tests/check-prose-tells/good/worktrees/prose.md +17 -0
  146. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/TASK-QUEUE.md +15 -0
  147. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/expect.txt +8 -0
  148. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/canon-config.knobs +3 -0
  149. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/gate-sdk-config.knobs +2 -0
  150. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/lifecycle-config.knobs +12 -0
  151. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/widget-toolkit/SPEC.md +27 -0
  152. package/payload/canon-kit/gate-tests/check-provenance-seam/good/TASK-QUEUE.md +15 -0
  153. package/payload/canon-kit/gate-tests/check-provenance-seam/good/expect.txt +1 -0
  154. package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/canon-config.knobs +3 -0
  155. package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/gate-sdk-config.knobs +2 -0
  156. package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/lifecycle-config.knobs +12 -0
  157. package/payload/canon-kit/gate-tests/check-provenance-seam/good/widget-toolkit/SPEC.md +20 -0
  158. package/payload/canon-kit/gate-tests/check-provenance-seam.test.sh +136 -0
  159. package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +1 -1
  160. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/README.md +6 -0
  161. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/SPEC-widget.md +5 -0
  162. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.rs +2 -0
  163. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +4 -0
  164. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.knobs +6 -0
  165. package/payload/canon-kit/gate-tests/check-spec-pointer/good/README.md +15 -0
  166. package/payload/canon-kit/gate-tests/check-spec-pointer/good/SPEC-widget.md +10 -0
  167. package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -1
  168. package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.rs +2 -0
  169. package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.knobs +6 -0
  170. package/payload/canon-kit/gate-tests/check-spec-pointer/good/vendored-kit/notes.txt +4 -0
  171. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/TASK-QUEUE.md +3 -1
  172. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/TASK-QUEUE.md +9 -3
  173. package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +1 -1
  174. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/SPEC.md +3 -0
  175. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/expect.txt +1 -0
  176. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/scripts/canon-config.knobs +4 -0
  177. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/SPEC.md +3 -0
  178. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/scripts/canon-config.knobs +4 -0
  179. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/worktrees/SPEC.md +11 -0
  180. package/payload/canon-kit/gate-tests/check-unmarked-claim.test.sh +53 -28
  181. package/payload/canon-kit/templates/SPEC-amendment.md +46 -25
  182. package/payload/canon-kit/templates/canon-config.knobs +1 -0
  183. package/payload/context-kit/README.md +33 -61
  184. package/payload/context-kit/checks/check-brevity.gate +2 -2
  185. package/payload/context-kit/checks/check-footprint-fresh.gate +3 -2
  186. package/payload/context-kit/checks/check-memory-off.gate +1 -1
  187. package/payload/context-kit/checks/check-settings-paths.gate +2 -2
  188. package/payload/context-kit/checks/check-settings-pins.gate +1 -1
  189. package/payload/context-kit/checks/check-surface-ratchet.gate +3 -0
  190. package/payload/context-kit/gate-tests/check-brevity/bad/CLAUDE.md +9 -2
  191. package/payload/context-kit/gate-tests/check-brevity/bad/expect.txt +1 -0
  192. package/payload/context-kit/gate-tests/check-brevity/good/CLAUDE.md +9 -4
  193. package/payload/context-kit/gate-tests/check-brevity/good/expect.txt +1 -1
  194. package/payload/context-kit/gate-tests/check-brevity.test.sh +107 -24
  195. package/payload/context-kit/gate-tests/check-footprint-fresh/good/CLAUDE.md +6 -0
  196. package/payload/context-kit/gate-tests/check-footprint-fresh/good/demo-kit/SPEC.md +3 -0
  197. package/payload/context-kit/gate-tests/check-footprint-fresh/good/demo-kit/templates/guide.md +3 -0
  198. package/payload/context-kit/gate-tests/check-footprint-fresh/good/docs/footprint.md +30 -0
  199. package/payload/context-kit/gate-tests/check-memory-off/bad/scripts/{context-config.sh → context-config.knobs} +1 -3
  200. package/payload/context-kit/gate-tests/check-memory-off/good/scripts/{context-config.sh → context-config.knobs} +1 -3
  201. package/payload/context-kit/gate-tests/check-memory-off.test.sh +1 -1
  202. package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +2 -0
  203. package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +21 -0
  204. package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/run-gates.sh +4 -0
  205. package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +2 -1
  206. package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +48 -1
  207. package/payload/context-kit/gate-tests/check-settings-paths/good/tools/run-gates.sh +4 -0
  208. package/payload/context-kit/gate-tests/check-settings-pins.test.sh +1 -1
  209. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/CLAUDE.md +5 -0
  210. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/expect.txt +2 -0
  211. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/scripts/context-config.knobs +4 -0
  212. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/surface-ceiling.txt +2 -0
  213. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/templates/ungoverned.md +3 -0
  214. package/payload/context-kit/gate-tests/check-surface-ratchet/good/CLAUDE.md +3 -0
  215. package/payload/context-kit/gate-tests/check-surface-ratchet/good/expect.txt +1 -0
  216. package/payload/context-kit/gate-tests/check-surface-ratchet/good/scripts/context-config.knobs +4 -0
  217. package/payload/context-kit/gate-tests/check-surface-ratchet/good/surface-ceiling.txt +4 -0
  218. package/payload/context-kit/gate-tests/check-surface-ratchet/good/templates/held.md +4 -0
  219. package/payload/context-kit/gate-tests/check-surface-ratchet.test.sh +76 -0
  220. package/payload/context-kit/index-tests/corpus/baseline.txt +1 -1
  221. package/payload/context-kit/index-tests/corpus/surface.md +1 -6
  222. package/payload/context-kit/index-tests/expected/always-loaded.txt +1 -1
  223. package/payload/context-kit/templates/close-brevity.md +9 -28
  224. package/payload/context-kit/templates/context-config.knobs +1 -0
  225. package/payload/context-kit/templates/session-context.sh +43 -28
  226. package/payload/delegation-kit/README.md +35 -69
  227. package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +1 -1
  228. package/payload/delegation-kit/checks/check-gate-tamper.gate +1 -1
  229. package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +23 -2
  230. package/payload/delegation-kit/templates/agent-execution.md +23 -389
  231. package/payload/delegation-kit/templates/delegation-config.knobs +4 -0
  232. package/payload/delegation-kit/templates/dispatch-checklists.md +8 -45
  233. package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +33 -17
  234. package/payload/doctrine-kit/DOCTRINE.md +92 -458
  235. package/payload/doctrine-kit/README.md +24 -55
  236. package/payload/doctrine-kit/checks/check-doctrine-registration.gate +1 -1
  237. package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +48 -3
  238. package/payload/drift-kit/README.md +43 -89
  239. package/payload/drift-kit/templates/close-knowledge.md +7 -22
  240. package/payload/drift-kit/templates/drift-config.knobs +1 -0
  241. package/payload/drift-kit/templates/economics.md +10 -48
  242. package/payload/drift-kit/templates/kpi-deprecated-surface.sh +31 -9
  243. package/payload/drift-kit/templates/kpis.list +2 -1
  244. package/payload/drift-kit/templates/price-table.tsv +1 -1
  245. package/payload/evidence-kit/README.md +23 -46
  246. package/payload/evidence-kit/checks/check-battery-roster.gate +1 -1
  247. package/payload/evidence-kit/checks/check-evidence-baseline.gate +2 -2
  248. package/payload/evidence-kit/checks/check-evidence-manifest.gate +1 -1
  249. package/payload/evidence-kit/checks/check-producer-liveness.gate +3 -0
  250. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.knobs +7 -0
  251. package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.knobs +7 -0
  252. package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +7 -7
  253. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/TASK-QUEUE.md +3 -1
  254. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/args +1 -0
  255. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/expect.txt +2 -0
  256. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/scripts/evidence-config.knobs +4 -0
  257. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/validate-baseline.txt +1 -0
  258. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/TASK-QUEUE.md +3 -1
  259. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/args +1 -0
  260. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/scripts/evidence-config.knobs +3 -0
  261. package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +134 -14
  262. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/scripts/{evidence-config.sh → evidence-config.knobs} +3 -5
  263. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/scripts/{evidence-config.sh → evidence-config.knobs} +3 -5
  264. package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +5 -4
  265. package/payload/evidence-kit/gate-tests/diff-baseline-status.test.sh +128 -0
  266. package/payload/evidence-kit/gate-tests/evidence-lib.test.sh +51 -45
  267. package/payload/evidence-kit/gate-tests/pre-hook.test.sh +66 -0
  268. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +29 -16
  269. package/payload/evidence-kit/templates/evidence-config.knobs +1 -0
  270. package/payload/gate-sdk/README.md +48 -79
  271. package/payload/gate-sdk/bin/build-native.sh +27 -4
  272. package/payload/gate-sdk/bin/run-gates.ps1 +266 -0
  273. package/payload/gate-sdk/bin/run-gates.sh +53 -277
  274. package/payload/gate-sdk/checks/check-action-gh-repo.gate +1 -1
  275. package/payload/gate-sdk/checks/check-action-job-ref.gate +3 -0
  276. package/payload/gate-sdk/checks/check-action-permissions.gate +3 -0
  277. package/payload/gate-sdk/checks/check-action-pinning.gate +1 -1
  278. package/payload/gate-sdk/checks/check-action-run-path.gate +3 -0
  279. package/payload/gate-sdk/checks/check-action-run-shell.gate +3 -0
  280. package/payload/gate-sdk/checks/check-commit-msg.gate +2 -1
  281. package/payload/gate-sdk/checks/check-commit-subject.gate +1 -1
  282. package/payload/gate-sdk/checks/check-core-files.gate +1 -1
  283. package/payload/gate-sdk/checks/check-crate-arms.gate +3 -0
  284. package/payload/gate-sdk/checks/check-enforcement-fresh.gate +3 -2
  285. package/payload/gate-sdk/checks/check-exec-bit.gate +1 -1
  286. package/payload/gate-sdk/checks/check-front-end-fail-open.gate +3 -0
  287. package/payload/gate-sdk/checks/check-gate-assertions.gate +2 -2
  288. package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +1 -1
  289. package/payload/gate-sdk/checks/check-gate-exemption-tasks.gate +1 -1
  290. package/payload/gate-sdk/checks/check-gate-fail-closed.gate +1 -1
  291. package/payload/gate-sdk/checks/check-gate-fixture-coverage.gate +1 -1
  292. package/payload/gate-sdk/checks/check-gate-output.gate +1 -1
  293. package/payload/gate-sdk/checks/check-gate-substrate-parity.gate +3 -0
  294. package/payload/gate-sdk/checks/check-graph.gate +2 -1
  295. package/payload/gate-sdk/checks/check-hook-exec-bit.gate +1 -1
  296. package/payload/gate-sdk/checks/check-identity.gate +1 -1
  297. package/payload/gate-sdk/checks/check-install-disposition.gate +3 -0
  298. package/payload/gate-sdk/checks/check-kit-enum.gate +1 -1
  299. package/payload/gate-sdk/checks/check-kit-registration.gate +1 -1
  300. package/payload/gate-sdk/checks/check-kit-roots-dialect.gate +3 -0
  301. package/payload/gate-sdk/checks/check-packed-links.gate +3 -0
  302. package/payload/gate-sdk/checks/check-path-dialect.gate +3 -0
  303. package/payload/gate-sdk/checks/check-pipe-membership.gate +3 -0
  304. package/payload/gate-sdk/checks/check-portability-floor.gate +4 -0
  305. package/payload/gate-sdk/checks/check-projection-roster.gate +4 -0
  306. package/payload/gate-sdk/checks/check-reads-couples.gate +1 -1
  307. package/payload/gate-sdk/checks/check-root-tiering.gate +1 -1
  308. package/payload/gate-sdk/checks/check-shellcheck.gate +3 -0
  309. package/payload/gate-sdk/checks/check-template-copy-parity.gate +1 -1
  310. package/payload/gate-sdk/checks/check-tree-terms.gate +2 -1
  311. package/payload/gate-sdk/checks/check-workflow-tiering.gate +1 -1
  312. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/args +2 -0
  313. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/expect.txt +1 -0
  314. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/scripts/gate-sdk-config.knobs +1 -0
  315. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/tree/notes.md +3 -0
  316. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/tree/workflows/ci.yml +8 -0
  317. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/args +3 -0
  318. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/expect.txt +1 -0
  319. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/scripts/gate-sdk-config.knobs +1 -0
  320. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/tree/notes.md +3 -0
  321. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/tree/workflows/ci.yml +8 -0
  322. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/args +3 -0
  323. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/expect.txt +5 -0
  324. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/tree/workflows/empty-allowlist.yml +29 -0
  325. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/tree/workflows/gates.yml +25 -0
  326. package/payload/gate-sdk/gate-tests/check-action-permissions/good/args +5 -0
  327. package/payload/gate-sdk/gate-tests/check-action-permissions/good/expect.txt +1 -0
  328. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/action.yml +9 -0
  329. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/not-actions.yml +7 -0
  330. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/workflows/declared.yml +69 -0
  331. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/workflows/valves.yml +22 -0
  332. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/args +4 -0
  333. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/expect.txt +2 -0
  334. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/tree/scripts/present.sh +3 -0
  335. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/tree/workflows/ci.yml +14 -0
  336. package/payload/gate-sdk/gate-tests/check-action-run-path/good/args +5 -0
  337. package/payload/gate-sdk/gate-tests/check-action-run-path/good/expect.txt +1 -0
  338. package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/scripts/build.sh +3 -0
  339. package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/sub/scripts/inner.sh +3 -0
  340. package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/workflows/ci.yml +36 -0
  341. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/args +4 -2
  342. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/expect.txt +2 -0
  343. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/tree/workflows/runner-dialect.yml +36 -0
  344. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/args +3 -2
  345. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/expect.txt +1 -1
  346. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/tree/workflows/runner-dialect.yml +71 -0
  347. package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +102 -9
  348. package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/smoke/install.sh +1 -1
  349. package/payload/gate-sdk/gate-tests/check-assertion-strength/good/smoke/install.sh +1 -1
  350. package/payload/gate-sdk/gate-tests/check-assertion-strength.test.sh +55 -0
  351. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/expect.txt +1 -0
  352. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/msg.txt +4 -0
  353. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/patterns.list +5 -1
  354. package/payload/gate-sdk/gate-tests/check-commit-msg/good/msg.txt +7 -0
  355. package/payload/gate-sdk/gate-tests/check-commit-msg/good/patterns.list +5 -1
  356. package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +2 -2
  357. package/payload/gate-sdk/gate-tests/check-core-files.test.sh +1 -1
  358. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.knobs +3 -0
  359. package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.knobs +3 -0
  360. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/SPEC.md +3 -0
  361. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/checks/check-demo.gate +1 -0
  362. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/probe.conf +1 -0
  363. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/templates/guide.md +3 -0
  364. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/docs/enforcement.md +33 -0
  365. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/scripts/gate-sdk-config.knobs +1 -0
  366. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/scripts/gates.list +1 -0
  367. package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +1 -1
  368. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/args +3 -0
  369. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/expect.txt +2 -0
  370. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/gate-sdk/bin/run-gates.ps1 +5 -0
  371. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/gate-sdk/bin/run-gates.sh +9 -0
  372. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/args +4 -0
  373. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/expect.txt +1 -0
  374. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/gate-sdk/bin/run-gates.ps1 +5 -0
  375. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/gate-sdk/bin/run-gates.sh +9 -0
  376. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/SPEC.md +4 -1
  377. package/payload/gate-sdk/gate-tests/check-gate-assertions.test.sh +1 -1
  378. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.knobs +2 -0
  379. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.knobs +2 -0
  380. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +6 -12
  381. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +5 -3
  382. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/TASK-QUEUE.md +3 -1
  383. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks.test.sh +4 -2
  384. package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +1 -1
  385. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/ci/build-artifact.sh +9 -0
  386. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/ci.yml +9 -0
  387. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +4 -2
  388. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.knobs +5 -0
  389. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +6 -0
  390. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/ci/build-artifact.sh +9 -0
  391. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/ci.yml +16 -0
  392. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +7 -3
  393. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.knobs +5 -0
  394. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +1 -1
  395. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +222 -197
  396. package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +7 -2
  397. package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +4 -0
  398. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +3 -1
  399. package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +1 -1
  400. package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +8 -8
  401. package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +2 -2
  402. package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +49 -14
  403. package/payload/gate-sdk/gate-tests/check-identity/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +4 -4
  404. package/payload/gate-sdk/gate-tests/check-identity/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +4 -4
  405. package/payload/gate-sdk/gate-tests/check-identity.test.sh +1 -1
  406. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-eta.sh +7 -0
  407. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-iota.sh +7 -0
  408. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-theta.sh +7 -0
  409. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-zeta.gate +3 -0
  410. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/smoke/install.sh +1 -1
  411. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/args +8 -5
  412. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/expect.txt +5 -0
  413. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/native/src/installer/recipe.rs +10 -0
  414. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
  415. package/payload/gate-sdk/gate-tests/check-install-disposition/good/args +8 -4
  416. package/payload/gate-sdk/gate-tests/check-install-disposition/good/expect.txt +2 -0
  417. package/payload/gate-sdk/gate-tests/check-install-disposition/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
  418. package/payload/gate-sdk/gate-tests/check-install-disposition/good/{alpha-kit → site-kit}/checks/check-alpha.sh +1 -1
  419. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-beta.gate +3 -0
  420. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-gamma.sh +6 -0
  421. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-omega.sh +7 -0
  422. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-psi.sh +7 -0
  423. package/payload/gate-sdk/gate-tests/check-install-disposition/good/{alpha-kit → site-kit}/smoke/install.sh +2 -2
  424. package/payload/gate-sdk/gate-tests/check-kit-registration/bad/registry-doc.md +15 -12
  425. package/payload/gate-sdk/gate-tests/check-kit-registration/good/args +7 -5
  426. package/payload/gate-sdk/gate-tests/check-kit-registration/good/scripts/gate-sdk-config.knobs +2 -0
  427. package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +2 -2
  428. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/args +5 -0
  429. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/expect.txt +1 -0
  430. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/checks/placeholder.txt +3 -0
  431. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/gate-tests/alpha.test.sh +3 -0
  432. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/lib/alpha.sh +3 -0
  433. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/checks/placeholder.txt +3 -0
  434. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/gate-tests/beta.test.sh +3 -0
  435. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/lib/beta.sh +3 -0
  436. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/gate-sdk/checks/placeholder.txt +3 -0
  437. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/gate-sdk/lib/gate.sh +3 -0
  438. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/scripts/gate-sdk-config.knobs +7 -0
  439. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/scripts/gates.list +3 -0
  440. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/args +7 -0
  441. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/expect.txt +1 -0
  442. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/checks/placeholder.txt +3 -0
  443. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/gate-tests/alpha.test.sh +3 -0
  444. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/lib/alpha.sh +3 -0
  445. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/checks/placeholder.txt +3 -0
  446. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/gate-tests/beta.test.sh +3 -0
  447. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/lib/beta.sh +3 -0
  448. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/gate-sdk/checks/placeholder.txt +3 -0
  449. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/gate-sdk/lib/gate.sh +3 -0
  450. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/scripts/gates.list +3 -0
  451. package/payload/gate-sdk/gate-tests/check-packed-links/bad/alpha-kit/README.md +5 -0
  452. package/payload/gate-sdk/gate-tests/check-packed-links/bad/args +5 -0
  453. package/payload/gate-sdk/gate-tests/check-packed-links/bad/beta-kit/README.md +5 -0
  454. package/payload/gate-sdk/gate-tests/check-packed-links/bad/expect.txt +2 -0
  455. package/payload/gate-sdk/gate-tests/check-packed-links/bad/scripts/gate-sdk-config.knobs +4 -0
  456. package/payload/gate-sdk/gate-tests/check-packed-links/good/alpha-kit/README.md +5 -0
  457. package/payload/gate-sdk/gate-tests/check-packed-links/good/args +8 -0
  458. package/payload/gate-sdk/gate-tests/check-packed-links/good/beta-kit/README.md +9 -0
  459. package/payload/gate-sdk/gate-tests/check-packed-links/good/expect.txt +1 -0
  460. package/payload/gate-sdk/gate-tests/check-packed-links/good/gamma-kit/SPEC.md +4 -0
  461. package/payload/gate-sdk/gate-tests/check-packed-links/good/scripts/gate-sdk-config.knobs +6 -0
  462. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/args +3 -0
  463. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/expect.txt +15 -0
  464. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/primitive.rs +19 -0
  465. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/producer.rs +8 -0
  466. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/walk.rs +13 -0
  467. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/bound-root.sh +5 -0
  468. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/case-arm.sh +6 -0
  469. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/commented.sh +5 -0
  470. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/common-dir.sh +4 -0
  471. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/glob-test.sh +4 -0
  472. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/late-anchor.sh +7 -0
  473. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/logical-readback.sh +5 -0
  474. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/probe.sh +7 -0
  475. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/two-root.sh +5 -0
  476. package/payload/gate-sdk/gate-tests/check-path-dialect/good/args +3 -0
  477. package/payload/gate-sdk/gate-tests/check-path-dialect/good/expect.txt +13 -0
  478. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/commented.rs +5 -0
  479. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/local.rs +12 -0
  480. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/namespace.rs +11 -0
  481. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/typed.rs +10 -0
  482. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/verdict.rs +5 -0
  483. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/walk.rs +24 -0
  484. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/anchored.sh +6 -0
  485. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/cd-only.sh +7 -0
  486. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/commented.sh +6 -0
  487. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/one-root.sh +4 -0
  488. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/probe.sh +8 -0
  489. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/rooted.sh +23 -0
  490. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/subshell.sh +6 -0
  491. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/two-line.sh +8 -0
  492. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/verdict.sh +7 -0
  493. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/args +4 -0
  494. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/expect.txt +6 -0
  495. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/scripts/gate-sdk-config.knobs +1 -0
  496. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/array-grep.sh +6 -0
  497. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/echo-max-count.sh +5 -0
  498. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/gate-tests/membership.test.sh +6 -0
  499. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/loop-head.sh +5 -0
  500. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/tests/relocated.test.sh +6 -0
  501. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/args +5 -0
  502. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/expect.txt +3 -0
  503. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/full-reader.sh +4 -0
  504. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/gate-tests/check-x/bad/violating.test.sh +6 -0
  505. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/gate-tests/clean.test.sh +8 -0
  506. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/loop-membership.sh +8 -0
  507. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/no-pipefail.sh +6 -0
  508. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/one-line-producer.sh +5 -0
  509. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/args +2 -0
  510. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/expect.txt +8 -0
  511. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/patterns.list +4 -0
  512. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/scripts/gate-sdk-config.knobs +4 -0
  513. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/empty-reason-verb +5 -0
  514. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/strings.ps1 +6 -0
  515. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/too-far-verb +5 -0
  516. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/undeclared-verb +3 -0
  517. package/payload/gate-sdk/gate-tests/check-portability-floor/good/args +2 -0
  518. package/payload/gate-sdk/gate-tests/check-portability-floor/good/expect.txt +1 -0
  519. package/payload/gate-sdk/gate-tests/check-portability-floor/good/patterns.list +5 -0
  520. package/payload/gate-sdk/gate-tests/check-portability-floor/good/scripts/gate-sdk-config.knobs +4 -0
  521. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/front.ps1 +7 -0
  522. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/plain-verb +5 -0
  523. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/portability-patterns.list +5 -0
  524. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/upgrade-verb +7 -0
  525. package/payload/gate-sdk/gate-tests/check-portability-floor.test.sh +154 -0
  526. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/demo-kit/checks/check-beta.gate +2 -0
  527. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/docs/roster.md +11 -0
  528. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/expect.txt +7 -0
  529. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-alpha.gate +2 -0
  530. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-gamma.gate +2 -0
  531. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-plain.gate +1 -0
  532. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/gate-sdk-config.knobs +3 -0
  533. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/gates.list +4 -0
  534. package/payload/gate-sdk/gate-tests/check-projection-roster/good/demo-kit/checks/check-beta.gate +2 -0
  535. package/payload/gate-sdk/gate-tests/check-projection-roster/good/docs/roster.md +16 -0
  536. package/payload/gate-sdk/gate-tests/check-projection-roster/good/expect.txt +1 -0
  537. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-alpha.gate +2 -0
  538. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-delta.gate +2 -0
  539. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-epsilon.gate +2 -0
  540. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-plain.gate +1 -0
  541. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/gate-sdk-config.knobs +4 -0
  542. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/gates.list +5 -0
  543. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.knobs +4 -0
  544. package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +1 -1
  545. package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.knobs +4 -0
  546. package/payload/gate-sdk/gate-tests/check-reads-couples/bad/expect.txt +1 -1
  547. package/payload/gate-sdk/gate-tests/check-reads-couples/bad/sandbox-gate.sh +4 -4
  548. package/payload/gate-sdk/gate-tests/check-reads-couples/good/sandbox-gate.sh +4 -4
  549. package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +25 -20
  550. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/alpha-kit/smoke/install.sh +1 -1
  551. package/payload/gate-sdk/gate-tests/{check-template-registry-parity/bad/scripts/gate-sdk-config.sh → check-smoke-entry-guard/bad/scripts/gate-sdk-config.knobs} +2 -3
  552. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/install.sh +1 -1
  553. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/violation.sh +1 -1
  554. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/args +1 -1
  555. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/beta-kit/smoke/install.sh +1 -1
  556. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.knobs +4 -0
  557. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/args +3 -1
  558. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/delegation-kit/templates/session-note.sh +6 -0
  559. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/expect.txt +1 -1
  560. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/session-note.sh +6 -0
  561. package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +1 -1
  562. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/args +2 -0
  563. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/drift-kit/templates/kpis.list +18 -0
  564. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/expect.txt +2 -0
  565. package/payload/gate-sdk/gate-tests/{check-smoke-entry-guard/bad/scripts/gate-sdk-config.sh → check-template-registry-parity/bad/scripts/gate-sdk-config.knobs} +2 -3
  566. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/args +3 -1
  567. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/drift-kit/templates/kpis.list +17 -0
  568. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/expect.txt +1 -1
  569. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.knobs +4 -0
  570. package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +5 -5
  571. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/expect.txt +1 -0
  572. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/patterns.list +4 -0
  573. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/accounts.txt +1 -0
  574. package/payload/gate-sdk/gate-tests/check-tree-terms/good/expect.txt +1 -1
  575. package/payload/gate-sdk/gate-tests/check-tree-terms/good/patterns.list +5 -1
  576. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/anchored.txt +1 -0
  577. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/handles.txt +2 -0
  578. package/payload/gate-sdk/gate-tests/check-tree-terms.test.sh +44 -5
  579. package/payload/gate-sdk/gate-tests/emit-arm-shape.test.sh +95 -0
  580. package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +10 -10
  581. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +10 -184
  582. package/payload/gate-sdk/gate-tests/reads-census.test.sh +96 -0
  583. package/payload/gate-sdk/gate-tests/run-arm-contract.test.sh +190 -0
  584. package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +64 -41
  585. package/payload/gate-sdk/gate-tests/run-for-path.test.sh +2 -2
  586. package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +121 -16
  587. package/payload/gate-sdk/gate-tests/run-gates-linked-worktree.test.sh +136 -0
  588. package/payload/gate-sdk/lib/gate.sh +231 -484
  589. package/payload/gate-sdk/lib/test-hermetic.sh +39 -9
  590. package/payload/gate-sdk/templates/check-skeleton.sh +3 -2
  591. package/payload/gate-sdk/templates/gates-workflow.yml +23 -10
  592. package/payload/gate-sdk/templates/msg-patterns.list +14 -5
  593. package/payload/gate-sdk/templates/portability-patterns.list +56 -0
  594. package/payload/guard-kit/README.md +43 -47
  595. package/payload/guard-kit/checks/check-door-binding.gate +3 -0
  596. package/payload/guard-kit/gate-tests/check-door-binding/bad/alpha-kit/README.md +6 -0
  597. package/payload/guard-kit/gate-tests/check-door-binding/bad/alpha-kit/templates/alpha-config.knobs +3 -0
  598. package/payload/guard-kit/gate-tests/check-door-binding/bad/args +5 -0
  599. package/payload/guard-kit/gate-tests/check-door-binding/bad/beta-kit/lib/beta.sh +6 -0
  600. package/payload/guard-kit/gate-tests/check-door-binding/bad/expect.txt +5 -0
  601. package/payload/guard-kit/gate-tests/check-door-binding/bad/scripts/gate-sdk-config.knobs +4 -0
  602. package/payload/guard-kit/gate-tests/check-door-binding/bad/scripts/guard-config.knobs +3 -0
  603. package/payload/guard-kit/gate-tests/check-door-binding/bad/site/banner.md +8 -0
  604. package/payload/guard-kit/gate-tests/check-door-binding/bad/site/landing.md +11 -0
  605. package/payload/guard-kit/gate-tests/check-door-binding/good/alpha-kit/README.md +8 -0
  606. package/payload/guard-kit/gate-tests/check-door-binding/good/alpha-kit/templates/settings-hooks.json +20 -0
  607. package/payload/guard-kit/gate-tests/check-door-binding/good/args +7 -0
  608. package/payload/guard-kit/gate-tests/check-door-binding/good/beta-kit/lib/beta.sh +6 -0
  609. package/payload/guard-kit/gate-tests/check-door-binding/good/expect.txt +1 -0
  610. package/payload/guard-kit/gate-tests/check-door-binding/good/scripts/gate-sdk-config.knobs +4 -0
  611. package/payload/guard-kit/gate-tests/check-door-binding/good/scripts/guard-config.knobs +3 -0
  612. package/payload/guard-kit/gate-tests/check-door-binding/good/site/mirror.md +12 -0
  613. package/payload/guard-kit/gate-tests/check-door-binding/good/site/register.md +24 -0
  614. package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +40 -27
  615. package/payload/guard-kit/gate-tests/consumer-rules.test.sh +189 -0
  616. package/payload/guard-kit/gate-tests/door-binding-corpus.test.sh +72 -0
  617. package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +48 -23
  618. package/payload/guard-kit/gate-tests/guard-config-knobs.test.sh +170 -0
  619. package/payload/guard-kit/gate-tests/rewrite.test.sh +73 -0
  620. package/payload/guard-kit/gate-tests/scan-prompts.test.sh +174 -8
  621. package/payload/guard-kit/gate-tests/scratch-run.test.sh +149 -13
  622. package/payload/guard-kit/gate-tests/worktree-confinement.test.sh +169 -0
  623. package/payload/guard-kit/guard-tests/background-cases.tsv +14 -5
  624. package/payload/guard-kit/guard-tests/cases.tsv +360 -54
  625. package/payload/guard-kit/guard-tests/powershell-background-cases.tsv +29 -0
  626. package/payload/guard-kit/guard-tests/powershell-cases.tsv +81 -0
  627. package/payload/guard-kit/templates/close-triage.md +15 -62
  628. package/payload/guard-kit/templates/guard-config.knobs +26 -0
  629. package/payload/guard-kit/templates/settings-allow.json +15 -0
  630. package/payload/guard-kit/templates/settings-hooks.json +5 -5
  631. package/payload/lifecycle-kit/README.md +48 -76
  632. package/payload/lifecycle-kit/checks/check-audit-roster.gate +3 -0
  633. package/payload/lifecycle-kit/checks/check-close-surfaces.gate +1 -1
  634. package/payload/lifecycle-kit/checks/check-dispatch-entry.gate +3 -0
  635. package/payload/lifecycle-kit/checks/check-gap-inbox-neutrality.gate +1 -1
  636. package/payload/lifecycle-kit/checks/check-lesson-disposition.gate +1 -1
  637. package/payload/lifecycle-kit/checks/check-lifecycle-registration.gate +1 -1
  638. package/payload/lifecycle-kit/checks/check-merge-attrs.gate +1 -1
  639. package/payload/lifecycle-kit/checks/check-scratch-citation.gate +1 -1
  640. package/payload/lifecycle-kit/checks/check-shim-restatement.gate +1 -1
  641. package/payload/lifecycle-kit/checks/check-skill-binding.gate +1 -1
  642. package/payload/lifecycle-kit/checks/check-stage-entry.gate +2 -2
  643. package/payload/lifecycle-kit/checks/check-stage-evidence.gate +1 -1
  644. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +2 -2
  645. package/payload/lifecycle-kit/checks/check-stamp-subject.gate +3 -0
  646. package/payload/lifecycle-kit/checks/check-survey-record.gate +2 -2
  647. package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +93 -18
  648. package/payload/lifecycle-kit/gate-tests/boundary-stage-journal.test.sh +196 -0
  649. package/payload/lifecycle-kit/gate-tests/boundary-worktree-refusal.test.sh +214 -0
  650. package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/args +2 -0
  651. package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/expect.txt +6 -0
  652. package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/roster.txt +34 -0
  653. package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/args +2 -0
  654. package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/expect.txt +1 -0
  655. package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/roster.txt +22 -0
  656. package/payload/lifecycle-kit/gate-tests/check-audit-roster.test.sh +101 -0
  657. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.knobs +2 -0
  658. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/owners/worktrees/inbox.md +5 -0
  659. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.knobs +2 -0
  660. package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +21 -4
  661. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/args +6 -0
  662. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/expect.txt +1 -0
  663. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/head.txt +5 -0
  664. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/marker.txt +1 -0
  665. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/msg.txt +4 -0
  666. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/paths.txt +1 -0
  667. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/staged.txt +5 -0
  668. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/args +6 -0
  669. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/expect.txt +1 -0
  670. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/head.txt +5 -0
  671. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/marker.txt +1 -0
  672. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/msg.txt +4 -0
  673. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/paths.txt +2 -0
  674. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/staged.txt +6 -0
  675. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry.test.sh +60 -0
  676. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +1 -1
  677. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/bad/AGENT.md +1 -5
  678. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/good/AGENT.md +1 -5
  679. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +1 -1
  680. package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +2 -2
  681. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.knobs +2 -0
  682. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.knobs +2 -0
  683. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/worktrees/queue.md +13 -0
  684. package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +1 -1
  685. package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +1 -1
  686. package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +158 -11
  687. package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +27 -2
  688. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/align.md +4 -1
  689. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/build.md +4 -1
  690. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/close.md +5 -0
  691. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/scope.md +4 -1
  692. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/validate.md +1 -1
  693. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/expect.txt +1 -1
  694. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/align.md +4 -1
  695. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/build.md +4 -1
  696. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/close.md +4 -1
  697. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/scope.md +4 -1
  698. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/validate.md +4 -1
  699. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage.test.sh +73 -0
  700. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/args +4 -0
  701. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/expect.txt +1 -0
  702. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/head.txt +5 -0
  703. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/msg.txt +4 -0
  704. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/staged.txt +6 -0
  705. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/args +4 -0
  706. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/expect.txt +1 -0
  707. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/head.txt +5 -0
  708. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/msg.txt +4 -0
  709. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/staged.txt +7 -0
  710. package/payload/lifecycle-kit/gate-tests/check-stamp-subject.test.sh +59 -0
  711. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/expect.txt +3 -0
  712. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/record.md +24 -0
  713. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -1
  714. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +10 -0
  715. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +56 -5
  716. package/payload/lifecycle-kit/gate-tests/dispatch-marker.test.sh +152 -0
  717. package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +23 -48
  718. package/payload/lifecycle-kit/gate-tests/gap-inbox-route.test.sh +7 -5
  719. package/payload/lifecycle-kit/gate-tests/lead-journal-open.test.sh +119 -0
  720. package/payload/lifecycle-kit/gate-tests/preflight-valve.test.sh +170 -0
  721. package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +5 -3
  722. package/payload/lifecycle-kit/gate-tests/ruling-staleness.test.sh +89 -0
  723. package/payload/lifecycle-kit/gate-tests/stamp-before-write.test.sh +66 -0
  724. package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +12 -6
  725. package/payload/lifecycle-kit/templates/consult.md +9 -63
  726. package/payload/lifecycle-kit/templates/lead.md +143 -431
  727. package/payload/lifecycle-kit/templates/lifecycle-config.knobs +1 -0
  728. package/payload/lifecycle-kit/templates/release-sweep.md +6 -35
  729. package/payload/lifecycle-kit/templates/stages/align.md +14 -82
  730. package/payload/lifecycle-kit/templates/stages/build.md +30 -98
  731. package/payload/lifecycle-kit/templates/stages/close.md +21 -170
  732. package/payload/lifecycle-kit/templates/stages/scope.md +42 -167
  733. package/payload/lifecycle-kit/templates/stages/spec.md +31 -97
  734. package/payload/lifecycle-kit/templates/stages/validate.md +22 -59
  735. package/payload/lifecycle-kit/templates/upgrade.md +6 -37
  736. package/payload/queue-kit/README.md +33 -48
  737. package/payload/queue-kit/checks/check-deferred-board-tags.gate +3 -0
  738. package/payload/queue-kit/checks/check-queue-entry-budget.gate +2 -2
  739. package/payload/queue-kit/checks/check-queue-hygiene.gate +2 -2
  740. package/payload/queue-kit/checks/check-queue-prose-precondition.gate +1 -1
  741. package/payload/queue-kit/checks/check-queue-sections.gate +1 -1
  742. package/payload/queue-kit/checks/check-queue-slug-liveness.gate +2 -2
  743. package/payload/queue-kit/checks/check-queue-wrap.gate +2 -2
  744. package/payload/queue-kit/checks/check-roadmap-fresh.gate +3 -2
  745. package/payload/queue-kit/checks/check-tag-lead-line.gate +2 -2
  746. package/payload/queue-kit/checks/check-task-conservation.gate +1 -1
  747. package/payload/queue-kit/checks/check-task-names.gate +2 -2
  748. package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/TASK-QUEUE.md +41 -0
  749. package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/expect.txt +6 -0
  750. package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/widget-kit/README.md +3 -0
  751. package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/TASK-QUEUE.md +39 -0
  752. package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/expect.txt +1 -0
  753. package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/widget-kit/README.md +3 -0
  754. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +76 -31
  755. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +12 -4
  756. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.knobs +4 -0
  757. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +58 -19
  758. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/expect.txt +8 -4
  759. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.knobs +4 -0
  760. package/payload/queue-kit/gate-tests/check-queue-entry-budget.test.sh +124 -0
  761. package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/TASK-QUEUE.md +11 -1
  762. package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/expect.txt +2 -0
  763. package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +30 -11
  764. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/TASK-QUEUE.md +3 -1
  765. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/expect.txt +1 -0
  766. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/good/TASK-QUEUE.md +22 -6
  767. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/TASK-QUEUE.md +3 -1
  768. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/docs/page.md +1 -1
  769. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/expect.txt +3 -1
  770. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.knobs +1 -0
  771. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/TASK-QUEUE.md +6 -2
  772. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/page.md +3 -3
  773. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/worktrees/page.md +4 -0
  774. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.knobs +1 -0
  775. package/payload/queue-kit/gate-tests/check-queue-slug-liveness.test.sh +100 -0
  776. package/payload/queue-kit/gate-tests/check-queue-wrap/bad/TASK-QUEUE.md +3 -1
  777. package/payload/queue-kit/gate-tests/check-queue-wrap/good/TASK-QUEUE.md +20 -6
  778. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/TASK-QUEUE.md +15 -8
  779. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.knobs +5 -0
  780. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/TASK-QUEUE.md +13 -6
  781. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.knobs +5 -0
  782. package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/TASK-QUEUE.md +28 -7
  783. package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/expect.txt +10 -2
  784. package/payload/queue-kit/gate-tests/check-tag-lead-line/good/TASK-QUEUE.md +30 -8
  785. package/payload/queue-kit/gate-tests/check-task-names/bad/TASK-QUEUE.md +18 -3
  786. package/payload/queue-kit/gate-tests/check-task-names/bad/expect.txt +9 -0
  787. package/payload/queue-kit/gate-tests/check-task-names/good/TASK-QUEUE.md +20 -6
  788. package/payload/queue-kit/gate-tests/entry-history.test.sh +197 -0
  789. package/payload/queue-kit/gate-tests/queue-counts.test.sh +77 -73
  790. package/payload/queue-kit/gate-tests/queue-edges.test.sh +168 -87
  791. package/payload/queue-kit/gate-tests/queue-index.test.sh +30 -16
  792. package/payload/queue-kit/gate-tests/roadmap.test.sh +65 -58
  793. package/payload/queue-kit/templates/TASK-QUEUE.md +36 -23
  794. package/payload/queue-kit/templates/queue-config.knobs +1 -0
  795. package/payload/site-kit/README.md +26 -45
  796. package/payload/site-kit/checks/check-docs-cname-parity.gate +1 -1
  797. package/payload/site-kit/checks/check-docs-highlight-coverage.gate +4 -0
  798. package/payload/site-kit/checks/check-docs-liquid-parse.gate +3 -0
  799. package/payload/site-kit/checks/check-docs-render-fidelity.gate +3 -0
  800. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +1 -1
  801. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/scripts/site-config.knobs +2 -0
  802. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +2 -2
  803. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/scripts/site-config.knobs +2 -0
  804. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/docs/_layouts/default.html +11 -0
  805. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/expect.txt +4 -0
  806. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/scripts/highlight-tokens.list +7 -0
  807. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/scripts/site-config.knobs +3 -0
  808. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/docs/_layouts/default.html +14 -0
  809. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/expect.txt +1 -0
  810. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/scripts/highlight-tokens.list +7 -0
  811. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/scripts/site-config.knobs +1 -0
  812. package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/docs/_layouts/default.html +4 -0
  813. package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/docs/span.md +3 -0
  814. package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/expect.txt +2 -0
  815. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/_layouts/default.html +4 -0
  816. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/front.md +7 -0
  817. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/loop.md +5 -0
  818. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/plain.html +1 -0
  819. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/raw.md +3 -0
  820. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/search.json +4 -0
  821. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/expect.txt +1 -0
  822. package/payload/site-kit/gate-tests/check-docs-liquid-parse-parser.test.sh +62 -0
  823. package/payload/site-kit/gate-tests/check-docs-render-fidelity-batch.test.sh +40 -45
  824. package/payload/site-kit/gate-tests/check-docs-render-fidelity-foreign.test.sh +7 -4
  825. package/payload/site-kit/gate-tests/check-docs-render-fidelity-span.test.sh +7 -4
  826. package/payload/site-kit/gate-tests/check-docs-render-fidelity-table.test.sh +7 -4
  827. package/payload/site-kit/templates/site-health.yml +67 -4
  828. package/profiles.list +4 -5
  829. package/lib/common/digest.sh +0 -18
  830. package/lib/common/lock.sh +0 -75
  831. package/lib/common/profile.sh +0 -91
  832. package/lib/common/recipe.sh +0 -106
  833. package/lib/diff.sh +0 -66
  834. package/lib/doctor.sh +0 -164
  835. package/lib/init.sh +0 -428
  836. package/lib/uninstall.sh +0 -214
  837. package/lib/update.sh +0 -34
  838. package/payload/canon-kit/SPEC.md +0 -2443
  839. package/payload/canon-kit/checks/check-surface-duplication.sh +0 -106
  840. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +0 -6
  841. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +0 -6
  842. package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.sh +0 -10
  843. package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.sh +0 -10
  844. package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.sh +0 -6
  845. package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.sh +0 -6
  846. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.sh +0 -8
  847. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.sh +0 -8
  848. package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.sh +0 -4
  849. package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.sh +0 -4
  850. package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.sh +0 -8
  851. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.sh +0 -5
  852. package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.sh +0 -5
  853. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/scripts/canon-config.sh +0 -6
  854. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/scripts/canon-config.sh +0 -6
  855. package/payload/canon-kit/lib/spec.sh +0 -560
  856. package/payload/canon-kit/smoke/install.sh +0 -58
  857. package/payload/canon-kit/smoke/violation.sh +0 -22
  858. package/payload/canon-kit/templates/canon-config.sh +0 -2
  859. package/payload/context-kit/SPEC.md +0 -1134
  860. package/payload/context-kit/bin/always-loaded.sh +0 -70
  861. package/payload/context-kit/bin/env-probe.sh +0 -142
  862. package/payload/context-kit/bin/md-index.sh +0 -80
  863. package/payload/context-kit/bin/md-section.sh +0 -63
  864. package/payload/context-kit/bin/pub-index.sh +0 -90
  865. package/payload/context-kit/bin/run-index-tests.sh +0 -91
  866. package/payload/context-kit/gate-tests/check-footprint-fresh/good/args +0 -4
  867. package/payload/context-kit/gate-tests/check-footprint-fresh/good/emit.txt +0 -12
  868. package/payload/context-kit/gate-tests/check-footprint-fresh/good/projection.txt +0 -12
  869. package/payload/context-kit/index-tests/expected/toolfloor.txt +0 -23
  870. package/payload/context-kit/index-tests/toolfloor-cases.sh +0 -49
  871. package/payload/context-kit/lib/context.sh +0 -56
  872. package/payload/context-kit/lib/pub-lang/rust.sh +0 -26
  873. package/payload/context-kit/lib/pub-lang/ts.sh +0 -32
  874. package/payload/context-kit/lib/toolfloor.sh +0 -58
  875. package/payload/context-kit/smoke/agents-md.sh +0 -139
  876. package/payload/context-kit/smoke/install.sh +0 -64
  877. package/payload/context-kit/smoke/violation.sh +0 -21
  878. package/payload/context-kit/templates/context-config.sh +0 -2
  879. package/payload/delegation-kit/SPEC.md +0 -2078
  880. package/payload/delegation-kit/bin/run-budget-guard-tests.sh +0 -88
  881. package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +0 -97
  882. package/payload/delegation-kit/bin/run-trend-tests.sh +0 -63
  883. package/payload/delegation-kit/bin/run-usage-tests.sh +0 -226
  884. package/payload/delegation-kit/bin/usage-trend.sh +0 -120
  885. package/payload/delegation-kit/bin/usage-verdict.sh +0 -144
  886. package/payload/delegation-kit/bin/wait-probe.sh +0 -184
  887. package/payload/delegation-kit/gate-tests/subagent-stop-liveness.test.sh +0 -99
  888. package/payload/delegation-kit/lib/delegation.sh +0 -84
  889. package/payload/delegation-kit/smoke/install.sh +0 -83
  890. package/payload/delegation-kit/smoke/violation.sh +0 -16
  891. package/payload/delegation-kit/templates/agent-budget-guard.sh +0 -18
  892. package/payload/delegation-kit/templates/agent-dispatch-guard.sh +0 -61
  893. package/payload/delegation-kit/templates/delegation-config.sh +0 -6
  894. package/payload/delegation-kit/templates/statusline-usage.sh +0 -101
  895. package/payload/delegation-kit/templates/subagent-stop-liveness.sh +0 -56
  896. package/payload/delegation-kit/templates/usage-poller.sh +0 -67
  897. package/payload/delegation-kit/usage-tests/budget-guard-cases.tsv +0 -20
  898. package/payload/doctrine-kit/SPEC.md +0 -385
  899. package/payload/doctrine-kit/bin/install-doctrine.sh +0 -194
  900. package/payload/doctrine-kit/bin/stage-rules.sh +0 -51
  901. package/payload/doctrine-kit/lib/doctrine.sh +0 -29
  902. package/payload/doctrine-kit/smoke/install.sh +0 -203
  903. package/payload/doctrine-kit/smoke/violation.sh +0 -13
  904. package/payload/drift-kit/SPEC.md +0 -1187
  905. package/payload/drift-kit/bin/drift-report.sh +0 -155
  906. package/payload/drift-kit/bin/kfric.sh +0 -61
  907. package/payload/drift-kit/bin/overhead-meter.sh +0 -106
  908. package/payload/drift-kit/bin/stage-economics.sh +0 -465
  909. package/payload/drift-kit/kpis/kpi-always-loaded.sh +0 -39
  910. package/payload/drift-kit/kpis/kpi-amendment-age.sh +0 -33
  911. package/payload/drift-kit/kpis/kpi-deferred-age.sh +0 -46
  912. package/payload/drift-kit/kpis/kpi-gate-backlog.sh +0 -52
  913. package/payload/drift-kit/kpis/kpi-gate-runtime.sh +0 -31
  914. package/payload/drift-kit/kpis/kpi-incident-recurrence.sh +0 -42
  915. package/payload/drift-kit/kpis/kpi-knowledge-friction.sh +0 -21
  916. package/payload/drift-kit/kpis/kpi-overhead.sh +0 -44
  917. package/payload/drift-kit/kpis/kpi-price-table-age.sh +0 -68
  918. package/payload/drift-kit/kpis/kpi-prompt-friction.sh +0 -38
  919. package/payload/drift-kit/kpis/kpi-queue-net-delta.sh +0 -74
  920. package/payload/drift-kit/kpis/kpi-settings-local.sh +0 -21
  921. package/payload/drift-kit/kpis/kpi-task-split.sh +0 -43
  922. package/payload/drift-kit/lib/drift.sh +0 -43
  923. package/payload/drift-kit/smoke/install.sh +0 -537
  924. package/payload/drift-kit/smoke/overhead-fixture.jsonl +0 -4
  925. package/payload/drift-kit/templates/drift-config.sh +0 -2
  926. package/payload/evidence-kit/SPEC.md +0 -740
  927. package/payload/evidence-kit/bin/diff-baseline.sh +0 -34
  928. package/payload/evidence-kit/bin/run-validate.sh +0 -124
  929. package/payload/evidence-kit/checks/check-producer-liveness.sh +0 -75
  930. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.sh +0 -7
  931. package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.sh +0 -7
  932. package/payload/evidence-kit/lib/evidence.sh +0 -193
  933. package/payload/evidence-kit/smoke/install.sh +0 -59
  934. package/payload/evidence-kit/smoke/violation.sh +0 -8
  935. package/payload/evidence-kit/templates/evidence-config.sh +0 -2
  936. package/payload/gate-sdk/SPEC.md +0 -10872
  937. package/payload/gate-sdk/bin/gen-pre-commit.sh +0 -297
  938. package/payload/gate-sdk/bin/install-hooks.sh +0 -60
  939. package/payload/gate-sdk/bin/port-blockers.sh +0 -473
  940. package/payload/gate-sdk/bin/run-consumer-smoke.sh +0 -239
  941. package/payload/gate-sdk/bin/run-gate-tests.sh +0 -179
  942. package/payload/gate-sdk/bin/upgrade-smoke.sh +0 -236
  943. package/payload/gate-sdk/checks/check-action-run-shell.sh +0 -223
  944. package/payload/gate-sdk/checks/check-crate-arms.sh +0 -62
  945. package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +0 -450
  946. package/payload/gate-sdk/checks/check-install-disposition.sh +0 -93
  947. package/payload/gate-sdk/checks/check-shellcheck.sh +0 -57
  948. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.sh +0 -2
  949. package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.sh +0 -2
  950. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/args +0 -4
  951. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/emit.txt +0 -14
  952. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/projection.txt +0 -14
  953. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.sh +0 -2
  954. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.sh +0 -2
  955. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.sh +0 -6
  956. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/stub-bin +0 -3
  957. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.sh +0 -6
  958. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/stub-bin +0 -3
  959. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/installer/lib/common/recipe.sh +0 -9
  960. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-beta.gate +0 -3
  961. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-gamma.sh +0 -6
  962. package/payload/gate-sdk/gate-tests/check-install-disposition/good/installer/lib/common/recipe.sh +0 -10
  963. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +0 -5
  964. package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +0 -5
  965. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.sh +0 -5
  966. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.sh +0 -5
  967. package/payload/gate-sdk/gate-tests/declaration-lib-parity.test.sh +0 -211
  968. package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +0 -112
  969. package/payload/gate-sdk/lib/consumer-smoke.sh +0 -69
  970. package/payload/gate-sdk/lib/declaration.sh +0 -59
  971. package/payload/gate-sdk/lib/inject.sh +0 -80
  972. package/payload/gate-sdk/smoke/install.sh +0 -171
  973. package/payload/gate-sdk/smoke/violation.sh +0 -13
  974. package/payload/guard-kit/SPEC.md +0 -1415
  975. package/payload/guard-kit/bin/compare-settings-allow.sh +0 -115
  976. package/payload/guard-kit/bin/run-guard-tests.sh +0 -110
  977. package/payload/guard-kit/bin/scan-prompts.sh +0 -166
  978. package/payload/guard-kit/bin/scratch-run.sh +0 -34
  979. package/payload/guard-kit/gate-tests/guard-read-path.test.sh +0 -52
  980. package/payload/guard-kit/lib/guard.sh +0 -1014
  981. package/payload/guard-kit/smoke/install.sh +0 -26
  982. package/payload/guard-kit/templates/bash-guard.sh +0 -20
  983. package/payload/guard-kit/templates/escalation-guard.sh +0 -27
  984. package/payload/guard-kit/templates/guard-config.sh +0 -8
  985. package/payload/guard-kit/templates/wakeup-guard.sh +0 -20
  986. package/payload/lifecycle-kit/SPEC.md +0 -2884
  987. package/payload/lifecycle-kit/bin/cite-survey.sh +0 -81
  988. package/payload/lifecycle-kit/bin/enter-stage.sh +0 -380
  989. package/payload/lifecycle-kit/bin/file-gap.sh +0 -101
  990. package/payload/lifecycle-kit/bin/file-survey.sh +0 -69
  991. package/payload/lifecycle-kit/bin/install-lifecycle.sh +0 -36
  992. package/payload/lifecycle-kit/bin/session-id.sh +0 -75
  993. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.sh +0 -4
  994. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.sh +0 -4
  995. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.sh +0 -4
  996. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.sh +0 -4
  997. package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +0 -100
  998. package/payload/lifecycle-kit/lib/stages.sh +0 -194
  999. package/payload/lifecycle-kit/smoke/install.sh +0 -434
  1000. package/payload/lifecycle-kit/smoke/violation.sh +0 -8
  1001. package/payload/lifecycle-kit/templates/lifecycle-config.sh +0 -2
  1002. package/payload/lifecycle-kit/templates/workflow-state-guard.sh +0 -29
  1003. package/payload/queue-kit/SPEC.md +0 -1436
  1004. package/payload/queue-kit/bin/lesson-sink.sh +0 -28
  1005. package/payload/queue-kit/bin/queue-counts.sh +0 -35
  1006. package/payload/queue-kit/bin/queue-edges.sh +0 -78
  1007. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.sh +0 -6
  1008. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.sh +0 -6
  1009. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.sh +0 -3
  1010. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.sh +0 -3
  1011. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.sh +0 -6
  1012. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.sh +0 -6
  1013. package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +0 -215
  1014. package/payload/queue-kit/lib/queue.sh +0 -129
  1015. package/payload/queue-kit/smoke/install.sh +0 -25
  1016. package/payload/queue-kit/smoke/violation.sh +0 -8
  1017. package/payload/queue-kit/templates/queue-config.sh +0 -2
  1018. package/payload/site-kit/SPEC.md +0 -601
  1019. package/payload/site-kit/checks/check-docs-render-fidelity.sh +0 -242
  1020. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/scripts/site-config.sh +0 -7
  1021. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/scripts/site-config.sh +0 -7
  1022. package/payload/site-kit/lib/site.sh +0 -43
  1023. package/payload/site-kit/smoke/install.sh +0 -34
  1024. package/payload/site-kit/smoke/violation.sh +0 -20
  1025. /package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/{check-ported.gate → check-stage-entry.gate} +0 -0
@@ -1,400 +1,34 @@
1
- CONSUMER BINDING — create `.claude/commands/agent-execution.md` as a binding
2
- shim naming this template (a header `Execute the template at <path>, applying
3
- the bindings below.` then a `## Bindings` section) and bind its two slots — the
4
- shared-file roster and the validate battery. The full delegated-`Agent`
5
- execution protocol (any stage, any purpose — an audit, a build sweep, a one-off
6
- investigation). A resident pointer in CLAUDE.md §Agent execution keeps the
7
- protocol reachable from a delegating session; this skill is the complete
8
- procedure.
1
+ CONSUMER BINDING — create `.claude/commands/agent-execution.md` as a binding shim naming this template (a header `Execute the template at <path>, applying the bindings below.` then a `## Bindings` section) and bind its two slots — the shared-file roster and the validate battery. The full delegated-`Agent` execution protocol (any stage, any purpose — an audit, a build sweep, a one-off investigation). A resident pointer in the consumer's agent file keeps the protocol reachable from a delegating session; this skill is the complete procedure.
9
2
 
10
- For a **deletion, rename, or heavy cross-spec audit** dispatch, also load the
11
- mechanical pre-flight in [dispatch-checklists.md](dispatch-checklists.md) — a
12
- reach-through, not a change to this protocol; every rule below still applies.
3
+ For a **deletion, rename, or heavy cross-spec audit** dispatch, also load the mechanical pre-flight in [dispatch-checklists.md](dispatch-checklists.md) — a reach-through, not a change to this protocol; every rule below still applies.
13
4
 
14
- Two bullets below — **Background + notification, never poll** and **Findings you
15
- will act on are durable before you act on them** — bind a dispatched role that
16
- fires no trigger loading this template, so each is also stated as a bare
17
- imperative in the consumer's always-loaded agent definition under
18
- delegation-kit/SPEC.md §Operative residency. That copy is sanctioned rather than
19
- drift: do not delete it on sight, and when either rule changes here, propagate.
5
+ Four passages below — the **Background + notification, never poll** and **Findings you will act on are durable before you act on them** bullets, and the child-side clauses of isolation cost **(3)**, the resume check included — bind a dispatched role that fires no trigger loading this template, so each is also stated as a bare imperative in the consumer's always-loaded agent definition under delegation-kit/SPEC.md §Operative residency. That copy is sanctioned rather than drift: do not delete it on sight, and when any of the four changes here, propagate.
20
6
 
21
- - **Supervisor owns rulings; agents surface, never guess.** SECURITY and design
22
- rulings (e.g. a privileged caller set, a naming collision) are decided by the
23
- supervisor and handed down; an agent that hits anything its brief doesn't cover
24
- stops and reports rather than choosing.
25
- - **Background + notification, never poll.** Always `run_in_background`; wait for
26
- the completion notification; do not read the output file. Backgrounding keeps
27
- the main loop free to redirect. Backgrounding survives a **turn**, not a
28
- **session**. A supervisor's turn ends and its session lives on, so a
29
- backgrounded dispatch wakes it by notification — that is the sanctioned
30
- pattern just stated. A **dispatched agent's** turn end *is* its session end,
31
- and what that reliably kills is the **observer, not the work**: an `Agent`
32
- child is reaped with its parent, but a shell `run_in_background` child
33
- survives — orphaned, still writing, with nothing left able to read it. The
34
- survivor is the worse case, because it keeps mutating shared files while the
35
- next actor moves against them. Either way the caller gets no result, so a
36
- dispatched agent **never ends a turn on work still running** — it awaits its
37
- own long-running work to completion, however long, and reports only results
38
- it holds. Awaiting, not "dispatch in the foreground": foreground is a choice
39
- for a shell command and not reliably one for an `Agent` dispatch, which the
40
- harness may detach whether or not backgrounding was requested. And not by
41
- ending the turn to wait for the completion notification — that is the one act
42
- that revokes the channel, which is how a *careful* reader reaches this
43
- failure. Wait **in-turn on a condition** instead: loop on the work's own
44
- artifact (evidence file, lock, exit marker). Never-poll governs waiting on an
45
- `Agent`'s completion notification, a channel a supervisor has;
46
- condition-waiting is the only one a dispatched role has.
47
- **Which primitive — the one whose wait ends when the condition goes true, not
48
- when a duration expires.** The harness offers two forms with different
49
- reactivity, and the difference is exactly the wall-clock property this rule
50
- exists to buy. **Background a command that *exits* on the condition** — a
51
- `run_in_background` shell command wrapping `until <cond>; do sleep N; done` —
52
- and it fires one notification the moment the condition holds, then ends: that
53
- is the sanctioned form, and it holds that place on measurement rather than on
54
- preference (delegation-kit/SPEC.md §bin/wait-probe). The harness's
55
- **event-stream form**, armed with a command and a deadline, emits one event per
56
- occurrence and stays armed to its deadline after the event fires **when the
57
- command it was armed with is unbounded** — a `tail -f`, a `while true` — so
58
- pointed at a single completion by way of such a command it converts a wait that
59
- should end in seconds into one that ends at the timeout. Armed with a command
60
- that *exits*, that watch ends too: it is the second choice for a single
61
- completion, not a broken one, and it is named here because a reader told only
62
- about the first form reaches for this one the next time the shape looks close.
63
- Never a bare foreground `sleep`, which ends on neither.
64
- **Get the loop's polarity right — the two rules in this bullet compose into a
65
- trap, and it is the one that has actually fired.** `until` ends when its
66
- condition becomes **true**, so `until` takes a *done* predicate:
67
- `until [ -f <marker> ]; do sleep N; done`. Liveness is a *still-running*
68
- predicate, so it takes `while`: `while kill -0 "$pid" 2>/dev/null; do sleep N;
69
- done`. Composing "wrap `until <cond>`" with "loop on the recorded PID's
70
- liveness" literally gives `until kill -0 "$pid"`, whose condition is true while
71
- the producer is **alive** — so it exits at once. **The tell** is a waiter that
72
- exited **zero**, in milliseconds, with its producer still running and its
73
- condition never met. Four attested instances read as evidence against this
74
- primitive until they were measured and found to be this instead; neither keyword
75
- costs anything at the guard, which reads the loop's span and not its keyword.
76
- **What you wait *on* splits two ways, and the split is what makes the artifact
77
- reachable.** An **`Agent` dispatch** is awaited by its **completion
78
- notification** — that record is the harness's, not the session's — so never go
79
- looking for it on disk. A **shell child** has no notification channel of its
80
- own, so it is awaited on an artifact *the session placed*, and that artifact is
81
- named: **record the child's PID at launch**, one line in the form
82
- `pid=<n> run=<key>`, in a file named **`<key>.run`** — the same `<key>`, so the
83
- name carries no field the line does not — written where the **Resume journal —
84
- agent writes, scratch reset sweeps** bullet below sends a journal, repo-local
85
- gitignored scratch in the main checkout, on that bullet's stated survivability
86
- grounds — widened here from the journal to any artifact a session waits on.
87
- That record *is* the wait target: loop on its PID's liveness —
88
- `while kill -0 "$pid" 2>/dev/null; do sleep N; done`, on the polarity rule above
89
- — and the loop ends when the PID stops answering. Write it at the launch, not after, and leave it
90
- behind — a completion marker answers *is it done* to a live observer, and the
91
- case this rule exists for is the one where the observer is gone, where a
92
- liveness record still answers *is it still running* to whoever arrives next.
93
- Whoever that is reads it with `check-producer-liveness <record>` — or, because
94
- the `.run` suffix makes the set a glob rather than a path someone must be told,
95
- `check-producer-liveness <scratch-dir>` over all of them at once — unchanged
96
- and already wired (evidence-kit/SPEC.md §check-producer-liveness), which is why
97
- the record is in that gate's grammar rather than a shape of your own.
98
- **Delete the record when its producer is done, and never before.** While one
99
- names a live PID, a guard blocks every `git` command that writes the index, the
100
- worktree or a ref (guard-kit/SPEC.md §The generic ruleset, rule 14) — a commit
101
- taken under a live producer dirties the tree it is measuring and costs that
102
- run's whole verdict. Deleting a record whose producer has exited is not a way
103
- around the block: it is a statement of fact that has become false being
104
- retracted.
105
- **And never by pattern-matching the process table.** `pgrep -f '<pattern>'`
106
- matches the waiter's own argv — the harness's wrapper argv matches too — so
107
- `until ! pgrep -f '<script>'; do …; done` can never go false and never exits,
108
- reddening nothing while it burns the whole foreground cap. Where liveness *is*
109
- the condition, match a **recorded PID** (`while kill -0 "$pid" 2>/dev/null`) and never a pattern —
110
- one rule, whoever started the producer, your own backgrounded child included: a
111
- PID is an identity, a pattern is a guess about a process table that includes the
112
- guesser. The
113
- bracket-trick repair (`pgrep -f '[r]un-smoke.sh'`) is **not** the sanctioned
114
- form, and its grounds for being refused are
115
- delegation-kit/SPEC.md §The delegation model's.
116
- - **Serialize on shared files; ≤`DELEGATION_KIT_FAN_WIDTH`-wide otherwise.**
117
- Agents that edit a shared file (see the roster below) run one at a time —
118
- dispatch, await notification, verify, dispatch the next. Independent
119
- read-only units may run ≤`DELEGATION_KIT_FAN_WIDTH`-wide. **The git index and
120
- HEAD are shared files for every agent that commits**, independent of
121
- source-file disjointness: two committing agents racing `git add`/`git commit`
122
- interleave and one sweeps the other's staged files under the wrong message. So
123
- agents that each commit must be **serialized** *or* run under
124
- `isolation: worktree` (own index); reserve the unlocked
125
- ≤`DELEGATION_KIT_FAN_WIDTH`-wide bound for **read-only** fan-outs. "No lockfile
126
- churn" is a false safety signal — the index is shared regardless.
127
- Serialization is by **completion**, not by notification: the next dispatch
128
- begins after the previous one has *returned and been verified*. A supervisor
129
- reaches that point via the completion notification; a **dispatched agent**
130
- reaches it in-turn, awaiting each child before dispatching the next (it cannot
131
- end its turn to wait — see the backgrounding rule). The ordering requirement
132
- is identical for both; only the waiting mechanism differs, and neither role
133
- may overlap two agents on a shared file or the git index.
134
- - **Never dispatch a fork to narrow a child.** A fork is wrong exactly when the
135
- dispatch's purpose is that the child does *less* than the parent: a fork
136
- inherits the parent's context, toolset and model tier whole and disclaims
137
- nothing, so every narrowing survives only as a sentence in the prompt. Three
138
- dispatching contexts, each with its own grounds. A **read-only audit or
139
- survey** wants narrower *authority* — the fork carries the parent's full
140
- reach, so the restriction is a request, and one such fork completed a whole
141
- stage, commits included. A **tier-split oracle** wants narrower *cost* — the
142
- fork inherits the dispatcher's model, which is exactly the split the posture
143
- exists to make (a lead posture that dispatches its own oracle is the named
144
- instance). A **rule-injection dispatch** wants a *different* brief — attested
145
- where five sibling forks each carried a line explaining that the roster's
146
- agent definitions do not carry it, so fork was chosen to inject rules the
147
- types lack and every one still paid to re-materialize its parent's context.
148
- The boundary, stated honestly: a fork stays correct where the child does the
149
- **same job at the same authority** and only parallelism or isolation is
150
- wanted. The dispatch guard blocks there too, because a hook cannot read
151
- intent and no sanctioned fork use exists in this doctrine — the valve is
152
- unregistering the hook, never a per-dispatch knob, which would restore the
153
- honour system the rule replaced (delegation-kit/SPEC.md §The delegation
154
- model). Grounds measured rather than asserted: in one audited iteration ten
155
- of twenty-four dispatched agents were forks, carrying 20.90 USD of 158.70 USD
156
- of priced burn.
157
- - **A read-only claim is made by isolation, not by sentence.** A brief saying
158
- "read-only, no edits" makes no claim: a subagent inherits its toolset from its
159
- **type**, never from the instruction text. The claim is made by
160
- `isolation: worktree`. Take it for an agent that *will* commit — an **own
161
- index**, the **Serialize on shared files** rule above — and for any agent
162
- *claimed* read-only, as **write confinement**. Grounds for this rule and the
163
- next: delegation-kit/SPEC.md §The delegation model.
164
- - **Isolation charges three harness costs, and paying them is the parent's job.**
165
- **(1) The worktree's base is configuration, and the default is not HEAD.**
166
- `worktree.baseRef` selects it: `fresh` (the default) branches from
167
- `origin/<default-branch>`, `head` from the dispatcher's local HEAD. Set it
168
- deliberately, and pin it, before you design around it. Under `fresh` a child
169
- reads the *pre-change* tree: read your exposure with
170
- `git log origin/<default-branch>..HEAD` before dispatching. Naming a commit in
171
- the prompt does not make the checkout that commit, so state the rev and have
172
- the child verify it with `git rev-parse HEAD` and read every target with
173
- `git show <rev>:<path>`. **A child whose target is unreadable at that rev stops
174
- and says so**, and never falls back to the dispatch prompt's own paraphrase of
175
- it. **(2) The worktree lands inside the repo and untracked**, so an in-flight
176
- isolated agent reads as a dirty tree and aborts every clean-tree precondition —
177
- a consumer smoke, a packaging step, any commit. Gitignore the path, and reap
178
- agents at the boundary with `git worktree list` rather than off `git status`.
179
- **(3) An isolated child sees only committed state.** Untracked and gitignored
180
- files are in no commit, so no base ref reaches them and naming a rev does not
181
- help. **A sweep whose corpus includes an untracked surface is not delegable to
182
- an isolated agent**: read that surface yourself, or pass its content in the
183
- prompt.
184
- - **One commit per unit, sized to finish within budget.** Each unit gets its own
185
- commit (+ a `[blocked-by: prior]` tag where ordered). A unit that investigates
186
- long before its first commit is the only thing an interrupt can destroy —
187
- split it. Trigger to split: >4 components, OR mixes mechanical + architectural
188
- work, OR >300 tool calls estimated.
189
- - **Gate-driven worklist where one exists.** Drive the sweep from the gate's
190
- output, so an interrupt loses only the in-flight uncommitted unit and a fresh
191
- session re-runs the gate to resume.
192
- - **Resume journal — agent writes, scratch reset sweeps.** The agent `Write`s a
193
- running progress journal (findings triaged, edits applied, what remains) to a
194
- repo-local gitignored scratch dir in the main checkout — `.tmp/` here — never a
195
- temporary worktree (deleted with the worktree) nor a system temp dir (a restart
196
- wipes it); name the path **absolute into the main checkout** in the dispatch
197
- prompt so a worktree-isolated agent writes to the surviving tree, not its doomed
198
- one. Repo-dir-local scratch is reboot-survivable, cheap to clean, and predictable
199
- across coding agents. The agent updates it as it goes; on success it appends a
200
- `DONE` marker. Each finding is
201
- written into the journal *inline as it is confirmed* — never "see final
202
- output": the agent's return message dies with the session, so a pointer-only
203
- journal makes `DONE` lie about recoverability. **Nobody deletes a journal
204
- while the work it covers is live** — not the agent (no `rm`) and not the
205
- supervisor, whose deletion would take the file out from under a resumed agent
206
- and destroy its own pull channel mid-unit. Cleanup is the consumer's scratch
207
- reset at its next work-unit boundary, not a chore in this protocol. `DONE` is
208
- the completion marker and counts **only as the file's last line**: a session
209
- resumed past its own marker appends after it. A journal *without* a `DONE`
210
- marker signals interruption only in a **cold read**
211
- — the supervisor found a journal but never consumed the agent's return (its
212
- session died before returning); there, no `DONE` = interrupted, resume from
213
- it. On the ordinary path the supervisor consumed the return and ran its
214
- post-commit verification, which *is* the completion attest, so the missing
215
- marker is redundant, not a signal of interruption. Since every journal now
216
- outlives its session, presence alone signals nothing — tell a live journal
217
- from a spent one by its per-session name, the work cursor, and `git log`
218
- (delegation-kit/SPEC.md §Resume journal — agent writes, scratch reset
219
- sweeps). **Caveat — a background agent's sandbox may block
220
- the journal write.** `run_in_background` agents have been observed unable to
221
- `Write` to the granted path and silently falling back to returning findings in
222
- their final message — which makes the journal mechanic non-functional exactly
223
- when it matters (a long, interruptible run). So: for a **read-only fan-out**
224
- (audit, survey), the return value *is* the contract — don't rely on a journal.
225
- Reserve the **journal** for agents that **mutate files**, and for those grant
226
- the journal path explicitly before dispatch rather than assuming the write
227
- succeeds. **Worktree isolation is not reserved with it** — the two answer
228
- different questions, and bundling them read as *a read-only fan-out needs no
229
- isolation*, which is the reading that licensed an unreviewed commit on the
230
- shared branch. A read-only fan-out takes isolation precisely *because* it is
231
- claimed read-only (the **A read-only claim is made by isolation, not by
232
- sentence** rule above). A contract has two ends, though: the child owes
233
- no journal, and the **parent** owes the durable landing of what it received
234
- before acting on it (next bullet). The caveat is about a backgrounded child's
235
- write failing silently, so it never licensed the parent — which has already
236
- demonstrated it can write, being the session that granted the path.
237
- - **A child's only upward route is a durable artifact.** Probed, not assumed: a
238
- child's sends to an invented dispatcher name and to its own agent type both
239
- failed, only a send addressed to the **top-level session** arrived, and
240
- neither level knows its own identity or its parent's. There is therefore no
241
- address a child can use to reach the agent that dispatched it, and four
242
- dispositions follow. **(1) A durable artifact, for anything mid-run** — the
243
- dispatcher mints a path, names it **absolute into the main checkout** in the
244
- prompt, and the child writes as it goes. That is already the journal rule
245
- above; it is now also the *only* upward route there is, and it is stronger
246
- than a message would be, because a file survives a child that dies before
247
- returning. A **stop signal takes the same shape** — a sentinel the child
248
- checks — so it is cooperative by construction and a wedged child stays out of
249
- reach. **(2) Return-value only, otherwise** — a fan-out needing no mid-run
250
- channel needs no artifact, which is the read-only carve-out above. **(3) The
251
- downward half is a dispatch-shape rule** — a dispatcher that wants control
252
- over its fan-out dispatches in the background and keeps the handle; what
253
- actually failed was a dispatcher blocked on a foreground dispatch, holding
254
- neither the handle nor a turn. **(4) Naming the address a child should use is
255
- refused** — there is none, and the refusal is stated rather than omitted
256
- because it is the first thing both original filings reached for. Two
257
- corollaries defeat the workarounds a reader would otherwise invent: a message
258
- that does reach the top-level session is attributed to the sender's **type**,
259
- so a fan-out wider than one is ambiguous at the receiving end; and a child
260
- resumed by a message from its dispatcher still cannot reply, so being
261
- addressed creates no return path. One live hazard rides with them: the
262
- message and stop tools may be **deferred** for a dispatched agent — callable
263
- only after a discovery call it has to know to make — so a child that needs to
264
- escalate may not hold the channel at all. Hence the obligation, which is the
265
- part that binds you: **a dispatcher handing out work that will need a mid-run
266
- channel grants a durable path with it**, and reads that path itself.
7
+ - **Supervisor owns rulings; agents surface, never guess.** SECURITY and design rulings (e.g. a privileged caller set, a naming collision) are decided by the supervisor and handed down; an agent that hits anything its brief doesn't cover stops and reports rather than choosing.
8
+ - **Background + notification, never poll.** Always `run_in_background`; wait for the completion notification; do not read the output file. Backgrounding keeps the main loop free to redirect. Backgrounding survives a **turn**, not a **session**. A supervisor's turn ends and its session lives on, so a backgrounded dispatch wakes it by notification — that is the sanctioned pattern just stated. A **dispatched agent's** turn end *is* its session end, and what that reliably kills is the **observer, not the work**: an `Agent` child is reaped with its parent, but a shell `run_in_background` child survives — orphaned, still writing, with nothing left able to read it. The survivor is the worse case, because it keeps mutating shared files while the next actor moves against them. Either way the caller gets no result, so a dispatched agent **never ends a turn on work still running** — it awaits its own long-running work to completion, however long, and reports only results it holds. Awaiting, not "dispatch in the foreground": foreground is a choice for a shell command and not reliably one for an `Agent` dispatch, which the harness may detach whether or not backgrounding was requested. And not by ending the turn to wait for the completion notification — that is the one act that revokes the channel, which is how a *careful* reader reaches this failure. Wait **in-turn on a condition** instead: loop on the work's own artifact (evidence file, lock, exit marker). Never-poll governs waiting on an `Agent`'s completion notification, a channel a supervisor has; condition-waiting is the only one a dispatched role has. **Which primitive — the one whose wait ends when the condition goes true, not when a duration expires.** The harness offers two forms with different reactivity, and the difference is exactly the wall-clock property this rule exists to buy. **Background a command that *exits* on the condition** — a `run_in_background` shell command wrapping `until <cond>; do sleep N; done` — and it fires one notification the moment the condition holds, then ends: that is the sanctioned form, and it holds that place on measurement rather than on preference (delegation-kit/SPEC.md §bin/wait-probe). The harness's **event-stream form**, armed with a command and a deadline, emits one event per occurrence and stays armed to its deadline after the event fires **when the command it was armed with is unbounded** — a `tail -f`, a `while true` — so pointed at a single completion by way of such a command it converts a wait that should end in seconds into one that ends at the timeout. Armed with a command that *exits*, that watch ends too: it is the second choice for a single completion, not a broken one, and it is named here because a reader told only about the first form reaches for this one the next time the shape looks close. Never a bare foreground `sleep`, which ends on neither. **Get the loop's polarity right — the two rules in this bullet compose into a trap, and it is the one that has actually fired.** `until` ends when its condition becomes **true**, so `until` takes a *done* predicate: `until [ -f <marker> ]; do sleep N; done`. Liveness is a *still-running* predicate, so it takes `while`: `while kill -0 <pid> 2>/dev/null; do sleep N; done`, `<pid>` the literal from the record, never `$pid`. Composing "wrap `until <cond>`" with "loop on the recorded PID's liveness" literally gives `until kill -0 <pid>`, whose condition is true while the producer is **alive** — so it exits at once. **The tell** is a waiter that exited **zero**, in milliseconds, with its producer still running and its condition never met. Neither keyword costs anything at the guard, which reads the loop's span and not its keyword. **What you wait *on* splits two ways, and the split is what makes the artifact reachable.** An **`Agent` dispatch** is awaited by its **completion notification** — that record is the harness's, not the session's — so never go looking for it on disk. A **shell child** has no notification channel of its own, so it is awaited on an artifact *the session placed*, and which artifact depends on what the child **is**. A **producer** — a child that writes anything a later reader must not race — is awaited on a **liveness record you write at its launch**, one line in the form `pid=<n> run=<key>`, in a file named **`<key>.run`** — the same `<key>`, so the name carries no field the line does not — written where the **Resume journal — agent writes, scratch reset sweeps** bullet below sends a journal, repo-local gitignored scratch in the main checkout, on that bullet's stated survivability grounds, widened here from the journal to any artifact a session waits on. An **observer** — a wait loop, a read-only pipeline, anything that writes nothing — **writes no record**. **Launch and record in one call, in the spelling the guard grants**: guard-kit's rule *Backgrounded launch that records no producer* (guard-kit/SPEC.md §The generic ruleset) owns the spelling and enforces the same producer/observer split, exempting an **inline** wait loop and a read-only pipeline from the record. It refuses any other launch that writes no record, and a record written in any other spelling costs a permission decision on its `$!`. Spell a wait inline so it meets that exemption; a wait behind a script or binary name is invisible to the guard's span walk and takes the record like any launch. **A call the harness moves to the background on its timeout is a launch you did not make, and it is yours.** The result says so ("moved to the background"), and nothing recorded it. Prevent it: give a foreground call a timeout above the command's run, and launch anything that can outrun that timeout backgrounded, with its record, as above. If a call is moved anyway, it is a live producer from that moment. Where it names its own pid (a lock, a printed pid), write its `<key>.run` record from that pid at once. Either way, end no turn and write nothing to the tracked tree until its completion notification arrives. **A recorded wait owes one check before it starts: can my own record falsify my condition?** Such a wait is only safe where its condition is independent of the record set. A condition that *reads* the record set, directly or through a gate that does — a stage entry, a commit, any tracked-tree write — is falsified by the waiter's own record and can never go true. Two lawful answers: respell the wait inline so it owes no record, or wait on the artifact itself rather than on the gate that reads the record set. A producer's record *is* the wait target: loop on its PID's liveness — `while kill -0 <pid> 2>/dev/null; do sleep N; done`, on the polarity rule above — and the loop ends when the PID stops answering. Write it at the launch, not after, and leave it behind — a completion marker answers *is it done* to a live observer, and the case this rule exists for is the one where the observer is gone, where a liveness record still answers *is it still running* to whoever arrives next. Whoever that is reads it with `check-producer-liveness <record>` — or, because the `.run` suffix makes the set a glob rather than a path someone must be told, `check-producer-liveness <scratch-dir>` over all of them at once — unchanged and already wired (evidence-kit/SPEC.md §check-producer-liveness), which is why the record is in that gate's grammar rather than a shape of your own. **Delete the record when its producer is done, and never before.** While one names a live PID, a guard blocks every `git` command that writes the index, the worktree or a ref (guard-kit rule `git_mutation_under_producer`) — a commit taken under a live producer dirties the tree it is measuring and costs that run's whole verdict. Deleting a record whose producer has exited is not a way around the block: it is a statement of fact that has become false being retracted. **And never by pattern-matching the process table.** `pgrep -f '<pattern>'` matches the waiter's own argv — the harness's wrapper argv matches too — so `until ! pgrep -f '<script>'; do …; done` can never go false and never exits, reddening nothing while it burns the whole foreground cap. Where liveness *is* the condition, match a **recorded PID** (`while kill -0 <pid> 2>/dev/null`) and never a pattern — one rule, whoever started the producer, your own backgrounded child included: a PID is an identity, a pattern is a guess about a process table that includes the guesser. The bracket-trick repair (`pgrep -f '[r]un-smoke.sh'`) is **not** the sanctioned form, and its grounds for being refused are delegation-kit/SPEC.md §The delegation model's.
9
+ - **Serialize on shared files; ≤`DELEGATION_KIT_FAN_WIDTH`-wide otherwise.** Agents that edit a shared file (see the roster below) run one at a time — dispatch, await notification, verify, dispatch the next. Independent read-only units may run ≤`DELEGATION_KIT_FAN_WIDTH`-wide. **The git index and HEAD are shared files for every agent that commits**, independent of source-file disjointness: two committing agents racing `git add`/`git commit` interleave and one sweeps the other's staged files under the wrong message. So agents that each commit must be **serialized** *or* run under `isolation: worktree` (own index); reserve the unlocked ≤`DELEGATION_KIT_FAN_WIDTH`-wide bound for **read-only** fan-outs. "No lockfile churn" is a false safety signal — the index is shared regardless. Serialization is by **completion**, not by notification: the next dispatch begins after the previous one has *returned and been verified*. A supervisor reaches that point via the completion notification; a **dispatched agent** reaches it in-turn, awaiting each child before dispatching the next (it cannot end its turn to wait — see the backgrounding rule). The ordering requirement is identical for both; only the waiting mechanism differs, and neither role may overlap two agents on a shared file or the git index.
10
+ - **Never dispatch a fork to narrow a child.** A fork is wrong exactly when the dispatch's purpose is that the child does *less* than the parent: a fork inherits the parent's context, toolset and model tier whole and disclaims nothing, so every narrowing survives only as a sentence in the prompt. Three dispatching contexts, each with its own grounds. A **read-only audit or survey** wants narrower *authority* — the fork carries the parent's full reach, so the restriction is a request. A **tier-split oracle** wants narrower *cost* — the fork inherits the dispatcher's model, which is exactly the split the posture exists to make (a lead posture that dispatches its own oracle is the named instance). A **rule-injection dispatch** wants a *different* brief — a fork chosen to inject rules the agent types lack still pays to re-materialize its parent's context. The boundary, stated honestly: a fork stays correct where the child does the **same job at the same authority** and only parallelism or isolation is wanted. The dispatch guard blocks there too, because a hook cannot read intent and no sanctioned fork use exists in this doctrine — the valve is unregistering the hook, never a per-dispatch knob, which would restore the honour system the rule replaced (delegation-kit/SPEC.md §The delegation model).
11
+ - **A read-only claim is made by isolation, not by sentence.** A brief saying "read-only, no edits" makes no claim: a subagent inherits its toolset from its **type**, never from the instruction text. The claim is made by `isolation: worktree`. Take it for an agent that *will* commit — an **own index**, the **Serialize on shared files** rule above — and for any agent *claimed* read-only, as **write confinement**. Grounds for this rule and the next: delegation-kit/SPEC.md §The delegation model.
12
+ - **Isolation charges five harness costs, and paying them is the parent's job.** **(1) The worktree's base is configuration, and the default is not HEAD.** `worktree.baseRef` selects it: `fresh` (the default) branches from `origin/<default-branch>`, `head` from the dispatcher's local HEAD. Set it deliberately, and pin it, before you design around it. Under `fresh` a child reads the *pre-change* tree: read your exposure with `git log origin/<default-branch>..HEAD` before dispatching. Naming a commit in the prompt does not make the checkout that commit, so state the rev and have the child verify it with `git rev-parse HEAD` and read every target with `git show <rev>:<path>`. **A child whose target is unreadable at that rev stops and says so**, and never falls back to the dispatch prompt's own paraphrase of it. **(2) The worktree lands inside the repo and untracked**, so an in-flight isolated agent reads as a dirty tree and aborts every clean-tree precondition — a consumer smoke, a packaging step, any commit. Gitignore the path, and **reap what you minted at your own turn end**, by `git worktree list` rather than off `git status`: once ignored, the status is clean while the worktree still stands. Reap **both** halves: `git worktree remove` clears the directory and leaves the agent's branch ref standing, so delete that ref in the same motion, or the refusal clears while the refs accrete unseen. Reap **your own** trees, never every tree you can see; the iteration-boundary refusal — which refuses to enter while any linked worktree exists (lifecycle-kit/SPEC.md §bin/enter-stage.sh) — stays the **backstop**, not the schedule. **And the pid in a worktree's lock reason is the harness's, not an agent liveness signal.** Where a harness locks the tree it writes its own supervising process's pid there, not the dispatched agent's: that process is alive for as long as your session is and carries the same pid across every dispatch and across an iteration boundary, so probing it answers *still in use* for a tree nobody holds. Judge the tree by what it carries, a clean `git status --porcelain` inside it and nothing past its base, and by whether you know a dispatch is in flight; never by that pid. **(3) An isolated child sees only committed state.** Untracked and gitignored files are in no commit, so no base ref reaches them and naming a rev does not help. **A sweep whose corpus includes an untracked or gitignored surface names that surface absolute into the main checkout** in the prompt. The child reads a named file there with the harness's read tool, and searches under it only with a read-only pipeline of the shell guard's read-only roster. Under guard-kit, its rule *A main-checkout path from a linked worktree* admits that form and refuses every other shell command naming the main checkout outside its scratch dir, and its refusal names the roster. Tell the child so in the prompt when the type's definition does not. Classify the corpus before you dispatch rather than after you read the answer; `git check-ignore` decides it. **And the child's side of it, on cost (4)'s pattern:** a target absent inside isolation because it is untracked or gitignored is a **blindness**, never a finding of absence — name the path, say it was unreadable at this rev, and return. And one more check on the child's side, at every resume as well as at the start: dispatched under isolation, confirm that your top level is a linked worktree (`git rev-parse --git-dir` differs from `git rev-parse --git-common-dir`). If it is not, your isolation is gone: stop, say so, and return without running the work. **(4) A gate dispatched to a compiled binary resolves inside an isolated worktree when the main checkout's binary matches the worktree's source, and never by a build.** The front end links that binary into the worktree after comparing source stamps (gate-sdk/SPEC.md §lib/gate.sh, `gate_verdict_bin`); a skewed or absent one leaves the gate unavailable, which inside isolation is **the expected reading, not a defect to repair**: do not read it as a verdict, and **do not build the binary**. Name the gate that could not run, say why, and return. A worktree verdict omits the main checkout's gitignored overlays — a `.local.knobs` file, a local pattern list — so a sweep whose conclusion turns on one names it absolute, as (3) does. **The dispatcher's half:** an oracle-running sweep is delegable into isolation; classify only whether its oracle reads a gitignored overlay. **One exception, and it is the consumer's to supply rather than yours to assume**: the **turn-end liveness reader** may already be resolved for you by the consumer's adapter (delegation-kit/SPEC.md §The turn-end liveness hook (template)), so the refusal that used to meet an isolated agent at every turn end — the one that invited the mutating remedy — need not fire. Nothing else here moves. Every other binary-dispatched gate still resolves inside a worktree only as (4) states, and the **do-not-build** prohibition is unchanged for all of them, that one included. **(5) Your report can be displaced, and the recovery is written down because a parent meeting one has no reason to believe the report still exists.** The harness returns only a dispatched session's **last** assistant message, so any turn-end hook that speaks overwrites whatever you returned. Recovery: **resume the child by id and ask it to re-emit its report verbatim, telling it explicitly not to re-run the work.** Two limits. It is **not reliable** — a resume may answer that the session has just started, leaving the sweep to be re-run. And the usage block is **no signal either**: a successful re-emit can report the *original* run's tool count and tokens, so the zero-tool-use shape marks some resumes and not all. Still reachable from any consumer whose liveness adapter has not taken (4)'s exception, an adopter vendoring this kit today included.
13
+ - **One commit per unit, sized to finish within budget.** Each unit gets its own commit (+ a `[blocked-by: prior]` tag where ordered). A unit that investigates long before its first commit is the only thing an interrupt can destroy — split it. Trigger to split: >4 components, OR mixes mechanical + architectural work, OR >300 tool calls estimated.
14
+ - **Gate-driven worklist where one exists.** Drive the sweep from the gate's output, so an interrupt loses only the in-flight uncommitted unit and a fresh session re-runs the gate to resume.
15
+ - **Resume journal — agent writes, scratch reset sweeps.** The agent writes a running progress journal — an isolated agent by a shell append, since the harness refuses its file-tool writes to the main checkout — (findings triaged, edits applied, what remains) to a repo-local gitignored scratch dir in the main checkout — `.tmp/` here — never a temporary worktree (deleted with the worktree) nor a system temp dir (a restart wipes it); name the path **absolute into the main checkout** in the dispatch prompt so a worktree-isolated agent writes to the surviving tree, not its doomed one. Repo-dir-local scratch is reboot-survivable, cheap to clean, and predictable across coding agents. **Where the consumer runs a stage machine the path is derived, not invented** — it is a function of the stage, so the grant in the prompt restates a name both ends can compute rather than minting one, and several sessions of one stage **append to that one file** instead of each naming its own (lifecycle-kit/SPEC.md §The state machine). The agent updates it as it goes; on success it appends a `DONE` marker. Each finding is written into the journal *inline as it is confirmed* — never "see final output": the agent's return message dies with the session, so a pointer-only journal makes `DONE` lie about recoverability. **Spell the append as its own bare statement**, never chained after a diagnostic read on the same command line: a consumer whose permission layer auto-grants a scratch write bounds that grant to a single-statement command, so a chained append loses it and buys a permission decision on the most frequent write the protocol asks for. Measured at one close: that one spelling was a third of the session's prompting calls. **Nobody deletes a journal while the work it covers is live** — not the agent (no `rm`) and not the supervisor, whose deletion would take the file out from under a resumed agent and destroy its own pull channel mid-unit. Cleanup is the consumer's scratch reset at its next work-unit boundary, not a chore in this protocol. `DONE` is the completion marker and counts **only as the file's last line**: a session resumed past its own marker appends after it. A journal *without* a `DONE` marker signals interruption only in a **cold read** — the supervisor found a journal but never consumed the agent's return (its session died before returning); there, no `DONE` = interrupted, resume from it. On the ordinary path the supervisor consumed the return and ran its post-commit verification, which *is* the completion attest, so the missing marker is redundant, not a signal of interruption. Since every journal now outlives its session, presence alone signals nothing — tell a live journal from a spent one by the work cursor and `git log` (delegation-kit/SPEC.md §Resume journal — agent writes, scratch reset sweeps). **Caveat — a journal write has been observed to fail, cause unexplained.** Read it as one unexplained observation, not as a property of isolation. So: grant a journal path explicitly before dispatch to every agent whose run an interruption could cost — a mutating agent, and a read-only sweep alike — rather than assuming the write succeeds; for a read-only fan-out the return value stays the contract, and its journal is the record an interruption leaves (a lifecycle-kit stage session is the standing exception — its journal path is derived by its own `--enter-stage` entry, never granted; lifecycle-kit/SPEC.md §The state machine). **Worktree isolation is not granted or withheld with the journal** — the two answer different questions, and bundling them read as *a read-only fan-out needs no isolation*, which is the reading that licensed an unreviewed commit on the shared branch. A read-only fan-out takes isolation precisely *because* it is claimed read-only (the **A read-only claim is made by isolation, not by sentence** rule above). The child journals as it goes, and the **parent** still owes the durable landing of what it received before acting on it (next bullet).
16
+ - **A child's only upward route is a durable artifact.** No address reaches the agent that dispatched a child — its sends resolve to neither an invented dispatcher name nor its own agent type, only a send addressed to the **top-level session** arrives, and neither level knows its own identity or its parent's. Four dispositions follow. **(1) A durable artifact, for anything mid-run** — the dispatcher mints a path, names it **absolute into the main checkout** in the prompt, and the child writes as it goes. That is already the journal rule above; it is now also the *only* upward route there is, and it is stronger than a message would be, because a file survives a child that dies before returning. A **stop signal takes the same shape** — a sentinel the child checks — so it is cooperative by construction and a wedged child stays out of reach. **(2) Return-value only, otherwise** — a fan-out needing no mid-run channel needs no artifact, which a short read-only fan-out still is. Say so in the prompt of every isolated read-only dispatch: its report is its final message, or the harness's hand-back where it has one, and it sends to no peer. **(3) The downward half is a dispatch-shape rule** — a dispatcher that wants control over its fan-out dispatches in the background and keeps the handle; what actually failed was a dispatcher blocked on a foreground dispatch, holding neither the handle nor a turn. **(4) Naming the address a child should use is refused** — there is none, and the refusal is stated rather than omitted because it is the first thing both original filings reached for. Two corollaries defeat the workarounds a reader would otherwise invent: a message that does reach the top-level session is attributed to the sender's **type**, so a fan-out wider than one is ambiguous at the receiving end; and a child resumed by a message from its dispatcher still cannot reply, so being addressed creates no return path. One live hazard rides with them: the message and stop tools may be **deferred** for a dispatched agent — callable only after a discovery call it has to know to make — so a child that needs to escalate may not hold the channel at all. Hence the obligation, which is the part that binds you: **a dispatcher handing out work that will need a mid-run channel grants a durable path with it**, and reads that path itself.
267
17
 
268
- - **A finished child is addressed by the task-id its completion notification
269
- carried, never by its name.** Resuming a returned agent to correct or extend
270
- its work is the cheap alternative to a cold re-dispatch, and it is the one
271
- that keeps the child's own reasoning instead of paying to rebuild it. The name
272
- is not a durable address for that: measured here, a name live at dispatch
273
- resolved to *no agent of that name is reachable* once the dispatching session
274
- had been compacted, with the agent listing reporting none reachable at all,
275
- while the task-id from the notification resumed the same child from its
276
- transcript. Which of the two voids the name — the compaction, or the child
277
- merely having finished — is untested; the task-id survived both, and the
278
- notification states outright that it is the handle the child may notify under
279
- again, so it is the address to hold. It is also the address to **write down**:
280
- the notification lives in the context that dies, so a dispatcher who may want
281
- that child later records the task-id under the durability rule below rather
282
- than trusting the scroll to still be there.
18
+ - **A finished child is addressed by the task-id its completion notification carried, never by its name.** Resuming a returned agent to correct or extend its work is the cheap alternative to a cold re-dispatch, and it is the one that keeps the child's own reasoning instead of paying to rebuild it. A resumed isolated child runs in the main checkout, so resume it only to have it re-emit what it already holds, as isolation cost (5)'s recovery does; work that needs the tree again is a new isolated dispatch. The name is not a durable address for that: a name live at dispatch stops resolving once the dispatching session is compacted, while the task-id from the notification resumes the same child from its transcript and is the handle the notification states the child may notify under again. It is also the address to **write down**: the notification lives in the context that dies, so a dispatcher who may want that child later records the task-id under the durability rule below rather than trusting the scroll to still be there.
283
19
 
284
- - **Findings you will act on are durable before you act on them.** A child's
285
- return value lives only in your context, and your context dies with your
286
- session. Before you *act* on a dispatched agent's findings — edit against
287
- them, rule from them, plan the next wave on them — land them somewhere that
288
- survives you: a commit, or your own journal. The write is the parent's,
289
- discharged on receipt, not a chore delegated back to the child. This binds
290
- whoever holds findings they will act on, at any depth. It costs one write per
291
- returned child, not a running narration. The obligation is **durability**, and
292
- committing and journalling are two ways to discharge it — a session uses
293
- whichever is available to it. A dispatched session journals, to the path it was
294
- granted, because it cannot commit. A top-level session commits, because it can.
295
- A top-level session that *cannot* commit right now — another session is holding
296
- the shared index, the normal condition while an iteration is running — journals
297
- for as long as that holds, and discharges by committing when the index frees.
298
- Neither the supervising role nor a session running outside any dispatch is
299
- exempt: the axis is what the session can do at this moment, never what it is.
300
- - **Verify after every agent commit** — a sub-agent's "passed" claim is not
301
- trustworthy. Re-run the relevant gates (the sweep's own gate) and the consumer
302
- validate battery below — the act is `verify`, the artifact is the battery.
303
- **Never verify a unit by re-running the producer of what it delivered**: where
304
- the unit's deliverable *is* an evidence artifact, the verify is a **read** of
305
- the committed artifact, because re-running its sole writer overwrites or
306
- duplicates the record instead of checking it. Having already run the wrong
307
- check, read delegation-kit/SPEC.md §Verify after every agent commit for which
308
- of the two re-runs you are holding — only one of them leaves evidence to
309
- restore. **Diff every gate change in an agent commit before
310
- accepting** — a gate modification inside a feature commit is a supervisor-owned
311
- ruling; an agent blocked by a gate will weaken it (a false exemption) to make
312
- its commit pass instead of fixing the code. "The gate is in my way" almost
313
- always means the code doesn't fit the convention — fix the code.
314
- `check-gate-tamper` is the mechanical floor under this bullet — it blocks the
315
- two attested shapes (a gate edit co-staged with product code; a new path/glob
316
- exemption co-staged with the file it excuses) — but it does **not** catch
317
- semantic weakening inside a legitimate scripts-only commit, so the by-eye diff
318
- review remains your duty (delegation-kit/SPEC.md §Verify after every agent
319
- commit — the honest limit).
320
- - **A child's citation is a pointer to verify, never evidence in itself.** A
321
- returned `file:line` is not checked by confirming the range resolves: that
322
- catches a wrong number and misses a wrong spelling, a moved passage, and a
323
- sibling instance the sweep never reported. **Re-read the passage** in the parent
324
- before acting on it. Both halves are attested here — a census that fabricated a
325
- `file:line` and a negative claim, both false; and a re-verification of nineteen
326
- agent-sourced cites that found no bad ranges yet still surfaced a marker cited
327
- under a spelling the tree does not use, plus an entire family member the census
328
- never mentioned. Quotation with attribution is precisely the signal a reader uses
329
- to decide a claim has already been checked, so an unverified one defeats normal
330
- trust rather than merely being wrong.
331
- - **Budget-check before *each* dispatch in a fan-out**, not once at the start.
332
- `bash delegation-kit/bin/usage-verdict.sh` (verdict exit 0/1/2 from `usage.txt` —
333
- it folds in the reading-age and window-validity checks so a dead-window pct
334
- can't read stale-high; a PAUSE names its axis — a 5h wall clears in hours, a
335
- 7-day wall in days). If the verdict is PAUSE and the work is large, pause for
336
- reset. Width is the kill axis: the 5h wall fires mid-flight, and the agents
337
- that bank are the ones that *finished* — ≤`DELEGATION_KIT_FAN_WIDTH`-wide
338
- bounds the loss to the in-flight wave.
339
- **Project the next wave's burn from the last wave's, not just the current
340
- pct** — a read-heavy `DELEGATION_KIT_FAN_WIDTH`-wide sweep is far more
341
- window-expensive than its
342
- subagent-token total suggests, so size waves to leave the next one headroom, or
343
- accept one wave per window.
344
- **The projection reaches downward as well as forward.** The guard re-arms at
345
- every depth — a dispatched session's own dispatches fire it too — but each
346
- verdict prices **one call**, never the subtree that call opens. Nothing
347
- between a dispatch and its children's children ever sees the whole. So budget
348
- a dispatch you expect to fan out for its **subtree**, not its own turn, and
349
- read a child's fan-out as your spend even though its verdicts land in a
350
- context you never see.
351
- **Do not read live budget off the statusline while parked on a dispatch.**
352
- Observed: the harness statusline does not refresh while the main session waits
353
- on a background agent's completion notification, so its displayed budget
354
- freezes for the length of the dispatch — the longer the unit, the staler the
355
- number. Poll `usage-verdict.sh` externally when you need a live reading
356
- mid-dispatch (`watch -n 30 bash delegation-kit/bin/usage-verdict.sh`); this is
357
- the one sanctioned poll and it does not weaken the never-poll rule above,
358
- which governs waiting for *completion*. Enforcement is unaffected either way:
359
- the per-dispatch budget check reads a fresh verdict at dispatch time, so a
360
- pause/proceed decision is never made off the frozen display — only passive
361
- display is stale.
362
- - **Match the dispatched model and effort to the unit's shape.** Delegation
363
- levers tokens only when selection follows the work: a read-heavy or mechanical
364
- unit (audit, survey, rename/merge sweep) rides a cheaper model class via the
365
- dispatch's model parameter or a dedicated agent type; a unit carrying design
366
- judgment stays on the supervisor's class. Derive the class ladder from the
367
- harness's **live model roster at dispatch time** — model families churn faster
368
- than kit text, so a baked model-name list in any doc is drift by construction.
369
- Agent-**type** selection derives the same way — from the dispatch-time
370
- agent-roster descriptions, not a baked list: an audit or survey rides the type
371
- whose description commits to review work, never one that disclaims it (an
372
- excerpt-locator serves pure search, not audit). Selection sits with the
373
- dispatching session — its context holds what selection
374
- needs — and it is **affirmative**: an unselected dispatch does not fall back
375
- to a cheap default, it **inherits the dispatcher's tier**, so declining to
376
- choose silently buys the most expensive tier in reach — and buys it precisely
377
- for the read-only fan-outs that are the cheapest work you dispatch. That is
378
- why a standing choice lands in a tracked agent-type definition rather than
379
- per-dispatch habit, and why an omitted `model:` field there is not a neutral
380
- default but the inherit default: the field is stated even when the answer is
381
- to inherit.
382
- - **Never revert substantial completed work on your own design judgment** —
383
- especially an expensive delegated sweep. Surface the tension and wait for the
384
- explicit go-ahead before discarding it: a self-judged revert forfeits the
385
- sweep's whole spend and pays it again on the re-run.
20
+ - **Findings you will act on are durable before you act on them.** A child's return value lives only in your context, and your context dies with your session. Before you *act* on a dispatched agent's findings — edit against them, rule from them, plan the next wave on them — land them somewhere that survives you: a commit, or your own journal. The write is the parent's, discharged on receipt, not a chore delegated back to the child. This binds whoever holds findings they will act on, at any depth. It costs one write per returned child, not a running narration. The obligation is **durability**, and committing and journalling are two ways to discharge it — a session uses whichever is available to it. A dispatched session journals, to the path it was granted or its stage entry reported, because it cannot commit. A top-level session commits, because it can. A top-level session that *cannot* commit right now — another session is holding the shared index, the normal condition while an iteration is running — journals for as long as that holds, and discharges by committing when the index frees. Neither the supervising role nor a session running outside any dispatch is exempt: the axis is what the session can do at this moment, never what it is.
21
+ - **Verify after every agent commit** — a sub-agent's "passed" claim is not trustworthy. Re-run the relevant gates (the sweep's own gate) and the consumer validate battery below — the act is `verify`, the artifact is the battery. **Never verify a unit by re-running the producer of what it delivered**: where the unit's deliverable *is* an evidence artifact, the verify is a **read** of the committed artifact, because re-running its sole writer overwrites or duplicates the record instead of checking it. Having already run the wrong check, read delegation-kit/SPEC.md §Verify after every agent commit for which of the two re-runs you are holding — only one of them leaves evidence to restore. **Diff every gate change in an agent commit before accepting** — a gate modification inside a feature commit is a supervisor-owned ruling; an agent blocked by a gate will weaken it (a false exemption) to make its commit pass instead of fixing the code. "The gate is in my way" almost always means the code doesn't fit the convention — fix the code. `check-gate-tamper` is the mechanical floor under this bullet — it blocks the two attested shapes (a gate edit co-staged with product code; a new path/glob exemption co-staged with the file it excuses) — but it does **not** catch semantic weakening inside a legitimate scripts-only commit, so the by-eye diff review remains your duty (delegation-kit/SPEC.md §Verify after every agent commit — the honest limit).
22
+ - **A child's citation is a pointer to verify, never evidence in itself.** A returned `file:line` is not checked by confirming the range resolves: that catches a wrong number and misses a wrong spelling, a moved passage, and a sibling instance the sweep never reported. **Re-read the passage** in the parent before acting on it. Quotation with attribution is precisely the signal a reader uses to decide a claim has already been checked, so an unverified one defeats normal trust rather than merely being wrong.
23
+ - **A return you did not receive is not a finding, and an identifier you did not read is not a citation.** Two shapes, because the attested instances are not all one. **The relayed return:** a claim whose warrant is a dispatched agent's output is made only where that output was **received**. A monitor that timed out, a child that never reported, a notification never consumed — each leaves you holding no return, and a claim made anyway is fabrication however well you reasoned your way to it. All three attested instances of this shape sat in the dispatcher's own *reasoning* rather than in quoted child text, which is why a floor checking relayed quotations would have caught none of them. **The minted identifier:** a commit sha, a `file:line`, a count, a path — written to make a record read as precise, never actually read. The fourth attested instance is this, a fabricated short hash put into a survey record's corpus field. **The discharge is deliberately cheap: no new artifact and no running narration.** Where the return arrived, cite **where it is held** — the journal path you granted and read, or the commit you verified. Where it did not, either do not make the claim, or mark it **unheld in the same sentence**. Marking is admissible on purpose: what this closes is a claim that *looks* sourced, and a claim saying it is not sourced does not commit it. **Its boundary against the three bullets above, so the set does not read as four spellings of one rule:** each of those presupposes a return that arrived. *A child's citation is a pointer to verify* governs a citation that arrived and may be wrong; *Findings you will act on are durable before you act on them* governs a finding that arrived and must outlive the session; *Verify after every agent commit* governs work that landed. This one governs the case where **nothing arrived at all**, which none of them reaches.
24
+ - **Budget-check before *each* dispatch in a fan-out**, not once at the start. Run `--usage-verdict` on the gate binary `GATE_SDK_NATIVE_BIN` names (verdict exit 0/1/2 from `usage.txt` — it folds in the reading-age and window-validity checks so a dead-window pct can't read stale-high; a PAUSE names its axis — a 5h wall clears in hours, a 7-day wall in days). If the verdict is PAUSE and the work is large, pause for reset. Width is the kill axis: the 5h wall fires mid-flight, and the agents that bank are the ones that *finished* — ≤`DELEGATION_KIT_FAN_WIDTH`-wide bounds the loss to the in-flight wave. **Project the next wave's burn from the last wave's, not just the current pct** — a read-heavy `DELEGATION_KIT_FAN_WIDTH`-wide sweep is far more window-expensive than its subagent-token total suggests, so size waves to leave the next one headroom, or accept one wave per window. **The projection reaches downward as well as forward.** The guard re-arms at every depth — a dispatched session's own dispatches fire it too — but each verdict prices **one call**, never the subtree that call opens. Nothing between a dispatch and its children's children ever sees the whole. So budget a dispatch you expect to fan out for its **subtree**, not its own turn, and read a child's fan-out as your spend even though its verdicts land in a context you never see. **Do not read live budget off the statusline while parked on a dispatch.** Observed: the harness statusline does not refresh while the main session waits on a background agent's completion notification, so its displayed budget freezes for the length of the dispatch — the longer the unit, the staler the number. Poll the verdict arm externally when you need a live reading mid-dispatch (a `watch -n 30` over the gate binary's `--usage-verdict` arm); this is the one sanctioned poll and it does not weaken the never-poll rule above, which governs waiting for *completion*. Enforcement is unaffected either way: the per-dispatch budget check reads a fresh verdict at dispatch time, so a pause/proceed decision is never made off the frozen display — only passive display is stale.
25
+ - **Match the dispatched model and effort to the unit's shape.** Delegation levers tokens only when selection follows the work: a read-heavy or mechanical unit (audit, survey, rename/merge sweep) rides a cheaper model class via the dispatch's model parameter or a dedicated agent type; a unit carrying design judgment stays on the supervisor's class. Derive the class ladder from the harness's **live model roster at dispatch time** — model families churn faster than kit text, so a baked model-name list in any doc is drift by construction. Agent-**type** selection derives the same way — from the dispatch-time agent-roster descriptions, not a baked list: an audit or survey rides the type whose description commits to review work, never one that disclaims it (an excerpt-locator serves pure search, not audit). Selection sits with the dispatching session — its context holds what selection needs — and it is **affirmative**: an unselected dispatch does not fall back to a cheap default, it **inherits the dispatcher's tier**, so declining to choose silently buys the most expensive tier in reach — and buys it precisely for the read-only fan-outs that are the cheapest work you dispatch. A standing choice lands in a tracked agent-type definition rather than per-dispatch habit, and that definition states its `model:` field even when the answer is to inherit.
26
+ - **Never revert substantial completed work on your own design judgment** — especially an expensive delegated sweep. Surface the tension and wait for the explicit go-ahead before discarding it: a self-judged revert forfeits the sweep's whole spend and pays it again on the re-run.
386
27
 
387
28
  ## Shared-file roster
388
29
 
389
- *<shared-file-roster: the files two agents must never edit concurrently, in
390
- addition to the git index and HEAD (always shared for committing agents) — your
391
- generated-config scripts, shared test-environment fixtures, and any amendment
392
- file under active edit.>*
30
+ *<shared-file-roster: the files two agents must never edit concurrently, in addition to the git index and HEAD (always shared for committing agents) — your generated-config scripts, shared test-environment fixtures, and any amendment file under active edit.>*
393
31
 
394
32
  ## Validate battery
395
33
 
396
- *<validate-battery: the command set the supervisor re-runs after every agent
397
- commit, never the agent's self-report — for a gate-sdk consumer the
398
- `run-gates.sh` battery plus the fixture runner for each kit the sweep touched; a
399
- toolchain consumer adds its compile/lint/test set, and after any rename sweeps
400
- explicitly for zero-byte files a stale build cache would green.>*
34
+ *<validate-battery: the command set the supervisor re-runs after every agent commit, never the agent's self-report — for a gate-sdk consumer the `run-gates.sh` battery plus the fixture runner for each kit the sweep touched; a toolchain consumer adds its compile/lint/test set, and after any rename sweeps explicitly for zero-byte files a stale build cache would green.>*
@@ -0,0 +1,4 @@
1
+ # spec: delegation-kit/SPEC.md §Layout and configuration — the knob roster (every knob, its default) and the line grammar; the gate binary at `GATE_SDK_NATIVE_BIN` prints the defaults with `--emit knob-roster`; set only what you override
2
+
3
+ # spec: delegation-kit/SPEC.md §Layout and configuration — D2's roster: the consumer's own read-only-dispatched agent-type names; default empty (D2 inert) — never a kit-shipped vocabulary (gate-sdk/SPEC.md §The provenance seam)
4
+ # DELEGATION_KIT_READONLY_TYPES[] = <agent-type>
@@ -1,60 +1,23 @@
1
- DISPATCH CHECKLISTS — a reach-through from [agent-execution.md](agent-execution.md),
2
- loaded only when a dispatch is a deletion, a rename, or a heavy cross-spec audit.
3
- It adds no new protocol: the safety, budget, resume-journal, and
4
- verify-after-commit rules stay in `agent-execution.md` and still apply in full.
5
- This file is the mechanical pre-flight for those dispatch shapes — the steps an
6
- agent skips by reflex and the supervisor pays for later. Owned by
7
- delegation-kit/SPEC.md §One template, a resident pointer.
1
+ DISPATCH CHECKLISTS — a reach-through from [agent-execution.md](agent-execution.md), loaded only when a dispatch is a deletion, a rename, or a heavy cross-spec audit. It adds no new protocol: the safety, budget, resume-journal, and verify-after-commit rules stay in `agent-execution.md` and still apply in full. This file is the mechanical pre-flight for those dispatch shapes — the steps an agent skips by reflex and the supervisor pays for later. Owned by delegation-kit/SPEC.md §One template, a resident pointer.
8
2
 
9
3
  ## Before a deletion dispatch
10
4
 
11
- - **Importer survey.** Grep every importer of the symbol or file across the tree
12
- before dispatching the deletion; where the toolchain ships a consumer-scan tool
13
- (an LSP find-references, a build-graph query), use it rather than a bare text
14
- grep. No importers is the safe-to-delete signal. An importer outside the unit's
15
- declared scope does not license the deletion — it rescopes the unit from delete
16
- to migrate-then-keep, surfaced to the supervisor before the dispatch proceeds.
17
- - **Ownership of a shared removal.** When both sides of a boundary import the
18
- surface being removed, the dispatch that owns the removal is the layer each side
19
- can import without a cycle — the common dependency, not necessarily the domain
20
- owner. Placing the removal at the domain owner when the other side cannot reach
21
- it without a cycle strands a caller.
5
+ - **Importer survey.** Grep every importer of the symbol or file across the tree before dispatching the deletion; where the toolchain ships a consumer-scan tool (an LSP find-references, a build-graph query), use it rather than a bare text grep. No importers is the safe-to-delete signal. An importer outside the unit's declared scope does not license the deletion — it rescopes the unit from delete to migrate-then-keep, surfaced to the supervisor before the dispatch proceeds.
6
+ - **Ownership of a shared removal.** When both sides of a boundary import the surface being removed, the dispatch that owns the removal is the layer each side can import without a cycle — the common dependency, not necessarily the domain owner. Placing the removal at the domain owner when the other side cannot reach it without a cycle strands a caller.
22
7
 
23
8
  ## Before a rename dispatch
24
9
 
25
- - **Target-collision check.** Grep the target namespace for the new name before
26
- the rename amendment is declared build-ready — an authoring-stage step, not a
27
- build-time discovery. A collision found while authoring reshapes the amendment;
28
- found at build it strands a half-done sweep.
29
- - **Mention-versus-use brief.** A rename dispatch brief names where the old token
30
- is legitimately *mentioned* — a historical `Old→New` migration arrow, a
31
- changelog line, a deprecation record — separately from where it is *used*. A
32
- naive sweep that rewrites both collapses the historical record; the brief tells
33
- the agent which occurrences to leave standing.
10
+ - **Target-collision check.** Grep the target namespace for the new name before the rename amendment is declared build-ready — an authoring-stage step, not a build-time discovery. A collision found while authoring reshapes the amendment; found at build it strands a half-done sweep.
11
+ - **Mention-versus-use brief.** A rename dispatch brief names where the old token is legitimately *mentioned* — a historical `Old→New` migration arrow, a changelog line, a deprecation record — separately from where it is *used*. A naive sweep that rewrites both collapses the historical record; the brief tells the agent which occurrences to leave standing.
34
12
 
35
13
  ## Deriving the dispatch set
36
14
 
37
- - **Re-derive from the amendment body.** Derive the set of components a dispatch
38
- touches from the amendment body itself, never from the queue entry's
39
- enumeration — the queue line is a summary written before the work and drifts
40
- from the amendment's real footprint. The amendment's own surface list is the
41
- authoritative one.
15
+ - **Re-derive from the amendment body.** Derive the set of components a dispatch touches from the amendment body itself, never from the queue entry's enumeration — the queue line is a summary written before the work and drifts from the amendment's real footprint. The amendment's own surface list is the authoritative one.
42
16
 
43
17
  ## After any bulk edit
44
18
 
45
- - **Sweep verification.** Re-grep in a fresh tool call after any bulk edit; the
46
- edit's own report is not the check. Match the gate's matcher class, not a looser
47
- one — a whole-word gate over-reports under a substring grep and under-reports
48
- under a looser regex. A value that crosses a language boundary needs both an
49
- emit-side and a consume-side grep; prefer an LSP find-references sweep for a
50
- compiled symbol. A term gate carries structural blind spots — allowlisted words,
51
- string and variant spellings, modeling errors — so a by-eye pass covers what the
52
- matcher cannot see.
19
+ - **Sweep verification.** Re-grep in a fresh tool call after any bulk edit; the edit's own report is not the check. Match the gate's matcher class, not a looser one — a whole-word gate over-reports under a substring grep and under-reports under a looser regex. A value that crosses a language boundary needs both an emit-side and a consume-side grep; prefer an LSP find-references sweep for a compiled symbol. A term gate carries structural blind spots — allowlisted words, string and variant spellings, modeling errors — so a by-eye pass covers what the matcher cannot see.
53
20
 
54
21
  ## Heavy cross-spec audit
55
22
 
56
- - **Mechanize, then read.** A heavy cross-spec audit's real output is a gate
57
- backlog, not a one-time fix list: mechanize the decidable classes into checks
58
- first, then run a light semantic pass over what no gate can decide. The fan-out
59
- width bound and the resume-journal discipline are the core protocol's
60
- (`agent-execution.md`), applied here unchanged rather than restated.
23
+ - **Mechanize, then read.** A heavy cross-spec audit's real output is a gate backlog, not a one-time fix list: mechanize the decidable classes into checks first, then run a light semantic pass over what no gate can decide. The fan-out width bound and the resume-journal discipline are the core protocol's (`agent-execution.md`), applied here unchanged rather than restated.