checkwright 0.24.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 (1044) 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 +25 -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 +3 -0
  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 +4 -0
  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/bad/SPEC-thing.md +26 -0
  67. package/payload/canon-kit/gate-tests/check-amendment-update-target/bad/expect.txt +8 -0
  68. package/payload/canon-kit/gate-tests/check-amendment-update-target/good/SPEC-widget.md +47 -0
  69. package/payload/canon-kit/gate-tests/check-amendment-update-target/good/expect.txt +1 -0
  70. package/payload/canon-kit/gate-tests/check-amendment-update-target.test.sh +82 -0
  71. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +1 -1
  72. package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +37 -26
  73. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/TASK-QUEUE.md +3 -1
  74. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.knobs +2 -0
  75. package/payload/canon-kit/gate-tests/check-deprecation-task/good/TASK-QUEUE.md +6 -2
  76. package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -1
  77. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.knobs +2 -0
  78. package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +12 -10
  79. package/payload/canon-kit/gate-tests/check-docs-cmd/good/doc.md +4 -1
  80. package/payload/canon-kit/gate-tests/check-docs-cmd.test.sh +61 -0
  81. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/expect.txt +3 -0
  82. package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +21 -2
  83. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/expect.txt +2 -0
  84. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/kit/README.md +10 -0
  85. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/kit/index.md +11 -0
  86. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/scripts/canon-config.knobs +2 -0
  87. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/scripts/gate-sdk-config.knobs +2 -0
  88. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/expect.txt +1 -0
  89. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/kit/README.md +12 -0
  90. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/kit/index.md +13 -0
  91. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/scripts/canon-config.knobs +2 -0
  92. package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/scripts/gate-sdk-config.knobs +2 -0
  93. package/payload/canon-kit/gate-tests/check-fence-command-head/bad/args +1 -0
  94. package/payload/canon-kit/gate-tests/check-fence-command-head/bad/doc.md +16 -0
  95. package/payload/canon-kit/gate-tests/check-fence-command-head/bad/expect.txt +5 -0
  96. package/payload/canon-kit/gate-tests/check-fence-command-head/good/args +1 -0
  97. package/payload/canon-kit/gate-tests/check-fence-command-head/good/bin/run.sh +3 -0
  98. package/payload/canon-kit/gate-tests/check-fence-command-head/good/doc.md +41 -0
  99. package/payload/canon-kit/gate-tests/check-fence-command-head/good/expect.txt +1 -0
  100. package/payload/canon-kit/gate-tests/check-fence-command-head/good/lib/tool.sh +5 -0
  101. package/payload/canon-kit/gate-tests/check-fence-command-head/good/scripts/canon-config.knobs +2 -0
  102. package/payload/canon-kit/gate-tests/check-fence-run/bad/args +1 -0
  103. package/payload/canon-kit/gate-tests/check-fence-run/bad/doc.md +32 -0
  104. package/payload/canon-kit/gate-tests/check-fence-run/bad/expect.txt +7 -0
  105. package/payload/canon-kit/gate-tests/check-fence-run/good/args +1 -0
  106. package/payload/canon-kit/gate-tests/check-fence-run/good/doc.md +31 -0
  107. package/payload/canon-kit/gate-tests/check-fence-run/good/expect.txt +1 -0
  108. package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.knobs +7 -0
  109. package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.knobs +7 -0
  110. package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +42 -7
  111. package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +1 -2
  112. package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
  113. package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +37 -8
  114. package/payload/canon-kit/gate-tests/check-manifest-count/bad/SPEC.md +3 -0
  115. package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +10 -0
  116. package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +6 -6
  117. package/payload/canon-kit/gate-tests/check-md-refs.test.sh +1 -1
  118. package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/doc.md +13 -0
  119. package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/expect.txt +4 -0
  120. package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/scripts/canon-config.knobs +2 -0
  121. package/payload/canon-kit/gate-tests/check-md-unwrapped/good/doc.md +45 -0
  122. package/payload/canon-kit/gate-tests/check-md-unwrapped/good/expect.txt +1 -0
  123. package/payload/canon-kit/gate-tests/check-md-unwrapped/good/scripts/canon-config.knobs +4 -0
  124. package/payload/canon-kit/gate-tests/check-measured-claim/bad/SPEC.md +3 -0
  125. package/payload/canon-kit/gate-tests/check-measured-claim/bad/expect.txt +1 -0
  126. package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.knobs +4 -0
  127. package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +8 -0
  128. package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.knobs +4 -0
  129. package/payload/canon-kit/gate-tests/check-measured-claim/good/worktrees/SPEC.md +12 -0
  130. package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +32 -13
  131. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.knobs +6 -0
  132. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.knobs +6 -0
  133. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/CLAUDE.md +9 -0
  134. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/SPEC.md +11 -0
  135. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/expect.txt +3 -0
  136. package/payload/canon-kit/gate-tests/check-prose-bounds/bad/scripts/canon-config.knobs +3 -0
  137. package/payload/canon-kit/gate-tests/check-prose-bounds/good/CLAUDE.md +10 -0
  138. package/payload/canon-kit/gate-tests/check-prose-bounds/good/SPEC.md +27 -0
  139. package/payload/canon-kit/gate-tests/check-prose-bounds/good/expect.txt +1 -0
  140. package/payload/canon-kit/gate-tests/check-prose-bounds/good/scripts/canon-config.knobs +3 -0
  141. package/payload/canon-kit/gate-tests/check-prose-bounds.test.sh +98 -0
  142. package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.knobs +3 -0
  143. package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.knobs +3 -0
  144. package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +55 -25
  145. package/payload/canon-kit/gate-tests/check-prose-tells/bad/prose.md +2 -0
  146. package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.knobs +5 -0
  147. package/payload/canon-kit/gate-tests/check-prose-tells/good/prose.md +6 -0
  148. package/payload/canon-kit/gate-tests/check-prose-tells/good/scripts/{canon-config.sh → canon-config.knobs} +2 -5
  149. package/payload/canon-kit/gate-tests/check-prose-tells/good/worktrees/prose.md +17 -0
  150. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/TASK-QUEUE.md +15 -0
  151. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/expect.txt +8 -0
  152. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/canon-config.knobs +3 -0
  153. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/gate-sdk-config.knobs +2 -0
  154. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/lifecycle-config.knobs +12 -0
  155. package/payload/canon-kit/gate-tests/check-provenance-seam/bad/widget-toolkit/SPEC.md +27 -0
  156. package/payload/canon-kit/gate-tests/check-provenance-seam/good/TASK-QUEUE.md +15 -0
  157. package/payload/canon-kit/gate-tests/check-provenance-seam/good/expect.txt +1 -0
  158. package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/canon-config.knobs +3 -0
  159. package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/gate-sdk-config.knobs +2 -0
  160. package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/lifecycle-config.knobs +12 -0
  161. package/payload/canon-kit/gate-tests/check-provenance-seam/good/widget-toolkit/SPEC.md +20 -0
  162. package/payload/canon-kit/gate-tests/check-provenance-seam.test.sh +136 -0
  163. package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +1 -1
  164. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/README.md +6 -0
  165. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/SPEC-widget.md +5 -0
  166. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.rs +2 -0
  167. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +4 -0
  168. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.knobs +6 -0
  169. package/payload/canon-kit/gate-tests/check-spec-pointer/good/README.md +15 -0
  170. package/payload/canon-kit/gate-tests/check-spec-pointer/good/SPEC-widget.md +10 -0
  171. package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -1
  172. package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.rs +2 -0
  173. package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.knobs +6 -0
  174. package/payload/canon-kit/gate-tests/check-spec-pointer/good/vendored-kit/notes.txt +4 -0
  175. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/TASK-QUEUE.md +3 -1
  176. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/TASK-QUEUE.md +9 -3
  177. package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +1 -1
  178. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/SPEC.md +14 -0
  179. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/expect.txt +4 -0
  180. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/scripts/canon-config.knobs +4 -0
  181. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/SPEC.md +21 -0
  182. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/expect.txt +1 -0
  183. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/scripts/canon-config.knobs +4 -0
  184. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/worktrees/SPEC.md +11 -0
  185. package/payload/canon-kit/gate-tests/check-unmarked-claim.test.sh +110 -0
  186. package/payload/canon-kit/templates/SPEC-amendment.md +63 -27
  187. package/payload/canon-kit/templates/canon-config.knobs +1 -0
  188. package/payload/context-kit/README.md +33 -61
  189. package/payload/context-kit/checks/check-brevity.gate +2 -2
  190. package/payload/context-kit/checks/check-footprint-fresh.gate +3 -2
  191. package/payload/context-kit/checks/check-memory-off.gate +1 -1
  192. package/payload/context-kit/checks/check-settings-paths.gate +2 -2
  193. package/payload/context-kit/checks/check-settings-pins.gate +1 -1
  194. package/payload/context-kit/checks/check-surface-ratchet.gate +3 -0
  195. package/payload/context-kit/gate-tests/check-brevity/bad/CLAUDE.md +9 -2
  196. package/payload/context-kit/gate-tests/check-brevity/bad/expect.txt +1 -0
  197. package/payload/context-kit/gate-tests/check-brevity/good/CLAUDE.md +9 -4
  198. package/payload/context-kit/gate-tests/check-brevity/good/expect.txt +1 -1
  199. package/payload/context-kit/gate-tests/check-brevity.test.sh +107 -24
  200. package/payload/context-kit/gate-tests/check-footprint-fresh/good/CLAUDE.md +6 -0
  201. package/payload/context-kit/gate-tests/check-footprint-fresh/good/demo-kit/SPEC.md +3 -0
  202. package/payload/context-kit/gate-tests/check-footprint-fresh/good/demo-kit/templates/guide.md +3 -0
  203. package/payload/context-kit/gate-tests/check-footprint-fresh/good/docs/footprint.md +30 -0
  204. package/payload/context-kit/gate-tests/check-memory-off/bad/scripts/{context-config.sh → context-config.knobs} +1 -3
  205. package/payload/context-kit/gate-tests/check-memory-off/good/scripts/{context-config.sh → context-config.knobs} +1 -3
  206. package/payload/context-kit/gate-tests/check-memory-off.test.sh +1 -1
  207. package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +2 -0
  208. package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +21 -0
  209. package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/run-gates.sh +4 -0
  210. package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +2 -1
  211. package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +48 -1
  212. package/payload/context-kit/gate-tests/check-settings-paths/good/tools/run-gates.sh +4 -0
  213. package/payload/context-kit/gate-tests/check-settings-pins.test.sh +1 -1
  214. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/CLAUDE.md +5 -0
  215. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/expect.txt +2 -0
  216. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/scripts/context-config.knobs +4 -0
  217. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/surface-ceiling.txt +2 -0
  218. package/payload/context-kit/gate-tests/check-surface-ratchet/bad/templates/ungoverned.md +3 -0
  219. package/payload/context-kit/gate-tests/check-surface-ratchet/good/CLAUDE.md +3 -0
  220. package/payload/context-kit/gate-tests/check-surface-ratchet/good/expect.txt +1 -0
  221. package/payload/context-kit/gate-tests/check-surface-ratchet/good/scripts/context-config.knobs +4 -0
  222. package/payload/context-kit/gate-tests/check-surface-ratchet/good/surface-ceiling.txt +4 -0
  223. package/payload/context-kit/gate-tests/check-surface-ratchet/good/templates/held.md +4 -0
  224. package/payload/context-kit/gate-tests/check-surface-ratchet.test.sh +76 -0
  225. package/payload/context-kit/index-tests/corpus/baseline.txt +1 -1
  226. package/payload/context-kit/index-tests/corpus/surface.md +1 -6
  227. package/payload/context-kit/index-tests/expected/always-loaded.txt +1 -1
  228. package/payload/context-kit/templates/close-brevity.md +9 -28
  229. package/payload/context-kit/templates/context-config.knobs +1 -0
  230. package/payload/context-kit/templates/session-context.sh +43 -28
  231. package/payload/delegation-kit/README.md +35 -59
  232. package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +1 -1
  233. package/payload/delegation-kit/checks/check-gate-tamper.gate +1 -1
  234. package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +23 -2
  235. package/payload/delegation-kit/templates/agent-execution.md +23 -372
  236. package/payload/delegation-kit/templates/delegation-config.knobs +4 -0
  237. package/payload/delegation-kit/templates/dispatch-checklists.md +8 -45
  238. package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +33 -17
  239. package/payload/doctrine-kit/DOCTRINE.md +92 -458
  240. package/payload/doctrine-kit/README.md +24 -55
  241. package/payload/doctrine-kit/checks/check-doctrine-registration.gate +1 -1
  242. package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +48 -3
  243. package/payload/drift-kit/README.md +43 -89
  244. package/payload/drift-kit/templates/close-knowledge.md +7 -22
  245. package/payload/drift-kit/templates/drift-config.knobs +1 -0
  246. package/payload/drift-kit/templates/economics.md +10 -48
  247. package/payload/drift-kit/templates/kpi-deprecated-surface.sh +31 -9
  248. package/payload/drift-kit/templates/kpis.list +2 -1
  249. package/payload/drift-kit/templates/price-table.tsv +1 -1
  250. package/payload/evidence-kit/README.md +23 -46
  251. package/payload/evidence-kit/checks/check-battery-roster.gate +1 -1
  252. package/payload/evidence-kit/checks/check-evidence-baseline.gate +2 -2
  253. package/payload/evidence-kit/checks/check-evidence-manifest.gate +1 -1
  254. package/payload/evidence-kit/checks/check-producer-liveness.gate +3 -0
  255. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.knobs +7 -0
  256. package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.knobs +7 -0
  257. package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +7 -7
  258. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/TASK-QUEUE.md +3 -1
  259. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/args +1 -0
  260. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/expect.txt +2 -0
  261. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/scripts/evidence-config.knobs +4 -0
  262. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/validate-baseline.txt +1 -0
  263. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/TASK-QUEUE.md +3 -1
  264. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/args +1 -0
  265. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/scripts/evidence-config.knobs +3 -0
  266. package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +134 -14
  267. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/scripts/{evidence-config.sh → evidence-config.knobs} +3 -5
  268. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/scripts/{evidence-config.sh → evidence-config.knobs} +3 -5
  269. package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +5 -4
  270. package/payload/evidence-kit/gate-tests/diff-baseline-status.test.sh +128 -0
  271. package/payload/evidence-kit/gate-tests/evidence-lib.test.sh +51 -45
  272. package/payload/evidence-kit/gate-tests/pre-hook.test.sh +66 -0
  273. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +29 -16
  274. package/payload/evidence-kit/templates/evidence-config.knobs +1 -0
  275. package/payload/gate-sdk/README.md +47 -73
  276. package/payload/gate-sdk/bin/build-native.sh +89 -1
  277. package/payload/gate-sdk/bin/run-gates.ps1 +266 -0
  278. package/payload/gate-sdk/bin/run-gates.sh +60 -182
  279. package/payload/gate-sdk/checks/check-action-gh-repo.gate +1 -1
  280. package/payload/gate-sdk/checks/check-action-job-ref.gate +3 -0
  281. package/payload/gate-sdk/checks/check-action-permissions.gate +3 -0
  282. package/payload/gate-sdk/checks/check-action-pinning.gate +1 -1
  283. package/payload/gate-sdk/checks/check-action-run-path.gate +3 -0
  284. package/payload/gate-sdk/checks/check-action-run-shell.gate +3 -0
  285. package/payload/gate-sdk/checks/check-commit-msg.gate +2 -1
  286. package/payload/gate-sdk/checks/check-commit-subject.gate +1 -1
  287. package/payload/gate-sdk/checks/check-core-files.gate +1 -1
  288. package/payload/gate-sdk/checks/check-crate-arms.gate +3 -0
  289. package/payload/gate-sdk/checks/check-enforcement-fresh.gate +3 -2
  290. package/payload/gate-sdk/checks/check-exec-bit.gate +1 -1
  291. package/payload/gate-sdk/checks/check-front-end-fail-open.gate +3 -0
  292. package/payload/gate-sdk/checks/check-gate-assertions.gate +3 -0
  293. package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +1 -1
  294. package/payload/gate-sdk/checks/check-gate-exemption-tasks.gate +1 -1
  295. package/payload/gate-sdk/checks/check-gate-fail-closed.gate +1 -1
  296. package/payload/gate-sdk/checks/check-gate-fixture-coverage.gate +1 -1
  297. package/payload/gate-sdk/checks/check-gate-output.gate +1 -1
  298. package/payload/gate-sdk/checks/check-gate-substrate-parity.gate +3 -0
  299. package/payload/gate-sdk/checks/check-graph.gate +2 -1
  300. package/payload/gate-sdk/checks/check-hook-exec-bit.gate +1 -1
  301. package/payload/gate-sdk/checks/check-identity.gate +1 -1
  302. package/payload/gate-sdk/checks/check-install-disposition.gate +3 -0
  303. package/payload/gate-sdk/checks/check-kit-enum.gate +1 -1
  304. package/payload/gate-sdk/checks/check-kit-registration.gate +1 -1
  305. package/payload/gate-sdk/checks/check-kit-roots-dialect.gate +3 -0
  306. package/payload/gate-sdk/checks/check-packed-links.gate +3 -0
  307. package/payload/gate-sdk/checks/check-path-dialect.gate +3 -0
  308. package/payload/gate-sdk/checks/check-pipe-membership.gate +3 -0
  309. package/payload/gate-sdk/checks/check-portability-floor.gate +4 -0
  310. package/payload/gate-sdk/checks/check-projection-roster.gate +4 -0
  311. package/payload/gate-sdk/checks/check-reads-couples.gate +1 -1
  312. package/payload/gate-sdk/checks/check-root-tiering.gate +1 -1
  313. package/payload/gate-sdk/checks/check-shellcheck.gate +3 -0
  314. package/payload/gate-sdk/checks/check-template-copy-parity.gate +1 -1
  315. package/payload/gate-sdk/checks/check-tree-terms.gate +4 -0
  316. package/payload/gate-sdk/checks/check-workflow-tiering.gate +1 -1
  317. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/args +2 -0
  318. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/expect.txt +1 -0
  319. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/scripts/gate-sdk-config.knobs +1 -0
  320. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/tree/notes.md +3 -0
  321. package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/tree/workflows/ci.yml +8 -0
  322. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/args +3 -0
  323. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/expect.txt +1 -0
  324. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/scripts/gate-sdk-config.knobs +1 -0
  325. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/tree/notes.md +3 -0
  326. package/payload/gate-sdk/gate-tests/check-action-job-ref/good/tree/workflows/ci.yml +8 -0
  327. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/args +3 -0
  328. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/expect.txt +5 -0
  329. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/tree/workflows/empty-allowlist.yml +29 -0
  330. package/payload/gate-sdk/gate-tests/check-action-permissions/bad/tree/workflows/gates.yml +25 -0
  331. package/payload/gate-sdk/gate-tests/check-action-permissions/good/args +5 -0
  332. package/payload/gate-sdk/gate-tests/check-action-permissions/good/expect.txt +1 -0
  333. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/action.yml +9 -0
  334. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/not-actions.yml +7 -0
  335. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/workflows/declared.yml +69 -0
  336. package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/workflows/valves.yml +22 -0
  337. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/args +4 -0
  338. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/expect.txt +2 -0
  339. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/tree/scripts/present.sh +3 -0
  340. package/payload/gate-sdk/gate-tests/check-action-run-path/bad/tree/workflows/ci.yml +14 -0
  341. package/payload/gate-sdk/gate-tests/check-action-run-path/good/args +5 -0
  342. package/payload/gate-sdk/gate-tests/check-action-run-path/good/expect.txt +1 -0
  343. package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/scripts/build.sh +3 -0
  344. package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/sub/scripts/inner.sh +3 -0
  345. package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/workflows/ci.yml +36 -0
  346. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/args +4 -2
  347. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/expect.txt +2 -0
  348. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/tree/workflows/runner-dialect.yml +36 -0
  349. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/args +3 -2
  350. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/expect.txt +1 -1
  351. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/tree/workflows/runner-dialect.yml +71 -0
  352. package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +102 -9
  353. package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/smoke/install.sh +1 -1
  354. package/payload/gate-sdk/gate-tests/check-assertion-strength/good/smoke/install.sh +1 -1
  355. package/payload/gate-sdk/gate-tests/check-assertion-strength.test.sh +55 -0
  356. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/expect.txt +1 -0
  357. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/msg.txt +4 -0
  358. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/patterns.list +5 -1
  359. package/payload/gate-sdk/gate-tests/check-commit-msg/good/msg.txt +7 -0
  360. package/payload/gate-sdk/gate-tests/check-commit-msg/good/patterns.list +5 -1
  361. package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +2 -2
  362. package/payload/gate-sdk/gate-tests/check-core-files.test.sh +1 -1
  363. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.knobs +3 -0
  364. package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.knobs +3 -0
  365. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/SPEC.md +3 -0
  366. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/checks/check-demo.gate +1 -0
  367. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/probe.conf +1 -0
  368. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/templates/guide.md +3 -0
  369. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/docs/enforcement.md +33 -0
  370. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/scripts/gate-sdk-config.knobs +1 -0
  371. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/scripts/gates.list +1 -0
  372. package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +1 -1
  373. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/args +3 -0
  374. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/expect.txt +2 -0
  375. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/gate-sdk/bin/run-gates.ps1 +5 -0
  376. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/gate-sdk/bin/run-gates.sh +9 -0
  377. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/args +4 -0
  378. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/expect.txt +1 -0
  379. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/gate-sdk/bin/run-gates.ps1 +5 -0
  380. package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/gate-sdk/bin/run-gates.sh +9 -0
  381. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/expect.txt +5 -1
  382. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/SPEC.md +22 -0
  383. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-count.sh +11 -0
  384. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-extra.sh +14 -0
  385. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-zero.sh +7 -0
  386. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -1
  387. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/SPEC.md +30 -0
  388. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/check-qux.sh +13 -0
  389. package/payload/gate-sdk/gate-tests/check-gate-assertions.test.sh +117 -0
  390. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.knobs +2 -0
  391. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.knobs +2 -0
  392. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +6 -12
  393. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +5 -3
  394. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/TASK-QUEUE.md +3 -1
  395. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks.test.sh +4 -2
  396. package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +1 -1
  397. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/ci/build-artifact.sh +9 -0
  398. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/ci.yml +9 -0
  399. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +6 -2
  400. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kit-spec.md +6 -0
  401. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-nospec.sh +4 -0
  402. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-ungrounded.sh +5 -0
  403. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.knobs +5 -0
  404. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +8 -0
  405. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/ci/build-artifact.sh +9 -0
  406. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/ci.yml +16 -0
  407. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +6 -2
  408. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/kit-spec.md +12 -0
  409. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-held.sh +1 -0
  410. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.knobs +5 -0
  411. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +1 -1
  412. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +222 -197
  413. package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +7 -2
  414. package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +4 -0
  415. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +3 -1
  416. package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +1 -1
  417. package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +8 -8
  418. package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +2 -2
  419. package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +49 -14
  420. package/payload/gate-sdk/gate-tests/check-identity/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +4 -4
  421. package/payload/gate-sdk/gate-tests/check-identity/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +4 -4
  422. package/payload/gate-sdk/gate-tests/check-identity.test.sh +1 -1
  423. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-eta.sh +7 -0
  424. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-iota.sh +7 -0
  425. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-theta.sh +7 -0
  426. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-zeta.gate +3 -0
  427. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/smoke/install.sh +1 -1
  428. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/args +8 -5
  429. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/expect.txt +5 -0
  430. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/native/src/installer/recipe.rs +10 -0
  431. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
  432. package/payload/gate-sdk/gate-tests/check-install-disposition/good/args +8 -4
  433. package/payload/gate-sdk/gate-tests/check-install-disposition/good/expect.txt +2 -0
  434. package/payload/gate-sdk/gate-tests/check-install-disposition/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
  435. package/payload/gate-sdk/gate-tests/check-install-disposition/good/{alpha-kit → site-kit}/checks/check-alpha.sh +1 -1
  436. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-beta.gate +3 -0
  437. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-gamma.sh +6 -0
  438. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-omega.sh +7 -0
  439. package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-psi.sh +7 -0
  440. package/payload/gate-sdk/gate-tests/check-install-disposition/good/{alpha-kit → site-kit}/smoke/install.sh +2 -2
  441. package/payload/gate-sdk/gate-tests/check-kit-registration/bad/registry-doc.md +15 -12
  442. package/payload/gate-sdk/gate-tests/check-kit-registration/good/args +7 -5
  443. package/payload/gate-sdk/gate-tests/check-kit-registration/good/scripts/gate-sdk-config.knobs +2 -0
  444. package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +2 -2
  445. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/args +5 -0
  446. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/expect.txt +1 -0
  447. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/checks/placeholder.txt +3 -0
  448. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/gate-tests/alpha.test.sh +3 -0
  449. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/lib/alpha.sh +3 -0
  450. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/checks/placeholder.txt +3 -0
  451. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/gate-tests/beta.test.sh +3 -0
  452. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/lib/beta.sh +3 -0
  453. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/gate-sdk/checks/placeholder.txt +3 -0
  454. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/gate-sdk/lib/gate.sh +3 -0
  455. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/scripts/gate-sdk-config.knobs +7 -0
  456. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/scripts/gates.list +3 -0
  457. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/args +7 -0
  458. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/expect.txt +1 -0
  459. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/checks/placeholder.txt +3 -0
  460. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/gate-tests/alpha.test.sh +3 -0
  461. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/lib/alpha.sh +3 -0
  462. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/checks/placeholder.txt +3 -0
  463. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/gate-tests/beta.test.sh +3 -0
  464. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/lib/beta.sh +3 -0
  465. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/gate-sdk/checks/placeholder.txt +3 -0
  466. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/gate-sdk/lib/gate.sh +3 -0
  467. package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/scripts/gates.list +3 -0
  468. package/payload/gate-sdk/gate-tests/check-packed-links/bad/alpha-kit/README.md +5 -0
  469. package/payload/gate-sdk/gate-tests/check-packed-links/bad/args +5 -0
  470. package/payload/gate-sdk/gate-tests/check-packed-links/bad/beta-kit/README.md +5 -0
  471. package/payload/gate-sdk/gate-tests/check-packed-links/bad/expect.txt +2 -0
  472. package/payload/gate-sdk/gate-tests/check-packed-links/bad/scripts/gate-sdk-config.knobs +4 -0
  473. package/payload/gate-sdk/gate-tests/check-packed-links/good/alpha-kit/README.md +5 -0
  474. package/payload/gate-sdk/gate-tests/check-packed-links/good/args +8 -0
  475. package/payload/gate-sdk/gate-tests/check-packed-links/good/beta-kit/README.md +9 -0
  476. package/payload/gate-sdk/gate-tests/check-packed-links/good/expect.txt +1 -0
  477. package/payload/gate-sdk/gate-tests/check-packed-links/good/gamma-kit/SPEC.md +4 -0
  478. package/payload/gate-sdk/gate-tests/check-packed-links/good/scripts/gate-sdk-config.knobs +6 -0
  479. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/args +3 -0
  480. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/expect.txt +15 -0
  481. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/primitive.rs +19 -0
  482. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/producer.rs +8 -0
  483. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/walk.rs +13 -0
  484. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/bound-root.sh +5 -0
  485. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/case-arm.sh +6 -0
  486. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/commented.sh +5 -0
  487. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/common-dir.sh +4 -0
  488. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/glob-test.sh +4 -0
  489. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/late-anchor.sh +7 -0
  490. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/logical-readback.sh +5 -0
  491. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/probe.sh +7 -0
  492. package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/two-root.sh +5 -0
  493. package/payload/gate-sdk/gate-tests/check-path-dialect/good/args +3 -0
  494. package/payload/gate-sdk/gate-tests/check-path-dialect/good/expect.txt +13 -0
  495. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/commented.rs +5 -0
  496. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/local.rs +12 -0
  497. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/namespace.rs +11 -0
  498. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/typed.rs +10 -0
  499. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/verdict.rs +5 -0
  500. package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/walk.rs +24 -0
  501. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/anchored.sh +6 -0
  502. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/cd-only.sh +7 -0
  503. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/commented.sh +6 -0
  504. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/one-root.sh +4 -0
  505. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/probe.sh +8 -0
  506. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/rooted.sh +23 -0
  507. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/subshell.sh +6 -0
  508. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/two-line.sh +8 -0
  509. package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/verdict.sh +7 -0
  510. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/args +4 -0
  511. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/expect.txt +6 -0
  512. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/scripts/gate-sdk-config.knobs +1 -0
  513. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/array-grep.sh +6 -0
  514. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/echo-max-count.sh +5 -0
  515. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/gate-tests/membership.test.sh +6 -0
  516. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/loop-head.sh +5 -0
  517. package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/tests/relocated.test.sh +6 -0
  518. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/args +5 -0
  519. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/expect.txt +3 -0
  520. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/full-reader.sh +4 -0
  521. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/gate-tests/check-x/bad/violating.test.sh +6 -0
  522. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/gate-tests/clean.test.sh +8 -0
  523. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/loop-membership.sh +8 -0
  524. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/no-pipefail.sh +6 -0
  525. package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/one-line-producer.sh +5 -0
  526. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/args +2 -0
  527. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/expect.txt +8 -0
  528. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/patterns.list +4 -0
  529. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/scripts/gate-sdk-config.knobs +4 -0
  530. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/empty-reason-verb +5 -0
  531. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/strings.ps1 +6 -0
  532. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/too-far-verb +5 -0
  533. package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/undeclared-verb +3 -0
  534. package/payload/gate-sdk/gate-tests/check-portability-floor/good/args +2 -0
  535. package/payload/gate-sdk/gate-tests/check-portability-floor/good/expect.txt +1 -0
  536. package/payload/gate-sdk/gate-tests/check-portability-floor/good/patterns.list +5 -0
  537. package/payload/gate-sdk/gate-tests/check-portability-floor/good/scripts/gate-sdk-config.knobs +4 -0
  538. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/front.ps1 +7 -0
  539. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/plain-verb +5 -0
  540. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/portability-patterns.list +5 -0
  541. package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/upgrade-verb +7 -0
  542. package/payload/gate-sdk/gate-tests/check-portability-floor.test.sh +154 -0
  543. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/demo-kit/checks/check-beta.gate +2 -0
  544. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/docs/roster.md +11 -0
  545. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/expect.txt +7 -0
  546. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-alpha.gate +2 -0
  547. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-gamma.gate +2 -0
  548. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-plain.gate +1 -0
  549. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/gate-sdk-config.knobs +3 -0
  550. package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/gates.list +4 -0
  551. package/payload/gate-sdk/gate-tests/check-projection-roster/good/demo-kit/checks/check-beta.gate +2 -0
  552. package/payload/gate-sdk/gate-tests/check-projection-roster/good/docs/roster.md +16 -0
  553. package/payload/gate-sdk/gate-tests/check-projection-roster/good/expect.txt +1 -0
  554. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-alpha.gate +2 -0
  555. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-delta.gate +2 -0
  556. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-epsilon.gate +2 -0
  557. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-plain.gate +1 -0
  558. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/gate-sdk-config.knobs +4 -0
  559. package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/gates.list +5 -0
  560. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.knobs +4 -0
  561. package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +1 -1
  562. package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.knobs +4 -0
  563. package/payload/gate-sdk/gate-tests/check-reads-couples/bad/expect.txt +1 -1
  564. package/payload/gate-sdk/gate-tests/check-reads-couples/bad/sandbox-gate.sh +4 -4
  565. package/payload/gate-sdk/gate-tests/check-reads-couples/good/sandbox-gate.sh +4 -4
  566. package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +25 -20
  567. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/alpha-kit/smoke/install.sh +1 -1
  568. 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
  569. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/install.sh +1 -1
  570. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/violation.sh +1 -1
  571. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/args +1 -1
  572. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/beta-kit/smoke/install.sh +1 -1
  573. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.knobs +4 -0
  574. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/args +3 -1
  575. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/delegation-kit/templates/session-note.sh +6 -0
  576. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/expect.txt +1 -1
  577. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/session-note.sh +6 -0
  578. package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +1 -1
  579. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/args +2 -0
  580. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/drift-kit/templates/kpis.list +18 -0
  581. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/expect.txt +2 -0
  582. 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
  583. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/args +3 -1
  584. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/drift-kit/templates/kpis.list +17 -0
  585. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/expect.txt +1 -1
  586. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.knobs +4 -0
  587. package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +5 -5
  588. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/expect.txt +6 -0
  589. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/patterns.list +4 -0
  590. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/accounts.txt +1 -0
  591. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/multi.txt +4 -0
  592. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/second-leak.txt +2 -0
  593. package/payload/gate-sdk/gate-tests/check-tree-terms/good/expect.txt +1 -1
  594. package/payload/gate-sdk/gate-tests/check-tree-terms/good/patterns.list +7 -0
  595. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/anchored.txt +5 -0
  596. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/handles.txt +2 -0
  597. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/msg-patterns.list +2 -0
  598. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/msg-patterns.local.list +3 -0
  599. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/worktrees/vendored-note.txt +3 -0
  600. package/payload/gate-sdk/gate-tests/check-tree-terms.test.sh +133 -0
  601. package/payload/gate-sdk/gate-tests/emit-arm-shape.test.sh +95 -0
  602. package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +10 -10
  603. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +10 -184
  604. package/payload/gate-sdk/gate-tests/reads-census.test.sh +96 -0
  605. package/payload/gate-sdk/gate-tests/run-arm-contract.test.sh +190 -0
  606. package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +64 -41
  607. package/payload/gate-sdk/gate-tests/run-for-path.test.sh +2 -2
  608. package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +121 -16
  609. package/payload/gate-sdk/gate-tests/run-gates-linked-worktree.test.sh +136 -0
  610. package/payload/gate-sdk/lib/gate.sh +231 -484
  611. package/payload/gate-sdk/lib/test-hermetic.sh +39 -9
  612. package/payload/gate-sdk/templates/check-skeleton.sh +3 -2
  613. package/payload/gate-sdk/templates/gates-workflow.yml +23 -10
  614. package/payload/gate-sdk/templates/msg-patterns.list +14 -5
  615. package/payload/gate-sdk/templates/portability-patterns.list +56 -0
  616. package/payload/guard-kit/README.md +43 -46
  617. package/payload/guard-kit/checks/check-door-binding.gate +3 -0
  618. package/payload/guard-kit/gate-tests/check-door-binding/bad/alpha-kit/README.md +6 -0
  619. package/payload/guard-kit/gate-tests/check-door-binding/bad/alpha-kit/templates/alpha-config.knobs +3 -0
  620. package/payload/guard-kit/gate-tests/check-door-binding/bad/args +5 -0
  621. package/payload/guard-kit/gate-tests/check-door-binding/bad/beta-kit/lib/beta.sh +6 -0
  622. package/payload/guard-kit/gate-tests/check-door-binding/bad/expect.txt +5 -0
  623. package/payload/guard-kit/gate-tests/check-door-binding/bad/scripts/gate-sdk-config.knobs +4 -0
  624. package/payload/guard-kit/gate-tests/check-door-binding/bad/scripts/guard-config.knobs +3 -0
  625. package/payload/guard-kit/gate-tests/check-door-binding/bad/site/banner.md +8 -0
  626. package/payload/guard-kit/gate-tests/check-door-binding/bad/site/landing.md +11 -0
  627. package/payload/guard-kit/gate-tests/check-door-binding/good/alpha-kit/README.md +8 -0
  628. package/payload/guard-kit/gate-tests/check-door-binding/good/alpha-kit/templates/settings-hooks.json +20 -0
  629. package/payload/guard-kit/gate-tests/check-door-binding/good/args +7 -0
  630. package/payload/guard-kit/gate-tests/check-door-binding/good/beta-kit/lib/beta.sh +6 -0
  631. package/payload/guard-kit/gate-tests/check-door-binding/good/expect.txt +1 -0
  632. package/payload/guard-kit/gate-tests/check-door-binding/good/scripts/gate-sdk-config.knobs +4 -0
  633. package/payload/guard-kit/gate-tests/check-door-binding/good/scripts/guard-config.knobs +3 -0
  634. package/payload/guard-kit/gate-tests/check-door-binding/good/site/mirror.md +12 -0
  635. package/payload/guard-kit/gate-tests/check-door-binding/good/site/register.md +24 -0
  636. package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +75 -17
  637. package/payload/guard-kit/gate-tests/consumer-rules.test.sh +189 -0
  638. package/payload/guard-kit/gate-tests/door-binding-corpus.test.sh +72 -0
  639. package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +48 -23
  640. package/payload/guard-kit/gate-tests/guard-config-knobs.test.sh +170 -0
  641. package/payload/guard-kit/gate-tests/rewrite.test.sh +73 -0
  642. package/payload/guard-kit/gate-tests/scan-prompts.test.sh +174 -8
  643. package/payload/guard-kit/gate-tests/scratch-run.test.sh +149 -13
  644. package/payload/guard-kit/gate-tests/worktree-confinement.test.sh +169 -0
  645. package/payload/guard-kit/guard-tests/background-cases.tsv +23 -0
  646. package/payload/guard-kit/guard-tests/cases.tsv +374 -38
  647. package/payload/guard-kit/guard-tests/powershell-background-cases.tsv +29 -0
  648. package/payload/guard-kit/guard-tests/powershell-cases.tsv +81 -0
  649. package/payload/guard-kit/templates/close-triage.md +15 -55
  650. package/payload/guard-kit/templates/guard-config.knobs +26 -0
  651. package/payload/guard-kit/templates/settings-allow.json +15 -0
  652. package/payload/guard-kit/templates/settings-hooks.json +5 -5
  653. package/payload/lifecycle-kit/README.md +48 -76
  654. package/payload/lifecycle-kit/checks/check-audit-roster.gate +3 -0
  655. package/payload/lifecycle-kit/checks/check-close-surfaces.gate +1 -1
  656. package/payload/lifecycle-kit/checks/check-dispatch-entry.gate +3 -0
  657. package/payload/lifecycle-kit/checks/check-gap-inbox-neutrality.gate +1 -1
  658. package/payload/lifecycle-kit/checks/check-lesson-disposition.gate +1 -1
  659. package/payload/lifecycle-kit/checks/check-lifecycle-registration.gate +1 -1
  660. package/payload/lifecycle-kit/checks/check-merge-attrs.gate +1 -1
  661. package/payload/lifecycle-kit/checks/check-scratch-citation.gate +1 -1
  662. package/payload/lifecycle-kit/checks/check-shim-restatement.gate +1 -1
  663. package/payload/lifecycle-kit/checks/check-skill-binding.gate +1 -1
  664. package/payload/lifecycle-kit/checks/check-stage-entry.gate +2 -2
  665. package/payload/lifecycle-kit/checks/check-stage-evidence.gate +1 -1
  666. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +2 -2
  667. package/payload/lifecycle-kit/checks/check-stamp-subject.gate +3 -0
  668. package/payload/lifecycle-kit/checks/check-survey-record.gate +2 -2
  669. package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +93 -18
  670. package/payload/lifecycle-kit/gate-tests/boundary-stage-journal.test.sh +196 -0
  671. package/payload/lifecycle-kit/gate-tests/boundary-worktree-refusal.test.sh +214 -0
  672. package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/args +2 -0
  673. package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/expect.txt +6 -0
  674. package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/roster.txt +34 -0
  675. package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/args +2 -0
  676. package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/expect.txt +1 -0
  677. package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/roster.txt +22 -0
  678. package/payload/lifecycle-kit/gate-tests/check-audit-roster.test.sh +101 -0
  679. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.knobs +2 -0
  680. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/owners/worktrees/inbox.md +5 -0
  681. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.knobs +2 -0
  682. package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +21 -4
  683. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/args +6 -0
  684. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/expect.txt +1 -0
  685. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/head.txt +5 -0
  686. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/marker.txt +1 -0
  687. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/msg.txt +4 -0
  688. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/paths.txt +1 -0
  689. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/staged.txt +5 -0
  690. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/args +6 -0
  691. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/expect.txt +1 -0
  692. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/head.txt +5 -0
  693. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/marker.txt +1 -0
  694. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/msg.txt +4 -0
  695. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/paths.txt +2 -0
  696. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/staged.txt +6 -0
  697. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry.test.sh +60 -0
  698. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +1 -1
  699. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/bad/AGENT.md +1 -5
  700. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/good/AGENT.md +1 -5
  701. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +1 -1
  702. package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +2 -2
  703. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.knobs +2 -0
  704. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.knobs +2 -0
  705. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/worktrees/queue.md +13 -0
  706. package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +1 -1
  707. package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +1 -1
  708. package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +158 -11
  709. package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +27 -2
  710. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/align.md +4 -1
  711. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/build.md +4 -1
  712. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/close.md +5 -0
  713. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/scope.md +4 -1
  714. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/validate.md +1 -1
  715. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/expect.txt +1 -1
  716. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/align.md +4 -1
  717. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/build.md +4 -1
  718. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/close.md +4 -1
  719. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/scope.md +4 -1
  720. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/validate.md +4 -1
  721. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage.test.sh +73 -0
  722. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/args +4 -0
  723. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/expect.txt +1 -0
  724. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/head.txt +5 -0
  725. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/msg.txt +4 -0
  726. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/staged.txt +6 -0
  727. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/args +4 -0
  728. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/expect.txt +1 -0
  729. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/head.txt +5 -0
  730. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/msg.txt +4 -0
  731. package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/staged.txt +7 -0
  732. package/payload/lifecycle-kit/gate-tests/check-stamp-subject.test.sh +59 -0
  733. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/expect.txt +3 -0
  734. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/record.md +24 -0
  735. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -1
  736. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +10 -0
  737. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +56 -5
  738. package/payload/lifecycle-kit/gate-tests/dispatch-marker.test.sh +152 -0
  739. package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +23 -48
  740. package/payload/lifecycle-kit/gate-tests/gap-inbox-route.test.sh +7 -5
  741. package/payload/lifecycle-kit/gate-tests/lead-journal-open.test.sh +119 -0
  742. package/payload/lifecycle-kit/gate-tests/preflight-valve.test.sh +170 -0
  743. package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +5 -3
  744. package/payload/lifecycle-kit/gate-tests/ruling-staleness.test.sh +89 -0
  745. package/payload/lifecycle-kit/gate-tests/stamp-before-write.test.sh +66 -0
  746. package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +12 -6
  747. package/payload/lifecycle-kit/templates/consult.md +9 -63
  748. package/payload/lifecycle-kit/templates/lead.md +143 -423
  749. package/payload/lifecycle-kit/templates/lifecycle-config.knobs +1 -0
  750. package/payload/lifecycle-kit/templates/release-sweep.md +6 -35
  751. package/payload/lifecycle-kit/templates/stages/align.md +14 -82
  752. package/payload/lifecycle-kit/templates/stages/build.md +30 -98
  753. package/payload/lifecycle-kit/templates/stages/close.md +21 -170
  754. package/payload/lifecycle-kit/templates/stages/scope.md +42 -167
  755. package/payload/lifecycle-kit/templates/stages/spec.md +31 -97
  756. package/payload/lifecycle-kit/templates/stages/validate.md +22 -59
  757. package/payload/lifecycle-kit/templates/upgrade.md +6 -37
  758. package/payload/queue-kit/README.md +33 -48
  759. package/payload/queue-kit/checks/check-deferred-board-tags.gate +3 -0
  760. package/payload/queue-kit/checks/check-queue-entry-budget.gate +2 -2
  761. package/payload/queue-kit/checks/check-queue-hygiene.gate +2 -2
  762. package/payload/queue-kit/checks/check-queue-prose-precondition.gate +1 -1
  763. package/payload/queue-kit/checks/check-queue-sections.gate +1 -1
  764. package/payload/queue-kit/checks/check-queue-slug-liveness.gate +2 -2
  765. package/payload/queue-kit/checks/check-queue-wrap.gate +2 -2
  766. package/payload/queue-kit/checks/check-roadmap-fresh.gate +3 -2
  767. package/payload/queue-kit/checks/check-tag-lead-line.gate +2 -2
  768. package/payload/queue-kit/checks/check-task-conservation.gate +1 -1
  769. package/payload/queue-kit/checks/check-task-names.gate +2 -2
  770. package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/TASK-QUEUE.md +41 -0
  771. package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/expect.txt +6 -0
  772. package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/widget-kit/README.md +3 -0
  773. package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/TASK-QUEUE.md +39 -0
  774. package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/expect.txt +1 -0
  775. package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/widget-kit/README.md +3 -0
  776. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +76 -31
  777. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +12 -4
  778. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.knobs +4 -0
  779. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +58 -19
  780. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/expect.txt +8 -4
  781. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.knobs +4 -0
  782. package/payload/queue-kit/gate-tests/check-queue-entry-budget.test.sh +124 -0
  783. package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/TASK-QUEUE.md +11 -1
  784. package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/expect.txt +2 -0
  785. package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +30 -11
  786. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/TASK-QUEUE.md +3 -1
  787. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/expect.txt +1 -0
  788. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/good/TASK-QUEUE.md +22 -6
  789. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/TASK-QUEUE.md +3 -1
  790. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/docs/page.md +1 -1
  791. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/expect.txt +3 -1
  792. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.knobs +1 -0
  793. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/TASK-QUEUE.md +6 -2
  794. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/page.md +3 -3
  795. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/worktrees/page.md +4 -0
  796. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.knobs +1 -0
  797. package/payload/queue-kit/gate-tests/check-queue-slug-liveness.test.sh +100 -0
  798. package/payload/queue-kit/gate-tests/check-queue-wrap/bad/TASK-QUEUE.md +3 -1
  799. package/payload/queue-kit/gate-tests/check-queue-wrap/good/TASK-QUEUE.md +20 -6
  800. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/TASK-QUEUE.md +15 -8
  801. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.knobs +5 -0
  802. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/TASK-QUEUE.md +13 -6
  803. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.knobs +5 -0
  804. package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/TASK-QUEUE.md +28 -7
  805. package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/expect.txt +10 -2
  806. package/payload/queue-kit/gate-tests/check-tag-lead-line/good/TASK-QUEUE.md +30 -8
  807. package/payload/queue-kit/gate-tests/check-task-names/bad/TASK-QUEUE.md +18 -3
  808. package/payload/queue-kit/gate-tests/check-task-names/bad/expect.txt +9 -0
  809. package/payload/queue-kit/gate-tests/check-task-names/good/TASK-QUEUE.md +20 -6
  810. package/payload/queue-kit/gate-tests/entry-history.test.sh +197 -0
  811. package/payload/queue-kit/gate-tests/queue-counts.test.sh +77 -73
  812. package/payload/queue-kit/gate-tests/queue-edges.test.sh +168 -87
  813. package/payload/queue-kit/gate-tests/queue-index.test.sh +30 -16
  814. package/payload/queue-kit/gate-tests/roadmap.test.sh +65 -58
  815. package/payload/queue-kit/templates/TASK-QUEUE.md +36 -23
  816. package/payload/queue-kit/templates/queue-config.knobs +1 -0
  817. package/payload/site-kit/README.md +26 -45
  818. package/payload/site-kit/checks/check-docs-cname-parity.gate +1 -1
  819. package/payload/site-kit/checks/check-docs-highlight-coverage.gate +4 -0
  820. package/payload/site-kit/checks/check-docs-liquid-parse.gate +3 -0
  821. package/payload/site-kit/checks/check-docs-render-fidelity.gate +3 -0
  822. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +1 -1
  823. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/scripts/site-config.knobs +2 -0
  824. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +2 -2
  825. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/scripts/site-config.knobs +2 -0
  826. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/docs/_layouts/default.html +11 -0
  827. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/expect.txt +4 -0
  828. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/scripts/highlight-tokens.list +7 -0
  829. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/scripts/site-config.knobs +3 -0
  830. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/docs/_layouts/default.html +14 -0
  831. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/expect.txt +1 -0
  832. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/scripts/highlight-tokens.list +7 -0
  833. package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/scripts/site-config.knobs +1 -0
  834. package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/docs/_layouts/default.html +4 -0
  835. package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/docs/span.md +3 -0
  836. package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/expect.txt +2 -0
  837. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/_layouts/default.html +4 -0
  838. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/front.md +7 -0
  839. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/loop.md +5 -0
  840. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/plain.html +1 -0
  841. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/raw.md +3 -0
  842. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/search.json +4 -0
  843. package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/expect.txt +1 -0
  844. package/payload/site-kit/gate-tests/check-docs-liquid-parse-parser.test.sh +62 -0
  845. package/payload/site-kit/gate-tests/check-docs-render-fidelity-batch.test.sh +40 -45
  846. package/payload/site-kit/gate-tests/check-docs-render-fidelity-foreign.test.sh +7 -4
  847. package/payload/site-kit/gate-tests/check-docs-render-fidelity-span.test.sh +7 -4
  848. package/payload/site-kit/gate-tests/check-docs-render-fidelity-table.test.sh +7 -4
  849. package/payload/site-kit/templates/site-health.yml +67 -4
  850. package/profiles.list +4 -5
  851. package/lib/common/digest.sh +0 -18
  852. package/lib/common/lock.sh +0 -75
  853. package/lib/common/profile.sh +0 -91
  854. package/lib/common/recipe.sh +0 -106
  855. package/lib/diff.sh +0 -66
  856. package/lib/doctor.sh +0 -164
  857. package/lib/init.sh +0 -428
  858. package/lib/uninstall.sh +0 -214
  859. package/lib/update.sh +0 -34
  860. package/payload/canon-kit/SPEC.md +0 -2129
  861. package/payload/canon-kit/checks/check-surface-duplication.sh +0 -106
  862. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +0 -6
  863. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +0 -6
  864. package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.sh +0 -10
  865. package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.sh +0 -10
  866. package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.sh +0 -6
  867. package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.sh +0 -6
  868. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.sh +0 -8
  869. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.sh +0 -8
  870. package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.sh +0 -4
  871. package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.sh +0 -4
  872. package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.sh +0 -8
  873. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.sh +0 -5
  874. package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.sh +0 -5
  875. package/payload/canon-kit/lib/spec.sh +0 -544
  876. package/payload/canon-kit/smoke/install.sh +0 -56
  877. package/payload/canon-kit/smoke/violation.sh +0 -22
  878. package/payload/canon-kit/templates/canon-config.sh +0 -2
  879. package/payload/context-kit/SPEC.md +0 -1123
  880. package/payload/context-kit/bin/always-loaded.sh +0 -70
  881. package/payload/context-kit/bin/env-probe.sh +0 -142
  882. package/payload/context-kit/bin/md-index.sh +0 -80
  883. package/payload/context-kit/bin/md-section.sh +0 -63
  884. package/payload/context-kit/bin/pub-index.sh +0 -90
  885. package/payload/context-kit/bin/run-index-tests.sh +0 -91
  886. package/payload/context-kit/gate-tests/check-footprint-fresh/good/args +0 -4
  887. package/payload/context-kit/gate-tests/check-footprint-fresh/good/emit.txt +0 -12
  888. package/payload/context-kit/gate-tests/check-footprint-fresh/good/projection.txt +0 -12
  889. package/payload/context-kit/index-tests/expected/toolfloor.txt +0 -23
  890. package/payload/context-kit/index-tests/toolfloor-cases.sh +0 -49
  891. package/payload/context-kit/lib/context.sh +0 -56
  892. package/payload/context-kit/lib/pub-lang/rust.sh +0 -26
  893. package/payload/context-kit/lib/pub-lang/ts.sh +0 -32
  894. package/payload/context-kit/lib/toolfloor.sh +0 -58
  895. package/payload/context-kit/smoke/agents-md.sh +0 -139
  896. package/payload/context-kit/smoke/install.sh +0 -64
  897. package/payload/context-kit/smoke/violation.sh +0 -21
  898. package/payload/context-kit/templates/context-config.sh +0 -2
  899. package/payload/delegation-kit/SPEC.md +0 -1712
  900. package/payload/delegation-kit/bin/run-budget-guard-tests.sh +0 -88
  901. package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +0 -97
  902. package/payload/delegation-kit/bin/run-trend-tests.sh +0 -63
  903. package/payload/delegation-kit/bin/run-usage-tests.sh +0 -226
  904. package/payload/delegation-kit/bin/usage-trend.sh +0 -120
  905. package/payload/delegation-kit/bin/usage-verdict.sh +0 -144
  906. package/payload/delegation-kit/lib/delegation.sh +0 -84
  907. package/payload/delegation-kit/smoke/install.sh +0 -63
  908. package/payload/delegation-kit/smoke/violation.sh +0 -16
  909. package/payload/delegation-kit/templates/agent-budget-guard.sh +0 -18
  910. package/payload/delegation-kit/templates/agent-dispatch-guard.sh +0 -61
  911. package/payload/delegation-kit/templates/delegation-config.sh +0 -6
  912. package/payload/delegation-kit/templates/statusline-usage.sh +0 -101
  913. package/payload/delegation-kit/templates/usage-poller.sh +0 -67
  914. package/payload/delegation-kit/usage-tests/budget-guard-cases.tsv +0 -20
  915. package/payload/doctrine-kit/SPEC.md +0 -385
  916. package/payload/doctrine-kit/bin/install-doctrine.sh +0 -194
  917. package/payload/doctrine-kit/bin/stage-rules.sh +0 -51
  918. package/payload/doctrine-kit/lib/doctrine.sh +0 -29
  919. package/payload/doctrine-kit/smoke/install.sh +0 -203
  920. package/payload/doctrine-kit/smoke/violation.sh +0 -13
  921. package/payload/drift-kit/SPEC.md +0 -1187
  922. package/payload/drift-kit/bin/drift-report.sh +0 -155
  923. package/payload/drift-kit/bin/kfric.sh +0 -61
  924. package/payload/drift-kit/bin/overhead-meter.sh +0 -106
  925. package/payload/drift-kit/bin/stage-economics.sh +0 -465
  926. package/payload/drift-kit/kpis/kpi-always-loaded.sh +0 -39
  927. package/payload/drift-kit/kpis/kpi-amendment-age.sh +0 -33
  928. package/payload/drift-kit/kpis/kpi-deferred-age.sh +0 -46
  929. package/payload/drift-kit/kpis/kpi-gate-backlog.sh +0 -52
  930. package/payload/drift-kit/kpis/kpi-gate-runtime.sh +0 -31
  931. package/payload/drift-kit/kpis/kpi-incident-recurrence.sh +0 -42
  932. package/payload/drift-kit/kpis/kpi-knowledge-friction.sh +0 -21
  933. package/payload/drift-kit/kpis/kpi-overhead.sh +0 -44
  934. package/payload/drift-kit/kpis/kpi-price-table-age.sh +0 -68
  935. package/payload/drift-kit/kpis/kpi-prompt-friction.sh +0 -38
  936. package/payload/drift-kit/kpis/kpi-queue-net-delta.sh +0 -74
  937. package/payload/drift-kit/kpis/kpi-settings-local.sh +0 -21
  938. package/payload/drift-kit/kpis/kpi-task-split.sh +0 -43
  939. package/payload/drift-kit/lib/drift.sh +0 -43
  940. package/payload/drift-kit/smoke/install.sh +0 -537
  941. package/payload/drift-kit/smoke/overhead-fixture.jsonl +0 -4
  942. package/payload/drift-kit/templates/drift-config.sh +0 -2
  943. package/payload/evidence-kit/SPEC.md +0 -740
  944. package/payload/evidence-kit/bin/diff-baseline.sh +0 -34
  945. package/payload/evidence-kit/bin/run-validate.sh +0 -124
  946. package/payload/evidence-kit/checks/check-producer-liveness.sh +0 -75
  947. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.sh +0 -7
  948. package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.sh +0 -7
  949. package/payload/evidence-kit/lib/evidence.sh +0 -193
  950. package/payload/evidence-kit/smoke/install.sh +0 -59
  951. package/payload/evidence-kit/smoke/violation.sh +0 -8
  952. package/payload/evidence-kit/templates/evidence-config.sh +0 -2
  953. package/payload/gate-sdk/SPEC.md +0 -10138
  954. package/payload/gate-sdk/bin/gen-pre-commit.sh +0 -297
  955. package/payload/gate-sdk/bin/install-hooks.sh +0 -60
  956. package/payload/gate-sdk/bin/port-blockers.sh +0 -473
  957. package/payload/gate-sdk/bin/run-consumer-smoke.sh +0 -239
  958. package/payload/gate-sdk/bin/run-gate-tests.sh +0 -179
  959. package/payload/gate-sdk/bin/upgrade-smoke.sh +0 -236
  960. package/payload/gate-sdk/checks/check-action-run-shell.sh +0 -223
  961. package/payload/gate-sdk/checks/check-crate-arms.sh +0 -62
  962. package/payload/gate-sdk/checks/check-gate-assertions.sh +0 -149
  963. package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +0 -397
  964. package/payload/gate-sdk/checks/check-install-disposition.sh +0 -93
  965. package/payload/gate-sdk/checks/check-shellcheck.sh +0 -57
  966. package/payload/gate-sdk/checks/check-tree-terms.sh +0 -67
  967. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.sh +0 -2
  968. package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.sh +0 -2
  969. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/args +0 -4
  970. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/emit.txt +0 -14
  971. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/projection.txt +0 -14
  972. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.sh +0 -2
  973. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.sh +0 -2
  974. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.sh +0 -6
  975. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/stub-bin +0 -3
  976. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.sh +0 -6
  977. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/stub-bin +0 -3
  978. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/installer/lib/common/recipe.sh +0 -9
  979. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-beta.gate +0 -3
  980. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-gamma.sh +0 -6
  981. package/payload/gate-sdk/gate-tests/check-install-disposition/good/installer/lib/common/recipe.sh +0 -10
  982. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +0 -5
  983. package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +0 -5
  984. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.sh +0 -5
  985. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.sh +0 -5
  986. package/payload/gate-sdk/gate-tests/declaration-lib-parity.test.sh +0 -211
  987. package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +0 -112
  988. package/payload/gate-sdk/lib/consumer-smoke.sh +0 -69
  989. package/payload/gate-sdk/lib/declaration.sh +0 -59
  990. package/payload/gate-sdk/lib/inject.sh +0 -80
  991. package/payload/gate-sdk/smoke/install.sh +0 -148
  992. package/payload/gate-sdk/smoke/violation.sh +0 -13
  993. package/payload/guard-kit/SPEC.md +0 -1063
  994. package/payload/guard-kit/bin/compare-settings-allow.sh +0 -91
  995. package/payload/guard-kit/bin/run-guard-tests.sh +0 -92
  996. package/payload/guard-kit/bin/scan-prompts.sh +0 -166
  997. package/payload/guard-kit/bin/scratch-run.sh +0 -34
  998. package/payload/guard-kit/gate-tests/guard-read-path.test.sh +0 -52
  999. package/payload/guard-kit/lib/guard.sh +0 -835
  1000. package/payload/guard-kit/smoke/install.sh +0 -26
  1001. package/payload/guard-kit/templates/bash-guard.sh +0 -18
  1002. package/payload/guard-kit/templates/escalation-guard.sh +0 -27
  1003. package/payload/guard-kit/templates/guard-config.sh +0 -5
  1004. package/payload/guard-kit/templates/wakeup-guard.sh +0 -20
  1005. package/payload/lifecycle-kit/SPEC.md +0 -2884
  1006. package/payload/lifecycle-kit/bin/cite-survey.sh +0 -81
  1007. package/payload/lifecycle-kit/bin/enter-stage.sh +0 -380
  1008. package/payload/lifecycle-kit/bin/file-gap.sh +0 -101
  1009. package/payload/lifecycle-kit/bin/file-survey.sh +0 -69
  1010. package/payload/lifecycle-kit/bin/install-lifecycle.sh +0 -36
  1011. package/payload/lifecycle-kit/bin/session-id.sh +0 -75
  1012. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.sh +0 -4
  1013. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.sh +0 -4
  1014. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.sh +0 -4
  1015. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.sh +0 -4
  1016. package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +0 -100
  1017. package/payload/lifecycle-kit/lib/stages.sh +0 -194
  1018. package/payload/lifecycle-kit/smoke/install.sh +0 -434
  1019. package/payload/lifecycle-kit/smoke/violation.sh +0 -8
  1020. package/payload/lifecycle-kit/templates/lifecycle-config.sh +0 -2
  1021. package/payload/lifecycle-kit/templates/workflow-state-guard.sh +0 -29
  1022. package/payload/queue-kit/SPEC.md +0 -1358
  1023. package/payload/queue-kit/bin/lesson-sink.sh +0 -28
  1024. package/payload/queue-kit/bin/queue-counts.sh +0 -35
  1025. package/payload/queue-kit/bin/queue-edges.sh +0 -78
  1026. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.sh +0 -6
  1027. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.sh +0 -6
  1028. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.sh +0 -3
  1029. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.sh +0 -3
  1030. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.sh +0 -6
  1031. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.sh +0 -6
  1032. package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +0 -215
  1033. package/payload/queue-kit/lib/queue.sh +0 -129
  1034. package/payload/queue-kit/smoke/install.sh +0 -25
  1035. package/payload/queue-kit/smoke/violation.sh +0 -8
  1036. package/payload/queue-kit/templates/queue-config.sh +0 -2
  1037. package/payload/site-kit/SPEC.md +0 -589
  1038. package/payload/site-kit/checks/check-docs-render-fidelity.sh +0 -242
  1039. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/scripts/site-config.sh +0 -7
  1040. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/scripts/site-config.sh +0 -7
  1041. package/payload/site-kit/lib/site.sh +0 -43
  1042. package/payload/site-kit/smoke/install.sh +0 -34
  1043. package/payload/site-kit/smoke/violation.sh +0 -20
  1044. /package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/{check-ported.gate → check-stage-entry.gate} +0 -0
@@ -1,385 +0,0 @@
1
- # doctrine-kit — the experience-packaging rung
2
-
3
- The delivery doctrine the other kits enforce piecemeal — the cross-kit practice
4
- rules a session must hold to work this methodology — becomes one kit-shipped,
5
- customer-deliverable rules file, installed by reference into a consumer's
6
- always-loaded agent file and held there by a gate. The other kits own the
7
- *mechanisms*; doctrine-kit owns the *statements* that name why those mechanisms
8
- exist, at one tier, in one place.
9
-
10
- The kit is a new remit rather than a fold into canon-kit: the doctrine spans kit
11
- charges — enforcement-first is gate-sdk-flavoured, load-trigger residency is
12
- context-kit-flavoured, content-tiering is canon-kit-flavoured — and canon-kit's
13
- own out-of-scope boundary holds that a consumer's tier contract is not
14
- canon-kit's to own.
15
-
16
- ## The doctrine deliverable
17
-
18
- `DOCTRINE.md` is the deliverable. It carries each cross-kit rule as its
19
- statement, why it holds under coding-agent work, and a pointer to the kit
20
- mechanism that enforces it; the mechanism and its knob rosters live in the cited
21
- kit SPEC, never restated in the doctrine. The rule *statements* are the
22
- doctrine's to own — a governed surface elsewhere cites a rule by name and links
23
- the doctrine rather than restating it.
24
-
25
- The roster carries two registers: methodology-maintenance rules, which govern
26
- how the methodology's own surfaces stay honest and bear on every surface edit,
27
- and engineering-craft rules, which govern how the work built under the
28
- methodology is written and are triggered by test, rename, git-rewrite,
29
- config-edit, and dispatch work. The
30
- maintenance register forms the installed digest; the craft register lives behind
31
- the link, load-triggered — the doctrine applying its own load-trigger residency
32
- rule to itself.
33
-
34
- The file is referenced in place, never copy-installed. A consumer vendors the
35
- kit and links the vendored path; re-vendoring the kit *is* the doctrine upgrade.
36
- A copied doctrine drifts the moment the source moves and the copy does not; a
37
- linked one cannot. This is point-never-restate applied to the doctrine mechanism
38
- itself.
39
-
40
- `DOCTRINE.md` joins the consumer's spec manifest (this repo wires it into
41
- `scripts/canon-config.sh`), so its links and commands resolve under the
42
- canon-kit doc gates like any governed page.
43
-
44
- ## install-doctrine
45
-
46
- `bin/install-doctrine.sh` writes the reference block into the always-loaded
47
- agent file, idempotently. The block is bounded by fixed marker lines
48
- (`<!-- doctrine-kit:begin -->` … `<!-- doctrine-kit:end -->`); a run replaces
49
- the content between the markers when they are present and appends the block when
50
- they are not, so re-running never duplicates and a marker set left in place is
51
- updated where it sits. A begin marker without its end is a malformed target: the
52
- installer refuses (exit 2) rather than guess the block bounds. The agent file
53
- must already exist — the installer edits an always-loaded file, it does not mint
54
- one — so a missing target is exit 2. The marker insert/replace itself is not
55
- this installer's code: it rides gate-sdk's shared `lib/inject.sh` helpers
56
- (`inject_marker_block` to write, `read_marker_block` to read the block as it
57
- stands), the single copy `lifecycle-kit`'s injector also uses;
58
- `install-doctrine.sh` supplies the block content (the digest) on stdin and owns
59
- every rule about what survives from one run to the next.
60
-
61
- The block is the always-loaded shape applied to the doctrine itself: a one-line
62
- digest of the methodology-maintenance rules plus a markdown link to the doctrine
63
- file. The engineering-craft register is not digested — it is load-triggered and
64
- reached through the link, so the always-loaded surface carries only what bears
65
- on every edit. The installer is the single source of the block *text* — the
66
- heading, the link paragraph, the bullet shape — so a manual insertion for a
67
- harness-less consumer copies what the tool would emit; the README documents that
68
- manual path. It is not the source of the block's *content*: the rule bullets are
69
- derived from `DOCTRINE.md` (below), so the installed digest names every
70
- methodology rule by construction rather than by an author remembering to, and a
71
- fresh consumer is in per-rule lockstep out of the box (installer and gate agree
72
- on the `## Delivery doctrine` heading — that agreement is part of
73
- check-doctrine-registration's contract). Trimming a rule the consumer does not
74
- keep resident stays legal, but rides a declared-trim marker rather than a silent
75
- deletion: the gate asserts name-lockstep modulo declared trims (§check-doctrine-registration
76
- assertion B).
77
-
78
- **The digest is derived from the doctrine, one bullet per rule.** Each
79
- methodology rule carries a `*Digest:* <one-line summary>` trailer, and the
80
- installer emits that rule's bullet as `- **<name>** — <summary>`: the name read
81
- exactly as §check-doctrine-registration assertion C reads it, the summary taken
82
- from the trailer verbatim. The bullet roster is therefore the rule roster, and
83
- the two cannot come to differ in count — the drift axis is removed rather than
84
- watched, which is what Derivation-first asks for before Enforcement-first is
85
- even consulted. A hand-maintained bullet list is what this replaces, and its
86
- failure mode was not hypothetical: a rule that landed in `DOCTRINE.md` and in
87
- this repo's own agent file never reached the installer's list, so every fresh
88
- install vendored a digest one rule short while the consumer-side gate stayed
89
- green — the skew is invisible from the tree that has both copies right.
90
-
91
- *Why a trailer and not the rule's own prose.* The obvious cheaper design is to
92
- extract the summary from the rule body's opening sentence and add no format at
93
- all. It was measured rather than assumed, and it does not hold: of the twelve
94
- bullets the digest shipped, **none** occurs as contiguous text anywhere in
95
- `DOCTRINE.md`. The digest register is deliberately terser and more imperative
96
- than the doctrine's statement register — the rule states the convention and its
97
- scope, the bullet is what survives in a file read in full at every session start
98
- — so extraction would either degrade the doctrine's own prose into digest
99
- shorthand or invent a summary the author never wrote. The trailer is the
100
- authoring surface that makes derivation honest: the summary is authored once,
101
- beside the rule it summarizes, and read from there by everything that needs it.
102
-
103
- **The derivation's refusals.** A rule carrying no `*Digest:*` trailer, or two,
104
- leaves its bullet undecidable, and the installer exits 2 naming the rule rather
105
- than emitting a digest silently short — the exact defect the derivation
106
- replaced, so failing closed is the point rather than a courtesy. A missing
107
- doctrine file and a methodology section that resolves to nothing are exit 2 on
108
- the same ground: the digest cannot be certified against an unreadable rule set.
109
- The derivation runs **once, at top level**, before the block is composed —
110
- `digest()` is read through process substitution, where an exit would end only
111
- the subshell and let the malformed doctrine through as a short digest, which is
112
- the failure mode being guarded. §check-doctrine-registration assertion E is the
113
- tree-side half of the same guard, so an untrailered rule reds at commit time
114
- instead of waiting for a consumer install to discover it.
115
-
116
- **What this asks of a consumer.** Nothing, for a consumer who re-vendors
117
- `DOCTRINE.md` unchanged — the kit ships it, and its rules ship trailered. A
118
- consumer who *appends a local rule* to their vendored copy now owes that rule a
119
- `*Digest:*` trailer. That is a real obligation and worth stating rather than
120
- claiming zero impact, but it replaces a larger one: assertion B already required
121
- such a rule to be reflected in the digest, and the trailer is what makes its
122
- bullet generate rather than have to be hand-written and kept in step.
123
-
124
- **The declared-trim round-trip.** A generated block that is unconditionally
125
- rewritten would revoke that right on the next run — and revoke it *silently*,
126
- because a trim the installer restores to a bullet leaves an agent file whose
127
- hash matches what the installer last recorded. So the run is read-compute-emit
128
- rather than emit: `read_marker_block` returns the block as it stands, the
129
- installer harvests every
130
- `<!-- doctrine-digest-trim: <rule name> — <reason> -->` line out of it, and each
131
- digest rule is emitted as **either** its bullet **or** — when that rule's name is
132
- trimmed — the harvested marker line verbatim, **in the bullet's position**.
133
- Substitution, not addition: a block carrying the trim *and* its bullet would
134
- satisfy assertions B and C while handing the consumer back the rule they
135
- removed, which is the customization defeated while appearing honored. In-place
136
- rather than appended so the consumer's reason stays where the rule it answers
137
- would have been; the gate accepts the marker anywhere in the digest section, so
138
- readability decides. The rule names the substitution keys on are the digest's
139
- own bullet names, read exactly as assertion C reads them — installer and gate
140
- never disagree about which rule a marker names.
141
-
142
- Four behaviors the round-trip fixes:
143
-
144
- - **No trims declared → byte-identical output.** Load-bearing rather than
145
- incidental: without it every consumer's agent file churns on every upgrade,
146
- and the installer's caller starts reporting a file nobody edited.
147
- - **A trim naming no rule in the current digest** — a rule renamed or dropped
148
- upstream — is carried forward *and* reported. It has no bullet position to
149
- take, so it is carried at the digest's end. Surfacing it at the re-vendor
150
- moment is the declared-not-silent design working: that is the moment the
151
- consumer's decision gets reconciled.
152
- - **Duplicate trims for one rule** — the first is carried, the duplicate
153
- dropped and reported. Silently collapsing them would be the same class of
154
- quiet edit-loss one layer up.
155
- - **The report has two channels, and the split is deliberate.** The standing
156
- rule it instances: an installer a machine may drive puts **findings on
157
- stderr** and narration on stdout, and stays silent on a clean run — stderr
158
- chatter on success is how a channel gets ignored. So each finding above goes
159
- to stderr, and the action line on stdout gains the count of trims carried and
160
- a tally of those findings. What makes the rule binding here rather than merely
161
- tidy is the caller class this script has: a vendoring installer whose own
162
- stdout is a machine-read channel of seeded paths must discard this script's,
163
- so stdout is exactly where a reconciliation the consumer owes would be lost.
164
- The honest consequence is that under such a caller the count has no reader —
165
- the carried trims are read from the commit that install makes — while every
166
- finding still reaches whoever ran it.
167
-
168
- **The honest bound.** The block is generated, and the declared trim is the only
169
- customization preserved across a run. An unsanctioned edit *inside* the span — a
170
- reworded bullet, an added line — is reverted by design, and would red
171
- §check-doctrine-registration assertion C independently; everything *outside* the
172
- markers is the adopter's and is never read or written. Stating the bound is what
173
- makes the preserved case a contract rather than an accident.
174
-
175
- **The removal mode.** `install-doctrine.sh --remove [agent-file]` is the insert
176
- path reversed over the same marker pair, riding gate-sdk's `remove_marker_block`
177
- exactly as the insert path rides its sibling — so the marker strings keep their
178
- one writer and a caller reversing an installation needs no copy of them. It
179
- harvests no trims and emits no digest: a removal has nothing to carry forward,
180
- which is what makes it the reverse of the round-trip above rather than a second,
181
- emptier pass through it — and, for the same reason, it reads no doctrine file
182
- and so none of the derivation's refusals can arise on this path. An agent file
183
- carrying **no block is not an error** —
184
- the run says there was nothing to remove and exits 0, so a second `--remove` is
185
- as quiet as the first and a caller that cannot know whether the block was ever
186
- written there needs no way to ask. Its refusals are the two the insert path
187
- holds before it reads any doctrine, unchanged and the only two on this path: a
188
- missing agent file is exit 2, and a begin marker without its end is exit 2
189
- rather than a guess at the block bounds. What it removes is the
190
- reference block and nothing else — everything outside the markers is the
191
- adopter's, on the same terms the honest bound above states for a rewrite.
192
-
193
- The round-trip's acceptor is `smoke/install.sh`, per the coverage tier
194
- gate-sdk/SPEC.md §lib/inject.sh sets for a sourced library with no gate surface:
195
- it declares a trim in the block the installer just emitted, re-runs the
196
- installer, and holds that the marker survived in the trimmed bullet's position,
197
- that the bullet is gone, and that the gate is green across the re-run. The same
198
- acceptor covers the removal mode on that tier and for that reason: it strips the
199
- block, holds that a second `--remove` is an idempotent no-op, and reinstalls to
200
- restore the baseline. It also drives the derivation's refusals, on the same tier
201
- and for a further reason: a refusal is the installer's behavior rather than the
202
- gate's, so no gate fixture can reach it. Pointed by the positional overrides at
203
- a scratch doctrine whose second rule carries no `*Digest:*` trailer — and again
204
- at one whose second rule carries two — it holds that the run exits 2, that the
205
- message names the offending rule, and that the agent file is byte-unchanged.
206
- That last assertion is the one worth having: an installer that refuses after
207
- writing has failed closed in its exit status only.
208
-
209
- Positional overrides `install-doctrine.sh [agent-file [doctrine-file]]` let a
210
- smoke or a fixture point both paths at a scratch tree without touching consumer
211
- config; unset, they fall to the knob defaults.
212
-
213
- ## check-doctrine-registration
214
-
215
- Invariant, in five assertions: the configured agent file (A) carries a markdown
216
- link to the configured doctrine file and (B, C) holds its methodology-rule digest
217
- in per-rule lockstep with the doctrine, and the doctrine's two registers tag
218
- every rule with exactly one per-rule trailer — the craft register with a
219
- stage-routing trailer (D), the methodology register with the digest trailer its
220
- bullet is generated from (E). The digest is the surface the
221
- always-loaded-shape rule requires, and a re-vendored `DOCTRINE.md` that adds or
222
- renames a methodology-maintenance rule staling every consumer's digest *by
223
- construction* — on the exact path the kit advertises as its upgrade story — is
224
- the drift-prone-surface-that-must-exist case where a gate is owed (the
225
- enforcement-first weighing). Extending the existing gate rather than adding one
226
- keeps the gate count flat; the coupling is unchanged (the `# graph:` manifest
227
- already couples the agent file and the doctrine file).
228
-
229
- - **Assertion A (link).** The gate greps the agent file for a
230
- `](<doctrine-file>` link token; absent, it is a finding with the install
231
- remedy. It asserts link *presence* only — that a session loading the agent
232
- file is pointed at the doctrine, not that the link was followed or the
233
- doctrine read (the honest limit: a link is not a read) — and leaves
234
- link-target resolution to the consumer's doc gates (canon-kit's
235
- `check-md-refs` over the manifest).
236
- - **Assertion B (doctrine → digest).** Every rule name under the doctrine's
237
- `## Methodology-maintenance rules` section — the bold text of each numbered
238
- rule, trailing period dropped (e.g. `Content-tiering / SSOT`) — appears as a
239
- bold digest lead-in (`- **<name>**`) in the agent file's digest section.
240
- Engineering-craft rules are exempt: they live behind the link by the
241
- doctrine's own two-register design, so the gate scans only the
242
- methodology section for the required set. The consumer's right to reject a
243
- rule survives as a *declared* trim: a
244
- `<!-- doctrine-digest-trim: <rule name> — <reason> -->` line inside the
245
- digest section satisfies assertion B for that rule; a silent omission stays
246
- red. Declared-not-silent is the reconciliation — the re-vendor moment
247
- surfaces every added or renamed rule, and the consumer's decision (adopt the
248
- bullet or trim it with cause) is recorded beside the digest it governs.
249
- - **Assertion C (digest → doctrine).** Every bold bullet lead-in in the digest
250
- section matches a methodology-maintenance rule name — a digest line with no
251
- owning rule is a rule stated nowhere the doctrine governs.
252
- - **Assertion D (craft-trailer coverage).** Every numbered rule under the
253
- doctrine's `## Engineering-craft rules` section carries exactly one `*Stages:*`
254
- trailer matching the tag grammar (§stage-rules). A craft rule with no trailer,
255
- or two, or a malformed value is a finding: a re-vendored `DOCTRINE.md` that adds
256
- an untagged craft rule reddens here instead of silently dropping out of the
257
- stage routing the emitter derives. Stage-name *validity* is deliberately
258
- unasserted — doctrine-kit does not depend on lifecycle-kit's stage config, and
259
- the emitter's empty-output posture already covers an unknown stage; the gate
260
- holds only that the trailer is present and well-formed.
261
- - **Assertion E (digest-trailer coverage).** Every numbered rule under the
262
- doctrine's `## Methodology-maintenance rules` section carries exactly one
263
- `*Digest:*` trailer with a non-empty value. This is D's sibling one register
264
- over, and the sentence D is argued from transposes exactly: a re-vendored
265
- `DOCTRINE.md` that adds an untrailered methodology rule reddens here instead of
266
- silently dropping out of the digest the installer derives (§install-doctrine).
267
- Zero trailers and two are both findings, for the reason they are on D — a rule
268
- with two has no decidable bullet, and picking one silently is exactly the guess
269
- a gate exists to refuse. The value is graded only for emptiness: what makes a
270
- one-line summary *good* is not machine-decidable, and a check that pretended
271
- otherwise would be the noisy gate the Enforcement-first carve-out warns
272
- against. D and E run one walk over a register's numbered rules, parameterized
273
- by the trailer name and by how its value is graded, so the two registers cannot
274
- drift apart in how a rule is read.
275
-
276
- Section resolution fails closed. The digest section is the agent-file heading
277
- named by `DOCTRINE_KIT_DIGEST_SECTION` (Layout and configuration); a configured
278
- heading matching nothing exits 2 — a renamed digest section must not disarm the
279
- gate into passing an empty set. The doctrine-side headings
280
- (`Methodology-maintenance rules` and `Engineering-craft rules`) are kit
281
- mechanism, not config: the kit ships `DOCTRINE.md`, so it owns those names, and
282
- either one's absence is likewise exit 2 (the gate cannot certify the digest or
283
- the craft trailers against an unreadable rule set). A missing agent
284
- or doctrine file is fail-closed for the same reason, as is a grep or awk that
285
- errors rather than simply not-matching.
286
-
287
- The gate satisfies the four gate-sdk contracts (gate-sdk/SPEC.md §The gate
288
- model): the single `DOCTRINE-REGISTRATION: clean` success line and a `help:`
289
- remedy on each finding path (output); exit 2 on an unreadable file, an
290
- unresolved section, or an errored capture (fail-closed); a `good/`+`bad/`
291
- fixture pair under `gate-tests/` — the pair carries the lockstep-clean and the
292
- digest-missing-a-rule cases (both craft-tagged so assertion D passes there), and
293
- a sibling `*.test.sh` drives the extra-line, declared-trim, link-absent,
294
- craft-untagged, craft-malformed, and four fail-closed cases the one-pair harness
295
- cannot hold (fixture-pair); and registration in this repo's `gates.list` where
296
- its own always-loaded file is the scan target (self-lint). Positional form
297
- `check-doctrine-registration [agent-file [doctrine-file]]` lets the fixtures
298
- point at a synthetic agent and doctrine file.
299
-
300
- ## stage-rules
301
-
302
- The engineering-craft rules are load-triggered — behind the doctrine link, not
303
- digested (§The doctrine deliverable) — and a *stage* is itself a load trigger.
304
- `bin/stage-rules.sh <stage>` closes that gap: it derives, for a given stage, the
305
- craft rules that bear on it and emits one pointer line per hit, so a session
306
- entering a stage is reminded of the craft rules to follow *before* the matching
307
- action, without the always-loaded surface carrying the prose.
308
-
309
- **The tag grammar (single source: the rule owns its stage).** Each rule under
310
- `## Engineering-craft rules` in `DOCTRINE.md` carries a machine-parsable trailer
311
- line, `*Stages:* <stage>[, <stage>…]` — a comma list of lowercase stage tokens
312
- naming the kit's default stage vocabulary — or `*Stages:* —` for a rule that
313
- routes to no stage. The mapping lives on the rule, so a re-vendored `DOCTRINE.md`
314
- carries its own routing and no consumer-side stage↔rule table exists to drift;
315
- `check-doctrine-registration` assertion D holds every craft rule to exactly one
316
- well-formed trailer.
317
-
318
- **The emitter.** `bin/stage-rules.sh <stage> [doctrine-file]` scans the craft
319
- section for rules whose `*Stages:*` line names the given stage and prints one
320
- pointer line each — rule number, name, and the doctrine path — so the reader
321
- follows the link to the rule body. An unknown stage name yields empty output:
322
- the tags name the kit-default stages, so a consumer with a renamed stage set
323
- gets no routing rather than wrong routing (the stated honest limit — a stage
324
- remap knob is deferred until such a consumer exists). It sources
325
- `lib/doctrine.sh` for the doctrine path and takes the same positional override
326
- the gate and installer do; a missing doctrine file is exit 2, an absent craft
327
- section or a no-match stage is empty output.
328
-
329
- **The surfacing seam.** The emitter is derived data with no standing tier of its
330
- own; context-kit's session-context hook is its named consumer, emitting the
331
- current stage's pointer block when the emitter is vendored
332
- (context-kit/SPEC.md §The session-context hook, the drift-line seam precedent).
333
-
334
- ## lib/doctrine.sh
335
-
336
- The sourced config loader shared by the installer and the gate: it loads
337
- `DOCTRINE_KIT_CONFIG_FILE` (or the gates-dir `doctrine-config.sh` when that env
338
- is unset), then a gitignored `.local.sh` overlay beside it, then fills each
339
- knob's default — so the installer and the gate read one resolved configuration.
340
- It carries no gate logic: structure stays in the check, values in config,
341
- defaults here.
342
-
343
- ## Layout and configuration
344
-
345
- The kit is vendored beside gate-sdk (conventionally at `doctrine-kit/`); its
346
- gate is registered in the consumer's `gates.list` by name and resolves through
347
- gate-sdk's multi-kit path. Config follows the kit pattern: an optional
348
- `doctrine-config.sh` in the gates dir (or a `DOCTRINE_KIT_CONFIG_FILE`
349
- elsewhere) overrides any knob; defaults fill what the consumer left unset. Knobs:
350
-
351
- - `DOCTRINE_KIT_AGENT_FILE` — the always-loaded file the installer edits and the
352
- gate scans, default `CLAUDE.md`.
353
- - `DOCTRINE_KIT_DOCTRINE_FILE` — the link target the installer writes and the
354
- gate asserts, default `doctrine-kit/DOCTRINE.md`.
355
- - `DOCTRINE_KIT_DIGEST_SECTION` — the agent-file heading whose bullet list the
356
- gate reads as the methodology-rule digest (assertions B and C), default
357
- `## Delivery doctrine`. The default is `install-doctrine.sh`'s installed block
358
- heading, so a zero-config consumer that installed via the tool is green out of
359
- the box; a consumer that renamed the heading repoints this knob (a rename that
360
- leaves it stale exits 2 rather than passing an empty set).
361
- - `DOCTRINE_KIT_CONFIG_FILE` — the loader override; when set it must resolve,
362
- else the loader exits 2 rather than silently run on defaults. A `.local.sh`
363
- sibling of the resolved config sources last for private overlay values.
364
-
365
- The defaults are this repo's own layout, so this repo runs the kit on itself
366
- with no config file: `CLAUDE.md` is the always-loaded agent file, and its
367
- `## Delivery doctrine` reference block links `doctrine-kit/DOCTRINE.md`.
368
-
369
- ## Out of scope
370
-
371
- Folding the doctrine into canon-kit — ruled out above. Copy-install of the
372
- doctrine file — a copied doctrine drifts; the reference is the mechanism.
373
- Per-rule enable/disable knobs — the doctrine is one document, and a consumer
374
- that rejects a rule declares a trim marker beside its digest rather than toggling
375
- a knob. A standing consultation step in place of packaging — the always-loaded
376
- anti-pattern this load-triggered kit exists to replace. A point-of-use guard
377
- pushing a craft rule at the triggering action (a Write-seam `guard_advise`) —
378
- demand-gated and out of scope: guard-kit's seam is Bash-only, the craft-rule
379
- triggers ride the harness Write/Edit tools the guard never sees, and the
380
- stage-routed surfacing (§stage-rules) already reaches every stage session, so a
381
- new Write-seam mechanism carries one tentative consumer and no live demand. The kit holds no opinion
382
- on *which* methodology rules a consumer keeps resident versus trims with cause;
383
- it ships the statements and the wiring, and the consumer's always-loaded budget
384
- rules the digest — but a trim is declared, not silent, so the gate holds the
385
- resident set and the doctrine in name-lockstep modulo those declarations.
@@ -1,194 +0,0 @@
1
- #!/usr/bin/env bash
2
- # spec: doctrine-kit/SPEC.md §install-doctrine — idempotent insert/replace of the doctrine reference block between fixed markers in the always-loaded agent file, carrying the consumer's declared trims across the rewrite
3
- set -euo pipefail
4
-
5
- KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
6
- SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
7
- # shellcheck source=../lib/doctrine.sh
8
- source "$KIT/lib/doctrine.sh"
9
- # shellcheck source=../../gate-sdk/lib/inject.sh
10
- source "$SDK/lib/inject.sh"
11
-
12
- BEGIN="<!-- doctrine-kit:begin -->"
13
- END="<!-- doctrine-kit:end -->"
14
-
15
- # spec: doctrine-kit/SPEC.md §install-doctrine — --remove: the reverse of the insert path over the same marker pair, riding gate-sdk's remove_marker_block (gate-sdk/SPEC.md §lib/inject.sh). It harvests no trims and emits no digest — a removal has nothing to carry forward — and reports what it did on the same channel (stdout) the insert path reports on. A missing agent file stays exit 2, unchanged.
16
- if [[ "${1:-}" == "--remove" ]]; then
17
- shift
18
- AGENT_FILE="${1:-$DOCTRINE_KIT_AGENT_FILE}"
19
- [[ -f "$AGENT_FILE" ]] \
20
- || { echo "install-doctrine: agent file not found: $AGENT_FILE — nothing to remove" >&2; exit 2; }
21
-
22
- result="$(remove_marker_block "$AGENT_FILE" "$BEGIN" "$END")" || exit $?
23
- if [[ "$result" == "removed" ]]; then
24
- echo "install-doctrine: removed the doctrine reference block from $AGENT_FILE"
25
- else
26
- echo "install-doctrine: no doctrine reference block found in $AGENT_FILE — nothing to remove"
27
- fi
28
- exit 0
29
- fi
30
-
31
- AGENT_FILE="${1:-$DOCTRINE_KIT_AGENT_FILE}"
32
- DOCTRINE_FILE="${2:-$DOCTRINE_KIT_DOCTRINE_FILE}"
33
- [[ -f "$AGENT_FILE" ]] \
34
- || { echo "install-doctrine: agent file not found: $AGENT_FILE — nothing to install into" >&2; exit 2; }
35
-
36
- # spec: doctrine-kit/SPEC.md §check-doctrine-registration — the doctrine-side section heading is kit mechanism (the kit ships DOCTRINE.md), never config
37
- METH_SECTION="## Methodology-maintenance rules"
38
-
39
- [[ -f "$DOCTRINE_FILE" ]] \
40
- || { echo "install-doctrine: doctrine file not found: $DOCTRINE_FILE — nothing to derive the digest from" >&2; exit 2; }
41
-
42
- # spec: doctrine-kit/SPEC.md §install-doctrine — the rule walk: name read exactly as check-doctrine-registration assertion C reads it, summary read from the rule's own *Digest:* trailer exactly as assertion E counts it
43
- read -r -d '' DIGEST_WALK <<'AWK' || true
44
- function hlevel(line, n) {
45
- if (line !~ /^#+[[:space:]]/) return 0
46
- n = 0
47
- while (substr(line, n + 1, 1) == "#") n++
48
- return n
49
- }
50
- function flush() {
51
- if (have) print cur_name "\t" dcount "\t" summary
52
- }
53
- !insec {
54
- if (hlevel($0) > 0 && substr($0, 1, length(section)) == section) {
55
- insec = 1; seen = 1; start_lvl = hlevel($0)
56
- }
57
- next
58
- }
59
- insec && hlevel($0) > 0 && hlevel($0) <= start_lvl { flush(); insec = 0; have = 0; next }
60
- insec {
61
- if ($0 ~ /^[0-9]+\.[[:space:]]+\*\*/) {
62
- flush()
63
- name = $0
64
- sub(/^[0-9]+\.[[:space:]]+\*\*/, "", name)
65
- sub(/\*\*.*/, "", name)
66
- sub(/\.$/, "", name)
67
- cur_name = name; have = 1; dcount = 0; summary = ""
68
- } else if ($0 ~ /^[[:space:]]*\*Digest:\*/) {
69
- dcount++
70
- val = $0
71
- sub(/^[[:space:]]*\*Digest:\*[[:space:]]*/, "", val)
72
- sub(/[[:space:]]+$/, "", val)
73
- if (dcount == 1) summary = val
74
- }
75
- next
76
- }
77
- END { flush(); if (!seen) print "@@NOSECTION" }
78
- AWK
79
-
80
- # spec: doctrine-kit/SPEC.md §install-doctrine — derived once at top level, never inside digest(): digest() is read through process substitution, where an exit would end the subshell and let a malformed doctrine through as a silently short digest
81
- WALK_OUT="$(awk -v section="$METH_SECTION" "$DIGEST_WALK" "$DOCTRINE_FILE")" \
82
- || { echo "install-doctrine: awk failed reading $DOCTRINE_FILE" >&2; exit 2; }
83
- if [[ "$WALK_OUT" == "@@NOSECTION" ]]; then
84
- echo "install-doctrine: no '$METH_SECTION' section in $DOCTRINE_FILE — cannot derive the digest from an unreadable rule set" >&2
85
- exit 2
86
- fi
87
-
88
- BULLETS=()
89
- while IFS=$'\t' read -r rname dcount summary; do
90
- [[ -n "$rname" ]] || continue
91
- if [[ "$dcount" != 1 ]]; then
92
- echo "install-doctrine: methodology rule '$rname' carries $dcount *Digest:* trailer(s) in $DOCTRINE_FILE, want exactly one — refusing to emit a digest missing or double-sourcing its bullet" >&2
93
- exit 2
94
- fi
95
- BULLETS+=("- **$rname** — $summary")
96
- done <<< "$WALK_OUT"
97
- [[ ${#BULLETS[@]} -gt 0 ]] \
98
- || { echo "install-doctrine: no methodology rules found under '$METH_SECTION' in $DOCTRINE_FILE — refusing to install an empty digest" >&2; exit 2; }
99
-
100
- # spec: doctrine-kit/SPEC.md §install-doctrine — the untrimmed digest: the always-loaded shape applied to the doctrine itself, a one-line-per-rule digest plus the markdown link to the doctrine file
101
- digest() {
102
- cat <<EOF
103
- ## Delivery doctrine
104
-
105
- The cross-kit delivery rules live in [$DOCTRINE_FILE]($DOCTRINE_FILE) — re-vendor
106
- to upgrade. The always-loaded maintenance rules, one line each; the doctrine adds
107
- an engineering-craft section behind the link:
108
-
109
- EOF
110
- printf '%s\n' "${BULLETS[@]}"
111
- }
112
-
113
- # spec: doctrine-kit/SPEC.md §install-doctrine — a digest bullet's rule name, extracted exactly as check-doctrine-registration extracts it (assertion C), so the substitution keys on the same string the gate keys on
114
- bullet_name() { # $1 = a digest line -> its bold lead-in name, non-zero when the line is not a rule bullet
115
- local l="$1"
116
- [[ "$l" == "- **"*"**"* ]] || return 1
117
- l="${l#- \*\*}"
118
- printf '%s\n' "${l%%\*\**}"
119
- }
120
-
121
- # spec: doctrine-kit/SPEC.md §install-doctrine — the declared-trim grammar read exactly as check-doctrine-registration reads it (assertion B), so installer and gate never disagree about which rule a marker names
122
- harvest_trims() { # block content on stdin -> one '<rule name><TAB><marker line verbatim>' per declared trim, in declaration order
123
- awk '
124
- /doctrine-digest-trim:/ {
125
- name = $0
126
- sub(/^.*doctrine-digest-trim:[[:space:]]*/, "", name)
127
- sub(/[[:space:]]*—.*$/, "", name)
128
- print name "\t" $0
129
- }
130
- '
131
- }
132
-
133
- # spec: doctrine-kit/SPEC.md §install-doctrine — the round-trip's read half: the block as it stands is the only record of what the consumer declared, so it is harvested before the rewrite that would erase it
134
- CURRENT="$(read_marker_block "$AGENT_FILE" "$BEGIN" "$END")" || exit $?
135
-
136
- declare -A TRIM_LINE=()
137
- TRIM_ORDER=()
138
- DUPES=()
139
- while IFS=$'\t' read -r tname tline; do
140
- [[ -n "$tname" ]] || continue
141
- if [[ -n "${TRIM_LINE[$tname]+set}" ]]; then
142
- DUPES+=("$tname")
143
- continue
144
- fi
145
- TRIM_LINE["$tname"]="$tline"
146
- TRIM_ORDER+=("$tname")
147
- done < <(printf '%s\n' "$CURRENT" | harvest_trims)
148
-
149
- declare -A IS_RULE=()
150
- while IFS= read -r dline; do
151
- if rname="$(bullet_name "$dline")"; then IS_RULE["$rname"]=1; fi
152
- done < <(digest)
153
-
154
- ORPHANS=()
155
- if [[ ${#TRIM_ORDER[@]} -gt 0 ]]; then
156
- for tname in "${TRIM_ORDER[@]}"; do
157
- [[ -n "${IS_RULE[$tname]:-}" ]] || ORPHANS+=("$tname")
158
- done
159
- fi
160
-
161
- # spec: doctrine-kit/SPEC.md §install-doctrine — the emit: a trimmed rule's marker replaces its bullet in place, because a block carrying both would satisfy the gate while handing back the rule the consumer removed
162
- block() {
163
- local line name
164
- while IFS= read -r line; do
165
- if name="$(bullet_name "$line")" && [[ -n "${TRIM_LINE[$name]+set}" ]]; then
166
- printf '%s\n' "${TRIM_LINE[$name]}"
167
- continue
168
- fi
169
- printf '%s\n' "$line"
170
- done < <(digest)
171
- # spec: doctrine-kit/SPEC.md §install-doctrine — a trim naming no live rule has no bullet position to take, so it is carried at the digest's end rather than dropped
172
- if [[ ${#ORPHANS[@]} -gt 0 ]]; then
173
- for name in "${ORPHANS[@]}"; do printf '%s\n' "${TRIM_LINE[$name]}"; done
174
- fi
175
- }
176
-
177
- action="$(block | inject_marker_block "$AGENT_FILE" "$BEGIN" "$END")" || exit $?
178
-
179
- # spec: doctrine-kit/SPEC.md §install-doctrine — findings go to stderr, the one channel init does not discard, so a reconciliation the consumer owes is never silent on the install path
180
- if [[ ${#ORPHANS[@]} -gt 0 ]]; then
181
- for tname in "${ORPHANS[@]}"; do
182
- echo "install-doctrine: declared trim names '$tname', which no rule in the current doctrine digest matches — carried forward unchanged; adopt the renamed rule or drop the marker" >&2
183
- done
184
- fi
185
- if [[ ${#DUPES[@]} -gt 0 ]]; then
186
- for tname in "${DUPES[@]}"; do
187
- echo "install-doctrine: duplicate declared trim for '$tname' — the first is carried, the duplicate dropped" >&2
188
- done
189
- fi
190
-
191
- findings=""
192
- if [[ ${#ORPHANS[@]} -gt 0 ]]; then findings="$findings, ${#ORPHANS[@]} unmatched"; fi
193
- if [[ ${#DUPES[@]} -gt 0 ]]; then findings="$findings, ${#DUPES[@]} duplicate"; fi
194
- echo "install-doctrine: $action the doctrine reference block in $AGENT_FILE (link → $DOCTRINE_FILE); ${#TRIM_ORDER[@]} declared trim(s) carried$findings"
@@ -1,51 +0,0 @@
1
- #!/usr/bin/env bash
2
- # spec: doctrine-kit/SPEC.md §stage-rules — derive the craft-rule pointers routed to a stage from DOCTRINE.md's *Stages:* trailers; an unknown stage yields empty output (graceful by design)
3
- set -uo pipefail
4
-
5
- KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
6
- # shellcheck source=../lib/doctrine.sh
7
- source "$KIT/lib/doctrine.sh"
8
-
9
- STAGE="${1:-}"
10
- DOCTRINE_FILE="${2:-$DOCTRINE_KIT_DOCTRINE_FILE}"
11
- [[ -n "$STAGE" ]] || { echo "usage: stage-rules.sh <stage> [doctrine-file]" >&2; exit 2; } # exit 2: usage error
12
- [[ -f "$DOCTRINE_FILE" ]] \
13
- || { echo "stage-rules: doctrine file not found: $DOCTRINE_FILE" >&2; exit 2; } # exit 2: fail-closed
14
-
15
- # spec: doctrine-kit/SPEC.md §stage-rules — the craft-section heading is kit mechanism (the kit ships DOCTRINE.md), never config
16
- CRAFT_SECTION="## Engineering-craft rules"
17
-
18
- awk -v section="$CRAFT_SECTION" -v stage="$STAGE" -v path="$DOCTRINE_FILE" '
19
- function hlevel(line, n) {
20
- if (line !~ /^#+[[:space:]]/) return 0
21
- n = 0
22
- while (substr(line, n + 1, 1) == "#") n++
23
- return n
24
- }
25
- !insec {
26
- if (hlevel($0) > 0 && substr($0, 1, length(section)) == section) {
27
- insec = 1; start_lvl = hlevel($0)
28
- }
29
- next
30
- }
31
- insec && hlevel($0) > 0 && hlevel($0) <= start_lvl { insec = 0; next }
32
- insec {
33
- if ($0 ~ /^[0-9]+\.[[:space:]]+\*\*/) {
34
- num = $0; sub(/\..*/, "", num)
35
- name = $0
36
- sub(/^[0-9]+\.[[:space:]]+\*\*/, "", name)
37
- sub(/\*\*.*/, "", name)
38
- sub(/\.$/, "", name)
39
- cur_num = num; cur_name = name
40
- } else if ($0 ~ /^[[:space:]]*\*Stages:\*/) {
41
- val = $0
42
- sub(/^[[:space:]]*\*Stages:\*[[:space:]]*/, "", val)
43
- n = split(val, toks, /,[[:space:]]*/)
44
- for (i = 1; i <= n; i++) {
45
- gsub(/[[:space:]]/, "", toks[i])
46
- if (toks[i] == stage) { print " • " cur_num ". " cur_name " — " path; break }
47
- }
48
- }
49
- next
50
- }
51
- ' "$DOCTRINE_FILE"
@@ -1,29 +0,0 @@
1
- # shellcheck shell=bash
2
- # spec: doctrine-kit/SPEC.md §lib/doctrine.sh — sourced config loader + the knob defaults, never gate structure
3
-
4
- _dk_cfg="${DOCTRINE_KIT_CONFIG_FILE:-}"
5
- if [[ -n "$_dk_cfg" ]]; then
6
- [[ -f "$_dk_cfg" ]] || {
7
- echo "doctrine-kit: DOCTRINE_KIT_CONFIG_FILE not found: $_dk_cfg" >&2
8
- exit 2
9
- }
10
- # shellcheck disable=SC1090 # consumer-supplied config, path is config
11
- source "$_dk_cfg"
12
- else
13
- _dk_cfg="${GATE_SDK_GATES_DIR:-scripts}/doctrine-config.sh"
14
- if [[ -f "$_dk_cfg" ]]; then
15
- # shellcheck disable=SC1090 # consumer-supplied config, path is config
16
- source "$_dk_cfg"
17
- fi
18
- fi
19
- # spec: doctrine-kit/SPEC.md §lib/doctrine.sh — the local overlay: a gitignored <config>.local.sh beside the tracked config sources last
20
- _dk_local="${_dk_cfg%.sh}.local.sh"
21
- if [[ -f "$_dk_local" ]]; then
22
- # shellcheck disable=SC1090 # consumer-supplied overlay, path is config
23
- source "$_dk_local"
24
- fi
25
- unset _dk_cfg _dk_local
26
-
27
- : "${DOCTRINE_KIT_AGENT_FILE:=CLAUDE.md}"
28
- : "${DOCTRINE_KIT_DOCTRINE_FILE:=doctrine-kit/DOCTRINE.md}"
29
- : "${DOCTRINE_KIT_DIGEST_SECTION:=## Delivery doctrine}"